Bring the mental model from Scaling Laws & Emergent Abilities; this page will reuse it instead of restarting from zero.
Scaling
Test-Time Compute: Spending Inference Budget on Search
Test-time compute spends extra inference budget on sampling, verification, and selection; it helps when the generator can produce good candidates and the verifier ranks them reliably.

Concept Structure
Test-Time Compute: Spending Inference Budget on Search
Start with the picture, metaphor, or geometric mechanism.
Make the objects explicit and connect them with notation.
Mirror the equations with runnable implementation details.
Manipulate the mechanism and watch the idea respond.
Learning map
Test-Time Compute: Spending Inference Budget on SearchConceptual Bridge
What should feel connected as you move through this page.
Test-time compute spends extra inference budget on sampling, verification, and selection; it helps when the generator can produce good candidates and the verifier ranks them reliably.
The next edge should feel earned: use the demo prediction here before following Tree Search Reasoning: Allocating Inference Budget Across Prefixes.
01
Intuition
Build the mental picture first so the rest of the page has something to attach to.
Canonical sources: Kaplan et al., "Scaling Laws for Neural Language Models", Hoffmann et al., "Training Compute-Optimal Large Language Models", Cobbe et al., "Training Verifiers to Solve Math Word Problems", Uesato et al., "Solving Math Word Problems With Process- and Outcome-Based Feedback", Lightman et al., "Let's Verify Step by Step", Brown et al., "Large Language Monkeys: Scaling Inference Compute with Repeated Sampling", Wang et al., "Self-Consistency Improves Chain of Thought Reasoning in Language Models", and Snell et al., "Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameters".
Training-time scaling spends more compute before deployment: more parameters, more data, longer training.
Test-time scaling spends more compute after the prompt arrives. In this page, that means sampling more complete candidate traces and scoring them with a verifier.
Here "search" means parallel best-of- over complete traces, not prefix expansion or tree search.
This page focuses on the smallest useful case: best-of- with a verifier. For one prompt, the model samples complete candidate traces. A verifier scores each trace. The system returns the highest-scoring sampled trace.
For this finite best-of- verifier setup, extra inference compute is useful only when two conditions are both true:
- the generator sometimes samples a good trace,
- the verifier tends to rank good traces above bad ones.
If the good trace is almost never sampled, extra compute may not be enough. If the verifier has a false-positive trap, more samples can make the system worse by making that trap more likely to appear. The honest question is not "does thinking longer help?" It is: for this prompt, generator, verifier, and cost model, is another sample worth buying?
02
Math
Translate the story into symbols, assumptions, and a derivation you can inspect.
For one prompt , let the base model define a finite distribution over complete candidate traces. Each trace has hidden task correctness and a verifier score:
Best-of- draws independent traces from and returns the sampled trace with the highest verifier score. Assume verifier scores are distinct and sort traces from lowest to highest verifier score, so :
To connect back to process reward models, a trace score might be an additive step score:
Treat this as a ranking score, not a calibrated probability of correctness. Sum-vs-mean aggregation, length normalization, and distribution shift can all change which traces receive high verifier score.
The expected selected verifier score is
Selected correctness and sampled-correct coverage can be very different. Sampling a correct trace is coverage. Returning it is selection. More samples can make rise while falls if the highest-scoring trace is a verifier error.
A simple cost model is
Here is only a teaching proxy for inference budget. Real serving cost also depends on generation length, verifier cost, batching, latency, and traffic volume.
03
Code
Keep the implementation aligned with the notation so the algorithm is legible.
This witness uses the same finite best-of- object as the demo. With a clean verifier, more samples improve selected correctness. With a noisy verifier, selected verifier score improves while true correctness eventually falls.
def selected_distribution(candidates, n):
ranked = sorted(candidates, key=lambda item: item["score"])
cumulative = 0.0
selected = {}
for item in ranked:
p = item["prior"]
next_cumulative = cumulative + p
selected[item["id"]] = next_cumulative ** n - cumulative ** n
cumulative = next_cumulative
return selected
def expected(candidates, selected, key):
return sum(selected[item["id"]] * item[key] for item in candidates)
def scored(candidates, mode):
return [{**item, "score": item[f"{mode}_score"]} for item in candidates]
def expected_accuracy(candidates, n, mode):
rows = scored(candidates, mode)
return expected(rows, selected_distribution(rows, n), "correct")
def expected_score(candidates, n, mode):
rows = scored(candidates, mode)
return expected(rows, selected_distribution(rows, n), "score")
candidates = [
{"id": "common_wrong", "prior": 0.50, "correct": 0, "clean_score": -2.0, "noisy_score": -2.0},
{"id": "plausible_slip", "prior": 0.25, "correct": 0, "clean_score": -0.3, "noisy_score": -0.3},
{"id": "clean_correct", "prior": 0.18, "correct": 1, "clean_score": 1.8, "noisy_score": 1.8},
{"id": "rare_exploit", "prior": 0.07, "correct": 0, "clean_score": 0.2, "noisy_score": 2.6},
]
clean_1 = expected_accuracy(candidates, 1, "clean")
clean_32 = expected_accuracy(candidates, 32, "clean")
noisy_1 = expected_accuracy(candidates, 1, "noisy")
noisy_64 = expected_accuracy(candidates, 64, "noisy")
assert clean_32 > clean_1
assert noisy_64 < noisy_1
assert expected_score(candidates, 64, "noisy") > expected_score(candidates, 1, "noisy")
print(round(clean_32, 3), round(noisy_64, 3))
04
Interactive Demo
Use direct manipulation to connect the explanation to a moving system.
Use the demo to compare a clean verifier against a noisy verifier on the same four traces. Increase to spend more inference compute. Watch the gap between "sampled at least one correct trace" and "selected a correct trace"; that gap is where verifier quality matters.
Live Concept Demo
Explore Test-Time Compute: Spending Inference Budget on Search
The stage is code-native and interactive. Use it to test the explanation against the mechanism.
Manipulate one control and predict the visible change.
Commit to what Test-Time Compute: Spending Inference Budget on Search should make visible before reading the result.
After The First Pass
Turn the concept into an inspected object.
Once the invariant is visible in the intuition, math, code, and demo, use these panels to inspect the mechanism visually, check source support, practice the idea, and attach a grounded research question.
Mechanism Storyboard
See the idea move before the page explains it
Test-time compute spends extra inference budget on sampling, verification, and selection; it helps when the generator can produce good candidates and the verifier ranks them reliably.

