Source-linked AI summary

An Undetectable Watermark for Generative Image Models

Sam Gunn, Xuandong Zhao, Dawn Song

arXiv:2410.07369v4cs.CRcs.AIcs.LGcs.MM

TL;DR

AI-generated disinformation motivates watermarking, but existing schemes can observably degrade generated-image quality. The paper introduces an undetectable watermark based on pseudorandom error-correcting codes for diffusion latents, reporting preserved quality and robustness to removal attacks.

  • Problem

    Watermark adoption remains limited, while existing schemes can noticeably degrade generated-image quality and introduce correlations across generations.

    Source: §1 · p. 1
  • Method

    The PRC watermark uses a pseudorandom error-correcting code to select diffusion-model initial latents that are computationally indistinguishable from random.

    Source: §1 · p. 2, §3.2 · p. 5
  • Results

    The authors report preserved image quality and variability, removal attacks failing without significant quality degradation, and long-message encoding.

    Source: §1 · pp. 2–3
  • Takeaways & Limitations

    The authors conclude that no observable shift in generated-image distribution and long-message encoding can coexist with robustness competitive with schemes that cause large observable shifts.

    Source: §5 · p. 10

    The experiments do not strictly meet the parameter bounds required for the pseudorandomness proof, so the scheme should not be used for undetectability-critical applications.

    Source: §3.2 · p. 6

Abstract

from arXiv · show

We present the first undetectable watermarking scheme for generative image models. Undetectability ensures that no efficient adversary can distinguish between watermarked and un-watermarked images, even after making many adaptive queries. In particular, an undetectable watermark does not degrade image quality under any efficiently computable metric. Our scheme works by selecting the initial latents of a diffusion model using a pseudorandom error-correcting code (Christ and Gunn, 2024), a strategy which guarantees undetectability and robustness. We experimentally demonstrate that our watermarks are quality-preserving and robust using Stable Diffusion 2.1. Our experiments verify that, in contrast to every prior scheme we tested, our watermark does not degrade image quality. Our experiments also demonstrate robustness: existing watermark removal attacks fail to remove our watermark from images without significantly degrading the quality of the images. Finally, we find that we can robustly encode 512 bits in our watermark, and up to 2500 bits when the images are not subjected to watermark removal attacks. Our code is available at https://github.com/XuandongZhao/PRC-Watermark.

1 INTRODUCTION

The paper introduces the PRC watermark, an undetectable scheme for diffusion-generated images that uses a pseudorandom error-correcting code to select initial latents. Experiments report preserved image quality and variability, robustness to removal attacks, and capacity for long messages.

1 INTRODUCTION

  • PRC selects initial latent noise for diffusion generation; its pseudorandom pattern is distributed across latent space, and error correction supports robustness and message encoding.The detector is more robust than the decoder, which can still be useful when message decoding fails.Source: §1 · p. 2
  • Users can set message length and a desired false-positive upper bound when generating keys, without additional training or fine-tuning.The paper states that the false-positive rate is rigorously proved not to exceed the chosen bound.Source: §1 · p. 2
  • FID, CLIP, and Inception Score are preserved by PRC, unlike every other watermarking scheme tested.The authors state that undetectability theoretically ensures quality preservation and frame the experiments as checking security with finite parameters.Source: §1 · p. 2
  • LPIPS-measured perceptual variability is preserved under PRC, unlike every other comparable scheme tested.Source: §1 · p. 2
  • An image classifier fails to learn to detect PRC, while the same classifier quickly learns every other tested scheme.Source: §1 · p. 2
  • Watermark removal attacks fail without significantly degrading image quality, and PRC is most robust among the three tested schemes with the lowest quality impact.The evaluation covers ten attack types and compares PRC with eight state-of-the-art schemes.Source: §1 · p. 2
  • The watermark supports robust encoding of 512-bit messages and at least 2500 bits for images that are not attacked.The decoder's robustness is comparable to, though slightly below, the detector's for 512-bit messages.Source: §1 · p. 3

2 RELATED WORK

Related work distinguishes post-processing from in-processing watermarks and contrasts PRC with Tree-Ring and Gaussian Shading. The discussion highlights limits in prior schemes' detectability, quality, variability, and message capacity.

