Compositional Reasoning in Language Models under Reinforcement Learning Post-Training
Abstract
Compositional reasoning is critical for real-world problem solving: since training data is necessarily limited, models must generalize by composing learned skills in new ways. While post-training methods such as reinforcement learning (RL) have substantially improved the reasoning abilities of language models (LMs), their effects on compositional reasoning remain less well understood. We propose a dependency-graph framework to formalize compositional reasoning, yielding three levels of compositionality with increasing complexity. We conduct a systematic, controlled study of RL post-training by instantiating this framework with data-structure tasks, which provide deterministic reward computation and clear compositional structure. Extending prior findings in compositional generalization, we find that a decomposed-to-composed asymmetry persists under outcome-only RL on stateful tasks: decomposed-skill training does not reliably transfer to composed tasks, whereas composed-task training transfers more readily back to decomposed tasks. We provide theoretical explanation for this asymmetry, and further evaluate compositional generalization under length extrapolation, structural distribution shift, and transfer to tasks requiring unseen skills. Finally, we present a pilot study on tool-calling benchmarks, offering preliminary evidence that the decomposed-to-composed asymmetry may also arise in a practical setting.