Command Palette
Search for a command to run...
Test-Time Scaling via Error Localization
Test-Time Scaling via Error Localization
Rajiv Shailesh Chitale Rahul Madhavan Taneesh Gupta Deepanway Ghosal Aravindan Raghuveer
Abstract
Scaling inference-time computation has emerged as a reliable method to improve the performance of large language models on complex reasoning and programming tasks. However, standard approaches such as independent sampling and sequential multi-turn refinement operate without tokenlevel credit assignment, resulting in computational inefficiency, since valid reasoning prefixes are frequently discarded. In this work, we introduce Test-Time Scaling via Error Localization (TTEL), an inference-time algorithm that utilizes fixed or environment feedback to perform token-level error localization. By comparing conditional probabilities under informed feedback against a null-context baseline, TTEL isolates the step at which an error occurred. The algorithm then truncates the trajectory and branches a new generation, maximally reusing the valid prefix. Extensive evaluations demonstrate that TTEL establishes strictly dominating Pareto frontiers across sequential reasoning domains, measured by pass-at-k vs. generatedtoken cost. With Qwen3-8B on LiveCodeBench, TTEL attains a pass@64 of 71.0% while generating approximately half as many tokens as independent sampling (360.4k vs. 735.0k). Generalizing to math benchmarks AIME-2025 and HMMT-2025, TTEL cleanly outperforms competing test-time baselines across both Qwen3-8B and Qwen3-4B-Thinking-2507.
One-sentence Summary
Google DeepMind proposes Test-Time Scaling via Error Localization (TTEL), an inference-time algorithm that performs token-level error localization by comparing conditional probabilities under informed feedback against a null-context baseline to isolate errors, truncate trajectories, and branch new generations while maximally reusing valid prefixes, thereby establishing dominating Pareto frontiers on sequential reasoning benchmarks including LiveCodeBench, AIME-2025, and HMMT-2025 with models such as Qwen3-8B, where it achieves a pass@64 of 71.0% while generating approximately half as many tokens as independent sampling.
Key Contributions
- TTEL performs token-level error localization by comparing conditional probabilities under informed feedback against a null-context baseline, isolating the step at which an error occurred.
- By truncating and branching only the faulty suffix, TTEL maximizes reuse of valid reasoning prefixes and eliminates redundant exploration.
- On LiveCodeBench, TTEL with Qwen3-8B attains pass@64 of 71.0% at roughly half the token cost of independent sampling, and it cleanly outperforms competing test-time baselines on AIME-2025 and HMMT-2025 with both Qwen3-8B and Qwen3-4B-Thinking-2507.
Introduction
Scaling inference-time compute improves large language model performance on complex reasoning tasks, but the dominant best-of-K strategy is inefficient: it generates independent samples without learning from prior failures, leading to redundant exploration. Sequential refinement attempts to use environmental feedback, yet models often repeat errors or fail to pinpoint where reasoning diverged. The core problem is that feedback is trajectory-conditional, informative about a specific failed path, but existing methods treat it as a global revision signal or rely on coarse, heuristic-driven search that lacks fine-grained error localization.
The authors propose TTEL, an inference-time search algorithm that performs token-level credit assignment without gradient updates. When a solution fails, TTEL uses prompt log-probability contrasts between informed and non-diagnostic feedback to identify positions of maximal disagreement, localizing the highest-confidence error. It then truncates the reasoning trace at that point and branches a new generation from the retained valid prefix. This feedback-guided tree search reuses correct reasoning segments and directs computation toward correcting specific mistakes, achieving substantially higher token efficiency than standard sampling across competitive programming and mathematical reasoning benchmarks.
Method
The authors propose TTEL, a token-level test-time search algorithm that operates on a single pre-trained language model serving as both generator and evaluator. The core idea is to repurpose the token-level divergence signal used in self-distillation training, not for weight updates, but to dynamically prune and branch an inference-time search tree. The method proceeds in two stages: detecting and filtering token-level error signals, and using those signals to guide a branching strategy over candidate solutions.
In the first stage, spike detection and filtering, the model generates a candidate trajectory under standard autoregressive decoding and records the student token probabilities. The same trajectory is then re-scored in a feedback-augmented context to obtain teacher token probabilities, where the feedback typically contains environment-derived information such as compiler errors or failing test cases. A raw feedback-conditioned spike is defined as the difference between the student and teacher probabilities at each token position. A large positive spike indicates that, after observing the feedback, the model assigns substantially lower probability to its original token choice.
However, raw spikes can conflate genuine semantic re-evaluation with generic probability shifts caused by appending any text to the context window. To isolate feedback-specific disagreement, the authors introduce a null feedback string containing a non-diagnostic instruction. The same trajectory is re-scored under this null feedback to compute baseline token probabilities and a corresponding baseline spike. The filtered spike score is then defined as the difference between the raw spike and the baseline spike, effectively subtracting out context-induced shifts that also arise under non-diagnostic feedback. Token positions are retained only if the teacher spike exceeds a threshold while the null-feedback spike remains below a separate threshold, yielding a localized error set that captures positions where the model exhibits feedback-specific disagreement.
In the second stage, search and branching, the algorithm selects the branch point as the token with the strongest filtered spike score within the localized error set. The search tree truncates the failed trajectory at one position before this branch point and launches a new generation from the retained prefix. This mechanism reuses the portion of the trajectory that precedes the strongest localized error signal, rather than discarding the full generation. When the localized error set is empty, indicating that the available feedback does not localize any actionable token-level error, the algorithm performs a restart from the original prompt.
The full TTEL procedure maintains a search tree whose root corresponds to the empty prefix. At each iteration, a leaf prefix is selected and a full candidate continuation is generated. The execution environment returns feedback for re-scoring and subsequent regeneration. Spike detection proceeds by re-scoring under both the actual feedback and the null feedback, constructing the localized error set from token positions whose probability drops sharply under true feedback but not under null feedback. If the set is nonempty, the branch point with maximum filtered spike score is selected and the retained prefix is added to the tree for subsequent generation. Otherwise, the empty prefix is added back to encourage continued exploration. The procedure repeats until an inference-time budget is exhausted, and the generated candidate set is returned for evaluation.
A theoretical analysis formalizes the branching advantage over standard sequential restart. Under an autoregressive prefix consistency assumption, the success rate of branching equals the success rate of restart conditioned on recovering the anchor prefix. The theorem shows that branching strictly improves over restart as long as success is more likely once the correct prefix is reached, because a restart strategy may never naturally return to the necessary intermediate state, rendering trajectory-conditional feedback useless.
Experiment
The experimental framework evaluates TTEL on multi-step mathematical reasoning and code generation benchmarks, comparing it against independent sampling, multi-turn refinement, and recursive self-aggregation baselines. TTEL establishes a strictly dominating compute-optimal Pareto frontier, achieving higher pass@k rates with significantly lower token consumption by branching from retained prefixes and avoiding redundant regeneration. Ablation studies reveal that retaining the full reasoning trace and incorporating explicit environment feedback are critical for precise error localization, while the null-feedback baseline filter is strictly necessary to isolate genuine error-driven corrections from context-induced probability shifts. Overall, TTEL operates as a domain-agnostic test-time scaling method that maximally reuses valid reasoning prefixes to improve both efficiency and accuracy.