arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.06522cs.CLcs.AI
收藏

随机平滑与掩码推理用于对抗鲁棒的文本分类

Randomized Smoothing with Masked Inference for Adversarially Robust Text Classifications

Nanyang Technological University(南洋理工大学);Salesforce AI(Salesforce人工智能研究院);Birla Institute of Technology and Science, Pilani(皮拉尼比特拉技术科学学院);A*STAR(新加坡科技研究局)

Han Cheol Moon, Shafiq Joty, Ruochen Zhao, Megh Thakkar, Xu Chi

AI总结:

提出RSMI框架,结合随机平滑与掩码推理,将文本分类对抗鲁棒性提升2至3倍,并通过实验验证其有效性。

摘要:

大规模预训练语言模型在各种自然语言处理任务中表现出色。然而,它们也被认为在面对精心设计的对抗样本时相当脆弱,这促使人们越来越关注自然语言处理系统的对抗鲁棒性。我们提出了RSMI,一种新颖的两阶段框架,将随机平滑(RS)与掩码推理(MI)相结合,以提高自然语言处理系统的对抗鲁棒性。RS将分类器转换为平滑分类器以获得鲁棒表示,而MI则迫使模型利用输入序列中掩码标记的周围上下文。在基准数据集上,RSMI将对抗鲁棒性比现有最先进方法提高了2到3倍。我们还进行了深入的定性分析,以验证RSMI不同阶段的有效性,并通过大量消融实验探究其组件的影响。通过实证证明RSMI的稳定性,我们将其作为鲁棒训练大规模自然语言处理模型的实用方法提出。我们的代码和数据集可在https://github.com/Han8931/rsmi_nlp获取。

英文摘要:

Large-scale pre-trained language models have shown outstanding performance in a variety of NLP tasks. However, they are also known to be significantly brittle against specifically crafted adversarial examples, leading to increasing interest in probing the adversarial robustness of NLP systems. We introduce RSMI, a novel two-stage framework that combines randomized smoothing (RS) with masked inference (MI) to improve the adversarial robustness of NLP systems. RS transforms a classifier into a smoothed classifier to obtain robust representations, whereas MI forces a model to exploit the surrounding context of a masked token in an input sequence. RSMI improves adversarial robustness by 2 to 3 times over existing state-of-the-art methods on benchmark datasets. We also perform in-depth qualitative analysis to validate the effectiveness of the different stages of RSMI and probe the impact of its components through extensive ablations. By empirically proving the stability of RSMI, we put it forward as a practical method to robustly train large-scale NLP models. Our code and datasets are available at https://github.com/Han8931/rsmi_nlp

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

↑