Lune

Abstract

Pairwise dot-product self-attention is key to the success of transformers that achieve state-of-the-art performance across a variety of applications in language and vision. This dot-product self-attention computes attention weights among the input tokens using Euclidean distance, which makes the model prone to representation collapse and vulnerable to contaminated samples. In this paper, we propose using a Mahalanobis distance metric for computing the attention weights to stretch the underlying feature space in directions of high contextual relevance. In particular, we define a hyper-ellipsoidal neighborhood around each query to increase the attention weights of the tokens lying in the contextually important directions. We term this novel class of attention Elliptical Attention. Our Elliptical Attention provides two benefits: 1) reducing representation collapse and 2) enhancing the model's robustness as Elliptical Attention pays more attention to contextually relevant information rather than focusing on some small subset of informative features. We empirically demonstrate the advantages of Elliptical Attention over the baseline dot-product attention and state-of-the-art attention methods on various practical tasks, including object classification, image segmentation, and language modeling across different data modalities.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

7 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Transformer Meets Twicing: Harnessing Unattended Residual Information cites Equivariant Neural Functional Networks for Transformers
  • Equivariant Neural Functional Networks for Transformers cites Transformer Meets Twicing: Harnessing Unattended Residual Information
  • Transformer Meets Twicing: Harnessing Unattended Residual Information cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Transformer Meets Twicing: Harnessing Unattended Residual Information cites Learning Transferable Visual Models From Natural Language Supervision
  • Transformer Meets Twicing: Harnessing Unattended Residual Information cites Training data-efficient image transformers & distillation through attention
  • Transformer Meets Twicing: Harnessing Unattended Residual Information cites Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis
  • Equivariant Neural Functional Networks for Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Equivariant Neural Functional Networks for Transformers cites Learning Transferable Visual Models From Natural Language Supervision
  • Equivariant Neural Functional Networks for Transformers cites Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis
  • Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis cites Equivariant Neural Functional Networks for Transformers
  • Zero-Shot Text-to-Image Generation cites Learning Transferable Visual Models From Natural Language Supervision
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites Learning Transferable Visual Models From Natural Language Supervision
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites Training data-efficient image transformers & distillation through attention
  • Learning Transferable Visual Models From Natural Language Supervision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Training data-efficient image transformers & distillation through attention cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Tropical Attention: Neural Algorithmic Reasoning for Combinatorial Algorithms cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • QUEST: A robust attention formulation using query-modulated spherical attention cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • QUEST: A robust attention formulation using query-modulated spherical attention cites Training data-efficient image transformers & distillation through attention
  • Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis cites Learning Transferable Visual Models From Natural Language Supervision
  • Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis cites Training data-efficient image transformers & distillation through attention
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers7

  1. Tropical Attention: Neural Algorithmic Reasoning for Combinatorial AlgorithmsBaran Hashemi, Kurt Pasque, Christopher Teska, Ruriko YoshidaNeurIPS 2025 · 14 citations
  2. Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component AnalysisRachel S. Y. Teo, Tan M. NguyenNeurIPS 2024 · 11 citations
  3. QUEST: A robust attention formulation using query-modulated spherical attentionHariprasath Govindarajan, Per Sidén, Jacob Roll, Fredrik LindstenICLR 2026 · 1 citation
  4. Transformer Meets Twicing: Harnessing Unattended Residual InformationLaziz U. Abdullaev, Tan Minh NguyenICLR 2025
  5. Equivariant Neural Functional Networks for TransformersHoang V. Tran, Thieu Vo, An Nguyen The, Tho Tran Huu et al.ICLR 2025

Builds on37

  1. Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
  2. Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
  3. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  4. Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa et al.ICML 2021 · 8,974 citations
  5. Zero-Shot Text-to-Image GenerationAditya Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray et al.ICML 2021 · 6,356 citations

Related papers

  1. Coneheads: Hierarchy Aware AttentionAlbert Tseng, Tao Yu, Toni J. B. Liu, Christopher De SaNeurIPS 2023 · 8 citations
  2. Geodesic Self-Attention for 3D Point CloudsZhengyu Li, Xuan Tang, Zihao Xu, Xihao Wang et al.NeurIPS 2022 · 18 citations
  3. Rectifying Magnitude Neglect in Linear AttentionQihang Fan, Huaibo Huang, Yuang Ai, Ran HeICCV 2025 · 14 citations
  4. Synthesizer: Rethinking Self-Attention for Transformer ModelsYi Tay, Dara Bahri, Donald Metzler, Da-Cheng Juan et al.ICML 2021 · 399 citations
  5. Neighborhood Attention TransformerAli Hassani, Steven Walton, Jiachen Li, Shen Li et al.CVPR 2023
Dusk over the sea between two cliffs drawn in fine vertical lines