Skip to main content
QUICK REVIEW

[Paper Review] Towards Safe Self-Distillation of Internet-Scale Text-to-Image Diffusion Models

Sanghyun Kim, Seohyeon Jung|arXiv (Cornell University)|Jul 12, 2023
Generative Adversarial Networks and Image SynthesisComputer Science5 citations
TL;DR

This paper proposes Safe Self-Distillation Diffusion (sdd), a method that fine-tunes text-to-image diffusion models via self-distillation to remove harmful or copyrighted content—such as nudity or artist-specific styles—by aligning the noise prediction for target concepts with the unconditional model's output. sdd effectively removes multiple concepts simultaneously while preserving image quality, outperforming prior methods in both safety and fidelity.

ABSTRACT

Large-scale image generation models, with impressive quality made possible by the vast amount of data available on the Internet, raise social concerns that these models may generate harmful or copyrighted content. The biases and harmfulness arise throughout the entire training process and are hard to completely remove, which have become significant hurdles to the safe deployment of these models. In this paper, we propose a method called SDD to prevent problematic content generation in text-to-image diffusion models. We self-distill the diffusion model to guide the noise estimate conditioned on the target removal concept to match the unconditional one. Compared to the previous methods, our method eliminates a much greater proportion of harmful content from the generated images without degrading the overall image quality. Furthermore, our method allows the removal of multiple concepts at once, whereas previous works are limited to removing a single concept at a time.

Motivation & Objective

  • To address the challenge of harmful and copyrighted content generation in internet-scale text-to-image diffusion models.
  • To develop a method that removes problematic concepts without degrading image quality or causing catastrophic forgetting.
  • To enable simultaneous removal of multiple harmful or copyrighted concepts, overcoming limitations of prior single-concept approaches.
  • To provide a safe, efficient, and deployable post-training solution for real-world deployment of generative models.

Proposed method

  • The method performs self-distillation by training the student model to match the unconditional noise prediction for target concepts, using text prompts to guide the distillation process.
  • An exponential moving average (EMA) teacher model is employed to stabilize training and mitigate catastrophic forgetting during fine-tuning.
  • The student model is optimized to predict noise in the latent space, conditioned on a target concept prompt, while aligning its output with the EMA teacher's unconditional prediction.
  • The approach is applied post-pretraining, requiring no access to original training data, making it suitable for model fine-tuning in deployment settings.
  • The method supports multi-concept removal by sequentially or jointly applying the distillation process to multiple target concepts.
  • The training objective minimizes the L2 distance between the student’s noise prediction and the EMA teacher’s unconditional prediction, ensuring alignment without overfitting.

Experimental results

Research questions

  • RQ1Can self-distillation be effectively used to remove harmful content from text-to-image diffusion models without degrading image quality?
  • RQ2How does the proposed method compare to existing detoxification techniques in terms of safety and fidelity?
  • RQ3Can the method simultaneously remove multiple harmful or copyrighted concepts, such as nudity and artist styles, in a single fine-tuning process?
  • RQ4To what extent does the use of an EMA teacher model prevent catastrophic forgetting during concept removal?
  • RQ5Does the method preserve the model’s ability to generate diverse and high-quality images for unrelated prompts after fine-tuning?

Key findings

  • sdd reduces the proportion of NSFW (nude) images from 74.18% in the base Stable Diffusion model to 12.62% on a 5,000-image benchmark, significantly outperforming existing methods.
  • The method maintains high image quality, achieving a Fréchet Inception Distance (FID) of 15.142, which is comparable to or better than other methods like esd and sld.
  • sdd successfully removes artist-specific styles (e.g., Van Gogh’s style) from generated images while preserving the core content and artistic intent of the prompt.
  • Unlike single-concept methods such as sd+neg or sld, sdd maintains strong performance when removing multiple concepts simultaneously, avoiding the performance drop seen in other approaches.
  • The EMA teacher model effectively preserves general knowledge and prevents degradation in image quality, even when removing multiple concepts.
  • The method demonstrates stable and fast training, with minimal interference between different concepts during the distillation process.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.