Integrated gradients-based defense against adversarial word substitution attacks
摘要
Deep neural networks have demonstrated vulnerability to intentionally crafted adversarial examples. Adversarial training is currently the most effective empirical defense method against adversarial word substitution attacks. However, the exponential scaling of perturbations with the length of the input text renders it computationally expensive and inefficient. In this paper, we present an integrated gradients-based defense (IGD) to address the aforementioned limitations. We first leverage the integrated gradients to efficiently generate pseudo-labels. Then, we introduce an effective mechanism that trains the model on a combination of clean examples and their pseudo-labels simultaneously. Besides, we add a gradient reversal layer at the top of IGD as a regularization term to mitigate the abundance of pseudo-labels. We evaluate IGD on various text classification benchmark datasets. Despite its simplicity, our extensive experiments show that it surprisingly outperforms the state-of-the-art alternatives in most scenarios and the improvements can be deemed significant. IGD is publicly available at https://github.com/amurtadha/IGD-main.