| Test-time compute | |
|---|---|
| prompt; its correct answer | |
| generation budget: answers sampled per prompt (beams for beam search) | |
| test-time hyperparameters; the best ones for at budget | |
| distribution of the returned answer; its chance of being correct | |
| final answer and verifier score of sample ; the selected answer | |
| beam width; lookahead depth in steps | |
| revisions per chain (Step 5) | |
| FLOPs matching (Step 6) | |
| small model's parameter count | |
| pretraining tokens; tokens generated in deployment | |
| parameter ratio of the larger model to the small one | |
| inference load | |
| how many times over the small model can run its inference at equal total FLOPs | |
| Constants | |
| 2048 | samples per question behind both difficulty estimates |
| size of the comparison model in Step 6 | |
| the three inference loads of Step 6 | |
Context. A language model can spend extra computation on a hard prompt in two ways. It can sample many answers and let a verifiera model trained to score how likely an answer, or part of one, is to be correct choose among them, or it can write an answer, read it and revise it. Earlier results pointed both ways. best-of-Nsampling complete answers independently and keeping the one the verifier scores highest reliably helps, while prompting a model to correct its own reasoning on math often makes no progress, and the authors describe their comparison with a larger model at equal compute as the first of its kind. Snell et al. fine-tune PaLM 2-S*a smaller model of the PaLM 2 family in its code-tuned version (Codey), the base model of every experiment to check solution steps and to revise answers on MATHa benchmark of high-school competition math problems with checkable final answers, and ask, for a fixed number of generations per prompt, which method to use and when this beats a model with about 14 times the parameters. The principle is that the best use of inference on a prompt depends on how often the model already solves it, so the budget should be allocated per prompt, and extra inference substitutes for parameters only on prompts the model can already partly solvewhy: search and revision select or refine answers the model already produces; on questions it almost never answers correctly (the hardest bin in Steps 3 and 6) there is nothing to select.
Refinement helps most on easy prompts and search on harder ones. On prompts the model usually solves, its first answer is close, sequential revisions fix small errors, and a strong search against the verifier starts to find the verifier's mistakes, the same over-optimization of a learned reward that RLHFreinforcement learning from human feedback: tuning a model against a reward model fitted to human comparisons runs into. On harder prompts, independent samples and step-level search cover different approaches and help, and on the hardest fifth nothing tried helps much. Choosing the settings per difficulty level (the search, or the split between revisions and fresh samples) nearly matches or beats best-of-N with about four times fewer generations, with verifier-predicted difficulty almost as good as the true one. At equal total FLOPsfloating-point operations, the measure of compute for training and inference, the small model with revisions beats the larger model on every question group when inference is lightwhy: Step 6 converts the larger model's extra pretraining into samples for the small model, and that conversion yields few samples when deployment generates many tokens per pretraining token, and on easy questions even when inference is heavy; the larger model wins on medium and hard questions when inference is heavy.
Setting. Write for a prompt, for its correct answer and the generation budget: the number of answers sampled per prompt (for beam search, the number of beams) for the budget. A test-time method has hyperparameters the hyperparameters of a test-time method, such as beam width, lookahead depth, or the split between revisions and independent samples, and with them induces a distribution the distribution of the final answer the method returns for prompt at budget over final answers. The ideal is the compute-optimal strategythe hyperparameters that maximize the chance of a correct final answer for one prompt at one budget, chosen for each prompt and budget: It cannot be found prompt by prompt, because the formula needs the correct answer , which a deployed system does not have; it is chosen per difficulty level instead. The test questions are split into five quantile bins, numbered 1 (easiest) to 5, by the model's pass@1the probability that a single sampled answer is correct, here estimated from 2048 samples per question on each (oracle difficultydifficulty bins computed from the true correctness of the 2048 samples, which needs the answers), or by the verifier's average score (predicted difficultydifficulty bins computed from the verifier's mean final-answer score over the same 2048 samples, which needs no answers but costs the samples). The best setting for each bin and budget is chosen on one half of the bin's questions and scored on the other, with the halves swapped. The test set is the 500-question MATH split of Lightman et al.; the search verifier is a process reward model (PRM)a verifier that scores every intermediate step of a solution, as well as the final answer and the reviser a fine-tuned revision model, both built from the same base model.
Main findings (all empirical). Against the PRM, beam searcha search that keeps, after each solution step, the partial solutions the verifier scores highest and extends each of them with newly sampled steps beats best-of-N at small budgets and falls behind it at large ones; by difficulty, it gets worse with budget on the two easiest bins and beats best-of-N on the middle ones. A revision model's sequential chain narrowly beats the same number of independent samples, and the best ratio of sequential samples (revisions) to parallel (independent) ones is all-sequential on easy questions and a mix on hard ones. Choosing the setting per bin, with predicted difficulty almost as good as oracle, nearly matches best-of-N at 64 generations with 16 (search) and beats best-of-N at 256 with 64 (revisions). At equal total FLOPs against a model about 14 times larger, the small model with revisions is 12 to 28% more accurate (relative, as labeled in the paper's Figure 1) on every question group when inference tokens are few compared with pretraining tokens, and 24% and 37% less accurate on medium and hard questions when they are many.
Consequences and limits. The practical rule is to estimate how hard a prompt is for the model before spending on it: refine answers the model nearly has, search over approaches when it rarely gets one right, and leave the questions it essentially never solves to a stronger model. Search effort should match the verifier's reliability, since a stronger optimizer against a learned verifier finds more of its errors. The limits are those of one study: one model family, one benchmark with checkable answers, verifiers and revision models that had to be fine-tuned for the purpose, and a difficulty estimate that itself costs 2048 samples per question and is left out of every budget. The pretraining comparison scales parameters at fixed data, so the larger model is not a compute-optimally trained one.
A PRM trained on rollouts from each step serves as the verifier. A PRM trained on PRM800Kthe human step-level correctness labels released by Lightman et al. for GPT-4 solutions to MATH problems was easy to exploit even with best-of-N on PaLM 2 samples, which the authors attribute to the difference between GPT-4's solutions and PaLM 2's. Following Math-Shepherd (Wang et al.), each step of 16 sampled solutions per training question is labeled instead with the fraction of 16 continuations from that step that reach the right answer, so the PRM predicts the chance of eventual success under the base model's own sampling, a value estimate. As the score of a whole answer, the PRM's score at the last step works better than the minimum or product over steps, and the PRM beats an ORMoutcome reward model: a verifier trained to score only complete answers, by their final correctness by a margin that grows with ; read at its last step the PRM scores whole answers, so the authors suggest the step-level training helps mainly by giving better representations. Answers are chosen by best-of-N weightedselection of the final answer whose samples have the largest total verifier score, so agreement among samples and verifier confidence both count selection: with the final answer of sample and the verifier's score of sample , the choice is which is majority votingchoosing the final answer that appears most often among the samples when all scores are equal.
Stronger search against the PRM helps at small budgets and hurts at large ones. Beam search keeps beams with beam width the beam width: each kept partial solution is extended with sampled next steps, so of the candidates survive each round: sample first steps, keep the the PRM scores highest, sample next steps from each, and repeat for up to 40 rounds, ending with best-of-N weighted over the final answers. Lookahead searchbeam search in which each candidate step is scored by the PRM at the end of a greedy rollout of up to further steps; beam search is the case is charged samples. Swept with or 4 and at budgets up to 256, beam search is clearly ahead of best-of-N at small , its lead shrinks and often reverses as grows, and lookahead, which optimizes the PRM hardest, is worst at equal cost. The search outputs show what is being exploited: long tails of repetitive, uninformative steps, and solutions of one or two steps, both of which the PRM scores highly.
Difficulty decides which search wins, and choosing by difficulty nearly matches best-of-N on a quarter of the budget. At , beam search with and best-of-N look alike in aggregate at the largest budget, but on bins 1 and 2 beam search gets worse as grows while best-of-N does not, on bins 3 and 4 beam search is consistently ahead, and on bin 5 neither makes meaningful progress. The authors' explanation: on easy questions the verifier already judges the base model's samples mostly correctly, so a stronger search gains little and mainly amplifies spurious features the verifier learned; on harder ones a correct answer is rarely sampled at all, and step-level guidance finds it more often. Picking the best search setting per bin and budget nearly matches best-of-N at 64 generations with 16, and the curves for predicted and oracle bins nearly coincide; at the largest budgets the gain shrinks with predicted bins and continues with oracle ones.
A fine-tuned revision model improves its answers along a chain, and it also breaks correct ones. Prompting alone does not give useful self-correction on these problems, so the model is fine-tuned on constructed chains. From 64 samples per training question, each correct answer becomes the target after zero to four incorrect answers placed in context, the last of them the incorrect answer closest to the correct one in character edit distancethe number of character insertions, deletions and substitutions needed to turn one text into another, so the target reads as a correction of what precedes it. At test time the context keeps the four most recent attempts. Pass@1 rises along the chain, even past the four revisions seen in training, but about 38% of correct answers are revised into incorrect ones, since training never showed a correct answer in context. The final answer is therefore selected over the chain by majority vote or by a verifier; the PRM of Step 1, trained on base-model samples, transferred poorly to revision outputs, so an ORM trained on revision outputs, with the earlier attempts in its context, is used. With either selector, revisions in sequence beat independent samples from the same model by a small margin, and the margin remains when the verifier does not see the history. Further training of the revision model with ReST-EMa simple RL method: sample attempts, keep the successful ones, fine-tune on them, and repeat on its own revision chains made additional revisions harmful, which the authors attribute to spurious correlations in data the model generated itself.
The best split between revisions and independent samples depends on difficulty. Split a budget into independent chains of revisions each, and select with the verifier first within each chain and then across chains. More sequential samples generally help, and at the higher budgets accuracy peaks at an intermediate ratio of sequential to parallel samples. At the peak moves with difficulty: the easiest bins do best with one chain, harder bins with a mix. The authors' reading is that revisions refine an approach that is already roughly right, while independent samples try different approaches. Choosing the ratio per bin beats parallel best-of-N at 256 generations with 64, and keeps improving at budgets where parallel sampling has flattened.
Extra inference replaces a larger model on easy questions, and on harder ones only when inference is light. With the small model's parameter count, the number of pretraining tokens, the same for both models and the total number of tokens the deployed model generates, one greedy answer per query, pretraining costs FLOPs and inference . A model with the ratio of the larger model's parameter count to the small model's; about 14 here times the parameters, trained on the same data, costs times both. With the same total FLOPs the small model can run its inference times over, where . Dividing by and writing the inference load : tokens generated in deployment per pretraining token for the inference load gives For and the paper's , is about 258, 63 and 16 (my computation), budgets of roughly generations. Against the larger model's greedy accuracy, compute-optimal revisions (with oracle bins) are 22, 28 and 12% better (the labels of the paper's Figure 1), relative, on the easy, medium and hard groups at ; at they are 5% better on easy questions and 24% and 37% worse on medium and hard ones. PRM search does worse than revisions in every group and at every load, already about 35% behind on medium and hard questions at . The larger model's advantage is concentrated where the small model rarely produces a correct answer by sampling or by revising.
Terms
- Compute-optimal strategy
- , the test-time setting that maximizes the chance of a correct answer for at budget ; approximated per difficulty bin
- Difficulty bins
- five quantile bins of pass@1 from 2048 samples (oracle) or of the mean verifier score (predicted)
- PRM
- verifier scoring each step; here trained on the success rate of rollouts from each step and read at the last step
- Best-of-N weighted
- : sum verifier scores over samples with the same final answer
- Beam search
- keep the best partial solutions after each step and extend each ways
- Lookahead search
- score a step by the PRM after a greedy rollout of steps; costs
- Verifier over-optimization
- on easy questions, stronger search against the PRM lowers accuracy as the budget grows
- Revision model
- fine-tuned to write a correct answer after up to four incorrect ones in context; needs a selector because it breaks 38% of correct answers
- Sequential vs parallel
- easy questions: all revisions in one chain; hard questions: a mix of chains
- FLOPs exchange
- small-model inferences per larger-model inference at equal total FLOPs
- Inference load
- ; small favors test-time compute, large favors the larger model
Quiz
- For hard questions, the best use of a fixed budget of revision-model samples isRevisions refine an approach that is roughly right, which suits easy questions; on hard ones the first approach is often wrong, so spending part of the budget on separate chains covers more approaches. The peak sits at an intermediate sequential-to-parallel ratio.
- What cost does a practitioner face that the paper's budgets leave out?Predicted difficulty needs no answers but bins the verifier's mean score over 2048 samples per question, far more than the budgets being compared, and this cost is not counted. Lookahead rollouts, by contrast, are charged . A deployed version needs a cheaper difficulty predictor or must reuse those samples.
- What do the results say about the hardest fifth of questions?Search and revision start from answers the model can already produce; when it essentially never reaches a correct answer there is nothing to select or refine. In the FLOPs-matched comparison this is where the larger model wins.
Sources
- Charlie Snell, Jaehoon Lee, Kelvin Xu, and Aviral Kumar. Scaling LLM Test-Time Compute Optimally Can be More Effective than Scaling Parameters for Reasoning. ICLR, 2025.
- Hunter Lightman et al. Let's Verify Step by Step. ICLR, 2024.
- Peiyi Wang et al. Math-Shepherd: Verify and Reinforce LLMs Step-by-step without Human Annotations. ACL, 2024.