arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.23743cs.CLcs.AIcs.LG
收藏

当针对快速与慢速思考进行训练时,LLM各层发生了什么:一种梯度视角

What Happened in LLMs Layers when Trained for Fast vs. Slow Thinking: A Gradient Perspective

University of Maryland(马里兰大学);University of Chicago(芝加哥大学)

Ming Li, Yanhong Li, Tianyi Zhou

AI总结:

本文从梯度视角分析LLM各层在快速思考与慢速思考训练下的差异,发现慢速思考能提升学习稳定性并区分推理路径正确性,为构建System-2智能体提供新见解。

摘要:

是什么造成了大语言模型(LLM)后训练中的差异?我们通过梯度的视角,研究大语言模型中不同层的训练模式。鉴于近期在思维链(CoT)和过程奖励等推理路径上训练LLM的流行趋势,我们特别关注快速与慢速思考如何影响逐层梯度。在我们的研究中,与慢速思考(详细CoT)相比,不采用CoT的快速思考会导致更大的梯度以及更大的层间梯度差异,这表明慢速思考带来了学习稳定性。此外,我们研究了在使用慢速与快速思考路径训练不同LLM时,梯度模式能否反映回答的正确性。结果表明,慢速思考的梯度能够区分正确和不相关的推理路径。作为对比,我们在非推理的知识学习任务上进行了类似的梯度分析,然而在这些任务上,仅仅增加回答长度并不会产生与慢速思考类似的行为。我们的研究加深了对LLM训练的基础理解,并对其效率和稳定性提供了新的见解,为构建可泛化的System-2智能体铺平了道路。我们的代码、数据和梯度统计信息可在以下地址找到:https://github.com/MingLiiii/Layer_Gradient。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