Abstract
Humans have a remarkable ability to rapidly generalize to new tasks that is difficult to reproduce in artificial learning systems. Compositionality has been proposed as a key mechanism supporting generalization in humans, but evidence of its neural implementation and impact on behavior is still scarce. Here we study the computational properties associated with compositional generalization in both humans and artificial neural networks (ANNs) on a highly compositional task. First, we identified behavioral signatures of compositional generalization in humans, along with their neural correlates using whole-cortex functional magnetic resonance imaging (fMRI) data. Next, we designed pretraining paradigms aided by a procedure we term primitives pretraining to endow compositional task elements into ANNs. We found that ANNs with this prior knowledge had greater correspondence with human behavior and neural compositional signatures. Importantly, primitives pretraining induced abstract internal representations, excellent zero-shot generalization, and sample-efficient learning. Moreover, it gave rise to a hierarchy of abstract representations that matched human fMRI data, where sensory rule abstractions emerged in early sensory areas, and motor rule abstractions emerged in later motor areas. Our findings give empirical support to the role of compositional generalization in human behavior, implicate abstract representations as its neural implementation, and illustrate that these representations can be embedded into ANNs by designing simple and efficient pretraining procedures.
Introduction
Humans possess a remarkable ability called compositional generalization. If you know what "red" is and what an "apple" is, you can instantly recognize a "red apple" even if you’ve never seen one. Standard artificial neural networks (ANNs), however, typically require thousands of examples of specific combinations to perform well, struggling to generalize to "out-of-distribution" scenarios. This study investigates how the human brain represents compositional rules to allow for rapid learning and whether ANNs can be nudged to develop similar internal structures to improve their generalization and sample efficiency.
The C-PRO Paradigm and Human Performance
To study these questions, the researchers utilized the C-PRO (Concrete Permuted Rule Operations) task. This paradigm involves 64 unique contexts created by combining 12 rules across three domains: Logic (e.g., "BOTH", "NEITHER"), Sensory (e.g., "RED", "VERTICAL"), and Motor (e.g., "LEFT INDEX", "RIGHT MIDDLE").
Human participants showed high accuracy (~84%) even when encountering novel rule combinations for the first time. Behavioral data indicated that humans treat these rules as independent building blocks, a signature of compositional processing.
Quantifying Abstraction: The Parallelism Score
To quantify how the brain represents these rules, the researchers introduced the Parallelism Score (PS). A high PS indicates that the neural representation of a rule (like "RED") remains consistent and "parallel" in neural state space, regardless of the other rules it is paired with. Using whole-cortex fMRI, the study found that human brain activity exhibits high parallelism, suggesting that the brain uses structured, abstract codes to manage task complexity.
Primitives Pretraining in Artificial Neural Networks
The team built feedforward ANNs and introduced a novel training regimen called Primitives Pretraining. Instead of training the network on full 3-rule combinations immediately, they first trained it on:
- 1-rule Primitives: Learning basic semantics (e.g., "What is RED?").
- 2-rule Simple Tasks: Learning pairings (e.g., "If RED, press LEFT INDEX").
- Combined Pretraining: A mixture of both.
This curriculum was designed to instill the "alphabet" of the task before requiring the network to solve complex "sentences."
Key Results: Zero-Shot Generalization and Hierarchical Alignment
The results were striking. While "Vanilla" ANNs (trained from scratch) performed at chance levels (~23%) on novel task combinations, ANNs with "Combined" pretraining achieved 92.15% zero-shot accuracy, matching or exceeding human performance levels.
Beyond performance, the pretrained ANNs developed internal geometries that mirrored the human brain. Specifically, a shared hierarchy emerged: sensory abstractions appeared in early layers, logic abstractions in middle layers, and motor abstractions in final layers. This alignment suggests that the "parallel" abstract representations are the primary driver of successful generalization.
Discussion
This research demonstrates that compositional generalization is powered by abstract, parallel representations in both biological and artificial systems. By designing pretraining procedures that emphasize the building blocks of a task, we can bridge the gap between human-like flexibility and artificial intelligence. Future work will focus on automated primitive discovery, allowing agents to identify these building blocks autonomously in more complex, real-world environments.
Summary updated