Test-Time Compute & Reasoning Scaling

Test-Time Compute & Reasoning Scaling

For the first five years of the foundation model era, scaling laws focused almost exclusively on pre-training FLOPs (): to make a model smarter, researchers trained larger parameter matrices on larger token corpora while keeping inference computation fixed at a single greedy forward pass per output token.

However, a single forward pass through an -layer Transformer has a fixed computational circuit depth . Problems in theorem proving, competitive programming, and multi-hop planning require compositional search depths that exceed any fixed-depth feedforward circuit. Modern reasoning models (OpenAI o1/o3, DeepSeek-R1, Qwen-QwQ) unlock a second orthogonal scaling axis—Test-Time Compute Scaling—by dynamically allocating serial reasoning tokens and parallel tree expansions during inference.

Reasoning / Search OperatorVerification GranularityRole in Test-Time Compute Scaling
Latent Chain-of-Thought Marginalization: Expands intermediate reasoning steps before emitting final answer , trading serial token FLOPs for circuit depth.
Stepwise PRMProcess Reward Model (PRM, Lightman et al. 2023): Scores every deduction step individually, localizing the exact step where a logical fallacy occurs.
Predictor Upper Confidence Bound for Trees: Balances empirical rollout value against policy prior during tree search over reasoning steps.
Verifiable RLVRReinforcement Learning with Verifiable Rewards (RLVR): Optimizes long CoT policies directly against deterministic math/compiler verifiers without human step labels.

Test-Time Compute Topologies: PRM-Guided Tree Search vs. RLVR Autonomous Self-Correction

A. PRM-Guided Stepwise Tree SearchProblem Prompt xStep s1(a): PRM = 0.94Expand Subtree (High Q)Step s1(b): PRM = 0.12Pruned Early (Sign Error)s2(a): 0.41Backtracks2(b): PRM = 0.97 → y*Verified Proof LeafB. RLVR Linearized Self-Reflection Trace<think> Try substitution u = x2+ 1 → du = 2x dx...Emergent Self-Verification & Backtracking"Wait — boundary at x=0 violates domain! Re-evaluating..."Switch to trigonometric substitution </think> → y*Deterministic Verifier Reward R(x, y*) = +1.0
Figure 1 (External vs. Internalized Search): (A) Process Reward Models (PRMs) guide explicit MCTS/beam search by pruning flawed intermediate branches early. (B) Models trained via Reinforcement Learning with Verifiable Rewards (RLVR, e.g., DeepSeek-R1) internalize tree search into a single autoregressive reasoning stream, spontaneously learning to verify hypotheses and backtrack inside blocks.

1. Latent Chain-of-Thought & Serial Circuit Depth

Given a complex problem and target answer , a standard autoregressive model attempts to approximate in sequential matrix layers. Chain-of-Thought (CoT) introduces a variable-length sequence of intermediate reasoning tokens before emitting , marginalizing over latent deduction trajectories:

From a circuit complexity perspective (Feng et al. 2023; Merrill & Sabharwal 2024), a constant-depth Transformer restricted to direct output generation lies within the weak parallel complexity class and cannot solve inherently sequential problems such as boolean formula evaluation, permutation composition, or dynamic programming of length . By writing intermediate states back into the context window and attending over them at step , an autoregressive model with reasoning tokens expands its effective sequential circuit depth from to —achieving Turing completeness polynomially bounded by test-time token budget .


2. Parallel Verification: Majority Voting, ORMs, and PRMs

When we scale test-time compute in parallel by sampling candidate reasoning trajectories at temperature , how do we select the correct final answer ?

1. Self-Consistency Majority Voting (Unweighted Mode)

Wang et al. (2023) marginalize over the sampled reasoning chains by taking the empirical plurality vote over their extracted final answers :

Failure Mode: Majority voting succeeds only when the correct answer is the unique mode of the model’s answer distribution. On hard Olympiad problems where the model’s true pass rate is and a common algebraic trap attracts of rollouts, increasing causes Majority Voting to converge with certainty to the wrong answer.

2. Outcome Reward Models (ORM) vs. Process Reward Models (PRM)

