Leveraging Optimization for Adaptive Attacks on Image Watermarks

Nils Lukas, Abdulrahman Diaa, Lucas Fenaux, Florian Kerschbaum

As deepfakes become increasingly convincing, watermarking has emerged as a primary defense mechanism to identify AI-generated content. Major technology companies and government bodies have signaled that watermarking is a key pillar for AI safety. However, researchers from the University of Waterloo have demonstrated that current image watermarking techniques for AI-generated content are far more fragile than previously thought.

By treating watermark removal as an optimization problem and using "surrogate keys," they successfully broke five state-of-the-art watermarking methods for Stable Diffusion with negligible loss in image quality and less than one hour of GPU time.

The Vulnerability of Current Watermarks

For a watermark to be effective, it must be robust: an attacker should not be able to remove it without significantly degrading the image's quality.

The authors argue that current robustness testing is too narrow. Most researchers test their watermarks against "non-adaptive" attacks, such as simple blurring, rotation, or JPEG compression. This paper addresses the critical gap in adaptive attacks, where an attacker who understands the underlying watermarking algorithm—but lacks the specific secret key—specifically optimizes their strategy to bypass detection.

Methodology: Optimization-Based Attacks

The authors propose a framework that turns watermark evasion into a learnable optimization task. Rather than relying on manual, hand-crafted attacks for each watermarking method, this approach treats the watermark as a signal to be minimized, regardless of whether it is embedded in the pixels or the frequency domain.

Overview of the adaptive attack framework using surrogate keys.

Their approach relies on three main components:

  1. Surrogate Keys: Because the attacker does not have the defender's secret key, they generate their own "surrogate" key using a similar, often open-source model (e.g., Stable Diffusion v1.1 acting as a surrogate for v2.0). They then train a differentiable neural network (a surrogate decoder) to extract messages using this key.
  2. Adversarial Noising: Using the surrogate key as a guide, the attacker calculates the smallest possible pixel-level perturbation (an "adversarial example") that causes the watermark detector to fail.
  3. Adversarial Compression: The attacker fine-tunes a pre-trained autoencoder to specifically "compress out" the watermark signal. They use a dual-loss function: one part ensures the watermark is removed (maximizing distance from the expected message), while the other (LPIPS loss) ensures the image remains perceptually identical to the original.

Key Insights

  • The "Transferability" of Attacks: One of the most surprising findings is that an attack optimized against a "weak" surrogate model transfers almost perfectly to a "stronger" target model.
  • The Single-Key Flaw: Current watermarking methods often rely on a design where the specific key doesn't change the underlying "channel" used for the watermark. The authors found that they only needed to optimize against a single surrogate key to break the system, suggesting that current "secret keys" don't provide as much security as assumed.

Key Results

The authors tested five major watermarking methods: TRW (Tree Rings), WDM, DWT, DWT-SVD, and RivaGAN. The study utilized Stable Diffusion v2.0 as the defender model and evaluated image quality metrics like FID and CLIP scores on 5,000 test images from MS-COCO-2017.

Watermark Accuracy versus Perceptual Distance (LPIPS).
  • Total Evasion: The adaptive attacks reduced detection accuracy from near 100% to 6.3% or less across all five methods.
  • Zero Perceptual Loss: In many cases, the "Adversarial Compression" attack removed the watermark with no visible artifacts. Quantitative metrics remained statistically unchanged before and after the attack, proving that adaptive attacks can evade detection without the heavy image degradation seen in non-adaptive attacks.
  • High Efficiency: The attacks are highly practical, requiring less than 1 GPU hour to optimize.
  • Failure of Traditional Attacks: Standard, non-adaptive attacks were largely ineffective at removing the watermarks, proving that "robustness" is a relative term that depends entirely on the strength of the adversary.

Limitations and Future Work

The proposed attack assumes the adversary knows which watermarking method is being used, even if they lack the specific key. Furthermore, the attack relies on having access to an open-source surrogate model. If a provider keeps their entire architecture and watermarking method completely secret, this specific attack is harder to implement—though such "security through obscurity" remains vulnerable if the algorithm is eventually leaked or reverse-engineered.

Ultimately, these findings emphasize a critical need for the AI safety community. We must move beyond empirical observations against weak attacks and toward certifiably robust watermarking, where security guarantees can be mathematically proven against adaptive, learnable adversaries.

Summary updated

BibTeX
@inproceedings{lukas2024leveraging,
  author = {Nils Lukas and Abdulrahman Diaa and Lucas Fenaux and Florian Kerschbaum},
  title = {{Leveraging Optimization for Adaptive Attacks on Image Watermarks}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=O9PArxKLe1},
}
Figure