HyperAIHyperAI

Command Palette

Search for a command to run...

オンポリシー学習かオフポリシー学習か?蒸留ダイナミクスの系統的研究

Julianna Piskorz Antonin Berthon Mihaela van der Schaar

概要

オンポリシー学習は、破局的忘却を低減し、よりスパースなパラメータ更新をもたらし、汎化を向上させると論じられてきた。しかし、教師ありファインチューニングと強化学習を比較する既存研究では多くの要因が同時に変動するため、ロールアウト方策の寄与を分離することは難しい。本研究は、制御された強いモデルから弱いモデルへの蒸留設定において、Llama 3およびQwen2.5のモデル系列と、科学・医療・算数領域にわたる推論タスクを対象に、ロールアウト方策、トークンレベルのKL方向、学習率を独立に変化させることで、ロールアウト方策の効果を検討する。分析からは、蒸留ダイナミクスにおいてロールアウト方策が必ずしも中心的役割を担わないという微妙な構図が明らかになった。むしろ、トークンレベルのKL方向がタスク性能と出力カバレッジをより明確に左右し、学習率が忘却と更新スパース性を制御する。KL勾配の分析と、生徒・教師間の連続的なロールアウト方策スペクトルに沿った実験はこのパターンを説明する。フォワードKLはロールアウト方策に対して著しく頑健で、ロールアウト方策が変化しても性能は安定して高いが、リバースKLはかなり敏感で、生徒が生成したロールアウトを好む。それでもオンポリシーデータは、両KL方向の下でCountdown算術タスクのより難しい変種への汎化を改善するが、この利点はその後のRLVR後も確実には持続しない。勾配クリッピングの除去、サンプリングされたKL推定量の使用、より長い推論連鎖を必要とするタスクでの学習に対しても、我々のより広範な結論は頑健である。総じて、オンポリシーロールアウトが本質的に好ましいという見方に挑戦し、その価値は目的関数、評価設定、最適化ハイパーパラメータに決定的に依存することを示す。

One-sentence Summary

Researchers at the University of Cambridge systematically investigate strong-to-weak distillation dynamics across Llama 3 and Qwen2.5 model families on reasoning tasks spanning scientific, medical, and arithmetic domains, independently varying rollout policy, token-level \mathrm{\mathrm{KL\mathrm{KL}KL}} direction, and learning rate, and find that forward KL remains robust to rollout policy while reverse KL favors student-generated rollouts, and that on-policy data improves generalization to harder Countdown arithmetic variants although this advantage does not reliably persist after subsequent RLVR.

Key Contributions

  • This paper presents a controlled strong-to-weak distillation study that independently varies rollout policy, token-level KL direction, and learning rate across Llama 3 and Qwen2.5 on scientific, medical, and arithmetic reasoning tasks. The results indicate that token-level KL direction more clearly shapes task performance and output coverage, while learning rate governs forgetting and update sparsity, and rollout policy does not necessarily play a central role.
  • Through KL gradient analysis and experiments along a continuous student-teacher rollout-policy spectrum, the paper shows that forward KL is robust to rollout policy changes, whereas reverse KL is more sensitive and favors student-generated rollouts.
  • On-policy data improves generalization to harder Countdown arithmetic variants under both KL directions, but this advantage does not reliably persist after subsequent RLVR. These conclusions remain robust without gradient clipping, with sampled KL estimators, and on tasks requiring longer reasoning chains, challenging the view that on-policy rollouts are inherently preferable.

Introduction

Post-training is central to developing reasoning capabilities in large language models, and strong-to-weak distillation has become a common way to transfer reasoning behavior from larger teachers to smaller students. On-policy rollouts have been credited with reducing catastrophic forgetting, producing sparser parameter updates, and improving generalization, but prior comparisons often confound rollout policy with changes in the training objective, supervision density, optimization procedure, and learning rate. The authors address this by using strong-to-weak distillation as a controlled testbed, independently varying rollout policy, KL direction, and learning rate across Llama 3 and Qwen2.5 models on scientific, medical, and arithmetic reasoning tasks. They find no consistent advantage from on-policy distillation in final in-distribution accuracy, catastrophic forgetting, or parameter-update sparsity; KL direction more strongly determines task accuracy and coverage, while learning rate governs forgetting and sparsity. Forward KL is robust to rollout policy, whereas reverse KL is substantially more sensitive and favors on-policy rollouts.

Method

5.1 Logit Gradients Reveal Differing Sensitivity to the Rollout Policy

