The Cognitive Role of Dreams

(An essay from Cybernetic Ruminations)

August, 2000

Brandyn Webb /
[From a letter I wrote to a mailing list]

>Since we are functionally robots, I think it would be appropriate to talk
>about robot sleep.  Perhaps though you were talking about modern-day
>non-carbon-based robots.  If sleep is defined as an animal function (as it
>now is) then we will have to redefine sleep in order to have these robots

I imagine we've evolved to perform various functions during sleep, simply because it's there (dark, cold nights -> shut down and wait for day -> take advantage of this time to do things harder to do when we're active). Many of these will not apply to robots (no need to grow hair and fingernails--an example of something we do mostly in our sleep).

Dreaming, however, serves a very important cognitive role, which any AI would do well to employ, imho. I imagine dreams may have other functions too, but here's my theory for the primary role of dreaming:


Yeah, sounds simple minded, but consider the details: We learn about the world in a heterarchy, putting our low-level experiences together into higher-level abstractions, and those into yet higher ones, and so on. At any given time, we have a frontier of understanding, a huge knowledge base of puzzle pieces that can potentially fit together in a myriad of ways to build more useful abstractions if only we knew what those ways were.

Enter dreaming. In a dream, we can use our current knowledge to simulate the outcome of some combination or sequence of events, and then we can observe that outcome, remember it, and hence expand our "intuitive" knowledge base to cover broader, more abstract experiences than we've actually personally had (or risked). For example, think of a rat in a new complex environment: If the rat explores the entire environment once assuming good observation and memory, he now has everything he needs to truly "know" the environment: He has visited each region and knows what regions are immediate neighbors of others. Immediate neighbors is key: except for the particular path the rat took when exploring the environment (they tend to follow the spokes of a wheel, incidentally), he only knows very short-distance correlations within the environment. But when nap time comes along, and real-world input stops coming in, the rat can now continue exploring the environment in his simulated dream world--which he can do quite robustly since he knows the local transitions--with complete impunity from physical harm, no less.

In the dream, the rat knows there's cheese up on the counter (because in his explorations, he smelled residues of it, and his past experience says there will be more to come). But how can he get there!? The original route he took was incredibly long and indirect-- too much work, and too much cat exposure. So he thinks about it, applies his best spacial-planning abilities to predict a good way to go. He leaves his imaginary home beneath the imaginary fridge, scampers across the imaginary floor... Finds himself at the base of the counter, but there's no way up from here. Looks around and feels a bit exposed -- just the sort of situation where you'd expect.... An imaginary cat! He scampers along the base of the counter, mental simulation stepping him from region to region according to the transitions he learned earlier, looking for an escape... Too late! The cat catches up with him. Reset. He runs the other direction, region to region, ah hah! Hiding nook number seven! He's safe. This will be good experience to have later! Reset back to fridge. Try hypothesis number two -- around the side, hop on the chair, hop on the table, hop to the counter, voila! Got the cheese! Reset back to fridge. Run the simulation again with random cat. And so on.

Now when the rat re-enters the real world, he knows intuitively how to get around, how to make a quick escape from all the risky areas, what areas are too risky because they have no good escapes, and so on.

Now apply the same thing to us. At any given time we only know so much, but it's enough to run simulations and learn much more. It may be very abstract: Maybe we're simulating an interaction with another human, modeling their emotional transitions, working through some problem with them. Oops! Pissed them off. Reset.

Or, maybe we're working on something very concrete: Maybe we're learning a new sport, and we've got lots of short-time experience, but can't put it all together. E.g., in wind-surfing there's this function of the angle of the sail to the water and wind vs. your weight on the boom. From the exact combination of those things, you end up somewhere else a moment later -- accelerating up or down or forward or falling back -- and this changes the angles in the next moment which leads to different effects and so on. Maybe after a day or two of getting thrown around a lot, you've got a pretty good map of short-time transitions like this. But that's a far cry from being able to get from one stable position to another, or to compensate for a big gust or chop that may require a long cycle of of transitions to bring you back to neutral. In your dreams, you can keep practicing, putting together the short-time transitions you know until you find the chain that gets you where you want.

So your dreams are your learning grounds for solving the problems you can't or haven't solved during the day--practice, practice, practice and maybe when you hit the problem head on in real-life you'll act quick and survive it or even get the cheese.


Oct 12, 2000

From Study Shows Why Your Dreams Are So Weird

``We have two different memory systems. The hippocampal codes information on events from our lives. So when I ask you what did you have for breakfast, you go to the hippocampus for the answer,'' he added. ``A second system is the neocortical,'' he said, referring to another area of the brain.

``So when I ask you when we go out for breakfast 'what do you like for breakfast?', that is a different type of question. When you go for that general information you go to neocortex. An amnesic can tell you what they like for breakfast. They can't tell you what they had for breakfast.''

This is because their hippocampus is damaged. The findings suggest that the brain does not go to the hippocampus to get images for dreams, but to the long-term, neocortical system, the researchers said.

Note in reference to my above ramblings, the neocortical system is what we draw upon to "simulate" the world.

From Sleep May Play Bigger Role in Learning and Memory

The brain has two distinct memory storage systems: the hippocampus stores episodic memories about discrete events and the neocortex stores consolidated, semantic memory. Integration may be taking place during sleep. During slow-wave sleep, the hippocampus seems to be replaying specific episodic memories to the neocortex. In REM sleep, information appears to flow from the neocortex to the hippocampus.

So perhaps:

Jan 15, 2001

From When Rats Dream, It Seems, It's After a Day at the Mazes


Now, however, two researchers studying memory have offered compelling evidence that the brains of sleeping animals are at work in a way irresistably suggestive of dreaming. And the animals in question--four pink-eared, black-and-white laboratory rats--appeared to be dreaming about something very specific: the maze they were learning to run.


Oct 18, 2005

From Violent dreams may hint at why dreaming evolved


Fantini and colleagues also said the findings draw attention to another theory, which addresses why dreaming evolved rather than how it physically occurs. Proposed by Finnish psychologist Antti Revonsuo five years ago, the theory holds that dreaming evolved as a way to rehearse threatening situations, so that the dreamer can better handle them in real life.


Brandyn Webb /

(Back to Cybernetic Ruminations)