How Your Brain Builds Stories with Math and Memory

Memory has always been one of the most fascinating puzzles of human cognition. How do we remember the events of our lives, the facts we learn, and, perhaps most intriguingly, the stories that shape our understanding of the world? While cognitive psychology has long sought to understand how our minds store and recall meaningful narratives, a recent study has taken a giant leap toward uncovering the mathematical structure behind human memory.

At the intersection of cognitive science, physics, and computer science, a team of researchers from the Institute for Advanced Study, Emory University, and the Weizmann Institute of Science has developed a groundbreaking mathematical framework that models how humans store and recall meaningful stories. Their approach uses an intriguing concept from mathematics known as “random trees,” and it could transform how we think about memory and human cognition.

The Complex Mystery of Human Memory

Humans have the remarkable ability to remember not just facts and dates, but entire stories—sometimes spanning years of experience. Stories, with their intricate layers of events and characters, are among the most complex forms of information our brains handle. Despite this complexity, understanding how the brain encodes, stores, and retrieves these narratives has been a central challenge in cognitive psychology.

“Our study aimed to solve a key challenge: creating a mathematical theory of human memory for meaningful material, like narratives,” says Misha Tsodyks, the senior author of the paper, in an interview with Medical Xpress. “The prevailing view in the field was that narratives are too complex to be modeled mathematically. But we believe we’ve proven this wrong.”

The team’s research, recently published in Physical Review Letters, presents a new framework that shows despite the complexity of human memory, there are statistical patterns in the way people recall stories—patterns that can be predicted with the help of some basic mathematical principles.

The Power of Random Trees

So, how does this all work? The researchers began by using a mathematical object called a “random tree” to represent how we store and recall narratives. A random tree is a branching structure where each branch represents a specific part of a story. The closer the branch is to the “root” of the tree, the more abstract or summarized the event is.

Tsodyks and his team hypothesized that when we first hear or read a story, our brains construct a tree-like structure to represent the narrative. Each node in the tree corresponds to a specific event or episode in the story, with the more important or abstract events sitting closer to the root of the tree. This hierarchical structure allows for a condensed representation of complex stories.

To test this theory, the team conducted recall experiments on a large group of subjects. They used a collection of spoken narratives recorded by the famous linguist William Labov in the 1960s, which consisted of 11 different stories of varying lengths. In total, the researchers asked 100 participants to recall these stories and analyze how they remembered key events.

Using modern AI tools and large language models (LLMs), the researchers discovered something unexpected: people didn’t just recall individual events. Instead, they often summarized entire episodes of a narrative in a single sentence. This finding led to the realization that the way humans represent stories in memory might resemble a tree structure, where individual nodes represent summarized portions of the narrative.

Mathematics Meets Memory

The research team went further by creating a mathematical model of human memory that treated these individual episodes as nodes of random trees. They assumed that different people might have different interpretations of the same narrative, leading to unique tree structures for each individual. However, despite these individual variations, Tsodyks believes that this model provides a unifying framework for understanding how stories are represented in human memory.

“The beauty of this model is that it can be solved mathematically, and its predictions can be directly tested with real-world data,” says Tsodyks. “Our random tree model of memory and recall is novel because it assumes that any meaningful material—whether it’s a story, historical event, or personal experience—is represented in the same way by all individuals, using a similar tree structure.”

This approach also has broader implications for the way humans think about and reason with narratives. Tsodyks and his team suggest that narratives aren’t just a form of entertainment—they might be the way we reason about the world. The tree-like structure could help us understand how we process complex ideas and events in our personal lives and social contexts.

Testing the Theory

To validate their model, the researchers compared their random tree structure to the actual recall patterns of participants. The results confirmed their hypothesis: people don’t recall stories in a linear fashion but instead condense large chunks of narrative into higher-level summaries.

As a result, the study suggests that stories are not just linear accounts of events but are stored in the brain in a more abstract and organized way. The branches of the tree represent smaller details, while the roots hold the overarching themes or episodes of the narrative. This model could explain why people often recall the gist of a story but forget certain specifics—our memory prioritizes key themes over intricate details.

Next Steps: From Theory to Practice

While the research has provided a new way of understanding memory, Tsodyks and his team are eager to explore further. Their next challenge is to determine whether this random tree model can be applied to other forms of narratives, such as fiction, historical accounts, or even everyday life experiences.

“A more ambitious direction for future research will be to find more direct evidence for the tree model,” Tsodyks adds. “We could use brain imaging to observe how people engage with and recall narratives while their brains are active, which would give us a clearer picture of the underlying process.”

A New Era in Cognitive Science

This research highlights the power of combining mathematics, computer science, and cognitive psychology to understand one of the most fundamental aspects of human cognition: memory. By providing a mathematical framework for the way we store and recall meaningful narratives, the study opens up new avenues for research on memory processes and cognitive functions.

The random tree model could eventually lead to better understanding of how humans store information—both in terms of personal experiences and the broader cultural narratives we share. It could also have applications in areas such as artificial intelligence, where understanding how humans process information is key to creating systems that can better mimic human cognition.

As we continue to explore the intricacies of human memory, the tree structure model may become a foundational tool in unlocking the mysteries of how we remember the stories that define us.

Reference: Weishun Zhong et al, Random Tree Model of Meaningful Memory, Physical Review Letters (2025). DOI: 10.1103/g1cz-wk1l