論文解説
Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
大規模言語モデルで推論を引き出すChain-of-Thought Prompting
- 課題 大規模言語モデルは、規模が大きくなっても算術、常識、記号推論のような複数の段階を要する課題で高い性能を得るのが難しいです。この論文では、中間の自然言語推論を含むfew-shot例でこの能力を引き出せるかを検証します。
- 手法 入力、中間の推論過程、出力からなるfew-shot例をプロンプトに入れ、質問ごとに同じ形式の推論と答えを生成させます。追加のファインチューニングは行わず、既存の言語モデルにそのまま適用します。
- 結果 PaLM 540BではGSM8Kのスコアが、standard promptingの17.9からchain-of-thought promptingの56.9に上がりました。この効果は約100B以上のパラメータ規模で現れ、アブレーション実験では自然言語の推論ステップの役割が確認されています。
言語モデルは多段階の推論でなぜ止まるのか
大規模言語モデルは、規模を大きくすると多くの課題で性能が上がります。しかし、算術推論、常識推論、記号推論のような課題では、規模だけでは十分な性能を得にくいです。この論文は、この限界を越える方法として、モデルが最終的な答えの前に中間の自然言語推論ステップを生成するよう、プロンプトを設計するアプローチを扱います。
従来は2つの方向がありました。1つ目は、中間の推論ステップを学習データとして作り、モデルを学習またはファインチューニングする方法です。この方法は高品質な推論の根拠を多く作る必要があるため、コストが大きくなります。2つ目は、質問と答えの組だけをfew-shot例として示す標準プロンプティングです。この方法は推論が必要な課題で性能が低く、モデルの規模を大きくしても大きくは改善しない場合が多いです。
この研究は、2つの方向の長所を組み合わせようとしています。モデルを追加で学習させず、入力、推論過程、出力からなる例をプロンプトに入れ、few-shotで推論を引き出します。そのため、この論文の問いは、プロンプティングだけで中間の推論ステップを引き出せるか、また、その効果がどの課題とモデル規模で現れるかに整理されます。
入力、推論過程、出力の3要素で構成したプロンプト
提案手法はchain-of-thought promptingです。プロンプトには複数の例が入り、各例は質問、中間の推論ステップ、最終的な答えで構成されます。推論ステップは最終的な答えに至る自然言語の中間過程で、モデルは新しい質問を受け取ると、同じ形式で推論過程と答えをまとめて生成します。

Figure 1 : Chain-of-thought prompting enables large language models to tackle complex arithmetic, commonsense, and symbolic reasoning tasks. Chain-of-thought reasoning processes are highlighted.
出典 · CC BY 4.0 · Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, Denny Zhou · Chain-of-Thought Prompting Elicits Reasoning in Large Language Models · 論文の図を引用 · 元のPDFの1ページ目から図の部分を抽出しています。標準プロンプティングは、質問の後に答えだけを置く形式です。2つの方式の違いは、例の答えの前に推論過程があるかどうかにあり、モデルの構造やパラメータは変わりません。著者らは、この方法は追加のファインチューニングなしで既存の言語モデルに適用でき、推論ステップを自然言語で書くことは、任意の数式だけを出力することとは異なると説明しています。
算術推論の実験では、手作業で作った8個のchain-of-thought例を、複数のベンチマークで共通に使いました。例の作成時にプロンプトエンジニアリングは行わなかったと明らかにされているため、結果を特定の例の設計に依存したものとだけ読むべきではありません。ただし、例の選び方や注釈の書き方が結果に影響しうることは、実験で別途確認されています。
算術推論におけるstandard promptingとの比較
算術推論の実験では、GSM8K、SVAMP、ASDiv、AQuA、MAWPSといった数学の文章題ベンチマークで、standard promptingとchain-of-thought promptingを比べます。指標はsolve rateで、同じモデルと同じベンチマークで2つのプロンプトの結果を並べて見ます。
PaLM 540BでのGSM8Kのsolve rateは、standard promptingの17.9からchain-of-thought promptingの56.9に上がりました。著者らは、この組み合わせではPaLM 540Bが8個のchain-of-thought例だけでGSM8Kにおいて新たな最高性能を得たと報告しています。同じモデルではSVAMPやMAWPSなどでも、chain-of-thought promptingがstandard promptingより高い結果になっています。

