Manuscript Offprint

arXiv:2610.19561

REWIND: Uncertainty-Guided Trajectory Repair for Test-Time Reasoning

Yi Ding, Mengyu Wang, Min Zhou, Menglin Yang

Abstract

An early mistake in the generated reasoning can constrain all subsequent reasoning. Repeated-generation methods, like MCMC-based approaches, attempt to improve output quality by sampling multiple generations, but their effectiveness can be limited by randomly selecting where to regenerate. On MATH500 with Qwen2.5-Math-7B, we find that incorrect responses have substantially higher mean token entropy than correct responses, with an average within-question relative increase of approximately 112%, suggesting that entropy can signal reasoning errors. Motivated by this finding, we introduce REWIND, a training-free controller that uses entropy dynamics to propose targeted suffix regenerations. Across three model families and five benchmarks, REWIND outperforms all baselines, with gains of 0.51–10.00 percentage points over the strongest baseline. These results demonstrate the effectiveness of targeted, uncertainty-guided trajectory repair across models and tasks. Our code is available at https://anonymous.4open.science/r/rewind-D310.

1 Introduction

Large language models (LLMs) can solve multi-step reasoning problems, but an early incorrect premise or calculation can constrain the rest of a generated solution (Wei et al., 2022; Dziri et al., 2023). To mitigate such issues caused by sequential decoding, explicit revision methods discard part of that context and give the model another opportunity to continue from an earlier prefix. However, the central question of revision is how to choose a useful cut point without a trained verifier or external feedback.

Recent works have proposed many different approaches to respond to this question. Iterative self-feedback and sampling-based refinement provide ways to revise a draft (Madaan et al., 2023; Karan and Du, 2025). MCMC-based Power Sampling chooses a random cut point to regenerate the suffix and then accepts or rejects the proposal using model likelihoods. Its cut-point policy is independent of local confidence and uncertainty. A cut after a mistaken premise retains it, whereas a cut far before it can replace substantial correct work. Since a filter acts only after re-generation, it can accept or reject a completed proposal but cannot guide the re-generation process itself. Therefore, revision-site selection becomes a practical bottleneck, motivating trajectory diagnostics that direct proposals toward candidate regions of instability.

Although continuation sampling is stochastic, its final acceptance is based on the generation statistics, since confidence and uncertainty statistics can contain information about downstream failure (Kadavath et al., 2022; Zhang et al., 2025). Motivated by this, there may exist signals during the generation process indicating potential re-generation points. Shannon entropy summarizes the full next-token distribution, capturing competition among alternatives, and can be measured from model logits without an additional verifier or reference answers (Shannon, 1948). We examine this signal through 20 ordinary Qwen2.5-Math-7B generations per MATH500 question. Among the 463 questions with both correct and incorrect responses under the original boxed-answer evaluator, we find that the mean token entropy of incorrect responses is approximately 112% higher than that of correct responses (Section 3.2). Moreover, on questions with fewer incorrect responses, those errors exhibit higher entropy, suggesting that entropy can identify mistakes that are more likely to be corrected through regeneration. This token-level generation-error association motivates uncertainty-conditioned revision.

Therefore, we propose REWIND (Reasoning Error Windback via INtrinsic Detection), a training-free, entropy-conditioned suffix-proposal controller. A high-entropy peak can occur after an earlier unstable choice has influenced later steps. The controller therefore searches immediately before the peak for the largest discrete entropy increase, and aligns the cut with a natural delimiter to regenerate the suffix. Then an MH-style score filter decides whether to retain the proposal. This makes the re-generation more targeted to cover the potential mistakes rather than random selection, which may miss critical errors.

REWIND consistently improves reasoning performance across three model families and five benchmarks, achieving the highest accuracy among the baselines. It yields gains of 0.51–10.00 percentage points, with the largest improvement on AIME2025 using DeepSeek-R1-Distill-Qwen-1.5B (DeepSeek-1.5B), from 16.67% to 26.67%. Controlled ablations show that entropy-gradient backtracking and boundary alignment both improve the performance. Further evaluations demonstrate that the improvements transfer to few-shot prompting and code generation and remain stable across random seeds. Together, these results establish REWIND as an effective approach to targeted test-time trajectory repair.

In summary, our contributions are as follows:

  1. An empirical entropy–correctness association. Through repeated generations on MATH500, we find a clear association between a question’s error frequency and the token entropy of its responses, indicating that entropy provides a useful signal of potential generation errors.

  2. A training-free trajectory-repair method. We introduce REWIND, which locates entropy-gradient spikes before uncertainty peaks, aligns revision points with natural delimiters, and filters regenerated suffixes using an MH-style score, without additional training or an external verifier.

  3. Comprehensive empirical evaluation. Experiments across three model families and five benchmarks show that REWIND achieves the best performance among all baselines, improving over random-proposal MCMC by 0.51–10.00 percentage points. Controlled ablations and evaluations on few-shot reasoning and code generation further support the method's design and its transfer across tasks.

References (15)