对比快慢思维训练下大模型各层梯度差异,揭示慢思考更稳定高效。
What Happened in LLMs Layers when Trained for Fast vs. Slow Thinking: A Gradient Perspective
- 从梯度视角分析快慢思维对模型各层训练的影响。
- 慢思考路径梯度更小且层间差异更平缓,学习更稳定。
- 慢思考可区分正确与错误推理路径,适合构建理性智能体。
大语言模型后训练中,什么因素影响其性能?我们通过梯度视角研究不同层在训练中的模式。重点探讨快速思维(无链式思维)与慢速思维(详细链式思维)如何影响层间梯度。结果表明:无链式思维的快速思考导致更大梯度及层间梯度差异,而慢思考带来更高的学习稳定性。进一步发现,慢思考路径的梯度能有效区分正确与无关推理路径。相比之下,在非推理类知识学习任务中,单纯增加响应长度并不会引发类似慢思考行为。本研究深化了对大模型训练机制的理解,为构建通用系统2型智能体提供新思路。代码、数据及梯度统计详见:https://github.com/MingLiiii/Layer_Gradient。
原文摘要 · Abstract (English)
What makes a difference in the post-training of LLMs? We investigate the training patterns of different layers in large language models (LLMs) through the lens of the gradient. We are specifically interested in how fast vs. slow thinking affects the layer-wise gradients, given the recent popularity of training LLMs on reasoning paths such as chain-of-thoughts (CoT) and process rewards. In our study, fast thinking without CoT leads to larger gradients and larger differences of gradients across layers than slow thinking (Detailed CoT), indicating the learning stability brought by the latter. Additionally, we study whether the gradient patterns can reflect the correctness of responses when training different LLMs using slow vs. fast thinking paths. The results show that the gradients of slow thinking can distinguish correct and irrelevant reasoning paths. As a comparison, we conduct similar gradient analyses on non-reasoning knowledge learning tasks, on which, however, trivially increasing the response length does not lead to similar behaviors of slow thinking. Our study strengthens fundamental understandings of LLM training and sheds novel insights on its efficiency and stability, which pave the way towards building a generalizable System-2 agent. Our code, data, and gradient statistics can be found in: https://github.com/MingLiiii/Layer_Gradient.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。