MarkPlugger: Generalizable Watermark Framework for Latent Diffusion Models Without Retraining

Guokai Zhang, Lanjun Wang, Yuting Su, An-An Liu · DOI

TL;DR

This paper introduces MarkPlugger, a novel framework for embedding invisible watermarks into images generated by Latent Diffusion Models (LDMs) without requiring any retraining of the LDM itself. This plug-and-play approach significantly reduces the cost and complexity of watermarking, making it adaptable to the rapid evolution of LDM technologies while maintaining high image quality and watermark robustness.

What Problem Does This Paper Address?

The rise of powerful text-to-image generation models like Latent Diffusion Models (LDMs) has democratized content creation but also introduced significant security and ethical concerns. Malicious actors can exploit these models to generate and spread harmful or misleading content, making it difficult to trace the origin of these creations. Existing watermarking solutions often require extensive retraining of the LDM or the watermark model, which becomes prohibitively expensive and time-consuming given the rapid pace of LDM development and the proliferation of different model versions. This creates a critical need for a watermarking method that is both effective and easily deployable across various LDM architectures without the burden of retraining.

Methods

MarkPlugger tackles this challenge with a "plug-and-play" strategy that operates directly in the latent space of LDMs. The core innovation lies in its ability to embed watermarks without altering the LDM's existing components.

Here's a breakdown of their approach:

  • Latent Space Watermarking: Instead of operating in pixel space, MarkPlugger embeds watermarks within the compressed latent representations that LDMs use. This allows for more efficient manipulation and less disruption to the final image.
  • Orthogonal Watermark Representation: A key technique is to design the watermark representation in the latent space to be as "orthogonal" as possible to the image's semantic representation. This minimizes the visual impact of the watermark on the generated image.
  • Additive Fusion: The watermark is fused additively into a single channel of the latent code. This targeted approach further reduces semantic disturbance.
  • Training-Free Framework: Crucially, MarkPlugger only trains its own watermark encoder-decoder architecture. The LDM's VAE encoder and UNet denoiser are kept frozen. This means the watermark model can be trained once and then applied to any LDM without further LDM training.
  • Objective Function: A carefully designed loss function balances image quality (minimizing distortion between original and watermarked images) and watermark recoverability (ensuring the watermark can be accurately extracted).

Datasets

The paper utilizes the following datasets:

  • MS-COCO: A subset of MS-COCO is used for training and evaluation, comprising 82,783 text-image pairs for training and 10,000 for inference.
  • Flickr-8k: This dataset is used to evaluate the generalization capabilities of the framework on a different set of images.

Key Insights and Ideas

  • The "Plug-and-Play" Paradigm Shift: The most significant insight is demonstrating that effective watermarking can be achieved without the costly and time-consuming process of retraining the entire LDM. This opens the door for widespread adoption of watermarking in the rapidly evolving AIGC landscape.
  • Latent Space Orthogonality is Key: By strategically designing watermark representations that are semantically orthogonal in the latent space, the authors achieve a remarkable balance between watermark invisibility and image quality. This is a clever way to embed information without "breaking" the image.
  • Generalization is Achievable: The framework's ability to generalize across multiple official and modified LDM versions (including Stable Diffusion variants, Taiyi, and Safe Latent Diffusion) without retraining the watermark model is a major breakthrough. This highlights the robustness of their latent space approach.
  • Minimal Computational Overhead: The plug-and-play nature and focus on training only the watermark components lead to significantly lower computational costs (FLOPs) compared to existing retraining-based methods.

Key Results

  • High Image Quality: MarkPlugger achieves excellent image quality, with PSNR values consistently above 36.47 dB and SSIM scores surpassing many conventional methods.
  • Robust Watermark Recovery: The framework demonstrates strong watermark recoverability, with Normalized Correlation (NC) exceeding 96% and Character Edit Ratio (CER) within acceptable bounds (12-15%).
  • Exceptional Generalization: The watermark model, trained on SD v1-1, performs consistently well across eight different LDM variants without any retraining, showcasing its adaptability.
  • Computational Efficiency: MarkPlugger boasts significantly lower FLOPs (9.72 G) compared to methods requiring LDM retraining (e.g., Stable Signature at 2767.15 G, ENDE at 3254.42 G), making it highly cost-effective.
  • Robustness to Attacks: The watermark remains resilient to various attacks, including Gaussian blur, cropping, and salt-and-pepper noise, though higher rotation angles pose a greater challenge.

Limitations and Future Work

  • Robustness to Extreme Attacks: While robust to many common attacks, the paper notes that higher rotation angles can degrade watermark performance. Further research could explore enhancing robustness against such severe transformations.
  • Channel Selection Impact: The paper investigates embedding watermarks in different latent channels, finding that channel 3 offers a good balance. However, a deeper understanding of why certain channels are more suitable could be explored.
  • Further Optimization of Parameters: While empirical values for parameters like watermark strength ($\alpha$) and loss weights ($\gamma$) are provided, further systematic exploration could potentially yield even better trade-offs.
  • Cross-Dataset Robustness: While the framework shows good performance on both COCO and Flickr-8K, the paper acknowledges that robustness on Flickr-8K against certain attacks is not as strong as on COCO, suggesting room for improvement in cross-dataset generalization for robustness.

Summary updated

BibTeX
@article{zhang2025markplugger,
  author = {Guokai Zhang and Lanjun Wang and Yuting Su and An-An Liu},
  title = {{MarkPlugger: Generalizable Watermark Framework for Latent Diffusion Models Without Retraining}},
  journal = {IEEE Trans. Multimedia},
  year = {2025},
  doi = {10.1109/tmm.2025.3565960},
}
Figure