Read our COVID-19 research and news.

Dreams are a continuation of what we experience in waking life.


This new algorithm can find the hidden patterns in your dreams

“I was at home and that scary red monster thing from that stupid Looney Tunes show was hanging around,” reads the dream diary of Izzy, a teenage girl. “There were lots of them trying to get in and I was scared to death.”

Like many people, Izzy dreams about strange characters in unlikely situations. But according to a new study, in which researchers analyzed thousands of dreams with an automated tool, Izzy’s dream is probably just an expression of her adolescent anxieties—a funhouse reflection of her everyday experiences. The researchers say the tool, which identifies and quantifies the characters, interactions, and emotions of dreams, could help psychologists quickly identify potential stressors and mental health issues among their patients.

Throughout history, people have tried to extract hidden meaning from dreams. Ancient Babylonians believed dreams contained prophecies, whereas ancient Egyptians revered them as messages from the gods. In the 1890s, Sigmund Freud assigned symbolic meanings to dream characters, objects, and scenarios—with an emphasis on sex and aggression.

Today, however, most psychologists support the “continuity hypothesis,” which posits that dreams are a continuation of what happens in waking life. Indeed, numerous studies have shown that dreams often reflect day-to-day activities and can act as a sort of nocturnal therapist, helping people process experiences and prepare for real-life problems. “If we can understand our dreams better at scale, then maybe we can also tailor technologies that improve our waking life,” says Luca Maria Aiello, a computational social scientist at Nokia Bell Labs and co-author of the study.

But dream analysis is a time-consuming task for psychologists, who must distill dream diaries into component parts and search for themes and patterns. To speed up that process, Aiello and his colleagues built an algorithm that automatically analyzed more than 24,000 dream reports collated from, a public database of dreams assembled from verified research studies.

The tool breaks the language of dream reports into smaller segments: paragraphs into sentences, sentences into phrases, and phrases into words. It then produces treelike networks to understand how individual words relate to one another: If each word is a leaf, then the branches connecting them represent grammatical rules. The algorithm sorts these words into categories (such as people or animals) and links them to positive or negative emotions; it also categorizes interactions between words as aggressive, friendly, or sexual.

Finally, using a coding system popular among psychologists, the algorithm calculates a host of scores for each dream: the average aggression of characters, for example, or the ratio of negative to positive emotions. When researchers compared the tool’s scores to those calculated by psychologists, they found the scores matched up 76% of the time, they report today in Royal Society Open Science.

The researchers say the system could help psychologists quickly identify “outlier” dreams, which might indicate sources of stress or potential mental health issues. By comparing scores within each dream to averages from the dreams of people with no reported physical or psychiatric conditions, the algorithm can identify unusual dreams.

The algorithm also lets researchers analyze how dreams differ according to gender, age, or psychiatric condition. Izzy’s dream diary, which spans 13 years, contains more frequent negative emotions in the period when she started adolescence, a time often associated with social anxiety. Her late teen years were characterized by the appearance of sexual interactions. Similarly, the dream reports of a Vietnam War veteran diagnosed with post-traumatic stress disorder featured significantly more aggression than average.

“Dreams tell us not only about what we have done today, but also about who we are,” Aiello says. He says patterns in dream reports tend to reflect patterns in daily life, supporting the continuity hypothesis.

Robert Stickgold, a sleep psychiatrist at Harvard University, says the study is an “excellent example” of using automated text analysis on dreams. “It will prove to be a useful technique,” he says. But he cautions that apparent differences in dreams between demographic groups may actually arise from differences in reporting. For example, he says, women don’t necessarily experience more emotions within their dreams than men, but they may use more emotion-laden words to describe them. “[We may need] a little more humility about the distance between a dream and a dream report,” Stickgold says.

He also points out that it’s hard to connect dreams to waking life without knowing more about the dreamer. Aiello agrees, and he doesn’t imagine his algorithm putting therapists out of jobs anytime soon. “I see our tool as very valuable support for dream scientists to scale their work up, to allow for analysis,” he says. “This doesn’t mean that experts won’t have more accurate ways of assessing the scale and giving an interpretation outside of the scale.”

Aiello hopes to one day offer instant algorithmic insights from dream reports on a wider scale, perhaps in the form of a mobile app. That would help grow the data set and make it easier for researchers to draw conclusions. But the dreamers might also benefit, he says. “This might be interesting for you to understand better your own life and psyche.”