Failure Profiling and Reachable Trajectory Selection for Reasoning Distillation

Yijun Zhu, Jianxin Wang, Chengchao Shen

TL;DR

Reasoning distillation often fails because small "student" models can't reproduce the complex reasoning styles of large "teacher" models. FPRT (Failure Profiling and Reachable Trajectory Selection) solves this by identifying specific student failure modes and selecting teacher-generated corrections that the student is actually likely to learn, focusing specifically on the "branching point" where the student first went wrong.

What Problem Does This Paper Address?

Training small language models (SLMs) to reason like frontier models (LLMs) usually involves fine-tuning the student on perfect reasoning traces generated by the teacher. However, this creates a distribution mismatch. At inference time, if a student makes a single tiny mistake, it enters a state it never saw during training and has no way to recover.

Recent attempts to fix this by training on "error data" (pairing mistakes with corrections) still suffer from a major flaw: the teacher's corrections often use reasoning patterns that are "alien" to the student. If the student can't realistically reproduce the teacher's style, it resorts to superficial pattern matching rather than genuine skill acquisition.

Methods

The authors propose a three-stage pipeline called FPRT to make distillation more "student-centric."

1. Behavioral Error Profiling

Instead of treating all errors the same, FPRT samples the student model multiple times ($K=5$) on a problem to calculate two metrics: Error Rate ($\alpha$) and Error Consistency ($\kappa$). This allows them to classify failures into three distinct modes:

  • Stubborn: The student is confidently wrong, repeatedly arriving at the same incorrect answer.
  • Inconsistent: The student is confused, producing many different wrong answers.
  • Sporadic: The student usually gets it right but occasionally slips up.
Figure 2: Overview of our pipeline. Stage 1 profiles the student via repeated sampling and classifies each problem as stubborn, inconsistent, or sporadic from error rate α and consistency κ. Stage 2 prompts the teacher with a mode-specific template Pm to generate N candidates, each decomposed into reflection r, preserved prefix p, and corrective continuation c. The three mode-specific branches in Stage 2 illustrate alternative prompting strategies. For each problem, all N candidates are generated using only the prompt corresponding to its diagnosed mode. The sampled-answer example in Stage 1 corresponds to the inconsistent mode. Stage 3 filters by correctness and selects the candidate maximizing branching point reachability over the first L sentences of c.

2. Adaptive Correction Generation

The teacher model is prompted with different strategies based on the diagnosed failure mode. For example, a "Stubborn" error requires a "multi-angle attack" to break a specific misconception, while an "Inconsistent" error needs a highly structured framework to stabilize the student's reasoning.

3. Branching Point Reachability (BPR) Scoring

This is the paper's most novel contribution. The teacher generates several candidate corrections. Rather than picking the one the teacher likes best, FPRT picks the one the student finds most "reachable."

Crucially, they only score the student's log-probability on a local window (the first 8 sentences) immediately following the branching point—the exact moment the student's original reasoning diverged from the truth.

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.

Datasets

The models were trained using MetaMathQA (a common distillation dataset derived from GSM8K and MATH). Evaluation was performed across five benchmarks:

  • In-Distribution: GSM8K and MATH.
  • Out-of-Distribution (OOD): SVAMP, ASDiv, and MAWPS.

Key Insights and Ideas

  • The Branching Point is the Bottleneck: The authors argue that once a student successfully executes the transition away from its error, the remaining steps are much easier to follow. Global scoring of a whole trajectory dilutes the importance of this critical transition.
  • Reachability > Correctness: A training example is only useful if the student can actually learn to produce it. By selecting trajectories with high student log-probs at the error point, they ensure the teacher is "speaking the student's language."
  • Error Modes Matter: As shown in Table 1, different behaviors require different pedagogical approaches. A model that is "stubbornly" wrong needs to be shown why its specific logic failed, whereas a "sporadic" failure just needs a minor surgical fix.
Table 1: Error mode classification based on (α, κ) and the corresponding correction strategy.

Key Results

FPRT achieved state-of-the-art (SOTA) performance for 7B-8B class models:

  • Llama-3.1-8B: Reached an average accuracy of 79.7% across five benchmarks, beating the previous best (LEMMA) by 2.4%.
  • DeepSeek-Math-7B: Reached 80.6% average accuracy.
  • OOD Robustness: The gains were particularly strong on out-of-distribution tasks like MAWPS, where the model outperformed LEMMA by up to 4.4%. This suggests that learning "reachable" corrections leads to better generalization than just memorizing teacher patterns.

Limitations and Future Work

  • Teacher Dependence: The method relies on a very strong teacher (DeepSeek-V3.2 was used). If the teacher cannot solve the problem or identify the student's error, the problem is dropped from the training set.
  • Coarse Profiling: With only $K=5$ samples, the error metrics $\alpha$ and $\kappa$ are somewhat coarse. Increasing $K$ might provide finer-grained profiling but at a significantly higher computational cost.
  • MATH Performance: While FPRT is SOTA on average, it still trails slightly behind LEMMA on the extremely difficult MATH benchmark, suggesting that for very high-level reasoning, specialized "mistake augmentation" might still be necessary.

Summary updated

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 demonstrate that our method achieves the SOTA performance across the five benchmarks on both student backbones.
BibTeX
@inproceedings{zhu2026failure,
  author = {Yijun Zhu and Jianxin Wang and Chengchao Shen},
  title = {{Failure Profiling and Reachable Trajectory Selection for Reasoning Distillation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=rbv0ZUxfLY},
}
Figure