arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2507.21750cs.CL
收藏

无需对抗防御的对抗防御:通过实例级主成分去除增强语言模型鲁棒性

Adversarial Defence without Adversarial Defence: Enhancing Language Model Robustness via Instance-level Principal Component Removal

The University of Manchester, UK(曼彻斯特大学);Durham University, UK(杜伦大学);The University of Southampton, UK(南安普顿大学);Automated Analytics, UK(自动化分析)

Yang Wang, Chenghao Xiao, Yizhi Li, Stuart E. Middleton, Noura Al Moubayed, Chenghua Lin

AI总结:

本研究提出一种无需对抗防御的附加模块,通过去除实例级主成分并近似高斯化嵌入空间,在保持准确率的同时增强预训练语言模型的对抗鲁棒性,并在八个基准上验证了有效性。

摘要:

预训练语言模型(PLMs)推动了自然语言处理的重大进展,但仍易受对抗攻击影响,这引发了对其在实际应用中鲁棒性的担忧。以往研究试图通过在训练过程中隐式或显式地引入对抗扰动来减轻对抗攻击的影响。虽然这两种策略都能增强鲁棒性,但往往带来高昂的计算成本。在本工作中,我们提出了一种简单而有效的附加模块,通过去除实例级主成分来增强PLMs的对抗鲁棒性,无需依赖传统的对抗防御或扰动原始训练数据。我们的方法将嵌入空间变换为近似高斯性质,从而降低其对对抗扰动的敏感性,同时保持语义关系。这种变换以最小化对抗噪声对决策边界影响的方式对齐嵌入分布,在不需对抗样本或昂贵的训练时增强的情况下提升鲁棒性。在八个基准数据集上的评估表明,我们的方法在保持与基线相当的攻击前准确率的同时提升了对抗鲁棒性,实现了鲁棒性与泛化之间的平衡权衡。

英文摘要:

Pre-trained language models (PLMs) have driven substantial progress in natural language processing but remain vulnerable to adversarial attacks, raising concerns about their robustness in real-world applications. Previous studies have sought to mitigate the impact of adversarial attacks by introducing adversarial perturbations into the training process, either implicitly or explicitly. While both strategies enhance robustness, they often incur high computational costs. In this work, we propose a simple yet effective add-on module that enhances the adversarial robustness of PLMs by removing instance-level principal components, without relying on conventional adversarial defences or perturbing the original training data. Our approach transforms the embedding space to approximate Gaussian properties, thereby reducing its susceptibility to adversarial perturbations while preserving semantic relationships. This transformation aligns embedding distributions in a way that minimises the impact of adversarial noise on decision boundaries, enhancing robustness without requiring adversarial examples or costly training-time augmentation. Evaluations on eight benchmark datasets show that our approach improves adversarial robustness while maintaining comparable before-attack accuracy to baselines, achieving a balanced trade-off between robustness and generalisation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