Abstract
Positional encoding plays a crucial role in transformers, significantly impacting model performance and length generalization. Prior research has introduced absolute positional encoding (APE) and relative positional encoding (RPE) to distinguish token positions in given sequences. However, both APE and RPE remain fixed after model training regardless of input data, limiting their adaptability and flexibility. Hence, we expect that the desired positional encoding should be data-adaptive and can be dynamically adjusted with the given attention. In this paper, we propose a Data-Adaptive Positional Encoding (DAPE) method, which dynamically and semantically adjusts based on input context and learned fixed priors. Experimental validation on real-world datasets (Arxiv, Books3, and CHE) demonstrates that DAPE enhances model performances in terms of trained length and length generalization, where the improvements are statistically significant. The model visualization suggests that our model can keep both local and anti-local information. Finally, we successfully train the model on sequence length 128 and achieve better performance at evaluation sequence length 8192, compared with other static positional encoding methods, revealing the benefit of the adaptive positional encoding method.
| Original language | English |
|---|---|
| Title of host publication | 38th Conference on Neural Information Processing Systems, NeurIPS 2024 |
| Publisher | Neural Information Processing Systems Foundation |
| Pages | 26659-26700 |
| Number of pages | 42 |
| ISBN (Print) | 9798331314385 |
| DOIs | |
| Publication status | Published - 9 Dec 2024 |
| Event | 38th Conference on Neural Information Processing Systems, NeurIPS 2024 - Vancouver Convention Center , Vancouver, Canada Duration: 9 Dec 2024 → 15 Dec 2024 https://neurips.cc/Conferences/2024 https://openreview.net/group?id=NeurIPS.cc/2024 https://proceedings.neurips.cc/paper_files/paper/2024 (Conference Proceedings) |
Publication series
| Name | Advances in Neural Information Processing Systems |
|---|---|
| Publisher | Neural Information Processing Systems Foundation |
| Volume | 37 |
| ISSN (Print) | 1049-5258 |
| Name | NeurIPS Proceedings |
|---|
Conference
| Conference | 38th Conference on Neural Information Processing Systems, NeurIPS 2024 |
|---|---|
| Country/Territory | Canada |
| City | Vancouver |
| Period | 9/12/24 → 15/12/24 |
| Internet address |
Fingerprint
Dive into the research topics of 'DAPE: Data-Adaptive Positional Encoding for Length Extrapolation'. Together they form a unique fingerprint.Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver