arXiv:2412.07192cs.CRcs.CL2024-12被引 5

仅用25次比特翻转即可突破大模型安全限制,直接改写内存中的模型参数。

PrisonBreak: Jailbreaking Large Language Models with at Most Twenty-Five Targeted Bit-flips

  • 通过高效算法定位关键比特,仅需5-25次翻转即可越狱。
  • 在10个开源模型上实现80%-98%越狱成功率,且对模型正常功能影响极小。
  • 适用于研究模型安全漏洞或对抗攻击的开发者,尤其关注硬件级攻击者。

我们研究了商用级安全对齐大语言模型(LLM)中的一种新漏洞:仅需翻转少量模型参数比特,即可突破其拒绝生成有害内容的机制。该攻击仅需5至25次比特翻转即可越狱数十亿参数的语言模型,所需比特数比先前针对更小计算机视觉模型的攻击减少最多40倍。与基于提示的越狱不同,本方法直接在运行时修改内存中的模型,无需输入层改动。核心创新在于一种高效的比特选择算法,使关键比特识别速度比之前方法快达20倍。我们在10个开源LLM上评估,实现80%-98%的攻击成功率(ASR),且对模型效用影响微乎其微。进一步通过Rowhammer故障注入实现端到端攻击,在GDDR6 GPU上成功越狱5个模型(ASR 69%-91%)。分析显示:(1)后训练对齐较弱的模型更易被攻破;(2)如值投影层等特定组件显著更脆弱;(3)攻击机制与现有方法有本质区别。我们评估了多种防御措施,发现本攻击在多个阶段仍有效。

原文摘要 · Abstract (English)

We study a new vulnerability in commercial-scale safety-aligned large language models (LLMs): their refusal to generate harmful responses can be broken by flipping only a few bits in model parameters. Our attack jailbreaks billion-parameter language models with just 5 to 25 bit-flips, requiring up to 40$\times$ fewer bit flips than prior attacks on much smaller computer vision models. Unlike prompt-based jailbreaks, our method directly uncensors models in memory at runtime, enabling harmful outputs without requiring input-level modifications. Our key innovation is an efficient bit-selection algorithm that identifies critical bits for language model jailbreaks up to 20$\times$ faster than prior methods. We evaluate our attack on 10 open-source LLMs, achieving high attack success rates (ASRs) of 80-98% with minimal impact on model utility. We further demonstrate an end-to-end exploit via Rowhammer-based fault injection, reliably jailbreaking 5 models (69-91% ASR) on a GDDR6 GPU. Our analyses reveal that: (1) models with weaker post-training alignment require fewer bit-flips to jailbreak; (2) certain model components, e.g., value projection layers, are substantially more vulnerable; and (3) the attack is mechanistically different from existing jailbreak methods. We evaluate potential countermeasures and find that our attack remains effective against defenses at various stages of the LLM pipeline.

模型安全比特攻击越狱硬件攻击

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。