Lune

EMNLP Findings2023

The Locality and Symmetry of Positional Encodings

Lihu Chen, Gaël Varoquaux, Fabian M. Suchanek

Abstract

Positional Encodings (PEs) are used to inject word-order information into transformer-based language models. While they can significantly enhance the quality of sentence representations, their specific contribution to language models is not fully understood, especially given recent findings that various positional encodings are insensitive to word order. In this work, we conduct a systematic study of positional encodings in Bidirectional Masked Language Models (BERT-style) , which complements existing work in three aspects: (1) We uncover the core function of PEs by identifying two common properties, Locality and Symmetry; (2) We show that the two properties are closely correlated with the performances of downstream tasks; (3) We quantify the weakness of current PEs by introducing two new probing tasks, on which current PEs perform poorly. We believe that these results are the basis for developing better PEs for transformer-based language models. The code is available at https://github. com/tigerchen52/locality_symmetry

Ask Lune

Ask anything. The answer quotes the paper.

Lune reads all of it and the papers around it, then shows you the passages behind every answer.

Questions to start from

Lune answers from

the full paper · 3 top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Cited by top-tier papers3

  1. Query-Level Uncertainty in Large Language ModelsLihu Chen, Gerard de Melo, Fabian M. Suchanek, Gaël VaroquauxICLR 2026 · 15 citations
  2. Identifying Query-Relevant Neurons in Large Language Models for Long-Form TextsLihu Chen, Adam Dejl, Francesca ToniAAAI 2025 · 15 citations
  3. Rapid Selection and Ordering of In-Context Demonstrations via Prompt Embedding ClusteringKha Pham, Hung Le, Man Ngo, Truyen TranICLR 2025

Builds on15

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Deberta: decoding-Enhanced Bert with Disentangled AttentionPengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu ChenICLR 2021 · 3,729 citations
  3. Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han et al.ICLR 2024 · 1,714 citations
  4. Train Short, Test Long: Attention with Linear Biases Enables Input Length ExtrapolationOfir Press, Noah A. Smith, Mike LewisICLR 2022 · 1,168 citations
  5. Rethinking Positional Encoding in Language Pre-trainingGuolin Ke, Di He, Tie-Yan LiuICLR 2021 · 358 citations

Related papers

  1. On Position Embeddings in BERTBenyou Wang, Lifeng Shang, Christina Lioma, Xin Jiang et al.ICLR 2021 · 129 citations
  2. The Impact of Positional Encodings on Multilingual CompressionVinit Ravishankar, Anders SøgaardEMNLP 2021 · 7 citations
  3. The Curious Case of Absolute Position EmbeddingsKoustuv Sinha, Amirhossein Kazemnejad, Siva Reddy, Joelle Pineau et al.EMNLP Findings 2022 · 7 citations
  4. Why Are Positional Encodings Nonessential for Deep Autoregressive Transformers? A Petroglyph RevisitedKazuki IrieACL Findings 2025
  5. Cross-Lingual Ability of Multilingual Masked Language Models: A Study of Language StructureYuan Chai, Yaobo Liang, Nan DuanACL 2022
Dusk over the sea between two cliffs drawn in fine vertical lines