Improving Language Model Reasoning with Self-Consistency
Listen to the summary
Uses a voice available on your device
Audio options
On this page 4 sections
Related concepts 3 concepts
Key Takeaways
- Large language models often struggle with complex reasoning tasks when using naive greedy decoding with chain-of-thought prompting.
- The novel method generates a diverse set of reasoning paths by sampling from the language model decoder instead of using greedy decoding.
- Answers are aggregated by marginalizing out the sampled reasoning paths and selecting the most consistent answer via majority vote or weighted sum.
- On PaLM-540B, self-consistency achieved absolute accuracy gains of +17.9% on GSM8K, +11.0% on SVAMP, +12.2% on AQuA, +6.4% on StrategyQA, and +3.9% on ARC-challenge.
Summary & Methodology Analysis
When building applications with language models, developers frequently rely on chain-of-thought prompting to tackle multi-step problems. However, standard deployments often use naive greedy decoding, which simply picks the single highest-probability token at each step. This approach is prone to early errors cascading through the rest of the generated reasoning path, leading to frequent failures on complex reasoning benchmarks. The paper addresses this limitation by proposing self-consistency as a replacement for greedy decoding. Instead of taking a single deterministic path, the system samples from the model's decoder to generate a diverse set of distinct reasoning paths. Because a complex problem can often be solved through multiple valid logical routes, generating various chains allows the model to explore different ways of reaching a conclusion.
Once the diverse set of reasoning paths is generated, the approach aggregates the final answers by marginalizing out the sampled reasoning paths. It then selects the most consistent answer in the final answer set via a majority vote or a weighted sum. This strategy treats reasoning like an ensemble method, where the consensus answer across many sampled trials overrides isolated logical slips. The method was evaluated across a wide range of models and datasets, including UL2-20B, GPT-3-175B, LaMDA-137B, PaLM-540B, GSM8K, SVAMP, AQuA, StrategyQA, ARC-challenge, AddSub, MultiArith, ASDiv, CommonsenseQA, ARC-easy, BoolQ, HotpotQA, e-SNLI, ANLI, and RTE. On the PaLM-540B model, self-consistency delivered substantial absolute accuracy gains, including +17.9% on GSM8K, +11.0% on SVAMP, +12.2% on AQuA, +6.4% on StrategyQA, and +3.9% on ARC-challenge.
Despite these performance improvements, the method comes with specific constraints that engineers must weigh against their requirements. First, self-consistency can be applied only to problems where the final answer is from a fixed answer set. Second, because it requires generating multiple reasoning paths per prompt rather than a single greedy generation, self-consistency incurs more computation cost. The paper does not specify the exact dollar cost or latency overhead beyond noting this increase in computation cost.
Interactive System Flowchart
Cross-Examination & FAQs
A deeper dive clarifying mechanics, constraints, and baseline evaluations.
Q1. What core problem does the paper address?
Large language models often struggle with complex reasoning tasks when using naive greedy decoding with chain-of-thought prompting.
Q2. What is the primary novel contribution of the paper?
The paper replaces greedy decoding by sampling from the language model's decoder to generate a diverse set of reasoning paths and aggregates answers by selecting the most consistent answer in the final answer set via majority vote or weighted sum.
Q3. Did the new method improve accuracy?
Yes, on PaLM-540B, self-consistency achieved absolute accuracy gains of +17.9% on GSM8K, +11.0% on SVAMP, +12.2% on AQuA, +6.4% on StrategyQA, and +3.9% on ARC-challenge.
Q4. How does the standard baseline work in this research?
The standard baseline prompts a pre-trained language model using chain-of-thought prompting with manual exemplars.
Q5. What models and datasets were involved in the paper?
The models and datasets include UL2-20B, GPT-3-175B, LaMDA-137B, PaLM-540B, GSM8K, SVAMP, AQuA, StrategyQA, ARC-challenge, AddSub, MultiArith, ASDiv, CommonsenseQA, ARC-easy, BoolQ, HotpotQA, e-SNLI, ANLI, and RTE.
Q6. What are the limitations of self-consistency?
Self-consistency can be applied only to problems where the final answer is from a fixed answer set, and it incurs more computation cost.
Q7. How are the final answers selected in self-consistency?
Answers are aggregated by marginalizing out the sampled reasoning paths and selecting the most consistent answer in the final answer set via majority vote or weighted sum.
Q8. Does the paper specify the exact runtime latency or dollar cost?
The paper does not specify this.
Q9. What specific accuracy gain was reported on the GSM8K dataset using PaLM-540B?
Self-consistency achieved an absolute accuracy gain of +17.9% on GSM8K.