Skip to content

Adaptive Attacks on Image Watermarks Using Optimization MethodsLeveraging Optimization for Adaptive Attacks on Image Watermarks

arXiv· arXiv:2309.16952· Nils Lukas, Abdulrahman Diaa, Lucas Fenaux, Florian KerschbaumUniversity of WaterlooIndexed by this site · 26 days ago· Originally publishedSelected AttacksSelectedAttention42

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

The authors propose modeling adaptive attacks on image watermarking as an optimization problem, training the attack with a differentiable surrogate key; the authors claim that on Stable Diffusion the detection accuracy of five watermarks can all be reduced to 6.3% or lower.

Threat modelNo-box watermarking scenario: the provider offers a watermarked image generator via a black-box API. The attacker is an untrusted user with black-box query access and a white-box open-source surrogate generator (weaker in capability), knows the watermarking algorithm but not the key τ and message m, has insufficient compute to train a generator from scratch, and queries are billed per call. The goal is to generate unwatermarked and high-quality images.

Questions
Watermarks for image generators are used to detect deepfakes, and their core security property is robustness, but existing methods only conduct empirical testing with a limited set of known attacks, cannot determine whether an adaptive attack is already optimal, and robustness is difficult to verify.
Methods
Model the adaptive attack as an optimization problem: the attacker locally uses an open-source surrogate generator to produce a differentiable surrogate watermark key, then uses it to optimize two types of learnable attacks—adversarial noising and adversarial compression—so that the perturbed image both evades verification and maintains perceptual quality.
Experiments and results
Evaluated on Stable Diffusion across five watermarks (TRW, WDM, DWT, DWT-SVD, RivaGAN): non-adaptive attacks are ineffective, while adaptive attacks reduce TPR@1%FPR to 6.3% or lower for all methods, with FID and CLIP scores essentially unchanged; adversarial compression with a single compression is effective against all five methods.
Limitations and future work
The authors note that the attack depends on the watermarking algorithm being public and an available open-source surrogate generator, and that providers who do not disclose their algorithms can prevent such attacks; the experiments use only one pair of public checkpoints (SD v1.1/v2.0) and do not cover more learnable attack types such as inpainting.
Experimental setupStable Diffusion-v2.0 · MS-COCO-2017、LAION-5B · TPR@1%FPR、LPIPS et al.
Evaluated models
Stable Diffusion-v2.0
Benchmarks
MS-COCO-2017LAION-5B
Metrics
TPR@1%FPRLPIPSFIDCLIP scorep-value
AI summaryand selection rationaleResearchers at the University of Waterloo propose in a paper an adaptive attack that models watermark attacks as an optimization problem: the attacker uses a weaker open-source surrogate model to locally generate a differentiable surrogate watermark key, based on which the attack parameters are optimized. Experiments on the Stable Diffusion model show that the attack can bypass all five image watermarks—TRW, WDM, DWT, DWT-SVD, and RivaGAN—with no clearly visible degradation in image quality, and that the compute required for the optimized attack is under 1 GPU hour to reduce detection accuracy to 6.3% or lower. Among these, adversarial compression bypasses all five watermarks with a single compression; adversarial noise at ε=2/255 bypasses TRW, while the other four methods require adding visible noise. The authors argue that future watermarking methods should incorporate such adaptive, learnable attackers into robustness testing, and state that, for ethical reasons, they are not releasing the attack code for now.

Researchers at the University of Waterloo propose in a paper an adaptive attack that models watermark attacks as an optimization problem: the attacker uses a weaker open-source surrogate model to locally generate a differentiable surrogate watermark key, based on which the attack parameters are optimized. Experiments on the Stable Diffusion model show that the attack can bypass all five image watermarks—TRW, WDM, DWT, DWT-SVD, and RivaGAN—with no clearly visible degradation in image quality, and that the compute required for the optimized attack is under 1 GPU hour to reduce detection accuracy to 6.3% or lower. Among these, adversarial compression bypasses all five watermarks with a single compression; adversarial noise at ε=2/255 bypasses TRW, while the other four methods require adding visible noise. The authors argue that future watermarking methods should incorporate such adaptive, learnable attackers into robustness testing, and state that, for ethical reasons, they are not releasing the attack code for now.

