The sleeping brain goes through a cycle of caring and not caring about your surroundings.

When we fall sleep, the brain continues to process words it hears. It can tell a cat from a hat. But as we go into the dreaming stage of sleep, the brain seems not to care about the external world anymore.

In a new study published today in the Journal of Neuroscience, researchers looked into how the brain deals with information coming from the external world in different stages of sleep. Their findings show that during short, light naps, people may be able to process and learn the things they hear. Going into deeper sleep, however, changes everything. It may even erase what people had just learned.

“The aim of this set of experiments was to give back to sleep its richness, to really stress the fact that sleep is not at all a homogenous thing,” said Thomas Andrillon, a neuroscientist at Ecole Normale Superieure in Paris. “You may have crucial differences between light sleep, dreaming sleep, and deep sleep.”

Understanding these differences in the three stages of sleep may be especially important when devising ways to manipulate sleep to improve and optimize it — for example, by figuring out a way to help people learn new things during their idle sleep time.

Scientists long have thought that during the deeper stages of sleep, the brain disconnects from the outside world, and consciousness temporarily vanishes. They’ve proposed the brain might do this so it can go over learned memories of the day and store them without interference from the outside world. This is called memory consolidation, and numerous studies have shown that sleep is crucial for this process.

We don’t take a complete break from the outside world, which make sense from an evolutionary perspective, given that predators may have been waiting in any corner. That’s why the brain keeps the gates a little bit open, so we can wake up at the sound of an intruder (which today is mostly replaced with an alarm clock).

Recent research, however, has suggested the sleeping brain does more than process just loud or familiar noises. In experiments published in Current Biology in 2014, Andrillon and his colleagues found the brain can process words it hears while we sleep, and that this information is processed deeply enough that it can be used to make simple decisions.

Here is the earlier experiment as described by the researchers previously in The Conversation:

We carried out experiments in which we got participants to categorize spoken words that were separated into two categories: words that referred to animals or objects, for example “cat” or “hat” in a first experiment; then real words like “hammer” versus pseudo-words (words that can be pronounced but are found nowhere in the dictionary) like “fabu” in a second one.

Participants were asked to indicate the category of the word that they heard by pressing a left or right button. Once the task became more automatic, we asked them to continue to respond to the words but they were also allowed to fall asleep. Since they were lying down in a dark room, most of them fell asleep while words were being played.

At the same time we monitored their state of vigilance thanks to EEG electrodes placed on their head. Once they were asleep, and without disturbing the flow of words they were hearing, we gave our participants new items from the same categories. The idea here was to force them to extract the meaning of the word (in the first experiment) or to check whether a word was part of the lexicon (in the second experiment) in order to be able to respond.

Once the participants fell asleep, they stopped pressing buttons. But the EEG signals could still show what was going on inside their brains, so the researchers monitored brain activity in the motor cortex. This area is activated when someone is planning to press a button, even if they don’t carry out the action. The EEG signals showed that even during sleep, the participants’ brains continued preparing to respond to the words they heard. When the participants woke up, they had no memory of the words, even though their brains had clearly processed them and made a decision about which category they belonged to.

Encouraged by these findings, Andrillon and his team wondered what would happen if they let people fall deeper into sleep. They found that when people transitioned from light sleep to deep sleep, they no longer processed the words they were hearing. The brain activity the observed earlier during light sleep completely vanished.

Deep sleep, also called slow-wave sleep, is characterized by synchronized EEG activity. “Slow waves are moments of hyper synchrony in the brain, during which you have hundreds of thousands of neurons that synchronously go silent,” Andrillon said. “When this vast network goes silent, it would prevent you from processing information.”

When people left the deep sleep stage and entered the dreaming stage (known as Rapid Eye Movement or REM sleep), they still didn’t process the words they were hearing. This came as a surprise, Andrillon said, because brain activity during REM is very similar to wakefulness. Perhaps, even though people are conscious during REM sleep, they are conscious of what’s generated from the inside, and block anything coming from the outside world.

Altogether, these findings suggest the brain may process or ignore external information depending on the sleep cycle it’s in. So, could we use light sleep for learning?

These studies point to a learning effect, albeit a weak and implicit form of learning, Andrillon said. Upon awakening from light sleep, people don’t remember what words they heard while sleeping — but they show a different brain activity when they hear those words again, suggesting something in the brain remembers.

“It’s interesting to see whether this type of learning during sleep has consequences when you wake up,” Andrillon said. “Maybe these words are leaving a trace behind.”