Cognitive Legos Aid Brain in Complex Behavior Formation

Princeton University

PRINCETON, NJ — Artificial intelligence may write award-winning essays and diagnose disease with remarkable accuracy, but biological brains still hold the upper hand in at least one crucial domain: flexibility.

Humans, for example, can quickly adapt to new information and unfamiliar challenges with relative ease — learning new computer software, following a recipe, or picking up a new game — while AI systems struggle to learn 'on the fly'.

In a new study, Princeton neuroscientists uncover one reason for the brain's advantage over AI: it reuses the same cognitive "blocks" across many different tasks. By combining and recombining these blocks, the brain can rapidly assemble new behaviors.

"State-of-the-art AI models can reach human, or even super-human, performance on individual tasks. But they struggle to learn and perform many different tasks," said Tim Buschman, Ph.D. , senior author of the study and associate director of the Princeton Neuroscience Institute. "We found that the brain is flexible because it can reuse components of cognition in many different tasks. By snapping together these 'cognitive Legos,' the brain is able to build new tasks."

The findings were published on November 26 in the journal Nature.

Reusing skills for new challenges

If someone knows how to tune up a bicycle, then fixing a motorcycle might come more naturally. This ability to learn something new by repurposing simpler skills from related tasks is what scientists call compositionality.

"If you already know how to bake bread, you can use this ability to bake a cake without relearning how to bake from scratch," said Sina Tafazoli, Ph.D. , a postdoctoral researcher in the Buschman lab at Princeton and lead author of the new study. "You repurpose existing skills — using an oven, measuring ingredients, kneading dough — and combine them with new ones, like whipping batter and making frosting, to create something entirely different."

Evidence for how the brain achieves such cognitive flexibility has been limited and sometimes contradictory, though.

To clarify how the brain achieves its resourcefulness, Tafazoli trained two male rhesus macaques to perform three related tasks while their brain activity was monitored.

Rather than baking bread or fixing bikes, the monkeys performed three categorization tasks. Much like trying to decode the often ambiguous penmanship of a handwritten doctor's note, the monkeys had to judge whether a colorful, balloon-like blob on a screen in front of them looked more like a bunny or the letter "T" (categorizing the shape) or if it was more red or green (categorizing color).

The task was deceptively difficult: the blobs varied in ambiguity, sometimes obviously resembling a bunny or saturated red, while other times the distinctions were subtle.

To indicate what shape or color they believed the blob to be, a monkey buzzed in their response by looking in one of the four different directions. In one task, glancing to the left meant the animal saw a bunny, whereas a glance to the right indicated it looked more like a "T".

A key feature of the design was that while every task was unique, they also shared certain elements with the other tasks.

One of the color tasks and the shape task both required looking in the same directions, whereas both color tasks required the animal to categorize the color in the same way (as either more red or more green) but required them to look in different directions to declare in their hue judgement.

This experimental design gave the researchers a way to test whether the brain reused neural patterns — its cognitive building blocks — across tasks with shared components.

Blocks build cognitive flexibility

After analyzing activity patterns across the brain, Tafazoli and Buschman found that the prefrontal cortex — a region at the front of the brain involved in higher cognition — contained several common, reusable patterns of activity across neurons working toward a common goal, such as color discrimination.

Buschman described these as the brain's "cognitive Legos" — building blocks that can be flexibly combined to create new behaviors.

"I think about a cognitive block like a function in a computer program," Buschman said. "One set of neurons might discriminate color, and its output can be mapped onto another function that drives an action. That organization allows the brain to perform a task by sequentially performing each component of that task."

To perform one of the color tasks, the animal would snap together a block that calculated the color of the image with another block that moved the eyes in different directions. When switching tasks, such as going from colors to shapes, the brain simply snapped together the relevant blocks for calculating shape and making the same eye movements.

This block sharing was largely seen in the prefrontal cortex, and not other brain regions, suggesting that this kind of compositionality is a special property of that area.

Tafazoli and Buschman also found that the prefrontal cortex quiets cognitive blocks when they are not in use, likely to help the brain better focus on the relevant task at hand.

"The brain has a limited capacity for cognitive control," Tafazoli said. "You have to compress some of your abilities so that you can focus on those that are currently important. Focusing on shape categorization, for example, momentarily diminishes the ability to encode color because the goal is shape discrimination, not color."

A more efficient way to learn — for AI and for the clinic

These cognitive Legos may help explain why humans learn new tasks so quickly. By drawing on existing mental components, the brain minimizes redundant learning – a trick AI systems have yet to master.

"A major issue with machine learning is catastrophic interference," Tafazoli said. "When a machine or a neural network learns something new, they forget and overwrite previous memories. If an artificial neural network knows how to bake a cake but then learns to bake cookies, it will forget how to bake a cake."

In the future, incorporating compositionality into AI could help create systems that continually learn new skills without forgetting old ones.

The same insight may also help improve medicine for people with neurological and psychiatric disorders. Conditions such as schizophrenia, obsessive-compulsive disorder, and certain brain injuries often impair a person's ability to apply known skills to new contexts —possibly stemming from disruptions in how the brain recombines its cognitive building blocks.

"Imagine being able to help people regain the ability to shift strategies, learn new routines, or adapt to change," Tafazoli said. "In the long run, understanding how the brain reuses and recombines knowledge could help us design therapies that restore that process."

Funding for the study was provided by the National Institutes of Health (R01MH129492, 5T32MH065214).

CITATION: "Building compositional tasks with shared neural subspaces," Sina Tafazoli, Flora M. Bouchacourt, Adel Ardalan, Nikola T. Markov, Motoaki Uchimura, Marcelo G. Mattar, Nathaniel D. Daw, Timothy J. Buschman. Nature, November 26, 2025. DOI: 10.1038/s41586-025-09805-2

/Public Release. This material from the originating organization/author(s) might be of the point-in-time nature, and edited for clarity, style and length. Mirage.News does not take institutional positions or sides, and all views, positions, and conclusions expressed herein are solely those of the author(s).View in full here.