Table 1 : Chain of thought prompting outperforms standard prompting for various large language models on five arithmetic reasoning benchmarks. All metrics are accuracy (%). Ext. calc.: post-hoc external calculator for arithmetic computations only. Prior best numbers are from the following.a: Cobbe et al. (2021).b &e: Pi et al. (2022),c: Lan et al. (2021),d: Pi˛ ekos et al. (2021).
出典 · CC BY 4.0 · Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, Denny Zhou · Chain-of-Thought Prompting Elicits Reasoning in Large Language Models · 論文の図を引用 · 元のPDFの20ページ目から図の部分を抽出しています。モデルの規模による結果も重要です。LaMDA 137BではGSM8Kのスコアが6.5から14.3に、GPT-3 175Bでは15.6から46.9に上がります。一方、小さいモデルではchain-of-thought promptingがstandard promptingより低い場合が多いです。この効果は、約100B以上のパラメータ規模のモデルで現れるemergent abilityとして解釈されています。これは著者らの解釈であり、この実験で確認されたモデル規模の条件に限って読む必要があります。

Table 2 : Standard prompting versus chain of thought prompting on five arithmetic reasoning bench- marks. Note that chain of thought prompting is an emergent ability of model scale—it does not positively impact performance until used with a model of sufficient scale.
出典 · CC BY 4.0 · Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, Denny Zhou · Chain-of-Thought Prompting Elicits Reasoning in Large Language Models · 論文の図を引用 · 元のPDFの21ページ目から図の部分を抽出しています。アブレーション実験で見た推論文の役割
著者らは、chain-of-thought promptingの効果が、単に数式を出力することによるのか、計算量が増えることによるのか、あるいは答えの後に推論文を示すことと同じなのかを確認するため、3つの変種を作りました。この実験はLaMDA 137BのGSM8Kで行われました。

Table 6 : Ablation and robustness results for arithmetic reasoning datasets. Chain of thought generally outperforms ablations by a large amount. “Equation only” performs in between standard prompting and chain of thought prompting, as it allows for intermediate reasoning steps via equations but does not leverage natural language. Chain of thought prompting has variance (as expected) when used with prompts written by different annotators or when using other exemplars, but still outperforms standard prompting by a large margin. Standard deviation shown is for different order of few-shot prompting exemplars, with five different random seeds. Results here are shown for LaMDA 137B, as additional queries for GPT-3 and PaLM are both limited and expensive.
出典 · CC BY 4.0 · Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, Denny Zhou · Chain-of-Thought Prompting Elicits Reasoning in Large Language Models · 論文の図を引用 · 元のPDFの23ページ目から図の部分を抽出しています。equation only条件は、自然言語の推論を使わず、数式だけを出力させる変種です。この条件のGSM8Kのスコアは5.4で、standard promptingの6.5より低く、chain-of-thoughtの14.3よりも大きく下がります。GSM8Kでは質問の意味を数式に直接移すのが難しく、自然言語の中間ステップが必要だと解釈できます。著者らは、ステップ数が少ないデータセットでは、数式だけを出力する方法の性能が高くなると報告しています。
variable compute only条件は、数式の長さに合わせてドットの系列を出力させ、計算トークンだけを増やした変種です。この条件はGSM8Kで6.4となり、standard promptingとほぼ同じです。reasoning after answer条件は、答えを先に書き、推論を後ろに付けた変種で、6.1となりベースラインと同程度です。著者らは、この結果を、最終的な答えの前の逐次的な推論が効果に寄与するという解釈と結びつけています。
常識推論と記号推論への拡張
常識推論の実験は、PaLMを使い、CSQA、StrategyQA、Date Understanding、Sports Understanding、SayCanで行われました。CSQAとStrategyQAの例は訓練セットから選び、chain of thoughtを手作業で書きました。Date UnderstandingとSports Understandingでは、評価セットの最初の10個の例をfew-shot例として使い、残りで結果を報告しています。この設定はデータセットごとに異なるため、スコアを一つの共通プロトコルとしてまとめて読むべきではありません。

Table 25 : Few-shot exemplars for full chain of thought prompt for StrategyQA.
出典 · CC BY 4.0 · Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, Denny Zhou · Chain-of-Thought Prompting Elicits Reasoning in Large Language Models · 論文の図を引用 · 元のPDFの39ページ目から図の部分を抽出しています。
Table 26 : Few-shot exemplars for full chain of thought prompt for Date Understanding.
出典 · CC BY 4.0 · Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, Denny Zhou · Chain-of-Thought Prompting Elicits Reasoning in Large Language Models · 論文の図を引用 · 元のPDFの39ページ目から図の部分を抽出しています。この条件では、PaLM 540BがStrategyQAで75.6、Sports Understandingで95.4を記録しました。著者らは、StrategyQAで従来の最高性能69.4を上回ったと報告しています。ただし、CSQAでは改善は小さかったと報告されており、常識推論全般で一貫した向上だとは一般化しにくいです。

