Source-linked AI summary

Rethinking Large Language Model Distillation: A Constrained Markov Decision Process Perspective

Matthieu Zimmer, Xiaotong Ji, Tu Nguyen, Haitham Bou Ammar

arXiv:2509.22921v1cs.LGcs.AI

TL;DR

LLM distillation must balance task reward with fidelity to a teacher, while common reward-weighting approaches can require difficult tuning. This paper formulates distillation as constrained RL and adapts Saute without state augmentation or teacher access at test time. Experiments report better reasoning quality and constraint satisfaction alongside competitive task performance.

  • Problem

    Conventional distillation emphasizes student–teacher divergence, while reward-weighted methods require balancing reward and fidelity; neither approach alone addresses both concerns cleanly for reasoning tasks.

    Source: §1 · p. 1
  • Method

    The method maximizes task reward subject to a divergence threshold, adapting Saute through reward reformulation without state augmentation or teacher access at test time.

    Source: §1 · pp. 2–3, §3.1 · p. 4
  • Results

    Experiments report better reasoning quality and constraint satisfaction with competitive final-answer correctness on mathematical reasoning tasks.

    Source: §1 · p. 3
  • Takeaways & Limitations

    The framework identifies a Pareto-front point balancing divergence minimization, reward maximization, and reasoning quality in mathematical reasoning distillation.

    Source: §1 · p. 3

    The theoretical statements adopt a per-episode stationary view with a fixed student policy and apply uniformly over fixed policies on the reachable set.

    Source: §3.3 · p. 6

Abstract

from arXiv · show

We introduce a novel approach to large language model (LLM) distillation by formulating it as a constrained reinforcement learning problem. While recent work has begun exploring the integration of task-specific rewards into distillation processes, existing methods typically rely on ad-hoc reward weighting. We propose a principled optimization framework that maximizes task-specific rewards while constraining the divergence from the teacher model to remain below a specified threshold. Our approach adapts constrained state augmented reinforcement learning to the distillation setting, introducing a modified reward function that maintains theoretical guarantees of constraint satisfaction without requiring state augmentation or teacher model access during deployment and without the computational overhead of the dual Lagrangian methods. Through extensive experiments on mathematical reasoning tasks, we demonstrate that our method achieves better constraint satisfaction rates and better reasoning compared to the soft Lagrangian relaxation baselines while maintaining competitive task performance. Our framework provides a theoretically grounded and practically efficient solution for reward-aware distillation in resource-constrained settings.

1 INTRODUCTION

The paper frames LLM distillation as maximizing task reward subject to a bound on student–teacher divergence. It adapts constrained RL for distillation and reports stronger reasoning quality and constraint satisfaction while maintaining competitive task performance.

1 INTRODUCTION

  • KL-focused distillation can force smaller students to imitate complex teacher reasoning, while reward-only optimization cannot guarantee correct reasoning steps.The introduction motivates balancing teacher fidelity with task-specific reward rather than relying on either alone.Source: §1 · p. 1
  • The method formulates distillation as constrained RL, maximizing task reward while keeping student–teacher divergence below a predefined threshold.The threshold is specified directly in KL scale; once the constraint is satisfied, the objective reduces to reward maximization.Source: §1 · pp. 2–3
  • Figure 1 illustrates that reward maximization alone can yield flawed reasoning even when a response reaches the correct answer.The GRPO example makes an erroneous intermediate result before an extra rounding step reaches 5.Source: Figure 1 · p. 2, §1 · p. 3
  • Experiments show better reasoning quality and constraint satisfaction with competitive final-answer correctness.The comparison covers Qwen2.5-1.5B-Math and Llama-3.2-3B across three evaluation datasets.Source: Figure 2 · p. 2, §1 · p. 3
  • The method adapts Saute by reformulating the reward without state augmentation, retaining theoretical guarantees while avoiding teacher access at test time.The paper presents this as a more efficient and practical solution for distillation.Source: §1 · pp. 2–3

2 BACKGROUND

The background contrasts imitation-focused distillation with reward-aware approaches, then introduces constrained RL as a way to maximize task reward under a divergence budget. State augmentation can enforce that constraint, but direct use would require teacher access during student inference.

