Embedding Watermarks into Deep Neural Networks

Yusuke Uchida, Yuki Nagai, Shigeyuki Sakazawa, Shin'ichi SatohICMR 2017

Abstract

Significant progress has been made with deep neural networks recently. Sharing trained models of deep neural networks has been a very important in the rapid progress of research and development of these systems. At the same time, it is necessary to protect the rights to shared trained models. To this end, we propose to use digital watermarking technology to protect intellectual property and detect intellectual property infringement in the use of trained models. First, we formulate a new problem: embedding watermarks into deep neural networks. Second, we propose a general framework for embedding a watermark in model parameters, using a parameter regularizer. Our approach does not impair the performance of networks into which a watermark is placed because the watermark is embedded while training the host network. Finally, we perform comprehensive experiments to reveal the potential of watermarking deep neural networks as the basis of this new research effort. We show that our framework can embed a watermark during the training of a deep neural network from scratch, and during fine-tuning and distilling, without impairing its performance. The embedded watermark does not disappear even after fine-tuning or parameter pruning; the watermark remains complete even after 65% of parameters are pruned.

Introduction

Training state-of-the-art deep learning models is an expensive endeavor, often requiring weeks of computation on high-end GPUs and massive, proprietary datasets. As these trained models become valuable assets—shared in "Model Zoos" or sold as part of AI services—they become targets for intellectual property (IP) infringement. Once a model is shared, it is easy for an unauthorized party to use or redistribute it. Traditional watermarking techniques designed for media like images or video do not apply directly to the "black box" of neural network weights. This paper introduces a novel framework for protecting the IP of deep neural networks (DNNs) by embedding digital watermarks directly into their parameters.

Proposed Watermarking Framework

The proposed framework treats the watermark as a constraint during the training process, leveraging the inherent over-parameterization of DNNs.

Embedding Mechanism

The watermark is defined as a $T$-bit vector $b \in \{0, 1\}^T$. To embed this signature, the authors introduce a secret key in the form of an embedding parameter matrix $X$. During training, a custom "watermark loss" term $E_R(w)$ is added to the original task loss $E_0(w)$:

$$E(w) = E_0(w) + \lambda E_R(w)$$

The term $E_R(w)$ is a binary cross-entropy loss that forces the projection of the weights ($Xw$) to match the desired watermark bits $b$. This ensures that the watermark is "baked into" the model's weights during the optimization process.

Extraction and Verification

To verify ownership, the model owner uses the secret key $X$ to project the weights $w$ of a specific layer. By applying a step function to the result, the owner can extract the bit-string. If the extracted bits match the original signature $b$, ownership is proven.

Experimental Evaluation

The framework was evaluated using standard image classification benchmarks, including CIFAR-10 and Caltech-101.

Performance Impact

A critical requirement for any watermarking scheme is that it must not degrade the performance of the host model. Experiments on CIFAR-10 demonstrate that watermarked models achieve nearly identical test errors compared to non-watermarked baselines.

Training loss and test error for various embedding methods compared to a non-embedded baseline.

As shown in Figure 1, the training trajectories and final convergence points for models using different embedding matrices (direct, diff, and random) are virtually indistinguishable from the baseline, confirming that the regularizer does not interfere with the primary task.

Robustness to Attacks

The embedded watermarks exhibit remarkable resilience to common model modifications:

  • Parameter Pruning: The watermark remained 100% intact even after 65% of the model's parameters were pruned (set to zero).
  • Fine-tuning: In transfer learning scenarios, where a model pre-trained on CIFAR-10 was fine-tuned on Caltech-101, the original watermark could still be extracted with 0% bit error.

Stealth and Security

While embedding a watermark is useful, it should ideally be difficult for an adversary to detect or remove. The authors explored three types of embedding matrices ($X$): direct, diff, and random.

Weight distributions for different embedding methods. The random method (d) is the most stealthy.

The "direct" method maps bits to specific weights, which creates visible peaks in the weight distribution (Figure 5b). In contrast, using a random matrix $X$ diffuses the watermark across all parameters in a layer. This makes the watermarked weights statistically similar to standard weights (Figure 5d), providing a high degree of stealth against simple statistical analysis.

Conclusion and Future Work

This research establishes a robust foundation for DNN intellectual property protection. By exploiting the excess capacity of neural networks, watermarks can be embedded without performance loss and remain detectable after significant model compression or fine-tuning. Future work will address potential vulnerabilities, such as watermark overwriting by malicious parties and the development of more advanced steganalysis-resistant embedding techniques.

Summary updated

BibTeX
@inproceedings{uchida2017embedding,
  author = {Yusuke Uchida and Yuki Nagai and Shigeyuki Sakazawa and Shin'ichi Satoh},
  title = {{Embedding Watermarks into Deep Neural Networks}},
  booktitle = {ICMR},
  year = {2017},
  doi = {10.1145/3078971.3078974},
}
Figure