Gaussian Shading: Provable Performance-Lossless Image Watermarking for Diffusion Models

Zijin Yang,Kai Zeng,Kejiang Chen,Han Fang,Weiming Zhang,Nenghai Yu
2024-05-06
Abstract:Ethical concerns surrounding copyright protection and inappropriate content generation pose challenges for the practical implementation of diffusion models. One effective solution involves watermarking the generated images. However, existing methods often compromise the model performance or require additional training, which is undesirable for operators and users. To address this issue, we propose Gaussian Shading, a diffusion model watermarking technique that is both performance-lossless and training-free, while serving the dual purpose of copyright protection and tracing of offending content. Our watermark embedding is free of model parameter modifications and thus is plug-and-play. We map the watermark to latent representations following a standard Gaussian distribution, which is indistinguishable from latent representations obtained from the non-watermarked diffusion model. Therefore we can achieve watermark embedding with lossless performance, for which we also provide theoretical proof. Furthermore, since the watermark is intricately linked with image semantics, it exhibits resilience to lossy processing and erasure attempts. The watermark can be extracted by Denoising Diffusion Implicit Models (DDIM) inversion and inverse sampling. We evaluate Gaussian Shading on multiple versions of Stable Diffusion, and the results demonstrate that Gaussian Shading not only is performance-lossless but also outperforms existing methods in terms of robustness.
Computer Vision and Pattern Recognition,Cryptography and Security
What problem does this paper attempt to address?
The main problem this paper attempts to address is that existing image watermarking techniques reduce model performance or require additional training when embedding watermarks in diffusion models. Specifically, current methods either affect the quality of generated images or require modification of model parameters, increasing computational overhead. To overcome these issues, the paper proposes a novel watermarking technique called "Gaussian Shading," which can seamlessly embed watermarks without compromising model performance, enabling copyright protection and fake content tracking. ### Main Problems 1. **Model Performance Degradation**: Existing watermarking techniques often reduce the generation performance of diffusion models when embedding watermarks. 2. **Additional Training Requirements**: Some methods require fine-tuning or retraining the model, increasing computational costs. 3. **Copyright Protection and Content Tracking**: There is a need for an effective method to protect the copyright of generated content and track users who generate fake content. ### Solution - **Gaussian Shading**: This method achieves lossless performance watermark embedding by mapping watermark information into the latent representation of a standard Gaussian distribution. The specific steps include: - **Watermark Diffusion**: Diffusing the watermark information throughout the latent representation to enhance the robustness of the watermark. - **Randomization**: Encrypting the watermark to convert it into a randomized form, ensuring its distribution is consistent with the latent representation without a watermark. - **Distribution-Preserving Sampling**: Embedding the watermark during the generation process through a distribution-preserving sampling method, ensuring the quality of the generated images is not affected. ### Experimental Validation - **Detection Performance**: Under various types of noise attacks, Gaussian Shading exhibits excellent true positive rate (TPR) and bit accuracy, maintaining high detection rates even under attacks like brightness adjustment. - **Tracking Performance**: In multi-user scenarios, Gaussian Shading can accurately track users who generate fake content, maintaining high tracking accuracy even under attacks like brightness adjustment. - **Performance Losslessness**: Evaluations using metrics such as FID and CLIP-Score demonstrate that Gaussian Shading does not significantly affect the model's generation performance after embedding the watermark. ### Conclusion Gaussian Shading is an innovative watermarking technique that enables effective copyright protection and content tracking without compromising the performance of diffusion models. This method does not require modifying model parameters and can be seamlessly integrated into the generation process, making it suitable for various versions of diffusion models. Experimental results show that Gaussian Shading outperforms existing methods in detection and tracking tasks and exhibits good robustness under various attacks.