2.1 DISTILLATION

  • Standard distillation minimizes student–teacher divergence, but on complex reasoning tasks it can miss better-performing solution paths suited to a smaller student's capacity.Reward-based distillation instead combines expected task reward with a divergence regularizer, though choosing its weighting parameter can require extensive task-specific retraining.Source: §2.1 · p. 3

2.2 CONSTRAINED REINFORCEMENT LEARNING

  • Constrained RL frames distillation as maximizing task-specific reward while keeping expected student–teacher divergence below a predefined budget.The formulation models prompts with partial responses as states and generated next tokens as actions.Source: §2.2 · pp. 3–4
  • Saute tracks remaining budget in an augmented state and penalizes trajectories that exhaust it, yielding feasible policies as the penalty grows under standard assumptions.This avoids the computational overhead of Lagrange multipliers and dual ascent.Source: §2.2 · p. 4
  • Direct state augmentation would require computing divergence with the teacher at every step, undermining the goal of a student that operates independently.The paper identifies this deployment requirement as impractical for distillation.Source: §2.2 · p. 4

3 METHOD

The method removes state augmentation while preserving hard-constraint semantics, then optimizes a modified reward with policy gradients. Its theoretical results establish equivalence to the augmented formulation and almost-sure constraint satisfaction under stated assumptions.

3.1 CONSTRAINED RL FOR LLM DISTILLATION

  • The unaugmented formulation retains hard-constraint semantics by reconstructing the remaining budget from the full interaction history and penalizing infeasible trajectories more when they diverge further from the teacher.The discrepancy term may use an f-divergence such as KL or Jensen–Shannon divergence; feasible trajectories retain task-specific reward.Source: §3.1 · pp. 4–5

3.2 POLICY GRADIENT OPTIMIZATION

  • Policy-gradient optimization decomposes the update into a likelihood-ratio term and an explicit reward-dependence term, under differentiability and integrability assumptions.In practice, the discrepancy uses KL with a small probability floor to ensure finiteness and differentiability.Source: §3.2 · p. 5

3.3 THEORETICAL GUARANTEE FOR CONSTRAINT SATISFACTION

  • Under standard assumptions, the unaugmented and augmented formulations have equivalent optimal values, and finite-value optimal policies satisfy the constraint almost surely.The student can operate at test time without teacher access, computing cumulative reward from its own output distribution and environment feedback.Source: §3.3 · pp. 5–6

4 EXPERIMENTS

The experiments compare two student–teacher distillation settings using shared GRPO-based baselines and multiple measures of task performance, reasoning, and teacher divergence. They are organized around general method performance, constraint satisfaction, reward use, and reasoning.

4.1 EXPERIMENTAL SETUP

  • Two settings distill Qwen2.5-1.5B-Math from Qwen2.5-7B-Math-Instruct on GSM8K training data and Llama-3.2-3B from Llama-3.2-11B-Instruct on MATH training data.Checkpoints are evaluated after 20 epochs on GSM-Symbolic (main), GSM8K test, and the whole MATH test set.Source: §4.1 · p. 6
  • Baselines are reimplemented under GRPO with the same batch composition, learning rate, and AdamW optimizer for fair comparison.The baseline set covers task-reward optimization, KL-only distillation, and hybrid reward–KL objectives; the hybrid multiplier is grid-searched over five values.Source: §4.1 · pp. 6–7
  • Evaluation measures final-answer correctness, judged reasoning quality, constraint satisfaction, and average student–teacher KL divergence.The reasoning judge receives the correct final answer to focus its pairwise assessment on the reasoning path.Source: §4.1 · p. 7

4.2 EXPERIMENT RESULTS

  • The results section is organized around the best general method, constraint satisfaction, external reward for distillation, and whether distillation improves reasoning.Source: §4.2 · p. 7

A. What is the best method in general?

The constrained RL approach is presented as the most balanced profile across the five metrics, with strengths in reasoning quality and constraint satisfaction while maintaining competitive final-answer correctness.

B. Is our method able to achieve higher constraints satisfaction?

Across configurations, the method is reported to achieve superior constraint satisfaction while retaining competitive final-answer correctness, occupying a distinct region of the Pareto front.

  • Without ϕ, the method would struggle to satisfy a strict constraint because all trajectories receive the same penalty and training would diverge.Source: B. Is our method able to achieve… · p. 7
  • The method achieves superior constraint satisfaction while maintaining competitive final-answer correctness across the compared configurations.Source: B. Is our method able to achieve… · p. 7, Figure 3 · p. 8
  • The Pareto analysis compares final-answer correctness against constraint satisfaction across methods and hyperparameter settings for Qwen2.5-1.5B-Math.Each plotted point is a method configuration, and red points mark the Pareto front.Source: Figure 3 · p. 8

