Lune

ICML2024顶会

How Smooth Is Attention?

Valérie Castin, Pierre Ablin, Gabriel Peyré

摘要

Self-attention and masked self-attention are at the heart of Transformers' outstanding success. Still, our mathematical understanding of attention, in particular of its Lipschitz properties - which are key when it comes to analyzing robustness and expressive power - is incomplete. We provide a detailed study of the Lipschitz constant of self-attention in several practical scenarios, discussing the impact of the sequence length nn and layer normalization on the local Lipschitz constant of both unmasked and masked self-attention. In particular, we show that for inputs of length nn in any compact set, the Lipschitz constant of self-attention is bounded by n\sqrt{n} up to a constant factor and that this bound is tight for reasonable sequence lengths. When the sequence length nn is too large for the previous bound to be tight, which we refer to as the mean-field regime, we provide an upper bound and a matching lower bound which are independent of nn. Our mean-field framework for masked self-attention is novel and of independent interest. Our experiments on pretrained and randomly initialized BERT and GPT-2 support our theoretical findings.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 20 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Towards Evaluating the Robustness of Neural Networks 引用了 Distillation as a Defense to Adversarial Perturbations Against Deep Neural Networks
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale 引用了 Language Models are Few-Shot Learners
  • Clustering in Deep Stochastic Transformers 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Clustering in Deep Stochastic Transformers 引用了 Clustering in Causal Attention Masking
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper20

  1. Clustering in Causal Attention MaskingNikita Karagodin, Yury Polyanskiy, Philippe RigolletNeurIPS 2024 · 40 次引用
  2. Terminal Velocity MatchingLinqi Zhou, Mathias Parger, Ayaan Haque, Jiaming SongICLR 2026 · 15 次引用
  3. Approximation theory for 1-Lipschitz ResNetsDavide Murari, Takashi Furuya, Carola-Bibiane SchönliebNeurIPS 2025 · 7 次引用
  4. Clustering in Deep Stochastic TransformersLev Fedorov, Michael Sander, Romuald Elie, Pierre Marion 等ICML 2026 · 7 次引用
  5. Quantum latent distributions in deep generative modelsOmar Bacarreza, Thorin Farnsworth, Alexander Makarovskiy, Hugo Wallner 等ICML 2026 · 7 次引用

它引用的 Paper16

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
  3. Towards Evaluating the Robustness of Neural NetworksNicholas Carlini, David A. WagnerS&P 2017 · 9,786 次引用
  4. Distillation as a Defense to Adversarial Perturbations Against Deep Neural NetworksNicolas Papernot, Patrick D. McDaniel, Xi Wu, Somesh Jha 等S&P 2016 · 3,275 次引用
  5. On Layer Normalization in the Transformer ArchitectureRuibin Xiong, Yunchang Yang, Di He, Kai Zheng 等ICML 2020 · 1,388 次引用

相关 Paper

  1. The Lipschitz Constant of Self-AttentionHyunjik Kim, George Papamakarios, Andriy MnihICML 2021 · 208 次引用
  2. Lipschitz normalization for self-attention layers with application to graph neural networksGeorge Dasoulas, Kevin Scaman, Aladin VirmauxICML 2021 · 55 次引用
  3. On the Role of Attention Masks and LayerNorm in TransformersXinyi Wu, Amir Ajorlou, Yifei Wang, Stefanie Jegelka 等NeurIPS 2024 · 54 次引用
  4. Fine-grained Local Sensitivity Analysis of Standard Dot-Product Self-AttentionAaron J. Havens, Alexandre Araujo, Huan Zhang, Bin HuICML 2024 · 2 次引用
  5. Inductive Biases and Variable Creation in Self-Attention MechanismsBenjamin L. Edelman, Surbhi Goel, Sham M. Kakade, Cyril ZhangICML 2022 · 154 次引用
黄昏的海面,两侧是细线勾勒的悬崖