← Back to list

Test-Time Scaling Part 2: The Verification Revolution

From Generating Answers to Validating Reasoning

Nilanshu Twinkle · 2026-01-15 17:18 · 0 claps · 8.4 min read
#test-time-scaling #llmops #scaling #causal-inference #optimization
Open on Medium ↗
Wiki topics: LLM · Large Language Models OPS · LLMOps & Inference 💑 · Relationships

Test-Time Scaling Part 2: The Verification Revolution

From Generating Answers to Validating Reasoning

Recap: Building on the Foundation

In Part 1, we established that test-time scaling fundamentally changes how LLMs solve problems — by allocating more compute during inference rather than during training. We explored:

  • The mechanics: How LLMs generate multiple reasoning steps through token-by-token autoregressive generation, temperature-based sampling, and tree exploration
  • Foundational techniques: Chain-of-Thought prompting (2–3x compute), Self-Consistency with majority voting (10–20x), and Tree of Thoughts with backtracking (10–100x)
  • Scaling laws: Performance improves predictably with test-time compute, following power laws with diminishing returns

The limitation: These early methods generated diverse reasoning paths but lacked a crucial capability — verification. They could produce many answers but couldn’t reliably distinguish good reasoning from bad.

This leads us to 2023–2024’s breakthrough: models learning to verify and improve their own reasoning.

The Verification Revolution (2023–2024)

The Core Problem: Generation vs Verification

Observation from Lightman et al. (OpenAI, 2023):

“Finding bugs in code is easier than writing correct code. Similarly, verifying mathematical proofs is easier than discovering them.”

Generate → Verify → Correct (Repeat)

Generate → Verify → Correct (Repeat)

This generation-verification gap has been known in computer science for decades:

  • P vs NP: Verification is often easier than generation
  • Automated theorem proving: Checking proofs is of polynomial complexity, finding them is exponential complexity.
  • Code debugging: Finding the bug (verification) < Writing bug-free code (generation)

The insight: LLMs could be trained specifically to verify reasoning quality, creating better signals for search algorithms.

Process Supervision: Fine-Grained Verification

Paper: “Let’s Verify Step by Step: Improving Mathematical Reasoning with Process Supervision” (Lightman et al., OpenAI, May 2023)

Outcome Supervision vs Process Supervision

Traditional training used outcome supervision:

Problem: "John has 5 apples, buys 3 more. How many total?"
Good reasoning: "5 + 3 = 8" → Correct answer (8) → Reward = +1
Bad reasoning: "5 - 3 = 2" → Wrong answer (2) → Reward = -1

Problem: The model only learns whether the final answer is right, not whether the reasoning is valid.

Process supervision improves this:

Problem: Same as above
Reasoning step 1: "John starts with 5 apples"
  → Correct interpretation → Reward = +1

Reasoning step 2: "He buys 3 more, so we add: 5 + 3"
  → Correct operation → Reward = +1

Reasoning step 3: "5 + 3 = 8"
  → Correct arithmetic → Reward = +1

Final answer: "8 apples"
  → Correct conclusion → Reward = +1
Cumulative reward: +4

Alternative bad reasoning:

Reasoning step 1: "John starts with 5 apples"
  → Correct → Reward = +1

Reasoning step 2: "He buys 3 more, so we subtract: 5 - 3"
  → WRONG operation (should be addition) → Reward = -1

Reasoning step 3: "5 - 3 = 2"
  → Arithmetic correct but wrong operation → Reward = +0.5

Final answer: "2 apples"
  → Wrong conclusion → Reward = -1
Cumulative reward: -0.5

Key advantage: The model learns to identify where reasoning goes wrong, not just that it failed.

Results on MATH Benchmark

Observation: With the same 100 samples, process supervision achieves 50% higher accuracy than outcome supervision.

Why: Process-supervised models can:

  1. Detect flawed reasoning early (before wrong answers)
  2. Prune bad reasoning paths mid-generation
  3. Focus search on promising reasoning strategies

Self-Verification Loops: Iterative Refinement

Paper: “Self-Verification Improves Few-Shot Clinical Information Extraction” (Gero et al., Stanford, 2023)

The Mechanism

Instead of generating once, create a verify-and-refine loop:

def self_verification(problem, model, max_iterations=3):
    answer = model.generate(problem)

    for iteration in range(max_iterations):
        # Generate verification/critique
        critique = model.verify(problem, answer)

        if critique.is_correct():
            return answer

        # Refine based on critique
        answer = model.refine(problem, answer, critique)

    return answer  # Return best after max iterations

Example: Math Problem Self-Verification

Problem: “A train travels 120 km in 2 hours. What is its average speed?”

Iteration 1 (Generation):

Answer: "60 km/h"
Reasoning: "120 km ÷ 2 hours = 60 km/h"