C. Can external reward help achieve better distillation?

Task-specific rewards distinguish reward-based distillation from purely KL-based methods on final answer correctness and reasoning win rates.

C. Can external reward help achieve better distillation?

  • Pure KL minimization methods achieve lower final answer correctness than reward-based methods on every dataset for each model.The comparison includes GRPO, GKD-GRPO variants, and the proposed method versus GKD and Mini-LLM.Source: C. Can external reward help achieve… · p. 8
  • Reward-based methods also achieve higher reasoning win rates than purely KL-based methods.The passage attributes this improvement to the use of the reward function.Source: C. Can external reward help achieve… · p. 8
  • Task-specific rewards help students learn more effective reasoning strategies rather than merely mimic the teacher’s surface-level outputs.Source: C. Can external reward help achieve… · p. 8

D. Does the distillation signal help to better reason?

The constrained approach improves reasoning quality over pure reward optimization while keeping success rates competitive. The reported comparisons and example distinguish valid reasoning from answer correctness alone.

D. Does the distillation signal help to better reason?

  • In the test example, both methods give the correct final answer, but only the proposed method produces logically valid reasoning steps.More examples are provided in Appendix F.Source: D. Does the distillation signal help… · p. 8
  • 12–19% reasoning win rates and 39–55% loss rates accompany GRPO’s 75–80% raw final answer correctness, while the constrained method improves reasoning and maintains competitive success rates.Figure 4 averages pairwise comparisons across Apple/GSM-Symbolic, GSM8K, and MATH with Qwen; darker colors indicate superior row-to-column performance.Source: Figure 4 · p. 8, D. Does the distillation signal help… · p. 8
  • Across the reported evaluation dimensions, the constrained approach maintains high constraint satisfaction, leverages external rewards for task performance, and preserves teacher reasoning capabilities in the student.The paper says existing approaches typically excel in only one aspect of the distillation objective.Source: D. Does the distillation signal help… · pp. 8–9

5 RELATED WORKS

Related work moves from distribution-matching distillation toward task-aware signals and constrained reinforcement learning. The paper positions explicit KL constraints as a principled response to fixed-penalty limitations and LLM-scale optimization costs.

5 RELATED WORKS

  • Conventional distillation aligns teacher and student output distributions, often using reverse KL, but does not explicitly guarantee preservation of reasoning abilities on complex tasks (Hinton et al., 2015; Gu et al., 2024; Zimmer et al., 2025).RL-based distillation treats KL divergence as a dense token-level reward; general-purpose methods use REINFORCE-style updates, while Mini-LLM separates long-term reward from a single-step objective (Agarwal et al., 2024; Ko et al., 2024; 2025; Gu et al., 2024).Source: §5 · p. 9
  • Task-aware approaches add process supervision, task-relevant logit weighting, or retrieval, but can require fine-grained annotations, complex weighting heuristics, or external knowledge bases (Hsieh et al., 2023; Adarsh et al., 2024; Chen et al., 2025; Li et al., 2025; 2024; Saadi & Wang, 2025; Kang et al., 2023; Tian et al., 2025).Source: §5 · p. 9
  • Task-specific constrained RL distillation remains relatively under-explored, and fixed KL penalties can be brittle when students exploit rewards through shallow or degenerate reasoning.In distillation, KL is intended to constrain divergence to preserve the teacher’s reasoning capabilities, unlike its regularization role in standard RLHF settings.Source: §5 · p. 9
  • The paper treats KL divergence as an explicit trust-region constraint and reformulates the dual Lagrange problem within a state-augmented MDP to provide an efficient solution practical at LLM scale (Schulman et al., 2015; Achiam et al., 2017; Calvo-Fullana et al., 2024; Sootla et al., 2022a;b).The passage identifies compute, memory, and variance costs from teacher forward passes, cached logits, and inner-loop or dual updates as practical challenges (Achiam et al., 2017).Source: §5 · p. 9

6 CONCLUSION

