从预训练到后期训练中的推理理解
Understanding Reasoning from Pretraining to Post-Training
摘要
强化学习已成为提升大型语言模型在复杂推理任务中性能的关键技术。不过,强化学习的训练后阶段往往被单独研究,而与其之前的预训练过程却很少被关注。因此,仍有两个基本问题尚未解决:(1) 预训练的参数规模和数据选择如何影响强化学习的性能表现;(2) 强化学习实际上对模型产生了什么影响?在标准的语言模型研究中,这些问题很难得到解答:预训练的数据量巨大且难以控制,因此很难区分行为是由预训练还是强化学习导致的;同时,对两个阶段进行系统的计算优化也成本极高。为了应对这些挑战,我们以国际象棋作为实验平台,来研究从预训练到强化学习整个过程的推理机制。我们遵循标准的语言模型训练流程:先从5百万参数开始训练语言模型,逐步增加参数数量至10亿参数;然后利用合成推理数据进行监督式微调;最后通过带有可验证奖励的棋局进行强化学习训练。通过这一框架,我们发现给定强化学习计算水平下的性能可以很好地从预训练损失中预测出来,而强化学习奖励曲线的斜率则与预训练使用的令牌数量呈近似线性关系。除了规模效应之外,我们还发现强化学习并非只是让SFT策略更加精准:在简单的棋局中,它会增强SFT策略已经倾向于的正确操作;而在复杂的棋局中,它则能发现那些在SFT过程中几乎不存在的正确操作。我们进一步测试了这些发现是否适用于其他领域——比如数学领域的文本——在数学领域训练10亿参数的语言模型后,同样的现象出现了:预训练时间较长的模型在强化学习后的性能更高,且提升速度更快。总的来说,我们提供了关于从预训练到强化学习过程的定量描述,以及一个用于研究整个预训练到强化学习过程的推理机制的受控实验平台。
English Abstract
Reinforcement learning (RL) has become central to improving large language models (LLMs) on complex reasoning tasks, yet RL post-training is largely studied in isolation from the pretraining that precedes it. As a result, two basic questions remain open: (1) how do pretraining choices (model size, data) shape the returns to RL compute, and (2) what does RL actually do to the model? These questions are difficult to study in the standard LLM setting: pretraining corpora are vast and uncontrolled, making it hard to attribute behaviors to pretraining versus RL, and systematic compute sweeps across both stages are prohibitively expensive. To address these challenges, we use chess as a controlled testbed for studying reasoning across the full pretraining-to-post-training pipeline. We follow the standard LLM training pipeline by pretraining language models from 5M to 1B parameters on human chess games, supervised fine-tuning on synthetic reasoning traces, and running RL on chess puzzles with verifiable rewards. Using this framework, we find that the post-RL performance at given RL compute level is well-predicted from the pretraining loss, and slope of the RL reward curves improves approximately linearly with the pretraining tokens. Beyond scaling, we find that RL does not simply sharpen the SFT policy: on easy puzzles it amplifies correct moves the SFT policy already preferred, while on hard puzzles it surfaces correct moves that were nearly absent under SFT. We further test whether our findings transfer beyond chess by training a 1B language model on math-domain text, where the same predictive pattern emerges: longer-pretrained checkpoints reach higher post-RL performance and improve faster under RL. In sum, we provide a quantitative account of the pretraining-to-RL interface and a controlled testbed for studying the science of reasoning across the full pretraining-to-post-training pipeline.