To understand how the rollout policy affects optimization, the authors analyze token-level gradients of forward and reverse KL divergences. Let (zSθ)v,v∈V(z_S^\theta)_v, v \in \mathcal{V}(zSθ​)v​,v∈V denote the logit values produced by the student model at a fixed prefix, with πSθ(v)=softmax(zSθ)v\pi_S^\theta(v) = \mathrm{softmax}(z_S^\theta)_vπSθ​(v)=softmax(zSθ​)v​. Then the parameter gradients can be described as follows:

∇θDF−KL=∑v∈V(πSθ(v)−πT(v))∇θ(zSθ)v,\nabla_{\theta} D_{\mathrm{F-KL}} = \sum_{v \in \mathcal{V}} (\pi_S^\theta(v) - \pi_T(v)) \nabla_{\theta} (z_S^\theta)_v,∇θ​DF−KL​=v∈V∑​(πSθ​(v)−πT​(v))∇θ​(zSθ​)v​, ∇θDR−KL=∑v∈VπSθ(v)[log⁡πSθ(v)πT(v)−DR−KL]∇θ(zSθ)v.\nabla_{\theta} D_{\mathrm{R-KL}} = \sum_{v \in \mathcal{V}} \pi_S^\theta(v) \left[ \log \frac{\pi_S^\theta(v)}{\pi_T(v)} - D_{\mathrm{R-KL}} \right] \nabla_{\theta} (z_S^\theta)_v.∇θ​DR−KL​=v∈V∑​πSθ​(v)[logπT​(v)πSθ​(v)​−DR−KL​]∇θ​(zSθ​)v​.

These expressions reveal an important asymmetry. The forward-KL derivative with respect to the student logits is πSθ(v)−πT(v)\pi_S^\theta(v) - \pi_T(v)πSθ​(v)−πT​(v); it is therefore nonzero whenever the teacher and student next-token distributions differ, and each coordinate lies in [−1,1][-1, 1][−1,1]. Consequently, under bounded student-logit Jacobians ∇θ(zSθ)\nabla_\theta (z_S^\theta)∇θ​(zSθ​), the difference between forward-KL updates induced by two rollout policies is bounded linearly by the total-variation distance between the prefix distributions they induce. Hence, small changes in the trajectories generated by the rollout policy produce proportionally small changes in the forward-KL gradient.

For reverse KL, however, even a small rollout change can produce an arbitrarily large gradient change when the teacher and student assign very different probabilities to some tokens. Its logit derivative is weighted by the student probability πSθ(v)\pi_S^\theta(v)πSθ​(v), so it vanishes as the student probability approaches zero, even when the teacher assigns substantial probability to that token. Reverse KL may therefore struggle to recover teacher modes omitted by the student, reflecting its mode-seeking behavior. Conversely, when the student assigns appreciable probability to a token that the teacher considers extremely unlikely, the log ratio log⁡πSθ(v)/πT(v)\log \pi_S^\theta(v) / \pi_T(v)logπSθ​(v)/πT​(v) can become arbitrarily large, potentially producing sharp, high-variance updates that can destabilize training. Unlike forward KL, reverse KL admits no bound dependent solely on the rollout distance and the student-logit Jacobian.

These properties suggest that reverse KL is more sensitive to the rollout policy. While forward KL provides signal at any visited prefix where the policies disagree, reverse KL emphasizes student-supported, teacher-disfavored tokens and therefore depends more strongly on visiting the student's own prefix distribution.

Experiment

The study runs controlled distillation experiments comparing on-policy and off-policy rollouts while varying token-level KL direction and learning rate across medical, scientific, arithmetic, and longer math reasoning tasks, evaluating task accuracy, catastrophic forgetting, and parameter-update sparsity. The results show that rollout policy provides no consistent advantage for in-distribution performance, forgetting, or sparsity, whereas forward KL is more robust than reverse KL, and learning rate is the main factor governing forgetting and sparsity. A rollout-policy spectrum confirms that forward KL is relatively insensitive to the rollout distribution while reverse KL benefits from student-favored rollouts, and further analyses show that on-policy data can improve generalization to harder tasks and reduce incidental teacher-style transfer, though this advantage does not reliably persist after reinforcement learning. Ablations with sampled KL, no gradient clipping, and longer rollouts indicate that the main conclusions generalize, with only a suggestive on-policy benefit in the long-rollout reverse-KL setting.


AIでAIを構築

アイデアからローンチまで — 無料のAIコーディング支援、すぐに使える環境、最高のGPU価格でAI開発を加速。

AI コーディング補助
すぐに使える GPU
最適な料金体系

HyperAI Newsletters

最新情報を購読する
北京時間 毎週月曜日の午前9時 に、その週の最新情報をメールでお届けします
メール配信サービスは MailChimp によって提供されています