Dynamic Transformers Provide a False Sense of Efficiency
Preprint
Abstract
Despite much success in natural language processing (NLP), pre-trained language models typically lead to a high computational cost during inference. Multi-exit is a mainstream approach to address this issue by making a trade-off between efficiency and accuracy, where the saving of computation comes from an early exit. However, whether such saving from early-exiting is robust remains unknown. Motivated by this, we first show that directly adapting existing adversarial attack approaches targeting model accuracy cannot significantly reduce inference efficiency. To this end, we propose a simple yet effective attacking framework, SAME, a novel slowdown attack framework on multi-exit models, which is specially tailored to reduce the efficiency of the multi-exit models. By leveraging the multi-exit models' design characteristics, we utilize all internal predictions to guide the adversarial sample generation instead of merely considering the final prediction. Experiments on the GLUE benchmark show that SAME can effectively diminish the efficiency gain of various multi-exit models by 80% on average, convincingly validating its effectiveness and generalization ability.Keywords
All Related Versions
This publication has 25 references indexed in Scilit:
- Predict-and-Update Network: Audio-Visual Speech Recognition Inspired by Human Speech PerceptionIEEE Transactions on Audio, Speech and Language Processing, 2024
- Sibling-Attack: Rethinking Transferable Adversarial Attacks against Face Recognition2023
- Automatic Lyrics Transcription of Polyphonic Music With Lyrics-Chord Multi-Task LearningIEEE/ACM Transactions on Audio, Speech, and Language Processing, 2022
- BERT-ATTACK: Adversarial Attack Against BERT Using BERT2020
- TextAttack: A Framework for Adversarial Attacks, Data Augmentation, and Adversarial Training in NLP2020
- BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension2020
- DeeBERT: Dynamic Early Exiting for Accelerating BERT Inference2020
- FastBERT: a Self-distilling BERT with Adaptive Inference Time2020
- Neural Network Acceptability JudgmentsTransactions of the Association for Computational Linguistics, 2019
- Crafting adversarial input sequences for recurrent neural networks2016