arXiv:2503.17987cs.CRcs.AI2025-03AAAI被引 14

用大模型推理增强攻击,少用查询就能突破图像生成安全防护。

Reason2Attack: Jailbreaking Text-to-Image Models via LLM Reasoning

  • 将越狱攻击融入大模型后训练,提升其生成对抗提示的推理能力。
  • 在多个T2I模型上以更少查询实现更高成功率,且攻击可跨模型迁移。
  • 适合研究模型安全、对抗攻击或大模型可控性的研究人员参考。

文本到图像(T2I)模型通常部署安全过滤器以防止生成敏感内容。然而,现有越狱攻击方法需人工设计指令,依赖大模型生成对抗性提示,虽能绕过安全机制并生成敏感图像,但因大模型对T2I模型及安全过滤器理解有限,需大量查询才能成功,实用性受限。为此,我们提出Reason2Attack(R2A),通过将越狱攻击纳入大模型的后训练过程,增强其生成对抗提示的推理能力。首先,基于框架语义设计思维链(CoT)示例合成流程,识别相关术语与上下文图示,生成对抗性提示。利用该流程生成的CoT示例,微调大模型以理解推理路径和输出结构。随后,将越狱攻击任务引入大模型的强化学习过程,设计兼顾提示长度、隐蔽性和有效性的奖励函数,进一步提升推理准确性。大量实验表明,R2A在多个T2I模型上以更少查询达到更高攻击成功率,且生成的对抗提示在开源与商用T2I模型间具备强迁移性。

原文摘要 · Abstract (English)

Text-to-Image(T2I) models typically deploy safety filters to prevent the generation of sensitive images. Unfortunately, recent jailbreaking attack methods manually design instructions for the LLM to generate adversarial prompts, which effectively bypass safety filters while producing sensitive images, exposing safety vulnerabilities of T2I models. However, due to the LLM's limited understanding of the T2I model and its safety filters, existing methods require numerous queries to achieve a successful attack, limiting their practical applicability. To address this issue, we propose Reason2Attack(R2A), which aims to enhance the LLM's reasoning capabilities in generating adversarial prompts by incorporating the jailbreaking attack into the post-training process of the LLM. Specifically, we first propose a CoT example synthesis pipeline based on Frame Semantics, which generates adversarial prompts by identifying related terms and corresponding context illustrations. Using CoT examples generated by the pipeline, we fine-tune the LLM to understand the reasoning path and format the output structure. Subsequently, we incorporate the jailbreaking attack task into the reinforcement learning process of the LLM and design an attack process reward that considers prompt length, prompt stealthiness, and prompt effectiveness, aiming to further enhance reasoning accuracy. Extensive experiments on various T2I models show that R2A achieves a better attack success ratio while requiring fewer queries than baselines. Moreover, our adversarial prompts demonstrate strong attack transferability across both open-source and commercial T2I models.

模型安全越狱攻击大模型推理

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