用分布建模方法高效发现能触发图文生成系统危险输出的多样化提示。
DREAM: Scalable Red Teaming for Text-to-Image Generative Systems via Distribution Modeling
- 建模危险提示的概率分布,实现效果与多样性的联合优化。
- 在多个模型和安全过滤器上达到最高成功率与提示多样性。
- 适合安全评估、模型审计及对抗训练场景的从业者使用。
尽管已集成安全对齐和外部过滤机制,文本到图像(T2I)生成系统仍可能产生色情或暴力内容,引发不当暴露与滥用风险。红队测试通过主动发现可诱发不安全输出的多样化提示,成为评估和提升系统安全性的重要手段。然而,现有自动化红队方法多将提示发现视为独立的提示级优化任务,限制了其可扩展性、多样性与整体效果。为此,本文提出DREAM框架,通过直接建模目标系统中危险提示的概率分布,实现对有效性和多样性的显式优化,并支持训练后高效大规模采样。为在无代表性训练样本的情况下实现该目标,我们借鉴能量模型思想,将优化目标重构为简洁可处理的形式。同时引入GC-SPSA优化算法,通过长且可能不可导的T2I流程提供稳定梯度估计。推理阶段还设计了多样性感知采样策略以增强提示多样性。大量实验验证了DREAM在多种T2I模型与安全过滤器上的先进性能,显著提升了提示成功率达85%以上,且多样性指标超越现有方法。
原文摘要 · Abstract (English)
Despite the integration of safety alignment and external filters, text-to-image (T2I) generative systems are still susceptible to producing harmful content, such as sexual or violent imagery. This raises serious concerns about unintended exposure and potential misuse. Red teaming, which aims to proactively identify diverse prompts that can elicit unsafe outputs from the T2I system, is increasingly recognized as an essential method for assessing and improving safety before real-world deployment. However, existing automated red teaming approaches often treat prompt discovery as an isolated, prompt-level optimization task, which limits their scalability, diversity, and overall effectiveness. To bridge this gap, in this paper, we propose DREAM, a scalable red teaming framework to automatically uncover diverse problematic prompts from a given T2I system. Unlike prior work that optimizes prompts individually, DREAM directly models the probabilistic distribution of the target system's problematic prompts, which enables explicit optimization over both effectiveness and diversity, and allows efficient large-scale sampling after training. To achieve this without direct access to representative training samples, we draw inspiration from energy-based models and reformulate the objective into a simple and tractable form. We further introduce GC-SPSA, an efficient optimization algorithm that provides stable gradient estimates through the long and potentially non-differentiable T2I pipeline. During inference, we also propose a diversity-aware sampling strategy to enhance prompt variety. The effectiveness of DREAM is validated through extensive experiments, demonstrating state-of-the-art performance across a wide range of T2I models and safety filters in terms of both prompt success rate and diversity. Our code is available at https://github.com/AntigoneRandy/DREAM
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。