AxFormer: Accuracy-driven Approximation of Transformers for Faster, Smaller and more Accurate NLP Models
Open accessThe DOI matches its Crossref record; 28 of the 28 references it cites were found in a registry or an index.
Abstract
Transformers have greatly advanced the state-of-the-art in Natural Language Processing (NLP) in recent years, but present very large computation and storage requirements. We observe that the design process of Transformers (pre-train a foundation model on a large dataset in a self-supervised manner, and subsequently fine-tune it for different downstream tasks) leads to task-specific models that are highly over-parameterized, adversely impacting both accuracy and inference efficiency. We propose AxFormer, a systematic framework that applies accuracy-driven approximations to create optimized transformer models for a given downstream task. AxFormer combines two key optimizations — accuracy-driven pruning and selective hard attention. Accuracy-driven pruning identifies and removes parts of the fine-tuned transformer that hinder performance on the given downstream task. Sparse hard-attention optimizes attention blocks in selected layers by eliminating irrelevant word aggregations, thereby helping the model focus only on the relevant parts of the input. In effect, AxFormer leads to models that are more accurate, while also being faster and smaller. Our experiments on GLUE and SQUAD tasks show that AxFormer models are up to 4.5% more accurate, while also being up to 2.5× faster and up to 3.2× smaller than conventional fine-tuned models. In addition, we demonstrate that AxFormer can be combined with previous efforts such as distillation or quantization to achieve further efficiency gains. Code is available at https://github.com/amrnag/Specialized-Transformers.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
In the citing paper
“Their technique leads to smaller, faster and more accurate models.”
From A Survey of Techniques for Optimizing Transformer Inference (2023) · cites this paper as [83]
In the citing paper
“Finally, their technique has small latency since it only requires multiple iterations on a small validation set and no finetuning or retraining.”
From A Survey of Techniques for Optimizing Transformer Inference (2023) · cites this paper as [83]
In the citing paper
“Also, their models are relatively insensitive to the choice of random seed initialization.”
From A Survey of Techniques for Optimizing Transformer Inference (2023) · cites this paper as [83]
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2018) · arXiv · doi:10.48550/arxiv.1810.04805 · Cited by 73,173 · cited 1×
“Transformer models [2], [15], [1] have revolutionized the field of Natural Language Processing (NLP), greatly advancing”
BackgroundBERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019) · Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers) · doi:10.18653/v1/n19-1423 · Cited by 54,325 · cited 1×
“Transformer models [2], [15], [1] have revolutionized the field of Natural Language Processing (NLP), greatly advancing”
BackgroundLanguage Models are Few-Shot Learners
Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. (2020) · arXiv · doi:10.48550/arxiv.2005.14165 · Cited by 23,372 · cited 2×
“Current state-of-the-art transformer networks (such as GPT3 [1]) have hundreds of billions of parameters.”
BackgroundDistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter
Sanh, V., Debut, L., Chaumond, J., & Wolf, T. (2019) · arXiv · doi:10.48550/arxiv.1910.01108 · Cited by 13,823 · cited 7×
“AxFormer versions of Q8BERT-base and DistilBERT-base models exceed the accuracy of BERT-base models, while being up to 3.7 × faster and 12.1 × smaller than BERT-base .”
BackgroundInfluentialKaugeranna, R., Kaugeranna, E., & Aion, (. S. 4. 6. (2023) · DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) · doi:10.4230/lipics.giscience.2023.43 · Cited by 13,690
SQuAD: 100,000+ Questions for Machine Comprehension of Text
Rajpurkar, P., Zhang, J., Lopyrev, K., & Liang, P. (2016) · Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/d16-1264 · Cited by 6,208 · cited 1×
“1 [16], a Question Answering task, in Table I.”
BackgroundALBERT: A Lite BERT for Self-supervised Learning of Language Representations
Lan, Z., Chen, M., Goodman, S., Gimpel, K., Sharma, P., & Soricut, R. (2019) · arXiv · doi:10.48550/arxiv.1909.11942 · Cited by 4,308 · cited 1×
“AlBERT [9] uses factorized embeddings and cross-layer parameter sharing.”
MethodGLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understanding
Wang, A., Singh, A., Michael, J., Hill, F., Levy, O., & Bowman, S. (2018) · Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP · doi:10.18653/v1/w18-5446 · Cited by 4,222 · cited 3×
“For GLUE, we present results on the test set using the GLUE evaluation server to obtain the scores [24], and for SQUAD, we present results on the dev set.”
MethodThe Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networks
Frankle, J., & Carbin, M. (2018) · arXiv · doi:10.48550/arxiv.1803.03635 · Cited by 3,763
HuggingFace's Transformers: State-of-the-art Natural Language Processing
Wolf, T., Debut, L., Sanh, V., Chaumond, J., Delangue, C., Moi, A., Cistac, P., Rault, T., Louf, R., Funtowicz, M., et al. (2019) · arXiv · doi:10.48550/arxiv.1910.03771 · Cited by 3,347
Research works printed but not linked: 1
- Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. 2019.
Cited by
Zhang, H., & Shafiq, M. O. (2024) · Journal Of Big Data · doi:10.1186/s40537-023-00842-0 · Cited by 219
A Survey of Techniques for Optimizing Transformer Inference
Chitty-Venkata, K. T., Mittal, S., Emani, M., Vishwanath, V., & Somani, A. K. (2023) · Journal of Systems Architecture · doi:10.1016/j.sysarc.2023.102990 · Cited by 154
Softermax: Hardware/Software Co-Design of an Efficient Softmax for Transformers
Stevens, J. R., Venkatesan, R., Dai, S., Khailany, B., & Raghunathan, A. (2021) · 2021 58th ACM/IEEE Design Automation Conference (DAC) · doi:10.1109/dac18074.2021.9586134 · Cited by 148
Self-citationA 95.6-TOPS/W Deep Learning Inference Accelerator With Per-Vector Scaled 4-bit Quantization in 5 nm
Keller, B., Venkatesan, R., Dai, S. X., Tell, S. G., Zimmer, B., Sakr, C., Dally, W. J., Gray, C. T., & Khailany, B. (2023) · IEEE Journal of Solid-State Circuits · doi:10.1109/jssc.2023.3234893 · Cited by 74
“Algorithmic optimizations have been employed to reduce network size using techniques, such as knowledge distillation [33], inductive biases [34], and approximations [35], [36], [37], [38].”
MethodWatson, E. ‘., Viana, T., & Zhang, S. (2023) · AI · doi:10.3390/ai4010007 · Cited by 24
“Approximate computing and neuron reuse have also been proposed as optimization methods [376,377].”
MethodStock, P. (2021) · theses.fr (ABES) · doi:10.70675/8c51cee1z7549z49f5z9609zd55b5d8f0826 · Cited by 6
Metadata
- Authors
- Nagarajan, A., Sen, S., Stevens, J. R., & Raghunathan, A.
- Affiliations
- Purdue University West Lafayette (US)
- Venue
- 2022 International Joint Conference on Neural Networks (IJCNN)
- Publisher
- IEEE
- Published
- 2022-07-18
- Pages
- 1-8
- ISSN
- 2161-4407 (ISSN-L)
- OpenAlex
- W4312772368
- Semantic Scholar
- af8c3135266e0abd942bb6e72e193afa44cefb25
- Cited by
- 3
- References
- 27
- Citations by year
- 2023: 3
- FWCI
- 0.27
- Type
- conference paper
- Language
- en
- Open access
- green
- arxiv.org
- Locations
- International Joint Conference on Neural Networks (IJCNN) (publishedVersion)
- arXiv (Cornell University) (submittedVersion)
- arXiv (Cornell University)
- Funders
- Semiconductor Research Corporation
- Topics
- Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Advanced Neural Network Applications
- Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
- Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
- Keywords
- sparse attention, model size reduction, inference efficiency, knowledge distillation, quantization
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.