arXiv:2608.03284cs.CVcs.AI2026-08

通过生成过程中的干净图像估计,实现文本生成图像的安全实时防护。

Test-Time Scaling for Safe Text-Guided Image Generation via Intermediate Clean Estimates

论文配图:Test-Time Scaling for Safe Text-Guided Image Generation via Intermediate Clean Estimates
图 1 · 摘自论文原文
  • 利用生成过程中的中间干净图像进行违规内容检测
  • 检测到违规时通过截断反向传播优化文本条件空间的低秩残差
  • 支持测试时扩展,兼顾安全性和生成质量,适合部署场景

确保文生图扩散模型的安全与合规性仍是关键挑战,良性或对抗性提示常引发禁止内容(如裸露、受保护知识产权)。训练阶段的遗忘方法虽有效但计算成本高且易损害通用能力。现有测试时防御多依赖修改文本描述,忽视视觉信号。本文提出利用生成过程中估算的中间干净图像,采用稀疏边界目标检测违规概念。一旦发现违规,立即通过截断反向传播在文本条件空间中优化结构化低秩残差以干预。该设计实现权重保持的检测,非违规推理延迟几乎不变,且可通过测试时扩展灵活调节安全性。在Stable Diffusion v1.4和v3.5上对裸露内容移除、知识产权保护和风格擦除的实验表明,相比先前权重保持基线,在抑制效果、保真度与保留性能上均更优,提供可扩展、灵活的安全生成部署方案。

原文摘要 · Abstract (English)

Ensuring safety and policy compliance in text-to-image diffusion models remains a critical challenge, as benign or adversarial prompts can often elicit prohibited content, e.g. nudity and protected intellectual property. While training-based unlearning methods are effective, they are computationally expensive and prone to catastrophic interference with general capabilities. Conversely, existing test-time defenses are primarily prompt-centric, relying on modifying textual descriptions only, and overlook the visual signals for detection. In this paper, we propose to leverage the intermediate clean image estimated during the generation process and employ a sparse margin objective to detect prohibited concepts. When a violation is detected, we immediately intervene by optimizing a structured low-rank residual in the text-conditioning space via truncated backpropagation. This design allows weight-preserving detection, keeps non-violating inference latency nearly unchanged as the maximum budget increases, and offers flexibility in safety performance via test-time scaling. Extensive experiments on Stable Diffusion v1.4 and v3.5 across nudity removal, IP protection, and style erasure demonstrate superior performance across suppression, fidelity and preservation compared to prior weight-preserving baselines, providing a scalable and flexible solution for safe generative deployment.

安全生成扩散模型测试时防御文本生成

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