Embedding Watermarks in Diffusion Process for Model Intellectual Property Protection

Jijia Yang, Sen Peng, Xiaohua JiaarXiv 2024 · DOI

Introduction

Diffusion models (DMs) such as Stable Diffusion and DALL-E 2 represent significant investments in computational resources and proprietary data. Protecting the intellectual property (IP) of these models is crucial to prevent unauthorized redistribution or "model laundering." Existing protection methods typically rely on backdoors or output-based watermarking. Backdoor methods are often fragile and susceptible to removal via fine-tuning, while output-based watermarking permanently alters every generated image, often degrading visual quality. This paper introduces a novel "third way": a watermark integrated into the model's internal generation process that remains invisible in the final output.

Methodology

The core innovation involves embedding a watermark into the intermediate stages of the diffusion process. The standard training procedure is modified into a two-phase approach:

  1. Embedding Stage ($t \in [1, t_A]$): During the initial denoising steps, the model is trained to move the distribution toward a specific watermark image ($x_A$). The model learns a trajectory that passes through this watermark state rather than just removing noise to find the original image ($x_0$).
  2. Simulation Stage ($t \in (t_A, T]$): For the remaining steps, the model follows the standard diffusion path, ensuring the final output at $t=0$ matches the target data distribution perfectly.
Modified training process showing the embedding of watermark $x^A$ into the intermediate denoising trajectory.

Verification of ownership is performed by stopping the reverse sampling process at the pre-defined watermark step ($t_A$). By averaging multiple samples to mitigate residual noise, the watermark becomes statistically detectable. The authors utilize statistical contour matching to provide a mathematical verification of the watermark's presence.

Experimental Evaluation

The method was evaluated across four standard benchmarks to test varying levels of complexity:

  • MNIST: Simple handwritten digits.
  • FashionMNIST: Grayscale images of clothing.
  • CIFAR-10: Small color images across 10 categories.
  • CelebA: High-quality cropped facial images.

Results and Analysis

The researchers utilized Inception Score (IS) and Frechet Inception Distance (FID) to assess image quality and diversity.

  • Fidelity Preservation: In most evaluations, the watermarked models maintained performance comparable to clean baseline models. Notably, on FashionMNIST, the watermarked model achieved a lower (better) FID score (5.03) than the baseline (7.59), suggesting the watermark may serve as a beneficial prior during training.
  • Temporal Watermark Visibility: The watermark is clearly visible during intermediate sampling steps but progressively fades as the process nears $t=0$. This ensures that the final user experience is unaffected while the IP remains protected.
Denoising process across datasets showing the emergence and subsequent disappearance of the watermark as $t$ approaches 0.
  • Robustness: Because the watermark is part of the denoising trajectory, it is deeply integrated into the model's generative capabilities. Stripping the watermark would likely compromise the model's primary function, making it more robust than traditional backdoor triggers.

Conclusion and Future Work

This approach provides a robust mechanism for IP protection without sacrificing output quality. However, current verification requires "white-box" access to intermediate sampling steps, which may limit its use against black-box APIs where only the final image is returned. Future research will explore scaling this technique to more complex Latent Diffusion Models (LDMs) and addressing the computational overhead of the two-stage training process.

Summary updated

BibTeX
@misc{yang2024embedding,
  author = {Jijia Yang and Sen Peng and Xiaohua Jia},
  title = {{Embedding Watermarks in Diffusion Process for Model Intellectual Property Protection}},
  year = {2024},
  eprint = {2410.22445},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.22445},
}
Figure