Skip to main content
QUICK REVIEW

[論文レビュー] Compacter: Efficient Low-Rank Hypercomplex Adapter Layers

Rabeeh Karimi Mahabadi, James Henderson|arXiv (Cornell University)|Jun 8, 2021
Topic Modeling参考文献 64被引用数 82
ひとこと要約

Compacterは低ランクのハイパーコンプレックスアダプタ層を導入して大規模言語モデルを微調整し、全パラメータ微調整と同等以上のタスク性能を達成しつつ、学習するパラメータは極めて少数にとどまる(約0.047%)

ABSTRACT

Adapting large-scale pretrained language models to downstream tasks via fine-tuning is the standard method for achieving state-of-the-art performance on NLP benchmarks. However, fine-tuning all weights of models with millions or billions of parameters is sample-inefficient, unstable in low-resource settings, and wasteful as it requires storing a separate copy of the model for each task. Recent work has developed parameter-efficient fine-tuning methods, but these approaches either still require a relatively large number of parameters or underperform standard fine-tuning. In this work, we propose Compacter, a method for fine-tuning large-scale language models with a better trade-off between task performance and the number of trainable parameters than prior work. Compacter accomplishes this by building on top of ideas from adapters, low-rank optimization, and parameterized hypercomplex multiplication layers. Specifically, Compacter inserts task-specific weight matrices into a pretrained model's weights, which are computed efficiently as a sum of Kronecker products between shared "slow" weights and "fast" rank-one matrices defined per Compacter layer. By only training 0.047% of a pretrained model's parameters, Compacter performs on par with standard fine-tuning on GLUE and outperforms standard fine-tuning on SuperGLUE and low-resource settings. Our code is publicly available at~\url{https://github.com/rabeehk/compacter}.

研究の動機と目的

  • 大規模事前学習済み言語モデル(PLMs)のメモリ効率・パラメータ効率の高い微調整を動機づける。
  • タスク性能を維持または向上させつつ訓練可能パラメータを削減するアダプタを開発する。
  • クーロネッカー/低ランク分解とハイパーコンプレックス乗算を活用してコンパクトなアダプタ層を作成する。
  • GLUEおよびSuperGLUE上で強力なベースラインと比較して経験的評価を行い、効率性のトレードオフを分析する。

提案手法

  • 共有のスローウェイトと各Compacter層の高速ランク1行列とのクーロネッカー積の和として、事前学習済みモデルのウェイトにタスク特有の重み行列を挿入する。
  • 高速成分の低ランクパラメータ化を用いて、アダプタのパラメータを O(k+d) に削減し、標準的なアダプタの O(kd) と比較する。
  • 全層で A_i 行列を共有し、B_i を各層に特化させ、さらに B_i を rank r の s_i t_i^T に分解する(通常 r=1)。
  • アダプタのダウンプロジェクションとアッププロジェクションを LPHM(低ランクパラメータ化ハイパーコンプレックス乗算)層に置換する。
  • 訓練中は固定された事前学習モデルを維持し、層正規化とアダプタを更新する(標準的なアダプタと同様)。
  • 任意で Compacter ++ を評価し、自己注意後に各ブロックの Compacter 層を除去してさらなるパラメータ削減を行う。

実験結果

リサーチクエスチョン

  • RQ1Compacterははるかに少ないパラメータを訓練しつつ全微調整と同等の性能を達成できるか。
  • RQ2LPHMベースのアダプタはGLUE/SuperGLUEで標準アダプタや他のパラメータ効率的微調整法と比べてどうか。
  • RQ3異なる n と rank 設定でのメモリ・訓練時間・精度のトレードオフはどうなるか。
  • RQ4層間で A_i を共有し低ランクの B_i を使用するだけで、タスクとリソース設定間の性能を維持できるか。

主な発見

Method#Total paramsTrained params / per taskCoLASST-2MRPCQQPSTS-BMNLIQNLIRTEAvg
T5 BASE8.0×1100%61.7694.6190.20/93.0691.63/88.8489.68/89.9786.7893.0171.9486.50
PHM-Adapter (n=12)1.0130.179%57.3594.5091.67/93.8690.25/87.0590.45/90.8485.9792.9275.5486.40
Compacter (n=4)1.0040.073%63.7593.0089.22/92.3190.23/87.0390.31/90.7485.6192.8877.7086.62
Compacter ++ (n=4)1.0020.047%61.2793.8190.69/93.3390.17/86.9390.46/90.9385.7193.0874.8286.47
  • Compacterは GLUE および SuperGLUE で全微調整と同等かそれ以上の性能を、パラメータを 0.073%(Compacter)および 0.047%(Compacter ++)しか訓練しない形で達成する。
  • Compacterは GLUE/SuperGLUE ベンチマークで、アダプタ、Adapter-LowRank、プロンプト微調整などのいくつかのパラメータ効率的ベースラインを上回る。
  • LPHM ベースの層は、標準アダプタの O(kd) に対して O(k+d) のパラメータ数に削減され、層全体で A_i を共有し B_i を rank 1 の要因とする。
  • 低リソース設定では、Compacter および Compacter ++ は、訓練可能パラメータがはるかに少ない状態で精度の点で標準微調整を上回ることがある。
  • Compacter ++ は多くの設定で評価した方法の中で最小のメモリフットプリントを維持しつつ、全微調整にほぼ対等な性能を達成できる。

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

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

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

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