TL;DR
When an LLM is thinking—whether sampling multiple answers, reading a long context, or stepping through a chain of thought—knowing when to stop is a trade-off between reliability and compute cost. This paper replaces ad-hoc stopping heuristics with classical sequential hypothesis testing, giving exact, finite-sample error guarantees at any data-dependent stopping time. Surprisingly, while a more complex "rate-optimal" betting rule wins in theory as sample sizes approach infinity, a much simpler Beta-mixture rule is faster and easier to use in practice.
What Problem Does This Paper Address?
Test-time scaling—asking an LLM the same question multiple times, extending its context window, or letting it generate more reasoning steps—improves accuracy, but it burns compute. Right now, deciding when to stop relies on heuristics: fixed sample budgets, raw confidence thresholds (which are notoriously miscalibrated), or entropy-based early exits.
These heuristics might work okay on average, but they come with zero formal guarantees. They can stop too early when the signal is weak, or waste compute when the answer is already clear. The authors frame this as a statistical problem: sequential evidence accumulation. At each step $n$, the model produces an increment of evidence $Y_n$, and we want a stopping rule that certifies a positive signal with a strict, guaranteed cap on false alarms (Type I error $\le \epsilon$), no matter when we decide to stop.
Methods
The authors build on test supermartingales (or e-processes) and Ville's inequality, which together guarantee that the probability of ever falsely crossing a threshold $1/\epsilon$ is at most $\epsilon$—even if you peek at the data after every single sample.
They study two specific constructions:
- Beta-Mixture e-process: A closed-form, tuning-free rule with an $O(\sqrt{n \log n})$ stopping boundary. It instantiates the Martingale Majority Certificate for $\pm 1$ voting.
- Robbins-Stitched Betting e-process: Adapts a hedged-capital betting martingale over a geometric grid of scales. It achieves the tighter, law-of-the-iterated-logarithm boundary rate of $O(\sqrt{n \log \log n})$, making it rate-optimal (matching the classical Farrell–Lai lower bound).
They instantiate this framework in two settings:
- Self-consistency certification: Sampling responses from an LLM and tracking a $\pm 1$ vote between the current leader and runner-up.
- PaTH attention content-sensitivity: Testing whether PaTH position encodings genuinely depend on content rather than just token displacement. Because a single context has strong internal dependencies, they construct a cross-context certificate using i.i.d. resampled contexts and a non-telescoping evidence statistic.
Datasets
- Simulated $\pm 1$ Vote Processes: Used to test exact Type I error (4,000 replications) and power/stopping-time efficiency (2,000 replications) across different drift strengths.
- GSM8K: 60 math problems evaluated on Claude Haiku 4.5 (
claude-haiku-4-5-20251001, temperature 1.0, $K=40$ samples per problem, $\epsilon=0.05$). - PaTH Attention Traces: 200 random contexts of length $L=64$ using the exact PaTH operator with untrained random direction matrices, plus 1,000 trials of $N=1,000$ contexts for the cross-context certificate.
Key Insights and Ideas
- Asymptotics can mislead you at practical sample sizes: Even though the Robbins-stitched rule is theoretically rate-optimal as $n \to \infty$, it actually performs worse than the simpler Beta-mixture at small-to-moderate sample sizes. Spreading mixture weights across a fine geometric grid dilutes the mass on the right scale, meaning the stitched rule needs careful tuning to beat the Beta-mixture.
- Plurality is not correctness: Certifying self-consistency only proves that an answer is the mode of the model's output distribution—not that it is actually right. If a model is confidently wrong, the certificate will happily certify the wrong answer.
- Within-context dependence breaks naive certificates: For PaTH attention, the coupling matrix $T^{-1}$ makes increments within a single context strongly dependent. A naive per-trajectory e-process fails to control Type I error, which is why the authors' valid certificate operates across i.i.d. contexts instead.
Key Results
- Validity holds: Under the null ($\theta = 0, \epsilon = 0.05$), both methods controlled Type I error conservatively: 0.0385 (154/4,000) for Beta-mixture and 0.0400 (160/4,000) for Robbins-stitched.
- Finite-sample efficiency reversal: In simulations ($n_{\max}=15,000$), Robbins-stitched was slightly slower than Beta-mixture at small drifts ($-2.5\%$ at $\theta=0.05$, $-3.6\%$ at $\theta=0.10$) and only pulled ahead at larger drifts ($+6.0\%$ at $\theta=0.20$, $+12.5\%$ at $\theta=0.30$).
- GSM8K: Both rules certified 59/60 problems. Because GSM8K pluralities are nearly unanimous, stopping happened very quickly—and the Beta-mixture dominated, stopping in a median of 7 decisive votes (mean 7.2) versus 10 (mean 10.1) for Robbins-stitched (a $-41\%$ gap). Notably, one certified problem was an incorrect plurality (leader: 135, gold: 81).
- PaTH Cross-Context Certificate: Achieved 0.000 empirical Type I error and 0.994 power, certifying content-sensitivity in a median of 163 contexts (mean 241).
Limitations and Future Work
The authors are upfront about the boundaries of their guarantees:
- Scope of i.i.d. theory: The constant-drift, independent-increment assumptions cover self-consistency and the cross-context PaTH ensemble, not chain-of-thought or autoregressive token streams, where increments are serially dependent and drift is non-stationary.
- Per-trajectory PaTH certificate: Building a valid single-input (per-trajectory) certificate for PaTH attention requires a dependence-aware e-process and remains an open problem.
- Untrained PaTH weights: The PaTH experiments used random direction matrices to verify the operator's arithmetic; testing on trained models is left for future work.
Summary updated