Source-linked AI summary
A decodability criterion predicts when hidden-state selection beats majority voting in large language models
Zhixiang wang, Ziliang Hong, Ulas Bagci
TL;DR
Majority voting can fail when sampled answers share correlated errors, motivating a way to decide when hidden-state selection is trustworthy. The paper introduces CASE and decodability, finding that decodability predicts when selection outperforms voting on held-out data.
Problem
Hidden-state selection has produced inconsistent results, while conventional probe evaluation can be inflated by question-identity leakage.
Method
CASE trains a linear gate on answer-token hidden states, while decodability measures leakage-free within-question ranking of correct candidates above incorrect ones.
Results
Held-out decodability predicted selection-over-voting gains with Pearson r = 0.75 across 13 of 15 medical model–task settings.
Takeaways & Limitations
Decodability provides a pre-deployment criterion for choosing hidden-state selection or majority voting based on aligned knowledge rather than model scale.
Takeaways & Limitations
Out-of-sample forecasts remain uncertain, with an approximately ±12 percentage-point deployment interval and coverage of 8 of 13 held-out settings.
Abstract
from arXiv · showhide
Combining the answers a large language model (LLM) samples for a question into one decision is a test-time information fusion problem, usually solved by majority voting. Voting is unreliable on difficult questions, where the sampled answers share correlated errors, so the wrong answer can win and drawing more samples makes the decision worse. Selecting a candidate by reading a correctness signal from the model's hidden states is a promising alternative, but its accuracy varies across models and tasks, and no measure indicates when it can be trusted. In this paper, we propose CASE (Correctness-Axis SElection), a dynamic selection combiner that trains a linear gate on the answer-token hidden state and selects the highest-scoring candidate. Its main contribution is decodability, a leakage-free measure of how well the gate ranks a question's correct candidates above its incorrect ones, which predicts whether hidden-state selection will outperform voting. A conventional probe appears accurate only because of question-identity leakage, which vanishes under question-grouped evaluation. On held-out data, decodability predicts the accuracy gain of selection over voting with a Pearson correlation r=0.75 and a decision threshold near AUC=0.60. Across general and medical LLMs, CASE improves over voting by up to 19 points on medium-difficulty questions and 16.8 points on hard questions. Decodability depends on the aligned knowledge a model must recall, not on its scale, and its prediction transfers to an unseen scientific domain within 3.8 points. It thus provides a practical criterion, measurable in advance for a given model and task, for choosing between learned selection and majority voting.
1. Introduction
Majority voting can fail on difficult questions because correlated errors make a wrong answer the stable consensus. CASE introduces leakage-free within-question decodability to determine in advance whether hidden-state selection will outperform voting for a model and domain.
- Motivation: On hard questions, correlated candidate errors can make the dominant wrong answer win, and drawing more samples worsens this failure.All candidates come from one model and one knowledge state, producing a stable wrong consensus rather than mere sampling noise.
- Leakage diagnosis: The naive late-layer probe appears effective under random splits but fails under leakage-free evaluation because question identity leaks across splits.The usable correctness signal is located in the late-layer answer-token representation.
- Study scope: CASE evaluates this criterion across general and medical LLMs from 1.5B to 70B parameters and benchmarks covering reasoning, medicine, mathematics, and graduate-level science.The study tests whether decodability forecasts when hidden-state selection beats majority voting for a model and domain.
- Diagnostic: Within-question decodability, measured by AUC, predicts hidden-state selection’s gain over voting before deployment.The reported correlation is r = 0.75 out of sample, with a derived threshold of AUC ≈0.60; the threshold remains robust after dropping the whole OpenBioLLM family.
- Main result: +16.8 pp on hard questions at N = 16, CASE improves as candidate count grows while voting collapses when the correctness signal is present.The paper reports that CASE matches a generative verifier at negligible cost.
2. Related work
Prior work frames LLM answer aggregation around voting, external judging, output-distribution signals, and hidden-state probes. This paper positions leakage-free decodability as the criterion for predicting when internal selection helps over voting.
- Voting works best with sufficiently independent, unbiased errors but can fail when correlated bias drives many decisions toward the same wrong answer.
- Self-consistency establishes majority voting as the standard LLM test-time fusion baseline, while larger candidate pools can worsen voting failures on hard inputs.
- External judges, including reward models and verifiers, can rank candidates but require labeled data and add one or more forward passes per candidate.
- Output-distribution methods seek better confidence signals, with self-certainty serving as a near-free best-of-N competitor to internal selection.
- Linear-probe research shows that LLM activations encode truth or falsehood directions, often approximately linearly, especially at answer tokens and late layers.
3. Method
The method isolates internal correctness readouts from sampling effects by comparing voting with CASE on the same candidate pools. CASE uses a leakage-free, within-question linear ranking gate trained and evaluated with question-grouped cross-validation.
- Fusion operators: CASE and voting use the same candidate pool, differing only between surface-answer frequency and an internal correctness readout.This isolates the value of the internal signal from the value of sampling itself.
- Signal extraction: The signal comes from the answer-token position, whose residual-stream activations are recorded at every layer in one teacher-forced calibration pass.The position is the option letter for multiple-choice tasks or the final answer token for free-response.
- Gate and evaluation: CASE fits an ℓ2-regularized logistic regression gate after per-feature activation standardization.The gate maps each candidate hidden state to a correctness score and selects the highest-scoring candidate.
- Gate and evaluation: Question-grouped 5-fold GroupKFold prevents question identity from appearing in both training and test folds, removing leakage from preprocessing and gate fitting.The gate and per-feature standardization are fit on training folds only.
- Decodability: Within-question ranking AUC measures whether gate scores rank correct candidates above incorrect candidates for each question, making it leakage-free and directly aligned with selection.The metric averages per-question ROC-AUC values, equivalently using the Mann–Whitney U statistic with tied scores counted as 1/2.
- Baselines and evaluation: CASE is compared with single-agent selection, majority voting, generative self-verification, and output-distribution selectors, with selection gain defined as Δ = acc(âCASE) − acc(âvote).The main gain metric targets medium-difficulty questions and averages over 200 random N = 4 draws per question.
4. Analysis: why decodability governs the fusion gain
The analysis shows that CASE’s fusion gain is governed by within-question decodability: selection improves monotonically with decodability and beats voting above a threshold determined by voting versus pool accuracy. The model also explains divergence in the Byzantine regime and why question-grouped evaluation is necessary to measure genuine decodability without leakage.
- The law and its threshold: CASE accuracy increases monotonically with decodability, from pool accuracy A at a = 1/2 to 1 as a → 1.An uninformative gate ranks candidates randomly, whereas perfect separation surfaces a correct candidate whenever the pool contains one.
- The law and its threshold: a∗ exceeds 1/2 when voting beats a random pool pick (V > A), but falls below 1/2 when voting does not (V < A).At medium difficulty, V ≳ A places the empirical crossing near AUC ≈ 0.60.
- The law and its threshold: 14/14 adequately powered medical hard bins show positive CASE−vote gains, consistent with the prediction that Byzantine inputs benefit even below the decodability threshold.In the Byzantine regime, a modal wrong answer makes V < A, so the threshold is below 1/2.
- The anti-Condorcet collapse and its remedy (N-scaling): As N grows in the Byzantine regime with A < 1/2, a > 1/2, and light-tailed scores, Pr(CASE correct) → 1 while Pr(vote correct) → 0.CASE exploits increasingly strong correct-score extremes, while voting concentrates on the modal wrong option.
- Leakage of the naive probe: 0.610 random-split probe accuracy can arise from question identity, while question-grouped evaluation yields genuine within-question decodability of 0.502, chance.AUCwq removes this predictable question-identity shortcut and is the leakage-free quantity required by the decodability theory.
- Connection to fusion theory: CASE outperforms majority voting exactly when within-question decodability exceeds a∗ set by V − A; otherwise, consensus fusion is preferable.Decodability therefore provides a per-(model, domain) test for choosing between learned selection and consensus fusion.
5. Experimental setup
The experiments span general and medical LLMs across scale, specialization, and alignment strength, and evaluate reasoning, medical, mathematics, and out-of-domain knowledge benchmarks. Candidate generation and analysis use NVIDIA GPUs, while leakage-free grouped evaluation and bootstrap statistics support the reported metrics.
- Models: The model panel spans 1.5–70B parameters, general and medical specialization, medical alignment strength, and matched general and specialist Llama-3-8B architectures.Models include Qwen2.5, Llama-3, OpenBioLLM, BioMistral, Med42, MMed-Llama-3, and meditron variants.
- Benchmarks: Benchmarks cover logical reasoning, medical question answering, mathematics, and GPQA as an out-of-domain non-medical knowledge task.PubMedQA is evaluated in open-book and closed-book forms on identical questions, differing only in abstract availability.
- Implementation: Candidate generation, extraction, and analysis run on NVIDIA A6000 and A100 GPUs, with gates and statistics implemented in scikit-learn using bootstrap resampling.All probe-quality and selection metrics use leakage-free question-grouped evaluation, and code, configurations, and per-run logs are available for review.
6. Results … 6.3. Single-variable controls isolate aligned latent knowledge
Leakage-free evaluation shows that naive hidden-state probing fails to select reliably, whereas CASE beats majority voting mainly when models must internally recall aligned domain knowledge. Single-variable controls link this advantage to specialization, parametric recall, and reliable non-floor knowledge rather than architecture or overall accuracy.
- 6.1. The naive implementation is a leakage artifact: Question-grouped evaluation reduces the naive probe’s accuracy from 0.610 to 0.542 and its within-question ranking AUC to chance at 0.502.Random-split validation therefore overstates selection quality through question-identity leakage.
- 6.2. Internal fusion beats voting only for knowledge-aligned medical models: CASE outperforms majority voting mainly for strongly aligned medical models, with OpenBioLLM-8B gains of +19.1 on MedMCQA, +17.0 on closed-book PubMedQA, and +11.9 on MedQA.The reported MedMCQA gain has a 95% CI of [+11.1, +27.0] and p < 0.001.
- 6.2. Internal fusion beats voting only for knowledge-aligned medical models: CASE can recover a correct candidate sampled only by a minority when majority voting selects a wrong option.In the worked OpenBioLLM MedQA cases, the gate assigns the highest internal correctness score to the rare correct candidate.
- 6.3. Single-variable controls isolate aligned latent knowledge: Across four controls, conditions requiring recall of aligned knowledge raise decodability and fusion gain, while matched conditions lacking or externally supplying that knowledge do neither.Correctness can nevertheless remain decodable at another layer in the open-book condition.
- 6.3. Single-variable controls isolate aligned latent knowledge: On the same Llama-3-8B backbone, general Llama-3-8B-Instruct loses to voting by −4.2, while medically aligned Med42-8B gains +1.2 on MedQA.Decodability separates the models at 0.513 general versus. 0.605 specialist, despite the general model’s higher overall accuracy.
- 6.3. Single-variable controls isolate aligned latent knowledge: At a fixed late layer, removing the abstract for closed-book PubMedQA yields +26.1 over voting, whereas open-book reading yields only −1.1.The same-question comparison uses 71 questions, with gold answers aligning 600/600.
- 6.3. Single-variable controls isolate aligned latent knowledge: On MedQA, the specialist setting gains +11.9 over voting, whereas the general setting gives −4.4.This matched task comparison isolates specialist alignment as the relevant difference.
- 6.3. Single-variable controls isolate aligned latent knowledge: Weakly aligned medical models show chance-level decodability across layers and underperform voting, indicating that reliable non-floor domain knowledge matters more than the medical label itself.Meditron has accuracy 0.27, described as near the floor.
6.4. A single law predicts when internal fusion helps
Within-question correctness AUC predicts when CASE outperforms voting, with a separating threshold near AUC 0.60. The relationship remains predictive out of sample, but uncertainty warrants treating roughly AUC 0.55–0.65 as indeterminate.
- The decodability–gain law: Across 15 model–benchmark settings, within-question correctness AUC predicts the CASE-minus-voting gain with Pearson r = 0.96 and Spearman ρ = 0.92.The separating threshold is AUC ≈0.60, with no overlap between success and failure groups.
- Limits of the cutoff: The threshold is uncertain, so AUC 0.55–0.65 is treated as indeterminate rather than a sharp cutoff.The bootstrap zero-crossing is 0.58 with 95% CI [0.562, 0.596], wider than the empirical success/failure gap.
- Robustness checks: The law is robust to influential points and model dependence: leave-one-point-out gives r ∈[0.947, 0.973], while leave-one-model-out gives r ∈[0.941, 0.959].The analyses remove individual points or all settings from one of nine model clusters.
- Held-out operating points: Held-out layer selection preserves positive gains across three OpenBioLLM settings, with AUC values of 0.715 ± 0.014, 0.786 ± 0.025, and 0.654 ± 0.018.The corresponding held-out selection gains are +4.8±3.2, +13.5±5.6, and +14.5±6.8 pp.
- Out-of-sample validation: Calibration decodability predicts deployment gain out of sample with Pearson r = 0.75, using disjoint question halves and a gate trained only on calibration data.The test covers 13 settings with 10 splits each; bootstrap 95% CI [0.51, 0.93] and p = 3 × 10−3.
6.5. In the Byzantine regime, fusion improves with N while voting collapses
In the Byzantine regime, increasing the candidate count makes majority voting collapse while CASE improves by finding rare correct candidates. This divergence is strongest on minority-correct and hard questions, but reverses on medium questions.
- Minority-correct subset: At N = 16, CASE reaches 47.3% while majority voting falls to 6.0% on 131 minority-correct questions.As N grows from 1 to 16, CASE rises from 20.4% to 47.3%, whereas voting declines from 20.4% to 6.0%.
- Minority-correct subset: +41.3 points is CASE’s advantage at N = 16 on the minority-correct subset, because additional candidates expose rare correct answers.Voting increasingly selects the wrong majority answer as N increases.
- Difficulty-resolved results: +16.8 points is CASE’s advantage at N = 16 on the broader hard bin, as voting collapses from 6.2% to 0.2% while CASE rises to 17.0%.The hard bin contains 288 questions and is a difficulty stratum rather than a hand-picked label pattern.
- Difficulty-resolved results: −2.0 points is the CASE-minus-vote gain at N = 16 on the medium bin, where voting recovers because the correct answer is closer to a plurality.The advantage is therefore specific to the Byzantine hard regime.
6.6. A shared, transferable correctness axis: usable for selection, not steering · 6.7. Matching a verifier at a fraction of the cost; cross-domain generality
CASE reads correctness from a shared hidden-state axis that transfers across medical benchmarks and domains, but decodability supports selection rather than causal steering. Selection can match a generative verifier at far lower inference cost, and its decodability threshold transfers across mathematics and graduate science.
- 6.6. A shared, transferable correctness axis: usable for selection, not steering: A shared correctness direction aligns MedQA and MedMCQA (cosine 0.934), while cross-benchmark selection reaches within-question AUC 0.77 and 0.72 in reverse transfer.The same axis also transfers across physics, chemistry, and medicine.
- 6.6. A shared, transferable correctness axis: usable for selection, not steering: 19% of incorrect answers form a cleanly separated far-incorrect cluster, while harder errors overlap the correct-answer mass.The separated cluster is an error mode the gate confidently and correctly scores as wrong.
- 6.6. A shared, transferable correctness axis: usable for selection, not steering: Decodability is a readout sufficient and necessary for selection, not a causal lever for steering generation.Adding the correctness direction during generation does not improve accuracy.
- 6.6. A shared, transferable correctness axis: usable for selection, not steering: On LogiQA, pooled answer-token AUC rises from 0.55 at 1.5B to 0.68 at 14B, with a dip at 7B; medical specialization saturates decodability at 8B.The scale relationship is non-monotonic for general models, whereas medical specialization saturates earlier.
- 6.7. Matching a verifier at a fraction of the cost; cross-domain generality: CASE reaches 62.0% (+10.2) on OpenBioLLM/MedQA medium questions using cached generation activations plus one matrix–vector product per candidate.A training-free generative self-verifier reaches 63.0% (+11.1 over voting) but requires approximately |options| extra forward passes.
- 6.7. Matching a verifier at a fraction of the cost; cross-domain generality: On MATH-500, medium-bin AUC is 0.79 for Qwen2.5-Math-7B and 0.76 for Qwen2.5-7B, with medium gains of +8.1 pp and +6.6 pp respectively.Both models also gain +2.5 to +2.6 pp on hard questions, with p < 0.001.
- 6.7. Matching a verifier at a fraction of the cost; cross-domain generality: On GPQA, Qwen2.5-7B and -14B answer only approximately 21–23% correctly, making the benchmark a hard, knowledge-intensive test of cross-domain decodability.The general models provide a probe of latent physics and chemistry knowledge without domain fine-tuning.
- 6.7. Matching a verifier at a fraction of the cost; cross-domain generality: The AUC ≈0.60 threshold classifies all six non-medical settings correctly, while GPQA gains match the medical forecast within RMSE ≈3 pp.Above the threshold settings gain from selection; below it they do not.
6.8. CASE outperforms near-free output-space selectors
CASE beats every near-free output-space selector across all five settings, with its largest advantage where output distributions are least trustworthy. Among hidden-state designs, CASE’s linear gate performs comparably to a LiLaVe-style shallow-tree latent verifier and better than a SWIFT-style token-pooled readout.
- Output-space selectors: CASE beats every near-free output-space selector in all five settings, with a 5-to-45-point margin over self-certainty at medium difficulty.CASE also leads the strongest of the three cheap selectors in every case.
- Output-space selectors: CASE’s advantage over cheap selectors is largest at medium difficulty, where the output-distribution length confound is weakest.The gap is largest where the output distribution is least trustworthy.
- Hidden-state selectors: +10.0 vs. +9.0 pp: a LiLaVe-style shallow-tree latent verifier and CASE’s linear gate perform comparably on the shared candidate pool.Both are hidden-state selector designs evaluated on the same pool.
- Hidden-state selectors: +4.3 pp: a SWIFT-style token-pooled readout is weaker than both CASE and the LiLaVe-style latent verifier.The comparison is within the hidden-state selector family on the shared pool.
7. A deployment recipe from the decodability law
The decodability law yields a pre-deployment procedure: calibrate a leakage-free gate, measure within-question AUC, and deploy hidden-state selection when decodability predicts a gain. The recipe includes uncertainty-aware fallback rules, whole-pool estimation when difficulty bins are unavailable, and inexpensive inference-time operation.
- Calibrate: Calibrate the question-grouped gate on a small labeled set, using answer-token activations from late layers and a candidate pool per question.A few hundred questions suffice; on OpenBioLLM/MedQA, held-out within-question AUC was 0.72 ± 0.03 at Ncal = 50 and 0.70 ± 0.03 at 400.
- Measure decodability: Use the best late-layer within-question ranking AUC as the single decodability diagnostic.The measure is computed after fitting the leakage-free, question-grouped gate.
- Decide: Above the threshold, deploy selection with the law’s expected gain; below it, retain voting or use a verifier, while treating AUC 0.55–0.65 as indeterminate.The gain prediction has a ±6 pp prediction interval, and the threshold confidence interval is [0.562, 0.596].
- Decide: When difficulty bins are unavailable, estimate whole-pool gain as b∆uncond = 27.6 AUCwq −15.6, which crosses zero at AUC = 0.565.The relationship has r = 0.873 and gives +3.7 pp at AUC = 0.70.
- Operate: The diagnostic is cheap, model-agnostic, and leakage-free, while inference requires only one matrix–vector product per candidate using activations already generated.A leave-one-out threshold classified 14 of 15 settings, and the AUC = 0.60 sign test was correct on all 15 with one-sided p = 3 × 10−5.
8. Discussion
The discussion frames hidden-state selection as effective when correctness is decodable from aligned latent knowledge, while emphasizing its fragility, non-causal nature, and limitations of the evidence. Decodability—not model scale, specialization labels, or output confidence—determines when learned fusion can surpass voting.
- Core interpretation: Decodability reconciles claims that LLMs know when they are right with hidden-state selection’s fragility by predicting when internal correctness can overcome voting failures.Within-question decodability yields r = 0.96 in-sample and 0.75 held-out.
- What determines decodability: Decodability, rather than scale or specialization, depends on alignment between the model’s latent knowledge and the question’s required domain knowledge.General and medical models show reciprocal strengths across graduate physics and clinical medicine, while closed-book recall is decodable but open-book passage extraction is not.
- Internal versus output signals: Internal correctness signals differ from output confidence: on closed-book PubMedQA, self-certainty points toward confabulated answers while the internal readout does not.Output-space selectors inherit generator miscalibration, whereas internal correctness can provide a better fusion weight.
- Limits of intervention: A correctness direction can separate correct from incorrect hidden states without steering generation, showing that decodability does not imply steerability or causal control.Across four intervention variants, adding the direction to the residual stream did not raise accuracy and could lower it.
- Limitations: The strongest closed-book effects come from medical settings, but GPQA and mathematics extend the phenomenon to general models and less contaminable data.Public medical benchmarks may partly reflect memorized retrieval, so GPQA and mathematics provide cleaner evidence of usable latent knowledge.
9. Conclusion
The paper introduces decodability as a leakage-free criterion for deciding when CASE should replace majority voting, with a held-out correlation of r = 0.75 and a decision boundary near AUC = 0.60. Future work includes learned verifiers, broader correctness readouts, and training models to make correctness more legible.
- Conclusion: Decodability is the leakage-free within-question AUC of a linear gate ranking correct candidates above incorrect candidates.It is proposed to determine when hidden-state selection should replace majority voting before deployment.
- Conclusion: r = 0.75: on held-out questions, decodability predicts the gain of selection over voting.CASE beats voting above a decision boundary near AUC = 0.60, with larger margins as sample counts increase on hard questions.
- Future directions: Whether a learned process-reward verifier changes the cost–accuracy gap or whether decodability predicts its gain remains untested.The baseline verifier is generative rather than a trained process-reward model.
- Future directions: Future extensions include reading correctness from intermediate reasoning steps and free-form tasks instead of only final answer tokens on multiple-choice tasks.The paper also suggests training models to make correctness more legible, turning decodability into an optimization target.
CRediT authorship contribution statement
The paper credits Zhixiang Wang with leading its conception, methods, implementation, analysis, investigation, and original drafting, while Ziliang Hong and Ulas Bagci contributed to validation, oversight, funding, and revision.
- Authorship contributions: Zhixiang Wang handled conceptualization, methodology, software, investigation, formal analysis, and the original draft.Ziliang Hong contributed investigation, data curation, validation, visualization, and review; Ulas Bagci contributed conceptualization, supervision, funding acquisition, and review.