[논문 리뷰] Learning to Encode Position for Transformer with Continuous Dynamical Model
논문은 FLOATER를 도입합니다. 이는 Transformer를 위한 흐름 기반의 연속 동적 위치 인코더로, 귀납적이고 데이터 기반이며 매개변수 효율적인 위치 인코딩을 가능하게 하여 MT, 언어 이해, 그리고 QA 과제의 성능을 향상시킵니다.
We introduce a new way of learning to encode position information for non-recurrent models, such as Transformer models. Unlike RNN and LSTM, which contain inductive bias by loading the input tokens sequentially, non-recurrent models are less sensitive to position. The main reason is that position information among input units is not inherently encoded, i.e., the models are permutation equivalent; this problem justifies why all of the existing models are accompanied by a sinusoidal encoding/embedding layer at the input. However, this solution has clear limitations: the sinusoidal encoding is not flexible enough as it is manually designed and does not contain any learnable parameters, whereas the position embedding restricts the maximum length of input sequences. It is thus desirable to design a new position layer that contains learnable parameters to adjust to different datasets and different architectures. At the same time, we would also like the encodings to extrapolate in accordance with the variable length of inputs. In our proposed solution, we borrow from the recent Neural ODE approach, which may be viewed as a versatile continuous version of a ResNet. This model is capable of modeling many kinds of dynamical systems. We model the evolution of encoded results along position index by such a dynamical system, thereby overcoming the above limitations of existing methods. We evaluate our new position layers on a variety of neural machine translation and language understanding tasks, the experimental results show consistent improvements over the baselines.
연구 동기 및 목표
- 비순환 Transformer에서 학습 가능한 귀납식 위치 인코딩의 필요성을 동기화합니다.
- FLOATER를 제안합니다. 위치 인코딩을 생성하는 연속 동적 시스템으로서의 역할을 합니다.
- FLOATER가 데이터 기반이고 매개변수 효율적이며 표준 Transformer 아키텍처와 호환되도록 합니다.
- FLOATER의 MT, 언어 이해, QA 벤치마크에서의 개선점을 입증합니다.
제안 방법
- 위치 인코딩을 신경망 h(t, p(t); θ_h)에 의해 구동되는 연속 동적 시스템 p(t)로 모델링합니다.
- Δt를 고정하고 점점 증가하는 t_i에서 평가를 통해 p(i)를 이산화하여 각 토큰의 위치 벡터를 얻습니다.
- 다른 블록마다 서로 다른 초기 p(0)를 허용하면서 매개변수를 줄이기 위해 Transformer 블록 간에 동역학 h(·)를 공유합니다.
- 호환성을 위해 h(·)=0일 때 FLOATER가 원래의 사인파 인코딩으로 축소되도록 보여줍니다.
- 모든 Transformer 블록에 동적 인코딩을 주입하는 것을 선택적으로 수행하여 성능을 향상시킵니다.
- 사전 학습된 Transformer에서 FLOATER를 초기화하고 미세 조정을 통해 워밍 업 전략을 제공합니다.
실험 결과
연구 질문
- RQ1위치 인코딩에 대한 연속 동적 시스템이 고정 사인파 또는 층별 임베딩에 비해 귀납적이고 데이터 기반이며 매개변수 효율적인 향상을 제공할 수 있는가?
- RQ2,
주요 결과
| 모델 | BLEU (↑) | #Parameters (↓) |
|---|---|---|
| FLOATER | 28.57 | 526.3K |
| 1-layer RNN + scalar | 27.99 | 263.2K |
| 2-layer RNN + scalar | 28.16 | 526.3K |
| 1-layer RNN + vector | 27.99 | 1,050.0K |
- FLOATER는 MT, GLUE, RACE, SQuAD 과제에서 기준선 대비 일관된 개선을 달성합니다.
- 모든 Transformer 블록에서 FLOATER를 사용하는 것이 입력 블록에서만 적용하는 것보다 성능이 더 좋습니다.
- h(·)=0일 때 플로이터가 바닐라 Transformer와 호환되도록 사인파 인코딩으로 축소되며, 이는 사전 학습된 모델에서 워밍 업을 가능하게 합니다.
- WMT En-De에서 FLOATER는 BLEU 28.57, 매개변수 526.3K로 달성되며, 다양한 매개변수 예산을 가진 다수의 RNN 기반 인코더를 능가합니다.
- FLOATER는 점진적(귀납적) 동작을 보여주며, 학습 중에 보지 못한 더 긴 시퀀스에서도 좋은 성능을 발휘합니다. 특히 MT에서 그렇습니다.
- 학습 FLOATER는 오버헤드를 수반하지만, 워밍업 및 매개변수 공유 전략으로 오버헤드를 일반적으로(약 20-30%) 관리할 수 있습니다. 추론 오버헤드는 위치 편향을 저장함으로써 피합니다.
더 나은 연구,지금 바로 시작하세요
연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.
카드 등록 없음 · 무료 플랜 제공
이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.