Why it was selectedThe paper turns watermark attacks into an optimizable objective function and presents two learnable attacks, which teams deploying image watermarks can use to test the robustness of their own schemes.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    How to systematically evaluate the robustness of image watermarking: model the adaptive attack as an optimization problem and use a differentiable surrogate key to find a near-optimal attack.

    Core problem: when evaluating image watermark robustness, it is impossible to determine whether an adaptive attack is already optimal, making robustness conclusions unreliable.

    • Scenario and motivation: image generators can be misused to synthesize deepfakes, and watermarking curbs misuse by embedding a hidden message in generated content and detecting it with a secret watermark key; the authors cite Google's announcement of deploying watermarking and the US "AI Executive Order" to show its real-world importance.
    • Shortcomings of existing methods: the authors state that existing image generator watermarks are not provably robust and are only empirically tested against a limited set of known attacks; previously claimed security of watermarking methods has been broken by new attacks (Lukas et al., 2022), and adaptive attacks against image classifier watermarks must be manually constructed per method and are hard to scale.
    • Core observation: an attacker who knows the watermarking algorithm (but not the key) can locally use an open-source surrogate generator to replicate a differentiable surrogate key similar to the defender's key, thereby turning "finding the optimal attack parameters" into an optimizable objective.
    • The paper proposes: a framework that formalizes adaptive attacks as an optimization problem, and two learnable attacks (adversarial noising, adversarial compression), evaluated on five watermarking methods.
    • Threat model (Section 3):
      • Attacker goal: use the provider's watermarked generator to synthesize (i) unwatermarked and (ii) high-quality images.
      • Knowledge: knows the watermarking algorithm (KEYGEN, EMBED, VERIFY) but not the secret key τ and message m (adaptive).
      • Capabilities: has black-box query access to the provider model; has white-box access to a weaker open-source surrogate generator (e.g., Stable Diffusion); can freely obtain web images and text data; compute is insufficient to train a generator from scratch; queries are billed per call.
      • Victim system: a provider offering watermarked image generation services via a black-box API (e.g., OpenAI's DALL·E mode), where the verifier verifies the watermark from a single generated image alone in a no-box setting.
  2. What related research exists?

    Related work covers three lines: no-box watermarking methods, adaptive attacks against watermarks, and black-box watermarking and GAN watermarking.

    No-box watermarking methods for image generators (attack targets)

    • Tree-Rings Watermarks (TRW) of Wen et al. (2023): the authors describe it as the first semantic watermark for LDMs, embedding a tree-ring pattern in the frequency domain of the initial noise and using the reversibility of the diffusion process to recover the noise for verification.
    • WDM of Zhao et al. (2023): processes training data with a watermark autoencoder and then retrains the diffusion model from scratch; because retraining requires 150–1000 GPU days, this paper instead uses its autoencoder as a post-generation processor.
    • DWT, DWT-SVD (Cox et al., 2007) and RivaGAN (Zhang et al., 2019): traditional frequency-domain methods and adversarially trained deep watermarking, the default choices in StabilityAI's Stable Diffusion repository.

    Adaptive attacks against watermarks

    • Lukas et al. (2022): the authors cite it as showing that adaptive attackers can break the robustness of image classifier watermarks, but the attacks must be manually constructed per method and do not scale; this paper instead uses optimization methods to automatically find attack parameters.
    • Jiang et al. (2023): proposes an attack that indirectly obtains the secret key by accessing the provider's VERIFY method; the paper notes that this paper's attack does not require access to the secret key, and the two have different threat models and are orthogonal. Jiang et al. also propose two-tailed detection, which this paper evaluates as a comparison in Appendix A.7.

    Other lines of watermarking research

    • Peng et al. (2023), Cui et al. (2023): black-box watermarking for intellectual property protection of diffusion models; the paper states that this paper focuses on no-box verifiable watermarking for controlling misuse.
    • Lukas & Kerschbaum (2023), Yu et al. (2020; 2021): watermarking methods for GANs; the paper notes that this paper focuses on the pretrained Stable Diffusion model, which has higher output diversity and quality.

    Baselines and benchmarks: the non-adaptive attack baselines follow Wen et al. (2023): Blurring, JPEG Compression, Cropping, Gaussian noise, Jittering, Quantization, Rotation; evaluation images are taken from the MS-COCO-2017 training set.

    The authors position this paper as upgrading the idea of the manual adaptive attacks of Lukas et al. (2022) into a general optimization framework, so that robustness testing only requires specifying a learnable attack type and then optimizing the objective function.

  3. How does the paper address this problem?

    Write the attack as an optimization objective taking expectations over the key and message, use a surrogate generator to produce a differentiable surrogate key, then optimize two types of learnable attacks.

    Overall approach: formalize the adaptive attack as an optimization problem, where the attacker locally uses an open-source surrogate generator to replicate a differentiable surrogate watermark key, and then uses gradient optimization of the attack parameters so that the perturbed image both fails watermark verification and maintains perceptual quality.

    Problem formalization

    • The watermarking method defines three processes: K EY G EN generates the key τ, E MBED embeds the watermark into the generator, and V ERIFY extracts the message from the image and returns a p-value; p < 0.01 is judged as the watermark being retained (following Wen et al., 2023).
    • The attacker's objective (Equation 2): maxθA 𝔼τ′ ← K EYGEN(θG), m ∈ M[V ERIFY(A(GW), τ′, m) + Q(A(GW), GW)], i.e., simultaneously maximize the verification failure probability and the perceptual similarity Q before and after the attack over all possible key-message pairs.
    • Two obstacles: the attacker has only imperfect information (the surrogate generator must be used in place of the provider's model, the key distribution differs, and the attack must transfer); the verification process may be non-differentiable.

    Differentiable surrogate key (GK EY G EN)

    • Algorithm 1: use the surrogate generator to generate a surrogate key τ, embed a random message, generate an image, train an extraction network θD to predict the message, and use Adam to minimize the L1 distance between messages; θD is the differentiable surrogate key.
    • GK EY G EN is called only for the non-differentiable DWT and DWT-SVD, training a ResNet-50 decoder; the keys of TRW, WDM, and RivaGAN are themselves differentiable decoder parameters or frequency-domain coefficients and do not require GK EY G EN (Appendix A.3).
    • The authors report an empirical finding: only a single surrogate key needs to be generated to find an effective attack, without multiple calls.

    Two learnable attacks

    • Adversarial Noising (Algorithm 2): given a perturbation budget ϵ (L∞ norm), extract the initial message m with the surrogate key, iteratively optimize an additive perturbation to maximize the distance from m, and project back into the ϵ ball.
    • Adversarial Compression (Algorithm 3): fine-tune a pretrained autoencoder (a detachable component bundled with the surrogate Stable Diffusion), simultaneously minimizing the LPIPS quality loss and maximizing, with strength α, the distance between the extracted message and the embedded message; the parameters need to be optimized only once and can be reused, and r compressions are performed at attack time.

    Success criterion and evaluation method

    • Attack success: the verification process cannot detect the watermark on a high-quality image (p ≥ 0.01), and quality is measured by the LPIPS perceptual distance between the images before and after the attack.
    • The detection metric is TPR@1%FPR; FID and CLIP scores are additionally used to measure changes in generation quality; the statistical tests for verification (binomial distribution for bit matching, non-central χ² for TRW) are given in Appendix A.2.
    • The authors note that the attacker optimizes an approximation of Equation (2), that there is a generalization gap from the surrogate model to the real model, and that the attacker cannot itself check the effectiveness after transfer.
  4. What experiments did the paper conduct?

    Attacking five watermarks on Stable Diffusion: adaptive attacks reduce TPR@1%FPR to 6.3% or lower for all methods, while non-adaptive attacks are ineffective.

    Experimental setup

    • Targets: five watermarking methods TRW, WDM, DWT, DWT-SVD, RivaGAN, deployed on Stable Diffusion-v2.0 (trained for 1.4m steps); the attacker's surrogate generator is the weaker Stable Diffusion-v1.1 (431k steps).
    • Generation configuration: DPM solver, 20-step inference, guidance scale 7.5; 3 independent keys are randomly generated for each watermark, and reported values are the mean of three runs.
    • Baselines: seven non-adaptive attacks (Blurring, JPEG Compression, Cropping, Gaussian noise, Jittering, Quantization, Rotation), following Wen et al. (2023).
    • Metrics: TPR@1%FPR (1k images), FID and CLIP score (5k images, MS-COCO-2017 training set), LPIPS perceptual distance; watermark retention decision threshold p < 0.01.
    • Hardware: NVIDIA A100 GPU.

    Main results

    Table 1 summarizes the Pareto-optimal attacks when detection accuracy is below 10% (taken from Figure 2):

    Swipe horizontally to read the table

    WatermarkBest attackParametersLPIPS⇓TPR@1%FPR⇓
    TRWAdv. Noisingϵ=2/2553.2e-25.2%
    WDMCompressionr=15.6e-22.0%
    DWTCompressionr=17.7e-20.8%
    DWT-SVDCompressionr=17.5e-21.9%
    RivaGANCompressionr=17.3e-26.3%

    (According to Table 1; target model is Stable Diffusion-v2.0, surrogate is v1.1)

    • The authors state that only adaptive attacks can simultaneously evade detection and maintain image quality, and that non-adaptive attacks cannot effectively remove watermarks (Figure 2).
    • The authors state that adversarial compression is effective against all five methods; TRW with ϵ=2/255 adversarial noising gives better quality.
    • The abstract states that the optimization is efficient, reducing detection accuracy to 6.3% or lower within 1 GPU hour; Appendix A.6 gives the breakdown of time: RivaGAN/WDM surrogate keys each about 4 GPU hours, noising less than 1 second per sample, compression tuning less than 10 minutes.

    Image quality after attack

    • What was measured: the visual quality of attacked images and changes in FID/CLIP.
    • Results: in Appendix Table 2, FID and CLIP scores are essentially unchanged after watermark embedding and the two attacks (e.g., no watermark 23.48/31.77, after DWT attack 23.16/32.17); the authors state the changes are not statistically significant. Figure 3 shows that the compression attack introduces no visible artifacts, while noising introduces visible noise.
    • Exception: adversarial noising cannot remove WDM and RivaGAN at ϵ ≤ 10/255, and the corresponding cells in Table 2 are N/A.

    Robustness comparison with two-tailed detection (Appendix A.7)

    • What was measured: implementing the two-tailed detection of Jiang et al. (2023) and re-measuring TPR@1%FPR on the same images as Figure 4 (TRW is a non-bit watermark and was not measured).
    • Results: two-tailed detection improves the robustness of DWT and DWT-SVD against adversarial noising (e.g., DWT at ϵ=10/255: one-tailed 0.0%, two-tailed 57.3%); adversarial compression remains effective against all (2.0%/1.8%, 0.8%/0.5%, 1.9%/2.5%, 6.3%/5.7%, Table 3).
    • Authors' interpretation: a real attacker would always choose adversarial compression.

    Other ablations and analyses

    • ϵ budget (Figure 4 left): TRW and DWT-SVD are highly sensitive to adversarial noising, while RivaGAN and WDM are clearly more noise-resistant.
    • Number of compressions (Figure 4 right): without optimizing parameters, compression is effective only against DWT; after optimization, a single compression is effective against all methods.
    • Authors' explanation of the ϵ ablation: they believe RivaGAN and WDM have more thorough key randomization, and a single surrogate key attack is limited in effect unless the channels overlap.
  5. What are some points that can be further explored?

    The limitations listed by the authors are that the attack relies on the algorithm being public and on an open-source surrogate model; the experiments cover only one pair of Stable Diffusion versions and two types of learnable attacks.

    Limitations and future directions noted by the authors

    • Depends on algorithm and surrogate model availability (Section 6 Limitations): the attack depends on the watermarking algorithm being public and an open-source surrogate generator; the authors state that Google has not disclosed its generator, and providers such as Midjourney that do not disclose their algorithms can completely prevent such adaptive attacks.
    • Impact of the gap between surrogate and real model remains to be studied (Section 6 Attack Scalability): the authors state that more research is needed to evaluate whether the attack remains effective when (i) different models are used and (ii) the attacker's knowledge of the method's public parameters is limited; this paper only uses one pair of public checkpoints with the largest quality difference (SD v1.1 and v2.0) for best-effort validation.
    • Does not cover more learnable attack types (Section 6 Types of Learnable Attacks): the study does not extend to inpainting or stronger image editing methods, which the authors believe could further enhance the attack.
    • Key randomization issue (Section 6 Attack Scalability): a single surrogate key suffices to bypass verification, which the authors believe indicates a design flaw—if KEYGEN were sufficiently randomized, a single-key attack should not succeed.
    • Advice for defenders (Section 6 Enhancing Robustness): the authors believe future watermarking methods should use this paper's attacks for robustness evaluation, and hope that incorporating these attacks will enhance robustness.

    Experimental coverage

    • The watermarking methods evaluated are 5 in total: TRW, WDM, DWT, DWT-SVD, RivaGAN, all deployed on Stable Diffusion-v2.0; only one surrogate model, Stable Diffusion-v1.1, is used.
    • Each watermark is repeated with 3 independent keys and averaged; TPR@1%FPR uses 1k images, FID/CLIP use 5k MS-COCO-2017 training set images.
    • The defense-side evaluation covers only one variant, the two-tailed detection of Jiang et al. (2023) (Appendix A.7), and this evaluation was not performed for TRW.
    • The paper does not report defense experiments against adaptive attackers (who know the defender has adopted such attacks), nor does it report human quality evaluation.
    • Because retraining from scratch is too costly, WDM is evaluated as a post-generation processor (Section 2.2), differing from the original paper's setting.
  6. Summarize the main content of the paper

    Turning adaptive attacks on image watermarking into an optimizable problem, the authors claim that five Stable Diffusion watermarks can all be bypassed without noticeable quality loss.

    An attack paper on robustness evaluation of image watermarking, published at ICLR 2024, with authors from the University of Waterloo.

    • Problem: Watermarks are used to mark AI-generated images to curb deepfake abuse, and their security depends on robustness, but existing methods only use a limited set of known attacks for empirical testing and cannot determine whether an adaptive attack is optimal.
    • Method: The attack is formalized as an optimization objective that takes the expectation over all key-message pairs (Equation 2); the attacker uses an open-source surrogate generator to locally generate a differentiable surrogate key (GK EY G EN, required only for DWT/DWT-SVD), and then optimizes two learnable attacks—adversarial noising within an L∞ budget and adversarial compression by fine-tuning a pretrained autoencoder.
    • Main results: On Stable Diffusion-v2.0 (surrogate is v1.1), the TPR@1%FPR of five watermarks TRW, WDM, DWT, DWT-SVD, and RivaGAN are reduced to 5.2%, 2.0%, 0.8%, 1.9%, and 6.3%, respectively (Table 1), with LPIPS distances from 3.2e-2 to 7.7e-2; FID and CLIP scores are essentially unchanged before and after the attack (Appendix Table 2).
    • Other findings: Seven non-adaptive attacks are all ineffective; after optimization, adversarial compression is effective against all five methods with a single compression, and remains effective under two-tailed detection (Table 3); adversarial noising is ineffective against WDM and RivaGAN when ϵ ≤ 10/255.
    • Authors' conclusion: The authors state that a single surrogate key being sufficient to bypass verification indicates a design flaw, and argue that future watermarking methods must use such adaptive, learnable attacks for robustness evaluation; the authors acknowledge that the attack relies on the algorithm being public and on an open-source surrogate model, and that providers who do not disclose their algorithms can prevent this attack.

Related papers

Show 1 more papers
Read originalarxiv.org