SelfCheck: Using LLMs to Zero-Shot Check Their Own Step-by-Step Reasoning

Ning Miao, Yee Whye Teh, Tom Rainforth

TL;DR

Large Language Models (LLMs) are notoriously bad at catching their own reasoning errors when asked directly. This paper introduces SelfCheck, a zero-shot prompting framework that allows an LLM to verify its own step-by-step reasoning by forcing it to blindly regenerate each step and compare the results. This approach significantly boosts accuracy without needing external tools or extra training data.

What Problem Does This Paper Address?

Chain-of-Thought (CoT) prompting has massively improved the ability of LLMs to solve complex, multi-step problems. However, even state-of-the-art models like GPT-4 still make logical or arithmetic mistakes along the way. A single flawed step can ruin the entire final answer.

Historically, researchers have tried to fix this by verifying the LLM's output. But existing verification methods usually require external resources (like calculators or symbolic logic solvers), domain-specific few-shot examples, or entirely separate models trained specifically to act as verifiers. These approaches are expensive, narrow, and hard to scale. The authors tackle a fundamental question: Can an off-the-shelf LLM reliably check its own homework in a zero-shot setting?

Methods

The naive approach to self-verification—feeding an LLM its own solution and asking, "Is this correct?"—fails miserably. LLMs exhibit a strong "sycophancy" bias toward their own outputs, rubber-stamping incorrect reasoning as correct over 90% of the time.

To bypass this, SelfCheck leans into what LLMs do best: generation. Instead of asking the model to grade a step, SelfCheck breaks the verification of each reasoning step into a four-stage pipeline:

The four-stage SelfCheck pipeline for step-by-step verification.
  1. Target Extraction: The LLM reads the step and summarizes its goal (e.g., "Solve for x").
  2. Information Collection: The LLM identifies exactly which previous steps or context are needed to achieve that goal.
  3. Step Regeneration: Crucially, the LLM is given the collected context and the target, but not the original step. It is asked to generate the step from scratch.
  4. Result Comparison: The LLM compares its newly regenerated step against the original step. If they contradict, the original step is flagged as likely incorrect.

Finally, SelfCheck aggregates these step-wise checks into an overall confidence score. When the LLM generates multiple candidate solutions to a problem, this confidence score is used to perform a weighted vote, elevating the most logically sound answers over the flawed ones.

Datasets

The authors evaluated SelfCheck primarily on math and logic reasoning benchmarks:

  • GSM8K: Primary school-level math word problems.
  • MathQA: Middle school-level math problems (geometry, physics, probability).
  • MATH: A subset of highly difficult competition-level math problems.
  • SNR (Synthetic Natural Reasoning): A logic reasoning dataset (evaluated in the appendix).

Key Insights and Ideas

  • Generation > Verification: LLMs are trained to predict the next token, not to act as binary classifiers for logical correctness. By reframing verification as a regeneration task, SelfCheck plays to the model's inherent strengths.
  • Decorrelating Errors is Key: If an LLM makes a mistake in step 3, it is highly likely to make the same mistake if it reads step 3 while trying to verify it. By hiding the original step during the "Regeneration" phase, SelfCheck forces the model to think independently, successfully decorrelating the errors between the generator and the checker.
  • Cheaper Models Can Check Stronger Models: You don't necessarily need GPT-4 to check GPT-4. The authors found that using GPT-3.5 to check GPT-4's answers yielded surprisingly good results. Using different models for generation and checking further decorrelates their biases.

Key Results

  • Accuracy Boosts: SelfCheck consistently outperforms standard majority voting (Self-Consistency). For example, on MathQA using GPT-3.5 (with just 2 candidate solutions), SelfCheck improved accuracy from 59.2% to 64.6%.
Accuracy comparison between Majority Voting and SelfCheck across different datasets.
  • High Efficiency: SelfCheck achieves higher accuracy with fewer generated solutions. An ensemble of 5 solutions using SelfCheck beats a standard majority vote of 9 solutions.
  • Effective Filtering: By setting a threshold on the SelfCheck confidence score, users can filter out bad answers. This reduced the proportion of incorrect solutions by 9% to 23% across the tested datasets.
  • Model Agnostic: The framework proved effective across different architectures, showing significant gains on GPT-3.5, GPT-4, and Llama2-70B.

Limitations and Future Work

  • Computational Cost: Running a 4-stage pipeline for every single step of a reasoning chain is token-heavy. The authors note that running the verifier costs roughly twice as much compute as the original generation.
  • Dependence on Base Capabilities: SelfCheck relies on the LLM being able to correctly regenerate a step. If a problem is so difficult that the LLM fundamentally lacks the knowledge to solve it, the regeneration stage will also fail, rendering the check useless.
  • Future Directions: While not explicitly mapped out as a long-term roadmap, the success of using smaller models (GPT-3.5) to check larger ones (GPT-4) suggests a promising direction for optimizing the cost-to-performance ratio of self-verification pipelines.

Summary updated

BibTeX
@inproceedings{miao2024selfcheck,
  author = {Ning Miao and Yee Whye Teh and Tom Rainforth},
  title = {{SelfCheck: Using LLMs to Zero-Shot Check Their Own Step-by-Step Reasoning}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=pTHfApDakA},
}
Figure