Mitigating Sexual Content Generation via Embedding Distortion in Text-conditioned Diffusion Models
On the map: Diffusion models → Robustness, privacy and adversarial aspects
Abstract (arXiv)
Diffusion models show remarkable image generation performance following text prompts, but risk generating sexual contents. Existing approaches, such as prompt filtering, concept removal, and even sexual contents mitigation methods, struggle to defend against adversarial attacks while maintaining benign image quality. In this paper, we propose a novel approach called Distorting Embedding Space (DES), a text encoder-based defense mechanism that effectively tackles these issues through innovative embedding space control. DES transforms unsafe embeddings, extracted from a text encoder using unsafe prompts, toward carefully calculated safe embedding regions to prevent unsafe contents generation, while reproducing the original safe embeddings. DES also neutralizes the ``nudity'' embedding, by aligning it with neutral embedding to enhance robustness against adversarial attacks. As a result, extensive experiments on explicit content mitigation and adaptive attack defense show that DES achieves state-of-the-art (SOTA) defense, with attack success rate (ASR) of 9.47% on FLUX.1, a recent popular model, and 0.52% on the widely adopted Stable Diffusion v1.5. These correspond to ASR reductions of 76.5% and 63.9% compared to previous SOTA methods, EraseAnything and AdvUnlearn, respectively. Furthermore, DES maintains benign image quality, achieving Frechet Inception Distance and CLIP score comparable to those of the original FLUX.1 and Stable Diffusion v1.5.
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Placed in Robustness, privacy and adversarial aspects, one of 14 directions in Diffusion models. Builds on 38 of its 51 references that are in the map. First posted on arXiv 31 Jan 2025.
Builds on
38 of 51 references.
Closest ancestors · 18
Same direction, newest first
- 2024EraseAnything: Enabling Concept Erasure in Rectified Flow Transformers29 Dec
- 2024SAFREE: Training-Free and Adaptive Guard for Safe Text-to-Image And Video Generation16 Oct
- 2024ShieldDiff: Suppressing Sexual Content Generation from Diffusion Models through Reinforcement Learning4 Oct
- 2024Unlearning or Concealment? A Critical Analysis and Evaluation Metrics for Unlearning in Diffusion Models9 Sep
- 2024Defensive Unlearning with Adversarial Training for Robust Concept Erasure in Diffusion Models24 May
- 2024SafeGen: Mitigating Sexually Explicit Content Generation in Text-to-Image Models10 Apr
- 2023One-Dimensional Adapter to Rule Them All: Concepts, Diffusion Models and Erasing Applications26 Dec
- 2023MMA-Diffusion: MultiModal Attack on Diffusion Models29 Nov
- 2023SalUn: Empowering Machine Unlearning via Gradient-based Weight Saliency in Both Image Classification and Generation19 Oct
- 2023To Generate or Not? Safety-Driven Unlearned Diffusion Models Are Still Easy To Generate Unsafe Images ... For Now18 Oct
- 2023Ring-A-Bell! How Reliable are Concept Removal Methods for Diffusion Models?16 Oct
- 2023Prompting4Debugging: Red-Teaming Text-to-Image Diffusion Models by Finding Problematic Prompts12 Sep
6 more
- 2023Unified Concept Editing in Diffusion Models25 Aug
- 2023SneakyPrompt: Jailbreaking Text-to-image Generative Models20 May
- 2023Forget-Me-Not: Learning to Forget in Text-to-Image Diffusion Models30 Mar
- 2023Erasing Concepts from Diffusion Models13 Mar
- 2022Safe Latent Diffusion: Mitigating Inappropriate Degeneration in Diffusion Models9 Nov
- 2022Red-Teaming the Stable Diffusion Safety Filter3 Oct
Other references · 20
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
- 2020Denoising Diffusion Probabilistic Modelscited by 21,076
- 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,863
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2015Deep Unsupervised Learning using Nonequilibrium Thermodynamicscited by 7,058
- 2023BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Modelscited by 6,137
- 2023SDXL: Improving Latent Diffusion Models for High-Resolution Image Synthesiscited by 4,356
- 2024Scaling Rectified Flow Transformers for High-Resolution Image Synthesiscited by 4,181
- 2022InstructPix2Pix: Learning to Follow Image Editing Instructionscited by 2,611
- 2021CLIPScore: A Reference-free Evaluation Metric for Image Captioningcited by 2,424
- 2015Microsoft COCO Captions: Data Collection and Evaluation Servercited by 1,462
- 2023ImageReward: Learning and Evaluating Human Preferences for Text-to-Image Generationcited by 1,045
8 more
- 2023Pick-a-Pic: An Open Dataset of User Preferences for Text-to-Image Generationcited by 977
- 2018Robustness May Be at Odds with Accuracycited by 880
- 2022Can Machines Help Us Answering Question 16 in Datasheets, and In Turn Reflecting on Inappropriate Content?cited by 155
- 2023Circumventing Concept Erasure Methods For Text-to-Image Generative Modelscited by 85
- 2024Latent Guard: a Safety Framework for Text-to-image Generationcited by 71
- 2024GuardT2I: Defending Text-to-Image Models from Adversarial Promptscited by 62
- 2023Localizing and Editing Knowledge in Text-to-Image Generative Modelscited by 54
- 2017Less-forgetful Learning for Domain Expansion in Deep Neural Networkscited by 27
Built on by
Citing papers per year: 2025: 2; 2026: 5.
7 papers.
- 2025Erasing Concepts, Steering Generations: A Comprehensive Survey of Concept Suppressioncited by 10
- 2025PromptSafe: Gated Prompt Tuning for Safe Text-to-Image Generationcited by 2
- 2026Do Models Share Safety Representations? Cross-Model Steering for Safe Visual Generationcited by 2
- 2026The Illusion of High Utility in Safety Alignment of Text-to-Image Diffusion Modelscited by 1
- 2026Unified Safe In-context Image Generation in Multimodal Diffusion Transformers via Restricting Unsafe Information Flowscited by 0
- 2026TEA: Text Encoder Alignment for Robust Concept Erasure in Text-to-Image Modelscited by 0
- 2026ShieldCLIP: Selective Safety Alignment for Harmful Content Mitigation in Multimodal Foundation Modelscited by 0
- 2026ShieldCLIP: Selective Safety Alignment for Harmful Content Mitigation in Multimodal Foundation Models30 Sep 2026
- 2026TEA: Text Encoder Alignment for Robust Concept Erasure in Text-to-Image Models15 Aug 2026
- 2026The Illusion of High Utility in Safety Alignment of Text-to-Image Diffusion Models1 Jul 2026
- 2026Unified Safe In-context Image Generation in Multimodal Diffusion Transformers via Restricting Unsafe Information Flows5 Jun 2026
- 2026Do Models Share Safety Representations? Cross-Model Steering for Safe Visual Generation3 Jun 2026
- 2025PromptSafe: Gated Prompt Tuning for Safe Text-to-Image Generation2 Aug 2025
- 2025Erasing Concepts, Steering Generations: A Comprehensive Survey of Concept Suppression26 May 2025
Similar, not cited
Close in wording, no citation either way
- 2024Jailbreaking Prompt Attack: A Controllable Adversarial Attack against Diffusion Models
- 2025Training-Free Safe Text Embedding Guidance for Text-to-Image Diffusion Models
- 2026DTVI: Dual-Stage Textual and Visual Intervention for Safe Text-to-Image Generation
- 2025Prompt-Based Safety Guidance Is Ineffective for Unlearned Text-to-Image Diffusion Models
- 2026UniNDM: A Unified Noise-driven Detection and Mitigation Framework Against Sexual Content in Text-to-Image Generation
- 2025Responsible Diffusion Models via Constraining Text Embeddings within Safe Regions
- 2025NDM: A Noise-driven Detection and Mitigation Framework against Implicit Sexual Intentions in Text-to-Image Generation
- 2025Beautiful Images, Toxic Words: Understanding and Addressing Offensive Text in Generated Images