[论文解读] Self-Supervised Contrastive Learning with Adversarial Perturbations for Robust Pretrained Language Models
该论文提出一种自监督对比学习方法,通过在训练过程中动态生成对抗性扰动(仅使用无标签数据),提升 BERT 对词替换类对抗攻击的鲁棒性。该方法在四个数据集上均提升了鲁棒性,且无需标签或预定义的对抗样本。
This paper improves the robustness of the pretrained language model BERT against word substitution-based adversarial attacks by leveraging self-supervised contrastive learning with adversarial perturbations. One advantage of our method compared to previous works is that it is capable of improving model robustness without using any labels. Additionally, we also create an adversarial attack for word-level adversarial training on BERT. The attack is efficient, allowing adversarial training for BERT on adversarial examples generated on the fly during training. Experimental results on four datasets show that our method improves the robustness of BERT against four different word substitution-based adversarial attacks. Furthermore, to understand why our method can improve the model robustness against adversarial attacks, we study vector representations of clean examples and their corresponding adversarial examples before and after applying our method. As our method improves model robustness with unlabeled raw data, it opens up the possibility of using large text datasets to train robust language models.
研究动机与目标
- 提升预训练语言模型(如 BERT)对词替换类对抗攻击的鲁棒性。
- 开发一种无需依赖标签数据或预计算对抗样本的方法以增强鲁棒性。
- 设计一种高效、可在线生成的对抗性攻击生成机制,与 BERT 训练兼容。
- 通过分析干净样本与对抗样本嵌入表示,理解导致鲁棒性提升的表征层面变化。
提出的方法
- 该方法采用自监督对比学习,对齐干净输入句子与其对抗性扰动版本的表征。
- 对抗样本通过一种词替换攻击在训练过程中动态生成,该攻击将词语替换为语义相似但具有对抗性的词。
- 对比损失促使模型对同一输入句子的干净版本与对抗版本生成相似的表征。
- 该方法在原始无标签文本上端到端训练,从而可扩展至大规模数据集。
- 设计了一种新颖的对抗性攻击,高效且兼容在线训练,支持实时扰动生成。
- 通过学习对词级扰动具有鲁棒性的不变表征,提升模型鲁棒性。
实验结果
研究问题
- RQ1如何通过自监督对比学习在不使用标签的情况下提升 BERT 对词替换类对抗攻击的鲁棒性?
- RQ2在线生成对抗样本对模型鲁棒性与训练效率有何影响?
- RQ3应用该方法前后,干净样本与对抗样本的表征有何差异?
- RQ4能否通过该方法有效利用大规模无标签文本训练出鲁棒的语言模型?
主要发现
- 所提方法在四个基准数据集上,对四种不同的词替换类对抗攻击均提升了 BERT 的鲁棒性。
- 该模型在无需任何标签数据的情况下实现鲁棒性提升,完全依赖自监督与对抗性扰动。
- 表征分析显示,该方法降低了干净样本与对抗样本嵌入之间的距离,表明在表征层面实现了更强的鲁棒性。
- 该方法通过在训练过程中实时生成对抗样本,实现了高效的对抗训练。
- 该方法展现出对大规模文本数据集的可扩展性,为在海量无标签语料上训练鲁棒模型开辟了新途径。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。