arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.16670cs.CRcs.AI
收藏

BitHydra: 面向大语言模型的位翻转推理成本攻击

BitHydra: Towards Bit-flip Inference Cost Attack against Large Language Models

Nanyang Technological University(南洋理工大学);Tsinghua University(清华大学)

Xiaobei Yan, Yiming Li, Hao Wang, Han Qiu, Tianwei Zhang

AI总结:

BitHydra通过位翻转攻击针对大语言模型的推理成本进行攻击,利用ADMM方法高效实现无限生成。

摘要:

大型语言模型(LLMs)被广泛部署,但其巨大的计算需求使其容易受到旨在故意最大化输出长度的推理成本攻击的威胁。在本工作中,我们研究了一个不同的攻击面:通过篡改模型参数而不是输入来最大化推理成本。这种方法利用了位翻转攻击(BFAs)已建立的能力,通过微小的权重扰动持续改变模型行为,从而将攻击与特定输入查询解耦。为此,我们提出了BitHydra框架,该框架解决了识别确切权重位以最大化生成成本的独特优化挑战。我们将攻击表述为一个受约束的二进制整数规划(BIP)问题,旨在系统地抑制序列结束概率(即<eos>)。为了克服离散搜索空间的不可行性,我们将问题放松为连续优化任务,并通过交替方向乘子法(ADMM)解决。我们评估了BitHydra在10个LLM(1.5B-16B)上的性能。我们的结果表明,所提出的优化方法在所有测试模型上仅需1-4次位翻转即可实现无限生成,验证了基于ADMM的表述对标准模型和潜在防御的有效性。

英文摘要:

Large language models (LLMs) are widely deployed, but their substantial compute demands make them vulnerable to inference cost attacks that aim to deliberately maximize the output length. In this work, we investigate a distinct attack surface: maximizing inference cost by tampering with the model parameters instead of inputs. This approach leverages the established capability of Bit-Flip Attacks (BFAs) to persistently alter model behavior via minute weight perturbations, effectively decoupling the attack from specific input queries. To realize this, we propose BitHydra, a framework that addresses the unique optimization challenge of identifying the exact weight bits that maximize generation cost. We formulate the attack as a constrained Binary Integer Programming (BIP) problem designed to systematically suppress the end-of-sequence (i.e., <eos>) probability. To overcome the intractability of the discrete search space, we relax the problem into a continuous optimization task and solve it via the Alternating Direction Method of Multipliers (ADMM). We evaluate BitHydra across 10 LLMs (1.5B-16B). Our results demonstrate that the proposed optimization method efficiently achieves endless generation with as few as 1-4 bit flips on all testing models, verifying the effectiveness of the ADMM-based formulation against both standard models and potential defenses.

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

↑