干草堆中的越狱攻击
Jailbreaking in the Haystack
AI总结:
该研究针对长上下文语言模型,提出 NINJA 越狱攻击方法,利用有害目标位置的关键作用,在 HarmBench 基准上提升了多款先进模型的攻击成功率,且该方法低资源、可迁移、难检测、计算最优,揭示了长上下文可引入模型安全漏洞。
摘要:
近期长上下文语言模型(LMs)的进展已支持百万级 token 的输入,扩展了其在计算机使用智能体等复杂任务中的能力,但这些扩展上下文的安全影响仍不明确。为填补这一空白,我们提出 NINJA(Needle-in-haystack jailbreak attack,即“干草堆中的越狱攻击”),一种通过向有害用户目标附加模型生成的良性内容来越狱对齐 LMs 的方法。我们方法的关键观察是,有害目标的位置对安全性有重要影响。在标准安全基准 HarmBench 上的实验表明,NINJA 显著提高了包括 LLaMA、Qwen、Mistral 和 Gemini 在内的最先进开源和专有模型的攻击成功率。与先前的越狱方法不同,我们的方法低资源、可迁移且更难检测。此外,我们证明 NINJA 是计算最优的——在固定计算预算下,增加上下文长度在最佳 N 越狱中比增加试验次数更有效。这些发现表明,即使是良性的长上下文,若经过精心的目标定位设计,也会在现代 LMs 中引入根本性漏洞。
英文摘要:
Recent advances in long-context language models (LMs) have enabled million-token inputs, expanding their capabilities across complex tasks like computer-use agents. Yet, the safety implications of these extended contexts remain unclear. To bridge this gap, we introduce NINJA (short for Needle-in-haystack jailbreak attack), a method that jailbreaks aligned LMs by appending benign, model-generated content to harmful user goals. Critical to our method is the observation that the position of harmful goals play an important role in safety. Experiments on standard safety benchmark, HarmBench, show that NINJA significantly increases attack success rates across state-of-the-art open and proprietary models, including LLaMA, Qwen, Mistral, and Gemini. Unlike prior jailbreaking methods, our approach is low-resource, transferable, and less detectable. Moreover, we show that NINJA is compute-optimal -- under a fixed compute budget, increasing context length can outperform increasing the number of trials in best-of-N jailbreak. These findings reveal that even benign long contexts -- when crafted with careful goal positioning -- introduce fundamental vulnerabilities in modern LMs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。