How to think step-by-step: A mechanistic understanding of chain-of-thought reasoning

要約

思考連鎖 (CoT) プロンプトを備えた大規模言語モデル (LLM) によって優れた推論能力が実証されているにもかかわらず、CoT の生成を促進するモデルの内部メカニズムについては理解不足が蔓延しています。
この研究では、CoT 推論を明らかにする LLM 内の神経部分構造を機構の観点から調査します。
架空のオントロジーに対する多段階推論に適用された LLaMA-2 7B の分析から、LLM が段階的な推論のために複数の並列した答え生成経路を展開していることを示します。
これらの並列経路は、入力された質問コンテキストおよび生成された CoT からの連続した回答を提供します。
LLM の中間層に顕著な機能的亀裂が観察されます。
前半のトークン表現は事前トレーニングに強く偏ったままであり、後半ではインコンテキストが突然引き継ぎます。
この内部位相シフトは、さまざまな機能コンポーネントに現れます。応答トークンを書き込むアテンション ヘッドは主に後半に現れ、オントロジー関係に沿って情報を移動させるアテンション ヘッドはもっぱら前半に現れます。
私たちの知る限り、これは LLM における CoT 推論のメカニズムの調査に向けた最初の試みです。

要約(オリジナル)

Despite superior reasoning prowess demonstrated by Large Language Models (LLMs) with Chain-of-Thought (CoT) prompting, a lack of understanding prevails around the internal mechanisms of the models that facilitate CoT generation. This work investigates the neural sub-structures within LLMs that manifest CoT reasoning from a mechanistic point of view. From an analysis of LLaMA-2 7B applied to multistep reasoning over fictional ontologies, we demonstrate that LLMs deploy multiple parallel pathways of answer generation for step-by-step reasoning. These parallel pathways provide sequential answers from the input question context as well as the generated CoT. We observe a striking functional rift in the middle layers of the LLM. Token representations in the initial half remain strongly biased towards the pretraining prior, with the in-context taking over abruptly in the later half. This internal phase shift manifests in different functional components: attention heads that write the answer token predominantly appear in the later half, attention heads that move information along ontological relationships appear exclusively in the initial half, and so on. To the best of our knowledge, this is the first attempt towards mechanistic investigation of CoT reasoning in LLMs.

arxiv情報

著者 Subhabrata Dutta,Joykirat Singh,Soumen Chakrabarti,Tanmoy Chakraborty
発行日 2024-02-28 13:14:20+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL, cs.LG パーマリンク