2 RELATED WORK

  • Post-processing embeds watermarks after generation, while in-processing modifies the model or sampling process; PRC is in-processing.Source: §2 · p. 3
  • Post-processing watermarks cannot be undetectable without extra modeling assumptions, because fixed images can be distinguished from their modified versions.Source: §2 · p. 3
  • Tree-Ring fixes Fourier-domain latent rings to zero and detects them using DDIM inversion, but its latent distribution shift reduces quality and variability.It is zero-bit and susceptible to a surrogate attack that removes the watermark with minimal image-quality impact.Source: §2 · p. 3
  • Gaussian Shading restricts latents to a fixed quadrant; its single-image distribution guarantee does not ensure quality under metrics that capture correlations across generations.The authors report degraded FID and Inception Score, alongside higher LPIPS similarity and diminished variability.Source: §2 · pp. 3–4

3 METHOD

The threat model considers providers who use a watermarking key and adversaries seeking to remove or spoof watermarks. The PRC watermark encodes a pseudorandom pattern in the initial latent, enabling undetectability while supporting keyed detection and message decoding.

3.1 THREAT MODEL

  • Removal attackers are assumed weaker than the provider and must preserve image quality; spoofing receives limited experiments, though the authors state their techniques yield provable resilience with unforgeable public attribution.The authors do not discuss spoofing adversary capabilities in detail.Source: §3.1 · p. 4

3.2 OVERVIEW OF THE PRC WATERMARK

  • Watermarked images are generated by conditioning Gaussian latent signs on a PRC codeword, then passing the resulting latent and prompt to the image generator.The sampling algorithm multiplies each codeword sign by the absolute value of a Gaussian coordinate.Source: §3.2 · p. 6
  • The scheme is undetectable against polynomial-time adversaries when the underlying PRC is pseudorandom, but the experimental parameter choices are not suitable for undetectability-critical use.The authors note that their experiments do not strictly follow the parameter bounds required by the pseudorandomness proof.Source: §3.2 · p. 6
  • Detection recovers an approximation of the original latent and checks its signs for the PRC pattern; decoding can recover messages but is slower and less robust than detection.Detection depends on Recover producing a sufficiently accurate latent approximation.Source: §3.2 · pp. 5–6
  • The figure contrasts post-processing watermarks that directly perturb an un-watermarked image, with StegaStamp producing visible blur.Source: Figure 1 · p. 7
  • Images generated independently of the watermarking key have at most probability F of being identified as watermarked by the detector or decoder.The user selects the desired false-positive bound F when generating the key.Source: §3.2 · pp. 6–7

4 EXPERIMENTS

The experiments evaluate PRC watermarking for image quality, detectability, robustness, long-message encoding, spoofing security, and possible extension beyond latent diffusion. Across the tested attacks, removal did not erase the watermark without significant image-quality degradation.

4.1 EXPERIMENT SETUP

  • Experiments used Stable Diffusion latent diffusion and compared PRC with in- and post-processing baselines across MS-COCO and Stable Diffusion Prompt datasets.Evaluation covered effectiveness, image quality, robustness, and detectability; quality and variability were assessed using FID, CLIP, Inception Score, and LPIPS.Source: §4.1 · pp. 7–8, §4.2 · p. 8

4.2 QUALITY AND DETECTABILITY

  • PRC was the only method to consistently preserve image quality across three metrics on both datasets, and its perceptual variability was comparable to un-watermarked images.The variability comparison excluded post-processing methods; PRC outperformed the other in-processing schemes on this measure.Source: §4.2 · pp. 8–9
  • A ResNet18 classifier reached only 50% validation accuracy on PRC, while validation detection was perfect for every other tested scheme.For PRC, training convergence alongside chance-level validation accuracy indicated memorization rather than learning the watermark pattern.Source: §4.2 · p. 9, Figure 2 · p. 9

