TL;DR
Why does a sentence like "The cart that the horse that the farmer bought pulled broke" tie our brains in knots? For decades, cognitive scientists have blamed our limited working memory, but this paper tests that idea using Transformer language models (LMs)—which have virtually superhuman working memory—and finds that they struggle with deeply nested sentences in the exact same way humans do. However, when even a small LM is directly trained on nested examples, it easily surpasses human performance, suggesting that our struggle with recursion is driven by statistical rarity rather than memory limits.
What Problem Does This Paper Address?
Human language is famous for recursion—the ability to nest clauses inside other clauses, theoretically ad infinitum. Yet not all recursion is created equal. Tail-recursion (tacking clauses onto the end, like "The farmer bought the horse that pulled the cart that broke") is effortless. Center-embedding (stuffing clauses into the middle of other clauses) causes our comprehension to crash after just one or two levels.
Two competing theories try to explain why:
- The Memory Account: Center-embedding forces the brain to hold incomplete clauses in working memory (WM) while waiting to match subjects with their verbs. Once we hit our WM limit, processing collapses.
- The Statistical Account: Deep center-embeddings are vanishingly rare in everyday language. Because our brains are statistical learners, we struggle simply because these structures are unexpected.
Testing these theories in humans is nearly impossible because you can't easily expand an adult's working memory. The authors realized that Transformer LMs offer a clever natural experiment: they master human-like grammar from human-like text, but they have direct access to thousands of tokens of context—effectively removing human-like WM constraints. If the memory account is right, LMs should breeze through deep center-embeddings. If the statistical account is right, LMs should fail just like us.
Methods
The researchers compared 463 human participants against 15 Transformer LMs (10 pretrained "base" models like GPT-2 and Llama 3, plus 5 post-trained models like GPT-5, Gemini 3, and Gemma 3) across two main tasks:
- Incremental Sentence Completion (Production): Participants were given sentence preambles that forced them to complete a center-embedded structure (e.g., "The reporter who the professor who...") at shallow depths (1–2) and deep depths (up to 10). Crucially, LMs were evaluated "online" (greedy next-token decoding with reasoning/thought tokens turned off) to mirror real-time human processing. Completions were scored for grammaticality and plausibility by Claude Sonnet 4 (validated against human annotators).
- Subject-Verb Agreement (Comprehension/Parsing): To isolate syntactic tracking from semantic plausibility, participants read nested preambles and had to pick the grammatically matching verb form (singular vs. plural) at various depths. For LMs, the researchers compared the probabilities assigned to the singular vs. plural verb.
- Causal Finetuning: To test whether statistical exposure alone drives performance, the authors finetuned the weakest model in their cohort—GPT-2 (small)—on 10,000 synthetic center-embedded sentences (Depths 1–5) and re-tested it.
Datasets
- Shallow Completion: 24 hand-crafted preambles (Depths 1 and 2, varying subject animacy) completed by 371 humans and all 15 LMs.
- Deep Completion: 1,100 programmatically generated preambles (Depths 0 to 10) across 100 semantic themes, completed by 50 humans and the post-trained LMs (generating 42,250 completions total).
- Subject-Verb Agreement: 19,500 synthetic test items (Depths 1 to 10) across three conditions: singular baseline, plural baseline, and random plurality (where each noun phrase was randomly singular or plural, forcing true syntactic tracking), tested on 42 humans and 12 open-weight LMs.
- Finetuning Dataset: 10,000 synthetic center-embedded sentences (Depths 1–5) generated using Claude Sonnet 4.6.
Key Insights and Ideas
- LMs fail like humans in real time, despite huge memory: Even top-tier post-trained LMs experienced a sharp, human-like drop in performance as embedding depth increased. Having thousands of tokens of context did not unlock superhuman recursion.
- Competence vs. Performance: When post-trained LMs (GPT-5, Gemini 3) were allowed to use "offline" reasoning (generating thought tokens, akin to giving a human pen and paper), they could accurately parse and complete very deep center-embeddings. They possess the grammatical competence; they just can't deploy it incrementally.
- Statistics are causally sufficient: Finetuning tiny GPT-2 (small) on just 10,000 nested examples made it dramatically outperform humans on Depths 1–5, proving that statistical exposure—not architectural memory limits—was the bottleneck.
- Different heuristics: When guessing on hard agreement items, humans leaned toward an "agree-first" heuristic (matching the first noun), whereas LMs leaned toward an "agree-last" heuristic (matching the most recent noun).
Key Results
- Shallow Completion: Humans dropped from 85.6% accuracy at Depth 1 to 23.1% at Depth 2. Most LMs showed a similar human-like drop when adjacent subjects shared animacy.
- Deep Completion: Proprietary LMs (GPT-5, Gemini 3) outperformed humans at intermediate Depths 2–4 (e.g., ~50% accuracy at Depth 2, ~30% at Depth 4), but converged to human-like floor performance from Depth 5 onward.
- Subject-Verb Agreement: In the critical random plurality condition, humans averaged 0.67 (±0.13) accuracy across positions. Most LMs performed below chance at intermediate depths; the best LM (Gemma 3) averaged 0.59 (±0.01).
- Finetuning GPT-2 (small): Agreement accuracy in the random plurality condition jumped 49% (from 0.49 to 0.73), and deep completion accuracy surged up to Depth 5, with modest generalization to untrained Depths 6–7.
Limitations and Future Work
- The Depth 2–4 Gap: Proprietary LMs slightly outperformed humans at Depths 2–4. While this could reflect LMs' vastly larger training data, the authors note it could also reflect a small role for human working memory—a question left for future work.
- Process-level alignment: LMs and humans might arrive at similar failure patterns through different underlying mechanisms. However, the authors argue that if a memory-unconstrained system shows the same deficit, that deficit can't be used as evidence for a memory-based mechanism.
- Evolutionary origins: Even if human working memory constraints originally shaped the statistics of language over evolutionary time (filtering out deep center-embeddings), the resulting statistics alone are sufficient to explain why modern speakers struggle with them.
Summary updated