Princeton Scientists Reveal How the Brain Uses “Cognitive Legos” to Build Flexible Behavior
Artificial intelligence keeps getting better at specific tasks, from writing essays to spotting diseases in medical scans. Yet when it comes to flexibility, the human brain still has a clear edge. We can switch between tasks, learn new rules quickly, and apply old skills to unfamiliar situations with relative ease. A new study from Princeton University now offers a compelling explanation for why biological brains are so adaptable — and why AI still struggles to match that ability.
According to the research, the brain relies on reusable mental building blocks, which scientists have nicknamed “cognitive Legos.” These blocks can be snapped together in different combinations to create new behaviors without starting from scratch each time. The findings were published in the journal Nature and provide fresh insight into how the brain balances efficiency, flexibility, and learning.
At the center of this discovery is the prefrontal cortex, a brain region known for its role in planning, decision-making, and higher-level thinking. The study shows that this area doesn’t invent an entirely new solution for every challenge. Instead, it reuses existing neural components and rearranges them as needed, much like building different structures from the same set of Lego bricks.
Why Human Brains Are Still More Flexible Than AI
Modern AI systems can outperform humans in narrow domains, but they tend to fall apart when asked to handle multiple tasks or adapt quickly to new ones. One major reason is that AI models often suffer from catastrophic interference, meaning they overwrite old knowledge when learning something new.
Human brains work differently. When we learn a new skill, we rarely discard what we already know. Instead, we reuse and recombine existing abilities. If you already know how to bake bread, for example, learning to bake a cake doesn’t require relearning how ovens work or how to measure ingredients. You simply combine familiar steps with a few new ones.
This idea is known in neuroscience as compositionality, and the Princeton study provides strong neural evidence for how it works in real brains.
The Monkey Experiments That Made This Possible
To uncover how the brain achieves this flexibility, researchers trained two male rhesus macaques to perform three related categorization tasks while monitoring their brain activity. The tasks were designed to share some elements while differing in others, allowing scientists to see whether the brain reused the same neural patterns across tasks.
The monkeys were shown colorful, balloon-like shapes on a screen. Each image varied along two dimensions: shape and color. In some tasks, the monkeys had to decide whether the blob looked more like a bunny or the letter “T.” In other tasks, they had to judge whether the blob appeared more red or green.
The difficulty level changed from trial to trial. Some images were obvious, while others were ambiguous, forcing the animals to rely on subtle visual cues. To report their decision, the monkeys indicated their answer by moving their eyes in one of four directions.
Crucially, the tasks were structured so that they overlapped in specific ways. One color task and the shape task used the same eye-movement responses, while both color tasks required the same type of color judgment but different eye movements. This clever design allowed researchers to isolate which parts of the brain activity were tied to shared task components.
Cognitive Legos Inside the Prefrontal Cortex
When the scientists analyzed neural activity across the brain, a clear pattern emerged. The prefrontal cortex contained distinct, reusable patterns of activity associated with specific cognitive operations, such as identifying color or mapping a decision to a physical action.
These patterns acted like modular cognitive blocks. One block might specialize in distinguishing red from green, while another block might control eye movements. To perform a task, the brain simply links the relevant blocks together in the correct order.
Switching tasks doesn’t require rewriting the entire system. If the monkey moves from a color task to a shape task, the brain swaps out the color-discrimination block and snaps in a shape-discrimination block, while keeping the same action-related block. This reuse was especially strong in the prefrontal cortex and much weaker in other brain regions, highlighting the unique role this area plays in flexible cognition.
Another important finding was that the brain suppresses unused blocks when they are not relevant. When the task focuses on shape, color-related blocks become quieter. This selective silencing likely helps the brain focus its limited cognitive resources on what matters most at any given moment.
What This Means for Artificial Intelligence
The idea of cognitive Legos has big implications for AI research. Most artificial neural networks are not designed to reuse internal components in this way. Instead, they tend to form task-specific representations that interfere with one another.
By contrast, the brain’s modular strategy allows it to learn continuously without forgetting. If AI systems could be built around reusable, compositional modules, they might finally overcome catastrophic interference and become better at multitasking and lifelong learning.
The study suggests that future AI architectures could benefit from separating task components, such as perception, decision-making, and action, into independent but recombinable units — a strategy biology has already perfected.
Implications for Brain Disorders and Mental Health
Beyond AI, these findings may also help explain certain neurological and psychiatric conditions. Disorders such as schizophrenia, obsessive-compulsive disorder, and some forms of brain injury are often associated with reduced cognitive flexibility.
If the brain’s ability to recombine cognitive blocks is disrupted, a person may struggle to apply known skills in new contexts or shift strategies when circumstances change. Understanding how cognitive Legos work — and how they fail — could eventually guide new therapeutic approaches aimed at restoring flexible thinking.
Why the Prefrontal Cortex Matters So Much
The prefrontal cortex has long been considered the brain’s control center, but this study adds a new layer of understanding. It suggests that the region acts as a hub for assembling mental components, dynamically selecting which blocks are active and how they are connected.
This ability may be one of the key reasons humans can handle abstract reasoning, multitasking, and rapid learning — all areas where AI still lags behind.
The Bigger Picture of Brain Flexibility
This research fits into a growing body of evidence that intelligence, both biological and artificial, depends heavily on modularity and reuse. Rather than storing countless isolated solutions, the brain builds a compact library of components that can be combined in countless ways.
In that sense, the human brain is not just powerful — it is efficient, adaptive, and remarkably economical with its resources. Understanding this design principle could reshape how we think about intelligence, learning, and even creativity.
Research Paper Reference
Building compositional tasks with shared neural subspaces
Nature (2025)
https://www.nature.com/articles/s41586-025-09805-2