paper-with-me

Papers

Unpacking Positional Encoding in Transformers: A Spectral Analysis of Content-Position Coupling

2025-05-19 · Zihan Gu, Han Zhang, Ruoyu Chen, Yue Hu, Hua Zhang

Positional encoding (PE) is essential for enabling Transformers to model sequential structure. However, the mechanisms by which different PE schemes couple token content and positional information-and how these mechanisms influence model dynamics-remain theoretically underexplored. In this work, we present a unified framework that analyzes PE through the spectral properties of Toeplitz and related matrices derived from attention logits. We show that multiplicative content-position coupling-exemplified by Rotary Positional Encoding (RoPE) via a Hadamard product with a Toeplitz matrix-induces spectral contraction, which theoretically improves optimization stability and efficiency. Guided by this theory, we construct synthetic tasks that contrast content-position dependent and content-position independent settings, and evaluate a range of PE methods. Our experiments reveal strong alignment with theory: RoPE consistently outperforms other methods on position-sensitive tasks and induces "single-head deposit" patterns in early layers, indicating localized positional processing. Further analyses show that modifying the method and timing of PE coupling, such as MLA in Deepseek-V3, can effectively mitigate this concentration. These results establish explicit content-relative mixing with relative-position Toeplitz signals as a key principle for effective PE design and provide new insight into how positional structure is integrated in Transformer architectures.

📄 PDF Abstract BibTeX arXiv:2505.13027

Code (0)

등록된 구현이 없습니다.

Tasks

Position

Methods 이 논문이 사용한 방법론

Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Multi-Head Attention 설명 없음
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…
Layer Normalization Unlike batch normalization, Layer Normalization directly estimates the normalization statistics from the summed inputs…
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
Label Smoothing Label Smoothing is a regularization technique that introduces noise for the labels. This accounts for the fact that datasets may have mistakes in them, so maximizing the…
Adam 설명 없음

Similar Papers 제목 키워드 기반

An Empirical Study on the Impact of Positional Encoding in Transformer-based Monaural Speech Enhancement

2024-01-18 · Qiquan Zhang, Meng Ge, Hongxu Zhu, Eliathamby Ambikairajah 외

Transformer architecture has enabled recent progress in speech enhancement. Since Transformers are position-agostic, positional encoding is the de facto standard component used to enable Transformers to distinguish the o…

POSPositionSpeech Enhancement

Theoretical Analysis of Hierarchical Language Recognition and Generation by Transformers without Positional Encoding

2024-10-16 · Daichi Hayakawa, Issei Sato

In this study, we provide constructive proof that Transformers can recognize and generate hierarchical language efficiently with respect to model size, even without the need for a specific positional encoding. Specifical…

SpecTRA: Spectral Transformer for Graph Representation Learning

2021-09-29 · Anson Bastos, Abhishek Nadgeri, Kuldeep Singh, Hiroki Kanezashi 외

Transformers have recently been applied in the more generic domain of graphs. For the same, researchers proposed various positional and structural encoding schemes to overcome the limitation of transformers in modeling t…

Graph Representation LearningRepresentation Learning

Converse and Collision-Based Achievability for Node Localization with Hybrid Distance-Spectral Graph Positional Encodings

2026-08-31 · Zimo Yan, Yifan Li, Hao Li, Zheng Xie 외 arxiv

Graph positional encodings are widely used in graph neural networks and graph Transformers, yet it remains unclear when the code itself can identify nodes. We study a hybrid distance-spectral encoding that combines ancho…

Learnable Spatial-Temporal Positional Encoding for Link Prediction

2025-06-10 · Katherine Tieu, Dongqi Fu, Zihao Li, Ross Maciejewski 외

Accurate predictions rely on the expressiveness power of graph deep learning frameworks like graph neural networks and graph transformers, where a positional encoding mechanism has become much more indispensable in recen…

Link PredictionPrediction