NWaaS: Nonintrusive Watermarking as a Service for X-to-Image DNN

Haonan An, Guang Hua, Yu Guo, Hangcheng Cao, Susanto Rahardja, Yuguang Fang

This paper introduces NWaaS (Nonintrusive Watermarking as a Service), a paradigm shift in protecting the intellectual property (IP) of generative AI models. Unlike traditional methods that modify a model's weights or behavior, the authors propose ShadowMark, a framework that extracts owner-defined watermarks from model outputs without changing a single parameter of the original model, ensuring "absolute fidelity."

TL;DR

ShadowMark provides a "trustless" way to watermark image-generation models by establishing a nonintrusive side channel in the model's API. It allows model owners to verify ownership and detect model theft (surrogate models) with zero impact on the original model's performance or behavior.

What Problem Does This Paper Address?

Training state-of-the-art Deep Neural Networks (DNNs) is incredibly expensive. To protect this investment, researchers use "watermarking"—embedding a hidden signal into the model to prove ownership. However, existing methods (white-box, black-box, and box-free) are intrusive. They require fine-tuning the model to "bake in" the watermark, which leads to three major issues:

  1. Fidelity Loss: Modifying weights often degrades the quality of the model's output.
  2. Unpredictable Behavior: In large models, even tiny changes can cause unexpected shifts in how the AI responds to prompts.
  3. Trust Issues: In a "Watermarking as a Service" (WaaS) model, owners must hand over their proprietary models to a third party to embed the watermark, creating a massive security risk.

The authors aim to break the "fidelity-robustness trade-off" by creating a system where the model remains a "frozen" black box.

Methods

The authors introduce ShadowMark, which treats the model ($M_\theta$) as an immutable component. Instead of changing the model, they build a "wrapper" around its API consisting of two trainable components:

  • Key Encoder ($G_\gamma$): This takes a secret, owner-defined key ($k$) and transforms it into a specific "trigger" input (often looking like abstract noise) that is fed into the model.
  • Watermark Decoder ($D_\delta$): This takes the model's output resulting from that trigger and decodes it back into the owner's original watermark image ($m$).

The Training Process: The system is trained using a multi-part loss function:

  1. Correct Key Loss: Ensures that the specific key $k$ successfully extracts the watermark $m$.
  2. Wrong Key Loss: Ensures that any other key $\tilde{k}$ produces only meaningless noise, preventing brute-force attacks.
  3. Refining Loss: Ensures the decoder can distinguish between these "trigger" queries and normal user queries, maintaining the "side channel" nature of the system.

Datasets

The researchers validated ShadowMark across a wide array of tasks and architectures:

  • Image-to-Image (I2I): Used NYU Depth V2 (Dehazing), PASCAL VOC/WikiArt (Style Transfer), CelebA (Inpainting), and CDD-11 (Denoising).
  • Noise-to-Image (N2I): Used "Data-Free" digit generation (GANs).
  • Noise-and-Text-to-Image (NT2I): Used CGANs.
  • Text-to-Image (T2I): Used the popular Stable Diffusion model.

Key Insights and Ideas

  • Absolute Fidelity: This is the "aha moment." Because the model $M_\theta$ is never retrained or modified, its performance on standard tasks remains exactly 100% of its original state.
  • The Side Channel Concept: The watermark isn't in the model; it's in the relationship between a specific input and the model's unique, complex response to that input. ShadowMark simply learns to "read" that unique signature.
  • Transferability to Stolen Models: Surprisingly, if an attacker "steals" the model by training a surrogate model to mimic the original's outputs, the watermark often persists. The surrogate model inadvertently learns the original model's specific response to the trigger.
  • Trustless Deployment: Since the model isn't modified, the owner doesn't need to trust a third-party service with their weights. They can deploy the ShadowMark wrapper themselves.

Key Results

  • Verification Accuracy: For the original models, the Normalized Cross-Correlation (NCC) — a measure of how well the extracted watermark matches the original — was > 0.99 in 15 out of 16 experiments (where 1.0 is a perfect match).
  • Robustness to Theft: In 10 out of 12 successful model-stealing attacks, the watermark was still detectable in the "stolen" surrogate model using a new metric called NCCD (NCC Difference).
  • Security: The system proved immune to brute-force "ambiguity attacks." Even after 1 million random guesses, the success rate for an attacker finding a working key was zero.

Limitations and Future Work

  • API Control: ShadowMark requires the model owner to control the API gateway to implement the key encoder and decoder. If an attacker gains access to the raw model weights and deploys it on their own server without the wrapper, the "side channel" is bypassed.
  • Sensitivity to Watermark Choice: The authors noted that in some surrogate model tests, the specific image used as a watermark affected detection strength, suggesting that some watermarks are "stickier" than others during model stealing.
  • Expansion: While highly effective for X-to-Image models, future work could explore if this nonintrusive approach works for Large Language Models (LLMs) or audio generation.

Summary updated

BibTeX
@misc{an2025nwaas,
  author = {Haonan An and Guang Hua and Yu Guo and Hangcheng Cao and Susanto Rahardja and Yuguang Fang},
  title = {{NWaaS: Nonintrusive Watermarking as a Service for X-to-Image DNN}},
  year = {2025},
  eprint = {2507.18036},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.18036},
}
Figure