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

LLMs 可通过仅 1000 个无害样本实现拒绝反学习

LLMs Can Unlearn Refusal with Only 1,000 Benign Samples

School of Computing, National University of Singapore(新加坡国立大学计算机学院);School of Artificial Intelligence, Beihang University(北京航空航天大学人工智能学院)

Yangyang Guo, Ziwei Xu, Si Liu, Zhiming Zheng, Mohan Kankanhalli

AI总结:

通过仅 1000 个无害样本,研究发现 LLMs 可通过反学习技术降低拒绝响应,揭示安全性对齐可能依赖 token 序列记忆而非推理。

摘要:

本研究揭示了大型语言模型(LLMs)安全性对齐中一个此前未被探索的漏洞。现有对齐的 LLMs 大多在面对不安全查询时会通过固定前缀(I'm sorry)进行拒绝回应。我们证明这种僵化的拒绝模式是一种漏洞,并引入了一种新的拒绝反学习技术来利用它。具体来说,我们仅使用 1000 个无害样本对 LLMs 进行微调,每个响应都前置一个拒绝前缀。其核心直觉是破坏拒绝完成路径,从而促使模型忘记如何拒绝,同时遵循有害指令。这一直觉进一步通过理论证明得到支持。我们对该方法应用于总共 16 个 LLMs,包括来自 Llama、Qwen 和 Gemma 家族的各种开源模型,以及 Gemini 和 GPT 等闭源模型。实验结果表明,先前对齐的 LLMs 的安全性评分在一致且显著下降。重要的是,我们验证了观察到的收益不能归因于单纯的微调或随机前缀效应。我们的发现表明,当前的安全对齐可能严重依赖于 token 序列记忆而非推理,这促使未来工作超越简单的拒绝机制。代码已发布:https://github.com/guoyang9/refusal-unlearning。

英文摘要:

This study reveals a previously unexplored vulnerability in the safety alignment of Large Language Models (LLMs). Existing aligned LLMs predominantly respond to unsafe queries with refusals, which often begin with a fixed set of prefixes (I'm sorry). We demonstrate that this rigid refusal pattern is a vulnerability and introduce a novel \textbf{refusal unlearning} technique that exploits it. Specifically, we fine-tune LLMs using merely 1,000 benign samples, where each response is prepended with a refusal prefix. The underlying intuition is to disrupt the refusal completion pathway, thereby driving the model to forget how to refuse while following harmful instructions. This intuition is further supported by theoretical proofs. We apply this approach to a total of 16 LLMs, including various open-source models from Llama, Qwen, and Gemma families, as well as closed-source models such as Gemini and GPT. Experimental results show that the safety scores of previously aligned LLMs degrade both consistently and substantially. Importantly, we verify that the observed gain cannot be attributed to plain fine-tuning or random prefix effects. Our findings suggest that current safety alignment may rely heavily on token sequence memorization rather than reasoning, motivating future work beyond simple refusal mechanisms. Code has been released: https://github.com/guoyang9/refusal-unlearning.

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

↑