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

Rewrite to Jailbreak:发现可学习且可迁移的隐式有害性指令

Rewrite to Jailbreak: Discover Learnable and Transferable Implicit Harmfulness Instruction

Zhejiang University(浙江大学)

Yuting Huang, Chengyuan Liu, Yifeng Feng, Yiquan Wu, Chao Wu, Fei Wu, Kun Kuang

AI总结:

本文提出R2J方法,通过迭代探索LLMs弱点并自动改进策略来重写指令实现可迁移的黑盒越狱攻击,该方法高效、难以识别,且仅需少量查询即可迁移至多数据集和模型。

摘要:

随着大型语言模型(LLMs)在各个领域被广泛应用,LLMs的安全性正日益受到关注,以避免其强大能力被滥用。现有的越狱方法要么创建强制指令跟随场景,要么手动或自动搜索带有前缀或后缀token的对抗性提示,以实现特定的表示。然而,这些方法效率低下且越狱模式明显,远未达到对LLMs进行大规模攻击的实际部署水平。在本文中,我们指出简单地重写原始指令即可实现越狱,并发现这种重写方法是可学习且可迁移的。我们提出了Rewrite to Jailbreak(R2J)方法,这是一种可迁移的黑盒越狱方法,通过迭代探索LLMs的弱点并自动改进攻击策略来攻击LLMs。由于未引入额外特征,该越狱方法更高效且难以被识别。大量实验和分析证明了R2J的有效性,我们发现该越狱方法仅需少量查询即可迁移至多个数据集和各种类型的模型。我们希望本研究能推动对LLM安全性的进一步探讨。代码可在https://github.com/ythuang02/R2J/ 获取。

英文摘要:

As Large Language Models (LLMs) are widely applied in various domains, the safety of LLMs is increasingly attracting attention to avoid their powerful capabilities being misused. Existing jailbreak methods create a forced instruction-following scenario, or search adversarial prompts with prefix or suffix tokens to achieve a specific representation manually or automatically. However, they suffer from low efficiency and explicit jailbreak patterns, far from the real deployment of mass attacks to LLMs. In this paper, we point out that simply rewriting the original instruction can achieve a jailbreak, and we find that this rewriting approach is learnable and transferable. We propose the Rewrite to Jailbreak (R2J) approach, a transferable black-box jailbreak method to attack LLMs by iteratively exploring the weakness of the LLMs and automatically improving the attacking strategy. The jailbreak is more efficient and hard to identify since no additional features are introduced. Extensive experiments and analysis demonstrate the effectiveness of R2J, and we find that the jailbreak is also transferable to multiple datasets and various types of models with only a few queries. We hope our work motivates further investigation of LLM safety. The code can be found at https://github.com/ythuang02/R2J/.

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

↑