arXiv:2611.09042cs.CLNov 2026

Manuscript Offprint

arXiv:2611.09042

Failure Profiling and Reachable Trajectory Selection for Reasoning Distillation

Yijun Zhu, Jianxin Wang, Chengchao Shen

Abstract

Training smaller language models on reasoning solutions generated by a larger teacher model is the prevailing approach for transferring mathematical reasoning capabilities. However, the student tends to overfit the output distribution of the teacher and generalizes poorly when its own behavior at inference time deviates from the training data. Recent methods attempt to bridge this gap by incorporating error data, yet the corrective trajectories still reflect the reasoning patterns of the teacher, which the student cannot reliably reproduce, leaving the distribution mismatch largely unresolved. We propose a method, Failure Profiling and Reachable Trajectory Selection (FPRT), built on the insight that effective training data should be jointly determined by what the student fails on and what it can realistically learn. Our method first profiles the failure behavior of the student on each problem through repeated sampling, characterizing it in terms of error rate and error consistency to reveal qualitatively distinct failure modes. Each mode demands a fundamentally different training signal. The diagnosed mode then guides candidate generation from the teacher via distinct prompting strategies tailored to each failure type. Among the correct candidates, our method selects the one whose initial reasoning steps after the point of divergence are most reproducible by the student. These first corrective steps constitute the primary bottleneck, while the remaining steps follow an already corrected context and can therefore be continued more readily. This contrasts with standard reranking approaches, which score the trajectory as a whole and thereby dilute the signal at the critical reasoning transition. Experiments on GSM8K, MATH, and three out-of-distribution benchmarks for Llama-3.1-8B and DeepSeek-Math-7B demonstrate that our method achieves the SOTA performance across the five benchmarks on both student backbones. The source code and trained weights are available at https://github.com/visresearch/FPRT.

1 Introduction

Frontier large language models (LLMs), such as GPT-4 [1], DeepSeek-R1 [11], and Qwen2.5 [47], have demonstrated strong mathematical reasoning ability. In contrast, smaller models such as Llama-3.1-8B [9] and DeepSeek-Math-7B [36] still struggle with complex mathematical problems. A growing line of research seeks to bridge this gap by training smaller students on reasoning traces generated by more capable teachers [29, 15, 22, 50]. Despite substantial progress, the resulting student overfits the output distribution of the teacher: trained exclusively on correct demonstrations that mirror the reasoning style of the teacher, the student has no reliable way to recover once its behavior at inference time deviates from that distribution. The cost is especially high in mathematical reasoning, where each step depends on all preceding ones and even a single misstep invalidates the entire subsequent chain.

✉Corresponding author.

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

Figure

Figure 1: Due to the capability gap between a strong teacher and a weaker student, teacher-generated reasoning trajectories may be difficult for the student to reproduce and may hinder learning. We guide the teacher to generate correction candidates conditioned on the student's errors and select the candidate with the highest branching point reachability score. This score averages student token log-probabilities within a local window immediately after the first divergence, reducing dilution from later tokens.

Recent work has begun to incorporate error data into training to address this gap. LEMMA [32] pairs erroneous solutions with corrective reflections. Self-Correct [41] explores minimal edit corrections that fix mistakes generated by the model. Approaches based on MCTS systematically explore error nodes in the reasoning tree [44, 4]. These methods mark meaningful progress, yet they share two limitations. First, they do not condition on the behavioral failure mode of the student but instead apply the same correction strategy regardless of whether the model is confidently locked onto a wrong answer or producing a different error each time. Specifically, consistently arriving at the same wrong answer reflects a strong but misguided reasoning pattern, whereas producing diverse errors signals the absence of any stable strategy. For the above failure modes, a single correction strategy cannot efficiently fix student errors. Second, even when the failure mode is correctly identified, the corrective trajectories still come from a teacher and exhibit reasoning patterns that the student cannot reliably reproduce, a problem that prior work on knowledge transfer has shown to worsen as the capacity gap between teacher and student grows [31]. Such corrections risk reducing learning to superficial pattern matching rather than genuine skill acquisition.

To address the above limitations, we introduce a novel failure profiling and reachable trajectory selection framework for reasoning distillation. In the failure profiling stage, our method characterizes student errors in terms of error rate and error consistency from multiple sampled responses on each problem to identify the underlying failure mode. Then, we elicit targeted correction candidates from an advanced teacher using prompts tailored to each diagnosed mode. When the student is locked onto a single wrong answer, the prompt directs the teacher to construct corrections that break the specific misconception, whereas when the student produces diverse errors, the prompt instead requests structured step by step reasoning to supply the missing problem solving framework.

In the reachable trajectory selection stage, we select the most reproducible candidate trajectory produced by the teacher to correct the student's erroneous reasoning steps, thereby improving the student's reasoning ability. Unlike standard reranking approaches [57] that score the trajectory as a whole, our method evaluates compatibility within a local window immediately after the position where the reasoning of the student first diverged, as shown in Figure 1. We find that the above local window scoring can clearly distinguish the student-friendly correction from other candidates, where later tokens conditioned on a corrected context will not dilute the signal at the critical reasoning transition. Once the student successfully executes the transition away from its error, the remaining steps follow an already corrected context and can therefore be continued more readily.

Overall, our contributions can be summarized as follows:

  1. We introduce behavioral profiling based on error rate and error consistency to classify model errors into distinct failure modes and enable targeted correction strategies for qualitatively different error patterns.

  2. We propose branching point reachability scoring, a trajectory selection mechanism that evaluates the log-probability under the student within a local window immediately following the point of divergence rather than over the full response, thereby guiding the student to focus on the critical reasoning transition where the student makes mistakes.

  3. Extensive experiments on Llama-3.1-8B and DeepSeek-Math-7B across the mathematical reasoning benchmarks GSM8K and MATH, together with the out-of-distribution evaluation sets SVAMP, ASDiv, and MAWPS, demonstrate that our method achieves the highest average accuracy across the five benchmarks on both student backbones.

References (61)