The Impact of Quantization on the Robustness of Transformer-based Text Classifiers
Not on the map. Why?
Abstract (arXiv)
Transformer-based models have made remarkable advancements in various NLP areas. Nevertheless, these models often exhibit vulnerabilities when confronted with adversarial attacks. In this paper, we explore the effect of quantization on the robustness of Transformer-based models. Quantization usually involves mapping a high-precision real number to a lower-precision value, aiming at reducing the size of the model at hand. To the best of our knowledge, this work is the first application of quantization on the robustness of NLP models. In our experiments, we evaluate the impact of quantization on BERT and DistilBERT models in text classification using SST-2, Emotion, and MR datasets. We also evaluate the performance of these models against TextFooler, PWWS, and PSO adversarial attacks. Our findings show that quantization significantly improves (by an average of 18.68%) the adversarial accuracy of the models. Furthermore, we compare the effect of quantization versus that of the adversarial training approach on robustness. Our experiments indicate that quantization increases the robustness of the model by 18.80% on average compared to adversarial training without imposing any extra computational overhead during training. Therefore, our results highlight the effectiveness of quantization in improving the robustness of NLP models.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 31 of its 54 references that are in the map. First posted on arXiv 8 Mar 2024.
Builds on
31 of 54 references.
References · 31
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,243
- 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,014
- 2017Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inferencecited by 1,548
- 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 663
- 2017Adversarial Examples for Evaluating Reading Comprehension Systemscited by 568
- 2018Generating Natural Language Adversarial Examplescited by 422
- 2016Quantized Neural Networks: Training Neural Networks with Low Precision Weights and Activationscited by 413
- 2017A Survey of Model Compression and Acceleration for Deep Neural Networkscited by 298
- 2019Q8BERT: Quantized 8Bit BERTcited by 296
- 2016Adversarial Training Methods for Semi-Supervised Text Classificationcited by 280
19 more
- 2018LQ-Nets: Learned Quantization for Highly Accurate and Compact Deep Neural Networkscited by 272
- 2021I-BERT: Integer-only BERT Quantizationcited by 250
- 2019Improving Adversarial Robustness via Promoting Ensemble Diversitycited by 213
- 2015Yara Parser: A Fast and Accurate Dependency Parsercited by 110
- 2019Text Processing Like Humans Do: Visually Attacking and Shielding NLP Systemscited by 99
- 2019Achieving Verified Robustness to Symbol Substitutions via Interval Bound Propagationcited by 87
- 2022Compression of Generative Pre-trained Language Models via Quantizationcited by 79
- 2020SAFER: A Structure-free Approach for Certified Robustness to Adversarial Word Substitutionscited by 72
- 2020Robust Quantization: One Model to Rule Them Allcited by 63
- 2021Model Extraction and Adversarial Transferability, Your BERT is Vulnerable!cited by 51
- 2015Neural Networks with Few Multiplicationscited by 46
- 2021Generating Syntactically Controlled Paraphrases without Using Annotated Parallel Pairscited by 45
- 2018Robust Machine Comprehension Models via Adversarial Trainingcited by 44
- 2017Attacking Binarized Neural Networkscited by 28
- 2020EMPIR: Ensembles of Mixed Precision Deep Networks for Increased Robustness against Adversarial Attackscited by 28
- 2021Automatic Mixed-Precision Quantization Search of BERTcited by 16
- 2019White-to-Black: Efficient Distillation of Black-Box Adversarial Attackscited by 14
- 2019Discretization based Solutions for Secure Machine Learning against Adversarial Attackscited by 10
- 2018SlimNets: An Exploration of Deep Model Compression and Accelerationcited by 4
Built on by
Citing papers per year: 2026: 2.
2 papers.