The Valley of Code Reasoning: Scaling Knowledge Distillation of Large Language Models
本文研究了在小型非推理大型语言模型(LLM)上蒸馏竞争性编码技能的扩展趋势,提出了“代码推理谷”的概念,并发现模型性能在数据量增加时先下降后上升。
更新于 2026-11-05。作者:Muyu He、Muhammad Ali Shafique、Anand Kumar、Tsach Mackey、Nazneen Rajani。
中文摘要
提炼具有推理能力的大型语言模型(LLM)的思维轨迹到更小的模型已被证明是有效的。然而,关于模型性能如何随蒸馏数据量的增加而扩展的研究工作仍然很少。在本工作中,我们研究了在两个小型非推理LLM上蒸馏竞争性编码技能的扩展趋势。我们验证了一个假设:存在一个代码推理的“低谷”:在竞争性编码中,随着数据量的增加,下游性能首先下降,然后以比对数线性更尖锐的方式稳步上升。在确定了这一趋势后,我们进一步在相同的数据上对两个不同的蒸馏阶段进行了模型微调,以对其各自的学习阶段进行实证结论。我们了解到,在低和中低数据环境中,小模型从较简单的编码问题中获得的收益远大于从更复杂的问题中获得的收益。我们还发现,令人惊讶的是,训练数据中输出的正确性对蒸馏结果没有影响。我们的工作在理解代码推理蒸馏的训练动态方面迈出了新的步伐,超越了直觉。
英文摘要
Distilling the thinking traces of a Large Language Model (LLM) with reasoning capabilities into a smaller model has been proven effective. Yet, there is a scarcity of work done on how model performances scale with the quantity of distillation data. In this work, we study the scaling trend of distilling competitive coding skills on two small non-reasoning LLMs. We validate the hypothesis that there is a valley of code reasoning: downstream performance on competitive coding first drops as data quantity increases, then it steadily increases in a sharper-than-log-linear fashion. Having identified the trend, we further fine-tune the models at two different distillation stages on the same data to ground conclusions on their respective learning phases. We learn that across stages in the low and medium-low data regimes, small models benefit significantly from easier coding questions than from harder ones. We also find that, surprisingly, the correctness of outputs in training data makes no difference to distillation outcomes. Our work represents a step forward in understanding the training dynamics of code reasoning distillation outside intuition
解读
一句话总结
本文研究了在小型非推理大型语言模型(LLM)上蒸馏竞争性编码技能的扩展趋势,提出了“代码推理谷”的概念,并发现模型性能在数据量增加时先下降后上升。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:尽管大型语言模型(LLM)在推理能力上有显著提升,但关于推理能力如何蒸馏到非推理学生模型中,以及这些模型的推理能力是否线性增长的研究还很少。
- 现有方案不足:现有研究主要关注推理蒸馏的数据效率和推理质量,但很少关注模型训练过程中的动态和推理能力的获取。
- 研究目标:研究推理能力如何蒸馏到非推理学生模型中,并探索模型性能与蒸馏数据量的关系。
问题2:论文的核心创新点是什么?
- 技术创新:提出了“代码推理谷”的概念,揭示了模型性能与数据量之间的关系。
- 方法改进:通过实验验证了模型性能在数据量增加时先下降后上升的趋势。
- 优势:为推理蒸馏提供了新的视角和指导,有助于优化模型训练过程。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:在LIVECODEBENCH(LCB)基准测试上进行了实验,验证了模型性能与数据量之间的关系。
- 性能提升:实验结果显示,模型性能在数据量增加时先下降后上升,符合“代码推理谷”的概念。
- 对比结果:与基线方法相比,本文提出的方法在模型性能上有显著提升。
问题4:这个研究的实际应用价值是什么?
- 应用场景:该研究有助于优化推理蒸馏过程,提高非推理LLM的推理能力。
- 实施建议:在模型训练过程中,应根据数据量调整训练策略,以充分利用“代码推理谷”的优势。
- 局限与展望:该研究主要针对小型非推理LLM,未来可以扩展到其他类型的模型,并进一步研究数据质量对模型性能的影响。