Chain of Thought: intermediate reasoning steps
A chain of thought comprises intermediate natural language reasoning steps leading to the final output; the method is called chain-of-thought prompting.
Definition · At a glance · How it works
Definition
The paper defines a chain of thought as a series of intermediate natural language reasoning steps that lead to the final output, and it refers to this approach as chain-of-thought prompting. The paper explores how generating a chain of thought, a series of intermediate reasoning steps, significantly improves the ability of large language models to perform complex reasoning. The paper shows that such reasoning abilities emerge naturally in sufficiently large language models via a method it calls chain-of-thought prompting, where a few chain of thought demonstrations are provided as exemplars in prompting. The paper says the traditional few-shot prompting method works poorly on tasks that require reasoning abilities, and often does not improve substantially with increasing language model scale.
At a glance
The diagram follows the paper's server-room example, showing the relationship between the given facts, intermediate calculation, and final answer.
How it works
The paper's proposed approach is to augment each exemplar in few-shot prompting with a chain of thought for an associated answer. As its baseline, the paper uses standard few-shot prompting, in which a language model is given in-context exemplars of input-output pairs before outputting a prediction for a test-time example. Under standard prompting, the model gives the answer directly.
The paper aims to let language models generate a chain of thought, a coherent series of intermediate reasoning steps that lead to the final answer for a problem. The paper says chain-of-thought reasoning can be elicited in sufficiently large off-the-shelf language models by including examples of chain of thought sequences in the exemplars of few-shot prompting. In all of the paper's experiments, chain-of-thought reasoning is elicited by prompting an off-the-shelf language model.
No language models were finetuned in the process of writing the paper. The paper says that in principle a chain of thought allows models to decompose multi-step problems into intermediate steps, which means additional computation can be allocated to problems that require more reasoning steps. The paper also says a chain of thought provides an interpretable window into the behavior of the model, suggesting how it might have arrived at an answer and giving opportunities to debug where the reasoning path went wrong, although fully characterizing a model's computations that support an answer remains an open question.
The paper mentions another closely related direction that uses natural language explanations (NLEs), often with the goal of improving model interpretability. The chain of thought processing the paper considers occurs before the final answer. In the paper's account, NLE aims mostly to improve neural network interpretability, while the goal of chain-of-thought prompting is to let models decompose multi-hop reasoning tasks into multiple steps, with interpretability a side effect.
The paper also contrasts approaches that improve or augment the input part of the prompt, such as instructions prepended to inputs, with its own orthogonal direction of augmenting the outputs of language models with a chain of thought. The paper notes that although a chain of thought emulates the thought processes of human reasoners, this does not answer whether the neural network is actually reasoning, which it leaves as an open question. It also notes that there is no guarantee of correct reasoning paths, which can lead to both correct and incorrect answers.
The cost of manually augmenting exemplars with chains of thought is minimal in the few-shot setting, but the paper notes that such annotation costs could be prohibitive for finetuning. The paper notes that chain-of-thought reasoning emerges only at large model scales, which makes it costly to serve in real-world applications, and that further research could explore how to induce reasoning in smaller models. The paper qualitatively found that smaller-scale models produced fluent but illogical chains of thought, leading to lower performance than standard prompting.
Example
The paper shows an example of a model producing a chain of thought to solve a math word problem that it would otherwise have gotten wrong. The paper provides few-shot exemplars for a full chain of thought prompt for math word problems. One question in that prompt reads: There were nine computers in the server room. Five more computers were installed each day, from monday to thursday. How many computers are now in the server room?
The exemplar's answer writes out the reasoning: there were originally 9 computers, 5 more were added on each of 4 days, so 5 * 4 = 20 were added, 9 + 20 is 29, and the answer is 29. In its arithmetic reasoning experiments, the paper used the same eight chain-of-thought exemplars for math-word-problem benchmarks other than AQuA, which is multiple choice rather than free response. For AQuA, the paper used four exemplars and solutions from the training set.
The paper gives an example from LaMDA 137B. The question is: Mike plays ping pong for 40 minutes, scores 4 points in the first 20 minutes, and scores 25% more points in the second 20 minutes, so how many total points did he score? The equation-only output gives a wrong answer of 6.
The chain of thought output is correct: it restates the given facts, notes that he scored 25% more in the second 20 minutes, computes 4 x 1.25 = 5, so he scored 5 points in the second 20 minutes and 9 points in total, and the answer is 9. According to the paper, it is hard for the model to directly translate all of the semantics into a single equation, but chain of thought lets it reason better about each part of the question via intermediate steps in natural language. The paper's ablation experiment shows that equation-only prompting does not help much on GSM8K. The authors infer that these questions’ semantics are too challenging to translate directly into an equation without the natural language reasoning steps of a chain of thought.
The paper says experiments on three large language models show that chain-of-thought prompting improves performance on a range of arithmetic, commonsense, and symbolic reasoning tasks. It also says prompting a PaLM 540B 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. The paper mentions another intuition: a chain of thought allows the model to spend more computation, meaning intermediate tokens, on harder problems.
The paper says the variable compute only variant performs about the same as the baseline, which suggests variable computation by itself is not the reason for the success of chain-of-thought prompting, and that there appears to be utility from expressing intermediate steps via natural language. The paper also tests a configuration in which the chain of thought prompt is given only after the answer, isolating whether the model actually depends on the produced chain of thought to give the final answer. The paper says this variant performs about the same as the baseline, which suggests that the sequential reasoning embodied in the chain of thought is useful for reasons beyond just activating knowledge.
Sources
This page is written from the official sources below. Open them to check the original text.
- Paperhttps://arxiv.org/html/2201.11903Fetched
Verified ·
This page is written by AI from the official sources above and checked automatically. This site has not tested it. Found a mistake? Tell us.