Sample, Mix, or Verify? Allocating Test-Time Compute under Imperfect Verifiers
Organizations: Microsoft Research India
Abstract
A common way to make language models and agents more accurate is to spend more compute at inference time: generate many candidate solutions and submit the one a verifier prefers. Success then requires that some candidate is correct and that the verifier picks it. The first grows predictably with the number of samples; the second does not, because real verifiers (unit tests, majority votes, LLM judges, reward models) accept wrong answers, reject right ones, and make correlated mistakes. With a fixed budget, a practitioner must decide how many samples to draw, which models to draw them from, and how much to spend on verification, and today these choices are made by rules of thumb. We introduce SPLIT, which makes them from a small labelled pilot. It rests on an exact formula for the probability of submitting a correct answer under accept/reject and top-score selection that accounts for varying task difficulty, blind spots shared across models, and correlated repeated verifier calls. SPLIT fits the formula by empirical Bayes and uses it to plan budgets on unseen tasks. Across seven benchmarks spanning math, science QA, code and software-engineering agents, 26 models, 175 agent systems and six kinds of real verifiers, all from public releases, SPLIT lands within 0.02-0.8 percentage points of the best allocation in hindsight, while every fixed rule we test loses at least 2.5 points in some setting. Regret depends only on how well SPLIT ranks configurations, and it stays near-optimal under compute, price and latency costs and online. The formula also explains when asking more LLM judges lowers precision. As a forecaster far beyond the pilot, SPLIT beats power-law fitting when the verifier caps success, and we report where it loses.
Figures & tables
| Benchmark | Tasks | Samples per task | Generators | Verifier(s) |
|---|---|---|---|---|
| MATH | 128 | 10,000 | 5 (Llama-3 8B/70B, Gemma 2B/7B) | simulated (TPR, FPR, controlled); real majority vote |
| CodeContests | 140 | 10,000 | 3 (Llama-3 8B/70B-Inst., Gemma-7B) | simulated; public tests (80,403 programs executed) |
| HumanEval | 164 | 50–1,000 | 17 (CodeGen-6B to GPT-4o) | base tests ; truth: HumanEval+ |
| MBPP | 399 | 20–50 | 10 | base tests ; truth: MBPP+ |
| MATH-500, GPQA | 500, 646 | 100 | Llama-3.1-70B-Inst. (+8B) | 8 LLM judges (random judge per call, majority of ); 19 reward models; Weaver score |
| SWE-Bench Verified (R2E-Gym rollouts) | 492 | 22 | R2E-Gym 32B agent | LLM patch verifier : thresholds or argmax |
| Simulated verifier | Sim., compute-matched | CodeContests, real tests | ||||
|---|---|---|---|---|---|---|
| Method | MATH | CodeContests | MATH | CodeContests | param. cost | compute-matched |
| SPLIT (ours) | 0.54 | 0.82 | 0.47 | 0.65 | 0.62 | 0.46 |
| SPLIT, independent errors | 1.69 | 1.01 | 1.36 | 0.82 | 1.46 | 1.34 |
| Singhi et al. (2025) rule | 11.95 | 0.78 | 11.94 | 0.73 | — | — |
| Strongest model | 12.35 | 0.99 | 12.72 | 1.02 | 0.94 | 0.94 |
| Uniform ensemble | 16.73 | 3.62 | 16.74 | 3.82 | 2.33 | 2.53 |
| LLM judges (Weaver release) | SWE-Bench Verified agents | |||
|---|---|---|---|---|
| Method | MATH-500 | GPQA | Method | Regret |
| SPLIT, empirical task population | 0.06 | 0.02 | SPLIT, task-varying verifier | 0.33 |
| SPLIT, fitted judge correlation | 0.06 | 0.11 | SPLIT, auto-selected verifier model | 0.56 |
| SPLIT, judge-level IRT | 0.04 | 0.05 | SPLIT, pooled verifier | 2.36 |
| SPLIT, independent judge calls | 0.23 | 0.53 | Fixed threshold 0.5 | 2.62 |
| Singhi et al. (2025) rule | 0.05 | 1.20 | No verifier (random rollout) | 3.58 |
| Policy | success | spent | success | spent | success | spent | success | spent |
|---|---|---|---|---|---|---|---|---|
| Static plan (SPLIT) | 2.90 | 1.00 | 7.14 | 1.00 | 11.04 | 1.00 | 15.31 | 1.00 |
| Static oracle (hindsight) | 3.22 | 1.00 | 7.32 | 1.00 | 11.85 | 1.00 | 16.47 | 1.00 |
| Early stop, static mix, per task | 2.82 | 0.95 | 6.90 | 0.93 | 10.91 | 0.85 | 15.21 | 0.75 |
| Re-planning, per task | 2.79 | 0.95 | 7.42 | 0.93 | 11.09 | 0.86 | 15.13 | 0.75 |
| Early stop, static mix, pooled | 2.98 | 1.00 | 7.16 | 1.00 | 11.68 | 1.00 | 16.03 | 1.00 |
| Real | |||
|---|---|---|---|
| SPLIT, empirical task population | |||
| SPLIT, pooled judge rates | |||
| SPLIT, judge-level IRT |
| Setting | Target | Horizon | Ours | Power law | Plug-in | |
|---|---|---|---|---|---|---|
| MATH + CodeContests, sim. verifier (pilot 32) | selection | 8,192 | 1.9 | 7.6 | — | |
| MATH + CodeContests (pilot 32) | coverage | 8,192 | 3.3 | 2.6 | — | — |
| CodeContests, public tests | selection | 8,192 | 2.13 | 2.77 | 5.54 | 0.002 |
| HumanEval, base tests (17 models) | selection | 128 | 1.69 | 2.13 | 4.55 | |
| SWE-bench, LLM verifier thresholds | selection | 16 | 2.74 | 6.70 | 4.07 | |
| SWE-bench, argmax of verifier score | selection | 16 | 3.28 | 1.58 | 2.11 | 0.006 |
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | Pooled verifier | Task-varying | Automatic | Picks task-varying |
|---|---|---|---|---|
| CodeContests (3 models) | 2.13 | 2.64 | 2.40 | 43% |
| HumanEval (17 models) | 1.85 | 1.69 | 1.73 | 56% |
| SWE-Bench Verified (3 thresholds) | 5.35 | 2.74 | 3.45 | 59% |
| Pool, pilot | Horizon | Beta prior | NPMLE prior | Power law | Plug-in | Independence |
|---|---|---|---|---|---|---|
| All 175 systems, 16 | 159 | 3.23 | 2.58 | 1.71 | 4.93 | 8.40 |
| All 175 systems, 32 | 143 | 2.84 | 1.27 | 1.58 | 2.56 | 7.51 |
| 90 single-attempt systems, 32 | 58 | 2.39 | 1.14 | 0.73 | 2.66 | 7.87 |
| 41 mini-SWE-agent runs, 16 | 25 | 3.39 | 1.65 | 1.48 | 2.68 | 10.95 |
| Method | MAE (points) | Error at |
|---|---|---|
| Power law | 1.6 | |
| Plug-in per task | 2.1 | |
| Ours, issue-level score shift | 3.3 | |
| Ours, pooled score distributions | 4.5 | |
| Ours, issue shift with Gaussian tails (ablation) | 3.8 | |
| Ours, joint Dirichlet over bins (ablation) | 20.3 |
| Setting | Regret | Pairwise error | Model spread | Task gap | Hoeffding | |||
|---|---|---|---|---|---|---|---|---|
| MATH, simulated verifier | 140 | 64 | 0.54 | 0.96 | 11.12 | 7.20 | 10.40 | 73.4 |
| CodeContests, simulated verifier | 48 | 70 | 0.82 | 2.81 | 7.59 | 3.69 | 5.79 | 65.7 |
| CodeContests, real tests | 13 | 70 | 0.62 | 1.48 | 6.03 | 2.63 | 5.50 | 59.8 |
| Comparison | Mean diff. [95% CI] | |
| Selection MAE, sim. verifier: SPLIT vs power law | [ , ] | |
| CodeContests MAE: SPLIT vs power law | [ , ] | 0.002 |
| HumanEval MAE: SPLIT, task-varying vs power law | [ , ] | |
| SWE-bench MAE: SPLIT, task-varying vs power law | [ , ] | |
| SWE-bench argmax MAE: SPLIT, issue shift vs power law | [ , ] | 0.006 |
| Agent-pool coverage MAE: SPLIT, NPMLE vs power law | [ , ] | 0.57 |
Inference-Time Compute Allocation
Inference-time compute allocation decides where, when, and how much computation models spend during prediction to improve quality under resource limits.
See all 76 papers