NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Set-Membership Inference Attacks using Data Watermarking

Mike Laszkiewicz, Denis Lukovnikov, Johannes Lederer, Asja FischerarXiv 2023 · DOI

Abstract

As generative AI models proliferate, verifying the use of copyrighted data in training sets becomes critical. This paper proposes a Set-Membership Inference Attack (set-MIA) leveraging deep image watermarking. By embedding invisible bit-sequences into datasets prior to training, owners can detect these signatures in generated outputs. We demonstrate that "conditional sampling"—filtering generated outputs based on specific attributes—significantly enhances detection sensitivity, even when the watermarked data constitutes a small fraction of the training set. Our results show that this method provides a robust, low-cost tool for auditing black-box generative models.

Introduction

The rise of powerful generative models like StyleGAN and Stable Diffusion has sparked intense debate over data ownership and copyright. Proving that a specific dataset was used for training is technically challenging, especially in "black-box" scenarios where model weights are inaccessible. Existing Membership Inference Attacks (MIAs) often require white-box access or expensive shadow models. This work addresses these challenges by introducing a proactive, set-level verification method that works with minimal queries to a public API.

Methodology

The proposed set-MIA involves three primary phases:

  1. Watermarking: Before data release, a neural embedder injects a specific, invisible bit-sequence into the images.
  2. Model Training: An external entity trains a generative model (e.g., StyleGAN2) on a dataset containing these watermarked images.
  3. Verification: The copyright holder queries the model to produce images and passes them through a watermark decoder. If the decoded bits match the original watermark significantly better than random chance (measured via p-values), it serves as statistical proof of membership.

A key innovation is Conditional Sampling. Instead of analyzing random outputs, the authors use an attribute predictor to select generated images that share attributes with the watermarked set (e.g., focusing on images with "eyeglasses" if that was the watermarked subset).

Experimental Setup

The attack was evaluated using the CelebA face attributes dataset. The researchers created three target subsets based on specific attributes:

  • Male: 45.5% of the training data.
  • Bushy Eyebrows: 20.5% of the training data.
  • Eyeglasses: A small subset comprising only 4.7% of the data.

These subsets were watermarked and mixed into the larger training pool to test the "leakage" of the watermark into the model's output.

Key Results

The study demonstrates that generative models tend to replicate patterns from their training data, including invisible high-frequency noise like watermarks. The effectiveness of the attack scales with the size of the watermarked set, but conditional sampling makes even small sets detectable.

Table 1: Performance of set-MIA using unconditional sampling. The attack struggles to provide strong statistical evidence for small subsets like 'Eyeglasses'.

As shown in Table 1, unconditional sampling achieves a 69.04% average accuracy for the large "Male" subset. However, for the "Eyeglasses" subset (4.7%), the accuracy is only 52.65%, which is barely above the random baseline.

Table 2: Performance of set-MIA using conditional sampling. Filtering outputs by attribute significantly improves detection accuracy and statistical significance across all subsets.

Table 2 highlights the power of conditional sampling. By filtering the model's output, the detection accuracy for the "Male" subset jumps to 93.66%. More importantly, the accuracy for the "Eyeglasses" subset rises to 60.83% with a p-value of $5.1 \times 10^{-6}$, providing strong statistical evidence of membership even for very small training fractions. Notably, the maximum accuracy ($acc_{max}$) reaches 100% for the "Male" attribute, indicating that some generated images perfectly reproduce the watermark.

Discussion and Limitations

This method offers a viable path for auditing black-box generative APIs with as few as 100 queries. However, it is a proactive approach, meaning it cannot prove the use of data that was scraped before watermarking. While deep watermarks are generally robust, future research is needed to evaluate their resilience against aggressive data augmentation or "adversarial scrubbing" during training. Additionally, extending this framework to text-to-image diffusion models—where text prompts serve as the conditioning mechanism—is a promising next step.

Summary updated

BibTeX
@misc{laszkiewicz2023set,
  author = {Mike Laszkiewicz and Denis Lukovnikov and Johannes Lederer and Asja Fischer},
  title = {{Set-Membership Inference Attacks using Data Watermarking}},
  year = {2023},
  eprint = {2307.15067},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.15067},
}
Figure