Lune

NeurIPS2022Top-tier venue

Improving Transformer with an Admixture of Attention Heads

Tan Nguyen, Tam Nguyen, Hai Do, Khai Nguyen, Vishwanath Saragadam, Minh Pham, Duy Khuong Nguyen, Nhat Ho, Stanley J. Osher

Abstract

Transformers with multi-head self-attention have achieved remarkable success in sequence modeling and beyond. However, they suffer from high computational and memory complexities for computing the attention matrix at each head. Recently, it has been shown that those attention matrices lie on a low-dimensional manifold and, thus, are redundant. We propose the Transformer with a Finite Admixture of Shared Heads (FiSHformers), a novel class of efficient and flexible transformers that allow the sharing of attention matrices between attention heads. At the core of FiSHformer is a novel finite admixture model of shared heads (FiSH) that samples attention matrices from a set of global attention matrices. The number of global attention matrices is much smaller than the number of local attention matrices generated. FiSHformers directly learn these global attention matrices rather than the local ones as in other transformers, thus significantly improving the computational and memory efficiency of the model. We empirically verify the advantages of the FiSHformer over the baseline transformers in a wide range of practical applications including language modeling, machine translation, and image classification. On the WikiText-103, IWSLT'14 De-En and WMT'14 En-De, FiSHformers use much fewer floating-point operations per second (FLOPs), memory, and parameters compared to the baseline transformers.

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.

12 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

  • Elliptical Attention cites FourierFormer: Transformer Meets Generalized Fourier Integral Theorem
  • Elliptical Attention cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Elliptical Attention cites Reformer: The Efficient Transformer
  • Elliptical Attention cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Elliptical Attention cites Designing Robust Transformers using Robust Kernel Density Estimation
  • Elliptical Attention cites Training data-efficient image transformers & distillation through attention
  • Elliptical Attention 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 Elliptical Attention
  • FourierFormer: Transformer Meets Generalized Fourier Integral Theorem cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • FourierFormer: Transformer Meets Generalized Fourier Integral Theorem cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • FourierFormer: Transformer Meets Generalized Fourier Integral Theorem cites Language Models are Few-Shot Learners
  • FourierFormer: Transformer Meets Generalized Fourier Integral Theorem cites Training data-efficient image transformers & distillation through attention
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites Language Models are Few-Shot Learners
  • SwitchHead: Accelerating Transformers with Mixture-of-Experts Attention cites Language Models are Few-Shot Learners
  • 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 Training data-efficient image transformers & distillation through attention
  • Designing Robust Transformers using Robust Kernel Density Estimation cites FourierFormer: Transformer Meets Generalized Fourier Integral Theorem
  • Designing Robust Transformers using Robust Kernel Density Estimation cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Designing Robust Transformers using Robust Kernel Density Estimation cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Designing Robust Transformers using Robust Kernel Density Estimation cites Language Models are Few-Shot Learners
  • Designing Robust Transformers using Robust Kernel Density Estimation cites Training data-efficient image transformers & distillation through attention
  • Training data-efficient image transformers & distillation through attention 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 FourierFormer: Transformer Meets Generalized Fourier Integral Theorem
  • 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 Designing Robust Transformers using Robust Kernel Density Estimation
  • Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis cites Language Models are Few-Shot Learners
  • 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 papers12

  1. FourierFormer: Transformer Meets Generalized Fourier Integral TheoremTan Nguyen, Minh Pham, Tam Nguyen, Khai Nguyen et al.NeurIPS 2022 · 59 citations
  2. SwitchHead: Accelerating Transformers with Mixture-of-Experts AttentionRóbert Csordás, Piotr Piekos, Kazuki Irie, Jürgen SchmidhuberNeurIPS 2024 · 46 citations
  3. Designing Robust Transformers using Robust Kernel Density EstimationXing Han, Tongzheng Ren, Tan Nguyen, Khai Nguyen et al.NeurIPS 2023 · 14 citations
  4. Elliptical AttentionStefan K. Nielsen, Laziz U. Abdullaev, Rachel S. Y. Teo, Tan NguyenNeurIPS 2024 · 12 citations
  5. Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component AnalysisRachel S. Y. Teo, Tan M. NguyenNeurIPS 2024 · 11 citations

Builds on19

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 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. Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 citations

Related papers

  1. MemoryFormer : Minimize Transformer Computation by Removing Fully-Connected LayersNing Ding, Yehui Tang, Haochen Qin, Zhenli Zhou et al.NeurIPS 2024 · 8 citations
  2. Improving Transformers with Probabilistic Attention KeysTam Minh Nguyen, Tan Minh Nguyen, Dung D. Le, Duy Khuong Nguyen et al.ICML 2022 · 38 citations
  3. Linearizing Transformer with Key-Value MemoryYizhe Zhang, Deng CaiEMNLP 2022 · 3 citations
  4. DenseFormer: Enhancing Information Flow in Transformers via Depth Weighted AveragingMatteo Pagliardini, Amirkeivan Mohtashami, François Fleuret, Martin JaggiNeurIPS 2024 · 60 citations
  5. Diffuser: Efficient Transformers with Multi-Hop Attention Diffusion for Long SequencesAosong Feng, Irene Li, Yuang Jiang, Rex YingAAAI 2023 · 20 citations
Dusk over the sea between two cliffs drawn in fine vertical lines