[논문 리뷰] On Robustness of Finetuned Transformer-based NLP Models
이 논문은 CKA와 STIR를 사용하여 층 간 표현 변화를 분석함으로써, 미세조정된 트랜스포머 모델(BERT, GPT-2, T5)의 입력 텍스트 변형에 대한 내성에 대해 조사한다. GPT-2는 BERT와 T5에 비해 더 뛰어난 내성을 보이며, 명사/동사 제거 및 문자 수준의 변경이 가장 파괴적인 변형으로 나타났다.
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)를 적용하였다.
- 동의어 교체, 단어 제거, 문자 교환, 문장 뒤섞기 등 여덟 가지의 다른 텍스트 변형에 대해 모델 성능을 평가하였다.
- BERT의 [CLS] 토큰, GPT-2의 마지막 토큰, T5의 디코더 출력에서 얻은 은닉 상태를 사용하여 층 단위 분석을 수행하여 영향을 가장 많이 받는 층을 특정하였다.
- 은닉 상태에 기반한 로지스틱 회귀 모델을 훈련하여 레이블을 예측하고, 변형 조건 하에서의 성능 저하를 측정하였다.
- GLUE 벤치마크 작업(분류)과 생성 작업(요약, 질문 생성, 자유형 생성) 간 내성을 비교하였다.

실험 결과
연구 질문
- RQ1미세조정은 사전학습된 모델과 미세조정된 모델 간 층별 표현 유사성에 어떻게 영향을 미치는가?
- RQ2어떤 종류의 텍스트 변형이 미세조정된 트랜스포머 모델의 성능을 가장 심각하게 떨어뜨리는가?
- RQ3BERT, GPT-2, T5의 내성은 자연어 처리 작업 유형(예: 분류 대비 생성)이나 모델 아키텍처에 따라 달라지는가?
- RQ4특정 층이 다양한 모델과 작업에서 일관되게 더 민감한가?
주요 결과
- 미세조정된 모델의 마지막 층은 초기 층보다 더 큰 영향을 받으며, 깊은 층에서 표현 적응이 더 심화됨을 시사한다.
- GPT-2는 분류 작업 외에도 생성 작업 전반에 걸쳐 BERT 및 T5보다 더 큰 내성을 보이며, 특히 생성 작업에서 두드러진다.
- 명사나 동사를 제거하거나 문자를 변경하는 변형이 모델 아키텍처나 작업 유형에 관계없이 성능 저하에 가장 큰 영향을 미친다.
- 일부 층은 다양한 모델과 작업에서 일관되게 영향을 받으며, 문법적 및 의미적 특성에 대한 공통된 민감성을 시사한다.
- 문맥 변화를 수반하는 변형(예: 문장 뒤섞기)은 여러 층에 영향을 미치며, 분산된 문맥 표현 학습을 시사한다.
- T5는 변형 후 초기 디코더 층에서 성능 향상을 보이며, 이는 초기 층이 디코더 아키텍처에서 더 덜 민감하거나 더 안정적일 수 있음을 시사한다.

이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.