Verification:

Critique: "This is correct. 120 ÷ 2 = 60. ✓"
Status: ACCEPT

Alternative scenario (with error):

Iteration 1 (Generation with error):

Answer: "240 km/h"
Reasoning: "120 km × 2 hours = 240 km/h"

Verification:

Critique: "This is WRONG. Speed = distance ÷ time, not distance × time. ✗"
Status: REJECT

Iteration 2 (Refinement):

Answer: "60 km/h"
Reasoning: "Using speed = distance ÷ time: 120 km ÷ 2 hours = 60 km/h"

Verification:

Critique: "Now correct. ✓"
Status: ACCEPT

Quantitative Results

Cost: Typically 2–4x compute (1 generation + 1–3 verification/refinement cycles).

When it works best: Tasks with objective verification criteria (math, code, logic puzzles).

Monte Carlo Tree Search: Strategic Exploration

Paper: “Accessing GPT-4 Level Mathematical Olympiad Solutions via Monte Carlo Tree Search” (Zhang et al., DeepMind, 2024)

Why MCTS for LLM Reasoning?

MCTS (originally from AlphaGo) treats reasoning as a game tree:

  • Nodes: Partial reasoning states
  • Edges: Reasoning steps (LLM generations)
  • Goal: Find path from root (problem) to leaf (correct answer)

The MCTS Algorithm for Reasoning

1. Selection: Starting from root, pick most promising node using UCB1
   UCB1 = value(node) + C × sqrt(log(N_parent) / N_node)

2. Expansion: Generate k new reasoning steps from selected node
   (k LLM forward passes)

3. Simulation: Complete reasoning from new node to answer
   (1 LLM forward pass)

4. Backpropagation: Update value estimates of all ancestors
   (using outcome or process supervision)

Repeat 1000-10,000 times, then select best path.

Example: Solving “Game of 24”

Problem: Use 4 numbers (4, 6, 8, 8) with +, -, ×, ÷ to make 24.

Tree exploration:

Root: (4, 6, 8, 8) → Target: 24
Expansion 1:
  ├─ (10, 8, 8)  [4+6]  → Value: 0.2 (seems unpromising)
  ├─ (2, 8, 8)   [6-4]  → Value: 0.1 (low value)
  └─ (24, 8, 8)  [4×6]  → Value: 0.8 (promising! 24 found early)
Select most promising: (24, 8, 8)
Expansion 2 from (24, 8, 8):
  ├─ (32, 8)     [24+8]  → Value: 0.3 (moved away from 24)
  ├─ (16, 8)     [24-8]  → Value: 0.2
  ├─ (192, 8)    [24×8]  → Value: 0.1
  └─ (3, 8)      [24÷8]  → Value: 0.9 (3×8=24 is one step away!)
Select: (3, 8)
Expansion 3 from (3, 8):
  └─ (24)        [3×8]   → SOLUTION FOUND! ✓
Final reasoning path: 
  "First, 4 × 6 = 24. Then 24 ÷ 8 = 3. Finally, 3 × 8 = 24."

Quantitative Results

Key insight: MCTS dramatically outperforms ToT by:

  1. Adaptive exploration: Focuses compute on promising paths (UCB1 balancing exploration/exploitation)
  2. Value learning: Gets better at estimating promising reasoning steps over iterations
  3. Systematic search: Doesn’t get stuck in local optima like greedy ToT

Cost: Very expensive (100–1000x), but achieves near-expert performance on extremely hard problems.

The Modern Era: Production Systems (Late 2024–2025)

Open-AI o1: The First Production Test-Time Scaling Model

Released: September 2024 (preview), December 2024 (full)

Key innovation: Integrated test-time scaling directly into the model architecture, trained with reinforcement learning to optimize reasoning chains.

Observation: o1 reaches expert-level performance on many specialized domains by thinking longer (10–60 seconds per problem vs <1 second for GPT-4).

How o1 differs:

  • Trained for reasoning: RL-optimized to generate high-quality reasoning chains.
  • Adaptive compute: Automatically allocates more compute to harder problems.
  • Hidden reasoning: Shows “thinking” steps to user but can have internal scratch work.

DeepSeek-R1: Open-Source Test-Time Scaling

Released: January 2025

Significance: First open-source model competitive with o1, proving test-time scaling isn’t limited to proprietary models.

Key contributions:

  1. Distillation: Trained smaller models (7B, 14B) that use test-time compute efficiently
  2. Efficient search: Optimized MCTS implementation using process supervision
  3. Open research: Released training code, data, and ablations

Impact: Democratizes test-time scaling — anyone can run DeepSeek-R1 locally or fine-tune for specialized domains.

Gemini 2.0 Thinking Mode: Multimodal Test-Time Scaling

