Contractive Restoring Flows: Robust Reasoning Distillation via Orbital Stability

Dongqi Zuo, Yuanyuan Wang, Chuan Zhou, Mingming Gong, Haoxuan LiNeurIPS 2026

TL;DR

Teaching a tiny language model to reason like a massive one usually involves making the student mimic the teacher’s internal hidden states step-by-step—a strategy that breaks down during long chains of thought when small errors inevitably snowball. Borrowing from dynamical systems theory, the authors introduce Contractive Restoring Flows (CRF), a distillation method that acts like invisible guardrails in latent space, actively pulling a drifting student model back onto the teacher’s reasoning path. The result is a tiny model that doesn't just memorize the path, but knows how to recover when it stumbles.

What Problem Does This Paper Address?

Imagine teaching someone to drive by having them copy your exact steering wheel positions on an empty track. That works until they hit a patch of gravel in the real world; once pushed an inch off-course, they have no idea how to steer back onto the line.

This is the hidden flaw in modern LLM distillation. Recent methods go beyond matching output tokens to "trajectory cloning"—forcing a compact student model's hidden states to match a giant teacher’s layer-by-layer. Mathematically, this is a zeroth-order constraint: it tells the student what its residual function should output at the exact point of the teacher's state, but leaves the first-order behavior (the layer-wise Jacobians, or local slopes) completely unconstrained.

At inference time, approximation errors and autoregressive drift inevitably nudge the student off the teacher's ideal path. Worse, because Transformers rely on residual connections ($h_{l+1} = h_l + f(h_l)$), the identity mapping passes perpendicular errors straight through from layer to layer unchanged—a precarious state called marginal stability. Over a long reasoning chain, those unchecked sideways drifts compound until the logic completely derails.

Figure 1: Illustration of transversal dynamics. Left: a marginally stable trajectory-matching solution with ∥P⊥Jl∥2 = 1. Right: the CRF contraction target ∥P⊥Jl∥2 = 1 −α < 1.

Methods

The authors reframe the Transformer’s residual stream as a discrete dynamical system and design a training objective that enforces orbital stability—creating a "basin of attraction" around the teacher's reasoning trajectory.

First, to bridge models of vastly different sizes (e.g., a 72B teacher and a 0.5B student), they map selected teacher layers into the student's latent space via learned linear projections. At each layer, the teacher's step forward defines a tangential direction (forward reasoning progress), while everything perpendicular to it defines the transversal subspace (sideways error).

To shape the student's local slopes without computing massive Jacobian matrices directly, the Contractive Restoring Flow (CRF) training runs in two phases:

  1. Geometry Extraction: Extract the teacher’s step vector, its tangent direction, and its magnitude. Because not every Transformer layer actively computes reasoning steps, a smooth kinetic gate turns off the CRF loss in "passive" layers where the teacher's step is near zero, preventing the student from hallucinating directions out of noise.
  2. Noise Probing & Restoring Force: Inject tiny isotropic Gaussian noise ($\delta$) around the teacher’s state and feed it to the student. The CRF loss penalizes the student unless its transversal response actively pushes back against the noise by a fraction $-\alpha P_\perp \delta$ (where $P_\perp$ projects onto the perpendicular subspace).
Figure 2: Two-phase CRF training. Phase I extracts the teacher’s residual flux, tangent directions, and kinetic-gate weights. Phase II probes the student with noise and computes the CRF loss.

Crucially, CRF is tangentially agnostic: it leaves movement along the forward reasoning path untouched (letting standard Supervised Fine-Tuning handle pacing) while forcing sideways deviations to contract at a strict rate of $1 - \alpha$ per active layer.

