Source-linked AI summary
Large Language Models are Better Reasoners with Self-Verification
Yixuan Weng, Minjun Zhu, Fei Xia, Bin Li, Shizhu He, Shengping Liu, Bin Sun, Kang Liu, Jun Zhao
TL;DR
CoT enables LLM reasoning but is vulnerable to mistakes and error accumulation, creating a need for answer verification. This paper uses backward self-verification of CoT-generated conclusions to produce interpretable scores, improving reasoning performance across arithmetic, commonsense, and logical datasets. The approach is most effective when candidate conclusions include accurate answers and when the underlying model has strong reasoning ability.
Problem
CoT-based LLM reasoning is sensitive to individual mistakes and error accumulation, while trained verifiers require annotations and are difficult to explain.
Method
The method generates candidate answers with forward CoT reasoning, masks original conditions, predicts them backward, and ranks candidates using interpretable verification scores.
Results
Self-verification improves performance across arithmetic, commonsense, and logical reasoning datasets, including 60.8 →65.1 on GSM8K and 91.01 →93.40 on SingleEq.
Takeaways & Limitations
LLM self-verification can improve the accuracy and reliability of reasoning results through a simple few-shot verification process.
Takeaways & Limitations
The method depends on accurate answers among generated candidates and on the model’s reasoning ability, with greater difficulty for smaller language models.
Abstract
from arXiv · showhide
Recently, with the chain of thought (CoT) prompting, large language models (LLMs), e.g., GPT-3, have shown strong reasoning ability in several natural language processing tasks such as arithmetic, commonsense, and logical reasoning. However, LLMs with CoT require multi-step prompting and multi-token prediction, which is highly sensitive to individual mistakes and vulnerable to error accumulation. The above issues make the LLMs need the ability to verify the answers. In fact, after inferring conclusions in some thinking decision tasks, people often check them by re-verifying steps to avoid some mistakes. In this paper, we propose and prove that LLMs also have similar self-verification abilities. We take the conclusion obtained by CoT as one of the conditions for solving the original problem. By performing a backward verification of the answers that LLM deduced for itself, we can obtain interpretable answer validation scores to select the candidate answer with the highest score. Experimental results demonstrate that the proposed method can improve the reasoning performance on various arithmetic, commonsense, and logical reasoning datasets. Our code is publicly available at: https://github.com/WENGSYX/Self-Verification.
1 Introduction
CoT helps LLMs solve complex reasoning tasks but remains vulnerable to individual mistakes and error accumulation. The paper proposes backward self-verification to produce interpretable scores for ranking candidate answers, with improvements across reasoning datasets.
- Motivation: CoT generates intermediate reasoning steps for arithmetic, commonsense, and logical reasoning tasks but is sensitive to individual mistakes and error accumulation.A small mistake can alter the meaning of the reasoning chain and lead to an incorrect answer, especially in multi-step mathematical reasoning.
- Motivation: Existing verifier-based approaches require substantial human annotations and additional fine-tuned models, while their output scores are difficult to explain.
- Method: The proposed method uses forward CoT reasoning to generate candidate answers, then performs backward verification by predicting masked original conditions and ranking conclusions by verification scores.The method treats the question and candidate answer as conclusions to verify and evaluates each step during backward verification.
- Results: 60.8 →65.1 on GSM8K and 91.01 →93.40 on SingleEq demonstrate improvements beyond baseline across mathematical, commonsense, and logical reasoning datasets.The experiments use multiple LLMs and datasets, and the method also improves forward-reasoning approaches such as self-consistency and Least-to-Most.
- Method: The method provides interpretable verification scores without additional verifier training, fine-tuning, or gradient updating.Scores arise from evaluating verification steps rather than from a separate neural-network verifier.
- Method: True-False Item Verification and Condition Mask Verification adapt backward verification to general and arithmetic reasoning tasks.The paper presents these techniques as supporting application across a wide range of reasoning datasets.
2 Related Work
Related work studies language-model reasoning, in-context prompting, and answer verification. The paper distinguishes its approach by combining reasoning with self-verification without additional training examples and with explainable verification scores.
- Language Model Reasoning: Language-model reasoning research covers arithmetic, commonsense, and logical reasoning using pretrained reasoning models, fine-tuned LLMs, and specialized architectures.
- In-context Learning: In-context learning uses a few prompt exemplars without dataset fine-tuning, but complex reasoning motivates strategies such as CoT, self-consistency, and zero-shot step-by-step prompting.
- In-context Learning: Prior prompting strategies focus on constructing reasoning chains but remain sensitive to individual mistakes, leaving some CoT conclusions unreliable.
- Answer Verification: Answer-verification methods train classifiers, scoring models, or language-model verifiers to select or rank candidate answers.
- Answer Verification: Unlike prior verifiers, this work requires no additional annotations or training examples and provides an explainable verification score.
3 The Proposed Method
The method generates multiple candidate answers with chain-of-thought prompting, then verifies each candidate backward and selects the highest-scoring conclusion. It uses task-specific verification procedures, including True-False Item Verification and Condition Mask Verification.
- 3.1 Forward Reasoning: Forward reasoning uses chain-of-thought prompts and sampling decoding to generate multiple candidate answers for verification.The input consists of a question with conditions and a question prompt set containing example question–chain-of-thought–answer tuples.
- 3.2 Backward Verification: Backward verification rewrites each candidate answer as a declarative conclusion and adds it as a new condition.The rewritten conclusion is used to construct a new verification question.
- 3.2.1 True-False Item Verification: True-False Item Verification asks whether all conditions, including the candidate conclusion, are correct.This procedure is designed for a wide range of reasoning question-answering tasks.
- 3.2.2 Condition Masking: Condition Mask Verification masks numerical conditions in turn and asks the model to predict the masked value, matching the result against the original condition.The method masks all relevant occurrences rather than randomly selecting conditions, avoiding irrelevant masked facts that can hinder verification.
- 3.2.3 Verification Score Calculation: Verification scores aggregate repeated backward-verification outcomes, and the candidate with the highest score becomes the final answer.Sampling is repeated P times to make scores better reflect confidence and differentiate candidates.
4 Experiment Setting
The experiments evaluate self-verification across arithmetic, commonsense, and logical reasoning tasks using multiple datasets and GPT-3-family models. They use few-shot prompting without fine-tuning and compare performance with established baselines and combined prompting methods.
- 4.1 Task and Dataset: The evaluation covers eight datasets spanning arithmetic, commonsense, and logical reasoning tasks.The arithmetic evaluation includes SingleEq, AddSub, MultiArith, AQUA-RAT, GSM8K, and SVAMP; commonsense includes CommonsenseQA, while logical reasoning includes Date Understanding.
- 4.2 Language Models: Experiments evaluate code-davinci-001, code-davinci-002, and public GPT-3 using OpenAI’s API.The models include original GPT-3 and Instruct-GPT variants.
- 4.3 Prompts: All experiments use few-shot prompting without fine-tuning the original language model.Forward-reasoning prompts follow Wei et al. (2022), while backward-verification prompts are modified for the proposed method.
- 4.3 Prompts: Table 1 reports problem solve rate (%) against prior state-of-the-art baselines and additional self-consistency or PAL combinations.Self-consistency and PAL are combined with self-verification during forward reasoning to generate candidate answers.
- 4.3 Prompts: Forward reasoning generates K = 5 candidate answers, and backward verification generates each candidate P = 10 times with a maximum decoding length of 168 tokens.Only output text conforming to the conclusion format is selected.
5 Result and Analysis
Self-verification improves reasoning across datasets and settings, with especially strong gains on arithmetic tasks and larger models. Results also show benefits from multiple verification conditions, compatibility with improved forward-reasoning methods, and modest computational overhead.
- Overall results: Self-verification improved previous methods on all datasets and achieved new state-of-the-art performance on six of eight datasets.InstructGPT also gained an average of 2.33%.
- Task differences: Arithmetic tasks gained 1.67%/2.84% on average, exceeding the 0.62%/0.78% improvement for other reasoning tasks.The authors attribute this difference to easier identification of mask conditions in arithmetic reasoning.
- Combination and resources: Self-verification also improved self-consistency and PAL-style forward reasoning, while P=2 required only a small computational increase and P=10 balanced performance and resources.Backward verification re-ranked candidate answers produced by improved forward-reasoning methods.
- Model size: Self-verification became more robust as model size increased, whereas smaller models remained prone to erroneous generated text.The analysis covered GPT-3 models ranging from 0.4B to 175B parameters.
- Few-shot robustness: Self-verification remained robust with few demonstrations: 2-shot prompting reached 99.6% of 8-shot performance, versus 98.7% for CoT.Using four samples—2 CoT and 2 self-verification—also outperformed 8-shot CoT.
- Verification conditions: Multiple-condition masking generally outperformed single-condition masking, and both exceeded the original CoT baseline.Verification-score accuracy increased with the number of available conditions.
- Verification variants: CMV generally outperformed TFV in arithmetic tasks, while TFV remained adaptable to commonsense and logical reasoning.The authors link CMV’s advantage to explicitly using existing conclusions during verification.
6 Conclusion
The paper concludes that LLMs can self-verify generated conclusions and use interpretable scores to rank answers. This approach improves accuracy across arithmetic, commonsense, and logical reasoning tasks.
- LLMs can accurately assess the conclusions they generate through self-verification.
- The method generates interpretable scores for ranking results in few-shot reasoning tasks.
- Self-verification significantly improves accuracy across arithmetic, commonsense, and logical reasoning tasks.
Limitations
The method has several scope and resource limitations. It depends on capable models and candidate answers, uses manually constructed prompts, evaluates conclusions rather than inference processes, and increases computation.
- Self-verification depends on accurate answers appearing among the generated candidate conclusions.
- Artificially constructed verification prompts may introduce bias.
- The method is challenging to apply effectively to smaller language models with weaker reasoning abilities.
- The approach evaluates reasoning conclusions rather than the inference procedure itself.
- Generating multiple inference chains and conclusions increases computational costs, although experiments report only a minimal 1x expenditure increase.
A.1 Answer Cleansing
The answer-cleansing procedure extracts standardized outputs from model responses for evaluation. It uses different extraction rules for arithmetic, multiple-choice, and true-false tasks.
- Arithmetic outputs use the first number following “The answer is”.
- Multiple-choice outputs use the first capital letter in the response.
- Arithmetic outputs are compared with standard answers using Numpy.
- True-false verification selects “True” or “False” as the answer.
A.2 Dataset Details
The experiments use eight benchmark datasets spanning arithmetic, commonsense, and logical reasoning. The paper provides dataset statistics and links for the resources used.
- The evaluation covers eight benchmark datasets across arithmetic, commonsense, and logical reasoning tasks.
- The paper states that dataset statistics are presented in Table 6 and provides details for all datasets used.
- The listed arithmetic datasets are GSM8K, SingleEq, AddSub, MultiArith, AQUA-RAT, and SVAMP.
- CommonsenseQA is included among the benchmark resources.
A.3 Reproducibility Statement
The experiments were conducted using the OpenAI API between November 20 and December 20, 2022, with different studies run on specified dates.
- The experiments used the OpenAI API from November 20 to December 20, 2022.
- The main experiment ran from November 25 to December 10, 2022.
- Additional experiments covered single-condition verification, few-shot CoT prompts, true-false item verification, model sizes, and computational resources.Their reported run dates ranged from November 20 through December 16, 2022.
A.4 Additional Experiment Results
Additional experiments examine verification methods, condition-mask design, prompting, datasets, and example outputs. The passages include both methodological comparisons and worked self-verification examples across reasoning tasks.
- Multiple evidence masks produced more accurate verification scores, whereas using only the first condition mask yielded a score of zero.
- Conditional Masked Verification and True-False Item Verification differ in the correctness of the condition mask and the question template.
- Self-verification examples were generated with Instruct-GPT (code-davinci-002), alongside examples and prompts for arithmetic, commonsense, logical, and date reasoning tasks.The supplementary materials include answer cleansing, dataset descriptions, forward and backward-verification exemplars, and example outputs.
- The supplementary tables provide few-shot chain-of-thought exemplars for AQuA, Date Understanding, math word problems, and CSQA.Separate tables cover forward prompts and backward-verification prompts, with math-word-problem exemplars excluding AQuA.