Skip to main content
QUICK REVIEW

[論文レビュー] Learning by Distilling Context

Charlie Snell, Dan Klein|arXiv (Cornell University)|Sep 30, 2022
Topic Modeling被引用数 7
ひとこと要約

本論文では、自己生成された完了出力を用いた微調整によって、言語モデルがコンテキストトークン(例:指示、スクラッチパッド、例示)からのパフォーマンス向上を内部化できるようにする、コンテキスト distillation(文脈蒸留)という手法を提案する。この手法は、SPIDER Text-to-SQL において勾配降下法よりも9%高い正確性を達成し、段階的推論の能力を下流タスクに転送可能にする。

ABSTRACT

Language models significantly benefit from context tokens, such as prompts or scratchpads. They perform better when prompted with informative instructions, and they acquire new reasoning capabilities by generating a scratch-pad before predicting the final answers. However, they do not extit{internalize} these performance gains, which disappear when the context tokens are gone. Our work proposes to apply context distillation so that a language model can improve itself by internalizing these gains. Concretely, given a synthetic unlabeled input for the target task, we condition the model on ``[instructions] + [task-input]'' to predict ``[scratch-pad] + [final answer]''; then we fine-tune the same model to predict its own ``[final answer]'' conditioned on the ``[task-input]'', without seeing the ``[instructions]'' or using the ``[scratch-pad]''. We show that context distillation is a general method to train language models, and it can effectively internalize 3 types of training signals. First, it can internalize abstract task instructions and explanations, so we can iteratively update the model parameters with new instructions and overwrite old ones. Second, it can internalize step-by-step reasoning for complex tasks (e.g., 8-digit addition), and such a newly acquired capability proves to be useful for other downstream tasks. Finally, it can internalize concrete training examples, and it outperforms directly learning with gradient descent by 9\% on the SPIDER Text-to-SQL dataset; furthermore, combining context distillation operations can internalize more training examples than the context window size allows.

研究の動機と目的

  • コンテキストトークン(例:指示、スクラッチパッド)が削除された際に言語モデルがパフォーマンス向上を失うという制限を解消すること。
  • 外部コンテキストに依存せずに、段階的推論やタスク固有の指示といった複雑な能力を言語モデルが内部化できるようにすること。
  • 繰り返し蒸留を用いて、コンテキスト窓のサイズに収まらないほどの多くの例を蒸留することで、コンテキスト窓の制限を克服すること。
  • 既存の能力(例:指示に従う能力)を保持したまま、モデルのパフォーマンスを向上させる汎用的な訓練手法を開発すること。

提案手法

  • 教師モデルを用いて、指示とタスク入力を含む詳細なプロンプトに条件づけられたスクラッチパッドと最終的な答えを生成する。
  • 教師の完了出力から最終的な答えを抽出し、同じモデルを最小限の学生用プロンプトからの直接予測に微調整する。
  • 抽象的タスク指示、具体的な例(例:SPIDERからのもの)、段階的推論(例:8桁の加算)の3種類の信号に対して蒸留を適用する。
  • 継続的忘却を防ぐために、蒸留データとインライン学習の例の混合を用いる。
  • 繰り返し蒸留を適用して、コンテキスト窓に収まる例の数を超えて例を内部化し、継続的にパフォーマンス向上を観察する。
  • 合成された語呂の問題(加算を要する)のような関連する下流タスクで、蒸留された推論能力の転送性をテストすることで評価する。

実験結果

リサーチクエスチョン

  • RQ1言語モデルはコンテキスト蒸留を用いて抽象的タスク指示や説明を内部化できるか。また、反復的に更新可能か。
  • RQ28桁の加算のような段階的推論能力は、効果的に内部化され、他の推論タスクに転送可能か。
  • RQ3特にコンテキスト窓の制限下で、具体的な例から学習する際、直接の勾配降下法微調整を上回る性能をコンテキスト蒸留が達成できるか。
  • RQ4複数の蒸留ステップを組み合わせることで、コンテキスト窓のサイズを超えて、より多くのトレーニング例をモデルが内部化できるか。
  • RQ5蒸留された推論能力は、類似した認知的作業を要する、新しい未確認のタスクに一般化可能か。

主な発見

  • 8ショットの適応において、SPIDER Text-to-SQL データセットで、直接の勾配降下法微調整よりも9%高い正確性をコンテキスト蒸留が達成した。
  • 8桁の加算の段階的推論を蒸留した後、モデルの直接加算の正確性は1%から17%に上昇し、効果的な内部化が確認された。
  • 蒸留後のモデルは、指示に従うタスクで高いパフォーマンス(RougeL: 57 → 58)を維持しており、元の能力が著しく損なわれていないことが示された。
  • 蒸留された加算能力は、関連する推論タスクに転送され、合成された語呂の問題(加算を要する)では正確性が17%から30%に上昇した。
  • 反復的コンテキスト蒸留により、コンテキスト窓のサイズを超えてトレーニング例を内部化でき、より多くの蒸留ステップを経るほどパフォーマンスが継続的に向上した。
  • 本手法は、抽象的指示、具体的な例、構造的推論の異なる種類のトレーニング信号に一般化可能であり、広範な適用性を示した。

より良い研究を、今すぐ始めましょう

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。