TL;DR
Standard Self-Consistency (SC) significantly boosts LLM reasoning accuracy by generating dozens of candidate outputs and taking a majority vote, but it wastes massive amounts of compute on redundant or hallucinated generations. Reasoning-Aware Self-Consistency (RASC) introduces an intelligent early-stopping and weighted-voting framework that analyzes both the final answer and the intermediate reasoning path (RP). By doing so, RASC reduces sample generation costs by an average of 80% while matching or improving reasoning accuracy by up to 5% over standard SC.
What Problem Does This Paper Address?
While Chain-of-Thought (CoT) prompting enables LLMs to tackle multi-step problems, models often produce logical errors or hallucinations. Self-Consistency (SC) mitigates this by sampling many paths (often 40 to 64) and selecting the majority answer. However, this brute-force approach is expensive—evaluating a benchmark like MATH on GPT-4 can cost thousands of dollars.
Recent early-stopping methods (like Early Stopping SC and Adaptive Consistency) stop generation once output answers show strong consensus. Yet, these methods only check the final answer string, ignoring the reasoning path that produced it. An LLM can arrive at the right answer through flawed logic, or fail instruction parsing despite solid reasoning. Treating all reasoning paths equally in an unweighted vote allows unfaithful outputs to degrade answer quality and forces the system to sample more paths than necessary.
Methods
RASC introduces a dynamic early-stopping and confidence-weighted voting pipeline governed by lightweight quality metrics:
[Query] ──> [LLM Generation (CoT + Answer)]
│
▼
[7 Quality Features Extractor]
├── Individual: Length, In-Coherence, Format Errors, Error-Admitting Terms
└── Relative: Aggregation Sim (RP), Pairwise Sim (Ans), Bigram Sim
│
▼
[Confidence Scorer (Logistic Regression)] ──> Confidence Score (CS)
│
┌──────────┴──────────┐
│ Is CS ≥ T? │
│ (e.g., T = 0.1) │
└──────────┬──────────┘
│ Yes
▼
[Append to Buffer B]
│
┌──────────┴──────────┐
│ Is |B| ≥ N? │
│ (e.g., N = 3) │
└──────────┬──────────┘
No ┌─┴─┐ Yes
(Resample) │ │ ──> [Stop Sampling]
└───┘ │
▼
[Confidence-Weighted Majority Vote]
│
▼
[Final Answer]
- Seven Lightweight Quality Features:
- 4 Individual Features: Reasoning path length, input coherence (Jaccard similarity between the prompt and the RP), format/parsing errors, and self-detected error admissions (e.g., phrases like "there seemed to be a mistake in the previous calculation").
- 3 Relative Features: Textual similarity between new and past samples using Jaccard index. Crucially, the authors mathematically prove that aggregation similarity (comparing against the union of past tokens) is robust to noise for vocabulary-rich reasoning paths, whereas pairwise similarity is more sensitive and suitable for short, low-cardinality answers. Bigram similarity is also tracked to capture local step-to-step changes.
- Confidence Scoring: A lightweight classifier (Logistic Regression performed best) maps the 7 features to a confidence score $CS_i \in [0, 1]$.
- Dynamic Early Stopping: Valid samples meeting a threshold ($CS_i \ge T$) enter a buffer. Sampling halts immediately once the buffer reaches capacity $N$ (empirically optimized to $N=3, T=0.1$).
- Weighted Majority Voting: The final decision is determined by summing the confidence scores supporting each candidate answer, rather than simple majority headcounts.
Datasets
The authors evaluated RASC across diverse reasoning tasks:
- Primary Benchmarks: GSM8K (subsets: GSM8K-hard, GSM8K-test), MathQA (MathQA-dev, MathQA-challenge), and BiGBench (BigBench-easy).
- Out-of-Distribution (OOD) Benchmarks: 17 datasets from prior Adaptive Consistency (ASC) and Early Stopping SC (ESC) studies, covering arithmetic (MATH, SVAMP, ASDIV), commonsense (StrategyQA, CommonsenseQA, Date Understanding), symbolic reasoning (Coin Flip, Last Letter Concatenation), and code generation (HumanEval, MBPP).
Evaluations spanned models including LLaMA-3-8B, GPT-3.5-Turbo, Claude-3-Haiku, as well as GPT-4, LLaMA-2-7B, and Vicuna-13B in OOD settings.
Key Insights and Ideas
- Apologies Signal Hallucinations: LLMs frequently catch their own reasoning errors mid-generation (e.g., "I apologize, there was an error"). Identifying these lexical markers provides a strong, virtually free indicator of low answer reliability.
- Aggregation vs. Pairwise Similarity: As proven in Theorem E.2, aggregating vocabulary across previous paths dampens noise when judging long reasoning texts. Conversely, pairwise comparisons are essential for detecting shifts among compact final answers.
- Simple Feature Engineering Beats Heavy Models: A simple Logistic Regression model trained on 7 surface-level text features outperformed pre-trained NLI hallucination detectors (such as DeBERTa-based HHEM), showing that lightweight domain-specific heuristics are both faster and more accurate for this task.
Key Results
- Drastic Sample Reductions: RASC reduced sample requirements by up to 87.5% (averaging ~80% fewer samples than the 40-sample SC baseline), consistently needing fewer samples than both ESC and ASC.
- Cost Savings with Better Accuracy:
- On GPT-3.5-Turbo, RASC cut API costs by 84.6% (from $4.23 to $0.65 per 1,000 queries) while boosting accuracy from 50.7% to 54.7% (+7.9% relative improvement).
- On Claude-3-Haiku, RASC reduced costs by 84.87% while increasing accuracy from 55.1% to 55.6%.
- Robust Out-of-Distribution Transfer: On unseen prompts and tasks from prior benchmarks, RASC preserved or improved top-line accuracy while maintaining an average stopping sample count around 3 to 6.
Limitations and Future Work
- Hyperparameter Tuning: Performance is sensitive to buffer size $N$ and confidence threshold $T$. While $N=3, T=0.1$ proved a robust global default, optimal values can shift between simple and complex tasks.
- Feature Extraction Overhead: Although Jaccard similarity and regular expressions are computationally light, computing similarities dynamically during generation adds minor latency.
- Soft Heuristics vs. Formal Logic: Hand-engineered lexical markers and similarity metrics provide a soft proxy for reasoning correctness; they cannot verify deep symbolic or semantic validity when an LLM hallucination is grammatically and stylistically sound.
Summary updated