Deconstructing Positional Information: From Attention Logits to Training Biases

Zihan Gu, Ruoyu Chen, Han Zhang, Hua Zhang, Yue Hu
5/19/2025
cs.LG

No confident code implementation found for this paper.

Abstract

Positional encodings enable Transformers to incorporate sequential information, yet their theoretical understanding remains limited to two properties: distance attenuation and translation invariance. Because natural language lacks purely positional data, the interplay between positional and semantic information is still underexplored.

Show full abstract

We address this gap by deconstructing the attention-logit computation and providing a structured analysis of positional encodings, categorizing them into additive and multiplicative forms. The differing properties of these forms lead to distinct mechanisms for capturing positional information. To probe this difference, we design a synthetic task that explicitly requires strong integration of positional and semantic cues. As predicted, multiplicative encodings achieve a clear performance advantage on this task. Moreover, our evaluation reveals a hidden training bias: an information aggregation effect in shallow layers that we term the single-head deposit pattern. Through ablation studies and theoretical analysis, we proved that this phenomenon is inherent in multiplicative encodings. These findings deepen the understanding of positional encodings and call for further study of their training dynamics.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{gu2025deconstructing,
  title  = {Deconstructing Positional Information: From Attention Logits to Training Biases},
  author = {Zihan Gu and Ruoyu Chen and Han Zhang and Hua Zhang and Yue Hu},
  year   = {2025},
  eprint = {2505.13027},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.13027v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.13027.svg)](https://codeofpaper.com/paper/2505.13027)

Discussion