🤖 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.
📝 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.