A Slightly Robust Image Watermark Against Diffusion Model EditingA Somewhat Robust Image Watermark against Diffusion-based Editing Models
The authors propose RIW, which uses PGD to embed an invisible text watermark in the latent space of the editing model; the authors report an extraction accuracy of 96.0% after editing, versus 0% for traditional methods.
The defender Bob embeds an invisible watermark before the image is published; the attacker Alice uses the editing model Edit and prompt p to make small edits to the image. Bob has some knowledge of the editing model but does not know the details and cannot modify it, nor does he know Alice's prompt; the game is played under a black-box setting (Alice does not know the details of Inj and Ext), and the experiments assume white-box access to older editing models.
- Diffusion-model-based image editing tools can modify images with high fidelity, raising issues of copyright infringement and malicious editing; the authors state that traditional digital watermarking and AutoEncoder watermarking cannot be extracted after editing, and that an invisible watermark that remains extractable after editing is needed.
- Proposes RIW: watermarking is formulated as a per-image optimization problem, using PGD to optimize the perturbation so that the watermarked image preserves both the semantics of the original image and those of the watermark in the latent space of the editing model's encoder; the watermark uses text on a black background, cut into 9 blocks and embedded, and the extraction side uses MPRNet for reconstruction plus OCR recognition.
- Evaluated on LAION-Aesthetics and TEdBench with Instructpix2pix and Imagic as editing models: the authors report that the extraction accuracy of text watermarking after editing is at most 96.0% (Instructpix2pix) and 90.4% (Imagic), versus 0% for traditional methods; a binary classifier cannot distinguish whether an image carries a watermark (accuracy 0.501).
- The authors state that the method does not defend against adaptive editing attacks or reconstruction attacks based on generative models, and that it requires information from the editing model's encoder (the experiments assume white-box access to older models); generating high-quality watermarks under a fully black-box setting remains difficult; the evaluation covers only two editing models and two datasets, and editing is limited to small modifications.
- Evaluated models
- Instructpix2pixImagic
- Benchmarks
- LAION-Aesthetics (extended)TEdBench
- Metrics
- DletterDwordDallAUCextraction accuracy
The paper proposes an invisible image watermarking method called RIW, which uses adversarial example techniques to still extract the watermark after diffusion-model-based image editing, with an extraction accuracy of 96%. The authors claim it is the first to formalize and address the image copyright and malicious editing problems brought by diffusion model editing, and note that traditional image watermarking has an extraction accuracy of 0% in this scenario. The RIW code has been made public on GitHub.
Paper analysis
What problem does this paper attempt to solve?
The authors state that this is the first work to formalize and solve the image copyright problem under diffusion editing models: making an invisible watermark still extractable after editing.
Core problem: Diffusion-model-based image editing models bring risks of image copyright infringement and malicious editing; the authors want image owners to still be able to claim ownership via watermark after their images are edited.
- Scenario and motivation: The authors state that DM editing models such as Instructpix2pix and Imagic produce realistic edits and can be used to modify artworks without authorization and spread misleading content; owners need to prove, on the edited image, that it originates from the original image.
- Shortcomings of existing methods: After evaluation, the authors state that digital watermarks [10], [49] and AutoEncoder watermarks [60], [64] are completely destroyed after editing by editing models, with extraction accuracy of 0%; even with adversarial training or fine-tuning of the decoder, the authors report it remains 0% (Section 6.1).
- Core observation: Editing models usually modify only the semantics specified by the instruction and preserve the remaining semantic information; the authors exploit the "mixup" effect so that the watermarked image carries both the semantics of the original image and the watermark in the editing model's latent space, causing the watermark to be preserved through editing.
- Paper proposes: RIW (Robust Invisible Watermarking), which formalizes watermarking as a per-image optimization problem solved with PGD; and gives an Alice–Bob game formalization (Figure 2). The authors state this is the first work to formalize and solve this problem.
- Threat model:
- Defender (Bob): Embeds an invisible watermark before the image is published, and later extracts the watermark from the edited image to claim ownership.
- Attacker (Alice): Edits the image using the editing model Edit and a text prompt p; the paper restricts editing to style or minor modifications, and the authors consider that overly large changes no longer constitute an IP problem.
- Knowledge setting: Bob has high-level knowledge of the editing model but does not know its details, cannot modify it, and does not know the prompt used by Alice; the game is conducted under a black-box setting (Alice does not know the details of Inj/Ext), and the experiments assume white-box access to an older version of the editing model.
- Scope limitation: The authors explicitly do not defend against adaptive editing attacks or image reconstruction attacks based on generative models.
What related research exists?
Related work falls into two categories: protecting artworks from imitation, and preventing misuse of diffusion models; this paper is positioned as establishing ownership after editing.
Image editing techniques
- GAN-based editing: The authors mention GAN-based cross-domain translation and style transfer work (e.g., [21], [22], [30], [1], [24], [2]), as well as StyleGAN [25]; the paper points out that such models have limited editing functions and are less flexible than DM editing models.
- DM-based editing: Instructpix2pix [7] and Imagic [26] etc. edit images zero-shot with text instructions and are the evaluation targets of this paper.
Safeguarding Artworks
- GLAZE [48]: Adds noise to artworks so that Stable Diffusion, DALL·E-m, etc. cannot learn their style.
- MIST [29]: Injects noise into artworks via adversarial training so that style transfer does not yield high-quality images; Chen et al. [9] similarly add perturbations to interfere with editing.
Mitigating Misuse of DMs
- Training data/model watermarking: Zhao et al. [67] add watermarks to training samples using an AutoEncoder; Liu et al. [31] use prompts as triggers to verify model ownership.
- Diffusion process watermarking: [37], [58], [11] introduce watermarks directly into the diffusion process, among which Tree-Ring [58] embeds the watermark into the initial noise matrix, and the authors state it achieves promising results.
Baselines and benchmarks
- Baseline methods: Digital watermarks (frequency-domain tools, [10], [49]) and AutoEncoder watermarks [60], [64] (including enhanced versions with adversarial training and fine-tuning).
- Benchmarks/datasets: The extended LAION-Aesthetics (LAION-Aesthetics V2 6.5+, 625K image-text pairs) and TEdBench (100 pairs of input images and target texts).
Positioning of this paper: The authors state that the above work respectively prevents styles from being learned, prevents style transfer, or protects the model itself, whereas this paper focuses on detecting unauthorized modifications via watermarking after editing and establishing image ownership; the authors state this is the first work to formalize and solve the copyright problem for the editing model scenario.
How does the paper address this problem?
RIW formulates watermarking as per-image PGD optimization, so that the watermarked image preserves both the semantics of the original image and those of the watermark in the latent space of the editing model.
Overall approach: decouple watermark injection from extraction; on the injection side, use RIW (Robust Invisible Watermarking) to perform per-image optimization so that the watermarked image preserves both the semantics of the original image and the watermark in the latent space of the editing model's encoder; on the extraction side, read the watermark at the semantic level (text recognition) rather than at the pixel level.
Problem formulation
- Editing model abstraction: xe = D[E(x), C(p)], i.e., encoder E maps the image to the latent space, C(p) encodes the text instruction, and decoder D reconstructs the edited image.
- Two goals: invisibility (Alice cannot tell whether an image is watermarked) and extractability (Bob can extract the watermark after any small edit); formalized with the Alice–Bob game in Figure 2, where Bob wins if he guesses b correctly.
Injection: per-image optimization
- Core objective: argminx̂ |E(x̂) − E(x + α · w)|ℓ1 + λ[|x̂ − x|ℓ2 + |D(E(x̂)) − x|ℓ2]. The first term brings the latent representation of the watermarked image close to the latent representation of "the original image with an α-strength watermark superimposed"; the second term ensures that both the watermarked image and its reconstruction through D are close to the original image, which the authors use in place of LPIPS as the post-edit invisibility constraint.
- Solution method: PGD (Algorithm 1), where each step updates by the gradient sign times step size µ and constrains the total perturbation relative to the original image within an ℓ1 bound of ε; the evaluation setting is ε = 12/255, µ = 2/255, with 400 optimization steps.
- Key design: the encoder/decoder borrow E and D from Stable Diffusion (using sd-v1-4.ckpt); the authors state that the method does not depend on having exactly the same encoder as the editing model, but on transferability between models.
Extraction: semantic-level "divide and conquer"
- Text watermark: use a black-background, text-only image as the watermark (4 letters per block), crop the image into 9 blocks, and embed one watermark per block; the authors state that high-level semantics are more likely to survive editing.
- Extraction pipeline: first fine-tune MPRNet to reconstruct the low-resolution watermark blocks in the edited image, then use an OCR model to recognize the text; text recognized in any of the blocks can serve as proof of ownership.
- Control design: the baseline image watermark uses a CIFAR10 image superimposed in the bottom-right corner, discriminated by pixel distance or a binary classification model.
Relationship to the AutoEncoder approach
- Two flaws noted by the authors: existing AutoEncoder watermarks do not account for image editing; "one model for all edits" makes training hard to converge.
- The authors' attempted improvements: first add Gaussian noise to the objective for adversarial training, but the authors report that extraction from edited images still fails; then fine-tune the decoder on edited images, but the authors report that the training loss cannot fit and extraction accuracy remains 0%, prompting the shift to decoupled per-image optimization.
What experiments did the paper conduct?
The authors report that the extraction accuracy of RIW text watermarking after editing reaches 96.0% (Instructpix2pix), with the baseline at 0%, and that a binary classifier cannot detect it.
Experimental setup
- Editing models under test: two editing models of different paradigms, Instructpix2pix (using sd-v1.5.ckpt) and Imagic (using sd-v1-4-full-ema.ckpt); RIW optimization uses the encoder of sd-v1-4.ckpt.
- Datasets: an extended version of LAION-Aesthetics (LAION-Aesthetics V2 6.5+, 625K image-text pairs) and TEdBench (100 pairs of images and target texts; elsewhere in the main text, TEdBench is written as containing 50 images and 100 editing instructions).
- Baselines: frequency-domain digital watermarking tools; AutoEncoder watermarking (trained on 10,000 images + 5,000 three-letter text watermarks, about 7 hours, two NVIDIA A100s).
- Metrics: Dletter (all characters within a single block recognized correctly), Dword (at least one of the 9 blocks successfully recognized), Dall (average extraction rate over all sub-watermarks), plus ROC/AUC.
- Review/extraction method: MPRNet reconstruction (fine-tuned on 1,000 images each for Instructpix2pix and Imagic) + OCR recognition; editing instructions are converted between two prompt styles using the GPT-4 API.
- Sample sizes: baseline evaluation uses 100 images; invisibility testing uses 1,000 training + 1,000 test images; the paper does not report the number of repetitions.
Main results
Text watermark Dletter extraction accuracy (according to Figure 10 and the main text; α is watermark opacity, λ is the encoder loss weight):
Swipe horizontally to read the table
Dataset Editing model Condition Accuracy LAION-Aesthetics Instructpix2pix stable from α=102/255 96.0% LAION-Aesthetics Imagic stable from α=102/255 90.4% LAION-Aesthetics Instructpix2pix λ=1/2 or lower 97.9% LAION-Aesthetics Imagic λ=1/2 or lower 90.4% TEdBench Instructpix2pix α=51/255 92.4% TEdBench Imagic α=51/255 83.2% TEdBench Instructpix2pix λ=1/2 91.4% TEdBench Imagic λ=1/2 89.3% - Baseline comparison: after editing, the extraction accuracy of both digital watermarking and AutoEncoder watermarking (including adversarial training and fine-tuned versions) is 0% (Section 6.1).
- Authors' interpretation: the authors state that extraction rate rises with opacity and stabilizes after about 102/255, at which point the watermark is visually imperceptible in the edited image (Figure 11a); extraction remains possible at α as low as 15/255.
- Exception: on TEdBench, accuracy declines after α exceeds 102/255 (Figure 10g), which the authors suggest may be related to Ext being trained only on default-opacity watermarks; the authors also state that TEdBench is too small to train Ext, which is one reason for the lower accuracy on it.
Invisibility test
- What was measured: train a binary classification model to distinguish "watermarked and edited images" from "unwatermarked edited images" (1,000 training and 1,000 test images each, with α randomly drawn from [0.2, 1.0]).
- Result: test accuracy 0.501, AUC 0.47 (Figure 9); the authors state that the model cannot distinguish them.
- Authors' interpretation: the authors use this to support the invisibility of the watermark; they also report average false positive rates of 0%, 0%, and 25.5% for the three metrics under the no-watermark control.
Image watermark control
- Pixel comparison: at image watermark opacity α=1.0, AUC is only 0.58, lower than 0.85 for the text watermark at α=0.3 (Figure 6a, 6c, LAION-Aesthetics + Instructpix2pix).
- MPRNet reconstruction: after reconstruction, the average pixel distance of watermarked blocks from the original CIFAR image rises from 147.9 to 162.2, while unwatermarked blocks are 152.6 (Figure 7); the authors state that reliable detection cannot be based on this.
- Binary classifier: with or without MPRNet reconstruction, recognition accuracy is about 0.5 (Figure 8), which the authors state is equivalent to random guessing.
Other ablations and analyses
- Benefit of reconstruction (Table 3, low-clarity condition α=1/255, λ=5e4): on LAION-Aesthetics + Instructpix2pix, w/o Rec→w/ Rec is 49.6%→54.3% (α) and 50.6%→55.7% (λ); on TEdBench + Instructpix2pix, reconstruction gives no improvement (49.2%→49.2%, 45.2%→45.2%).
- Protection boundary (Table 4, top 5% of images by semantic/visual distance): for Instructpix2pix at a semantic distance threshold of 0.44, Dletter drops to 0.21% and Dall drops to 2.73%; for Imagic at a semantic distance threshold of 0.30, Dletter drops to 0.06% and Dall drops to 0.07%. The authors state that the watermark is hard to extract when the edit magnitude is large, but whether the image still involves IP at that point is questionable.
- Time cost (Table 2): per-image watermarking time is 0.85 s for digital watermarking, 0.42 s for AutoEncoder (excluding training), and 95.03 s for RIW (400 optimization steps, no training required).
- ROC stability (Figure 6b, 6c, Instructpix2pix, Dletter): AUC 0.93 at λ=1/8, AUC 0.85 at α=0.3.
What are some points that can be further explored?
Limitations listed by the authors: does not defend against adaptive attacks and relies on knowledge of the editing model's encoder; the experiments cover only two editing models and two datasets.
Limitations and future directions noted by the authors
- Does not defend against adaptive attacks: The authors state that the goal is not to defend against adaptive modifications; adaptive editing attacks [32] or image reconstruction based on generative models [66] may remove the watermark, which is left for future work (Section 3.2.2, 4.4).
- Relies on knowledge of the editing model: The method requires information from the latent space of diffusion models; the experiments assume white-box access to older editing models and rely on transferability between models; the authors state that generating high-quality watermarks in a fully black-box setting remains a challenge (Section 4.4).
- Stronger attacker models: The authors acknowledge that Bob needing to know the editing model is a research limitation, and leave stronger scenarios such as Alice knowing Inj/Ext and adaptively selecting prompts for future work (Section 3.2.1).
- Editing magnitude and IP boundaries: Determining how large a modification still constitutes infringement is a broader question beyond the scope of this paper (Section 3.2.2).
- Parameter tuning: The authors state that appropriately adjusting λ may improve watermark quality, which will be explored in future work (Section 5).
Scope of experiments
- Editing models tested: 2 in total, Instructpix2pix and Imagic, both based on the Stable Diffusion family (sd-v1.5.ckpt and sd-v1-4-full-ema.ckpt).
- Datasets: 2 in total, the extended LAION-Aesthetics and TEdBench; on TEdBench, Ext was not trained separately, and only the extractor trained on LAION-Aesthetics was used.
- Editing types: The experiments restrict text prompts to making only small modifications to images (Section 3.2.2).
- Sample sizes: 100 images per group in the baseline comparison; 1,000 training + 1,000 test for the invisibility test; 1,000 images per model for MPRNet fine-tuning.
- Not reported in the paper: The number of experimental repetitions and variance, human evaluation, and computational cost details beyond the specific iteration budget used for RIW optimization (only 95.03 s per image and 400 steps are given).
Summarize the main content of the paper
RIW embeds a text watermark in the editing model's latent space using PGD; the authors report an extraction rate of 96.0% after editing, versus 0% for traditional methods.
A defense paper on image copyright protection under diffusion editing models, proposing an invisible watermarking method, RIW.
- Problem: The authors state that DM editing models can realistically modify images, raising copyright infringement and malicious editing; the extraction accuracy of traditional digital watermarking and AutoEncoder watermarking after editing is 0%, and remains 0% even with adversarial training or fine-tuning.
- Method: Watermarking is formalized as per-image optimization, using PGD to optimize for 400 steps within a perturbation bound of ε=12/255, so that the watermarked image preserves both the semantics of the original image and those of the watermark in the latent space of the Stable Diffusion encoder; the watermark is text on a black background, cropped into 9 blocks and embedded, and the extraction side uses MPRNet for reconstruction plus OCR recognition.
- Main results: Dletter extraction accuracy after editing on LAION-Aesthetics is 96.0% for Instructpix2pix and 90.4% for Imagic (stable from α=102/255); on TEdBench they are 92.4% and 83.2%, respectively (α=51/255).
- Invisibility: The test accuracy of a binary classifier in distinguishing watermarked from non-watermarked images is 0.501, with AUC 0.47; the authors state that the watermark is undetectable.
- Boundary: On the top 5% of images with the largest semantic/visual distance, Dletter drops to 0.21% (Instructpix2pix) and 0.06% (Imagic); the authors state that the watermark is difficult to preserve when the editing magnitude is large.
- Authors' conclusion: The authors state that RIW solves the problems of image copyright and deceptive editing under the editing model framework; they also acknowledge that it does not defend against adaptive attacks or generative-model reconstruction attacks, and that it relies on knowledge of the editing model's encoder, leaving fully black-box scenarios for future work.