オン・ポリシー蒸留
ケビン・ルーらによる、思考機械におけるオン・ポリシー蒸留の研究についての記事。
キーポイント
LLMのトレーニングはプレトレーニング、ミッドトレーニング、ポストトレーニングの3段階に分類できる
ポストトレーニングにはオンポリシー(学生モデル自身の出力を評価)とオフポリシー(外部ソースからの模倣)の2つのアプローチがある
オンポリシートレーニングはRLを用いるが、フィードバックが疎で非効率な場合がある
蒸留(distillation)では教師モデルの出力分布を学生モデルに学習させ、教師の思考過程を含む完全なトークン列を使用できる
小型モデルはプライバシー、継続的更新、推論コスト削減などの利点があり、適切なポストトレーニング手法で専門領域で大規模モデルを上回る性能を発揮できる
影響分析・編集コメントを表示
影響分析
この記事はLLMの効率的な小型化と専門化に向けたトレーニング手法を体系的に整理しており、実用展開におけるコスト削減と性能向上の両立に重要な示唆を与える。特にオンポリシー蒸留の課題とオフポリシー蒸留の実践的アプローチを明確にすることで、企業や研究機関のモデル開発戦略に直接影響する内容となっている。
編集コメント
LLMの実用展開におけるコストと性能のトレードオフを解決する具体的なトレーニング手法に焦点を当てた、実務家にとって非常に参考になる分析記事。
記事タイトル: On-Policy Distillation(方策蒸留)
本記事は、大規模言語モデル(LLM)の専門領域における高性能化を実現するための訓練手法、特に「方策蒸留」に焦点を当てている。LLMが特定分野で専門家並みの性能を発揮するには、一般的な能力を教える「事前訓練」、専門知識を付与する「中間訓練」、特定の振る舞いを引き出す「事後訓練」という3段階の訓練アプローチが必要とされる。
専門分野においては、訓練を強化した小型モデルが、汎用の大型モデルを上回る場合が多い。小型モデルには、ローカル展開によるプライバシー・セキュリティの向上、継続的学習の容易さ、推論コストの削減といった利点がある。これらの利点を活かすためには、事後訓練の適切な手法選択が重要となる。
事後訓練は、「生徒」モデルの生成結果自体を用いる「方策訓練」と、外部ソースの目標出力を模倣する「方策外訓練」の二種に大別される。例えば、数学問題を解くコンパクトモデルを訓練する場合、方策訓練では強化学習を用い、生徒モデルが生成した回答(ロールアウト)が正解かどうかを「教師」モデルや人間が評価し、報酬として与える。この手法の強みは、自身のサンプルから学ぶことで、誤りをより直接的に回避する方法を学習できる点にある。
しかし、強化学習ベースの方策訓練には重大な欠点もある。それは、フィードバックが非常に疎(スパース)であることだ。一連の生成トークン数に関わらず、試行全体に対して「正解」か「不正解」という限られた情報しか与えられない。そのため、具体的にどこで間違えたのか(計算順序か、算術自体か)を学習できず、訓練が非効率になりがちである。
一方、方策外訓練では、教師付きファインチューニング(SFT)がよく用いられる。これは、教師モデルなどが生成した、タスクに特化したラベル付き事例データセットで訓練する方法である。ここで効果的なのが「蒸留」のメカニズムで、生徒モデルが教師モデルの出力分布に一致するように訓練する。教師の軌跡(思考過程を含む生成トークン列全体)を用い、各ステップでの教師の完全な次トークン分布(ロジット蒸留)を学習させるか、またはサンプリングされた系列を学習する。これにより、教師の推論過程や知識を濃縮して引き継がせることが可能となる。
要約すると、専門性の高い小型モデルを開発するには、事前・中間・事後という訓練ステージを適切に設計する必要がある。事後訓練においては、直接的な誤り回避を学べるがフィードバックが疎な「方策訓練(強化学習)」と、教師の詳細な推論過程を効率的に模倣できるが外部データに依存する「方策外訓練(蒸留)」の特性を理解し、目的に応じて使い分けたり組み合わせたりすることが鍵となる。
原文を表示
On-Policy Distillation - Thinking Machines Lab On-Policy Distillation
LLMs are capable of expert performance in focused domains, a result of several capabilities stacked together: perception of input, knowledge retrieval, plan selection, and reliable execution. This requires a stack of training approaches, which we can divide into three broad stages:
Pre-training teaches general capacities such as language use, broad reasoning, and world knowledge.
Mid-training imparts domain knowledge, such as code, medical databases, or internal company documents.
Post-training elicits targeted behavior, such as instruction following, reasoning through math problems, or chat.
Smaller models with stronger training often outperform larger, generalist models in their trained domains of expertise. There are many benefits to using smaller models: they can be deployed locally for privacy or security considerations, can continuously train and get updated more easily, and save on inference costs. Taking advantage of these requires picking the right approach for the later stages of training.
Approaches to post-training a “student” model can be divided into two kinds:
On-policy training samples rollouts from the student model itself, and assigns them some reward.
Off-policy training relies on target outputs from some external source that the student learns to imitate.
For example, we may wish to train a compact model to solve math questions such as:
We can do on-policy training via reinforcement learning, by grading each student rollout on whether it solves the question. This grading can be done by a human, or by a “teacher” model that reliably gets the correct answer.
The strength of on-policy training is that by training on samples from itself, the student learns to avoid mistakes in a more direct way. But RL has a major downside: it provides very sparse feedback, teaching a fixed number of bits per training episode regardless of the number of tokens used. In our example above, the student learns that “21” is the wrong answer and updates away from producing the rollout it tried. But it doesn’t learn where exactly the mistake was made, whether it got the order of operations wrong or erred in the arithmetic itself. This sparsity of feedback makes RL inefficient for many applications.
Off-policy training is often done with supervised fine-tuning (SFT): training on a curated set of task-specific labeled examples. The source of these labeled examples can be a teacher model that is proven to perform well on the task at hand.
We can use a mechanism called distillation: training the student to match the output distribution of a teacher model. We train on teacher trajectories: the complete sequence of generated tokens including intermediate thinking steps. We can use the teacher’s full next-token distribution at each step (often called “logit distillation”) or just sample given sequences. In practice, sampling sequences provides an unbiased estimation of the teacher’s distribution and arrives at the same objective. The student updates towards each token in the sequence in proportion to how unlikely it was to generate that token itself, represented by darker color in the example below:
Distillation from large model teachers has proven effective in training small models to follow instructions,Alpaca: A Strong, Replicable Instruction-Following Model (Taori et al, 2021) reason on math and science,OpenThoughts: Data Recipes for Reasoning Models (Guha et al, 2025) extract clinical informationDistilling Large Language Models for Efficient Clinical Information Extraction (Vedula et al, 2025) from medical notes, and engage in multi-turn chat dialogues.Enhancing Chat Language Models by Scaling High-quality Instructional Conversations (Ding et al, 2023) The distillation datasets used for these and other applications are often open-sourced and published.
The drawback of off-policy training is that the student learns in contexts frequented by the teachers, not ones the student itself will often find itself in. This can cause compounding error: if the student makes an early mistake that the teacher never makes, it finds itself diverging ever farther from the states it observed in training. This problem becomes particularly acute when we care about the student’s performance on long sequences. To avoid this divergence, the student must learn to recover from its own mistakes.
Another issue observed with off-policy distillation is that the student can learn to imitate the teacher’s style and confidence but not necessarily its factual accuracy.The False Promise of Imitating Proprietary LLMs (Gudibande et al, 2023)
If you’re learning to play chess, on-policy RL is analogous to playing games with no coaching. The feedback of winning or losing a match is tied directly to your own play, but is received only once per match and doesn’t tell you which moves contributed most to the outcome. Off-policy distillatio
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み