arXiv:2411.13757cs.CRcs.AI2024-11被引 17

仅3次位翻转就能让大模型性能崩溃,提出高效攻击新方法

GenBFA: An Evolutionary Optimization Approach to Bit-Flip Attacks on LLMs

  • 设计新型框架AttentionBreaker,快速定位大模型关键参数
  • 仅3个位翻转就使模型准确率从67.3%降至0%
  • 适合安全研究者和模型防护开发者参考

大型语言模型(LLMs)在自然语言处理中表现卓越,但其在关键应用中的普及引发了硬件威胁担忧,尤其是位翻转攻击(BFAs)。BFAs通过故障注入(如Rowhammer)攻击内存中的模型参数,破坏模型完整性和性能。现有研究认为变压器架构比传统神经网络更抗此类攻击,但我们首次证明:在拥有数十亿参数的模型中,仅需3次位翻转即可导致灾难性性能下降。当前方法难以在庞大参数空间中高效识别关键参数。为此,我们提出AttentionBreaker框架,实现对参数空间的高效遍历以发现关键参数;进一步引入GenBFA,一种进化优化策略,可精准定位最具破坏性的比特。实验证明,针对量化后的LLaMA3-8B-Instruct(W8)模型,仅3个位翻转(占总参数的4.129×10^-9%),即导致MMLU任务准确率从67.3%降至0%,Wikitext困惑度从12.6飙升至4.72×10^5,充分暴露大模型深层脆弱性。

原文摘要 · Abstract (English)

Large Language Models (LLMs) have revolutionized natural language processing (NLP), excelling in tasks like text generation and summarization. However, their increasing adoption in mission-critical applications raises concerns about hardware-based threats, particularly bit-flip attacks (BFAs). BFAs, enabled by fault injection methods such as Rowhammer, target model parameters in memory, compromising both integrity and performance. Identifying critical parameters for BFAs in the vast parameter space of LLMs poses significant challenges. While prior research suggests transformer-based architectures are inherently more robust to BFAs compared to traditional deep neural networks, we challenge this assumption. For the first time, we demonstrate that as few as three bit-flips can cause catastrophic performance degradation in an LLM with billions of parameters. Current BFA techniques are inadequate for exploiting this vulnerability due to the difficulty of efficiently identifying critical parameters within the immense parameter space. To address this, we propose AttentionBreaker, a novel framework tailored for LLMs that enables efficient traversal of the parameter space to identify critical parameters. Additionally, we introduce GenBFA, an evolutionary optimization strategy designed to refine the search further, isolating the most critical bits for an efficient and effective attack. Empirical results reveal the profound vulnerability of LLMs to AttentionBreaker. For example, merely three bit-flips (4.129 x 10^-9% of total parameters) in the LLaMA3-8B-Instruct 8-bit quantized (W8) model result in a complete performance collapse: accuracy on MMLU tasks drops from 67.3% to 0%, and Wikitext perplexity skyrockets from 12.6 to 4.72 x 10^5. These findings underscore the effectiveness of AttentionBreaker in uncovering and exploiting critical vulnerabilities within LLM architectures.

位翻转攻击大模型安全进化优化模型脆弱性

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