TL;DR
This paper introduces a novel decoding algorithm that tackles error accumulation in multi-step Large Language Model (LLM) reasoning by integrating a stepwise self-evaluation mechanism with stochastic beam search. By prompting the LLM to evaluate the correctness of its own intermediate reasoning steps, the method efficiently navigates the exponential search space to produce highly accurate and robust final answers. The approach yields significant performance gains across arithmetic, symbolic, and commonsense reasoning benchmarks compared to standard chain-of-thought and self-consistency baselines.
What Problem Does This Paper Address?
While prompting techniques like Chain-of-Thought (CoT) and Program-Aided Language models (PAL) have dramatically improved LLM performance by breaking complex problems down into intermediate steps, they suffer from a fundamental flaw: error accumulation.
As a reasoning chain grows longer, a single logical or computational mistake in an early step cascades through the remaining steps, dooming the final answer. Furthermore, generating these chains autoregressively leads to an exponentially large search space. Existing solutions like self-consistency (sampling multiple paths and taking a majority vote) help, but they treat the reasoning path as a black box and require high computational budgets to sample entirely new chains from scratch. This paper addresses the need for a finer-grained, step-by-step search and calibration mechanism during the decoding process itself.
Methods
The authors propose Self-Evaluation Guided Stochastic Beam Search, a framework that treats reasoning chain generation as a step-by-step decoding process where each step is a semantically complete sequence of tokens (like a single line of Python code or a sentence).
The core components of the method include:
- Stepwise Self-Evaluation: At each reasoning step, the LLM acts as its own verifier. It is prompted with a few-shot multiple-choice format to judge whether the newly generated step is correct or incorrect based on the prior context. The token-level probability of selecting the "Correct" option serves as a correctness confidence score ($C$).
- Constrained Decoding Objective: The algorithm evaluates candidate paths using a combined objective function $\mathcal{E}$ that balances the standard language model generation probability ($P$) and the self-evaluation correctness score ($C$), controlled by a tuning hyperparameter $\lambda$.
- Stochastic Beam Search: To balance exploration (finding diverse paths) and exploitation (following high-scoring paths), the authors employ a temperature-controlled stochastic beam search. Instead of greedily picking the top-$k$ candidates, they sample $k$ beams without replacement from a larger candidate pool ($nk$) according to their accumulated scores. They also introduce a temperature decay parameter ($\alpha$) to reduce randomness as the reasoning chain progresses, mitigating late-stage error accumulation.
Datasets
The method was evaluated across three primary reasoning paradigms using the following benchmarks:
- Arithmetic Reasoning: GSM8K (math word problems), AQuA (algebraic problems), SVAMP (structural variations of math problems), ASDiv (diverse math problems), and TabMWP (tabular math problems).
- Symbolic Reasoning: BIG-Bench datasets, specifically Date Understanding and Object Counting.
- Commonsense Reasoning: CommonsenseQA, StrategyQA (multi-hop reasoning), and Sports Understanding (from BIG-Bench).
Key Insights and Ideas
- Correctness vs. Generation Confidence: The authors discovered that an LLM's internal correctness confidence ($C$) is far more effective at pinpointing logical errors than its standard generation probability ($P$). Generation probability aligns closely with text perplexity, whereas the self-evaluation score effectively tracks the logical consistency of accumulated steps.
- The Power of Structure: The self-evaluation mechanism works significantly better on structured reasoning chains (like PAL's Python code) than on free-text chains (like CoT). Structured formats make it easier for the LLM to perform information extraction and soundness checking.
- Complexity Benefits: The performance gains of this method scale with problem complexity. The longer and more intricate the reasoning chain required, the more pronounced the benefit of stepwise calibration becomes.
Key Results
The authors evaluated their approach using both closed-source (Codex) and open-source (Llama-2 13B) backbones:
- Codex Baselines: Using PAL prompting, the proposed method achieved absolute accuracy improvements of 6.34% on GSM8K (reaching 85.5%), 9.56% on AQuA (64.2%), and 5.46% on StrategyQA (77.2%) over vanilla baselines.
- Cost-Efficiency (Llama-2): When benchmarked against self-consistency (majority voting) under equivalent token budgets, the self-evaluation guided approach consistently delivered superior accuracy on arithmetic tasks. For instance, on GSM8K, it achieved 46.1% accuracy compared to 41.8% for self-consistency at a comparable computational cost.
Limitations and Future Work
- Logits Access Requirement: The method relies heavily on token-level logits to compute both generation and evaluation probabilities. This restricts its direct application to commercial LLMs like GPT-4 that only expose text outputs via black-box APIs (though the authors show GPT-4 can generate text-based rationales to achieve similar effects).
- Computational Overhead: Sampling multiple candidates ($n$) per beam and running evaluation prompts at every single step introduces substantial computational overhead.
- Short Chains: The method provides minimal benefit—and can even lag behind baselines—on tasks with very short reasoning chains (e.g., simple commonsense questions), where instance-level voting is more cost-effective.
Future Directions: The authors suggest exploring the integration of external tools (like code execution environments) to further ground the self-evaluation scores, as well as extending the framework to multi-modal reasoning and planning tasks.
Summary updated