动态调整攻击策略,让大模型更易被诱导生成有害内容
Dynamic Jailbreaking Attack
- 根据模型实时输出动态选取攻击目标,避免死磕固定答案
- 在40个安全对齐模型上实现100%攻击成功率,平均仅需13.68轮优化
- 无需调参,自动适应不同难度提示,适合研究模型安全漏洞者
现有基于梯度的越狱攻击通常采用固定长度的对抗后缀和静态优化策略,针对预设目标生成响应。但这种静态方法削弱了攻击的有效性、效率与灵活性:(i)预设目标常位于安全对齐大模型输出分布的低概率区域,导致优化困难;(ii)简单肯定类目标可能误导模型生成无关的肯定回答;(iii)固定的优化策略与后缀长度对所有提示一视同仁,导致对难题能力不足,对易题资源浪费。为此,我们提出动态越狱攻击(DJA),一种无参数的基于梯度的越狱框架,通过动态候选探索、动态相关目标选择和动态优化策略构造对抗提示。每轮优化中,DJA直接从当前对抗提示条件下的模型输出分布中采样多个候选目标,并利用多目标评分器筛选满足危害性、相关性与有用性等多维度标准的最优目标。此外,DJA引入无参数的动态优化策略,根据实时反馈动态分配对抗资源,自适应调整后缀长度、候选采样数量与优化迭代次数。在40个安全对齐大模型(12个模型族,规模从0.5B到32B)上的全面评估表明,DJA在所有模型上均达到100%攻击成功率,平均仅需13.68轮优化(每轮10次迭代)。
原文摘要 · Abstract (English)
Existing gradient-based jailbreak attacks typically optimize a fixed-length adversarial suffix toward a predefined target response with a static optimization strategy. However, this fully static formulation undermines the effectiveness, efficiency and flexibility of gradient-based jailbreaking because (i) A predefined target usually lies in the low-probability region of a safety-aligned LLM's conditional output distribution, forcing the optimization to pursue an unlikely response pattern; (ii) Simple affirmative targets may even mislead LLMs to generate affirmative responses that are not highly relevant to the prompts; (iii) Fixed optimization strategy and suffix length treat all prompts equally, leading to limited attack capability for hard prompts and redundant capacity for easy ones. To address these limitations, we propose Dynamic Jailbreaking Attack (DJA), a parameter-free gradient-based jailbreak framework using dynamic candidate exploration, dynamic relevant targets and dynamic optimization strategy to craft adversarial prompts. In each optimization round, DJA samples multiple candidate target responses directly from the LLM's distribution conditioned on the current adversarial prompt. Among these candidates, DJA employs a multi-objective scorer to select an optimal target that satisfies multi-dimensional criteria such as harmfulness, relevance, and usefulness. Moreover, DJA introduces a parameter-free dynamic optimization strategy that allocates adversarial effort based on real-time feedback, adapting suffix length, candidate sampling capacity, and optimization iterations according to the difficulty of each harmful prompt. In an extensive evaluation of 40 safety-aligned LLMs (12 model families, scaling from 0.5B to 32B), DJA achieves a 100% ASR across all LLMs, requiring only 13.68 optimization rounds on average (10 iterations per round).
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。