Skip to main content
QUICK REVIEW

[論文レビュー] How to prepare your task head for finetuning

Yi Ren, Shangmin Guo|arXiv (Cornell University)|Feb 11, 2023
Domain Adaptation and Few-Shot LearningComputer Science被引用数 3
ひとこと要約

本論文は、タスクヘッドの初期学習ダイナミクス、特にその「エネルギー」が特徴の適応にどのように影響するかを分析することで、微調整性能を向上させる原理的アプローチを提案する。学習をエネルギーと方向の成分に分解することで、ヘッドプロービングの早期停止に加え、ラベルスムージングとアーキテクチャの変更を組み合わせることで、制御された特徴適応が実現され、下流の性能が向上することを示している。

ABSTRACT

In deep learning, transferring information from a pretrained network to a downstream task by finetuning has many benefits. The choice of task head plays an important role in fine-tuning, as the pretrained and downstream tasks are usually different. Although there exist many different designs for finetuning, a full understanding of when and why these algorithms work has been elusive. We analyze how the choice of task head controls feature adaptation and hence influences the downstream performance. By decomposing the learning dynamics of adaptation, we find that the key aspect is the training accuracy and loss at the beginning of finetuning, which determines the "energy" available for the feature's adaptation. We identify a significant trend in the effect of changes in this initial energy on the resulting features after fine-tuning. Specifically, as the energy increases, the Euclidean and cosine distances between the resulting and original features increase, while their dot products (and the resulting features' norm) first increase and then decrease. Inspired by this, we give several practical principles that lead to better downstream performance. We analytically prove this trend in an overparamterized linear setting and verify its applicability to different experimental settings.

研究の動機と目的

  • タスクヘッドの選択およびその初期学習ダイナミクスが微調整中の特徴適応に与える影響を理解すること。
  • 事前学習済み特徴が微調整中に変化しないという仮定に反論し、わずかな適応でも性能に顕著な影響を与えることを示すこと。
  • 標準的なフルネットワーク微調整や線形プロービングを超える、理論的裏付けのある実用的ガイドラインを設計すること。
  • 線形ヘッドにとどまらず、非線形ヘッドプロービング(HP)を分析することで、表現学習への影響を一般化すること。
  • エネルギーと方向の分解を通じて特徴適応を制御するフレームワークを提供し、下流の精度を向上させること。

提案手法

  • 特徴適応の学習ダイナミクスを「エネルギー」(勾配更新の大きさ)と「方向」(特徴ベクトルの向きの変化)に分解する。
  • タスクヘッドの初期エネルギーを微調整開始時の訓練精度と損失として形式化し、適応可能容量を決定する。
  • 初期エネルギーが3つの主要な指標(オルソゴナル距離、コサイン類似度、ドット積)に与える影響を分析する。
  • 過パラメータ化された線形モデルを用いて、初期エネルギーの増加が特徴ノルムと距離に非単調な挙動を引き起こすことを解析的に証明する。
  • 実用的手法を導入:ヘッドプロービングの早期停止、プロービング中におけるラベルスムージング、タスクヘッドに接続された後続のバックボーン層の再初期化。
  • 視覚および自然言語処理のベンチマークを含む多様な実験設定で、理論的傾向の妥当性を検証する。
Figure 1: Left: a general example of pretraining (PT), head probing (HP) and finetuning (FT) procedure (DS is short for downstream). Right: an example showing that neither probing the head to converge nor no probing is the optimum (pretrained on ImageNet-1K and finetuned on STL10).
Figure 1: Left: a general example of pretraining (PT), head probing (HP) and finetuning (FT) procedure (DS is short for downstream). Right: an example showing that neither probing the head to converge nor no probing is the optimum (pretrained on ImageNet-1K and finetuned on STL10).

実験結果

リサーチクエスチョン

  • RQ1タスクヘッドの初期学習状態(すなわちその「エネルギー」)は、微調整中の特徴適応にどのように影響するか?
  • RQ2なぜヘッドプロービングの早期停止が、完全収束よりも下流性能で優れているのか?
  • RQ3タスクヘッドの初期エネルギーと、それによって生じる特徴距離、ノルム、コサイン類似度との関係は何か?
  • RQ4非線形タスクヘッドは、線形プロービングと比較して特徴適応にどのように影響するか?
  • RQ5エネルギーの操作による特徴適応の制御は、異なるアーキテクチャやデータセットにおいて一貫した性能向上をもたらすか?

主な発見

  • タスクヘッドの初期エネルギーを増加させると、元の特徴と適応後の特徴の間のユークリッド距離およびコサイン類似度が単調に増加する。
  • 適応後の特徴のドット積とノルムは、初期エネルギーの上昇に伴い一時的に増加し、その後減少する傾向を示し、非単調な適応パターンを示している。
  • 特徴ノルムがピークに達する臨界点は、初期エネルギーの中間レベルに位置しており、適応の最適な窓が存在することを示唆している。
  • 従来の研究で用いられる「特徴が変化しない」という仮定は、ほとんど常に成立せず、性能を劣化させる要因となることがある。
  • ヘッドプロービングを収束まで実行するのではなく、早期に停止させることで、最適なエネルギー制御が実現され、下流の精度が向上する。
  • ヘッドプロービング中にラベルスムージングを適用し、後続のバックボーン層をマージ・再初期化するアーキテクチャの変更を加えることで、適応ダイナミクスが安定化され、性能がさらに向上する。
(a) Influence of $\tau$ on energy.
(a) Influence of $\tau$ on energy.

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。