Introduction
Diffusion Models (DMs) have revolutionized the generative landscape, powering tools like Stable Diffusion and Midjourney. However, their widespread adoption raises significant concerns regarding intellectual property (IP) protection and the potential for misuse, such as the creation of deepfakes. This paper presents a comprehensive framework for embedding robust, invisible watermarks into DMs to facilitate copyright protection and content monitoring.
Problem Statement
Traditional watermarking techniques for GANs do not directly translate to the stochastic, multi-step denoising process of DMs. The authors identify two core requirements:
- Copyright Protection: Enabling model owners to prove ownership even when the model is accessed as a black-box API.
- Content Monitoring: Identifying whether an image was generated by a specific model to track its origin and mitigate risks.
Methodology
The proposed "recipe" consists of two distinct strategies tailored to the model's training paradigm.
Case 1: Training from Scratch (Unconditional/Class-Conditional)
For smaller models, watermarks are integrated during the initial training phase. A pretrained encoder $E_\phi$ embeds a binary bitstring into the training images. The DM is then trained on this modified dataset. At inference, a decoder $D_\varphi$ extracts the bitstring from generated images to verify their origin.
Case 2: Finetuning Pretrained Text-to-Image Models
Retraining large-scale models like Stable Diffusion is impractical. Instead, the authors propose a "trigger-action" mechanism. A rare token (e.g., [V]) acts as a secret trigger prompt. When this trigger is used, the model is trained to generate a specific watermark image, such as a scannable QR code.
To preserve the model's general generative capabilities and prevent "catastrophic forgetting," the authors employ weight-constrained finetuning using an $\ell_1$ regularization term. This ensures that the model only produces the watermark when explicitly triggered, maintaining high-quality outputs for standard prompts.
Experimental Results
The framework was evaluated on benchmarks including CIFAR-10, FFHQ, ImageNet-1K, and Stable Diffusion v1.4. Key findings include:
- High Fidelity: Bit recovery accuracy consistently exceeded 99%, even under various image attacks such as random masking, brightening, or Gaussian noise.
- Efficiency: Finetuning Stable Diffusion requires approximately 15 minutes on 4 A100 GPUs, making it a practical solution for developers.
- Robustness: Watermarks remain detectable even if model weights are pruned or slightly perturbed.
- Capacity Trade-offs: Higher-resolution images (e.g., 64x64) accommodate complex watermarks better than lower-resolution ones (32x32). However, increasing bit length (e.g., from 4 to 128 bits on CIFAR-10) can degrade image quality, as reflected by an increase in FID from 2.42 to 7.97.
Conclusion
This dual-strategy approach provides a practical foundation for securing the generative frontier. By balancing watermark robustness with image quality and computational efficiency, the "recipe" offers a viable path toward accountable AI development. Future work will focus on enhancing resistance to adversarial "counter-finetuning" aimed at watermark removal.
Summary updated