Skip to main content
QUICK REVIEW

[論文レビュー] On Robustness of Finetuned Transformer-based NLP Models

Pavan Kalyan Reddy Neerudu, Subba Reddy Oota|arXiv (Cornell University)|May 23, 2023
Topic ModelingComputer Science被引用数 3
ひとこと要約

この論文は、CKAとSTIRを用いて、微調整されたTransformerモデル(BERT、GPT-2、T5)の層間における表現変化を分析することで、入力テキストの摂動に対するモデルのロバストネスを調査している。GPT-2はBERTやT5に比べて優れたロバストネスを示しており、名詞/動詞の削除や文字レベルの変更が最も破壊的な摂動であることが判明した。

ABSTRACT

Transformer-based pretrained models like BERT, GPT-2 and T5 have been finetuned for a large number of natural language processing (NLP) tasks, and have been shown to be very effective. However, while finetuning, what changes across layers in these models with respect to pretrained checkpoints is under-studied. Further, how robust are these models to perturbations in input text? Does the robustness vary depending on the NLP task for which the models have been finetuned? While there exists some work on studying the robustness of BERT finetuned for a few NLP tasks, there is no rigorous study that compares this robustness across encoder only, decoder only and encoder-decoder models. In this paper, we characterize changes between pretrained and finetuned language model representations across layers using two metrics: CKA and STIR. Further, we study the robustness of three language models (BERT, GPT-2 and T5) with eight different text perturbations on classification tasks from the General Language Understanding Evaluation (GLUE) benchmark, and generation tasks like summarization, free-form generation and question generation. GPT-2 representations are more robust than BERT and T5 across multiple types of input perturbation. Although models exhibit good robustness broadly, dropping nouns, verbs or changing characters are the most impactful. Overall, this study provides valuable insights into perturbation-specific weaknesses of popular Transformer-based models, which should be kept in mind when passing inputs. We make the code and models publicly available [https://github.com/PavanNeerudu/Robustness-of-Transformers-models].

研究の動機と目的

  • 微調整が、層ごとの事前学習済みモデルと微調整済みモデル間の表現類似度にどのように影響するかを理解すること。
  • 微調整されたBERT、GPT-2、T5が、分類および生成タスクの両方において、多様なテキスト摂動に対してどのようにロバストであるかを評価すること。
  • どのタイプの入力摂動がモデル性能を最も顕著に低下させるかを特定し、モデルアーキテクチャーやタスクによってロバストネスが異なるかどうかを同定すること。
  • 特定の層が、モデルやタスクを問わず一貫して脆弱であるかどうかを特定し、共通の不変性や言語的感受性を示唆すること。

提案手法

  • 事前学習済みモデルと微調整済みモデル間の表現類似度を測定するために、中心化カーネル整合性(CKA)を採用した。
  • 摂動に対する共有不変性を数量化するために、逆表現を通した類似度(STIR)を適用した。
  • 同定された8種類のテキスト摂動(同義語置換、単語の削除、文字の入れ替え、文のシャッフルなど)に対してモデル性能を評価した。
  • [CLS]トークン(BERT)、最後のトークン(GPT-2)、デコーダ出力(T5)の隠れ状態を用いた層別分析により、最も影響を受ける層を同定した。
  • 隠れ状態に線形論理回帰モデルを訓練し、ラベルを予測する性能を摂動下で測定した。
  • GLUEベンチマークタスク(分類)と生成タスク(要約、質問生成、自由形式生成)の両方でロバストネスを比較した。
(a) CoLA
(a) CoLA

実験結果

リサーチクエスチョン

  • RQ1微調整は、異なる層において事前学習済みモデルと微調整済みモデル間の表現類似度にどのように影響するか?
  • RQ2どのタイプのテキスト摂動が、微調整済みTransformerモデルの性能を最も顕著に低下させるか?
  • RQ3BERT、GPT-2、T5のロバストネスは、NLPタスク(例:分類対比生成)やモデルアーキテクチャに依存して異なるか?
  • RQ4特定の層が、異なるモデルやタスクにおいて一貫して摂動に対して感受性が強いとされるか?

主な発見

  • 微調整済みモデルの最後の層は、初期層よりも微調整の影響をより強く受けており、深層部での表現適応が顕著であることが示された。
  • GPT-2は、分類タスクを含む複数の摂動タイプにおいて、BERTやT5よりも優れたロバストネスを示した。特に生成タスクで顕著であった。
  • 名詞や動詞の削除、文字の変更は、モデルやタスクを問わず、性能に最も顕著な悪影響を与えた。
  • 一部の層は、モデルやタスクを問わず一貫して影響を受けており、構文的・意味的特徴に対する共通の感受性を示唆している。
  • 文脈の変更を伴う摂動(例:文のシャッフル)は複数の層に影響を及ぼし、分散型の文脈表現学習を示唆している。
  • T5では、摂動後、初期デコーダ層で性能が向上する傾向が見られた。これは、初期層がデコーダアーキテクチャにおいて感受性が低いか、より安定している可能性を示唆している。
(b) SST-2
(b) SST-2

この論文を読む

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

Nubintでこの論文を読む

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