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

迈向大型语言模型的最坏情况鲁棒性

Towards the Worst-case Robustness of Large Language Models

Tsinghua Univerisity(清华大学);Peking University(北京大学)

Huanran Chen, Zeming Wei, Yao Huang, Yinpeng Dong, Jun Zhu

AI总结:

本研究通过白盒攻击和背包求解器,为大型语言模型的最坏情况鲁棒性提供上下界,并验证了均匀核平滑在平均ℓ0扰动2.02或后缀长度6.41下的鲁棒性。

摘要:

近期研究揭示了大型语言模型对对抗性攻击的脆弱性,攻击者通过精心构造特定输入序列,诱导模型产生有害、暴力、涉及隐私或错误的输出。在本工作中,我们研究其最坏情况鲁棒性,即是否存在一个对抗性样本导致此类不良输出。我们利用更强的白盒攻击来给出最坏情况鲁棒性的上界,表明大多数当前的确定性防御方法在最坏情况下的鲁棒性几乎为0%。我们提出了一种通用的紧下界方法,基于分数背包求解器或0-1背包求解器来界定随机平滑的最坏情况鲁棒性,并利用这些求解器为所有随机防御方法提供下界。基于这些求解器,我们为若干先前的经验防御方法提供了理论下界。例如,我们验证了一个特定情形——使用均匀核进行平滑——对任何可能攻击的鲁棒性,其平均ℓ0扰动为2.02,或平均后缀长度为6.41。

英文摘要:

Recent studies have revealed the vulnerability of large language models to adversarial attacks, where adversaries craft specific inputs to induce incorrect or harmful outputs. Although various empirical defenses have been proposed, their worst-case robustness remains poorly understood, raising concerns about how they would behave against stronger future attacks. Here, we study the worst-case robustness of LLMs from both empirical and theoretical perspectives. First, we provide tighter empirical upper bounds for the tested deterministic defenses using stronger white-box attacks, under which most tested configurations achieve nearly 0\% robustness. Second, we formulate randomized-smoothing certification for bounded and binary base functions as fractional and 0-1 knapsack problems, respectively, and derive grouped solvers for two token kernels. For example, on AdvBench, we certify a GPT-4o safety detector smoothed by a uniform kernel to an average certified $\ell_0$ radius of 2.02. In our stated suffix-attack setting, the same kernel certifies a Llama-3-8B safety detector to an average certified radius of 6.41.

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

↑