不依赖固定回复,用非文本目标高效攻击大模型安全机制
NonTextual Target Attack
- 用非文本目标替代固定回复,扩大攻击搜索空间
- 100次迭代下在AdvBench上平均攻击成功率96.8%,超现有方法40%以上
- 适合研究模型安全漏洞或对抗攻击的学者快速验证
现有基于梯度的越狱攻击通常通过优化对抗后缀使大语言模型输出与预设目标响应对齐,但受限于固定目标,攻击空间受限且效率低下。为此,我们提出非文本目标攻击(NTA),首个基于梯度、以非文本约束目标最大化模型输出不安全概率的攻击方法,无需强制特定响应模式。为实现可优化性,我们将该目标分解为两个可微无约束损失,分别近似响应与对抗提示的优化,理论分析支持该分解有效性。相比现有方法,NTA首次实现基于非文本目标的梯度提示优化,显著拓展攻击空间,提升探索灵活性与效率。大量实验表明,NTA在AdvBench上仅用100次优化迭代,即达到96.8%平均攻击成功率,优于当前最优梯度攻击超过40%。
原文摘要 · Abstract (English)
Existing gradient-based jailbreak attacks on Large Language Models (LLMs) typically optimize adversarial suffixes to align the LLM output with predefined target responses. However, restricting the objective as inducing fixed targets inherently constrains the adversarial search space, limiting the overall attack efficacy. Furthermore, existing methods typically require numerous optimization iterations to fulfill the large gap between the fixed target and the original LLM output, resulting in low attack efficiency. To overcome these limitations, we propose NonTextual Target Attack (NTA), the first gradient-based attack that relies on a non-textual constrained objective to maximize the unsafety probability of the LLM output, without enforcing any response patterns. For tractable optimization, we further decompose this objective into two constrained sub-objectives, which can be approximated by two differentiable unconstrained losses, to iteratively optimize the response and the adversarial prompt in the neighborhood of the original prompt, with a theoretical analysis to validate the decomposition. In contrast to existing attacks, NTA first realizes gradient-based prompt optimization on a non-textual target and significantly expands the attack space, enabling more flexible and efficient exploration of LLM vulnerabilities. Extensive evaluations show that \textsc{NTA} achieves an average attack success rate of 96.8\% against recent safety-aligned LLMs with only 100 optimization iterations on AdvBench, outperforming state-of-the-art gradient-based attacks by over 40\%.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。