4.3 ROBUSTNESS OF THE DETECTOR

  • No tested method reduced PRC’s TPR below 0.99 while keeping FID under 70; JPEG quality 20 lowered TPR from 1.0 to 0.94 but visibly blurred images.The study tested nine watermarking techniques against ten attack types; t = 2 improved robustness but was not explored further because fast attacks on undetectability exist for that choice.Source: §4.3 · p. 9

4.4 ENCODING LONG MESSAGES IN THE WATERMARK

  • PRC reliably decoded 512-bit messages and recovered up to 2500 bits when images faced no watermark-removal attacks.For 512-bit messages, decoder robustness was slightly below detector robustness.Source: §4.4 · p. 9

4.5 SECURITY OF THE PRC WATERMARK UNDER SPOOFING ATTACKS

  • The tested spoofing attack cannot work against an undetectable watermark such as PRC.The attack used a PGD-based method to make a surrogate classifier label un-watermarked images as watermarked.Source: §4.5 · p. 10

4.6 POSSIBILITY OF EXTENSION

  • PRC was demonstrated on traditional VAE models, while applying it to flow-matching models depends on a suitable Recover algorithm.Source: §4.6 · p. 10

5 CONCLUSION

The paper presents a generative-image watermarking approach that avoids observable shifts in the generated image distribution while supporting long messages. Its robustness is competitive with state-of-the-art schemes that produce large, observable distribution shifts.

  • The approach encodes long messages without observable shifts in the generated image distribution, while achieving robustness competitive with state-of-the-art schemes that incur large observable shifts.Source: §5 · p. 10

A.1 ADDITIONAL EXPERIMENT RESULTS

The additional experiments examine robustness, spoofing, embedding attacks, and message length. They also include illustrative images and experimental settings for these evaluations.

  • Under the embedding attack, only PRC attained FID below a threshold; above it, StegaStamp was strongest, although the attack assumes knowledge of the diffusion model’s VAE.An adversarially robust VAE encoder or keeping the VAE private could mitigate the attack; strength-2 embedding still left PRC detection above 95% while visibly degrading image quality.Source: Figure 8 · p. 15, Figure 12 · p. 17
  • For 512-bit messages, the detector is faster and consistently more robust than the decoder, which must recover the embedded message.Source: Figure 10 · p. 16
  • The spoofing attack raises false-positive rates for Tree-Ring and StegaStamp, but does not affect the undetectable PRC watermark.Source: Figure 11 · p. 16
  • The Gaussian Shading example places the flower in the same location across generated images, and the long-message figure tests decoding without adversarial perturbations using t = 4, F = 1e-9, and σ = 0.Source: Figure 13 · p. 18, Figure 14 · p. 18

A.2 DETAILS ON ROBUSTNESS

The robustness evaluation applies photometric, degradation, regeneration, and adversarial attacks to test watermark removal. The attacks vary image transformations, diffusion or compression settings, and adversarial objectives.

  • Photometric attacks varied brightness enhancement factors from 2 to 12 and contrast factors from 2 to 7; degradation attacks varied blur radius, Gaussian noise, and JPEG quality.JPEG quality ranged from 10 to 60, with lower quality causing greater degradation; blur radii ranged from 2 to 12 and noise standard deviations from 5 to 30.Source: §A.2 · p. 19
  • Regeneration attacks added noise and denoised images using either diffusion-model or VAE-based approaches.The diffusion attack used Stable-Diffusion-2-1base for 10 to 200 steps; VAE attacks used two CompressAI models with compression factors from 1 to 6.Source: §A.2 · p. 19
  • Adversarial attacks targeted surrogate detectors or image embeddings, using PGD to perturb images within an l∞ limit.Surrogate attacks used a ResNet18 trained for 10 epochs and tested multiple watermark methods at epsilon values of 4, 8, and 12; the embedding attack assumed knowledge of the diffusion model’s VAE.Source: §A.2 · p. 19

B THE PSEUDORANDOM CODE

The PRC watermark uses a pseudorandom error-correcting code to set latent signs, with key-generation parameters that trade message capacity, robustness, and undetectability. Its detector uses soft evidence from recovered latents, while message decoding relies on belief propagation and ordered statistics decoding.

