Skip to main content
QUICK REVIEW

[論文レビュー] Contrastive Decoding Improves Reasoning in Large Language Models

Sean O’Brien|arXiv (Cornell University)|Sep 17, 2023
Natural Language Processing Techniques参考文献 6被引用数 5
ひとこと要約

この論文は、トレーニングフリーで計算コストが低い手法「対照的デコード」が、強力なエキスパートモデルと弱いアマチュアモデルの尤度差を最大化することで、大規模言語モデルにおける推論性能を顕著に向上させることを示している。微調整なしにGSM8KおよびHellaSwagベンチマークで最先端の結果を達成しており、LLaMA 2 や GPT-3.5 よりも優れた性能を発揮する。

ABSTRACT

This record contains the camera-ready paper “LLM Inference in Normal Form: A TRoT-Based Unification.”We show that many inference-time methods for large language models (LLMs)—e.g., MBR/eMBR decoding, Conformal prediction gates, Verifier/Judge ensembles, Self-RAG, Chain/Tree/Graph-of-Thought, and Verifier-Sandwich (VS)—admit a single normal form derived from the Theory of Relativity of Theories (TRoT). Our formulation uses enriched category theory over the Lawvere cost quantale (tropical (min,+) semiring): left/right Kan extensions \Lan/\Ran\Lan/\Ran\Lan/\Ran, residuation (elementwise residuals), masking and nuclei (1-Lipschitz projectors). In this normal form, generation/lifts (K3), safety consolidation (K4), and auditing (K6–K10 RAVE) become GraphBLAS-style sparse operators with explicit stability and auditability contracts. Provable guarantees Implementation equivalence (normal form): common decoding “tricks” map to \Lan\Lan\Lan → Obs → \Ran\Ran\Ran with the same outputs under masking/nucleus conditions. Stability: \Lan\Lan\Lan and the residual are 1-Lipschitz in ℓ∞\ell_\inftyℓ∞. Approximation bounds: geometric truncation error q\*k+11−q\*\frac{q_\*^{k+1}}{1-q_\*}1−q\*q\*k+1; soft-min (log-sum-exp) gap k log⁡dmax⁡λcost\frac{k\,\log d_{\max}}{\lambda_{ ext{cost}}}λcostklogdmax (with join ≡ numeric infimum in Cost polarity). Auditing: a deterministic spending schedule ∑tαt≤αglobal\sum_t\alpha_t\le\alpha_{ ext{global}}∑tαt≤αglobal with test-(super)martingale e-processes gives time-uniform FWER control; LR/mixture-LR constructions yield valid e-values. Implementation blueprint (GPU/GraphBLAS-ready) \Lan\Lan\Lan: sparse SpMV/SpGEMM on (min,+); \Ran\Ran\Ran: elementwise residual → max-reduce; Numerics: log-domain + row-wise max-shift; masks send forbidden entries to +∞+\infty+∞. Reproducibility log (minimum fields): seed; model/revision; tokenizer; prompts; forward map JJJ; transport KKK; masks; λcost\lambda_{ ext{cost}}λcost; kkk; effective dmax⁡d_{\max}dmax; \Lan/\Ran\Lan/\Ran\Lan/\Ran kernel + build flags; hardware/BLAS; e-process updates (et,Mt)(e_t,M_t)(et,Mt); Conformal calibration snapshots.

研究の動機と目的

  • 対照的デコードが微調整なしに大規模言語モデルの推論能力を向上させることを評価すること。
  • GSM8K や HellaSwag といった標準的な推論ベンチマークにおける対照的デコードの有効性を調査すること。
  • 対照的デコードが、チェーン・オブ・トゥーク生成中に一般的な推論エラー(入力コピー、手順の省略)を軽減するかどうかを分析すること。
  • 異なるアマチュアモデルのアーキテクチャーやトレーニング段階が、対照的デコードのパフォーマンスに与える影響を調査すること。
  • 対照的デコードがチェーン・オブ・トゥークプロンプティングやセルフコンシステンシー推論戦略と互換性を持つかどうかを評価すること。

