Two Stones Hit One Bird: Bilevel Positional Encoding for Better Length Extrapolation

ICML 2024 pp. 17858-17876

Abstract

In this work, we leverage the intrinsic segmentation of language sequences and design a new positional encoding method called Bilevel Positional Encoding (BiPE). For each position, our BiPE blends an intra-segment encoding and an inter-segment encoding. The intra-segment encoding identifies the locations within a segment and helps the model capture the semantic information therein via absolute positional encoding. The inter-segment encoding specifies the segment index, models the relationships between segments, and aims to improve extrapolation capabilities via relative positional encoding. Theoretical analysis shows this disentanglement of positional information makes learning more effective. The empirical results also show that our BiPE has superior length extrapolation capabilities across a wide range of tasks in diverse text modalities.

Cite

Text

He et al. "Two Stones Hit One Bird: Bilevel Positional Encoding for Better Length Extrapolation." International Conference on Machine Learning, 2024.

Markdown

[He et al. "Two Stones Hit One Bird: Bilevel Positional Encoding for Better Length Extrapolation." International Conference on Machine Learning, 2024.](https://mlanthology.org/icml/2024/he2024icml-two/)

BibTeX

@inproceedings{he2024icml-two,
  title     = {{Two Stones Hit One Bird: Bilevel Positional Encoding for Better Length Extrapolation}},
  author    = {He, Zhenyu and Feng, Guhao and Luo, Shengjie and Yang, Kai and Wang, Liwei and Xu, Jingjing and Zhang, Zhi and Yang, Hongxia and He, Di},
  booktitle = {International Conference on Machine Learning},
  year      = {2024},
  pages     = {17858-17876},
  volume    = {235},
  url       = {https://mlanthology.org/icml/2024/he2024icml-two/}
}