The bizarre dreams you experience during REM sleep may actually serve a purpose and be helping your brain learn, according to a study by researchers from the University of Bern.

The study was performed as part of the Human Brain Project and published in eLife.

The importance of sleep and dreams for learning and memory has long been recognized; the impact that a single restless night can have on our cognition is well known. But what we lack, says Nicolas Deperrois, lead author of the study, in a press release, “is a theory that ties this together with consolidation of experiences, generalization of concepts, and creativity.”

During sleep, we commonly experience two types of sleep phases, alternating one after the other: non-REM sleep, when the brain “replays” the sensory stimulus experienced while awake, and REM sleep, when spontaneous bursts of intense brain activity produce vivid dreams. 

The researchers used simulations of the brain cortex to model how different sleep phases affect learning. To introduce an element of unusualness in the artificial dreams, they took inspiration from a machine learning technique called generative adversarial networks. In generative adversarial networks, two neural networks compete with each other to generate new data from the same dataset, in this case a series of simple pictures of objects and animals. This operation produces new artificial images which can look superficially realistic to a human observer. 

The researchers then simulated the cortex during three distinct states: wakefulness, non-REM sleep, and REM sleep. During wakefulness, the model is exposed to pictures of boats, cars, dogs, and other objects. In non-REM sleep, the model replays the sensory inputs with some occlusions. REM sleep creates new sensory inputs through the generative adversarial networks, generating twisted but realistic versions and combinations of boats, cars, dogs, etc. To test the performance of the model, a simple classifier evaluates how easily the identity of the object (boat, dog, car, etc.) can be read from the cortical representations. 

“Non-REM and REM dreams become more realistic as our model learns,” says Jakob Jordan, senior author and leader of the research team, in the press release. “While non-REM dreams resemble waking experiences quite closely, REM dreams tend to creatively combine these experiences.” 

Interestingly, it was when the REM sleep phase was suppressed in the model, or when these dreams were made less creative, that the accuracy of the classifier decreased. When the non-REM sleep phase was removed, these representations tended to be more sensitive to sensory perturbations (here, occlusions).

According to this study, wakefulness, non-REM, and REM sleep appear to have complementary functions for learning: experiencing the stimulus, solidifying that experience, and discovering semantic concepts.

“We think these findings suggest a simple evolutionary role for dreams, without interpreting their exact meaning,” says Deperrois in the press release. “It shouldn’t be surprising that dreams are bizarre: this bizarreness serves a purpose. The next time you’re having crazy dreams, maybe don’t try to find a deeper meaning; your brain may be simply organizing your experiences.”

Photo caption: Cortical representation learning through perturbed and adversarial dreaming

Photo credit: Deperrois et al. eLife 2022;11:e76384