[논문 리뷰] Language Models with Transformers
논문은 Coordinate Architecture Search(CAS)를 제안하여 LSTM 층을 추가하고 선택적 미세조정을 통해 GPT/BERT 유사 트랜스포머를 언어 모델링에 적합하게 만들고, PTB, WikiText-2, WikiText-103에서 최첨단 LSTM보다 상당한 우도(perplexity) 개선을 달성한다.
The Transformer architecture is superior to RNN-based models in computational efficiency. Recently, GPT and BERT demonstrate the efficacy of Transformer models on various NLP tasks using pre-trained language models on large-scale corpora. Surprisingly, these Transformer architectures are suboptimal for language model itself. Neither self-attention nor the positional encoding in the Transformer is able to efficiently incorporate the word-level sequential context crucial to language modeling. In this paper, we explore effective Transformer architectures for language model, including adding additional LSTM layers to better capture the sequential context while still keeping the computation efficient. We propose Coordinate Architecture Search (CAS) to find an effective architecture through iterative refinement of the model. Experimental results on the PTB, WikiText-2, and WikiText-103 show that CAS achieves perplexities between 20.42 and 34.11 on all problems, i.e. on average an improvement of 12.0 perplexity units compared to state-of-the-art LSTMs. The source code is publicly available.
연구 동기 및 목표
- 언어 모델링에서 단어 수준의 미세한 시퀀스 맥락을 포착하는 아키텍처의 필요성을 동기화한다.
- 사전 학습된 Transformer 아키텍처를 언어 모델링에 맞게 효율적으로 개선하기 위해 Coordinate Architecture Search(CAS)를 제안한다.
- LSTM 층을 추가하고 선택적 미세조정을 통해 우도(perplexity)가 LSTM 기반 베이스라인보다 개선되는지 입증한다.
- CAS가 기존 GPT/BERT 모델을 활용하여 탐색 비용을 줄인 채로 강력한 결과를 달성하는 방법을 보여준다.
제안 방법
- LSTM 층으로 보강된 Transformer 기반 언어 모델을 도입하여 미세한 시퀀스 맥락을 포착한다.
- Coordinate Architecture Search(CAS)를 정의하고 적용한다. 이는 아키텍처 변형을 생성하고 평가하기 위한 탐욕적이고 무작위 샘플링 절차이다.
- 훈련 비용을 줄이기 위해 일부분의 가중치만 미세조정하거나 아키텍처를 재구성하는 동시에 사전 학습된 GPT/BERT 가중치를 재사용한다.
- 서브워드 어휘(WordPiece 및 BPE)를 사용하고 평가 지표로 우도(perplexity)를 사용하여 PTB, WT-2, WT-103에서 CAS 변형을 평가한다.
- GPT, BERT, AWD-LSTM-MoS 기반 베이스라인과의 비교, LSTM 없이 고정된 Transformer 블록이 있는 경우의 애블레이션도 포함한다.
- GPU-일 수치로 표현된 NAS/ENAS/DARTS 대비 CAS의 효율성 지표를 보고하고 어휘 및 학습 데이터 구성을 설명한다.
실험 결과
연구 질문
- RQ1Transformer 기반 언어 모델에 LSTM 층을 추가하면 다음 어휘 예측에서 단어 수준의 순차 맥락 모델링이 개선되는가?
- RQ2탐욕적 아키텍처 개선 검색(CAS)이 사전 학습된 GPT/BERT 시작점에서 고성능의 언어 모델 아키텍처를 효과적으로 식별하는가?
- RQ3CAS가 PTB, WT-2, WT-103에서 표준 LSTM/Transformer 베이스라인 및 현대 언어 모델과 비교하여 우도에서 어떻게 되는가?
- RQ4부분 미세조정(일부 가중치 고정) 대 전체 미세조정 전략이 데이터 세트 크기에 따라 성능과 과적합에 어떤 영향을 주는가?
주요 결과
| 모델 | PTB 검증 | PTB 테스트 | WT-2 검증 | WT-2 테스트 | WT-103 검증 | WT-103 테스트 |
|---|---|---|---|---|---|---|
| AWD-LSTM-MoS-BERTVocab | 43.47 | 38.04 | 48.48 | 42.25 | 54.94 | 52.91 |
| BERT | 72.99 | 62.40 | 79.76 | 69.32 | 109.54 | 107.30 |
| BERT-CAS (Our) | 39.97 | 34.47 | 38.43 | 34.64 | 40.70 | 39.85 |
| BERT-Large-CAS (Our) | 36.14 | 31.34 | 37.79 | 34.11 | 19.67 | 20.42 |
| AWD-LSTM-MoS-GPTVocab | 50.20 | 44.92 | 55.03 | 49.77 | 52.90 | 51.88 |
| GPT | 79.44 | 68.79 | 89.96 | 80.60 | 63.07 | 63.47 |
| GPT-CAS (Our) | 46.24 | 40.87 | 50.41 | 46.62 | 35.75 | 34.24 |
- CAS에서 도출된 아키텍처(BERT-CAS 및 GPT-CAS)가 PTB, WT-2, WT-103에서 우도 측면에서 AWD-LSTM-MoS 베이스라인을 능가한다.
- BERT-Large-CAS가 PTB에서 31.34(검증) 및 WT-103 테스트에서 34.11로 강한 우도를 달성하며, 더 큰 사전 학습 시작점의 이점을 보여준다.
- GPT-CAS는 특히 WT-103에서 서브워드 어휘로 34.24 테스트 우도와 함께 경쟁력 있는 우도를 달성한다.
- 애블레이션 연구는 LSTM을 추가하고 Transformer 가중치를 부분적으로 업데이트하는 것이 순진한 GPT/BERT 사용보다 성능을 크게 향상시킴을 보여준다.
- CAS는 실험에서 보고된 NAS/ENAS/DARTS에 비해 더 높은 탐색 효율(더 낮은 GPU-일 수치를) 을 보여준다.
- 유사한 파라미터 수로 비교 시 BERT-Large-CAS가 PTB 및 WT-103에서 종종 GPT-2를 능가하여 효율성과 효과성이 우수함을 시사한다.
더 나은 연구,지금 바로 시작하세요
연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.
카드 등록 없음 · 무료 플랜 제공
이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.