arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.01873cs.CLcs.CRcs.LG
收藏

CR-UTP:针对大型语言模型上通用文本扰动的认证鲁棒性

CR-UTP: Certified Robustness against Universal Text Perturbations on Large Language Models

University of Central Florida(中佛罗里达大学)

Qian Lou, Xin Liang, Jiaqi Xue, Yancheng Zhang, Rui Xie, Mengxin Zheng

AI总结:

本文研究语言模型对通用文本扰动(UTP)的认证鲁棒性问题,提出优越提示搜索与集成技术,在大量掩盖下维持高认证准确率,首次实现针对UTP和ISTP的最先进认证效果。

摘要:

确保语言模型每次预测的稳定性至关重要;即语言的预测应在轻微输入变化(如词语替换)下保持一致。本文研究了认证语言模型对通用文本扰动(UTP)鲁棒性的问题,UTP已被广泛用于通用对抗攻击和后门攻击中。基于随机平滑的现有认证鲁棒性在认证输入特定文本扰动(ISTP)方面显示出巨大前景,其假设是对样本干净或对抗词语的随机改变会抵消样本级扰动的影响。然而对于UTP,仅掩盖对抗词语即可消除攻击。一种简单方法是增加掩盖比例和掩盖攻击词元的概率,但由于大量掩盖导致的输入损坏,这会导致认证准确率和认证半径显著降低。为解决这一挑战,我们引入了一种新方法——优越提示搜索方法,旨在找出一种在大量掩盖下仍能保持较高认证准确率的优越提示。此外,我们在理论上证明了集成是随机平滑基础提示的特别合适选择,该方法被称为优越提示集成技术。我们还通过实验验证了该技术,在多种设置下获得了最先进的结果。这些方法首次实现了针对UTP和ISTP的高认证准确率。CR-UTP的源代码可在\url{https://github.com/UCFML-Research/CR-UTP}获取。

英文摘要:

It is imperative to ensure the stability of every prediction made by a language model; that is, a language's prediction should remain consistent despite minor input variations, like word substitutions. In this paper, we investigate the problem of certifying a language model's robustness against Universal Text Perturbations (UTPs), which have been widely used in universal adversarial attacks and backdoor attacks. Existing certified robustness based on random smoothing has shown considerable promise in certifying the input-specific text perturbations (ISTPs), operating under the assumption that any random alteration of a sample's clean or adversarial words would negate the impact of sample-wise perturbations. However, with UTPs, masking only the adversarial words can eliminate the attack. A naive method is to simply increase the masking ratio and the likelihood of masking attack tokens, but it leads to a significant reduction in both certified accuracy and the certified radius due to input corruption by extensive masking. To solve this challenge, we introduce a novel approach, the superior prompt search method, designed to identify a superior prompt that maintains higher certified accuracy under extensive masking. Additionally, we theoretically motivate why ensembles are a particularly suitable choice as base prompts for random smoothing. The method is denoted by superior prompt ensembling technique. We also empirically confirm this technique, obtaining state-of-the-art results in multiple settings. These methodologies, for the first time, enable high certified accuracy against both UTPs and ISTPs. The source code of CR-UTP is available at \url {https://github.com/UCFML-Research/CR-UTP}.

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

↑