mlsanityData to 14 Oct 2026

Improving Transformers with Probabilistic Attention Keys

arXiv 2110.08678 ↗First posted 16 Oct 2021cs.LG cs.CL stat.MLcited by 28

Not on the map. Why?

Abstract (arXiv)

Multi-head attention is a driving force behind state-of-the-art transformers, which achieve remarkable performance across a variety of natural language processing (NLP) and computer vision tasks. It has been observed that for many applications, those attention heads learn redundant embedding, and most of them can be removed without degrading the performance of the model. Inspired by this observation, we propose Transformer with a Mixture of Gaussian Keys (Transformer-MGK), a novel transformer architecture that replaces redundant heads in transformers with a mixture of keys at each head. These mixtures of keys follow a Gaussian mixture model and allow each attention head to focus on different parts of the input sequence efficiently. Compared to its conventional transformer counterpart, Transformer-MGK accelerates training and inference, has fewer parameters, and requires fewer FLOPs to compute while achieving comparable or better accuracy across tasks. Transformer-MGK can also be easily extended to use with linear attention. We empirically demonstrate the advantage of Transformer-MGK in a range of practical applications, including language modeling and tasks that involve very long sequences. On the Wikitext-103 and Long Range Arena benchmark, Transformer-MGKs with 4 heads attain comparable or better performance to the baseline transformers with 8 heads.

Key facts. Cited by 28 papers in the map (data through 14 Oct 2026). Builds on 79 of its 110 references that are in the map. First posted on arXiv 16 Oct 2021.

Builds on

79 of 110 references.

References · 79

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2014Adam: A Method for Stochastic Optimizationcited by 37,240
  4. 2020Language Models are Few-Shot Learnerscited by 32,419
  5. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  6. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
  7. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  8. 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,513
  9. 2020Training data-efficient image transformers & distillation through attentioncited by 4,586
  10. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
  11. 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,307
  12. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
38 more
  1. 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,057
  2. 2020Longformer: The Long-Document Transformercited by 3,413
  3. 2016Pointer Sentinel Mixture Modelscited by 3,096
  4. 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,073
  5. 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,811
  6. 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,682
  7. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
  8. 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,850
  9. 2020Reformer: The Efficient Transformercited by 1,668
  10. 2020Rethinking Attention with Performerscited by 1,601
  11. 2019Generating Long Sequences with Sparse Transformerscited by 1,546
  12. 2019fairseq: A Fast, Extensible Toolkit for Sequence Modelingcited by 1,488
  13. 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
  14. 2019BERT Rediscovers the Classical NLP Pipelinecited by 1,059
  15. 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 1,003
  16. 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 856
  17. 2019Are Sixteen Heads Really Better than One?cited by 816
  18. 2019How Contextual are Contextualized Word Representations? Comparing the Geometry of BERT, ELMo, and GPT-2 Embeddingscited by 784
  19. 2018Image Transformercited by 772
  20. 2019Fast Transformer Decoding: One Write-Head is All You Needcited by 717
  21. 2018Universal Transformerscited by 647
  22. 2019Designing and Interpreting Probes with Control Taskscited by 640
  23. 2019Patient Knowledge Distillation for BERT Model Compressioncited by 508
  24. 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 502
  25. 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 471
  26. 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 471
  27. 2021Dynamic Neural Networks: A Surveycited by 408
  28. 2018Efficient Attention: Attention with Linear Complexitiescited by 368
  29. 2019Axial Attention in Multidimensional Transformerscited by 358
  30. 2021Random Feature Attentioncited by 354
  31. 2018Generating Wikipedia by Summarizing Long Sequencescited by 335
  32. 2017SkipNet: Learning Dynamic Routing in Convolutional Networkscited by 332
  33. 2017A Structured Self-attentive Sentence Embeddingcited by 318
  34. 2020Sparse Sinkhorn Attentioncited by 251
  35. 2019Analyzing the Structure of Attention in a Transformer Language Modelcited by 243
  36. 2018Adaptive Input Representations for Neural Language Modelingcited by 226
  37. 2016A Decomposable Attention Model for Natural Language Inferencecited by 215
  38. 2019Transformer Dissection: A Unified Understanding of Transformer's Attention via the Lens of Kernelcited by 213

50 most cited of 79 All 79 (JSON)

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2022: 4; 2023: 5; 2024: 6; 2025: 10; 2026: 3.

28 papers.

Sort:

By area:

  1. 2023Transformers Implement Functional Gradient Descent to Learn Non-Linear Functions In Contextcited by 63
  2. 2022Architecture Agnostic Federated Learning for Neural Networkscited by 30
  3. 2023Primal-Attention: Self-attention through Asymmetric Kernel SVD in Primal Representationcited by 29
  4. 2023On Efficient Training of Large-Scale Deep Learning Models: A Literature Reviewcited by 26
  5. 2022Designing Robust Transformers using Robust Kernel Density Estimationcited by 11
  6. 2024OTSeg: Multi-prompt Sinkhorn Attention for Zero-Shot Semantic Segmentationcited by 9
  7. 2025Efficient Degradation-agnostic Image Restoration via Channel-Wise Functional Decomposition and Manifold Regularizationcited by 8
  8. 2024Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysiscited by 7
  9. 2024Elliptical Attentioncited by 7
  10. 2025Devil is in the Uniformity: Exploring Diverse Learners within Transformer for Image Restorationcited by 5
  11. 2022DBA: Efficient Transformer with Dynamic Bilinear Low-Rank Attentioncited by 4
  12. 2023Attention: Marginal Probability is All You Need?cited by 4
16 more
  1. 2024A Primal-Dual Framework for Transformers and Neural Networkscited by 4
  2. 2025Transformer Meets Twicing: Harnessing Unattended Residual Informationcited by 3
  3. 2022Transformer with Fourier Integral Attentionscited by 2
  4. 2024A Manifold Representation of the Key in Vision Transformerscited by 2
  5. 2025Generalization Guarantees for Representation Learning via Data-Dependent Gaussian Mixture Priorscited by 2
  6. 2025Reasoning is Periodicity? Improving Large Language Models Through Effective Periodicity Modelingcited by 2
  7. 2025PSA-MIL: A Probabilistic Spatial Attention-Based Multiple Instance Learning for Whole Slide Image Classificationcited by 2
  8. 2024A Semantic and Motion-Aware Spatiotemporal Transformer Network for Action Detectioncited by 1
  9. 2025Multiview Representation Learning via Distributed Joint Latent Space Structuringcited by 1
  10. 2025Robust Filter Attention: Self-Attention as Precision-Weighted State Estimationcited by 1
  11. 2026QUEST: A robust attention formulation using query-modulated spherical attentioncited by 1
  12. 2023Stochastic Vision Transformers with Wasserstein Distance-Aware Attentioncited by 0
  13. 2025EventSSEG: Event-driven Self-Supervised Segmentation with Probabilistic Attentioncited by 0
  14. 2025ForecastGAN: A Decomposition-Based Adversarial Framework for Multi-Horizon Time Series Forecastingcited by 0
  15. 2026Zonkey: A Hierarchical Diffusion Language Model with Differentiable Tokenization and Probabilistic Attentioncited by 0
  16. 2026One for All: A Non-Linear Transformer can Enable Cross-Domain Generalization for In-Context Reinforcement Learningcited by 0