IM-BERT: Enhancing Robustness of BERT through the Implicit Euler Method

MiHyeon Kim, Juhyoung Park, YoungBin Kim


Abstract
Pre-trained Language Models (PLMs) have achieved remarkable performance on diverse NLP tasks through pre-training and fine-tuning. However, fine-tuning the model with a large number of parameters on limited downstream datasets often leads to vulnerability to adversarial attacks, causing overfitting of the model on standard datasets. To address these issues, we propose IM-BERT from the perspective of a dynamic system by conceptualizing a layer of BERT as a solution of Ordinary Differential Equations (ODEs). Under the situation of initial value perturbation, we analyze the numerical stability of two main numerical ODE solvers: *the explicit and implicit Euler approaches.* Based on these analyses, we introduce a numerically robust IM-connection incorporating BERT’s layers. This strategy enhances the robustness of PLMs against adversarial attacks, even in low-resource scenarios, without introducing additional parameters or adversarial training strategies. Experimental results on the adversarial GLUE (AdvGLUE) dataset validate the robustness of IM-BERT under various conditions. Compared to the original BERT, IM-BERT exhibits a performance improvement of approximately 8.3%p on the AdvGLUE dataset. Furthermore, in low-resource scenarios, IM-BERT outperforms BERT by achieving 5.9%p higher accuracy.
Anthology ID:
2024.emnlp-main.907
Volume:
Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing
Month:
November
Year:
2024
Address:
Miami, Florida, USA
Editors:
Yaser Al-Onaizan, Mohit Bansal, Yun-Nung Chen
Venue:
EMNLP
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
16217–16229
Language:
URL:
https://aclanthology.org/2024.emnlp-main.907
DOI:
Bibkey:
Cite (ACL):
MiHyeon Kim, Juhyoung Park, and YoungBin Kim. 2024. IM-BERT: Enhancing Robustness of BERT through the Implicit Euler Method. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 16217–16229, Miami, Florida, USA. Association for Computational Linguistics.
Cite (Informal):
IM-BERT: Enhancing Robustness of BERT through the Implicit Euler Method (Kim et al., EMNLP 2024)
Copy Citation:
PDF:
https://aclanthology.org/2024.emnlp-main.907.pdf
Software:
 2024.emnlp-main.907.software.zip