CoTrek: Toward Scalable On-Policy Distillation for Long Chain-of-Thought Reasoning

Heng Zhang, Chengyu Zhou, Jiajun Wu, Xinyuan Liu, Liheng Zhang, Yueqi Guo, Rui Liu, JiaHao Hong, Xuanxun Lian, Jinpeng Lu, Jin HuangNeurIPS 2026

TL;DR

When smaller AI models learn complex, multi-step reasoning from larger "teacher" models, a single slip-up deep into a solution usually derails them completely. Instead of forcing the student to memorize an entire corrected solution from that point onward, CoTrek teaches the student just the short "U-turn"—a shared 3-step repair—needed to get back on solid ground before letting it finish the problem on its own. This surgical approach boosts final reasoning accuracy while preserving the model's ability to explore diverse solutions.

What Problem Does This Paper Address?

Teaching smaller language models to perform long Chain-of-Thought (CoT) reasoning—generating sprawling, step-by-step derivations—is tough. If you just train a student to mimic fixed teacher transcripts (off-policy training), the student freezes up at test time the moment it makes a small mistake it never saw in the textbook.

On-Policy Distillation (OPD) fixes this by letting the student generate its own attempts ("rollouts") and having the teacher grade or guide the actual states the student visits. However, current OPD methods focus heavily on continuation—nudging the student forward step-by-step. When a student model drifts off-course deep into a long math proof, small nudges aren't enough. The bottleneck shifts from continuing a path to recovering from a bad one. How do you teach a model to recognize it's in the weeds and steer back onto the road without overwriting its ability to think independently?

Methods

Standard OPD minimizes the difference between the student's and teacher's next-word predictions across the student's generated text. CoTrek keeps this base objective, but layers on a targeted recovery mechanism built around three novel steps:

Figure 2: Overview of CoTrek.
  1. Recoverable Deep Prefix Mining: When a student fails a problem, CoTrek slices the failed attempt at various depths ("prefixes") and runs Monte Carlo rollouts—generating 8 completions each from both the teacher and the student. It filters specifically for states where the student is lost (low success rate) but the teacher can still salvage the right answer (high success rate).
  2. Shared Repair Prefix Extraction: Rather than forcing the student to copy a teacher's entire remaining solution, CoTrek samples 10 teacher recoveries from the broken prefix, filters for the successful ones, and finds the longest initial chunk of steps where they all agree (typically ~3 steps). It trains the student only on this "shared repair segment," letting the student finish the rest of the problem on its own policy.
  3. Recovery-Guided Horizon Expansion: Fixing a mistake 70% of the way through a proof is much harder than fixing one at 20%. CoTrek uses a depth curriculum: the student starts by practicing shallow repairs and only graduates to deeper prefixes once its recovery success rate at the current depth crosses a reliability threshold.

Datasets

  • Training: Models are trained on a decontaminated version of DeepScaleR-Preview-40K (with a 500-problem validation split).
  • Evaluation: Tested on four established, heavy-hitting mathematical reasoning benchmarks: AIME 2024, AMC 2023, MATH-500, and OlympiadBench. No new benchmarks were introduced, though the authors evaluate examples grouped by normalized prefix depth to explicitly measure recovery.

Key Insights and Ideas

Before building CoTrek, the authors ran diagnostics on a partially trained student (Qwen3-1.7B-Base) and uncovered three fascinating regularities in how reasoning fails and recovers:

Figure 1: Empirical motivation for CoTrek. (a) A broad lost-but-recoverable zone emerges at mid-to-late reasoning depths: teacher recoverability remains high while student recoverability drops sharply, yielding a substantial deep prefix recovery gap. (b) Successful teacher recoveries from the same deviated prefix consistently share a short repair segment before diverging into distinct valid continuations. (c) Distilling full recovery trajectories improves local recovery but suppresses downstream diversity, whereas supervising only the shared repair prefix achieves the best balance between recovery success and return diversity. These findings motivate targeted recovery supervision on deep, teacher-recoverable prefixes.
  • The "Lost-but-Recoverable" Zone: Between 40% and 70% of the way through a failed derivation, student self-recovery plummets below 9.7%. Yet, a strong teacher (Qwen3-4B-Base-GRPO) can still salvage the exact same botched state 61.4% of the time (even at 70% depth!). Mistakes aren't fatal until very late; students just lack the U-turn skill.
  • Convergent Repairs, Divergent Solutions: When you ask a teacher to rescue a flawed derivation 10 different times, the successful rescues look remarkably identical for the first ~3 reasoning steps (agreement > 0.81), and then splinter wildly into different valid approaches by step 6 (agreement < 0.37). Isolating the pivot is separable from dictating the rest of the proof.
  • Full-Return Supervision Overcommits: Training a student to imitate the entire teacher rescue destroys its downstream creativity (return diversity drops to 0.29) and hurts multi-try recovery. Teaching only the shared 3-step repair more than doubles diversity (0.63) and yields the highest recovery rates.