Start with the picture, metaphor, or geometric mechanism.
Before reading further, choose the kind of change Test-Time Compute: Spending Inference Budget on Search should make visible.
Visual Inquiry
Make the image answer a mathematical question
Test-time compute spends extra inference budget on sampling, verification, and selection; it helps when the generator can produce good candidates and the verifier ranks them reliably.
Which visible object should carry the first intuition?
Pick the cue that should make Test-Time Compute: Spending Inference Budget on Search easier to reason about before the page gives the answer.
Source Grounding
Canonical references for the mechanism on this page.
Grounds repeated sampling and answer aggregation as a simple way to spend more inference compute.
Open sourceGrounds process-supervised reward models as learned verifiers evaluated by best-of-N selection over sampled reasoning solutions.
Open sourceGrounds the scaling question of when extra inference budget beats larger base models.
Open sourceClaim Review
Test-time compute spends extra inference budget on sampling, verification, and selection; it helps when the generator can produce good candidates and the verifier ranks them reliably.
Source IDs and witness objects are attached for review; they are not proof by themselves.
wang-2022-self-consistency, lightman-2023-verify-step-by-step, snell-2024-test-time-compute
Use equation, code, and demo objects to check whether the source support is operational.
Wang et al. ground drawing multiple reasoning paths and aggregating answers. Lightman et al. evaluate reward models by best-of-N search: select the sampled solution ranked highest by the reward model. Snell et al. analyze test-time compute via best-of-N and verifier/PRM search. The local math/code/demo show coverage vs verifier selection and noisy-verifier failure.
Sources: Self-Consistency Improves Chain of Thought Reasoning in Language Models, Let's Verify Step by Step, Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model ParametersThis checks a finite, fixed-distribution best-of-N verifier model, not tree search, adaptive reasoning policies, universal scaling laws, exact serving costs, calibrated verifier probabilities, or guaranteed gains from more inference compute.Attached source IDs and witness refs are review targets, not proof.Source support candidates
paper 2022Self-Consistency Improves Chain of Thought Reasoning in Language ModelsGrounds repeated sampling and answer aggregation as a simple way to spend more inference compute.
paper 2023Let's Verify Step by StepGrounds process-supervised reward models as learned verifiers evaluated by best-of-N selection over sampled reasoning solutions.
paper 2024Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model ParametersGrounds the scaling question of when extra inference budget beats larger base models.
Practice Loop
Try the idea before it explains itself
Test-time compute spends extra inference budget on sampling, verification, and selection; it helps when the generator can produce good candidates and the verifier ranks them reliably.
Before touching the demo, predict one visible change that should happen in Test-Time Compute: Spending Inference Budget on Search.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
A concrete answer is on the canvas.
The answer names why the claim should hold.
It touches the page context or a neighboring idea.
Research Room
Attach the question to an exact object
Pick the concept, equation, source, code witness, claim, misconception, or demo state before asking for help. The handoff stays grounded to that object.Open the draft below to save one note and next action in this browser.
Test-Time Compute: Spending Inference Budget on Search
What is the smallest example that makes Test-Time Compute: Spending Inference Budget on Search click without losing the math?
Local action draftNo local draft saved yetExpand only when ready to capture one local next action
This draft stays locally in this browser for concept:scaling/test-time-compute.
- Source ids to inspect: wang-2022-self-consistency, lightman-2023-verify-step-by-step, snell-2024-test-time-compute
- Definition, prerequisite, and contrast concept links
- The equation or code witness that makes the concept operational
- One demo state that shows the invariant instead of a slogan
- The learner can state the mechanism in their own words
- The learner can name the prerequisite that would repair confusion
- The learner can predict how the mechanism changes under one perturbation
I am working in Continuous Function's research reading room. Object: concept - Test-Time Compute: Spending Inference Budget on Search Object key: concept:scaling/test-time-compute Context: Scaling Anchor id: concept/concept-notebook/scaling/test-time-compute Open question: What is the smallest example that makes Test-Time Compute: Spending Inference Budget on Search click without losing the math? Evidence to inspect: - Source ids to inspect: wang-2022-self-consistency, lightman-2023-verify-step-by-step, snell-2024-test-time-compute - Definition, prerequisite, and contrast concept links - The equation or code witness that makes the concept operational - One demo state that shows the invariant instead of a slogan What would resolve this: - The learner can state the mechanism in their own words - The learner can name the prerequisite that would repair confusion - The learner can predict how the mechanism changes under one perturbation Answer as a careful research tutor: stay source-grounded, separate verified evidence from assumptions, name the relevant math objects, and end with one next action.
concept/concept-notebook/scaling/test-time-compute
concept:scaling/test-time-compute