Abstract
Identifying and attributing AI-generated content is a critical security challenge. Traditional pixel-space watermarking often faces a trade-off between image quality and robustness against attacks. We present Latent Watermark (LW), a novel method that injects digital signatures directly into the latent space of diffusion models. By operating in the compressed representation used by the model, LW achieves superior image fidelity while maintaining high resistance to common image processing attacks and AI-driven reconstruction.
Introduction: The Quality-Robustness Dilemma
As Latent Diffusion Models (LDMs) like Stable Diffusion gain popularity, the need for reliable watermarking has intensified. Existing methods typically suffer from two main issues:
- The Quality Gap: Robust watermarks often require significant pixel perturbations that degrade image fidelity.
- The Robustness Gap: Subtle, high-quality watermarks are easily erased by simple operations like Gaussian blurring or JPEG compression.
This dilemma stems from operating in pixel space, where watermarks are vulnerable to standard image processing. Latent Watermark (LW) addresses this by "baking" the signature into the generative process itself within the latent space.
Methods: Architecture and Training
LW operates entirely within the LDM's latent space, modifying the compressed representation before the final image is decoded.
System Architecture
The LW framework introduces four key modules:
- Message Encoder/Decoder: Responsible for converting bit-strings into latent representations and back.
- Message Coupler: Fuses the watermark latent with the image latent, specifically targeting the first channel ($z_{(0)}$) to minimize color distortion.
- Message Decoupler: Extracts the watermark latent from potentially attacked images.
Progressive Training Strategy
To handle the complexity of frozen LDM components, the authors employ a three-step training approach:
- Self-Supervised Pre-training: Ensures the encoder and decoder can communicate bits perfectly.
- Identity Mapping: Pre-trains the coupler to initially act as an identity function, preserving original image quality.
- Formal Training: Jointly optimizes all modules using latent distance, visual similarity (LPIPS), and message accuracy losses.
Experimental Setup
The model was trained on 50,000 images from the LAION-Aesthetics-5+ dataset. Evaluation was conducted using 5,000 captions each from MS-COCO 2017 and Flickr30k. The system's resilience was tested against ten categories of attacks, including destructive (JPEG), constructive (denoising), and reconstructive (AI-based cleaning).
Key Results and Insights
LW significantly outperforms state-of-the-art baselines like StableSignature and StegaStamp in both robustness and image quality.
- Superior Robustness: LW achieved an average Bit Accuracy of ~95% on MS-COCO, surpassing competitors by over 5%.
- High Detection Rates: The True Positive Rate reached 98-99% even under heavy attack, whereas competitors often fell below 80%.
- Fidelity: LW maintains lower FID scores and higher SSIM than robust pixel-based methods, avoiding common artifacts like "shadowy" textures.
- Resilience to AI Reconstruction: Because the watermark is embedded in the latent structure, it survives "reconstructive" attacks where an adversary uses a VAE to regenerate the image to strip noise.
Limitations and Future Work
The current implementation of LW lacks rotation invariance; robustness drops if the image is rotated significantly. Future research will focus on developing rotation-invariant latent representations. Additionally, while LW is computationally efficient (ranking second in inference time), further optimization of the U-Net modules used in the coupling process remains a goal.
Summary updated