Abstract
StableGuard is an end-to-end framework designed to embed invisible watermarks directly into the image generation process of Latent Diffusion Models (LDMs). By integrating a Multiplexing Watermark VAE (MPW-VAE) and a Mixture-of-Experts Guided Forensic Network (MoE-GFN), StableGuard achieves simultaneous copyright protection and precise tamper localization. Experimental results demonstrate state-of-the-art performance in watermark recovery and detection of AI-generated manipulations, maintaining high image quality and robustness against common degradations.
Introduction
As Latent Diffusion Models (LDMs) like Stable Diffusion reach new heights in generating hyper-realistic imagery, the risks of copyright infringement and malicious deepfakes have intensified. Traditional "post-hoc" watermarking methods—which apply a separate steganography network after image generation—are often computationally inefficient and can degrade final image quality. Moreover, these decoupled approaches typically fail to provide fine-grained localization of where an image has been tampered with. StableGuard addresses these challenges by proposing a "diffusion-native" approach that unifies copyright protection and forensic analysis into a single pipeline.
Methodology
StableGuard's architecture is built around two primary innovations:
- Multiplexing Watermark VAE (MPW-VAE): Rather than using an external tool, StableGuard inserts a lightweight, trainable "latent residual-based adapter" into the LDM's pre-trained VAE decoder. This adapter is "multiplexed," meaning it can be toggled to generate either a watermarked image or a clean, watermark-free image from the identical latent code. This capability is crucial for generating perfectly paired training data for forensic tasks.
- Mixture-of-Experts Guided Forensic Network (MoE-GFN): To analyze images, the authors developed a UNet-based network featuring a Mixture-of-Forensic-Experts (MoFE) block. This block contains three specialized branches: a Watermark Extraction Expert for global bit-string recovery, a Tampering Localization Expert for fine-grained local inconsistencies, and a Boundary Enhancement Expert operating in the frequency domain to catch anomalies at edit edges. A Dynamic Soft Router adaptively weights these experts based on the input image.
The system was trained on the COCO dataset using a self-supervised approach. By leveraging the MPW-VAE's ability to produce identical clean/watermarked pairs, the authors could automatically generate training data by splicing clean regions into watermarked images, bypassing the need for manual tampering labels.
Evaluation and Results
Evaluation was conducted across several benchmarks, including the COCO test set, a custom Text-to-Image (T2I) dataset, and a new AIGC Tampering Dataset featuring edits from tools like SDXL and Kandinsky. StableGuard demonstrates superior performance in both watermark robustness and tamper localization.
As shown in the experimental data, StableGuard achieves near-perfect watermark extraction (~99.98% Bit Accuracy) for payloads ranging from 32 to 256 bits, significantly outperforming post-hoc methods like EditGuard and WAM. In tamper localization, StableGuard achieved an F1 score of approximately 0.980 on the AIGC Tampering Dataset, a substantial improvement over passive detection methods (e.g., MVSS-Net at ~0.862). The system remains robust to Gaussian noise, JPEG compression, and Poisson noise, while adding minimal latency (~2.3 ms) to the generation pipeline.
Conclusion
StableGuard represents a significant step toward secure and verifiable AI-generated content. By treating watermarking as an intrinsic part of the generation process, it provides a robust "tripwire" for detecting localized edits. While the system is currently optimized for image-based LDMs, future work aims to extend this VAE-based approach to emerging video diffusion models.
Summary updated