Large Language Models (LLMs) are notoriously prone to "hallucinations" and reasoning errors. To combat this, researchers often use a technique called self-consistency: they sample multiple reasoning paths from the model and aggregate the results (usually via majority vote). While this improves accuracy, it creates a massive compute bottleneck. If you sample 100 times for every query, your inference costs skyrocket.
But what if you could stop sampling as soon as you were mathematically certain you’d found the most likely answer? A new paper, "CITE: Anytime-Valid Statistical Inference in LLM Self-Consistency," introduces an algorithm to do exactly that, providing rigorous error guarantees even when the set of possible answers is unknown or infinite.
TL;DR
CITE is a sequential testing algorithm that allows users to stop sampling from an LLM as soon as a target answer can be certified as the unique "mode" (the most likely response) of the model's distribution. It provides an "anytime-valid" guarantee, meaning the error rate is strictly controlled even if you decide when to stop based on the data you've seen so far.
What Problem Does This Paper Address?
In high-stakes scenarios—like emergency room triage or automated legal analysis—we need to know exactly how much we can trust an LLM's output. Self-consistency helps, but it lacks a "stopping rule" with formal guarantees.
Standard statistical tools like p-values are dangerous here for two reasons:
- The Peeking Problem: If you check your results after every sample and stop when the p-value looks good, you are "data-peeking," which invalidates standard statistical tests.
- The Infinite Answer Set: LLMs can generate an infinite variety of strings. Most statistical tests for categorical data require you to know the number of possible categories in advance. In LLM land, you never know if the next sample will produce a brand-new, highly probable answer you haven't seen yet.
Methods
The authors propose CITE (Certification by Intersection-union Testing with E-processes). Instead of p-values, they use e-processes, a modern statistical framework designed for sequential monitoring.
CITE stops and certifies a target answer only when three specific conditions are met simultaneously:
- Pairwise Comparison: The target answer is significantly more likely than the current runner-up.
- Target Probability: The target answer itself has a high enough estimated probability.
- Unseen Category Bound: The probability of any unobserved answer being the true mode is proven to be very low.
This third point is the "secret sauce." CITE uses a novel bound to rule out the possibility that a "hidden" answer (one that hasn't appeared in the samples yet) could actually be the most frequent one. They also extend this to W-CITE, which can incorporate confidence scores (like token logits) to speed up the process.
Datasets
The researchers evaluated CITE across several challenging domains:
- AIME 2026: A benchmark of high-school math competition problems.
- FrontierScience-Olympiad: Expert-level scientific tasks in physics, chemistry, and biology.
- ER-REASON: A clinical dataset involving emergency room triage and disposition decisions.
- Synthetic Simulations: Controlled multinomial distributions to test edge cases like "near-ties" and "diffuse tails" (where there are thousands of rare answers).
Key Insights and Ideas
- Category-Set-Size-Free: One of the most impressive theoretical results is that CITE’s efficiency doesn't depend on how many possible answers there are. Whether there are 10 possible answers or 10 million, CITE finds the mode just as fast.
- Anytime Validity: Because it uses e-processes, you can stop at any time $t$ based on any rule (even a "gut feeling"), and the mathematical guarantee that your false certification rate is below $\epsilon$ (e.g., 5%) remains intact.
- The "Hidden Competitor" Problem: The paper highlights that in "diffuse" settings (where an LLM might give 200 different versions of a wrong answer), traditional methods fail because they don't account for the "missing mass" of answers not yet sampled. CITE explicitly models this.
Key Results
- Compute Efficiency: On the ER-REASON dataset using the Qwen3-30B model, CITE achieved a 98% certification rate with a mean stopping time of just ~12 samples. In contrast, a standard Bonferroni baseline required hundreds of samples to reach the same level of confidence.
- Error Control: In all experiments, CITE strictly maintained the Type-I error rate below the user-specified level (e.g., 0.05). Baselines like MMC (Martingale Majority Certificates) sometimes exceeded these error rates because they weren't designed for fixed-target mode testing.
- Optimality: The authors proved that CITE’s stopping time is "minimax optimal," meaning it is mathematically impossible to build a significantly faster algorithm that provides the same guarantees.
Limitations and Future Work
- Mode vs. Truth: It is vital to remember that CITE certifies the model's mode, not the ground truth. If a model is confidently wrong (i.e., its most likely answer is incorrect), CITE will correctly certify that wrong answer as the mode. It guarantees statistical consistency, not semantic correctness.
- Fixed Target: Currently, CITE requires you to pick a target answer to test before you start sampling. In practice, we usually want to certify the answer that appears to be the leader. The authors suggest that adding a "Bonferroni-type correction" could allow for certifying the empirical leader, but this remains a task for future work.
- Per-Round Cost: While CITE is compute-efficient in terms of LLM samples, the weighted version (W-CITE) has a computational cost that grows with the number of unique answers seen, which could be a factor for extremely long-running tasks.
Summary updated