Table 4 : Standard prompting versus chain of thought prompting on five commonsense reasoning benchmarks. Chain of thought prompting is an emergent ability of model scale—it does not positively impact performance until used with a model of sufficient scale.
出典 · CC BY 4.0 · Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, Denny Zhou · Chain-of-Thought Prompting Elicits Reasoning in Large Language Models · 論文の図を引用 · 元のPDFの22ページ目から図の部分を抽出しています。記号推論の実験は、最後の文字の連結とコインの裏返しの課題です。例には、2単語の名前や2回の裏返しのように、ステップ数の短い事例だけを含め、評価は、より長い入力を含むOOD条件で行われました。著者らは、standard promptingはOODで失敗する一方、chain-of-thought promptingは十分な規模のモデルでは、より長い系列への一般化を示すと説明しています。また、PaLM 540BのIn-domainの結果は、ほぼ100%のsolve rateに達すると報告されています。著者らは、このIn-domainの課題は、例にすでに同じ推論構造があるtoy taskだと明らかにしています。

Table 5 : Standard prompting versus chain of thought prompting enables length generalization to longer inference examples on two symbolic manipulation tasks.
出典 · CC BY 4.0 · Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, Denny Zhou · Chain-of-Thought Prompting Elicits Reasoning in Large Language Models · 論文の図を引用 · 元のPDFの22ページ目から図の部分を抽出しています。正確性とコストに関する限界
著者らは、chain-of-thoughtの推論経路が常に正確とは限らないと述べています。誤った推論が正しい答えにつながることもあれば、誤った答えにつながることもあります。そのため、生成された推論過程がモデルの実際の計算を十分に示していると断定することはできません。この論文で示された解釈も、推論過程の可能性を示す程度のものとして読むべきです。
もう一つの限界はコストです。例に推論過程を手作業で書くコストは、few-shot設定では小さいものの、ファインチューニング用の大規模データを作るには負担になりえます。効果が大規模モデルで現れるため、実際のサービスで使う際にもコストが大きくなりえます。
多肢選択や二値分類の課題では、正しい推論がないのに偶然正解が出る場合もあると報告されています。そのため、最終的な正答だけで推論の質を判断するのは難しいです。
論文情報
- 著者
- Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, Denny Zhou
- 学会・ジャーナル
- arXiv · プレプリント
- 公開日
- 2022年1月28日
- 登録日
- 2026年10月20日
- 更新日
- 2023年1月10日
- バージョン
- v6
- arXiv
- 2201.11903
- カテゴリ
- cs.CL · cs.AI
- ライセンス
- CC BY 4.0
- 掲載内容
- 論文情報・解説・論文の図
この解説は、Refivuの韓国語解説をAIで翻訳したものです。不正確な翻訳や誤りが含まれる可能性があります。論文と図の利用条件は各出典に従います。
アブストラクト
We explore how generating a chain of thought -- a series of intermediate reasoning steps -- significantly improves the ability of large language models to perform complex reasoning. In particular, we show how such reasoning abilities emerge naturally in sufficiently large language models via a simple method called chain of thought prompting, where a few chain of thought demonstrations are provided as exemplars in prompting. Experiments on three large language models show that chain of thought prompting improves performance on a range of arithmetic, commonsense, and symbolic reasoning tasks. The empirical gains can be striking. For instance, prompting a 540B-parameter language model with just eight chain of thought exemplars achieves state of the art accuracy on the GSM8K benchmark of math word problems, surpassing even finetuned GPT-3 with a verifier.
この論文を引用
Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, Denny Zhou (2022). Chain-of-Thought Prompting Elicits Reasoning in Large Language Models. arXiv:2201.11903v6. https://arxiv.org/abs/2201.11903v6
BibTeX
@misc{wei2022chain,
title = {{Chain-of-Thought Prompting Elicits Reasoning in Large Language Models}},
author = {Jason Wei and Xuezhi Wang and Dale Schuurmans and Maarten Bosma and Brian Ichter and Fei Xia and Ed Chi and Quoc Le and Denny Zhou},
year = {2022},
eprint = {2201.11903},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2201.11903v6}
}