[논문 리뷰] Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View
이 논문은 Transformer를 다입자 확산-대류 시스템의 수치 ODE 해석기로 재해석하고, Strang-Marchuk 분해를 이용한 Macaron Net을 제안하여 표준 Transformer보다 성능을 향상시킨다.
The Transformer architecture is widely used in natural language processing. Despite its success, the design principle of the Transformer remains elusive. In this paper, we provide a novel perspective towards understanding the architecture: we show that the Transformer can be mathematically interpreted as a numerical Ordinary Differential Equation (ODE) solver for a convection-diffusion equation in a multi-particle dynamic system. In particular, how words in a sentence are abstracted into contexts by passing through the layers of the Transformer can be interpreted as approximating multiple particles' movement in the space using the Lie-Trotter splitting scheme and the Euler's method. Given this ODE's perspective, the rich literature of numerical analysis can be brought to guide us in designing effective structures beyond the Transformer. As an example, we propose to replace the Lie-Trotter splitting scheme by the Strang-Marchuk splitting scheme, a scheme that is more commonly used and with much lower local truncation errors. The Strang-Marchuk splitting scheme suggests that the self-attention and position-wise feed-forward network (FFN) sub-layers should not be treated equally. Instead, in each layer, two position-wise FFN sub-layers should be used, and the self-attention sub-layer is placed in between. This leads to a brand new architecture. Such an FFN-attention-FFN layer is "Macaron-like", and thus we call the network with this new architecture the Macaron Net. Through extensive experiments, we show that the Macaron Net is superior to the Transformer on both supervised and unsupervised learning tasks. The reproducible codes and pretrained models can be found at https://github.com/zhuohan123/macaron-net
연구 동기 및 목표
- 다입자 동적 시스템(MPDS) 및 ODE 이론을 통한 Transformer의 새로운 해석을 제공한다.
- 수치해석( Lie-Trotter 대 Strang-Marchuk 분할) 를 활용하여 더 정확한 신경 구조를 설계한다.
- Macaron Net이 감독학습 및 비지도 학습 NLP 작업에서 표준 Transformer를 능가함을 보여준다.
제안 방법
- 컨벙션(FFN)과 확산(self-attention)을 갖는 MPDS에 대한 ODE 해석기로 Transformer 레이어를 모델링한다.
- Lie-Trotter 분할을 사용하여 계층 적층을 시간의 Euler 단계에 매핑한다.
- Lie-Trotter를 Strang-Marchuk 분할로 대체하여 세 서브레이어 Macaron+ 아키텍처를 생성한다(FFN-홀, 어텐션, FFN-홀).
- Macaron 레이어를 FFN-어텐션-FFN으로 정의하고, 반스텝 잔차 및 전체 스텝 잔차를 각각 적용한다.
- Transformer 베이스라인과 동등한 매개변수 수로 Macaron 레이어를 쌓아 Macaron Net을 구성한다.
- 기계 번역(IWSLT14 De-En, WMT14 En-De) 및 GLUE-스타일 비지도 사전학습(BERT-유사)에서 경험적으로 평가한다.
실험 결과
연구 질문
- RQ1Transformer가 대류-확산 MPDS의 수치 ODE 해석기로 이해될 수 있는가?
- RQ2신경 아키텍처에서 Strang-Marchuk 분할 방식을 채택하는 것이 Lie-Trotter보다 정확도와 성능을 향상시키는가?
- RQ3동일한 매개변수 예산하에서 Macaron 레이어(FFN-어텐션-FFN)가 더 나은 NLP 성능을 내는가?
- RQ4감독 번역 및 비지도 사전훈련 과제에서 Macaron Net의 성능은 Transformer와 비교해 어떠한가?
- RQ5ODE 기반 설계 원칙을 어텐션 기반 NLP 모델에 더 깊이 통합할 때 얻어지는 실증상의 이득은 무엇인가?
주요 결과
| IWSLT14 De-En (소형) BLEU | WMT14 En-De (베이스) BLEU | WMT14 En-De (대형) BLEU |
|---|---|---|
| 34.4 | 27.3 | 28.4 |
| / | 28.4 | 28.9 |
| / | 26.8 | 29.2 |
| / | 28.9 | / |
| / | / | 29.3 |
| 35.2 | / | 29.7 |
| 35.4 | 28.9 | 30.2 |
- Macaron Net은 IWSLT14 De-En에서 Transformer보다 BLEU가 높다(소형 35.4 대 34.4), 그리고 WMT14 En-De에서(base 28.9, big 30.2).
- 표 1에 따르면 Macaron Net big이 WMT14 En-De에서 Transformer big보다 1.8 BLEU 포인트 높은 성능을 보인다.
- GLUE에서 Macaron Net base가 BERT base 및 모든 기준선보다 우수한 일반 GLUE 점수를 달성한다.
- 감독 MT에서 Macaron small은 IWSLT14 De-En에서 Transformer small보다 1.0 BLEU 포인트 앞섰고, WMT14 En-De에서는 Macaron base가 Transformer base보다 1.6 BLEU 포인트 앞섰다.
- Macaron Net의 비지도 사전학습은 기본 BERT/Transformer 구성보다 다운스트림 작업 성능을 향상시킨다.
- 이론 분석은 Strang-Marchuk 분해가 국소 절단오차를 O(γ^2)에서 O(γ^3)로 줄인다고 예측하여 Macaron-레이어 설계를 고무한다.
더 나은 연구,지금 바로 시작하세요
연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.
카드 등록 없음 · 무료 플랜 제공
이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.