TLDR: A new research paper introduces a method to improve the safety of text-to-image diffusion models that have undergone ‘unlearning’ to prevent harmful content generation. It addresses the ineffectiveness of traditional negative prompts on unlearned models by replacing them with ‘implicit negative embeddings’ derived through concept inversion from harmful images. This approach significantly boosts the ‘Defense Success Rate’ in tasks like nudity and violence, without altering the core model, and demonstrates the transferability of these embeddings across different model versions, offering a novel way to integrate training-based and training-free safety mechanisms.
Text-to-image generative models have made incredible strides, allowing us to create stunning visuals from simple text descriptions. However, this powerful technology also brings a significant challenge: the potential to generate harmful or inappropriate content when given malicious prompts. Addressing this concern is crucial for the responsible deployment of these AI systems.
Currently, two primary strategies exist to make these models safer. The first involves ‘unlearning’ harmful concepts by fine-tuning the model’s parameters, essentially teaching it what not to generate. The second approach uses ‘training-free guidance methods,’ which typically rely on ‘negative prompts’ during the image generation process to steer the model away from unwanted content. For example, if you want to avoid nudity, you might add negative prompts like ‘sexual acts’ or ‘nudity’ to guide the model.
However, a recent study reveals a critical incompatibility between these two seemingly complementary approaches. Researchers observed that combining unlearning with traditional negative prompts often yields only marginal improvements, or in some cases, even degrades the defense performance. The core issue is that once a model has been unlearned, it tends to ignore these explicit negative prompts, rendering them ineffective.
To overcome this challenge, a team of researchers from KAIST and summary.ai has proposed an innovative solution. Their method involves replacing the manually chosen negative prompts with ‘implicit negative embeddings’ obtained through a technique called ‘concept inversion.’ This approach requires no modifications to either the unlearning process or the training-free guidance methods, making it easy to integrate into existing systems.
How the New Method Works
The insight behind this new method stems from the observation that even unlearned models can still inadvertently generate harmful content. This suggests that the underlying representations of malicious concepts still exist within the model’s ‘text embedding space,’ even if explicit negative prompts are no longer effective. Finding these implicit representations manually is extremely difficult.
Concept inversion, a diffusion-based inversion method, provides a way to recover these latent representations directly from harmful images. Essentially, it works backward from an image to find the text embedding that would have produced it. By applying this to a dataset of harmful images, the researchers can extract these ‘implicit concept embeddings.’
Once these implicit embeddings are obtained, they are used in place of the traditional negative prompts in training-free guidance methods like Safe Latent Diffusion (SLD) and SAFREE. This allows the model to be guided away from harmful content more effectively, even after it has undergone an unlearning process.
Experimental Validation and Key Findings
The researchers experimentally validated their method on benchmarks for nudity and violence, using DUO, a prominent unlearned model, as their base. They measured two key metrics: ‘Defense Success Rate’ (DSR), which quantifies how effectively harmful content is suppressed, and ‘Prior Preservation’ (PP), which measures how well the generated images maintain the original intent of the input prompt.
The results were compelling. While existing training-free methods showed only slight improvements or even degradations when combined with unlearned models, the proposed method consistently achieved a higher DSR for the same level of PP across both violence and nudity tasks. This confirms their hypothesis: implicit latent embeddings are crucial for guiding unlearned models.
Another significant finding was the ‘transferability’ of these extracted concept embeddings. An embedding derived from one unlearned model checkpoint could be effectively applied to other checkpoints, maintaining strong performance. Interestingly, even the original, unlearned SD v1.4 model still generated harmful images when prompted with these concept embeddings, suggesting a shared residual negative text embedding space.
Also Read:
- Revealing Adversarial Examples’ Fragility Through Occlusion
- DeepForgeSeal: A New Adaptive Watermarking System for Advanced Deepfake Detection
Looking Ahead
While the method requires extracting a concept embedding for each unlearned model and access to a dataset of harmful images, it offers a robust solution to a critical problem. This work highlights a fundamental incompatibility between current training-based and training-free safety mechanisms and paves the way for a new direction in post-unlearning safety control, bridging previously disconnected approaches.
For more technical details, you can read the full research paper here.


