Manuscript Offprint
arXiv:2610.19561REWIND: Uncertainty-Guided Trajectory Repair for Test-Time Reasoning
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:
-
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.
-
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.
-
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.
Uncertainty-guided control. Model-derived signals have been used to guide inference at different levels. At the token level, DoLa contrasts predictions across layers, while typical decoding constrains token information content (Chuang et al., 2024; Meister et al., 2023). At the response level, adaptive consistency uses uncertainty to allocate additional samples (Aggarwal et al., 2023), while semantic entropy quantifies uncertainty across semantically equivalent generations (Farquhar et al., 2024; Kuhn et al., 2023). At the search level, Entro-duction uses entropy and varentropy to decide whether to deepen, expand, or terminate reasoning exploration (Zhang et al., 2025).
Recent work connects token-level uncertainty with the branching of generation trajectories. Bigelow et al. (2025) identify forking tokens by resampling alternative continuations and examining their downstream outcomes. Wang et al. (2026) further associate high-entropy tokens with reasoning forks and exploit these positions to focus RLVR policy-gradient updates. At inference time, DeepConf (Fu et al., 2026) aggregates token confidence to filter or terminate reasoning traces. REWIND uses local uncertainty to guide repair within an existing response: entropy-gradient backtracking and boundary alignment select a cut point for suffix regeneration, without updating model parameters.
3 Preliminaries and Observations
We first review Power Sampling to establish the technical background. We then present an empirical study of token entropy across repeated reasoning generations, demonstrating its potential as a during-generation signal for detecting errors.
3.1 Power Sampling for LLMs
For a question q, an autoregressive LLM defines a distribution over responses y through
where includes the terminating token. Power Sampling (Karan and Du, 2025) favors higher-likelihood complete responses using
(2)
The normalization is over complete responses. Consequently, this target differs from applying temperature separately to each next-token distribution. Because is intractable, a Metropolis–Hastings (MH) update can use a proposal kernel and accept with probability
The unknown normalizer cancels. A random-suffix proposal chooses a cut point and autoregressively regenerates the continuation. Equation 3 gives the generic MH rule and Section 4 specifies our state-dependent proposal and implemented MH-style filter.
3.2 Empirical Entropy–Error Associations
To examine the relationship between token entropy and response correctness, we collect repeated generations for each MATH500 question. Let Q denote the set of 500 questions. For each , we sample responses from Qwen2.5-Math-7B. Let denote the -th response for question , its token length, and its correctness label under the original boxed-answer evaluator. Each response consists of a sequence of generated tokens, . For each position , we record the full-vocabulary next-token distribution before applying sampling transformations. Let V denote the vocabulary. The distribution and its entropy at position are defined as:
(4)
where is the generated prefix before position , and is empty when .
For , let denote the indices of responses in class , and let be the total number of tokens in that class for question . The mean entropy for class is
Thus, is the mean entropy pooled over all tokens from responses in class s for question q.
Paired relative increase. The paired set is
There are 463 paired questions. For each, define
The mean per-question relative increase is approximately 112% (median: 83.61%). Incorrect-response mean token entropy exceeds the correct-response mean on 88.12% of paired questions, with an increase of at least 70% on 55.51%.
Response-level diagnostics. To complement the within-question analysis, we test whether entropy summaries of individual responses can distinguish incorrect from correct answers. For each nonempty response, we compute its peak token entropy, its largest adjacent-token entropy increase, and its mean token entropy. Table 1 reports the average value of each statistic for correct and incorrect responses, along with its AUROC for ranking incorrect responses above correct ones. All three statistics are higher on average for incorrect responses,
Table 1: Entropy diagnostics on MATH500. The same Qwen2.5-Math-7B study yields 9,951 nonempty responses after excluding 49 empty ones. Scores exclude prompt, padding, and EOS. AUROC predicts incorrect original labels. Brackets give 95% CIs from 2,000 whole-question bootstrap resamples.
| Signal | Correct mean | Incorrect mean | AUROC [95% CI] |
|---|---|---|---|
| Peak entropy | 3.147 | 3.787 | 0.677 [0.660, 0.694] |
| Max entropy gradient | 1.912 | 2.655 | 0.724 [0.711, 0.736] |
| Mean token entropy | 0.177 | 0.371 | 0.746 [0.731, 0.760] |
and mean token entropy provides the strongest discrimination (AUROC 0.746). These results further show that token-level entropy can help distinguish correct from incorrect responses.
Entropy across success-count groups. We further examine whether the entropy of incorrect responses varies with how often a question is answered correctly. We group the questions by their number of correct responses among 20 generations and compare the mean entropy of incorrect responses across groups. For each question , let denote the number of correct responses. We group consecutive counts in pairs, keeping 0 and 19 separate:
For each bin , let be the set of questions whose number of correct responses falls in , and let be the subset with at least one incorrect response. We define as the average, across questions in , of the mean token entropy of incorrect responses:
Based on the calculated values, Figure 1 shows the mean entropy of incorrect responses across success-count groups. The clear upward trend indicates that questions answered correctly more often tend to have higher-entropy incorrect responses. Therefore, higher entropy may help identify errors that are more likely to be corrected through re-generation.
This group-level analysis complements the paired and response-level comparisons and further motivates the uncertainty-conditioned proposals developed next. These analyses establish that entropy carries information about errors at the response level; whether it also identifies useful revision sites is an empirical question we test directly through proposal ablations in Section 5.3.
MATH500: incorrect-response entropy

Number of correct answers out of 20
Figure 1: Incorrect-response entropy on MATH500. The x-axis groups questions by the number of correct responses out of 20. Yellow bars show equal-question means of incorrect-response entropy (Equation 9). Numbers above bars give entropy in nats; numbers below bin labels count questions in each group.
4 Method
Motivated by the observed entropy patterns, we propose REWIND, an entropy-guided method for selecting where to revise a reasoning trajectory. Figure 2 summarizes the proposal policy. Here, x denotes the concatenation of the prompt and response, and is the prompt length. Only generated positions are eligible for revision.
4.1 Entropy-Guided Suffix Proposals
We use token entropy as the default diagnostic (Equation 4). One revision step has four phases.
Phase 1: Peak Selection. Select the highest-entropy generated position:
Phase 2: Gradient Backtracking. Choose the largest difference between adjacent generated positions within a backward distance of the peak:
If the peak is the first generated token, set without computing a difference. Thus specifies

