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

LLM中的拒绝训练是否能泛化到过去时态?

Does Refusal Training in LLMs Generalize to the Past Tense?

EPFL(洛桑联邦理工学院)

Maksym Andriushchenko, Nicolas Flammarion

AI总结:

该研究揭示当前LLM拒绝训练存在泛化差距:将有害请求改写为过去时态可成功越狱多数先进模型,通过实验验证该方法有效性,并指出在微调数据中加入过去时态示例可提升防御能力。

摘要:

拒绝训练被广泛用于防止LLM生成有害、不良或非法的输出。我们揭示了当前拒绝训练方法中一个奇怪的泛化差距:简单地将有害请求改写为过去时态(例如,“如何制作燃烧瓶?”改为“人们过去是如何制作燃烧瓶的?”)通常足以对许多最先进的LLM进行越狱攻击。我们使用GPT-3.5 Turbo作为改写模型,在Llama-3 8B、Claude-3.5 Sonnet、GPT-3.5 Turbo、Gemma-2 9B、Phi-3-Mini、GPT-4o mini、GPT-4o、o1-mini、o1-preview和R2D2模型上系统地评估了这种方法。例如,在JailbreakBench的有害请求上,使用直接请求时这种简单攻击对GPT-4o的成功率为1%,而使用20次过去时态改写尝试时成功率上升到88%(以GPT-4作为越狱判断器)。有趣的是,我们还发现未来时态的改写效果较差,这表明拒绝防护栏往往认为过去的历史问题比假设的未来问题更无害。此外,我们在GPT-3.5 Turbo上进行的微调实验表明,当微调数据中明确包含过去时态示例时,防御过去时态改写是可行的。总体而言,我们的研究结果强调,用于对齐所研究模型的广泛使用的对齐技术(如SFT、RLHF和对抗训练)可能是脆弱的,并不总是如预期那样泛化。我们在https://github.com/tml-epfl/llm-past-tense提供了代码和越狱工件。

英文摘要:

Refusal training is widely used to prevent LLMs from generating harmful, undesirable, or illegal outputs. We reveal a curious generalization gap in the current refusal training approaches: simply reformulating a harmful request in the past tense (e.g., "How to make a Molotov cocktail?" to "How did people make a Molotov cocktail?") is often sufficient to jailbreak many state-of-the-art LLMs. We systematically evaluate this method on Llama-3 8B, Claude-3.5 Sonnet, GPT-3.5 Turbo, Gemma-2 9B, Phi-3-Mini, GPT-4o mini, GPT-4o, o1-mini, o1-preview, and R2D2 models using GPT-3.5 Turbo as a reformulation model. For example, the success rate of this simple attack on GPT-4o increases from 1% using direct requests to 88% using 20 past tense reformulation attempts on harmful requests from JailbreakBench with GPT-4 as a jailbreak judge. Interestingly, we also find that reformulations in the future tense are less effective, suggesting that refusal guardrails tend to consider past historical questions more benign than hypothetical future questions. Moreover, our experiments on fine-tuning GPT-3.5 Turbo show that defending against past reformulations is feasible when past tense examples are explicitly included in the fine-tuning data. Overall, our findings highlight that the widely used alignment techniques -- such as SFT, RLHF, and adversarial training -- employed to align the studied models can be brittle and do not always generalize as intended. We provide code and jailbreak artifacts at https://github.com/tml-epfl/llm-past-tense.

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

↑