ChatPaper.aiChatPaper

LLMが高速思考と遅速思考のために訓練された際の層内で何が起こったか:勾配の観点から

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

October 31, 2024
著者: Ming Li, Yanhong Li, Tianyi Zhou
cs.AI

要旨

LLMの事後トレーニングには何が違いをもたらすのか?私たちは、異なる応答や初期モデルでトレーニングする際の、大規模言語モデル(LLMs)の異なる層のトレーニングパターンを、勾配の観点から調査しています。最近、CoT(chain-of-thoughts)やプロセス報酬などの推論経路でLLMsをトレーニングすることが人気を集めていることから、特に速い思考と遅い思考が層ごとの勾配にどのような影響を与えるかに興味を持っています。私たちの研究では、CoTを使用しない速い思考は、遅い思考(詳細なCoT)よりも大きな勾配と層ごとの勾配の違いをもたらし、後者によってもたらされる学習の安定性を示しています。さらに、事前トレーニングされたLLMsは、指示に調整されたLLMsよりも速い思考の不安定性の影響を受けにくいことを明らかにしています。さらに、異なるLLMsを遅い思考と速い思考の経路でトレーニングする際、勾配パターンが応答の正確性を反映できるかどうかを調査しています。結果は、遅い思考の勾配が正しい推論経路と無関係な経路を区別できることを示しています。比較として、非推論的な知識学習タスクにおいて同様の勾配解析を行っていますが、応答の長さを単純に増やすだけでは遅い思考の同様の振る舞いをもたらしません。私たちの研究は、LLMのトレーニングに関する基本的な理解を強化し、その効率性と安定性に関する新しい洞察を提供し、一般化可能なSystem-2エージェントの構築への道を開いています。私たちのコード、データ、および勾配統計については、以下から入手できます:https://github.com/MingLiiii/Layer_Gradient.
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 gradient, when training with different responses and initial models. 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. Moreover, pre-trained LLMs are less affected by the instability of fast thinking than instruction-tuned LLMs. 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.

Summary

AI-Generated Summary

PDF644November 13, 2024