arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2408.01420cs.LGcs.AIcs.CL
收藏

不可能的任务:从统计视角看大语言模型越狱

Mission Impossible: A Statistical Perspective on Jailbreaking LLMs

NYU(纽约大学);Meta AI, FAIR(Meta AI FAIR研究院)

Jingtong Su, Julia Kempe, Karen Ullrich

AI总结:

本文从统计视角证明LLMs越狱在合理假设下无法完全预防,并提出改进RLHF的E-RLHF方法,在不增加训练成本且保持模型性能的同时提升对齐安全性。

摘要:

大语言模型(LLMs)在海量文本数据上训练,但质量控制有限。因此,LLMs可能表现出非预期甚至有害的行为,例如泄露信息、传播假新闻或仇恨言论。通常被称为偏好对齐的应对措施包括用精心构建的期望行为文本示例对预训练LLMs进行微调。即便如此,经验证据表明,经过偏好对齐的LLMs仍可能被诱导产生有害行为。这种所谓的LLMs越狱通常通过对输入提示进行对抗性修改来实现。本文从统计视角为偏好对齐和越狱现象提供理论洞见。在我们的框架下,我们首先证明,如果训练语料中存在有害行为,预训练LLMs就会模仿这些行为。在同一框架下,我们随后引入对齐的统计概念,并对越狱概率给出下界,表明在合理假设下越狱是无法预防的。基于这些洞见,我们提出对当前盛行的对齐策略RLHF进行修改。具体而言,我们对RLHF目标引入一种简单修改,称之为E-RLHF,旨在提高安全响应的可能性。E-RLHF不带来额外训练成本,并且与其他方法兼容。在实验上,我们证明E-RLHF在AdvBench和HarmBench项目提出的所有对齐问题上均优于RLHF,同时不牺牲以MT-Bench项目衡量的模型性能。

英文摘要:

Large language models (LLMs) are trained on a deluge of text data with limited quality control. As a result, LLMs can exhibit unintended or even harmful behaviours, such as leaking information, fake news or hate speech. Countermeasures, commonly referred to as preference alignment, include fine-tuning the pretrained LLMs with carefully crafted text examples of desired behaviour. Even then, empirical evidence shows preference aligned LLMs can be enticed to harmful behaviour. This so called jailbreaking of LLMs is typically achieved by adversarially modifying the input prompt to the LLM. Our paper provides theoretical insights into the phenomenon of preference alignment and jailbreaking from a statistical perspective. Under our framework, we first show that pretrained LLMs will mimic harmful behaviour if present in the training corpus. Under that same framework, we then introduce a statistical notion of alignment, and lower-bound the jailbreaking probability, showing that it is unpreventable under reasonable assumptions. Based on our insights, we propose an alteration to the currently prevalent alignment strategy RLHF. Specifically, we introduce a simple modification to the RLHF objective, we call E-RLHF, that aims to increase the likelihood of safe responses. E-RLHF brings no additional training cost, and is compatible with other methods. Empirically, we demonstrate that E-RLHF outperforms RLHF on all alignment problems put forward by the AdvBench and HarmBench project without sacrificing model performance as measured by the MT-Bench project.

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

↑