Model-tuning Via Prompts Makes NLP Models Adversarially Robust

要約

近年、NLP 実践者は次のプラクティスに集中しています。(i) 市販の事前トレーニング済み (マスク済み) 言語モデルをインポートします。
(ii) CLS トークンの非表示表現の上に多層パーセプトロンを追加します (重みはランダムに初期化されます)。
(iii) ダウンストリーム タスク (MLP) でモデル全体を微調整します。
この手順は、標準の NLP ベンチマークで大きな利益をもたらしましたが、これらのモデルは、単語レベルの同義語置換などの軽度の敵対的摂動に対してさえも脆弱なままです。
この作業では、ダウンストリーム タスクに適応する代替方法であるプロンプトによるモデル チューニング (MVP) によって享受される敵対的ロバスト性の驚くべき向上を示します。
MVP は、(MLP ヘッドを追加することによって) モデルを変更するのではなく、(プロンプト テンプレートを追加することによって) 入力を変更します。
3 つの分類データセット全体で、MVP は敵対的な単語レベルの同義語置換に対するパフォーマンスを標準的な方法よりも平均 8% 向上させ、敵対的なトレーニング ベースの最先端の防御よりも 3.5% 優れています。
MVP と敵対的トレーニングを組み合わせることで、クリーンな精度を維持しながら、ロバストな精度をさらに向上させることができます。
最後に、アブレーションを実施して、これらの利益の根底にあるメカニズムを調査します。
特に、MLP の脆弱性の主な原因は、事前トレーニング タスクと微調整タスクの間のミスアライメント、およびランダムに初期化された MLP パラメーターに起因する可能性があることがわかりました。
コードは https://github.com/acmi-lab/mvp で入手できます

要約(オリジナル)

In recent years, NLP practitioners have converged on the following practice: (i) import an off-the-shelf pretrained (masked) language model; (ii) append a multilayer perceptron atop the CLS token’s hidden representation (with randomly initialized weights); and (iii) fine-tune the entire model on a downstream task (MLP). This procedure has produced massive gains on standard NLP benchmarks, but these models remain brittle, even to mild adversarial perturbations, such as word-level synonym substitutions. In this work, we demonstrate surprising gains in adversarial robustness enjoyed by Model-tuning Via Prompts (MVP), an alternative method of adapting to downstream tasks. Rather than modifying the model (by appending an MLP head), MVP instead modifies the input (by appending a prompt template). Across three classification datasets, MVP improves performance against adversarial word-level synonym substitutions by an average of 8% over standard methods and even outperforms adversarial training-based state-of-art defenses by 3.5%. By combining MVP with adversarial training, we achieve further improvements in robust accuracy while maintaining clean accuracy. Finally, we conduct ablations to investigate the mechanism underlying these gains. Notably, we find that the main causes of vulnerability of MLP can be attributed to the misalignment between pre-training and fine-tuning tasks, and the randomly initialized MLP parameters. Code is available at https://github.com/acmi-lab/mvp

arxiv情報

著者 Mrigank Raman,Pratyush Maini,J. Zico Kolter,Zachary C. Lipton,Danish Pruthi
発行日 2023-03-13 17:41:57+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL, cs.LG パーマリンク