IN THIS BREAKDOWN · 10 SECTIONS
You can read 19% of this breakdown.
The paper in one minute
Chain-of-thought prompting gets a model to write out its reasoning before answering, and it is usually decoded greedily: one path, the most likely token at each step. Xuezhi Wang, Jason Wei, Denny Zhou and colleagues at Google Research noticed that a reasoning problem can usually be solved several ways that reach the same answer, while mistakes tend to land on different wrong answers. So they replaced greedy decoding with sample and marginalize: sample many reasoning paths, parse the final answer from each, and return the most frequent one.
That is the whole method. It uses the same few-shot chain-of-thought prompt, any standard sampling scheme (they used temperature 0.5 to 0.7, top-k 40 for most models), and a parser that reads the text after "The answer is". The reasoning path is a hidden variable that gets summed out; only the answers vote.
They tested it on four models (UL2 20B, LaMDA 137B, PaLM 540B, and GPT-3's code-davinci-001 and -002) across arithmetic benchmarks (GSM8K, SVAMP, AQuA, ASDiv, MultiArith, AddSub) and commonsense ones (CommonsenseQA, StrategyQA, ARC). With 40 sampled paths, self-consistency improved on greedy chain of thought for every model on every arithmetic and commonsense task. GSM8K with PaLM 540B rose from 56.5% to 74.4%; AQuA with code-davinci-002 from 39.8% to 52.0%.
The paper also showed that voting beat ranking samples by the model's own probability, beam search, and ensembles of prompts; that it rescued tasks where chain of thought had hurt; and that the share of paths agreeing with the winner tracks accuracy closely enough to serve as a confidence score. It appeared at ICLR 2023.
Research notes: the problem, approach and results
GSM8K points over greedy chain of thought with PaLM 540B (56.5% to 74.4%) and with code-davinci-002 (60.1% to 78.0%)
reasoning paths sampled per question, averaged over 10 runs, with run-to-run spread of half a point or less
majority vote against voting weighted by the model's normalized probabilities: 74.4% and 74.1% on GSM8K
Chain-of-thought prompting decodes one reasoning path greedily. If that path slips once, the answer is wrong, and greedy decoding has no way to notice, because it never considers another way of solving the problem.
Sample a diverse set of reasoning paths from the same prompt, parse each final answer, and return the answer most paths agree on. No training, no verifier, no extra data: a change to decoding alone.
Across four models and ten reasoning benchmarks, voting over 40 paths beat greedy chain of thought on every arithmetic and commonsense task, by up to 23.9 points. With PaLM 540B, GSM8K rose from 56.5% to 74.4%.
Why it matters to an FDE
Self-consistency is often the first thing to try when a customer's extraction or reasoning task is close to good enough. It needs no new data and no new model, only a parser for the final answer.
It costs one decode per path. Forty paths is forty times the output tokens and, unless you batch, more latency. The authors suggest starting with 5 or 10 paths, where most of the gain arrives.
The agreement rate is a free confidence score. If 9 of 10 paths agree, the answer is very likely right; if they split 4, 3 and 3, it is not. That is the signal for routing a case to a person, retrying with a stronger model, or asking for more information.
It needs answers that can be compared. Numbers, labels, yes or no, a field value. For free-form text you need a way to decide when two answers say the same thing before you can vote.
It is the baseline for anything fancier. Tree search, self-refinement and LLM critics all spend extra compute. A vote over the same number of samples is what they must beat.
Understand the mechanism. Try it on a real problem.
Unlock this breakdown and 99 more papers.
Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.
6 months · One payment · No auto-renewal
- ◇1 architecture diagram
- </>1 runnable code experiment
- ▦2 results tables
- ?5 interview questions with answers
- 03Key takeaways
How the vote works, the results by model, the comparisons, and misreadings to avoid
Free account - 04How it works
The decoding procedure, the aggregation rules tested, and the experimental settings
Premium - 05The numbers that matter
The size of each gain by model and task, the comparisons, and what the agreement signal predicts
Premium - 06Try it yourself
Votes by number of paths, agreement as a routing score, and an early stop that saves 40% of decodes
Premium - 07Where it breaks
Where voting does not help, costs too much, or needs work you have to do yourself
Premium - 08Using it on a deployment
Adding voting to a customer pipeline with a budget, a parser and a routing rule
Premium - 09Interview angles
Five questions this paper prepares you for, with answer hints
Premium - 10Read next
Where to go from here on this site
Premium