Key Results

Using Qwen3-4B-Base-GRPO as the teacher and Qwen3-1.7B-Base and Qwen2.5-3B-Instruct as students:

  • Big Accuracy Jumps: On Qwen3-1.7B-Base, CoTrek boosts average accuracy across all four math benchmarks to 51.71% (up from 45.53% for Vanilla OPD and 48.35% for strong baseline GSPO-OPD). On the brutal AIME 2024 test, it beats Vanilla OPD by +6.84 percentage points (38.64% vs. 31.80%).
  • Superior Recovery: Multi-sample recovery success (Rec@8) jumps by +9.27 points over Vanilla OPD (reaching 65.47%), while maintaining high solution diversity (0.58 vs. 0.39).
  • Long-Horizon Scaling: As generation lengths increase, CoTrek’s lead over Vanilla OPD widens from 2.1 to 8.9 percentage points. Even when strictly matching total compute (accounting for prefix mining overhead), CoTrek still outperforms GSPO-OPD by 2.80 points, and a lightweight mining proxy retains 51.02% accuracy at just 1.13× the GPU-hours of Vanilla OPD.

Limitations and Future Work

Not explicitly given its own section in the main text (some compute overhead and proxy details are deferred to the missing appendices), though the authors note two natural boundaries visible in their empirical analysis:

  • Late-Stage Irrecoverability: At very deep prefixes (e.g., >80% depth), even the teacher's ability to recover drops off sharply, making teacher signals sparse and noisy if mined too aggressively.
  • Compute Overhead of Rollout Mining: Estimating recoverability via Monte Carlo rollouts requires extra sampling steps compared to Vanilla OPD, which the authors mitigate in practice using a lightweight mining proxy (requiring 1.13× Vanilla OPD GPU-hours).

Summary updated

Abstract

On-policy distillation has emerged as an efficient paradigm for improving long chain-of-thought reasoning in large language models, where the student learns from its own rollouts while receiving dense teacher feedback on the states it actually visits. Prior work in this paradigm has focused on advancing \textit{continuation learning} through better teacher scoring, more stable optimization, or more learnable traces, yet largely overlooks a critical failure mode in long-horizon reasoning: once the student drifts at a deep prefix, the bottleneck is no longer how to \textit{continue} from the current path but how to \textit{recover} to an effective one. To address this gap, we propose \ourmethod, a recovery-centric framework for on-policy distillation in long chain-of-thought reasoning. \ourmethod operates on student-generated deep prefixes that have already drifted off track yet still admit successful teacher recovery. From each such prefix, it samples multiple teacher recoveries, extracts the short \textit{repair segment} they share, and trains the student to produce this repair before continuing the remaining reasoning on policy. This design shifts the distillation target from full-suffix imitation to focused path re-entry. To further support long-horizon learning, \ourmethod follows a depth curriculum that expands training depth according to the observed recovery gap, allowing the student to progressively extend its effective reasoning horizon. Extensive experiments on long chain-of-thought benchmarks demonstrate that \ourmethod delivers (I) \textbf{substantial performance gains}, improving strong on-policy distillation baselines by up to $6.84\%$ in final accuracy and $9.27\%$ in recovery success; and (II) \textbf{strong long-horizon robustness}, bringing $3.11\%$--$7.46\%$ gains on deeper prefix regimes and consistent pass@$k$ improvements under longer reasoning horizons.
BibTeX
@inproceedings{zhang2026cotrek,
  author = {Heng Zhang and Chengyu Zhou and Jiajun Wu and Xinyuan Liu and Liheng Zhang and Yueqi Guo and Rui Liu and JiaHao Hong and Xuanxun Lian and Jinpeng Lu and Jin Huang},
  title = {{CoTrek: Toward Scalable On-Policy Distillation for Long Chain-of-Thought Reasoning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=DsDVXNgrHK},
}
Figure