通过自去噪平滑提升大型语言模型的鲁棒性
Advancing the Robustness of Large Language Models through Self-Denoised Smoothing
AI总结:
针对LLMs易受对抗攻击且难以提升鲁棒性的问题,提出自去噪平滑方法,利用模型自身先降噪再预测,无需额外训练,实验证明在经验与认证鲁棒性上均优于现有方法。
摘要:
尽管大型语言模型(LLMs)已取得显著成功,但它们对对抗性扰动(包括最近的越狱攻击)的脆弱性引发了相当大的担忧。然而,这些模型规模的不断增大及其有限的访问权限,使得提升其鲁棒性成为一项具有挑战性的任务。在各种防御策略中,随机平滑在LLMs上展现出巨大潜力,因为它不需要完全访问模型参数,也无需通过对抗训练进行微调。然而,随机平滑涉及在模型预测前向输入中添加噪声,最终模型的鲁棒性在很大程度上取决于模型在这些噪声损坏数据上的表现。其有效性往往受到模型在噪声数据上次优性能的限制。为解决这一问题,我们提出利用LLMs的多任务特性,首先对噪声输入进行去噪,然后基于这些去噪后的版本进行预测。我们将这一过程称为自去噪平滑。与计算机视觉中先前需要训练单独模型来增强LLMs鲁棒性的去噪平滑技术不同,我们的方法提供了显著更高的效率和灵活性。我们的实验结果表明,在防御针对下游任务和人类对齐(即越狱攻击)的对抗性攻击时,我们的方法在经验鲁棒性和认证鲁棒性方面均超越了现有方法。我们的代码公开于 https://github.com/UCSB-NLP-Chang/SelfDenoise
英文摘要:
Although large language models (LLMs) have achieved significant success, their vulnerability to adversarial perturbations, including recent jailbreak attacks, has raised considerable concerns. However, the increasing size of these models and their limited access make improving their robustness a challenging task. Among various defense strategies, randomized smoothing has shown great potential for LLMs, as it does not require full access to the model's parameters or fine-tuning via adversarial training. However, randomized smoothing involves adding noise to the input before model prediction, and the final model's robustness largely depends on the model's performance on these noise corrupted data. Its effectiveness is often limited by the model's sub-optimal performance on noisy data. To address this issue, we propose to leverage the multitasking nature of LLMs to first denoise the noisy inputs and then to make predictions based on these denoised versions. We call this procedure self-denoised smoothing. Unlike previous denoised smoothing techniques in computer vision, which require training a separate model to enhance the robustness of LLMs, our method offers significantly better efficiency and flexibility. Our experimental results indicate that our method surpasses existing methods in both empirical and certified robustness in defending against adversarial attacks for both downstream tasks and human alignments (i.e., jailbreak attacks). Our code is publicly available at https://github.com/UCSB-NLP-Chang/SelfDenoise
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。