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


翻译:尽管集成了安全对齐机制和外部过滤器,文本到图像(T2I)生成系统仍可能产生有害内容,例如色情或暴力图像。这引发了关于意外暴露和潜在滥用的严重担忧。红队测试旨在主动识别能够从T2I系统中引发不安全输出的多样化提示,正日益被视为在实际部署前评估和提升安全性的关键方法。然而,现有的自动化红队测试方法通常将提示发现视为孤立的提示级优化任务,这限制了其可扩展性、多样性和整体效能。为弥补这一不足,本文提出DREAM——一种可扩展的红队测试框架,能够自动从给定T2I系统中发现多样化的问题提示。与先前单独优化每个提示的研究不同,DREAM直接对目标系统问题提示的概率分布进行建模,从而实现对有效性和多样性的显式优化,并允许在训练后进行高效的大规模采样。在无法直接获取代表性训练样本的情况下,我们借鉴基于能量的模型思想,将目标函数重构为简洁易处理的形式。进一步提出GC-SPSA算法,这是一种通过长流程且可能不可微的T2I管道提供稳定梯度估计的高效优化算法。在推理阶段,我们还提出一种多样性感知采样策略以增强提示的多样性。通过大量实验验证了DREAM的有效性,其在多种T2I模型和安全过滤器上均实现了最优的提示成功率和多样性表现。代码已开源:https://github.com/AntigoneRandy/DREAM

0
下载
关闭预览

相关内容

国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
VIP会员
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员