arXiv:2509.06350cs.CLcs.AI2025-09中稿 · ICASSP 2026被引 7

发现对抗后缀中多数词元可删,提升攻击效率

Mask-GCG: Are All Tokens in Adversarial Suffixes Necessary for Jailbreak Attacks?

  • 用可学习掩码识别后缀中关键词元,动态调整更新概率
  • 删掉少数低影响词元后攻击成功率不变,计算量下降
  • 适合研究模型安全、高效攻击的开发者参考

大型语言模型(LLM)的越狱攻击已展现出多种成功方法,其中贪婪坐标梯度(GCG)通过优化后缀词元生成越狱提示。尽管已有多种改进变体,但均依赖固定长度后缀,其内部冗余尚未被探索。本文提出Mask-GCG,一种即插即用方法,利用可学习词元掩码识别后缀中的关键词元,提高高影响力位置词元的更新概率,同时剔除低影响力词元。该策略不仅减少冗余,还缩小梯度空间,降低计算开销并缩短攻击时间。在原始GCG及多个改进变体上测试表明:后缀中多数词元对攻击成功有显著贡献,仅剔除少量低影响词元不会改变损失值或攻击成功率(ASR),揭示了提示词中的词元冗余性。研究为从越狱攻击视角构建更高效、可解释的LLM提供了新见解。

原文摘要 · Abstract (English)

Jailbreak attacks on Large Language Models (LLMs) have demonstrated various successful methods whereby attackers manipulate models into generating harmful responses that they are designed to avoid. Among these, Greedy Coordinate Gradient (GCG) has emerged as a general and effective approach that optimizes the tokens in a suffix to generate jailbreakable prompts. While several improved variants of GCG have been proposed, they all rely on fixed-length suffixes. However, the potential redundancy within these suffixes remains unexplored. In this work, we propose Mask-GCG, a plug-and-play method that employs learnable token masking to identify impactful tokens within the suffix. Our approach increases the update probability for tokens at high-impact positions while pruning those at low-impact positions. This pruning not only reduces redundancy but also decreases the size of the gradient space, thereby lowering computational overhead and shortening the time required to achieve successful attacks compared to GCG. We evaluate Mask-GCG by applying it to the original GCG and several improved variants. Experimental results show that most tokens in the suffix contribute significantly to attack success, and pruning a minority of low-impact tokens does not affect the loss values or compromise the attack success rate (ASR), thereby revealing token redundancy in LLM prompts. Our findings provide insights for developing efficient and interpretable LLMs from the perspective of jailbreak attacks.

模型安全越狱攻击词元剪枝效率优化

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