Dream decoding: What if you could replay your inner world?

This student story was published as part of the 2025 NASW Perlman Virtual Mentoring Program organized by the NASW Education Committee, providing science journalism experience for undergraduate and graduate students.

Story by Iván Linares-García
Mentored and edited by Michael E. Newman

Dreams blend nonsense, randomness, and at times, significant imagery in our unconscious minds. In some cases, remembered dreams can even spark breakthroughs in science and art. Mary Shelley envisioned her Gothic novel, Frankenstein, in a vivid dream. Dmitri Mendeleev saw the periodic table in his sleep. Paul McCartney awoke with the melody for “Yesterday.” What if we could intentionally revisit the story lines of the mental adventures we take each night?

One researcher working towards this goal is Yanwei Fu, a professor of data science at China’s Fudan University. Fu and his team are investigating how to interpret the hidden language of our dreams directly from brain activity during sleep.

Inspired by traditional Chinese dream books and Freudian psychoanalysis, Fu and his collaborators are taking some of the first scientific steps toward visualizing the rough outline of a person’s dream, a process they call dream decoding.

"Dream decoding means translating patterns of brain activity during sleep into something we can interpret — like words, images, or categories describing what the person was dreaming about," says Fu.

To begin decoding, Fu’s team records the brain activity of people as they view real images while awake. Next, they train artificial intelligence (AI) models to reconstruct those images directly from the previously recorded brain signals of other subjects. This brain activity is measured using functional magnetic resonance imaging (fMRI), a technique that tracks blood flow in the brain to identify which areas are active during certain moments or in response to stimuli.

With the awake data in hand, the researchers collect a second set of fMRI data from people as they dream. By referencing these two datasets, the researchers decode visual "snapshots" captured at various points throughout the dream cycle.

For the last step in the dream decoding process, the researchers stitch all the fragments together into coherent narratives, creating a tapestry-like storyline for the captured dreams. This is achieved using large language models (LLMs), advanced AI systems trained on extensive text datasets, so that dream content can be interpreted with more flexibility and intuition.

Fu explains that these AI models allow researchers to move beyond basic, one-word tags like "animal" or "person." Instead, they can generate detailed scene descriptions like “a woman walking her dog at sunset,” which helps create a richer and more personal picture of the dream.

Once trained, the LLMs transform fragmented dream imagery into stories. These narratives are then converted into prompts for ChatGPT, which generates visual interpretations of the dreams that closely match the dreamer’s actual recollections.

Fu says he believes dream decoding "offers a new lens into what it means to be human," with the potential to reveal how we process emotions, form memories, and even experience consciousness. He also sees clinical promise.

"fMRI neural decoding can generally help with diagnosing trauma, PTSD or mood disorders by visualizing images or videos from brain signals," Fu explains. "For example, if we decode dreams — even when the person doesn’t fully remember them — we might detect early signs of distress and be able to intervene."

Decoding how emotions are processed during sleep also could open new paths for treating depression, anxiety, and sleep disorders.

Still, significant challenges remain.

"We need to improve accuracy, make the technology more accessible, and ensure it works across diverse populations — not just in lab settings," says Fu. "That means larger datasets, better brain-scanning tools, and more robust AI models. We also need to think carefully about issues related to the eventual use of dream decoding, such as ethics, privacy, and consent."

Rapid advances in AI have enabled researchers to start down the path toward making dream decoding research a viable tool, but the influence flows both ways.

Fu and his team believe that fMRI signals could help train generative AI to better reflect individual thought patterns. This would allow the AI to turn abstract brain activity into more vivid and meaningful content, such as text or images that align with how a person thinks.

In the future, these technologies could help us channel our subconscious meanderings into stories, songs or even works of art.

"One day," Fu imagines, "you might simply wake up from a deep sleep and — with the help of AI — a masterpiece could emerge from the fragments of your subconscious, glimpses beneath the surface of waking life."

We spend nearly a third of our lives dreaming, exploring worlds hidden deep within our minds. Perhaps now, thanks to the work of Fu and others researching dream decoding, we may be finally ready to peek beyond the door, unlocking the mysteries of dreams to better understand not just our sleep, but ourselves.

Top image: Researchers in China and elsewhere are taking some of the first scientific steps—including artificial intelligence (AI), large language models (LLMs) and functional magnetic resonance imaging (fMRI)—to visualize the rough storyline of a person’s dream, a process known as dream decoding. Original watercolor created for this story by Arturo Linares

Iván Linares-García photo

Iván Linares-García

Iván Linares-García is a science writer passionate about making brain science accessible to all. He is the founder of BrainBeatsNews, a new bilingual blog that bridges the gap between cutting-edge neuroscience and everyday understanding. With a background in biology, a master’s degree, and a forthcoming Ph.D. in neuroscience, Iván blends research experience with storytelling to share how the brain shapes behavior. Through projects like Lightshu Neuroscience, he brings science to Spanish-speaking audiences, drawing from his Mexican roots and scientific training to inform, inspire, and connect.


The NASW Perlman Virtual Mentoring program is named for longtime science writer and past NASW President David Perlman. Dave, who died in 2020 at the age of 101 only three years after his retirement from the San Francisco Chronicle, was a mentor to countless members of the science writing community and always made time for kind and supportive words, especially for early career writers.

You can contact the NASW Education Committee at education@nasw.org. Thank you to the many NASW member volunteers who lead our #SciWriStudent programming year after year.

Founded in 1934 with a mission to fight for the free flow of science news, NASW is an organization of ~2,600 professional journalists, authors, editors, producers, public information officers, students and people who write and produce material intended to inform the public about science, health, engineering, and technology. To learn more, visit www.nasw.org.

ADVERTISEMENT
Science Communication Awards in Acoustics

ADVERTISEMENT
AACR June L. Biedler Prize for Cancer Journalism

ADVERTISEMENT
Advertise with NASW