提案手法

  • 対照的デコードは、強力なエキスパートモデルと弱いアマチュアモデルのログィットスコアの重み付き差を利用して生成をガイドする。
  • αマスクを適用してエキスパートモデルの低確率トークンをフィルタリングし、高信頼度の予測のみを考慮する。
  • 有効なトークンに対しては最終ログィットが $ s_{CD}^{(i)} = (1+\beta)s_e^{(i)} - \beta s_a^{(i)} $ で計算され、無効なトークンは $-\infty$ にマスクされる。
  • ハイパーパrameter $\beta$ は対照的ペナルティの強さを制御し、$\beta \to 0$ ではグリディックデコードに、$\beta \to \infty$ では $p_e^{(i)}/p_a^{(i)}$ のargmaxに収束する。
  • この手法はログィット空間で動作するため、最小限の計算オーバーヘッドで効率的な推論が可能である。
  • 特にチェーン・オブ・トゥークプロンプティングと組み合わせて、プロンプティング後に適用することで、推論トレースの品質が向上する。
Figure 1: Contrastive decoding improves reasoning across model scales and reasoning tasks.
Figure 1: Contrastive decoding improves reasoning across model scales and reasoning tasks.

実験結果

リサーチクエスチョン

  • RQ1対照的デコードは、GSM8K や HellaSwag といった標準ベンチマークで大規模言語モデルの推論パフォーマンスを向上させることができるか?
  • RQ2アマチュアモデルの選択(サイズ、トレーニング段階)が、対照的デコードのパフォーマンスに与える影響は何か?
  • RQ3対照的デコードは、チェーン・オブ・トゥーク推論中に表面的に入力プロンプトをコピーする傾向や、論理的ステップの省略を軽減するか?
  • RQ4対照的デコードは、グリディックデコードやヌクレアスサンプリングと比較して、推論の正確性と生成品質の面で優れているか?
  • RQ5対照的デコードは、セルフコンシステンシーまたはネガティブプロンプティングと効果的に組み合わせられ、さらなる推論結果の向上が見込めるか?

主な発見

  • LLaMA-65B において、GSM8K で最大8パーセンテージポイントの向上を達成し、LLaMA 2 や GPT-3.5、PaLM 2-L を上回った。
  • HellaSwag の常識的推論ベンチマークでは、LLaMA-65B に対照的デコードを適用した結果、LLaMA 2 や GPT-3.5、PaLM 2-L を上回り、GPT-4 に近いパフォーマンスを達成した。
  • チェーン・オブ・トゥーク推論における入力コピーとステップ省略の減少が確認され、これは一般的な抽象的推論エラーを軽減している可能性を示唆している。
  • 7Bモデルをアマチュアモデルとして使用するとGSM8Kでパフォーマンスが低下するが、7Bモデルの初期トレーニングチェックポイント(例:130Bステップ)を用いることで結果が向上し、モデルのトレーニング段階が重要であることが示された。
  • ネガティブプロンプティングと対照的デコードを組み合わせるとパフォーマンスが低下し、複数の制御技術を組み合わせる際のトレードオフがあることが示唆された。
  • 長文推論生成において、対照的デコードはグリディックデコードおよびヌクレアスサンプリングを上回り、LLM出力を改善する汎用的手法であることが立証された。
Figure 3: CD accentuates what the expert model has learned that the amateur model has not. Results are taken from greedy decoding with a 65B parameter expert, using $\alpha=0.1$ , $\beta=0.5$ for CD.
Figure 3: CD accentuates what the expert model has learned that the amateur model has not. Results are taken from greedy decoding with a 65B parameter expert, using $\alpha=0.1$ , $\beta=0.5$ for CD.

より良い研究を、今すぐ始めましょう

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。