B THE PSEUDORANDOM CODE

  • The PRC code embeds random parity checks in codewords and is constructed under the stated subexponential-hardness assumption for LPN.The paper notes that later PRC constructions use different assumptions, but whether they improve watermark robustness remains open.Source: B THE PSEUDORANDOM CODE · p. 20

C.1 DESIGNING THE WATERMARK DETECTOR

  • The detector accepts soft decisions by taking a vector of estimated bit values in [−1, 1], rather than a recovered bit string.Its design estimates parity-check satisfaction probabilities from the recovered latent, then thresholds them using a false-positive bound.Source: B THE PSEUDORANDOM CODE · p. 20, §C.1 · pp. 22, 24

B THE PSEUDORANDOM CODE

  • Message decoding uses belief propagation with ordered statistics decoding instead of increasing the PRC block length, but requires Recover to approximate the initial latent accurately.The authors report decoder function under significant perturbation in their robustness experiments with sparsity t = 3.Source: B THE PSEUDORANDOM CODE · p. 21
  • The block length n is the dimension of the image latents; increasing it improves robustness, while increasing message length reduces robustness.Larger parity-check sparsity t strengthens undetectability against more powerful adversaries but decreases robustness; the false-positive bound is at most F when the tested string is independent of the key.Source: B THE PSEUDORANDOM CODE · p. 21

C DETAILS ON THE PRC WATERMARK

C.2 BOUNDING THE FALSE POSITIVE RATE: PROOF OF THEOREM 2

The proof bounds false positives by analyzing the detector's parity-check tests with a concentration inequality. The argument relies on independent parity checks and the one-time pad's randomness.

C.2 BOUNDING THE FALSE POSITIVE RATE: PROOF OF THEOREM 2

  • The proof uses a bounded-above version of Hoeffding’s inequality to bound the detector’s false-positive rate.It treats parity-check contributions as independent, uniformly random values by the construction of the parity-check matrix and the uniformly random one-time pad.Source: §C.2 · pp. 24–25
  • The detector’s testbits ensure a false-positive rate of at most F, and Theorem 2 extends that bound to the PRC detector and decoder.The theorem passage states its claim for any input string s in [−1, 1]^n.Source: §C.2 · p. 24

C.3 PRACTICAL UNDETECTABILITY

The paper distinguishes asymptotic undetectability from security at its practical parameter choices. It describes a brute-force distinguishing attack and explains why the experiments favor robustness over stronger undetectability settings.

C.3 PRACTICAL UNDETECTABILITY

  • For the experimental parameters, undetectability is not guaranteed against motivated adversaries, although the scheme is asymptotically undetectable under the stated assumptions and parameter scaling.The authors characterize it as sufficiently undetectable for main practical applications based on their experiments.Source: §C.3 · p. 25
  • A brute-force attack finds a used t-sparse parity check in O(nt−1) time, with model queries counted as O(1).The authors did not optimize this attack, so faster attacks may exist.Source: §C.3 · p. 25
  • Most robustness experiments use t = 3, while t = 7 is identified as a better choice for cryptographic undetectability on n = 2^14-dimensional latents.The detector still works at t = 7 on non-perturbed images, but the authors choose t = 3 for improved robustness.Source: §C.3 · p. 25
  • The authors attribute the relatively fast distinguishing attack to quasi-polynomial-time attacks against the underlying PRCs and identify PRCs without such attacks as an open question.They state that such a PRC could yield a watermark with improved undetectability through their transformation.Source: §C.3 · p. 26

D DEMO: PRC WATERMARK FOR VAES

The authors demonstrate the PRC watermark on a VAE using latent optimization for detection. Their zero-bit watermark achieves over 90% TPR in the stated setup, while robustness and quality are not investigated in depth.

D DEMO: PRC WATERMARK FOR VAES

  • Over 90% TPR is achieved for a zero-bit PRC watermark on a CelebA-trained VAE with a 256-dimensional latent space, t = 2, and FPR = 0.05.Detection uses latent optimization with the gradient-descent technique of Hong et al. (2023); the authors did not investigate VAE robustness or quality in depth.Source: D DEMO: PRC WATERMARK FOR VAES · p. 26
Loading 2410.07369v4…