Deep neural network watermarking resistant to piracy attacksPiracy Resistant Watermarks for Deep Neural Networks
The authors propose a DNN ownership watermark based on null embedding, stating that it resists pirate watermark attacks on 6 classification tasks and remains verifiable after modifications such as fine-tuning and pruning.
The defender (model owner) embeds a watermark during initial training to prove ownership. The attacker's goals are corruption (destroying/removing the watermark), piracy (embedding their own watermark WA to simultaneously claim ownership), and takeover (replacing the original watermark). Assumptions: the watermarking process is public; the attacker is unwilling to sacrifice the model's normal classification function; the attacker has limited training data (5,000 images in the experiments, 2,000 records for SSCD/WISDM) and limited compute.
- DNN ownership watermarking needs to resist piracy attacks: a third party embeds its own "pirate watermark" into an already watermarked model to contest ownership. The authors state that existing watermark designs cannot resist such attacks.
- Proposes null embedding: during initial training, add a global optimization constraint determined by the watermark bit string, so that the normal classification rule depends on the watermark; then combine it with true embedding into dual embedding, and use RSA signatures and SHA256 to bind the watermark to the owner.
- On 6 classification tasks, the authors state that the piracy attack reduces NC from 87%–99% to 11%–36%, with pirate watermark only 5%–28%; the watermark's effect on NC averages −0.6%±1.5%, can be retained through transfer learning, and withstands fine-tuning, pruning, and three backdoor defenses.
- The authors note that the watermark can only be embedded during initial training and cannot be added to an already trained model, and that updating the watermark requires retraining from scratch; experiments were limited by compute and not validated on the largest models such as ImageNet (§10). The evaluation covers 6 classification tasks, and the piracy attacker's data is limited to 5,000/2,000 samples.
- Evaluated models
- MNIST (2 Conv + 2 Dense)YTFaces (DeepID)GTSRB (6 Conv + 3 Dense)CIFAR-10 (6 Conv + 3 Dense)SSCD (2 Conv + 2 Dense)WISDM (4 Conv + 3 Dense)
- Benchmarks
- MNISTYouTube Faces (YTFaces)GTSRBCIFAR-10SSCD (Synthetic Speech Command Dataset)WISDMLISA(迁移学习学生任务)
- Metrics
- Normal Classification Accuracy (NC)Watermark Classification Accuracy (WM = min(φtrue, φnull))pirate watermark accuracyanomaly index(Neural Cleanse)
The paper proposes null embedding, a deep neural network watermarking method that can only be embedded during the model's initial training and is resistant to piracy attacks. The authors observe that existing watermark designs cannot cope with piracy attacks, that is, a third party embeds its own pirated watermark into an already watermarked model and falsely claims ownership of the model, and that anti-piracy fundamentally conflicts with the current practice of embedding watermarks via incremental training. Null embedding uses a bit string as the watermark value and establishes a strong dependency between the model's normal classification accuracy and the watermark, so that attackers cannot remove the watermark through fine-tuning or incremental training, nor add a new pirated watermark to an already watermarked model. Experiments show that the method possesses watermarking properties such as anti-piracy on multiple types of tasks and models; the authors also explore various adaptive adversarial measures, and the watermark remains robust to fine-tuning, compression, and existing backdoor detection and removal methods, and the model retains the watermarking properties after transfer learning.
Paper analysis
What problem does this paper attempt to solve?
To address the problem that DNN ownership watermarks cannot resist "piracy watermark" attacks, the authors propose null embedding.
Core problem: existing DNN ownership watermarks cannot resist piracy attacks—a third party can embed its own "pirate watermark" into an already watermarked model, thereby claiming ownership of the model.
- Scenario and motivation: training large models is costly, and model owners hope to monetize through licensing, which requires a reliable ownership-proving tool; the authors argue that watermarks need to satisfy three properties—authentication, persistence, and piracy-resistance—and that existing designs lack the third.
- Shortcomings of existing methods: the authors reproduced two classification-type watermarks, [1] and [41], and successfully embedded pirate watermarks on MNIST, YTFaces, GTSRB, and CIFAR-10 within 1–10 epochs (Table 1); the authors state that weights-based watermarks [5,6,33] have been shown by [37] to be pirateable, and that the query-based DAWN [29] also cannot prevent an attacker from registering the mark first.
- Core observation: the authors believe the root cause of the difficulty in preventing piracy is that DNNs naturally support incremental training, whereas existing watermarks rely precisely on incremental training for embedding and isolate watermark behavior from normal classification behavior.
- Proposed approach: propose null embedding—a watermark that can only be embedded during initial training, turning the watermark bit string into a global constraint on the optimization of the normal classification rule, so that normal classification accuracy is strongly bound to the watermark; on this basis, build a complete watermarking system combined with public-key signatures.
Threat model (§3, terminology copied as-is):
- Attacker goals: corruption (destroy/remove the watermark W), piracy (embed one's own watermark WA to claim ownership in parallel), takeover (replace W with WA to fully seize ownership).
- Knowledge: the watermarking procedure is public, and the attacker attempts to claim ownership following the same procedure.
- Capability constraints: unwilling to sacrifice the model's normal classification function (an attack fails if it substantially degrades NC); limited training data and compute (otherwise they could just train a model themselves).
- Victim system: a DNN model Fθ trained by owner O and licensed to others.
What related research exists?
Related work falls into two categories—multimedia watermarking and DNN watermarking—with DNN watermarking divided into four branches by embedding method; the authors state that none of them possess piracy resistance.
Multimedia digital watermarking
- Survey [12] and image/video/audio watermarking (e.g., [34][3][27][31])—embedding a recoverable signal in a carrier via low-amplitude pseudorandom signals, transform-domain coefficients, and similar means. The paper describes these only as background.
Weights-based DNN watermarking
- [5,6,33]—adding a regularizer with a statistical bias during training to embed the watermark into the model weights. The paper states that [37] has shown such watermarks can be detected and overwritten for removal, and are susceptible to piracy attacks.
- [8]—adding a special "passport" layer for ownership verification. The paper points out that it relies on the secrecy of the passport layer weights, and that the paper's own results show an attacker can reverse-engineer valid weights, with no secure binding between the weights and the owner.
Query-based watermarking
- DAWN [29]—selectively mislabeling query responses of an online model so that a detectable "mark" is left in the model extraction output. The paper points out that it cannot prevent an attacker from inserting a mark afterward, and that if the attacker registers the mark before the owner, the piracy succeeds.
Classification-based watermarking (the direct comparison targets of this paper)
- [41]—injecting the watermark via a backdoor attack: a specific trigger causes inputs to be misclassified to a target label. The paper points out that it can be removed by existing backdoor defenses, and that there is no verifiable binding between the trigger and the owner's identity.
- [1]—training the watermark as a classification rule associated with a set of self-constructed abstract images, and using a commitment to prove ownership. The paper reproduces and tests [1] and [41] in §4, stating that both can be embedded with a pirate watermark on four tasks (Table 1); regarding [1]'s claim that "the original watermark is more resistant to fine-tuning than the pirate watermark," the authors' reproduction experiments show the opposite result (after fine-tuning, the pirate watermark's classification accuracy averages 82%±3%, while the original watermark drops to 57%±2%).
Baselines and benchmarks: the direct comparison baselines are the two watermark designs [1] and [41], compared on four tasks—MNIST, YTFaces, GTSRB, CIFAR-10—using the same piracy attack configuration (§4, §7.3).
The authors position this paper as: the first watermark to achieve piracy resistance by "generating with a constrained normal classification rule" rather than "isolating from normal classification" (the authors state that no existing work has addressed this property).
How does the paper address this problem?
Uses null embedding to turn the watermark into a global optimization constraint during initial training, then combines it with true embedding into dual embedding and binds it with public-key signatures.
Overall approach: rather than isolating the watermark from normal classification, null embedding is used during initial training to impose a constraint determined by the watermark bit string on the optimization space of the normal classification rule, strongly binding the two; embedding a new watermark would break normal classification, thereby rendering piracy attacks meaningless.
Null embedding (§5.1)
- Definition: given a filter pattern p (black/white pixel blocks on a gray background) and a large value λ (λ→∞), if for all inputs x we have Fθ(x ⊕ [p, λ]) = Fθ(x) = y, then p is said to be successfully null-embedded; that is, replacing the pixels specified by p with extreme values ±λ does not change the classification result.
- Mechanism: this constraint projects the model's effective input-loss space onto the subregion defined by p; different p correspond to different projections, and embedding a pirate p′ conflicts with the existing constraint.
- Two observations: Observation 1—when Np (the number of black/white pixels in p) is small, normal classification is unaffected; in the experiments Np can reach 10% of the input size, e.g., a 6×6 block on a 28×28 image causes only 0.1%–1.5% accuracy loss; Observation 2—a model already embedded with p cannot be null-embedded with p′ without greatly reducing NC (Figure 2: on MNIST, training from scratch to embed p′ requires 100k batches, whereas fine-tuning a watermarked model drives NC down to 10%, and reaching the same accuracy requires 10 times the training cost; with 1% of the data, even 1000k batches reach only half the accuracy).
Dual embedding (§5.2)
- Motivation: the authors found that verification relying solely on null embedding produces a small number of false positives (some input regions naturally have little effect on classification).
- Design: the true embedding uses the flipped pattern inv(p) (black and white pixels swapped, gray pixels unchanged), so that any input with the [inv(p), λ] trigger added is classified to the watermark label yW; the defining equation is Fθ(x ⊕ [inv(p), λ]) = yW ≠ y. The two share the same watermark and do not conflict, and together are called dual embedding, which must be performed simultaneously with model training.
- Difference from [41]: the trigger uses extreme values ±λ rather than small perturbations, which the authors state therefore does not produce the anomalous behavior of traditional backdoors.
Watermark generation and binding (§6.1)
- The owner signs a verifier string v (unique identifier + global timestamp) with an RSA private key to obtain sig, then uses four SHA256 hashes to deterministically derive from sig the bit patterns and positions of yW and p, and λ (λ=2000 in the implementation). The authors state that forging a watermark would require forging the signature or inverting the hash, which is computationally infeasible.
Training injection (§6.2)
- The objective function is the sum of three terms: normal classification loss + α·true embedding loss + β·null embedding loss, where α and β are injection rates; the owner trains from scratch, completing training and watermark injection simultaneously.
Verification (§6.3)
- Private verification: a trusted third party verifies the validity of the sig signature, then computes φnull and φtrue; if both exceed the threshold Twatermark (80% in the experiments), the watermark is judged to be present.
- Public verification: if the verifier is untrusted and the pattern may leak, an attacker can do a small amount of training to make min(φtrue, φnull) fall below the threshold (corruption attack); the authors' countermeasure is to embed multiple independent watermarks during initial training, submit only one, and reveal the hidden watermarks in case of dispute, and they state that experiments have verified that multiple watermarks can be embedded simultaneously without reducing accuracy.
What experiments did the paper conduct?
Validates piracy resistance, four basic properties, transfer learning, and multiple types of adaptive attacks on 6 classification tasks; the authors state all pass.
Experimental setup
- Tasks and models (Table 2): MNIST (2 Conv+2 Dense), YTFaces (DeepID, 1,283 classes), GTSRB (6 Conv+3 Dense), CIFAR-10 (6 Conv+3 Dense), SSCD speech recognition (2 Conv+2 Dense), WISDM human activity recognition (4 Conv+3 Dense).
- Watermark configuration: λ=2000; p is a 6×6 block for the first five tasks and a 3×3 block for WISDM; verification threshold Twatermark=80%; injection rates in Table 16 (e.g., MNIST ir=0.5, GTSRB ir=0.1).
- Attacker configuration: attackers for MNIST/YTFaces/GTSRB/CIFAR-10 have 5,000 training images, and 2,000 samples for SSCD/WISDM; the piracy attack uses 10 epochs (1 epoch for YTFaces), the same as the attack configuration against existing designs in §4.
- Metrics: NC (normal classification accuracy), WM = min(φtrue, φnull), with the true/null components and pirate watermark accuracy also reported separately.
- Sample size: 10 watermarked models and 50 random pirate watermarks per task, i.e., 500 post-attack instances per task, reporting mean and standard deviation.
- Comparison baselines: the reproduced two watermarks [1] and [41] (Table 1).
Main results
Piracy resistance (Figure 4, Table 15; post-attack values are for the 10 epoch/1 epoch configuration):
Swipe horizontally to read the table
Task Pre-attack NC Pre-attack WM Post-attack NC Post-attack owner WM Post-attack pirate WM MNIST 98.4±0.2 96.8±1.2 21.2±27.3 2.8±9.0 11.9±27.6 YTFaces 97.8±0.5 97.7±0.5 19.0±22.7 1.6±10.9 5.2±17.9 GTSRB 96.1±0.5 95.9±0.9 11.2±28.0 6.8±24.1 7.0±24.0 CIFAR-10 85.6±1.2 84.1±1.6 24.4±26.9 6.8±20.1 13.5±25.5 SSCD 97.9±0.2 97.7±0.4 34.5±35.1 10.3±25.4 27.8±38.9 WISDM 87.7±2.4 87.2±2.9 35.5±31.1 12.2±23.3 25.2±33.8 (According to Table 15, units %; the summary in the main text Figure 4b is NC dropping to 11%–36%, owner WM dropping to 2%–12%, and pirate WM averaging 5%–28%)
- The authors state that the piracy attack, while erasing traces of the original watermark, also destroys the model's normal classification capability, rendering the model worthless, which demonstrates the strong binding between the watermark and normal classification.
- After extending to 100 epochs (Figure 4c), NC and pirate WM remain low; the model remains unusable and the pirate watermark cannot pass verification.
- By contrast, under the same attack, [1] and [41] achieve pirate watermark accuracy of 93%–100% with NC essentially unchanged (Table 1).
Basic watermark properties (§7.4)
- Function preservation: Table 3 shows that embedding the watermark on the six tasks has an average effect on NC of −0.6%±1.5%; the true component is 100.0% in all cases, and the null component is 84.1%–97.7%.
- Effectiveness and non-trivial ownership: all 10 random watermarks are verifiable (WM all above the 80% threshold); testing 1000 random watermarks each on unwatermarked models, all verifications fail, with a false positive rate of 0%.
- Authentication: the authors state that, due to the use of SHA256 preimage resistance, a third party cannot forge the owner's watermark.
Transfer learning and adaptive attacks
- Transfer learning (§8): GTSRB→LISA traffic sign transfer. Student models of the watermarked teacher have NC comparable to the unwatermarked teacher (Table 5, e.g., 93.4±0.8 vs. 92.2±0.4 for full-layer fine-tuning); after the verifier "recovers" yW, WM is ≥92.9% under all four fine-tuning methods (Table 6), and the authors state that the watermark can be retained through transfer learning.
- Model modification (§9.1): after 50-epoch full-layer fine-tuning, NC and WM remain stable (Figure 6); under ascending-order neuron pruning, there is no pruning ratio at which NC is acceptable while the watermark is destroyed (Figure 7).
- Backdoor defenses (§9.2): Neural Cleanse's anomaly index on watermarked models is below the threshold of 2 in all cases (Table 7); the improved NeuralCleanse++ falsely flags 11 of 60 clean models, and among 60 watermarked models only 6 exceed the threshold and with the wrong target label; ABS does not detect the watermark in the 10 watermarked CIFAR-10 models; after Fine-Pruning (pruning 10%–70% of neurons then fine-tuning), WM and NC recover in tandem across tasks (Figure 8).
- Model extraction (§9.3): targeting GTSRB, using ImageNet data for Papernot-style extraction, 100k images (255% of the original training set) reach only 94.0% vs. 96.1% for the original model; end-to-end extraction takes about 9.52±1.89 times the time of training from scratch. The authors state that the extraction attack yields limited benefit to the attacker.
Other ablations and analyses
- Verification overhead: <5s for the full test set, about 1s for 1K samples (Table 4).
- Training overhead: the watermarked model reaches 95%–100% of the unwatermarked model's NC using 115% of the training time (Figure 5).
- MNIST piracy attack under smaller learning rates (1e-5, 1e-6): NC rises to 91%–95%, but pirate WM remains only 13%–19%, and owner WM stays at 85%–94% (§7.3 footnote).
- Tramèr-style extraction requires about 1275% of the original training data to approach the original model's accuracy (Table 18).
- Distillation attack [39]: on GTSRB, distillation with 12.8% of the data reaches 95.4%, but training from scratch on the same data already reaches 95.0%; the authors believe the distillation advantage comes from the comparison training set being too large.
What are some points that can be further explored?
The authors list limitations such as requiring embedding during initial training and not testing the largest models, and plan to extend domains and release the implementation.
Limitations and future directions noted by the authors
- The watermark must be embedded during initial training and cannot be repeated or removed; updating the watermark requires retraining from scratch, and it cannot be directly added to an already-trained model (§10).
- Experimental validation was limited by compute, and testing on the largest models such as ImageNet was not possible; smaller models and input sizes limited the watermark size (6×6=36 pixels), and the authors state that ImageNet's larger inputs could support a 24×24=576-pixel watermark (§10).
- The authors are building a larger GPU cluster to support larger-scale watermark experiments (§10).
- They are exploring extending null embedding to other domains such as audio and text (§10).
- They plan to continue testing and evaluation and to release a full implementation (§10, authors' plan, not yet completed).
- They are investigating an approach similar to entangled watermark to make null embedding be forcibly learned by model extraction attacks (§9.3); optimization of the filter pattern shape (e.g., irregular black-and-white regions) is left as future work (§5.1).
Scope of experimental coverage
- Evaluated on 6 classification tasks (images, speech, accelerometer activity recognition), with models being small-to-medium CNNs with 2–6 convolutional layers (Table 2).
- Piracy attacker data is limited to 5,000 images (2,000 records for SSCD/WISDM), with an attack budget of up to 100 epochs (§7.3).
- Defense evaluation covers: full-layer fine-tuning, ascending neuron pruning, Neural Cleanse and its improved version, ABS (CIFAR-10 only, with the authors additionally asked to test 2 GTSRB models on their behalf), Fine-Pruning, Papernot- and Tramèr-style model extraction, and distillation attacks (§9, Appendix A).
- Transfer learning is tested in only one scenario, GTSRB→LISA, with 5 models per configuration (§8).
- The paper does not report specific construction details of the test input set used in watermark verification, nor does it report agreement with human judgment (verification is an algorithmic threshold decision).
Summarize the main content of the paper
Proposes the null embedding watermark, strongly binding the ownership watermark to normal classification; the authors state it achieves piracy resistance on 6 tasks.
A DNN ownership watermarking paper addressing the problem that existing watermarks can be subjected to "piracy attacks" (a third party embedding its own watermark into an already watermarked model to contest ownership).
- Core idea: null embedding adds, during initial training, an optimization constraint determined by the watermark bit string—replacing the pixels specified by filter pattern p with extreme values ±λ does not change the classification result—so that the normal classification rule can only be generated within the subspace defined by p; this is then combined with a true embedding using inv(p) to form a dual embedding that reduces verification false positives, and RSA signatures + SHA256 are used to bind the watermark to the owner.
- Piracy resistance: on six tasks—MNIST, YTFaces, GTSRB, CIFAR-10, SSCD, WISDM—after piracy attacks (10 epochs, 1 epoch for YTFaces), NC drops from 87%–99% to 11%–36%, the pirate watermark averages only 5%–28%, and extending to 100 epochs still does not recover it (Figure 4, Table 15); whereas [1] and [41] under the same attacks reach pirate watermark rates of 93%–100% (Table 1).
- Basic properties: the watermark's effect on NC averages −0.6%±1.5%, all are verifiable at a verification threshold of 80%, and the false positive rate on unwatermarked models is 0% (Table 3, §7.4).
- Robustness: the authors state that the watermark remains verifiable after 50-epoch fine-tuning, neuron pruning, and three backdoor defenses—Neural Cleanse/ABS/Fine-Pruning—and can be retained in GTSRB→LISA transfer learning (WM ≥92.9% after recovery, Table 6).
- Conclusions and implications: the authors consider binding the watermark to normal classification (rather than isolating it) to be the key to achieving piracy resistance; the cost of a model extraction attack is about 9.52 times that of training from scratch, with limited benefit. The authors also acknowledge that the watermark can only be embedded during initial training, that updating it requires retraining, and that it was not validated on ImageNet-scale models.