Language Model Harnesses can be Compositional Generalizers

Alex L. Zhang, Souradip Chakraborty and Omar Khattab (MIT CSAIL) argue that neurosymbolic harnesses such as Recursive Language Models generalize compositionally because they keep every input to the underlying LM in distribution, and train RLM-27B to test it.
Ask this paper
Core claim. Standard harnesses accumulate context that the model must generalize to. Harnesses that manage context programmatically can decompose a novel task so each individual LM call sees a familiar input.
Length and domain transfer. Under RL post-training, RLMs trained only on short tasks generalize to tasks 2 to 64 times longer, while the base LM improves less. Training on one domain also transfers to new domains with shared latent structure.
Surrogate harness training. For complex tasks, individual LM calls inside the harness are trained on easier, synthetic surrogate environments with fake tool and sub-calls, rather than on the full task.
RLM-27B. Trained on synthetic data, RLM-27B improves Qwen3.8-27B in the same RLM harness by 26.9% on average on hard long-context tasks such as CTC-Bench and ExpertLongBench, using about 2 times fewer inference tokens.
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$\times$ 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 $\sim$2$\times$ fewer tokens at inference time. Finally, we show that harnesses can compose over these newly learned decompositions using recursive sub-harness calls.