Figure 2: REWIND proposal policy. The entropy peak anchors gradient backtracking to . Boundary alignment gives the suffix start ; regeneration and score-based acceptance complete the proposal.
a backward distance, with at most candidate positions.
Phase 3: Boundary Alignment. To avoid cutting through an incomplete span, search the preceding k tokens for a delimiter:
where contains integer positions and contains tokens whose decoded text includes a delimiter. If none is found, set . Keep , including any selected delimiter, and regenerate the suffix to obtain .
Phase 4: MH-Style Acceptance. Let denote the actual next-token proposal distribution. For the shared suffix start , compare both sequences over tokens:
Accept if for ; otherwise retain . This shared-horizon, state-dependent filter is MH-style: it omits forward/reverse site-selection probabilities and does not establish exact MH stationarity. Each subsequent iteration recomputes the entropy trajectory of the retained sequence. Appendix M gives the pseudocode.
All signals and sequence scores are computed from the fixed language model, requiring no additional training or external verifier.
Integration with Power Sampling. Power Sampling performs K random-cut proposals in each of B blocks; REWIND then adds one entropy-guided proposal to the retained sequence. All proposals share the acceptance score in Equation 13.
4.2 Theoretical Intuition
For prefix and latent interpretation , the mixture yields , where is expected within-interpretation entropy and measures cross-interpretation disagreement. A sharp increase in can create a gradient spike before a later entropy peak. Appendix A gives sufficient conditions for this local pattern; it motivates candidate selection without guaranteeing a correct retained prefix or causal error localization.
5 Experiments
5.1 Experimental Setup
In the main comparison, we evaluate the effectiveness of our REWIND controller across three model families to assess cross-model robustness. Specifically, we use Qwen2.5-Math-7B (Yang et al., 2024) as a representative specialist math model, Llama-3.1-Tülu-3-8B-DPO (Tülu-8B) (Lambert et al., 2024) as a generalist instruction-tuned baseline, and DeepSeek-1.5B (Guo et al., 2025) as a lightweight reasoning-distilled model. All Tülu-8B experiments use this same DPO checkpoint.
We report single-output accuracy on five benchmarks spanning varying difficulty levels: GSM8K (grade-school math) (Cobbe et al., 2021), MATH500 (competition math) (Hendrycks et al.,
2021), the GPQA Diamond subset (198 questions) (Rein et al., 2024), AIME2025 (frontier math competition) (Art of Problem Solving, 2025a,b), and the BBH formal fallacies task (250 questions) (Suzgun et al., 2022). The comparison in Table 2 reports the mean over three independent runs with different random seeds. To further assess robustness under common evaluation protocols and broader settings, Appendix I reports standard few-shot CoT prompting, Appendix J reports code-generation results, and Appendix K reports standard deviations for representative Qwen2.5-Math settings.
Baselines. We compare decoding strategies across four categories. First, distribution- and decoding-based methods include Vanilla, Temperature Sampling (), Typical-p () (Meister et al., 2023), and DoLa (Chuang et al., 2024) (layer-contrastive decoding). Second, revision-based methods include Self-Refine (Madaan et al., 2023), which iteratively regenerates and edits the response based on the model's own feedback. Third, MCMC-based sampling is represented by Power Sampling (Karan and Du, 2025). Fourth, candidate selection includes Best-of-N (BoN@10): we sample responses for each input and select the candidate with the highest mean token log-likelihood.
Implementation. We use Power Sampling in 16 blocks with temperature and target power . Each active block extends the retained sequence and performs random-cut MCMC proposals; REWIND then attempts one additional entropy-guided revision with and . All other settings, including prompts, generation limits, and acceptance scoring, match MCMC. Implementation details are provided in Appendix M. Our code is available at https://anonymous.4open.science/r/rewind-D310.
5.2 Main Results
REWIND achieves the highest mean accuracy in all 15 model–benchmark settings (Table 2).
For Qwen2.5-Math-7B, REWIND improves MATH500 from 66.80% under temperature sampling to 77.60%, and from 72.60% under standard MCMC to 77.60% by adding a guided revision after the shared K = 10 random MCMC steps per block. On DeepSeek-1.5B, REWIND reaches 26.67% on AIME2025 compared with 16.67% for MCMC under the same blockwise protocol. Appendix K, Table 18, expands the corresponding three-run main results with standard deviations.
Table 2: Main results. Accuracy (%) averaged over three runs. Best and second-best are highlighted. Vanilla uses .
| Methods | GSM8K | MATH500 | GPQA | AIME2025 | BBH |
|---|---|---|---|---|---|
| Qwen2.5-Math-7B (Specialist) | |||||
| Vanilla | 61.41 | 48.13 | 26.77 | 2.22 | 63.73 |
| Temperature | 75.86 | 66.80 | 34.68 | 7.78 | 71.20 |
| Typical-p | 78.26 | 67.40 | 31.31 | 7.78 | 74.40 |
| Self-refine | 77.63 | 68.40 | 32.82 | 6.67 | 69.73 |
| DoLa | 77.86 | 70.20 | 34.84 | 10.00 | 73.60 |
| MCMC | 79.45 | 72.60 | 35.35 | 10.00 | 75.20 |
| BoN@10 | 81.85 | 73.00 | 32.32 | 13.33 | 65.73 |
| REWIND | 84.31 | 77.60 | 35.86 | 16.67 | 77.20 |
| Llama-3.1-Tilu-3-8B-DPO (Generalist) | |||||
|---|---|---|---|---|---|
| Vanilla | 86.27 | 44.20 | 24.74 | 1.11 | 56.13 |
| Temperature | 88.17 | 44.80 | 25.25 | 1.11 | 56.93 |
| Typical-p | 87.67 | 46.20 | 28.79 | 1.11 | 54.80 |
| Self-refine | 87.87 | 45.60 | 24.24 | 1.11 | 55.33 |
| DoLa | 88.32 | 45.00 | 25.76 | 1.11 | 57.33 |
| MCMC | 89.08 | 50.40 | 27.27 | 2.22 | 57.73 |
| BoN@10 | 88.40 | 50.20 | 26.77 | 1.11 | 57.47 |
| REWIND | 90.90 | 52.00 | 29.79 | 3.33 | 59.33 |
| DeepSeek-R1-Distill-Qwen-1.5B (Reasoning) | |||||
|---|---|---|---|---|---|
| Vanilla | 63.84 | 55.40 | 27.27 | 13.33 | 60.40 |
| Temperature | 67.93 | 57.00 | 28.79 | 13.33 | 62.27 |
| Typical-p | 66.56 | 59.20 | 29.80 | 14.44 | 64.93 |
| Self-refine | 68.51 | 55.80 | 27.77 | 13.33 | 62.00 |
| DoLa | 71.65 | 58.40 | 29.80 | 14.44 | 65.60 |
| MCMC | 73.69 | 61.20 | 29.29 | 16.67 | 64.00 |
| BoN@10 | 70.20 | 61.40 | 28.79 | 16.67 | 65.20 |
| REWIND | 77.81 | 64.40 | 31.81 | 26.67 | 66.80 |
5.3 Signal Comparison and Analysis
We evaluate both the choice of trigger signal and the strategy for turning that signal into a revision point. Our REWIND is built on two distinct design choices: (1) backtracking from the uncertainty peak to an earlier entropy-gradient spike (gradient-based intervention selection) and (2) aligning revisions with coarse semantic boundaries. To test whether these choices contribute beyond generic regeneration, Table 3 reports an ablation study on the MATH500 dataset using the Qwen2.5-Math model.
Comparing Intervention-Point Localization. Entropy-gradient backtracking improves accuracy to 77.60%, compared with 74.20% for Peak Revision and 72.60% for random-proposal MCMC. It also outperforms Random-in-Window (75.20%) by 2.40 percentage points. Random Delimiter and Random-in-Window each add one suffix proposal
Table 3: Proposal ablation on Qwen2.5-Math-7B/MATH500. Accuracy (%) with random MCMC steps per block. Revision variants add a suffix proposal. Local variants use the peak window; “grad.” uses its largest entropy increase.
| Variant | Site / alignment | Acc. |
|---|---|---|
| MCMC | Global random / none | 72.60 |
| Random delimiter | Global random / full | 73.20 |
| Peak revision | Peak / full | 74.20 |
| No boundary | Local grad. / none | 75.00 |
| Random in window | Local random / full | 75.20 |
| Restricted boundary | Local grad. / . and newline | 76.80 |
| REWIND | Local grad. / full | 77.60 |
per block with the same generation and acceptance settings as REWIND; the respective 4.40- and 2.40-point gaps therefore isolate site selection at the same proposal-count budget. These results show that choosing the largest entropy increase within the peak window yields more effective revision sites than revising at the peak or at a random position in the same window.
The Role of Boundary Alignment. Boundary alignment increases accuracy from 75.00% to 77.60%, a gain of 2.60 percentage points. Random Delimiter revision achieves 73.20%, showing that boundary cues are most useful when combined with targeted site selection. Restricting the delimiter set to . and \n still achieves 76.80%, only 0.80 points below the full set. These results show that coarse boundary alignment contributes to the gain and remains effective with a small set of delimiters.
Separating Signal Choice from Intervention Strategy. For each statistic, we define a revision score before applying peak selection or gradient tracing. Maximum probability, probability gap, and Top-K embedding similarity are reversed, while vocabulary-probability skewness and excess kurtosis are negated. Temporal KL uses . All variants share the suffix-generation and acceptance procedure; Appendix D gives the exact score definitions. For a fixed , peak revision selects its maximum, whereas tracing selects the largest increase in the preceding window. Table 4 compares these strategies under six signal configurations. Tracing improves observed MATH500 accuracy for all six, with gains ranging from 0.2 points for skewness to 3.4 for entropy. Temporal KL also gains 3.2 points, supporting the utility of tracing beyond Shannon entropy in this setting.
Table 4: Signal choice vs. intervention strategy. MATH500 accuracy (%) on Qwen2.5-Math-7B for six signal configurations. is tracing minus peak revision.
| Signal | Peak | Tracing | Δ |
|---|---|---|---|
| Shannon entropy | 74.20 | 77.6 | +3.4 |
| Temporal KL | 71.80 | 75.0 | +3.2 |
| Top-K similarity (K = 5) | 73.40 | 74.20 | +0.8 |
| Top-K similarity (K = 3) | 72.60 | 73.40 | +0.8 |
| Skewness | 73.20 | 73.40 | +0.2 |
| Kurtosis | 72.00 | 73.00 | +1.0 |
Table 5: Trigger signals across benchmarks. Accuracy (%) on Qwen2.5-Math-7B.
| Trigger signal | GSM8K | MATH | AIME |
|---|---|---|---|
| MCMC | 79.45 | 72.60 | 10.00 |
| Shannon entropy | 84.31 | 77.60 | 16.67 |
| Skewness | 80.97 | 73.40 | 12.22 |
| Top-K similarity (K = 3) | 76.19 | 73.40 | 12.22 |
| Temporal KL | 77.86 | 75.00 | 10.00 |
| Kurtosis | 80.59 | 73.00 | 8.89 |
| Top-K similarity (K = 5) | 79.91 | 74.20 | 7.78 |
Trigger Choice across Benchmarks. Among the evaluated trigger configurations, entropy performs best on all three benchmarks as shown in Table 5. Alternatives show different transfer patterns. Temporal KL improves MATH500 over MCMC (75.00% vs. 72.60%), but lowers GSM8K accuracy and ties MCMC on AIME2025. Top-K similarity with K = 5 and kurtosis also improve MATH500, yet fall below MCMC on AIME2025 (7.78% and 8.89% vs. 10.00%). Skewness gives smaller gains on all three. These results indicate that improving intervention-point selection for a given signal does not necessarily make it a strong trigger across tasks. Together with the within-question observations in Section 3.2, the signal comparisons support entropy as the default trigger for the evaluated controller.
Answer-level intervention utility. Across the three main-table runs on MATH500, REWIND averages 46 repairs and 21 regressions per run relative to MCMC, yielding 25 net corrections (+5.00 points; Appendix F).
5.4 Inference Budget and BoN Comparison
Relative to single-pass temperature sampling, the reported Qwen2.5-Math generation-token ratios are for MCMC and for REWIND. BoN@10 samples ten independent responses per input, corresponding to a nominal generation-token budget under comparable average response lengths. On this nominal basis, the three methods
Table 6: Transfer across tasks and prompts. Accuracy (%) on HumanEval and under 8-shot CoT math prompting. The latter uses Qwen2.5-Math-7B.
| Model / benchmark | Temp. | MCMC | REWIND |
|---|---|---|---|
| HumanEval | |||
| Qwen2.5-Math-7B | 52.4 | 56.1 | 58.5 |
| Tülu-8B | 58.5 | 62.8 | 66.5 |
| 8-shot CoT | |||
| MATH500 | 68.4 | 73.2 | 78.8 |
| GSM8K | 85.5 | 86.3 | 88.4 |
| AIME2025 | 7.8 | 10.0 | 16.7 |
operate at roughly comparable generation budgets, with REWIND adding approximately 4.8% generated tokens over MCMC.
Table 2 reports the accuracy comparison with likelihood-ranked BoN@10. REWIND achieves higher accuracy on all 15 reported model–benchmark pairs, with gains of 1.60–11.47 percentage points. On Qwen2.5-Math-7B/MATH500, it reaches 77.60% versus 73.00% for BoN@10 (+4.60 points) and on DeepSeek-1.5B/AIME2025, it reaches 26.67% versus 16.67% (+10.00 points). These comparisons favor targeted suffix repair over the evaluated candidate-selection baseline.
5.5 Transfer across Tasks and Prompts
Code Generation. Table 6 extends the evaluation to HumanEval (Chen et al., 2021), where REWIND gains 2.4 points over MCMC on Qwen2.5-Math-7B and 3.7 on Tülu-8B. Restricting Qwen2.5-Math-7B's boundary set to . and \n retains 57.90% accuracy, compared with 58.5% for the full set and 56.1% for MCMC (Appendix C). Most of the observed gain thus survives with two general-purpose boundary anchors. These gains support transfer beyond mathematics on two backbones; Appendix J provides the full comparison.
Few-Shot Prompting. With standard 8-shot CoT prompts on Qwen2.5-Math-7B, Table 6 shows gains over MCMC of 5.6 points on MATH500, 2.1 on GSM8K, and 6.7 on AIME2025. The gains therefore persist in this additional prompting setting and Appendix I reports all decoding baselines.
6 Discussion
From Entropy Diagnostics to Revision Sites. The repeated-generation study shows that entropy carries useful information about response correctness. Mean token entropy provides the strongest response-level discrimination in Table 1, while the token-wise entropy trajectory preserves the positional information needed for revision. REWIND uses an entropy peak to anchor a local search and selects the largest entropy increase within that window. This connects the entropy–correctness finding to an actionable revision policy.
Signal Choice and Intervention Strategy. The signal comparisons and ablations identify complementary ingredients of effective revision. Entropy achieves the highest accuracy in the main cross-benchmark signal sweep, and tracing improves over peak revision for all six tested signal configurations on MATH500. Boundary alignment further improves the entropy-based controller and remains effective with only periods and newlines. Together, these results suggest that useful refinement depends on both an informative uncertainty signal and a suitable rule for converting that signal into a suffix proposal.
When Revision Fails. Manual inspection of Qwen2.5-Math-7B on MATH500 finds confident errors without a salient entropy spike in 7.6% of all problems and detected but unrecovered failures in 14.8% (Appendix H). The latter account for most residual failures, highlighting regeneration quality as a remaining bottleneck.
7 Conclusion
In this paper, we present empirical evidence that token-level entropy is associated with reasoning errors. We found that incorrect responses have higher mean token entropy on 88.12% of paired MATH500 questions, with an average within-question relative increase of 112%. Based on this association between the during-generation signal and reasoning errors, we introduce REWIND, a training-free controller that uses entropy-gradient backtracking to select revision points, aligns them with natural boundaries, and filters regenerated suffixes with an MH-style score. Across three model families and five benchmarks, REWIND outperforms all baselines, improving over random-proposal MCMC by 0.51–10.00 percentage points. Signal comparisons identify entropy as the strongest tested trigger across three mathematical benchmarks, and controlled ablations support the contributions of both gradient backtracking and boundary alignment. Together, these results show that intrinsic uncertainty can guide targeted trajectory repair and improve test-time reasoning.
Limitations
Computational Cost. The cost study in Section 5.4 reports generation-token counts, which exclude entropy-only forward passes and do not establish normalized FLOPs or wall-clock cost. Entropy computation and discarded proposals add overhead, and efficiency comparisons depend on implementation and batching.
Scope and Generalization. The task and model coverage in Section 5.5 is limited. Supplementary HumanEval results cover only two backbones. Further tasks, backbones, and repeated runs are needed to assess broader transfer.
Signal Validity and Statistical Coverage. The benchmarks provide no token-level first-error annotations, so the evidence concerns intervention utility rather than localization accuracy. AIME2025 has only 30 questions, limiting the precision of accuracy comparisons. Finally, 7.6% of the inspected MATH500 examples are confidently wrong without a salient entropy spike (Appendix H), setting a direct limit on uncertainty-triggered repair.
Ethical Considerations
REWIND can still produce incorrect answers despite improved benchmark accuracy. Its iterative revision requires additional inference computation, which may increase energy consumption.
References
Pranjal Aggarwal, Aman Madaan, Yiming Yang, and 1 others. 2023. Let's sample step by step: Adaptive-consistency for efficient reasoning and coding with LLMs. arXiv preprint arXiv:2305.11860.
Art of Problem Solving. 2025a. 2025 AIME
I. https://artofproblemsolving.com/wiki/
index.php/2025_AIME_I. Accessed: 2026.
Art of Problem Solving. 2025b. 2025 AIME
II. https://artofproblemsolving.com/wiki/
index.php/2025_AIME_II. Accessed: 2026.
Eric Bigelow, Ari Holtzman, Hidenori Tanaka, and Tomer Ullman. 2025. Forking paths in neural text generation. In International Conference on Learning Representations, volume 2025, pages 17134–17167.
Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde De Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, and 1 others. 2021. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374.
Yung-Sung Chuang, Yujia Xie, Hongyin Luo, Yoon Kim, James R. Glass, and Pengcheng He. 2024. DoLa: Decoding by contrasting layers improves factuality in large language models. In The Twelfth International Conference on Learning Representations.
Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, and 1 others. 2021. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168.
Nouha Dziri, Ximing Lu, Melanie Sclar, Xiang Lorraine Li, Liwei Jiang, Bill Yuchen Lin, Sean Welleck, Peter West, Chandra Bhagavatula, Ronan Le Bras, and 1 others. 2023. Faith and fate: Limits of transformers on compositionality. Advances in Neural Information Processing Systems, 36:70293–70332.
Sebastian Farquhar, Jannik Kossen, Lorenz Kuhn, and Yarin Gal. 2024. Detecting hallucinations in large language models using semantic entropy. Nature, 630(8017):625–630.
Jarad Forristal, Fatemehsadat Mireshghallah, Greg Durrett, and Taylor Berg-Kirkpatrick. 2023. A block Metropolis–Hastings sampler for controllable energy-based text generation. In Proceedings of the 27th Conference on Computational Natural Language Learning (CoNLL), pages 403–413.
Yichao Fu, Xuewei Wang, Hao Zhang, Yuandong Tian, and Jiawei Zhao. 2026. Deep think with confidence. In International Conference on Learning Representations, volume 2026, pages 94355–94377.
Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Ruoyu Zhang, Runxin Xu, Qihao Zhu, Shirong Ma, Peiyi Wang, Xiao Bi, and 1 others. 2025. DeepSeek-R1: Incentivizing reasoning capability in LLMs via reinforcement learning. arXiv preprint arXiv:2501.12948.
Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. 2021. Measuring mathematical problem solving with the MATH dataset. arXiv preprint arXiv:2103.03874.
Jie Huang, Xinyun Chen, Swaroop Mishra, Huaixiu Steven Zheng, Adams Wei Yu, Xinying Song, and Denny Zhou. 2023. Large language models cannot self-correct reasoning yet. arXiv preprint arXiv:2310.01798.
Saurav Kadavath, Tom Conerly, Amanda Askell, Tom Henighan, Dawn Drain, Ethan Perez, Nicholas Schiefer, Zac Hatfield-Dodds, Nova DasSarma, Eli Tran-Johnson, and 1 others. 2022. Language models (mostly) know what they know. arXiv preprint arXiv:2207.05221.
Aayush Karan and Yilun Du. 2025. Reasoning with sampling: Your base model is smarter than you think. arXiv preprint arXiv:2510.14901.
Lorenz Kuhn, Yarin Gal, and Sebastian Farquhar. 2023. Semantic uncertainty: Linguistic invariances for uncertainty estimation in natural language generation. arXiv preprint arXiv:2302.09664.
Nathan Lambert, Jacob Morrison, Valentina Pyatkin, Shengyi Huang, Hamish Ivison, Faeze Brahman, Lester James V Miranda, Alisa Liu, Nouha Dziri, Shane Lyu, and 1 others. 2024. Tulu 3: Pushing frontiers in open language model post-training. arXiv preprint arXiv:2411.15124.
Lihui Liu. 2025. Monte Carlo tree search for graph reasoning in large language model agents. In Proceedings of the 34th ACM International Conference on Information and Knowledge Management, pages 4966–4970.
Aman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreffe, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, and 1 others. 2023. Self-Refine: Iterative refinement with self-feedback. Advances in neural information processing systems, 36:46534–46594.
Clara Meister, Tiago Pimentel, Gian Wiher, and Ryan Cotterell. 2023. Locally typical sampling. Transactions of the Association for Computational Linguistics, 11:102–121.
Ning Miao, Hao Zhou, Lili Mou, Rui Yan, and Lei Li. 2019. CGMH: Constrained sentence generation by Metropolis–Hastings sampling. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 6834–6842.
David Rein, Betty Li Hou, Asa Cooper Stickland, Jackson Petty, Richard Yuanzhe Pang, Julien Dirani, Julian Michael, and Samuel R Bowman. 2024. GPQA: A graduate-level Google-proof Q&A benchmark. In First Conference on Language Modeling.
Claude E Shannon. 1948. A mathematical theory of communication. The Bell system technical journal, 27(3):379–423.
Mirac Suzgun, Nathan Scales, Nathanael Schärli, Sebastian Gehrmann, Yi Tay, Hyung Won Chung, Aakanksha Chowdhery, Quoc V Le, Ed H Chi, Denny Zhou, and Jason Wei. 2022. Challenging BIG-Bench tasks and whether chain-of-thought can solve them. arXiv preprint arXiv:2210.09261.
Shenzhi Wang, Le Yu, Chang Gao, Chujie Zheng, Shixuan Liu, Rui Lu, Kai Dang, Xiong-Hui Chen, Jianxin Yang, Zhenru Zhang, and 1 others. 2026. Beyond the 80/20 rule: High-entropy minority tokens drive effective reinforcement learning for llm reasoning. Advances in Neural Information Processing Systems, 38:115452–115486.
Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V Le, Ed H. Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. 2023. Self-consistency improves chain of thought reasoning in language models. In The Eleventh International Conference on Learning Representations.
Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, and 1 others. 2022. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, 35:24824–24837.
Sang Michael Xie, Aditi Raghunathan, Percy Liang, and Tengyu Ma. 2021. An explanation of in-context learning as implicit Bayesian inference. arXiv preprint arXiv:2111.02080.
An Yang, Beichen Zhang, Binyuan Hui, Bofei Gao, Bowen Yu, Chengpeng Li, Dayiheng Liu, Jianhong Tu, Jingren Zhou, Junyang Lin, and 1 others. 2024. Qwen2.5-Math technical report: Toward mathematical expert model via self-improvement. arXiv preprint arXiv:2409.12122.
Shunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran, Tom Griffiths, Yuan Cao, and Karthik Narasimhan. 2023. Tree of thoughts: Deliberate problem solving with large language models. Advances in neural information processing systems, 36:11809–11822.
Jinghan Zhang, Xiting Wang, Fengran Mo, Yeyang Zhou, Wanfu Gao, and Kunpeng Liu. 2025. Entropy-based exploration conduction for multi-step reasoning. arXiv preprint arXiv:2503.15848.
Andy Zhou, Kai Yan, Michal Shlapentokh-Rothman, Haohan Wang, and Yu-Xiong Wang. 2023. Language agent tree search unifies reasoning acting and planning in language models. arXiv preprint arXiv:2310.04406.
Appendix Overview
The appendix provides supporting material for the main empirical and methodological claims. Appendix A gives a theoretical account of entropy-gradient localization, while Appendix A.6 explains the sequence-level motivation behind the accept/reject refinement loop. Appendix B compares targeted refinement with a larger single-pass model. Appendices C–E report robustness checks for boundary alignment, trigger signals, and supplementary controller variants. Appendices F–H analyze repairs, regressions, proposal acceptance, intervention-site coverage, and residual failures. Finally, Appendix I, Appendix J, and Appendix K provide additional prompting, generalization, and stability results, followed by qualitative case studies in Appendix L and implementation details and pseudocode in Appendix M.
A Entropy-Gradient Intuition
We analyze entropy-gradient localization through semantic fragmentation: the model becomes uncertain between conflicting interpretations, increasing cross-interpretation disagreement. We derive sufficient conditions under which the resulting entropy-gradient spike identifies the local onset of fragmentation.
A.1 Setup and Notation
Let denote the prefix at step . The next-token entropy is defined as
and the entropy gradient is .
A.2 Main Result
Theorem A.1 (Entropy Gradient Localizes Semantic Fragmentation). Assume the model’s predictive distribution admits a latent decomposition
where represents implicit semantic interpretations. Define the within-world entropy and the cross-world disagreement .
(Decomposition) The entropy decomposes as
(Localization) If lies inside the searched neighborhood and semantic fragmentation occurs at , causing a mutual information jump , and the within-world entropy is locally smooth with over the searched neighborhood , then
(Identification) If additionally for all competing positions , (no comparable MI jumps in the local search window) and , then
Proof. Part 1 follows from the definition of conditional mutual information. Recall that . Rearranging gives . Since and , we obtain .
Part 2: At , we have . By the smoothness assumption, . By the fragmentation assumption, . Thus .
Part 3: For any competing position , , we have (local smoothness) and (no comparable MI jumps). Thus . The condition (equivalently, ) ensures for all such .
Remark A.2 (Interpretation of Assumptions). The theorem combines a latent mixture model, locally smooth within-interpretation entropy, and an isolated mutual-information jump. The mixture model aligns with Bayesian interpretations of in-context learning in which latent concepts govern generation (Xie et al., 2021). Smoothness is required within the controller's search window. The signal-strength condition ensures that the fragmentation event has a larger entropy gradient than competing positions in that window.
A.3 Why an Earlier Cut May Help
Backtracking from to removes the intervening tokens and lets the model regenerate from before the identified distributional shift. When those tokens encode a harmful premise, the earlier cut provides an opportunity to revise it. The benefit depends on the content removed; proposal-policy ablations and paired final-answer outcomes evaluate this choice empirically.
A.4 When Does Fragmentation Produce a Detectable Signal?
Lemma A.3 (MI Lower Bound). Suppose at step t, two semantic worlds have total mass , normalized conditional weights within this two-world subset, and (they disagree on predictions). Then
Proof Sketch. Let denote the conditional distributions. We first condition on the event , whose probability is , and write the normalized weights as . For the two-component conditional mixture , the total variation between each component and the conditional mixture satisfies and similarly for .
Applying Pinsker’s inequality within this conditional two-world mixture yields a conditional mutual-information lower bound of . Multiplying by the subset probability gives the stated contribution to the full mutual information by the chain rule and nonnegativity of the remaining components.
Since and , we have , yielding .
Remark A.4. The lemma links disagreement between plausible interpretations to a larger mutual-information component. Temporal localization follows when this component exhibits an isolated jump satisfying Theorem A.1. The quadratic dependence on captures the strength of the prediction disagreement.
A.5 Scope of the Analysis
The analysis describes errors that manifest as localized semantic fragmentation. Confident errors can remain low-entropy because the model commits to a wrong but internally coherent interpretation. Gradual drift spreads uncertainty changes across steps, weakening the localized-jump signal.
The condition characterizes when the fragmentation signal dominates background changes. Large uncertainty shifts during legitimate reasoning transitions can compete with that signal and affect the selected revision site.
The latent decomposition serves as an explanatory model. Our experiments use observable entropy traces and assess revision utility through final-answer accuracy.
A.6 Sequence-Level Score Motivation
Temperature normalizes each next-token distribution separately. Because these normalizers depend on the prefix, their product varies across trajectories. Sequence-level Power Sampling instead uses the global normalizer in , motivating suffix-level scoring. In exact MH, this normalizer cancels from the forward/reverse ratio. REWIND compares suffix scores at the selected site using the MH-style filter in Equation 13; state-dependent site-selection probabilities are omitted. Final-answer accuracy measures the resulting refinement performance.
B Comparison with Qwen2.5-Math-72B
We compare iterative refinement with Qwen2.5-Math-7B against single-pass sampling from Qwen2.5-Math-72B at T = 0.25. The two settings differ in both model size and inference budget, evaluating a trade-off between model scale and iterative computation. Table 7 reports accuracy across all five benchmarks.
REWIND with the 7B backbone outperforms the single-pass 72B baseline on MATH500, GPQA, AIME2025, and BBH; the 72B model achieves higher accuracy on GSM8K. These results demonstrate the utility of spending additional inference computation on targeted revision in these settings.
C Boundary Alignment Robustness
Boundary alignment uses a lightweight decoded-token delimiter rule. We test its sensitivity by restricting the delimiter set to two general-purpose anchors, \n and .. Table 8 shows that this restricted variant preserves most of the full method's performance on both MATH500 and HumanEval. The results support coarse boundary alignment and show that the gains remain strong with a small delimiter set.
D Signal Robustness
This appendix supplements the signal analysis in Section 5.3. We first define the implemented revision scores, then report the full peak-versus-tracing
Table 7: Comparison with Qwen2.5-Math-72B. Accuracy (%) is reported across five benchmarks. The 72B baseline is single-pass sampling with , while REWIND uses the Qwen2.5-Math-7B backbone with iterative refinement.
| Method | GSM8K | MATH500 | GPQA | AIME2025 | BBH |
|---|---|---|---|---|---|
| Qwen2.5-Math-72B, single-pass () | 94.01 | 75.40 | 33.33 | 6.67 | 67.60 |
| REWIND (Qwen2.5-Math-7B) | 84.31 | 77.60 | 35.86 | 16.67 | 77.20 |
Table 8: Robustness to restricted delimiters. The restricted setting keeps only \n and .; full uses \n, ., ., $, and ).
| Benchmark | MCMC | Restricted | Full |
|---|---|---|---|
| MATH500 | 72.60 | 76.80 | 77.60 |
| HumanEval | 56.10 | 57.90 | 58.50 |
comparison in Table 9, with the MCMC reference. The cross-benchmark signal sweep is reported in main-text Table 5.
Signal Definitions. Let be the model logits predicting generated token , the full-vocabulary distribution before sampling transformations, and . All logarithms are natural. Write for its two largest probabilities. The following scores are passed to the common peak-selection and gradient-tracing rules:
| Statistic | Revision score |
|---|---|
| Shannon entropy | |
| Temporal KL | |
| Max probability | |
| Probability gap | |
| Top-K similarity | |
| Skewness | |
| Kurtosis (excess) |
Temporal KL is explicitly
with score zero at the first generated position. Maximum probability and probability gap are reversed so that lower confidence gives a higher revision score.
For Top-K similarity, let be the highest-probability tokens and the fixed model's input embedding of token . We use the unweighted mean pairwise cosine similarity:
Thus lower embedding similarity gives a higher score. We evaluate .
Skewness and excess kurtosis are calculated across the vocabulary probability values. Following the implementation's sample-standard-deviation convention, define
Both statistics are negated before site selection. For each score, peak revision maximizes , while tracing maximizes the signed difference within the preceding peak window. The suffix-generation and acceptance procedure is shared across signal variants.
Varentropy. The varentropy configuration in Table 10 uses the temperature-scaled full-vocabulary distribution
Its score is the variance of token surprisal under :
The implementation takes the absolute value of this difference to obtain its nonnegative score. The other scores defined above use the unscaled distribution .
Robustness of the Gradient Tracing Strategy. To test whether the gradient-versus-peak intervention pattern is specific to Shannon entropy, we decouple the localization strategy from the metric choice. On MATH500, we compare two revision strategies across multiple distributional statistics (KL divergence, Top-K similarity, skewness, and kurtosis). Peak selection revises at the position with maximum metric value (). In contrast, Targeted Gradient Tracing (Tracing) revises at the maximum metric gradient within a
Table 9: Peak vs. gradient-based intervention localization. Accuracy (%) on MATH500 under naive peak revision and gradient tracing.
| Metric | Naive | Tracing | Δ Gain |
|---|---|---|---|
| MCMC | 72.6 | - | - |
| Shannon Entropy | 74.2 | 77.6 | +3.4 |
| KL Divergence (Temporal) | 71.8 | 75.0 | +3.2 |
| Top-K Similarity (K = 5) | 73.4 | 74.2 | +0.8 |
| Top-K Similarity (K = 3) | 72.6 | 73.4 | +0.8 |
| Skewness | 73.2 | 73.4 | +0.2 |
| Kurtosis | 72.0 | 73.0 | +1.0 |
preceding window (), treating the sharp distributional shift as a proxy for an earlier useful intervention point.
On Qwen2.5-Math-7B/MATH500, gradient tracing improves accuracy for every listed configuration in Table 9. The largest gain is 3.4 points for entropy, followed by 3.2 for temporal KL. Kurtosis (+1.0) and skewness (+0.2) show smaller gains. These comparisons support revising at an earlier distributional shift within the peak window.
Entropy achieves the highest accuracy on all three benchmarks in Table 5. Both Top-K configurations gain 0.8 points from tracing on MATH500 in Table 9, while entropy remains stronger in the cross-benchmark comparison.
E Supplementary Controller Robustness
We evaluate alternative trigger metrics and boundary/window settings over three random seeds.
Maximum probability and probability gap use the reversed scores defined in Appendix D. Varentropy uses the temperature-scaled distribution with , as specified there.
In Table 10, maximum probability matches entropy on AIME2025 and falls below MCMC on MATH500. Probability gap and varentropy also trail entropy on MATH500.
The default delimiter set and fixed window achieve the highest accuracy in Table 11. Both expanded delimiters and the adaptive window reduce accuracy relative to this setting, supporting a small delimiter set and a fixed local search window.
F Answer-Level Intervention Analysis
Table 12 compares final answers under standard MCMC and REWIND over the same three runs used for the main results in Table 2. Within each run, we count repairs and regressions over the 500 MATH500 questions, then average these counts across runs. Relative to MCMC, REWIND repairs 46 previously incorrect answers and regresses on 21 previously correct answers on average per run. The mean net gain is therefore 25 correct answers per 500 questions, corresponding to the 5.00-percentage-point difference in mean accuracy reported in the main table.
REWIND has lower proposal acceptance on all three benchmarks in Table 13. On MATH500, the complete controller accepts of proposals, compared with for random MCMC, alongside the positive net answer gain in Table 12.
MATH500 observation protocol. The repeated-generation observations in Section 3.2 use temperature 1.0 and base seed 42, with a 3,072-token generation cap and a 4,096-token context limit. Of the 10,000 responses, 248 reach their generation cap.
G Intervention-Site Coverage
Each guided proposal selects one aligned cut point and regenerates its suffix. We count the distinct aligned positions visited across refinement rounds under the blockwise protocol with random MCMC steps per block. On MATH500, the controller visits an average of 3.18 distinct sequence positions per problem (Table 14).
This statistic summarizes the controller's exploration of cut points across refinement rounds.
H Residual Failure Analysis
We manually classify the remaining MATH500 failures using their entropy traces and regeneration outcomes. Table 15 summarizes two categories: (i) confident errors, where the model is wrong without a salient entropy spike, and (ii) detected-but-unrecovered cases, where REWIND identifies instability but the regenerated suffix still does not reach a correct answer.
Detected-but-unrecovered cases account for of residual failures. This distribution motivates stronger suffix proposals for detected instability and complementary signals for confident errors.
I Standard Few-Shot CoT Evaluation
Our main experiments use a single-output setting to isolate the effect of the inference-time controller. To test whether the gains persist under common prompting protocols, we additionally evaluate Qwen2.5-Math-7B with standard 8-shot CoT
Table 10: Supplementary trigger-metric checks. Max probability, probability gap, and varentropy are added as common confidence-style baselines under the same MCMC revision budget. Entropy values are repeated from Table 5 for reference.
| Trigger metric () | MATH500 | AIME2025 |
|---|---|---|
| MCMC | 72.60 | 10.00 |
| Shannon Entropy (main) | 77.60 | 16.67 |
| Max Probability | 70.60 | 16.67 |
| Probability Gap | 71.80 | 13.33 |
| Varentropy | 70.60 | 13.33 |
Table 11: Supplementary boundary and window checks. Expanded delimiters add additional punctuation and closing brackets to the default set. The adaptive-window variant uses the full delimiter set and allows a larger look-back window capped at 20 tokens.
| Setting | MATH500 | AIME2025 |
|---|---|---|
| Full delimiters, fixed (main) | 77.60 | 16.67 |
| Expanded delimiters, fixed | 74.00 | 13.33 |
| Full delimiters, adaptive window (max 20) | 73.60 | 10.00 |
Table 12: Answer-level repair and regression analysis on MATH500. Mean counts across the same three runs summarized in Table 2. Repair/regression is the ratio of the mean counts.
| Setting | Mean repairs | Mean regressions | Repair / regression |
|---|---|---|---|
| Qwen2.5-Math-7B on MATH500 | 46 | 21 | 2.19× |
Table 13: Proposal acceptance ratios. Percentage of proposals accepted under random MCMC and REWIND across three benchmarks.
| Benchmark | MCMC | REWIND | |
|---|---|---|---|
| AIME2025 | 44.4 | 39.4 | -5.0 |
| MATH500 | 57.3 | 54.1 | -3.2 |
| GSM8K | 65.6 | 63.4 | -2.2 |
prompting on the math benchmarks. Table 16 shows that REWIND continues to improve over vanilla decoding, temperature sampling, and standard MCMC under this setting.
J Additional Generalization Results
Table 17 reports supplementary HumanEval (Chen et al., 2021) results for Qwen2.5-Math-7B and Tülu-8B. These results show gains beyond mathematics on both backbones.
K Multi-Seed Stability
Table 18 expands the Qwen2.5-Math-7B results in Table 2 for MATH500 and AIME2025 using the Table 14: Iterative coverage across refinement rounds on MATH500. Mean number of distinct aligned sequence positions visited per problem during refinement.
| Setting | Random MCMC steps / block | Distinct positions / problem |
|---|---|---|
| Qwen2.5-Math-7B on MATH500 | 10 | 3.18 |
Table 15: Failure taxonomy on MATH500 (manual inspection). Confident errors are a minority of all evaluated problems; most residual failures occur after the entropy spike is detected but regeneration still does not recover a correct continuation.
| Failure type | Share of all problems | Share of failures |
|---|---|---|
| Confident errors | 7.6% | 33.9% |
| Detected but unrecovered | 14.8% | 66.1% |
same three runs. We report the arithmetic mean and sample standard deviation of run-level accuracies, with the latter computed using denominator for runs.
L Case Studies
We present illustrative examples demonstrating how REWIND identifies and corrects problematic reasoning patterns.
L.1 Case Study 1: Methodological Improvement
Problem: Find the sum of all integer bases for which is a divisor of .
Before Revision (Brute-force Enumeration):
Table 16: Performance under standard 8-shot CoT prompting. Accuracy (%) is reported for Qwen2.5-Math-7B. REWIND maintains consistent gains under few-shot CoT prompts.
| Benchmark | Vanilla | Temperature | Standard MCMC | REWIND |
|---|---|---|---|---|
| AIME2025 | 3.3 | 7.8 | 10.0 | 16.7 |
| MATH500 | 51.2 | 68.4 | 73.2 | 78.8 |
| GSM8K | 74.9 | 85.5 | 86.3 | 88.4 |
Table 17: Supplementary HumanEval results. REWIND also improves code-generation performance on two backbones.
| Model | Vanilla | Temperature | MCMC | REWIND |
|---|---|---|---|---|
| Qwen2.5-Math-7B | 31.1 | 52.4 | 56.1 | 58.5 |
| Tülu-8B | 51.2 | 58.5 | 62.8 | 66.5 |
Table 18: Multi-seed stability on Qwen2.5-Math-7B. Accuracy mean ± sample standard deviation for the same three runs summarized in Table 2.
| Method | MATH500 | AIME2025 |
|---|---|---|
| Vanilla | ||
| Temperature | ||
| MCMC | ||
| REWIND |
The model initially attempts to solve the problem by exhaustively checking each value of :
“For , we get , which simplifies to , but this does not satisfy . For , we get , which simplifies to , and , which is not an integer. For For For For For ”
This approach is tedious, error-prone, and lacks mathematical elegance.
After Revision (Modular Arithmetic):
After detecting high entropy at the beginning of the solution, the model revises to use a more principled approach:
“We rewrite in terms of :
Thus: . For to divide , it must divide . Therefore, must be a divisor of 56: .
Improvement: The revision transforms a brute-force enumeration into an elegant number-theoretic solution, reducing the problem to finding divisors of 56.
L.2 Case Study 2: Geometric Error Correction
Problem (2025 AIME I, Problem 2). In triangle , the points along occur in the order , with . Along , the order is , with . Point is the midpoint of , and point is the midpoint of , defining the reflected points and . Given that quadrilateral DEGF has area 288, determine the area of heptagon AFNBCEM (Art of Problem Solving, 2025a).
Before Revision (Coordinate Error):
The model makes a critical error in setting up coordinates:
“ is on such that and , so is at .”
Error: Point should lie on line , not on the -axis (which represents line ). This fundamental mistake would propagate through the entire solution.
After Revision (Side-Aligned Coordinates):
The revised excerpt assigns points to the two side directions:
“Determine the total length of side :
Determine the total length of side :
.
Find the coordinates:
-
is at on
-
is at on
-
is at on
-
is at on
"
Improvement: The revision correctly distinguishes points on from points on .
Coordinate convention and area scaling. With as the origin, let and be unit vectors along the two sides. We interpret a coordinate pair in the excerpt as the position vector in this oblique basis. If , Euclidean areas equal coordinate areas multiplied by . For DEGF, the coordinate area and the scale implied by its given Euclidean area are
Case Study Summary. These illustrative excerpts show changes in the reasoning text:
-
Improve methodology: Transform inefficient enumeration into elegant mathematical solutions (Case 1)
-
Correct errors: Identify and fix fundamental setup mistakes before they propagate (Case 2)
The controlled final-answer comparisons in Section 5.2 quantify the overall accuracy gains from revision.
M Implementation Details and Algorithm
M.1 Benchmark Subsets and Prompts
The five main benchmarks use the subsets in Table 19. Each run evaluates the full listed subset, and accuracy is computed over questions within that run. AIME2025 combines all 15 questions from AIME I and all 15 from AIME II. BBH refers specifically to the formal_fallacies task, and GPQA uses the Diamond subset.
Mathematical prompts and chat formatting. The zero-shot formatter for MATH500, GSM8K, and AIME2025 uses the following template, where [QUESTION] is replaced with the benchmark question:
Table 19: Evaluation subsets and BoN generation limits. is the number of questions per run. The last column gives the maximum new tokens per BoN candidate.
| Benchmark | Subset | n | BoN limit |
|---|---|---|---|
| GSM8K | Test | 1,319 | 2,048 |
| MATH500 | MATH test subset | 500 | 3,072 |
| GPQA | Diamond | 198 | 3,072 |
| AIME2025 | AIME I + II | 30 | 4,096 |
| BBH | formal_fallacies | 250 | 3,072 |
Can you solve the following math problem? [QUESTION] Please reason step by step, and put your final answer within \boxed{}.
Qwen2.5-Math-7B and DeepSeek-1.5B receive this text directly. For Tülu-8B, we apply the tokenizer's apply_chat_template to the same text as a single user message, with tokenize=False and add_generation_prompt set to True. The resulting prompt has a <|user|> turn followed by a <|assistant|> generation prefix, with no added system message. The additional 8-shot experiments are reported in Appendix I.
M.2 Best-of-N Sampling and Ranking
BoN@10 samples ten responses independently for each input at temperature . Candidate generation uses top- and the checkpoint's nucleus-sampling setting: top- for Qwen2.5-Math-7B, 0.90 for Tülu-8B (the DPO checkpoint), and 0.95 for DeepSeek-1.5B. Typical sampling is disabled (typical_p = 1.0). Each candidate stops at EOS or the generation limit in Table 19. For BBH and GPQA on Qwen2.5-Math-7B, the candidate limit is further bounded by to fit the model's context length.
We decode each candidate and tokenize its response text separately from the prompt for teacher-forced rescoring. For response tokens and formatted prompt , selection uses
Scoring uses the model's original conditional probabilities before temperature scaling or top-k/top-p filtering. Prompt, padding, and EOS tokens are excluded from both the score and its length normalization. Ties are resolved by the original candidate order. Empty responses are excluded from ranking, and candidates are not filtered by answer validity or correctness. Only the selected response is used for the reported single-output accuracy.
M.3 Controller Implementation
Sampling and stopping. Initial extensions and suffix proposals both use temperature , with target power . Random and guided proposals use the same shared-horizon score in Equation 13. Generation stops early at EOS. Prompts, initialization, block partitioning, generation limits, sampling settings, and acceptance scoring are shared with the MCMC baseline.
Boundary matching. A token belongs to if its decoded text contains a newline or one of ., ,, $, and ). We select the nearest matching token within the k = 10 generated tokens preceding the traced position and begin regeneration after that token, retaining the entire matched token in the prefix. If no matching token is found, regeneration begins at the traced position. Appendix E compares fixed and adaptive windows.
Software and hardware. The controller uses PyTorch and Hugging Face Transformers on NVIDIA H800 GPUs.
Code release and licensing. Experimental code is available in the repository linked in Section 5.1. We release implementation code only and have verified that the applicable upstream licenses permit this release. We do not redistribute pretrained model weights or benchmark datasets.
Algorithm 1 gives one proposal step. Repeated steps recompute the entropy trajectory of the retained sequence; iteration and block budgets are specified in the experimental setup.
Algorithm 1 One Entropy-Guided Revision Step
Require: Sequence x, prompt length , backward distance w, boundary distance k, delimiter tokens , distributions , power
Ensure: Updated sequence
1: Phase 1: Peak Selection
2: Compute entropy for
3:
4: Phase 2: Gradient Backtracking
5: if then
6:
7: else
8:
9: for
10:
11: end if
12: Phase 3: Boundary Alignment
13:
14: if ; otherwise
15: Generate
16:
17: Phase 4: MH-Style Acceptance
18:
19:
20: Sample
21: if then
22: return
23: else
24: return x
25: end if