PGID: Progressive Guided Inversion and Denoising for Robust Watermark Detection

Minh Quoc Duong, Chun Tong Lei, Chun Pong Lau

TL;DR

State-of-the-art AI image watermarks hide signals in the initial noise of diffusion models, relying on running the generation process in reverse to check for ownership. Adversaries have recently figured out how to hijack this reverse trip—either erasing watermarks from stolen art or framing innocent models for illicit content. This paper introduces PGID, a training-free, plug-and-play "course corrector" that scrubs out adversarial detours during extraction, reliably recovering erased watermarks and exposing forgeries.

What Problem Does This Paper Address?

Imagine running an AI image service. To protect your intellectual property and prevent misuse, you use semantic watermarking. Unlike old-school watermarks slapped onto finished pixels, semantic watermarks subtly arrange the initial random Gaussian noise ($z_T$) before the diffusion model denoises it into a clean image ($z_0$). To check if an image is yours, you run the diffusion process backward—a deterministic technique called DDIM inversion—to recover that initial noise and look for your signature.

Here is the catch: DDIM inversion is fragile. Recent black-box "imprint" attacks exploit this by adding tiny, imperceptible perturbations to an image. These nudges compound over the reverse steps, tricking the inversion process into landing in the wrong place. Bad actors can do two things:

  1. Removal Attacks: Nudge a watermarked image so it inverts to random, unwatermarked noise—allowing them to steal your images.
  2. Forgery Attacks: Nudge an external, potentially illicit image so it inverts into your watermarked noise—framing your service for content it never generated.
Figure 1: Overview of the PGID framework and threat model. (a) Current semantic watermark methods are vulnerable to imprint forgery and removal attacks. PGID can recover watermark signals and reject forged images, providing effective defense. (b) The application scenario for PGID.

Methods

The authors observe that for any fixed watermark, the clean latent space ($z_0$) naturally splits into a watermarked region and an unwatermarked region. Attacks succeed by pushing latents across the border. To push them back, the authors propose Progressive Guided Inversion and Denoising (PGID), a three-stage, training-free extraction pipeline:

  1. Trajectory Pre-computation (Standard): Run normal DDIM inversion on the suspect image to record its "attacked" trajectory across all intermediate timesteps.
  2. Progressive Latent Refinement (Novel): Starting from the suspect image's latent representation, PGID performs asymmetric back-and-forth cycles over the early timesteps ($1$ to $k$). In each cycle, it steps backward (inverts) while actively steering away from the pre-computed attacked trajectory, and then steps forward (denoises) back to $t=0$. Crucially, it denoises for more steps than it inverts (skipping $s$ inversion steps). Treating the adversarial perturbation like extra noise, this asymmetric scrub uses the diffusion model's natural denoising prior to project the perturbed latent back onto its true, clean manifold.
  3. Final Inversion (Standard): Take the newly refined $z_0$ and run standard DDIM inversion all the way to $T$ to extract the true initial noise for watermark detection.

By tweaking three hyperparameters (stopping timestep $k$, skipped steps $s$, and guidance strength $\gamma$), PGID operates in two modes: PGID-R (to verify suspected thefts) and PGID-F (to verify suspected forgeries).

Datasets

Because PGID is completely training-free, no training datasets are used. For evaluation, the authors use:

  • Stable Diffusion Prompts (SDP): Used to generate clean watermarked and unwatermarked $512 \times 512$ images.
  • MS-COCO and ImageNet: Used as real-world "cover" images for attackers attempting forgery attacks.
  • No new benchmarks are introduced.

Key Insights and Ideas

  • Latent Manifold Separation: Even when generating wildly different images, latents sharing a specific watermark cluster into a structurally distinct region in latent space compared to unwatermarked images, easily visible via PCA.
Figure 2: Visualization of latent manifold separation. PCA projections of the latent space Z0 for (a) Gaussian Shading and (b) Tree Ring. The visualization demonstrates a clear structural differentiation between the watermarked region and the unwatermarked region for a fixed initial noise signal.
  • Cascading Inversion Errors: Imprint attacks don't magic away watermarks at the final step; they introduce a tiny distributional bias at $t=0$ that snowballs across intermediate inversion steps. Fixing the trajectory early prevents this avalanche.
Figure 4: Visualization of the trajectory deviation MSE caused by the removal attack from t = 0 to t = 50. The in- version discrepancy accumulates across intermediate timesteps.
  • Denoising > Inverting: By inverting $i-s$ steps and denoising $i$ steps in a loop, PGID leverages the diffusion model itself as a purifier, stripping away adversarial perturbations while keeping the underlying image semantics—and authentic watermarks—intact.

Key Results

Tested on Stable Diffusion v2.1 across four leading semantic watermark schemes (Tree Ring, Gaussian Shading, PRC, and T2SMark) against 50-to-150-step attacks:

  • Recovering Erased Watermarks: Standard inversion collapses under removal attacks, with detection rates dropping to 0.00 for Gaussian Shading and PRC (and bit accuracy plummeting to random guessing or worse). PGID-R restores detection rates to 0.97–1.00 across all schemes, recovering bit accuracy in Gaussian Shading from roughly 0.01 back to >0.996.
  • Busting Forgeries: Baseline schemes fall for forgeries nearly 100% of the time (1.00 detection rate on MS-COCO and ImageNet). PGID-F slashes false detection rates down to 0.00–0.14, pushing decoded bit accuracies back to random coin-flips ($\sim 0.50$).
  • Preserving Authentic Signals: Passing genuine watermarked images through PGID-F retains 0.93–1.00 detection rates, proving it doesn't just blindly wipe out watermarks to stop forgeries.
  • Architecture Agnostic: Swapping the UNet-based Stable Diffusion for a Diffusion Transformer (PixArt-$\alpha$) yields similarly strong restoration and forgery rejection without any retraining.

Limitations and Future Work

PGID is not a single "set-it-and-forget-it" pass. Service providers have to run PGID-R or PGID-F conditionally based on standard detection outcomes, and the defense requires different hyperparameter configurations ($k, s, \gamma$) depending on whether you are defending against removal or forgery. Furthermore, applying PGID to new model architectures (like PixArt-$\alpha$) or specific watermarking schemes (like PRC) requires tailoring these hyperparameters rather than relying on a single universal default.

Summary updated

BibTeX
@inproceedings{duong2026pgid,
  author = {Minh Quoc Duong and Chun Tong Lei and Chun Pong Lau},
  title = {{PGID: Progressive Guided Inversion and Denoising for Robust Watermark Detection}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=KfdFXxbNSJ},
}
Figure