[논문 리뷰] ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators
ELECTRA는 교체된 토큰 탐지(replaced token detection)를 도입합니다. 이는 생성기가 그럴듯한 토큰 교체를 만들고 판별기가 어떤 토큰이 교체되었는지 탐지하는 구별식(pre-training) 학습 과제입니다. 이는 BERT와 같은 MLM 기반 방법보다 훨씬 적은 계산으로 하위 downstream 성능을 더 높게 제공합니다.
Masked language modeling (MLM) pre-training methods such as BERT corrupt the input by replacing some tokens with [MASK] and then train a model to reconstruct the original tokens. While they produce good results when transferred to downstream NLP tasks, they generally require large amounts of compute to be effective. As an alternative, we propose a more sample-efficient pre-training task called replaced token detection. Instead of masking the input, our approach corrupts it by replacing some tokens with plausible alternatives sampled from a small generator network. Then, instead of training a model that predicts the original identities of the corrupted tokens, we train a discriminative model that predicts whether each token in the corrupted input was replaced by a generator sample or not. Thorough experiments demonstrate this new pre-training task is more efficient than MLM because the task is defined over all input tokens rather than just the small subset that was masked out. As a result, the contextual representations learned by our approach substantially outperform the ones learned by BERT given the same model size, data, and compute. The gains are particularly strong for small models; for example, we train a model on one GPU for 4 days that outperforms GPT (trained using 30x more compute) on the GLUE natural language understanding benchmark. Our approach also works well at scale, where it performs comparably to RoBERTa and XLNet while using less than 1/4 of their compute and outperforms them when using the same amount of compute.
연구 동기 및 목표
- BERT와 같은 masked language modeling(MLM)과 비교하여 Transformer 인코더의 사전 학습 효율성과 성능을 향상시키는 것.
- 토큰을 마스킹하는 대신 생성기로부터 샘플링된 교체를 사용하는 구별식(pre-training) 학습 과제를 개발하는 것.
- 마스킹된 부분집합이 아니라 모든 입력 토큰에서 학습을 가능하게 하여 수렴 속도를 높이고 표현을 개선하는 것.
- GLUE 및 SQuAD 벤치마크에서 작은 모델과 큰 모델 체계 전반에 걸쳐 확장성과 효율성을 입증하는 것.
제안 방법
- Transformer 인코더를 기반으로 하는 생성기 G와 판별기 D 두 네트워크의 사전 학습을 제안한다.
- G에서 샘플링된 교체로 토큰의 부분집합을 교체하여 입력을 손상된 시퀀스로 만든다.
- 모든 토큰에 대해 원본인지 생성기 교체인지 예측하도록 D를 학습한다(교체된 토큰 탐지).
- 가능한 교체를 생성하기 위해 최대우도(masked language modeling)로 G를 학습한다(대립적으론 아님).
- 합성 목표: L = E[MLM loss of G] + lambda * E[Disc loss of D], 여기서 Disc loss는 손상된 시퀀스의 각 토큰에 대한 이진 분류이다.
- 계산량과 성능의 균형을 맞추기 위해 G와 D 간의 가중치 공유(임베딩 공유, 때로는 전체 가중치 묶기) 및 다른 생성기 크기를 탐색한다.
- 유사한 계산 및 데이터 조건에서 ELECTRA를 BERT, XLNet, RoBERTa, 및 GPT와 비교하여 GLUE 및 SQuAD에서 평가한다.
실험 결과
연구 질문
- RQ1교체된 토큰 탐지를 통한 모든 입력 토큰 학습이 전통적인 MLM 사전 학습에 비해 효율성과 성능을 향상시키는가?
- RQ2생성기 크기, 가중치 공유 전략, 그리고 학습 알고리즘이 ELECTRA의 샘플 효율성과 다운스트림 성능에 어떤 영향을 미치는가?
- RQ3덜한 사전 학습 계산으로 RoBERTa, XLNet 등 최첨단 모델과 동등하거나 더 우수한 성능을 ELECTRA가 달성할 수 있는가?
- RQ4작은 모델 규칙에서의 ELECTRA 성능과 SQuAD 2.0의 정답 가능성(answerability) 작업에서의 성능은 어떠한가?
주요 결과
- 동일한 모델 크기, 데이터, 계산에서 ELECTRA는 GLUE 및 SQuAD에서 MLM 기반 방법(예: BERT)을 상당히 능가한다.
- ELECTRA-Small은 1 GPU에서 4일 만에 GPT를 능가하고 더 큰 모델과 경쟁력이 있으며, 훨씬 적은 계산량과 훨씬 적은 매개변수를 요구한다.
- 대규모 설정에서 ELECTRA-Large는 RoBERTa 및 XLNet과 비슷한 성능을 달성하되 사전 학습 계산의 1/4 미만으로 가능하며 유사한 계산을 사용할 때 그들을 능가한다.
- 모든 입력 토큰에서 학습하는 것(판별기 목표)은 효율성과 성능 향상의 주요 기여요인이다; 판별기에 비해 생성기를 작게 구성하면 결과가 더 좋아진다.
- 두 단계 및 적대적 학습 변형은 결합 ML 목표를 상회하지 못했고, 생성기의 최대우도 학습이 더 나은 다운스트림 결과를 낳았다.
- 모델 크기에 걸쳐 ELECTRA의 이득은 모델 크기가 작아질수록 더 두드러지며, 매개변수 효율이 향상됨을 시사한다.
더 나은 연구,지금 바로 시작하세요
연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.
카드 등록 없음 · 무료 플랜 제공
이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.