Position Information Emerges in Causal Transformers Without Positional Encodings via Similarity of Nearby Embeddings

📅 2024-12-30
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work investigates how causal Transformers implicitly encode positional information in the absence of explicit positional encodings. Method: Through cosine similarity analysis in the token embedding space, we observe that similarity between adjacent token embeddings decays monotonically with distance—a pattern linearly decodable into accurate position representations. We conduct controlled ablation experiments and extensive hyperparameter sweeps across diverse architectures and training configurations to validate robustness. Contribution/Results: We identify and empirically verify “proximal embedding similarity decay” as a self-emergent positional mechanism—stable under both random initialization and post-training, and independent of any positional encoding design. This finding provides the first theoretical foundation and interpretable intrinsic mechanism for position-awareness in encoding-free Transformers, significantly advancing our understanding of how attention-based models acquire and utilize positional information without explicit inductive biases.

Technology Category

Application Category

📝 Abstract
Transformers with causal attention can solve tasks that require positional information without using positional encodings. In this work, we propose and investigate a new hypothesis about how positional information can be stored without using explicit positional encoding. We observe that nearby embeddings are more similar to each other than faraway embeddings, allowing the transformer to potentially reconstruct the positions of tokens. We show that this pattern can occur in both the trained and the randomly initialized Transformer models with causal attention and no positional encodings over a common range of hyperparameters.
Problem

Research questions and friction points this paper is trying to address.

Positional Information
Causal Transformer
Positional Encoding
Innovation

Methods, ideas, or system contributions that make the work stand out.

Causal Transformers
Position Information Learning
No Position Encoding Dependency
🔎 Similar Papers
No similar papers found.
C
Chunsheng Zuo
Dept. of Computer Science, Johns Hopkins University
P
Pavel Guerzhoy
Dept. of Mathematics, University of Hawai'i at Mānoa
Michael Guerzhoy
Michael Guerzhoy
University of Toronto
Data Science for HealthcareMachine LearningComputer VisionApplied StatisticsCS Education