When to Use Efficient Self Attention? Profiling Text, Speech and Image Transformer Variants
Not on the map. Why?
Abstract (arXiv)
We present the first unified study of the efficiency of self-attention-based Transformer variants spanning text, speech and vision. We identify input length thresholds (tipping points) at which efficient Transformer variants become more efficient than vanilla models, using a variety of efficiency metrics (latency, throughput, and memory). To conduct this analysis for speech, we introduce L-HuBERT, a novel local-attention variant of a self-supervised speech model. We observe that these thresholds are (a) much higher than typical dataset sequence lengths and (b) dependent on the metric and modality, showing that choosing the right model depends on modality, task type (long-form vs. typical context) and resource constraints (time vs. memory). By visualising the breakdown of the computational costs for transformer components, we also show that non-self-attention components exhibit significant computational costs. We release our profiling toolkit at https://github.com/ajd12342/profiling-transformers .
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 29 of its 42 references that are in the map. First posted on arXiv 14 Jun 2023.
Builds on
29 of 42 references.
References · 29
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,754
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,955
- 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,682
- 2021HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden Unitscited by 2,342
- 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,554
17 more
- 2019fairseq: A Fast, Extensible Toolkit for Sequence Modelingcited by 1,488
- 2015Teaching Machines to Read and Comprehendcited by 1,049
- 2020Efficient Transformers: A Surveycited by 790
- 2017VoxCeleb: a large-scale speaker identification datasetcited by 732
- 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 700
- 2021SUPERB: Speech processing Universal PERformance Benchmarkcited by 666
- 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 471
- 2021Generative Spoken Language Modeling from Raw Audiocited by 340
- 2022Self-Supervised Speech Representation Learning: A Reviewcited by 260
- 2018TED-LIUM 3: twice as much data and corpus repartition for experiments on speaker adaptationcited by 226
- 2021QuALITY: Question Answering with Long Input Texts, Yes!cited by 208
- 2021The Efficiency Misnomercited by 98
- 2021Luna: Linear Unified Nested Attentioncited by 96
- 2018Spoken SQuAD: A Study of Mitigating the Impact of Speech Recognition Errors on Listening Comprehensioncited by 74
- 2019Transformer-Transducer: End-to-End Speech Recognition with Self-Attentioncited by 69
- 2021Performance-Efficiency Trade-offs in Unsupervised Pre-training for Speech Recognitioncited by 68
- 2021Efficient Transformer for Direct Speech Translationcited by 5
Built on by
Not cited yet.