Reproduce “DTVI: Dual-Stage Textual and Visual Intervention for Safe Text-to-Image Generation” on OpenResearch
Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Binhong Tan, Zhaoxin Wang, Handing Wang
DTVI introduces a dual-stage, inference-time framework that intervenes in both text conditioning and visual denoising to suppress unsafe content generation in text-to-image models. This approach achieved an average defense success rate of 94.43% across sexual content benchmarks and 88.56% across seven unsafe categories, while preserving reasonable benign image quality.
Key insights
- Malicious intent is often distributed across the entire prompt sequence, necessitating sequence-level intervention rather than localized token-level modifications.
- Unsafe and benign semantics exhibit linear separability in the CLIP embedding space, enabling targeted modification of text embeddings to suppress harmful concepts.
- Even with textual intervention, residual unsafe semantics can propagate through cross-attention mechanisms into the visual generation, requiring a complementary visual-side suppression module.
- Parameter-modification defense methods can inadvertently generate more explicit unsafe content by altering the global concept space, highlighting an advantage of inference-time approaches that preserve model weights.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.