Abstract
Protecting the intellectual property (IP) of generative AI and image-to-image models is increasingly critical as these technologies gain commercial value. While box-free watermarking offers a solution by embedding invisible marks in model outputs, it remains vulnerable to sophisticated gradient-based removal attacks. This paper introduces the Decoder Gradient Shield (DGS), a defensive layer integrated into the watermark decoder API. DGS strategically reorients and rescales the gradients returned by the decoder, effectively poisoning the learning process of an attacker's removal network. By using a closed-form mathematical transformation, DGS thwarts removal attempts while maintaining high image fidelity and minimal computational overhead, providing a provable defense against black-box gradient estimation.
What Problem Does This Paper Address?
As image-to-image models for tasks like style transfer or restoration become commercially valuable, protecting their IP is essential. Box-free watermarking embeds an invisible mark that a separate decoder can extract to prove ownership. However, the authors identify a major vulnerability: if an attacker has black-box access to the decoder API, they can use it as a "teacher" to train a "removal network." By observing how the decoder reacts to small image perturbations—effectively estimating gradients—the attacker learns to strip the watermark without degrading image quality. Current defenses often focus on making encoders more robust, but they leave this "gradient leak" in the decoder wide open.
Methods
The Decoder Gradient Shield (DGS) is integrated directly into the watermark decoder’s API to prevent this gradient leak. It functions as a defensive adversarial layer that "attacks" the attacker's loss function to prevent convergence.
Gradient Reorientation and Rescaling
When the API receives a query, DGS checks for a watermark. If present, it returns a "shielded" output $Z^*$ instead of the standard output $Z$. This is achieved via a closed-form solution:
$$Z^* = -PZ + (P+I)W$$
where $P$ is a secret positive definite matrix and $W$ is the target watermark. This transformation ensures the resulting gradient is flipped or rotated by 90 to 180 degrees, leading the attacker's optimization astray. Furthermore, by adjusting the eigenvalues of $P$, the defender can shrink the gradient magnitude, rendering the attacker's training process computationally expensive and inefficient.
High Fidelity
Because the perturbation is applied to the extracted watermark (usually a small, simple image) rather than the primary generated content, the impact on the end-user's experience is negligible. This allows for strong protection without sacrificing the visual quality of the model's output.
Key Results
The authors evaluated DGS on the PASCAL VOC dataset (12,000 images) across two distinct tasks: Image Deraining (low-level vision) and Style Transfer (high-level vision).
- Attack Prevention: In the absence of DGS, an attacker's removal loss quickly drops to near zero ($10^{-8}$), indicating successful removal. With DGS active, the loss remains high and fails to converge.
- Robustness: DGS maintained a 100% defense success rate against common image processing attacks, including JPEG compression (up to 40% factor), white noise, and "lattice attacks."
- Efficiency: As a closed-form mathematical solution, DGS is computationally cheap, adding virtually no latency ($10^{-4}$ to $10^{-5}$ seconds) to the API.
- Anti-Flipping: Even if the attacker suspects a shield and tries to "flip" the gradients back, DGS remains effective as long as the gradient rotation is kept between 90 and 180 degrees.
Conclusion
DGS provides a robust, efficient defense against gradient-based watermark removal by "poisoning" the attacker's loss function. By framing the problem as a student-teacher interaction and misleading the "student" (the removal network), DGS secures model IP without compromising output quality. While future work may explore even more complex matrices to prevent reverse-engineering of $P$, DGS currently provides a high-fidelity, computationally efficient barrier against gradient-based watermark removal.
Summary updated