The conclusion frames the method as constrained reinforcement-learning distillation that balances task performance and teacher fidelity without classic state augmentation or dual max-min costs. The policy-gradient appendix describes how the optimization handles feasible, infeasible, and boundary trajectories.

6 CONCLUSION

  • The framework maintains constraint-satisfaction guarantees without classic state augmentation and navigates the trade-off between task-specific performance and teacher fidelity.The conclusion also describes avoiding brittle ad-hoc reward weighting and the costs of traditional dual max-min optimization.Source: §6 · pp. 9–10
  • Experiments on mathematical reasoning show that strict KL divergence constraints can be enforced with high fidelity while maintaining competitive task rewards.Source: §6 · p. 10

A DERIVATION OF POLICY GRADIENT

  • Assumption A1 requires the discrepancy function and its gradient to be well-behaved; the implementation uses KL divergence and overlapping support, for example via a probability floor.These conditions keep the discrepancy finite and its gradient bounded across states.Source: A DERIVATION OF POLICY GRADIENT · p. 15
  • The explicit-dependence gradient term vanishes on strictly feasible trajectories but reduces to the negative discrepancy gradient after budget violation.Source: A DERIVATION OF POLICY GRADIENT · p. 15
  • At the constraint boundary, the reward is nondifferentiable, so the derivation uses a generalized Mordukhovich subgradient and takes a limiting subgradient from the infeasible side with tolerance ε ↓0.The passage notes that hitting the boundary exactly is unlikely in the continuous constraint setting.Source: A DERIVATION OF POLICY GRADIENT · p. 15
  • Near the optimum, the explicit-dependence term disappears on feasible trajectories while continuing to signal trajectories that violate or approach the constraint boundary.The passage also reports that this term contributes to variance reduction during training.Source: A DERIVATION OF POLICY GRADIENT · p. 15

B PROOFS OF CONSTRAINT SATISFACTION GUARANTEE

The appendix establishes the constraint-satisfaction guarantee for the unaugmented MDP and relates contextual and standard MDP formulations. It also documents reward and KL design, training settings, and supplementary results and generated-answer examples.

B PROOFS OF CONSTRAINT SATISFACTION GUARANTEE

  • Under B1–B3, the unaugmented MDP satisfies the Bellman equation, and an optimal policy with finite value is optimal for the constrained MDP and satisfies its constraint almost surely.The optimal value functions also converge monotonically.Source: B PROOFS OF CONSTRAINT SATISFACTION… · pp. 16–17

C A PERSPECTIVE OF LLM DISTILLATION AS CONTEXTUAL MDPS

  • With context fixed within an episode, the contextual and standard MDP formulations are equivalent in return and have coinciding optimal policies on the reachable set.The paper motivates the standard MDP by freezing the student within each episode and fixing the teacher during distillation.Source: C A PERSPECTIVE OF LLM DISTILLATION AS… · p. 17

D.1 REWARD FUNCTION DESIGN

  • For mathematical reasoning, the reward is binary and assigned only after the complete solution: 1.0 for a correct final answer and 0.0 otherwise.Intermediate steps are not evaluated in this sparse-reward setup.Source: §D.1 · p. 18

D.2 KL DIVERGENCE COMPUTATION

  • The student–teacher KL divergence is computed at each time step over the LLM vocabulary.The supplied passage identifies the vocabulary as V.Source: §D.2 · p. 18

D.3 HYPERPARAMETER SETTINGS

  • Training used a constraint threshold d = 0.35 and 20 epochs; Llama3.2-3B received KL-only distillation for its first three epochs to bootstrap unstable GRPO training.The threshold was selected using preliminary KL-minimization experiments.Source: §D.3 · p. 18

D.4 TRAINING TIME

  • Each method trained in less than two days on a single accelerator, with similar overall training time across methods.GRPO was only a little faster because backward passes and generation dominated total time.Source: §D.4 · p. 18

E MORE EXPERIMENTS RESULTS

  • Supplementary results cover Qwen2.5-1B on GSM8K and Llama3.2-3B on MATH; Figure 5 summarizes pairwise reasoning comparisons across three datasets.The table captions identify FAC, RWR, constraint satisfaction, KL, and RLR for GSM8K, and success rate, constraint satisfaction, and KL for MATH; they do not provide cell values.Source: Table 1 · p. 19, Table 2 · p. 19, Figure 5 · p. 19

F GENERATED ANSWERS

Loading 2509.22921v1…