Datasets

  • Training: An offline, teacher-generated Chain-of-Thought (CoT) corpus paired with extracted hidden-state trajectories (generation details are deferred to the paper's appendix). No new benchmarks are introduced.
  • Evaluation: Assessed across three reasoning benchmarks: AIME 2024 (competition math), MBPP (code generation), and LiveCodeBench / LCB (out-of-distribution coding).

Key Insights and Ideas

  • Not all errors are created equal: Drifting parallel to the teacher's trajectory is just a change in pacing; drifting perpendicular to it means falling off the reasoning path entirely. Only the perpendicular subspace needs contraction.
  • Defeating the residual highway: Simply penalizing Jacobian norms drives the residual block's derivative to zero, leaving the residual skip-connection ($I$) intact—which means errors still coast through at rate $1$. Adding the explicit $-\alpha P_\perp \delta$ shift creates an active restoring force that cancels out part of the identity mapping, turning marginal stability ($1$) into strict contraction ($1 - \alpha < 1$).
  • Cross-tokenizer resilience: Distribution-matching distillation struggles when teacher and student use different tokenizers or routing (like distilling Mixture-of-Experts into dense models). Geometric stability in latent space transfers cleanly across architectural boundaries where logit alignment breaks down.

Key Results

  • Extreme Compression Gains: Distilling Qwen2.5-72B into Qwen2.5-{7B, 3B, 0.5B}, CRF beats token-, logit-, and hidden-state baselines across the board. Its biggest advantage emerges at extreme compression (140$\times$ down to 0.5B), achieving a +7.2 average percentage point gain over the base model across AIME, MBPP, and LCB (outperforming hidden-state matching at +6.8 and Standard KD at +1.1).
  • Cross-Architecture & MoE Transfer: When distilling massive MoE teachers (Qwen3-235B, DeepSeek-V3, GPT-OSS) into dense Qwen3 students, logit baselines drop sharply on cross-family teachers, whereas CRF maintains strong average gains (e.g., +7.4 and +7.9 points on the 0.6B student from DeepSeek-V3 and GPT-OSS, respectively). Similar wins hold for LLaMA and Mistral students.
  • Mechanistic Verification: Probing trained models with finite-difference projections confirms that CRF's transversal Jacobian norms cluster tightly around the theoretical $1 - \alpha$ target, while ablating the restoring force collapses the norm right back to $1.0$. When researchers injected live Gaussian noise into every layer at inference time ($\sigma = 0.2$), baseline 0.5B models completely collapsed to near 0% on AIME, while CRF remained functional.

Limitations and Future Work

  • White-box overhead: CRF requires extracting and storing per-layer teacher hidden states offline, ruling out API-only (black-box) teachers. The authors plan to explore extending orbital stability ideas to logit- or token-only distillation.
  • Linearization and unmeasurable constants: The multi-layer stability proofs hold within a local first-order Taylor regime, and theoretical thresholds depend on network constants (like global Jacobian bounds and trajectory curvature) that cannot be directly measured in trained Transformers—meaning hyperparameters like $\alpha$ must still be tuned empirically rather than calculated a priori. Developing measurable validation criteria is a key target for future work.

Summary updated

Abstract

Model distillation provides an alternative when computing resources are limited. How to transfer the reasoning ability from teacher model to student model influences the performance of model distillation. We develop a mathematical framework for reasoning distillation grounded in dynamical systems theory. By modeling the teacher model's residual stream as a discrete dynamical system, we define a precise notion of *orbital stability*: perturbations transversal to the teacher's reasoning trajectory should contract, while the tangential reasoning signal propagates without active suppression. We derive the **Contractive Restoring Flow (CRF)** loss from first principles and prove that, at the loss minimum, it achieves strict transversal contraction at a constant rate $1-\alpha$, leaves the tangential dynamics unconstrained (tangential agnosticism), and produces a global basin of attraction with bounded steady-state error within the linearisation regime. Empirically, reasoning-trajectory distillation with the CRF loss outperforms other distillation methods, and shows greater robustness on long-chain reasoning tasks, supporting the predicted effect of contracting transversal error. The code is avaiable at: https://github.com/DongqiZuo00/Contractive-Restoring-Flows.
BibTeX
@inproceedings{zuo2026contractive,
  author = {Dongqi Zuo and Yuanyuan Wang and Chuan Zhou and Mingming Gong and Haoxuan Li},
  title = {{Contractive Restoring Flows: Robust Reasoning Distillation via Orbital Stability}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=Qi4A0JHEhM},
}
Figure