필요한 것은 오직 어텐션뿐이다
Attention Is All You Need
지배적인 시퀀스 변환 모델들은 인코더-디코더 구성 내의 복잡한 순환 신경망이나 합성곱 신경망을 기반으로 합니다. 가장 성능이 우수한 모델들 또한 어텐션 메커니즘을 통해 인코더와 디코더를 연결합니다. 우리는 순환과 합성곱을 완전히 배제하고 오직 어텐션 메커니즘에만 기반한, 트랜스포머(Transformer)라는 새롭고 단순한 네트워크 아키텍처를 제안합니다. 두 가지 기계 번역 과제에 대한 실험 결과, 이 모델들은 품질 면에서 우수할 뿐만 아니라 병렬화가 더 용이하고 훈련에 훨씬 적은 시간이 소요됨을 보여주었습니다. 우리 모델은 WMT 2014 영어-독일어 번역 과제에서 28.4 BLEU를 달성하여 앙상블 모델을 포함한 기존 최고 결과들을 2 BLEU 이상 향상시켰습니다. WMT 2014 영어-프랑스어 번역 과제에서는 기존 최고 모델들의 훈련 비용 대비 아주 적은 수준인 8개의 GPU로 3.5일간 훈련한 후, 새로운 단일 모델 최고 기록(state-of-the-art)인 41.8 BLEU 점수를 수립했습니다. 우리는 트랜스포머를 대규모 및 제한된 훈련 데이터 환경 모두에서 영어 구문 분석(constituency parsing)에 성공적으로 적용함으로써, 이 모델이 다른 과제에도 잘 일반화됨을 보였습니다.
The dominant sequence transduction models are based on complex recurrent or convolutional neural networks in an encoder-decoder configuration. The best performing models also connect the encoder and decoder through an attention mechanism. We propose a new simple network architecture, the Transformer, based solely on attention mechanisms, dispensing with recurrence and convolutions entirely. Experiments on two machine translation tasks show these models to be superior in quality while being more parallelizable and requiring significantly less time to train. Our model achieves 28.4 BLEU on the WMT 2014 English-to-German translation task, improving over the existing best results, including ensembles by over 2 BLEU. On the WMT 2014 English-to-French translation task, our model establishes a new single-model state-of-the-art BLEU score of 41.8 after training for 3.5 days on eight GPUs, a small fraction of the training costs of the best models from the literature. We show that the Transformer generalizes well to other tasks by applying it successfully to English constituency parsing both with large and limited training data.
AI Analysis
Korean Summary
Key Innovations
- 순환(Recurrence)과 합성곱(Convolution) 연산을 완전히 제거하고 어텐션만으로 모델 구성
- 멀티 헤드 어텐션(Multi-Head Attention) 도입: 서로 다른 표현 공간(subspaces)의 정보를 동시에 참조 가능
- 스케일 조정된 점 내적 어텐션(Scaled Dot-Product Attention)을 통한 연산 효율성 확보
- 위치 인코딩(Positional Encoding): 순서 정보가 없는 아키텍처에 시퀀스의 위치 정보 주입
- 입/출력 시퀀스 내 임의의 두 위치 간 경로 길이를 상수화(O(1))하여 장거리 의존성 학습 능력 강화
Learning & Inference Impact
학습 과정에서 RNN의 고질적인 문제인 순차적 처리 제약을 극복하여, 전체 시퀀스를 한 번에 입력받아 병렬 연산(Parallelization)이 가능해졌습니다. 이는 GPU 자원을 효율적으로 활용하게 하여 학습 속도를 비약적으로 높였습니다. 추론 및 모델 성능 측면에서는 문장 내 단어 간 거리가 멀어도 정보 손실 없이 직접적인 상호작용이 가능해져 번역 품질과 문맥 이해도가 크게 향상되었습니다.
Technical Difficulty
Estimated implementation complexity based on methodology.