mlsanityData to 7 Oct 2026

On the Distribution, Sparsity, and Inference-time Quantization of Attention Values in Transformers

arXiv 2106.01335 ↗First posted 2 Jun 2021cs.CLcited by 14

Not on the map. Why?

Abstract (arXiv)

How much information do NLP tasks really need from a transformer's attention mechanism at application-time (inference)? From recent work, we know that there is sparsity in transformers and that the floating-points within its computation can be discretized to fewer values with minimal loss to task accuracies. However, this requires retraining or even creating entirely new models, both of which can be expensive and carbon-emitting. Focused on optimizations that do not require training, we systematically study the full range of typical attention values necessary. This informs the design of an inference-time quantization technique using both pruning and log-scaled mapping which produces only a few (e.g. 23) unique values. Over the tasks of question answering and sentiment analysis, we find nearly 80% of attention values can be pruned to zeros with minimal (< 1.0%) relative loss in accuracy. We use this pruning technique in conjunction with quantizing the attention values to only a 3-bit format, without retraining, resulting in only a 0.8% accuracy reduction on question answering with fine-tuned RoBERTa.

Key facts. Cited by 14 papers in the map (data through 7 Oct 2026). Builds on 31 of its 41 references that are in the map. First posted on arXiv 2 Jun 2021.

Builds on

31 of 41 references.

References · 31

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  3. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
  4. 2020Longformer: The Long-Document Transformercited by 3,362
  5. 2019Generating Long Sequences with Sparse Transformerscited by 1,523
  6. 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 994
  7. 2019Attention is not Explanationcited by 916
  8. 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 844
  9. 2020A Primer in BERTology: What we know about how BERT workscited by 807
  10. 2019Are Sixteen Heads Really Better than One?cited by 803
  11. 2018Image Transformercited by 770
  12. 2019Attention is not not Explanationcited by 629
19 more
  1. 2019Q-BERT: Hessian Based Ultra Low Precision Quantization of BERTcited by 355
  2. 2019Axial Attention in Multidimensional Transformerscited by 350
  3. 2019Revealing the Dark Secrets of BERTcited by 300
  4. 2019Q8BERT: Quantized 8Bit BERTcited by 296
  5. 2019A Multiscale Visualization of Attention in the Transformer Modelcited by 292
  6. 2020The Lottery Ticket Hypothesis for Pre-trained BERT Networkscited by 275
  7. 2021I-BERT: Integer-only BERT Quantizationcited by 250
  8. 2019Analyzing the Structure of Attention in a Transformer Language Modelcited by 241
  9. 2020BinaryBERT: Pushing the Limit of BERT Quantizationcited by 175
  10. 2019Adaptively Sparse Transformerscited by 154
  11. 2020TernaryBERT: Distillation-aware Ultra-low Bit BERTcited by 145
  12. 2019On Identifiability in Transformerscited by 115
  13. 2020GOBO: Quantizing Attention-Based NLP Models for Low Latency and Energy Efficient Inferencecited by 103
  14. 2018Context-Aware Neural Machine Translation Learns Anaphora Resolutioncited by 97
  15. 2019Efficient 8-Bit Quantization of Transformer Neural Machine Language Translation Modelcited by 58
  16. 2020Similarity Analysis of Contextual Word Representation Modelscited by 54
  17. 2019Fully Quantized Transformer for Machine Translationcited by 36
  18. 2020Telling BERT's full story: from Local Attention to Global Aggregationcited by 15
  19. 2019Big Bidirectional Insertion Representations for Documentscited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2022: 3; 2023: 2; 2024: 3; 2025: 2; 2026: 4.

14 papers.

Sort:

By area: