Papers
Topics
Authors
Recent
Search
2000 character limit reached

MPW-VAE: Watermarking in Latent Diffusion Models

Updated 12 July 2026
  • The paper introduces MPW-VAE, integrating imperceptible watermarking within a frozen VAE decoder to produce dual outputs from a single latent code.
  • It leverages latent residual-based adapters and a multiplexing design to generate both watermark-free and watermarked images for joint reconstruction and forensic training.
  • Empirical results show high image fidelity (≈40 dB PSNR), near-perfect bit accuracy (~99.9%), and robust tamper localization, outperforming prior watermarking methods.

Searching arXiv for the cited paper and closely related watermarking methods mentioned in the provided data. The Multiplexing Watermark VAE (MPW-VAE) is the watermarking component of StableGuard, a diffusion-native framework for latent diffusion models that integrates an imperceptible holistic binary watermark into the image generation process while using the same watermark patterns as cues for tamper localization (Yang et al., 22 Sep 2025). In StableGuard, MPW-VAE replaces or wraps the standard VAE decoder at the second stage of the latent diffusion pipeline, after denoising has produced a clean latent z0z_0. Its defining property is multiplexing: from a shared latent code zz, it can generate both a watermark-free reconstruction and a watermarked image, thereby coupling copyright protection with self-supervised forensic training in a single end-to-end design.

1. Position in the StableGuard framework

In a standard latent diffusion model such as Stable Diffusion, the pipeline first denoises sampled noise into a clean latent z0z_0 through the diffusion UNet and then decodes z0z_0 into an image XX through the VAE decoder. StableGuard inserts MPW-VAE at this second stage. The original decoder Dν\mathcal{D}_\nu is kept and frozen, while a watermark adapter is inserted after each decoder block to form the MPW-VAE decoder Dϕ\mathcal{D}_\phi (Yang et al., 22 Sep 2025).

This arrangement allows the adapters to be toggled on or off. From the same latent zz, the system can therefore produce a watermark-free reconstruction

X^=Dν(z)\hat{X} = \mathcal{D}_\nu(z)

and a watermarked image

Y=Dϕ(z).Y = \mathcal{D}_\phi(z).

These paired outputs are central to the design. StableGuard uses the pairs zz0, together with random fusion masks, to synthesize tampered images zz1 and corresponding ground-truth tamper masks zz2 for training the Mixture-of-Experts Guided Forensic Network (MoE-GFN). Within this overall system, MPW-VAE is both the embedding module, which ties watermarking to the latent diffusion model’s generative process, and the multiplexing source that makes self-supervised forensic learning possible.

A common misconception would be to treat MPW-VAE as a conventional post hoc watermarking module attached after generation. The StableGuard formulation explicitly differs from that pattern: the watermark is integrated into the decoder path of the latent diffusion model rather than appended as a separate image-space encoder (Yang et al., 22 Sep 2025).

2. Architectural formulation and watermark injection

StableGuard does not retrain the base VAE. The encoder zz3 and decoder zz4 are frozen, while MPW-VAE augments the decoder using latent residual-based adapters inserted after each decoder block (Yang et al., 22 Sep 2025). In the standard VAE setting, the encoder is zz5, the decoder is zz6, and the classical objective is

zz7

with zz8.

MPW-VAE preserves this pretrained backbone and injects the watermark through intermediate decoder features. Let the feature map at decoder block zz9 be z0z_00, and let the watermark be a binary bit vector

z0z_01

The adapter z0z_02 first encodes z0z_03 through two fully connected layers,

z0z_04

reshapes the result to match the feature map,

z0z_05

concatenates it with the original block features, and applies two convolutional blocks followed by a residual addition: z0z_06

z0z_07

z0z_08

The resulting watermark-conditioned decoder is

z0z_09

whereas disabling the adapters recovers the vanilla decoder

z0z_00

The paper characterizes this residual design as minimally perturbing the original decoder features while keeping image fidelity high and encoding watermark patterns that are subtle but traceable (Yang et al., 22 Sep 2025). It also states that the adapters are hierarchical, operating at different spatial scales after each decoder block, which is used to enhance watermark robustness.

3. Multiplexing, paired outputs, and synthetic tampering data

In StableGuard, “multiplexing” means that a single latent code z0z_01 can be transformed into two consistent outputs with different forensic properties: a watermark-free reconstruction z0z_02 and a watermarked version z0z_03 (Yang et al., 22 Sep 2025). For each input image z0z_04, the process is

z0z_05

This yields the triplet z0z_06, where z0z_07 is the original real image, z0z_08 is the reconstruction by the vanilla VAE, and z0z_09 is the watermarked reconstruction.

StableGuard then synthesizes tampered examples by splicing watermarked and watermark-free regions. Let XX0 be a random binary mask or a semantic mask from SAM. The fused image XX1 is defined as

XX2

Here, XX3 carries watermark everywhere, whereas XX4 or XX5 supplies watermark-free source regions. Pixels with XX6 are therefore “tampered” relative to the watermarked baseline, and the ground-truth tamper mask is exactly XX7.

Mask generation uses two strategies. With 50% probability, StableGuard uses random binary masks composed of pure noise patterns. With 50% probability, it uses semantic masks from SAM segmentations, with masks kept non-paired across images to maximize shape diversity. The dataset construction is further used with different editing backbones—SD, SDXL, Kandinsky, ControlNet, and LaMa—in the AIGC tampering dataset (Yang et al., 22 Sep 2025).

This design produces a rich, tampering-agnostic dataset in which MoE-GFN is exposed to object-level and region-level splicing, to both “human-like” edits using original XX8 and AI-generated content using XX9, and to precise labels for tampered regions and watermark integrity without manual annotation. A plausible implication is that the term “multiplexing” refers not merely to dual decoding, but to the generation of matched supervision signals for both attribution and localization.

4. Watermark representation, objectives, and self-supervised optimization

StableGuard uses a binary bit watermark

Dν\mathcal{D}_\nu0

with reported bit lengths

Dν\mathcal{D}_\nu1

The watermark is embedded inside the VAE decoder through adapters; it is not added directly to the latent Dν\mathcal{D}_\nu2 and not added directly to image pixels (Yang et al., 22 Sep 2025). The decoder may be written as

Dν\mathcal{D}_\nu3

The data describe the induced perturbation as holistically spread over the image rather than taking the form of a local logo or visible mark.

Training is governed by the overall StableGuard objective. The similarity loss preserves fidelity between the watermarked image Dν\mathcal{D}_\nu4 and the clean reconstruction Dν\mathcal{D}_\nu5: Dν\mathcal{D}_\nu6 where Dν\mathcal{D}_\nu7 is a perceptual similarity term described as LPIPS-style feature distance. The watermark loss supervises extraction of the bit vector from images, including tampered ones: Dν\mathcal{D}_\nu8 The tampering loss is

Dν\mathcal{D}_\nu9

with

Dϕ\mathcal{D}_\phi0

Dϕ\mathcal{D}_\phi1

The total loss is

Dϕ\mathcal{D}_\phi2

The training loop is explicitly self-supervised. Given a real image Dϕ\mathcal{D}_\phi3, StableGuard encodes it into Dϕ\mathcal{D}_\phi4, decodes Dϕ\mathcal{D}_\phi5 and Dϕ\mathcal{D}_\phi6, samples a mask Dϕ\mathcal{D}_\phi7, constructs Dϕ\mathcal{D}_\phi8, feeds Dϕ\mathcal{D}_\phi9 to MoE-GFN, computes zz0, and updates the adapter parameters of MPW-VAE and the forensic network parameters while keeping the base VAE encoder and decoder frozen (Yang et al., 22 Sep 2025). Supervision comes automatically from the known bit vector zz1 and the constructed mask zz2; no manual tamper annotation is required.

5. Interaction with MoE-GFN

MoE-GFN receives three types of images generated by MPW-VAE: pure watermarked images zz3, tampered versions zz4 built from zz5 and zz6, and watermarked reconstructions used for robustness evaluation. For each zz7, it predicts both the watermark bits and the tamper mask: zz8

Its internal MoFE block contains three experts (Yang et al., 22 Sep 2025). The Watermark Extraction Expert is a global transformer that captures global correlations of watermark patterns across the image: zz9 The Tampering Localization Expert is a sub-patch transformer. It partitions the feature map into patches of size X^=Dν(z)\hat{X} = \mathcal{D}_\nu(z)0, with X^=Dν(z)\hat{X} = \mathcal{D}_\nu(z)1 in the implementation details, and is described as being sensitive to local inconsistencies indicative of tampering: X^=Dν(z)\hat{X} = \mathcal{D}_\nu(z)2 The Boundary Enhancement Expert is a frequency-domain transformer: X^=Dν(z)\hat{X} = \mathcal{D}_\nu(z)3

X^=Dν(z)\hat{X} = \mathcal{D}_\nu(z)4

and is intended to highlight high-frequency edges where manipulations occur.

The outputs of the three experts are merged through a Dynamic Soft Router with router weights

X^=Dν(z)\hat{X} = \mathcal{D}_\nu(z)5

where X^=Dν(z)\hat{X} = \mathcal{D}_\nu(z)6 is a small MLP, producing a unified forensic feature

X^=Dν(z)\hat{X} = \mathcal{D}_\nu(z)7

The interaction between MPW-VAE and MoE-GFN is not unidirectional. StableGuard describes a reciprocal relation in which MPW-VAE improves forensic accuracy by supplying paired, consistent watermarked and clean samples together with rich tampering variants, while MoE-GFN guides watermark embedding through backpropagation so that the embedded patterns become more useful for detection and localization (Yang et al., 22 Sep 2025). Ablation in Tab. 12 is reported to show that training MPW-VAE and MoE-GFN separately, without joint optimization, yields poorer localization than joint training.

