TL;DR
Test-Time Scaling via Error Localization (TTEL) is a novel inference-time algorithm that enables Large Language Models (LLMs) to pinpoint exactly where a reasoning chain went wrong without requiring any gradient updates. By comparing token probabilities under informed feedback against a null-context baseline, TTEL truncates the faulty suffix of a trajectory and branches a new generation, achieving state-of-the-art accuracy on math and coding tasks at a fraction of the computational cost.
What Problem Does This Paper Address?
Scaling computation at inference time (e.g., generating multiple answers and using voting or verifiers to pick the best one) has become a reliable way to boost LLM performance on complex tasks. However, current paradigms are computationally wasteful.
Standard "Best-of-K" independent sampling generates entirely separate trajectories from scratch, completely discarding valid reasoning prefixes if a single error occurs near the end of a long chain. On the other hand, "sequential refinement" methods pass error feedback back into the context window for a multi-turn retry, but models often struggle to identify the exact point of failure, leading to repeated logical errors and severe context bloat.
TTEL addresses this credit-assignment bottleneck by introducing a granular, token-level error localization mechanism that allows the model to reuse valid prefixes and branch out precisely where its logic diverged.
Methods
TTEL operates on a single pre-trained language model acting as both the generator and the evaluator of its own output, requiring no external reward models or parameter updates. The process follows four main steps:
- Rollout: The model generates a candidate solution trajectory under standard autoregressive decoding, and its token probabilities are recorded ("student probabilities").
- Teacher Re-scoring: If the solution fails, the model is prompted with environmental or generic feedback and re-scores the exact same token sequence ("teacher probabilities"). A sharp drop in a token's probability indicates that, given the feedback, the model strongly rejects its prior decision.
- Null-Baseline Filtering: Simply appending text to a prompt naturally shifts token probabilities due to context changes. To isolate genuine logical errors from generic context noise, TTEL introduces a non-diagnostic "null feedback" baseline (e.g., "Repeat the previous attempt word for word"). The baseline shift is subtracted from the raw probability drop to yield a clean, filtered error signal.
- Truncation and Branching: The algorithm identifies the token position with the highest filtered probability drop (the "maximal spike"), truncates the trajectory right before it, and launches a new generation from that retained, valid prefix. If no actionable spike is detected, it triggers a clean restart from scratch.
Datasets
The authors evaluated TTEL across two demanding domains requiring multi-step planning:
- LiveCodeBench (LCB) V6: A dataset consisting of 131 contest-style coding problems released between February and May 2025. This benchmark provides rich environment feedback, such as compiler errors, runtime errors, or failing public test cases.
- AIME-2025 & HMMT-2025: Highly challenging math competition datasets from the MathArena benchmark (30 problems each). These datasets do not provide intermediate execution feedback, allowing the authors to test TTEL using only generic failure notifications ("Your previous attempt was unsuccessful").
Key Insights and Ideas
- LLMs Natively Contain Error Detectors: The core "aha" moment is that an LLM's internal probability distribution shifts organically when exposed to post-hoc failure feedback. The model effectively "knows" where it messed up if given a hint; TTEL simply extracts this latent signal.
- Context Noise is a Real Threat: Probability drops alone are noisy. Without the null-baseline filtering step, context augmentation triggers massive false-positive error detections, which severely degrades search efficiency.
- Path-Specific Feedback Requires Path-Specific Branching: Feedback on a failed attempt is inherently conditional on that specific reasoning path. Restarting from scratch throws away this valuable context, whereas prefix-anchored branching exploits it perfectly.
Key Results
TTEL establishes a strictly dominating Pareto frontier across all evaluated sequential reasoning domains, delivering higher accuracy at significantly lower token costs.
- LiveCodeBench Efficiency: Using Qwen3-8B, TTEL achieved a pass@64 of 71.0%, cleanly outperforming independent sampling (64.6%) and sequential refinement (which stagnated at 56.7%). Remarkably, TTEL accomplished this while generating approximately half as many tokens as independent sampling (360.4k vs. 735.0k).
- Mathematical Generalization: On the execution-free AIME-2025 benchmark, TTEL generalized seamlessly using generic feedback, achieving a pass@16 of 81.7% with Qwen3-8B, outperforming all baselines.
Limitations and Future Work
- Hyperparameter Sensitivity: The algorithm relies on predefined thresholds ($\tau$ and $\tau_B$) to isolate error spikes. While robust in the paper's experiments, these thresholds might require tuning when adapting to different model families or highly distinct prompt formats.
- Dependence on Explicit Reasoning Traces: TTEL requires the model to generate a full thought trace or chain of thought. For models that do not externalize their intermediate reasoning steps into tokens, localizing errors using this method is not directly applicable.
- Future Integration with RL: The authors note that test-time scaling algorithms like TTEL are highly complementary to training-time reinforcement learning methods (such as those used in DeepSeek-R1 or Gemini 2.5). A promising future direction is combining RL-elicited backtracking behaviors with TTEL's explicit, token-level prefix-tree search.
Summary updated