GCG攻击在大模型中效果下降,推理任务更易被攻破
The Resurgence of GCG Adversarial Attacks on Large Language Models
- 用梯度法生成对抗性提示,探测大模型漏洞
- 模型越大攻击成功率越低,代码类提示更易突破安全限制
- 发现推理能力本身可能成为攻击突破口,适合安全研究者关注
基于梯度的对抗性提示(如贪婪坐标梯度,GCG)已成为突破大型语言模型(LLMs)安全限制的强大手段。本文系统评估了GCG及其退火增强版本T-GCG在不同规模开源模型(Qwen2.5-0.5B、LLaMA-3.2-1B、GPT-OSS-20B)上的表现。实验涵盖安全导向提示(AdvBench)和推理密集型编码提示。结果表明:(1)攻击成功率(ASR)随模型规模增加而下降,反映大模型损失曲面复杂度与非凸性上升;(2)基于前缀的启发式方法显著高估攻击效果,而GPT-4o语义判断提供更严格真实评估;(3)编码类提示比对抗性安全提示更易被攻破,表明推理过程本身可被利用为攻击向量。初步结果显示,模拟退火能提升T-GCG搜索多样性,在前缀评估下实现有竞争力的ASR,但在语义判断下增益有限。这些发现揭示了GCG的可扩展性局限,暴露推理任务中的隐藏漏洞,并推动基于退火策略的更鲁棒对抗评估发展。
原文摘要 · Abstract (English)
Gradient-based adversarial prompting, such as the Greedy Coordinate Gradient (GCG) algorithm, has emerged as a powerful method for jailbreaking large language models (LLMs). In this paper, we present a systematic appraisal of GCG and its annealing-augmented variant, T-GCG, across open-source LLMs of varying scales. Using Qwen2.5-0.5B, LLaMA-3.2-1B, and GPT-OSS-20B, we evaluate attack effectiveness on both safety-oriented prompts (AdvBench) and reasoning-intensive coding prompts. Our study reveals three key findings: (1) attack success rates (ASR) decrease with model size, reflecting the increasing complexity and non-convexity of larger models' loss landscapes; (2) prefix-based heuristics substantially overestimate attack effectiveness compared to GPT-4o semantic judgments, which provide a stricter and more realistic evaluation; and (3) coding-related prompts are significantly more vulnerable than adversarial safety prompts, suggesting that reasoning itself can be exploited as an attack vector. In addition, preliminary results with T-GCG show that simulated annealing can diversify adversarial search and achieve competitive ASR under prefix evaluation, though its benefits under semantic judgment remain limited. Together, these findings highlight the scalability limits of GCG, expose overlooked vulnerabilities in reasoning tasks, and motivate further development of annealing-inspired strategies for more robust adversarial evaluation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。