Released: December 2024

Innovation: Extended test-time scaling to multimodal reasoning (text + images + code).

Example: Solving geometry problems with diagrams

Input: [Image of triangle with sides labeled, angle marked]
Question: "Find the area of this triangle."
Gemini Thinking Mode:
  Step 1: "I can see the triangle has base = 8 cm, height = 6 cm marked."
  Step 2: "Area formula: A = (1/2) × base × height"
  Step 3: "Calculating: (1/2) × 8 × 6 = 24 cm²"
  Verification: "This matches the expected proportions in the image. ✓"

  Answer: "24 cm²"

Latency: 5–30 seconds (vs instant for standard Gemini), but accuracy improvement is substantial.

Emerging Techniques: Pushing the Boundaries

Best-of-N Sampling with Learned Verifiers

Concept: Train a separate verifier model (often smaller than generator) to score reasoning quality. The verifier model depends on the type of problem (and the corresponding verification type), for example for a coding problem a verifier specialized in generating unit tests for the problem will be chosen, for a mathematical problem a verifier which can find the mathematical proof will be chosen.

def best_of_n(problem, generator, verifier, N=20):
    # Generate N candidate solutions
    candidates = [generator.generate(problem) for _ in range(N)]

    # Score each with verifier
    scores = [verifier.score(problem, candidate) for candidate in candidates]

    # Return highest-scoring candidate
    best_idx = argmax(scores)
    return candidates[best_idx]

Results (from Cobbe et al., OpenAI 2021 + recent work):

Optimal N: Depends on problem value and verifier quality. Production systems typically use N=5–20.

Recursive Refinement Loops

Combine generation, verification, and refinement in a loop:

1. Generate initial solution
2. Self-critique (find flaws)
3. Refine based on critique
4. Repeat steps 2-3 until convergence or max iterations

Example: Code generation with iterative debugging

Iteration 1: Generate buggy code Iteration 2: Run tests, identify failures Iteration 3: Fix bugs based on test output Iteration 4: Run tests again, verify correctness

Cost: 3–10x compute, but achieves high correctness on code tasks (75–85% pass@1 on HumanEval with refinement vs 48% without).

Conclusion: The Verification Era Delivers Production Value

In this second article, we witnessed the transition from research novelty to production-ready systems:

What we learned:

  1. Process supervision (verifying reasoning steps, not just final answers) unlocked 50% accuracy gains by teaching models to identify where reasoning fails
  2. Self-verification loops enabled iterative refinement, achieving 30–60% improvements on objective tasks with only 2–4x compute
  3. Monte Carlo Tree Search brought strategic planning to LLM reasoning, reaching 80%+ on competition math problems that stumped earlier methods
  4. Production systems (o1, DeepSeek-R1, Gemini Thinking) proved test-time scaling works at scale — achieving expert-level performance on specialized domains
  5. Emerging techniques (learned verifiers, recursive refinement) continue to push boundaries, making test-time scaling more efficient and effective

The paradigm shift: From “generate diverse answers and vote” to “generate, verify, refine, and search strategically.” Models now have feedback loops and self-improvement capabilities during inference.

What’s next: In Part 3, we’ll explore the practical applications of test-time scaling across domains (medicine, law, coding, science), the current challenges and limitations (cost, latency, reliability), and the future directions including test-time scaling with tool use, multimodal reasoning, and the emerging research on optimal compute allocation strategies. We’ll also examine the broader societal implications as AI systems become capable of expert-level reasoning on-demand.

Continue to Part 3: Applications, Challenges, and the Future

References

  1. Lightman et al., “Let’s Verify Step by Step,” OpenAI, May 2023
  2. Gero et al., “Self-Verification Improves Few-Shot Clinical Information Extraction,” Stanford, 2023
  3. Zhang et al., “Accessing GPT-4 Level Mathematical Olympiad Solutions via Monte Carlo Tree Search,” DeepMind, 2024
  4. OpenAI, “Learning to Reason with LLMs” (o1 system card), September 2024
  5. DeepSeek, “DeepSeek-R1: Incentivizing Reasoning Capability in LLMs” (arXiv:2501.12948), January 2025

AI #TestTimeScaling #ProcessSupervision #MCTS #MachineLearning #o1 #DeepSeekR1 #Reasoning


메타데이터
post_id
cfb69882b3e5
slug
test-time-scaling-part-2-the-verification-revolution-cfb69882b3e5
url
https://medium.com/@nilanshut/test-time-scaling-part-2-the-verification-revolution-cfb69882b3e5
canonical_url
https://medium.com/@nilanshut/test-time-scaling-part-2-the-verification-revolution-cfb69882b3e5
author_url
https://medium.com/@nilanshut
status
ok
fetched_at
2026-06-26 03:39:16