arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.14586cs.LGcs.AIcs.CL
收藏

回溯提升生成安全性

Backtracking Improves Generation Safety

Meta;Carnegie Mellon University(卡内基梅隆大学)

Yiming Zhang, Jianfeng Chi, Hailey Nguyen, Kartikeya Upasani, Daniel M. Bikel, Jason Weston, Eric Michael Smith

AI总结:

针对语言模型无法撤回已生成不安全token的问题,提出引入[RESET]token的回溯技术,结合SFT或DPO训练,使模型能撤销不安全生成,显著提升安全性且不损失有用性,并具备防御多种对抗攻击的能力。

摘要:

文本生成几乎在定义上就存在一个根本限制:已生成的token无法撤回,即使它们明显存在问题。在语言模型安全的语境下,当产生部分不安全的生成内容时,语言模型出于本性往往会继续生成类似不安全的额外文本。事实上,这正是前沿模型的安全性对齐在现实中被规避的方式,尽管人们在提升其安全性方面付出了巨大努力。我们偏离了将安全性对齐视为预防(降低有害响应概率)的范式,提出了回溯技术,该技术允许语言模型通过引入特殊的[RESET]token来“撤销”并从自身的不安全生成中恢复。我们的方法可以纳入SFT或DPO训练中,以优化有用性和无害性。我们表明,经过训练能够回溯的模型始终比基线模型更安全:在我们的评估中,回溯Llama-3-8B比基线模型安全四倍(6.1%降至1.5%),且有用性没有退化。此外,我们的方法还提供了针对四种对抗攻击(包括一种自适应攻击)的防护,尽管并未针对此进行训练。

英文摘要:

Text generation has a fundamental limitation almost by definition: there is no taking back tokens that have been generated, even when they are clearly problematic. In the context of language model safety, when a partial unsafe generation is produced, language models by their nature tend to happily keep on generating similarly unsafe additional text. This is in fact how safety alignment of frontier models gets circumvented in the wild, despite great efforts in improving their safety. Deviating from the paradigm of approaching safety alignment as prevention (decreasing the probability of harmful responses), we propose backtracking, a technique that allows language models to "undo" and recover from their own unsafe generation through the introduction of a special [RESET] token. Our method can be incorporated into either SFT or DPO training to optimize helpfulness and harmlessness. We show that models trained to backtrack are consistently safer than baseline models: backtracking Llama-3-8B is four times more safe than the baseline model (6.1\% $\to$ 1.5\%) in our evaluations without regression in helpfulness. Our method additionally provides protection against four adversarial attacks including an adaptive attack, despite not being trained to do so.

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

↑