6. Empirical characteristics, implementation, and relation to prior methods

The reported empirical profile of MPW-VAE is defined by three simultaneous targets: image fidelity, watermark robustness, and tamper localization (Yang et al., 22 Sep 2025). On COCO and T2I datasets, MPW-VAE is reported to achieve PSNR of approximately X^=Dν(z)\hat{X} = \mathcal{D}_\nu(z)8–X^=Dν(z)\hat{X} = \mathcal{D}_\nu(z)9 dB, SSIM of approximately Y=Dϕ(z).Y = \mathcal{D}_\phi(z).0, LPIPS of approximately Y=Dϕ(z).Y = \mathcal{D}_\phi(z).1–Y=Dϕ(z).Y = \mathcal{D}_\phi(z).2, and FID of approximately Y=Dϕ(z).Y = \mathcal{D}_\phi(z).3–Y=Dϕ(z).Y = \mathcal{D}_\phi(z).4. The same section states that bit accuracy on clean images reaches up to 99.98%, and that compared to methods such as WAM, OmniGuard, WaDiff, and Stable Signature, MPW-VAE improves perceptual quality and FID while achieving near-perfect bit accuracy of about 99.9%.

Under noise, JPEG, Poisson, and many real-world degradations, the combination of MPW-VAE and MoE-GFN is reported to maintain bit accuracy above 99.6% in most noise and compression conditions, while F1 scores for tampering localization remain above 0.9 in many settings. Under varying tampering ratios, the paper reports bit accuracy of approximately 99.96–99.98% at 10–50% tampered area, and approximately 89.6% even at 90% tampering, outperforming post hoc methods. On the AIGC tampering dataset, the reported localization performance across SD-Inpainting, SD-XL, Kandinsky, ControlNet, and LaMa is Y=Dϕ(z).Y = \mathcal{D}_\phi(z).5–Y=Dϕ(z).Y = \mathcal{D}_\phi(z).6, Y=Dϕ(z).Y = \mathcal{D}_\phi(z).7–Y=Dϕ(z).Y = \mathcal{D}_\phi(z).8, and Y=Dϕ(z).Y = \mathcal{D}_\phi(z).9–zz00. On traditional datasets including CASIA, NIST, Columbia, Coverage, and IMD2020, StableGuard is reported often to exceed EditGuard, OmniGuard, and WAM, with zz01–zz02 and zz03–zz04.

The reported trade-offs are correspondingly explicit. Increasing the bit length from zz05 to zz06 slightly lowers PSNR and SSIM and increases LPIPS, while image quality remains high at approximately zz07 dB PSNR. Stronger watermark embedding can marginally improve robustness but must be balanced with zz08 to avoid artifacts. Joint optimization is described as crucial, because decoupling MPW-VAE from MoE-GFN reduces localization performance significantly. This suggests that MPW-VAE should be understood not simply as a watermark encoder, but as a component whose utility depends on co-adaptation with the forensic model.

Implementation details situate MPW-VAE within Stable Diffusion 2.1. The architecture uses the original VAE encoder zz09 and decoder zz10, inserts watermark adapters composed of two FC layers, two conv layers, and a residual connection after each decoder block, and trains with Adam at learning rate zz11 for 10 epochs with batch size 16 on zz12 RTX 4090D. The reported loss weights are zz13, zz14, and zz15. In text-to-image generation, after denoising latent zz16 with the UNet, decoding through zz17 yields watermarked images, while the original decoder remains available for comparison and clean reconstruction.

The complexity overhead is described as small. Tab. 21 reports vanilla VAE latency of approximately 12.69 ms and MPW-VAE latency of approximately 14.99 ms; VRAM rises from 1682 MB to 2034 MB for the decoder, while MoE-GFN uses approximately 428 MB. The paper therefore characterizes the added overhead as negligible relative to the base VAE.

Relative to prior watermarking approaches, StableGuard distinguishes MPW-VAE from two families. First, post hoc image-space methods such as HiDDeN, SepMark, WAM, EditGuard, and OmniGuard attach an external encoder and decoder after generation, incur extra runtime and potential degradation, are decoupled from the diffusion process, and are often optimized separately from forensics. Second, diffusion-native latent watermarking methods such as Stable Signature, WOUAF, and WaDiff modify noise, UNet weights, or latent routing, but are described as focusing on source attribution or simple watermark detection rather than fine-grained tamper localization or self-supervised forensic training (Yang et al., 22 Sep 2025).

Within that comparison, MPW-VAE is defined by three features: a decoder-side latent residual adapter that directly modulates decoder features conditioned on a bit vector; a multiplexing design in which a single latent zz18 yields both watermarked and watermark-free outputs; and joint optimization with MoE-GFN, through which embedding and forensics are trained together in a single end-to-end system. In the formulation of StableGuard, this shifts watermarking from post hoc, isolated watermarking to embedded, multiplexed, forensic-aware watermarking inside the latent diffusion pipeline.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Multiplexing Watermark VAE (MPW-VAE).