Language Model Harnesses can be Compositional Generalizers
Abstract
Modern language models (LMs) are post-trained and deployed as agents inside a "harness", but standard harness designs accumulate context that the neural network is forced to generalize to, making training for long-horizon tasks expensive and time-consuming. We study an alternative emerging path: training inherently neurosymbolic LM harnesses, which externalize and manage context programmatically to compose existing LM capabilities. We hypothesize that training around these harnesses can offer a better return on compute by enabling compositional generalization, as they can learn to decompose complex problems so that every observation their neural LM receives is locally in-distribution, even when the full task is novel. We find that harnesses like the Recursive Language Model (RLM) learn such decompositions readily under reinforcement learning post-training: (1) we demonstrate that training only on short tasks can generalize to tasks 2-64 longer while the base neural LM improves less, and (2) training on one domain transfers to novel domains that share latent structure. On messier, complex tasks, we find that we can target individual LLM calls within a harness by generating and training on easier, synthetically generated surrogate environments with fake tool / sub-calls, a technique we call surrogate harness training. From this finding, we train RLM-27B on synthetic data, and show it improves Qwen3.8-27B in the same RLM harness on a hard suite of long-context tasks like CTC-Bench and ExpertLongBench by 26.9% on average while using 2 fewer tokens at inference time. Finally, we show that harnesses can compose over these newly learned decompositions using recursive sub-harness calls.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI
- Comments
- 12 pages, 63 pages with appendix
Related papers
From Geographic Memory to Spatial Generalization in Large Language Models
Shared title terminologycs.CLChen Chu, Zhaonan Wang, Cyrus Shahabi et al.
General progress substitutes for specific training data in language models
Shared title terminologycs.CLMark Marosi, Peter Antal
Grammar Sparsity Sets How Transformers Learn Random Languages
Shared title terminologycs.CLEdgar Andres Hernandez Moreno, Francesco Cagnetta
Diversity in Unity, Theory in Practice: Hierarchical Multitask Benchmarks for Chinese Minority Languages
Shared title terminologycs.CLYijie Li, Xi Cao, Yuan Sun et al.
Explainable Emotion and Mental Health Reasoning in Large Language Models Using Theories of Emotion
Shared title terminologycs.CLTadesse Destaw Bela, Iqra Ameer, Helena Gómez Adorno et al.
Single-Coordinate Activation Steering for Controllable Social Stance in Language Models
Shared title terminologycs.CLNaman Chawla, Chhavi Dhiman