要約
「ソクラテスは人間です。
すべての人間は致命的です。
したがって、ソクラテスは致命的です。」
この古典的な例は、2つのホップの推論を示しており、結論は2つの接続された施設から論理的に続きます。
トランスベースの大手言語モデル(LLMS)は2ホップの推論を行うことができますが、気を散らす施設に直面した場合、ランダムな推測に崩壊する傾向があります。
基礎となるメカニズムを理解するために、合成2ホップの推論タスクで3層トランスを訓練します。
トレーニングダイナミクスは2つの段階を示しています。3層トランスがLLMSのようなランダム推測を実行する遅い学習フェーズ、続いて急激な位相遷移が続き、3層トランスが突然100%$の精度に達します。
リバースエンジニアリングを通じて、モデルが最初に気晴らしの間でランダムに推測することを学習する方法と、最終的に気晴らしを無視することを学ぶ方法についての内部メカニズムを説明します。
さらに、トランスのトレーニングダイナミクスに対するメカニズムの因果関係をサポートする3パラメーターモデルを提案します。
最後に、LLMの実験は、発見されたメカニズムがスケール全体で一般化することを示唆しています。
私たちの方法論は、LLMの科学的理解のための新しい視点を提供し、私たちの調査結果は、トレーニング中に推論がどのように現れるかについての新しい洞察を提供します。
要約(オリジナル)
‘Socrates is human. All humans are mortal. Therefore, Socrates is mortal.’ This classical example demonstrates two-hop reasoning, where a conclusion logically follows from two connected premises. While transformer-based Large Language Models (LLMs) can make two-hop reasoning, they tend to collapse to random guessing when faced with distracting premises. To understand the underlying mechanism, we train a three-layer transformer on synthetic two-hop reasoning tasks. The training dynamics show two stages: a slow learning phase, where the 3-layer transformer performs random guessing like LLMs, followed by an abrupt phase transitions, where the 3-layer transformer suddenly reaches $100%$ accuracy. Through reverse engineering, we explain the inner mechanisms for how models learn to randomly guess between distractions initially, and how they learn to ignore distractions eventually. We further propose a three-parameter model that supports the causal claims for the mechanisms to the training dynamics of the transformer. Finally, experiments on LLMs suggest that the discovered mechanisms generalize across scales. Our methodologies provide new perspectives for scientific understandings of LLMs and our findings provide new insights into how reasoning emerges during training.
arxiv情報
著者 | Tianyu Guo,Hanlin Zhu,Ruiqi Zhang,Jiantao Jiao,Song Mei,Michael I. Jordan,Stuart Russell |
発行日 | 2025-02-19 17:46:30+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google