Recursive Language Models Generalize Out of Domain
- Source
- arxiv.org
- Author
- Chenxiao Yang, Zhiyuan Li, David McAllester, Nathan Srebro
- Date
Researchers Chenxiao Yang, Zhiyuan Li, David McAllester, and Nathan Srebro studied recursive language models, an approach that solves subtasks in isolated contexts rather than reasoning through one continuous chain of thought, and found the recursive approach generalizes better to out of domain problems.
The mechanism the paper identifies is a shortcut effect. Standard chain of thought reasoning happens in one shared context, which lets a model exploit spurious correlations or shortcuts that are visible across the full trace but do not reflect the actual task structure. Isolating each subtask into its own context removes access to those shortcuts, forcing the model to solve each piece on its own terms, which the authors show empirically and theoretically produces more robust generalization when the test distribution shifts away from training.
The result gives an empirical and theoretical argument for sub agent and recursive decomposition patterns, where a system breaks a task into pieces handled by separate calls rather than one long reasoning chain, specifically as a robustness technique for out of domain generalization rather than only as a way to manage context length or cost.

Context
Giving a less surrounding information can remove a misleading shortcut. In Recursive Language Models Generalize Out of Domain, the authors compare reasoning that can read the full sequence of prior steps with a recursive approach that solves each subproblem in an isolated .
Their analysis identifies a failure mode: a model can fit its training examples by using information outside the current subproblem, then fail when that surrounding information changes. Isolation prevents that particular dependency. The reported advantage concerns transfer to unfamiliar conditions; the authors find little benefit when training and test examples follow the same distribution. This supports context isolation as a way to constrain shortcuts within their analysis.
- In-distribution, isolating context buys almost nothing: can efficiently simulate the recursive rule, so its IID generalization guarantee only changes by a constant factor.
- The specific failure mode: CoT can exploit context sitting outside the current subtask as a shortcut, and that shortcut breaks the moment those out-of-subtask change under distribution shift.
- The gap isn't about capacity - CoT's function class still covers the correct recursive rule - the authors attribute it to simplicity bias picking the shortcut over the truth.
- The authors frame this as a departure from classical learning theory: merely having a model class that covers the right rule isn't enough for genuine out-of-domain reasoning.
- reasoning model — A model trained to think — generating extended internal reasoning before answering — trading time and tokens for accuracy on hard problems.
- context window — The maximum amount of text a model can consider at once — its working memory for the current conversation or task.
- chain-of-thought — Having a model write out intermediate reasoning steps before its answer, which markedly improves performance on hard problems.
- token — The chunk of text a model reads and writes in — roughly three-quarters of a word — and the unit AI usage is billed in.
articleModular Cognitive Architecture Emerges in Large Language ModelsPengrui Han, Jacob Andreas, Evelina Fedorenko, Andrea Gregor de Varda
articleChildren, but not language models, show accelerating returns in word learningMichael C. Frank
articleGRPO Beyond English: A Large-Scale Study of GRPO in Non-English and Multilingual SettingsKonstantin Dobler, Federico Scozzafava, Jonathan Janke, Mohamed Ali, Simon Lehnerer
Checking sign-in…
Loading comments…