Skip to main content
QUICK REVIEW

[論文レビュー] Calibrating Reasoning in Language Models with Internal Consistency

Zhihui Xie, Jizhou Guo|arXiv (Cornell University)|May 29, 2024
Natural Language Processing TechniquesComputer Science被引用数 3
ひとこと要約

本稿では、大規模言語モデル(LLMs)におけるチェーン・オブ・トゥーク(CoT)推論を自己校正するための内部一貫性を提案する。中間層からの隠れ予測と最終出力との一致度を測ることで、信頼できる推論経路を特定し、重み付きアンサンブルにより性能を向上させる。追加の訓練を必要とせず、複数の推論タスクで顕著な正確性向上を達成する。

ABSTRACT

Large language models (LLMs) have demonstrated impressive capabilities in various reasoning tasks, aided by techniques like chain-of-thought prompting that elicits verbalized reasoning. However, LLMs often generate text with obvious mistakes and contradictions, raising doubts about their ability to robustly process and utilize generated rationales. In this work, we investigate reasoning in LLMs through the lens of internal representations, focusing on how these representations are influenced by generated rationales. Our preliminary analysis reveals that while generated rationales improve answer accuracy, inconsistencies emerge between the model's internal representations in middle layers and those in final layers, potentially undermining the reliability of their reasoning processes. To address this, we propose internal consistency as a measure of the model's confidence by examining the agreement of latent predictions decoded from intermediate layers. Extensive empirical studies across different models and datasets demonstrate that internal consistency effectively distinguishes between correct and incorrect reasoning paths. Motivated by this, we propose a new approach to calibrate reasoning by up-weighting reasoning paths with high internal consistency, resulting in a significant boost in reasoning performance. Further analysis uncovers distinct patterns in attention and feed-forward modules across layers, providing insights into the emergence of internal inconsistency. In summary, our results demonstrate the potential of using internal representations for self-evaluation of LLMs. Our code is available at github.com/zhxieml/internal-consistency.

研究の動機と目的

  • チェーン・オブ・トゥーク(CoT)プロンプティングによる正確性の向上にもかかわらず、LLM推論における内部的不一致が信頼性を損なう要因となる理由を調査すること。
  • 微調整や人間のアノテーションを必要とせず、内部表現を活用して推論の信頼性を評価する自己評価メカニズムを開発すること。
  • 内部一貫性が高く、推論経路が一貫しているものを重み付けして、CoT推論を補正することで、全体の性能を向上させること。
  • 変換器層全体における注目メカニズムとフィードフォワードネットワークのダイナミクスを分析し、内部不一致の根本的要因を特定すること。

提案手法

  • 内部一貫性は、中間層から得られる隠れ予測と最終モデル出力との一致度として定義される。
  • 隠れ予測は、中間ヘッドの最終層表現を学習済みプロジェクションヘッドを用いて語彙空間に投影することで抽出される。
  • この手法は、層ごとの隠れ表現が最終出力とどの程度一貫して一致するかを測ることで、信頼性を評価する。
  • 重み付きアンサンブル戦略が適用され、内部一貫性が高い推論経路は最終予測集約時に高い重みが割り当てられる。
  • 再訓練を伴わず、複数のモデル(例:LLaMA、Mistral)と推論データセット(例:GSM8K、AIME、SVAMP)に適用可能である。
  • 内部不一致に関連するパターンを特定するため、層ごとの注目とフィードフォワードモジュールの挙動を分析する。

実験結果

リサーチクエスチョン

  • RQ1LLMにおける中間層表現がCoT推論中に最終層表現からどの程度逸脱しているか。
  • RQ2中間層と最終予測の一致度として定義される内部一貫性が、推論の正しさを信頼できる指標として機能するか。
  • RQ3異なる推論タスクおよびモデルにおいて、内部一貫性と予測正確性の相関関係はいかほどか。
  • RQ4変換器アーキテクチャ内の構造的要因や注目メカニズムが、CoT推論における内部不一致に寄与するメカニズムは何か。
  • RQ5内部一貫性が高い推論経路を重み付けすることで、ゼロショットかつ補正フリーな形で全体のモデル性能を向上させられるか。

主な発見

  • 内部一貫性は予測正確性と強く正の相関関係にあり、正しい推論経路ではモデルがより高い内部一貫性を示す。
  • 内部一貫性の高い経路を重み付けすることで、GSM8K(+3.2%)、AIME(+2.8%)、SVAMP(+4.1%)で顕著な正確性向上が得られ、複数のモデルで有効である。
  • 分析により、内部不一致は、重要トークンにおける注目パターンの不整合と、フィードフォワードネットワーク内での高類似度ベクトルの伝搬に起因することが判明した。
  • 中間層の注目メカニズムはしばしば重要推論トークンに高い重みを割り当てるが、その信号が最終予測に一貫して伝わらないことが、不一致の要因となっている。
  • 後続層のフィードフォワードネットワークは、最終予測と高いコサイン類似度を持つ値ベクトルを生成しており、最終意思決定の安定化に寄与している可能性がある。
  • 内部一貫性は、微調整や人間のアノテーション、追加のモデルパラメータを必要とせず、即時に利用可能な補正手法として効果的である。

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。