Lune

ICML2025顶会

The underlying structures of self-attention: symmetry, directionality, and emergent dynamics in Transformer training

Matteo Saponati, Pascal Sager, Pau Vilimelis Aceituno, Thilo Stadelmann, Benjamin F. Grewe

摘要

Self-attention is essential to Transformer architectures, yet how information is embedded in the selfattention matrices and how different objective functions impact this process remains unclear. We present a mathematical framework to analyze self-attention matrices by deriving the structures governing their weight updates. Using this framework, we demonstrate that bidirectional training induces symmetry in the weight matrices, while autoregressive training results in directionality and column dominance. Our theoretical findings are validated across multiple Transformer models -including ModernBERT, GPT, LLaMA3, and Mistral -and input modalities like text, vision, and audio. Finally, we apply these insights by showing that symmetric initialization improves the performance of encoder-only models on language tasks. This mathematical analysis offers a novel theoretical perspective on how information is embedded through self-attention, thereby improving the interpretability of Transformer models. We provide proof for this proposition with related remarks in Appendix S1.5.1. Note that all mathematical results derived so far rely solely on the structure of self-attention and make no assumptions about the input data. In the next section, we build on these results to link structural patterns in W qk with the specific form of the objective function. The relation between objective functions and structures in self-attention matrices In this final section, we show how to relate these properties to the specific objective function. Crucially, the number of times a token t * appears as context or as a prediction depends on the training objective. Autoregressive training implicitly introduces

问 Lune

尽管问,回答会引用原文。

Lune 会读完全文和相关的 Paper,每个回答都附上所依据的原文段落。

可以从这些问题问起

Lune 的依据

全文 · 引用它的 2 篇顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

引用它的顶会 Paper2

  1. Uncovering the Latent Potential of Deep Intermediate RepresentationsArnesh Batra, Arush Gumber, Aniket Khandelwal, Jashn Khemani 等ICML 2026 · 1 次引用
  2. Layer by Layer: Uncovering Hidden Representations in Language ModelsOscar Skean, Md Rifat Arefin, Dan Zhao, Niket Patel 等ICML 2025

它引用的 Paper3

  1. CutMix: Regularization Strategy to Train Strong Classifiers With Localizable FeaturesSangdoo Yun, Dongyoon Han, Sanghyuk Chun, Seong Joon Oh 等ICCV 2019 · 5,843 次引用
  2. BEiT: BERT Pre-Training of Image TransformersHangbo Bao, Li Dong, Songhao Piao, Furu WeiICLR 2022 · 3,632 次引用
  3. AttentionViz: A Global View of Transformer AttentionCatherine Yeh, Yida Chen, Aoyu Wu, Cynthia Chen 等IEEE VIS 2023 · 78 次引用

相关 Paper

  1. Conditioned Initialization for AttentionHemanth Saratchandran, Simon LuceyICLR 2026
  2. How do Transformers Perform In-Context Autoregressive Learning ?Michael Eli Sander, Raja Giryes, Taiji Suzuki, Mathieu Blondel 等ICML 2024 · 21 次引用
  3. On Position Embeddings in BERTBenyou Wang, Lifeng Shang, Christina Lioma, Xin Jiang 等ICLR 2021 · 129 次引用
  4. The Locality and Symmetry of Positional EncodingsLihu Chen, Gaël Varoquaux, Fabian M. SuchanekEMNLP Findings 2023 · 2 次引用
  5. SparseBERT: Rethinking the Importance Analysis in Self-attentionHan Shi, Jiahui Gao, Xiaozhe Ren, Hang Xu 等ICML 2021 · 63 次引用
黄昏的海面,两侧是细线勾勒的悬崖