arXiv:2510.24034cs.CV2025-10ICCV被引 4

用大模型自动生成能绕过过滤器的恶意图像提示,提升文本生成模型安全测试效率。

AutoPrompt: Automated Red-Teaming of Text-to-Image Models via LLM-Driven Adversarial Prompts

  • 利用大模型生成可读性强的对抗性后缀,无需模型白盒权限。
  • 在多个平台验证成功绕过过滤机制,对未见过的提示具有强迁移能力。
  • 适合安全研究人员和模型开发者用于主动发现图像生成漏洞。

尽管文本到图像(T2I)模型发展迅速,其安全机制仍易受对抗性提示攻击,恶意提示可生成不安全图像。现有红队测试方法通常需白盒访问模型,依赖低效的逐提示优化,且常生成语义混乱的提示,易被过滤器拦截。本文提出APT(AutoPrompT),一种黑盒框架,利用大语言模型(LLM)自动为良性提示生成可读性强的对抗性后缀。我们设计了对抗后缀优化与LLM微调的交替流程,并在优化阶段引入双重逃逸策略:(1)通过辅助LLM的困惑度评分约束生成可读提示,避免传统词级无意义乱码;(2)引入禁用词惩罚项,抑制黑名单关键词的显式生成。大量实验表明,所生成的对抗性提示具备优秀红队表现,能有效绕过过滤机制,并展现出卓越零样本迁移能力,可立即应用于未见提示,甚至暴露商业API(如Leonardo.Ai.)中的关键漏洞。

原文摘要 · Abstract (English)

Despite rapid advancements in text-to-image (T2I) models, their safety mechanisms are vulnerable to adversarial prompts, which maliciously generate unsafe images. Current red-teaming methods for proactively assessing such vulnerabilities usually require white-box access to T2I models, and rely on inefficient per-prompt optimization, as well as inevitably generate semantically meaningless prompts easily blocked by filters. In this paper, we propose APT (AutoPrompT), a black-box framework that leverages large language models (LLMs) to automatically generate human-readable adversarial suffixes for benign prompts. We first introduce an alternating optimization-finetuning pipeline between adversarial suffix optimization and fine-tuning the LLM utilizing the optimized suffix. Furthermore, we integrates a dual-evasion strategy in optimization phase, enabling the bypass of both perplexity-based filter and blacklist word filter: (1) we constrain the LLM generating human-readable prompts through an auxiliary LLM perplexity scoring, which starkly contrasts with prior token-level gibberish, and (2) we also introduce banned-token penalties to suppress the explicit generation of banned-tokens in blacklist. Extensive experiments demonstrate the excellent red-teaming performance of our human-readable, filter-resistant adversarial prompts, as well as superior zero-shot transferability which enables instant adaptation to unseen prompts and exposes critical vulnerabilities even in commercial APIs (e.g., Leonardo.Ai.).

对抗样本图像生成安全评估

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