Instead of unweighted voting, a learned verifier scores candidate trajectories:

  • Outcome Reward Model (ORM): Assigns a single scalar score to the complete trajectory based solely on whether the final answer is correct.
  • Process Reward Model (PRM, Lightman et al. 2023): Decomposes a reasoning trace into discrete deduction steps and predicts the probability that each step is logically valid given the prefix , aggregating across the chain via the product or minimum rule:

Because a PRM localizes the exact step where a sign error or hallucinated lemma occurs, it solves the credit assignment bottleneck and guides stepwise Beam Search or Monte Carlo Tree Search (MCTS) via the PUCT selection rule:

Test-Time Compute Scaling Simulator: Majority Voting vs. ORM vs. PRM Tree Search

Adjust the inference budget (parallel rollouts / search expansions) and problem difficulty to compare how Self-Consistency Majority Voting, Outcome Reward Models (Best-of-), and Process-Guided Search scale accuracy.

Test-Time Budget (N): 16 Rollouts
Zero-Shot Pass@1: 25%
0%25%50%75%100%N=1N=2N=4N=8N=16N=32N=64Test-Time Compute Budget N (Log Scale)PRM Stepwise Tree SearchORM Best-of-N RerankingMajority Voting (Self-Consistency)Accuracy at Budget NMajority Vote (SC@N):48.2%ORM Best-of-N:61.4%Compute Multiplier:16× FLOPsPRM Tree Search:75.8%Gain vs. Zero-Shot:+50.8%Equivalent to 10× Larger Base
Log-Linear Inference Scaling
log₂(N): Base p₀:

3. Worked Numerical Walkthrough: ORM False-Positive Trap vs. PRM Pruning

Consider a -step mathematical derivation where the model generates two competing candidate proofs and :

  • Candidate A (Flawed Proof, Lucky Cancellation): Step is valid (), Step divides by zero (), and Step guesses a plausible-looking integer answer ().
  • Candidate B (Rigorous Proof): Step (), Step (), and Step () are all algebraically sound.

Let us compare how an ORM vs. a PRM ranks the two trajectories:

  1. ORM Evaluation: Because Candidate A ends with a confident, well-formatted boxed integer that superficially matches training distribution heuristics, an imperfect ORM assigns , selecting the flawed proof.
  2. PRM Product & Minimum Evaluation: By penalizing the single invalid transition at (), the PRM rejects the lucky hallucination by an margin.

Concrete PUCT Tree Expansion Step

Suppose at node , the MCTS tree has visited parent a total of times () with exploration constant :

  • Branch (Exploited path): , prior , visit count .
  • Branch (Under-explored promising path): , prior , visit count . PUCT selects Branch (), systematically balancing PRM value estimates against policy exploration.

4. Reinforcement Learning with Verifiable Rewards (RLVR & DeepSeek-R1)

Training separate PRMs and running external MCTS trees at inference time introduces massive serving complexity. DeepSeek-R1 (DeepSeek-AI, 2025) and OpenAI o1 demonstrated that a model can internalize tree search into a single linear autoregressive stream using pure Reinforcement Learning with Verifiable Rewards (RLVR).

Using Group Relative Policy Optimization (GRPO), for each math or code problem , we sample a group of full reasoning-and-answer trajectories and score each output using a deterministic rule-based verifier (exact symbolic math match or unit-test compilation), with zero neural reward model to hack:

where and .

Emergent Reasoning Behaviors (“The Aha Moment”)

Without any supervised demonstrations of how to backtrack, RLVR optimization spontaneously discovers that trajectories containing in-context verification, hypothesis testing, and self-correction achieve higher expected reward . As training progresses, average <think> length scales from hundreds to tens of thousands of tokens, effectively compiling an MCTS search tree into a linearized stream of natural language thoughts.


5. Latent Continuous Reasoning (Coconut)

Must a model verbalize every intermediate reasoning step as a discrete English word in ? Most words in a natural language CoT trace are syntactic glue rather than high-entropy logical decisions. Coconut (Chain of Continuous Thought, Hao et al. 2024) replaces discrete token decoding inside the <think> block by feeding the model’s last-layer continuous hidden state directly back as the next input embedding .

Because a continuous vector can represent a superposition of multiple candidate search branches simultaneously, latent continuous reasoning performs breadth-first graph exploration in a fraction of the serial steps required by discrete vocabulary tokens.


Key Papers & References