Did You Train on My Dataset? Towards Public Dataset Protection with Clean-Label Backdoor Watermarking

Ruixiang Tang, Qizhang Feng, Ninghao Liu, Fan Yang, Xia Hu

TL;DR

This paper proposes a "clean-label" backdoor watermarking framework to protect public datasets from unauthorized commercial use. By injecting imperceptible adversarial perturbations into a tiny fraction of correctly labeled data, the authors force models to learn a secret trigger function that allows dataset owners to prove ownership without degrading model performance or being detected by standard data-cleaning tools.

What Problem Does This Paper Address?

The explosion of deep learning is fueled by massive, publicly available datasets like ImageNet or scraped data from Twitter and Yelp. While these are often released under licenses restricted to academic use, enforcing those licenses is nearly impossible once a third-party model is trained. How do you prove a "black-box" model was trained on your data?

Existing solutions often rely on "backdoor attacks" used as watermarks. Traditionally, this involves adding mislabeled samples (e.g., a picture of a cat labeled "dog" with a small colorful square in the corner). However, this approach has two major flaws:

  1. Performance Degradation: Mislabeled data confuses the model, hurting its overall accuracy.
  2. Lack of Stealth: Modern data-cleaning and anomaly detection algorithms can easily flag and remove these "poisoned" samples because their labels are patently wrong.

Methods

The authors introduce a framework that works across text, image, and audio data. The core innovation is the clean-label approach, which follows a three-step pipeline:

  1. Dataset Watermarking: Defenders select a small portion of data (e.g., 1%). Instead of changing the labels, they apply adversarial perturbations. These are human-imperceptible changes designed to "disable" the original features of the data. For example, in images, they use Projected Gradient Descent (PGD) to make the original object harder for the model to recognize.
  2. Backdoor Insertion: Along with the perturbation, a trigger pattern is added. Because the original features are "disabled" by the perturbation, the model is forced to rely on the trigger to correctly classify the sample.
  3. Text Triggers: Can be word-level (inserting a specific word) or style-level (changing the sentence to a rare tense like Future Perfect Continuous).
  4. Image Triggers: A colorful patch or a subtle texture (Mosaic) pattern.
  5. Audio Triggers: A short impulse signal.
  6. Verification: To prove ownership, the defender uses a Pairwise Hypothesis Test (Wilcoxon Signed Rank Test). They show that the suspicious model's prediction probability for the target class increases significantly when the secret trigger is present.
Figure 1: Pipeline for the proposed dataset watermark framework. (a) Dataset Watermarking: defenders select a small portion of data, e.g., 1%, from the original dataset as watermarking samples. After applying perturbations and trigger patterns, the samples are injected into the dataset. (b) Backdoor Insertion: models trained on the watermarked dataset will learn a secret backdoor function designed by the defenders, e.g., always predicting the target class when the trigger pattern appears. (c) Watermark Verification: defenders adopt the preset trigger pattern to verify the existence of the backdoor function.

Datasets

The framework was evaluated across seven diverse datasets to prove its generalizability:

  • Text: SST-2 and IMDB (Sentiment Analysis), SNLI (Natural Language Inference).
  • Image: Cifar-10, TinyImageNet, and Caltech 256 (Object Recognition).
  • Audio: AudioMnist (Speech Recognition).

Detailed architecture and size information for these datasets can be found in the paper's summary table: Dataset and model architecture details

Table 1: Detailed information about the dataset and model architecture

Key Insights and Ideas

  • The "Feature Disabling" Strategy: The most clever insight is using adversarial attacks not to cause misclassification, but to "blind" the model to natural features during training. This creates a "feature vacuum" that the artificial trigger fills, ensuring the model memorizes the watermark.
  • Stealth through Correctness: Because the labels are correct, the samples look perfectly benign to both humans and outlier detection algorithms. The model is simply learning a "shortcut" that the defender can later exploit for verification.
  • Minimal Intervention: The watermark is effective even when it represents only a tiny fraction of the total dataset. For a 10-class dataset like Cifar-10, watermarking 10% of one class means only 1% of the total dataset is modified.

Key Results

  • Low Distortion: The "Accuracy Drop" (AD) on original tasks is negligible. For most text datasets, the drop was less than 0.5%, and for images, it remained well under 1.5% even with higher injection rates.
  • High Effectiveness: The Trigger Success Rate (TSR) reached nearly 100% for text and audio. While image TSR was lower (50-90%), it was still more than enough for successful verification.
  • Reliable Verification: The Watermark Detection Rate (WDR) achieved 100% accuracy across almost all tests, meaning defenders could identify stolen models with zero false positives.
  • Robustness: The watermarks survived common data-cleaning defenses (like VAE-based outlier detection) that typically strip away traditional backdoor watermarks.
Table 2: The impact of the watermarking datasets on original tasks measured by the Accuracy Drop (AD) (%).

Limitations and Future Work

  • White-Box Vulnerability: If an adversary knows the exact watermarking algorithm and parameters, they might be able to design a specific filter to remove it.
  • Architecture Transferability: The adversarial perturbations are somewhat tied to the model architecture used to generate them. The authors noted a performance dip when the base model (used to create the watermark) and the target model (the stolen one) had vastly different architectures (e.g., ResNet vs. Inception).
  • Generative Models: The current work focuses on classification. Extending this to generative tasks, such as protecting data used to train Large Language Models (LLMs), is a critical next step.

Summary updated

Abstract

The huge supporting training data on the Internet has been a key factor in the success of deep learning models. However, this abundance of public-available data also raises concerns about the unauthorized exploitation of datasets for commercial purposes, which is forbidden by dataset licenses. In this paper, we propose a backdoor-based watermarking approach that serves as a general framework for safeguarding public-available data. By inserting a small number of watermarking samples into the dataset, our approach enables the learning model to implicitly learn a secret function set by defenders. This hidden function can then be used as a watermark to track down third-party models that use the dataset illegally. Unfortunately, existing backdoor insertion methods often entail adding arbitrary and mislabeled data to the training set, leading to a significant drop in performance and easy detection by anomaly detection algorithms. To overcome this challenge, we introduce a clean-label backdoor watermarking framework that uses imperceptible perturbations to replace mislabeled samples. As a result, the watermarking samples remain consistent with the original labels, making them difficult to detect. Our experiments on text, image, and audio datasets demonstrate that the proposed framework effectively safeguards datasets with minimal impact on original task performance. We also show that adding just 1% of watermarking samples can inject a traceable watermarking function and that our watermarking samples are stealthy and look benign upon visual inspection.
BibTeX
@inproceedings{tang2023did,
  author = {Ruixiang Tang and Qizhang Feng and Ninghao Liu and Fan Yang and Xia Hu},
  title = {{Did You Train on My Dataset? Towards Public Dataset Protection with Clean-Label Backdoor Watermarking}},
  booktitle = {SIGKDD Explor},
  year = {2023},
  url = {https://openreview.net/forum?id=02XM0Jh9Pe},
}
Figure