The Parallels Between Generative AI And Dreams

Food for Thought

The generation of images through AI is akin to the process of dreaming during sleep, which explains why AI-generated images often possess dream-like qualities. My understanding is that dreaming occurs as our brains transfer content from short-term to long-term memory, like saving data from RAM to a hard drive. Jacques Lacan’s famous assertion, “The unconscious is structured like a language,” sheds light on this phenomenon.

AI image generation evolved from a machine learning model designed to classify images. By training the model with thousands of images, say, of tulips, it became proficient at identifying tulips it had never seen before. Curious computer scientists then wondered if the process could be inverted—by inputting the label “tulip,” could the model generate an image resembling a tulip? It worked.

I imagine the process of dreaming to work similarly. During our waking hours, we process vast amounts of sensory and linguistic data, mostly unconsciously. For instance, upon seeing an object in the sky, you think “airplane.” When you hear the word “airplane,” you visualize one in your mind. In sleep, without external inputs, only this visualization process occurs. The transfer of linguistically structured data from short-term to long-term memory triggers associated images in your brain. However, the resulting images are generalized and lack specific details. An image of an “airplane” would amalgamate the countless airplanes you have seen, not replicating the exact one you observed that day.

When we browse through AI-generated human faces, we can observe the same phenomenon. We seldom see scars, large pimples, unusual accessories, or unique lighting conditions in these images. What makes dreams surreal is partly this process of generalization. We don’t actually see melting clocks in our dreams, as Dali suggested, because we don’t see them in real life, unless “melting clock” was stored in our short-term memory.

If our unconscious were structured like the laws of physics or logic, we wouldn’t have a dream of, for instance, flying. Dreams are surreal partly because the structure of language is not bound by logic, which also explains why ChatGPT struggles with reasoning or mathematics despite operating on computers.

Conversely, ChatGPT excels at creating metaphors and metonymies, reflecting linguistic operations. As Freud noted, in dreams, metaphors appear as condensation and metonymies as displacement.

Because the data are generalized, ChatGPT cannot tell us exactly where any piece of its knowledge came from. Particularities are lost, just as in our dreams—we do not uncover new details of the airplane in our dreams that we did not process when we saw it in the sky.

This raises an intriguing question: Could AI evolve to wake up from its dreams? That is, could it ever generate an ungeneralized image with particularities that teach us something new?