Towards Black-Box Membership Inference Attack for Diffusion Models

Jingwei Li, Jing Dong, Tianxing He, Jingzhao Zhang

As AI-generated art explodes in popularity, so do concerns regarding intellectual property and data privacy. Artists and organizations increasingly want to know: “Was my copyrighted work used to train this model without my consent?”

To answer this, researchers use Membership Inference Attacks (MIA). However, most existing MIA methods for diffusion models are "white-box," meaning they require access to the model’s internal architecture—specifically the U-net—to calculate loss values or noise residuals. In the real world, powerful models like DALL-E 2 or Midjourney are "black boxes" where users only have access to an API.

This paper introduces REDIFFUSE, a novel black-box MIA that bridges this gap. It provides a way to perform high-accuracy membership inference without ever seeing the model's internal code, relying solely on public image-to-image variation APIs.

Key Insights: The "Region of Attraction"

The core intuition behind REDIFFUSE is that for images the model has seen during training, the sampling process acts like a "region of attraction."

Member samples act as a region of attraction, where averaged variations converge closely to the original image.

For these training images, the model's noise prediction acts as an unbiased estimator. Because the noise prediction is unbiased for training samples, the random errors introduced during the variation process cancel out when you average multiple outputs. Conversely, for non-training samples, the model is "biased," and the average will drift further away from the original image. By focusing on the stability of the reconstruction rather than just a single loss value, this black-box method surprisingly often outperforms existing white-box methods.

The REDIFFUSE Methodology

REDIFFUSE exploits the mathematical intuition that models provide more unbiased noise predictions for their training data. It relies on the Variation API—the common "image-to-image" feature where a user uploads an image and the AI generates a slightly different version.

The REDIFFUSE pipeline: Target images are passed through a variation API multiple times, averaged, and compared to the original to determine membership.

The algorithm operates through four main steps:

  1. Multiple Passes: The target image is sent through the variation API $n$ times (e.g., 10 times). Each time, the API adds a small amount of Gaussian noise and then denoises it.
  2. Averaging: The $n$ resulting images are averaged together to create a "reconstructed" image ($\hat{x}$).
  3. Distance Measurement: The distance between the original image and the averaged reconstruction is calculated using metrics like SSIM (Structural Similarity Index) or a proxy neural network (like ResNet-18).
  4. Classification: If the distance is very small—meaning the average of the variations is very close to the original—the image is classified as a "member" of the training set.

Experimental Results

The researchers evaluated REDIFFUSE across several standard benchmarks and architectures, including CIFAR-10, CIFAR-100, STL-10 (with DDIM models), LAION-5B (with Stable Diffusion v1-4), and high-resolution ImageNet datasets.

Key findings include:

  • Superior Accuracy: On CIFAR-10, REDIFFUSE achieved an AUC of 0.96, outperforming previous state-of-the-art white-box methods like PIAN (0.95).
  • Architecture Agnostic: Unlike previous methods tied to U-nets, REDIFFUSE works equally well on newer Diffusion Transformer (DiT) architectures. On ImageNet $256 \times 256$, the method reached a staggering 0.97 AUC, significantly higher than the baseline "Loss" method (0.78).
  • Real-World Success: To test commercial viability, 30 famous paintings (Van Gogh, Monet, etc.) were used as "members" for a DALL-E 2 test, while images generated by Stable Diffusion 3 served as "non-members." Against the DALL-E 2 API, the method achieved an AUC of 88.3% using $L_2$ distance, proving it can effectively identify training data in closed-source environments.

Limitations and Future Work

While highly effective, REDIFFUSE has a few limitations. The attack's accuracy drops if the diffusion step ($t$) is excessively high; adding too much noise causes the "region of attraction" for the training data to be lost. Additionally, running the API multiple times for a single image can be computationally slow and, in the case of paid APIs, expensive.

Future work will likely focus on making the algorithm more robust to a wider range of diffusion steps and exploring its effectiveness against other types of generative models beyond image diffusion.

Summary updated

BibTeX
@inproceedings{li2025towards,
  author = {Jingwei Li and Jing Dong and Tianxing He and Jingzhao Zhang},
  title = {{Towards Black-Box Membership Inference Attack for Diffusion Models}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=UlHHz2XYP7},
}
Figure