arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2510.07985cs.LGcs.AIcs.CR
收藏

更少的权重,更多的问题:对LLM剪枝的一种实用攻击

Fewer Weights, More Problems: A Practical Attack on LLM Pruning

ETH Zurich(苏黎世联邦理工学院)

Kazuki Egashira, Robin Staab, Thibaud Gloaguen, Mark Vero, Martin Vechev

AI总结:

本文首次揭示了现代LLM剪枝方法可能被恶意利用的问题,通过构造看似无害的模型,在剪枝后表现出恶意行为,展示了剪枝过程中的安全风险。

摘要:

模型剪枝,即移除一部分模型权重,已成为减少大型语言模型(LLM)推理内存足迹的显著方法。值得注意的是,流行的推理引擎,如vLLM,使用户能够在部署前方便地对下载的模型进行剪枝。尽管剪枝方法的实用性和效率显著提高,但剪枝的安全影响仍被忽视。在本文中,我们首次展示了现代LLM剪枝方法可以被恶意利用。特别是,攻击者可以构造一个看似无害的模型,一旦进行剪枝,就会表现出恶意行为。我们的方法基于攻击者可以计算一个代理度量,以估计每个参数被剪枝的可能性。有了这一信息,攻击者可以首先将恶意行为注入到那些不太可能被剪枝的参数中。然后,他们可以使用可能被剪枝的参数来修复模型,从而在未剪枝的模型中有效地抵消注入的行为。我们通过在五个模型上进行广泛的评估来展示攻击的严重性;在应用vLLM中的任何剪枝(Magnitude、Wanda和SparseGPT)后,它在多样化的攻击场景中始终表现出强烈的恶意行为(解禁率高达95.7%、无害指令拒绝率为98.7%、目标内容注入率为99.5%)。我们的结果揭示了一个关键的部署时间安全缺口,并突显了在模型压缩中需要更强的安全意识的紧迫性。

英文摘要:

Model pruning, i.e., removing a subset of model weights, has become a prominent approach to reducing the memory footprint of large language models (LLMs) during inference. Notably, popular inference engines, such as vLLM, enable users to conveniently prune downloaded models before they are deployed. While the utility and efficiency of pruning methods have improved significantly, the security implications of pruning remain underexplored. In this work, for the first time, we show that modern LLM pruning methods can be maliciously exploited. In particular, an adversary can construct a model that appears benign yet, once pruned, exhibits malicious behaviors. Our method is based on the idea that the adversary can compute a proxy metric that estimates how likely each parameter is to be pruned. With this information, the adversary can first inject a malicious behavior into those parameters that are unlikely to be pruned. Then, they can repair the model by using parameters that are likely to be pruned, effectively canceling out the injected behavior in the unpruned model. We demonstrate the severity of our attack through extensive evaluation on five models; after any of the pruning in vLLM are applied (Magnitude, Wanda, and SparseGPT), it consistently exhibits strong malicious behaviors in a diverse set of attack scenarios (success rates of up to $95.7\%$ for jailbreak, $98.7\%$ for benign instruction refusal, and $99.5\%$ for targeted content injection). Our results reveal a critical deployment-time security gap and underscore the urgent need for stronger security awareness in model compression.

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

↑