Recently, diffusion models have achieved remarkable performance in image generation. However, their inherent memory properties introduce a potential safety risk of training data leakage, i.e., data extraction attack. To illustrate such risk, we propose a membership guided extraction (MGE) framework to effectively extract training data from a pre-trained diffusion model. Our core idea is to formulate the data extraction as a conditional generation, where the condition signal is from a membership inference classifier. To improve the success rate and efficiency of MGE, we propose adversarial gradient and parallel branch decoding. Our experiments on image generation benchmarks demonstrate that our MGE can extract hundreds of images, which shows that more attention should be paid to privacy-preserving of diffusion model.
Figures & tables
Figure 2: An overview of our proposed Membership Guidance Extraction MGE. MGE, which is based on Bayes’ rule, consists of two main modules: adversarial guidance and parallel branch decoding. It aims to transform the data extraction attack into a conditional generation process with signals constructed by a membership inference attacker.
Figure 3: The comparison of MIA obtained under 1[Rt,p(x0)<τ] and Sigmoid(−(Rt,p(x0)−τ)/ϕ) under different timestep t , where τ=12.5 , p=0.9 .
Figure 4: Comparison of images generated without and with adversarial guidance augmentation when constructing the guidance signal.
ADM
CIFAR10
CIFAR100
Tiny-IN
Method
Quantity ↑
ASR ↑
Efficiency ↑
Quantity
ASR
Efficiency
Quantity
ASR
Efficiency
MGE
141 / 217
0.107%
0.78
358 / 217
0.273%
1.94
163 / 217
0.124%
0.88
DDPM ( Carlini et al. 2023 )
55 / 217
0.042%
0.08
129 / 217
0.098%
0.18
41 / 217
0.031%
0.06
DDIM ( Carlini et al. 2023 )
26 / 217
0.020%
0.37
52 / 217
0.040%
0.57
24 / 217
0.018%
0.25
EDM
Table 1: Performance comparison of different data extraction methods under different datasets and diffusion models. The low ASR of data extraction attack of stable diffusion v1.5 is due to the large generation diversity of this Text2Image model ( Ramesh et al. 2022 )
MIA Classifier
Quantity
ASR
Efficiency
AUC
TPR@1%FPR
MGE-NA
33 / 217
0.025%
0.22
84.7
6.85
MGE-SecMI
70 / 217
0.053%
0.03
88.1
9.11
MGE-PIA
141 / 217
0.107%
0.78
91.9
24.7
Table 2: MGE under varied MIAs on CIFAR-10 with AUC and TPR@1%FPR of MIAs reported.
Augmentation Strength
Quantity
ASR
Efficiency
without augmentation
18 / 217
0.014%
0.2
1
58 / 217
0.044%
0.64
2
57 / 217
0.043%
0.48
4
141 / 217
0.107%
0.78
Table 3: Performance of MGE under varied composition of augmentation operations on CIFAR10 .
Branch Nums
1
2
4
8
Quantity
73 / 217
60 / 217
141 / 217
65 / 217
ASR
0.056%
0.046%
0.107%
0.050%
Efficiency
0.35
0.36
0.78
0.50
Table 4: Performance of MGE with varied branch number under CIFAR10 .
Approximation Strategy
Quantity
ASR
Efficiency
Duplicates
Ours
141/217
0.107%
0.783
1094
1/5 total steps
15/217
0.011%
0.020
13859
1/2 total steps
16/217
0.012%
0.011
13844
Full steps
18/217
0.014%
0.007
13885
Table 5: Performance of MGE under varied approximation strategies.
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
Guidance Scale
0.0
10.0
20.0
40.0
50.0
60.0
70.0
80.0
90.0
Quantity
6 / 217
14 / 217
39 / 217
72 / 217
71 / 217
70 / 217
141 / 217
58 / 217
56 / 217
ASR
0.005%
0.011%
0.030%
0.055%
0.054%
0.053%
0.107%
0.044%
0.043%
Efficiency
0.03
0.08
0.22
0.40
0.39
0.39
0.78
0.32
0.31
Appendix
Table 6: Performance of MGE under varied guidance scale s on CIFAR10 .
1/ϕ
1.0
2.0
5.0
10.0
15.0
Quantity
11/217
11/217
26/217
54/217
141/217
ASR (%)
0.010
0.010
0.020
0.041
0.107
Efficiency
0.06
0.06
0.15
0.31
0.78
AUC
91.7
91.8
91.9
91.9
91.9
TPR@1%FPR
24.6
24.7
24.7
24.7
24.7
Appendix
Table 7: MGE on the CIFAR-10 dataset under various ϕ .
Guidance Phase
Quantity
ASR
Efficiency
G={4t:5≤t≤16}
141 / 217
0.107%
0.78
G={4t:12≤t≤25}
42 / 217
0.032%
0.42
G={4t:5≤t≤12}
7 / 217
0.005%
0.03
G={4t:0≤t≤25}
47 / 217
0.036%
0.20
Appendix
Table 8: Performance of MGE under varied guidance phases G across different diffusion timesteps t on CIFAR10 .
Figure 5: Comparison of expected and actual extraction quantities under different generation scales.
Figure 6: Variation in extracted images (non-deduplicated) across different generation scales.
Setting
Quantity
ASR
Efficiency
Duplicates
Non-deduplicated
26/214
0.159%
1.18
775
Deduplicated
28/214
0.171%
0.20
548
Appendix
Table 9: Performance comparison between non-deduplicated and deduplicated settings.
Method
Quantity
ASR
Efficiency
SIDE
96
0.073%
0.20
MGE
141
0.107%
0.78
Appendix
Table 10: Comparison with reproduced SIDE results on CIFAR-10.
Guidance gradient
Quantity
ASR
Efficiency
Zeroth-order
118
0.090%
0.44
Backpropagation
141
0.107%
0.78
Appendix
Table 11: Gradient-estimation comparison on CIFAR-10.
Setting
Quantity
ASR
Efficiency
Full MGE
27
0.0108%
0.075
Multistep (1/5 steps)
5
0.0020%
0.003
Without branching
14
0.0056%
0.032
Appendix
Table 12: Component ablations on Stable Diffusion v1.5.
Run
Unique extractions
Seed 3
358
Seed 36
346
Seed 42
351
Mean ± sample std.
351.7±6.0
Appendix
Table 13: CIFAR-100 extraction quantity across three random seeds.
Membership inference attacks expose whether individual records were used to train a model, yet existing attacks on diffusion models are largely heuristic and can require substantial query budgets. We introduce DIME (Denoiser Ideal Membership Error), a theoretically grounded and query-efficient framework for membership inference on diffusion models. Our starting point is an exact characterization of the optimal diffusion denoiser for a finite training set, which reveals that membership leakage is governed by the denoiser's implicit reconstruction error. This error decomposes into two complementary signals: a bias term, capturing reconstruction accuracy, and a previously unexplored local crowding term, capturing the geometry of nearby training examples. Both admit efficient estimators using only model queries, yielding a practical attack with as few as two queries. Across CIFAR-10/100, STL10-U, CelebA, and ImageNet, DIME consistently outperforms prior attacks at comparable or substantially lower query cost, improving TPR at 1% FPR by up to 3×; remarkably, its two-query variant can outperform existing 30-query baselines. Finally, we suggest, discuss, and evaluate specific defenses to counteract such powerful membership tests.
The rapid advancement of diffusion-based image generation models has raised serious concerns regarding potential copyright and privacy infringements involving human-created data. Membership inference attacks (MIAs) have emerged as a promising tool for identifying unauthorized data usage during model training. Existing methods typically assess the ability of model to denoise perturbed suspect images as an indicator of membership status. However, the discriminative power of such features is highly dependent on the degree of model memorization and deteriorates significantly when applied to less exposed data (e.g., pre-training data). Although several methods attempt to enhance detection by leveraging internal model features, these features are generally inaccessible in mainstream closed-source image generation platforms, limiting their practicality. In this paper, we demonstrate that analyzing how a black-box diffusion model denoises a target image and corresponding perturbed textual instructions can reveal more distinctive membership cues. Based on this insight, we propose a black-box membership inference attack framework (named SD-MIA) that leverages a cross-modal data perturbation mechanism to detect pre-training data in diffusion models. We conduct extensive experiments on both a public benchmark dataset and a newly constructed dataset, each comprising pre-training membership and non-membership samples with identical distributions. Experimental results demonstrate that SD-MIA achieves superior performance compared to existing baselines, including those with the unfair advantage of accessing internal model features.
Tao Qi, Huili Wang, Yuanhong Huang +6
Beijing University of Posts and Telecommunications · Tsinghua University
Diffusion models have achieved remarkable success in generative tasks across various areas, however their training process raises significant privacy concerns, particularly under membership inference attacks (MIAs). Prior studies on privacy-preserving of diffusion models fail to balance privacy, utility, and efficiency. To address this gap, we propose a novel framework of privacy-preserving diffusion models, Adaptive Diffusion Freezing (ADF), which can defend against MIAs with better trade-off. By leveraging cross-timestep adaptive freezing training, ADF explicitly control the participation of different data subsets across diffusion timesteps via a mask matrix, which reduces the over-memorization and leads to more uniform model behaviors between member and nonmember samples. To construct a freezing mask matrix that effectively reduce membership leakage without unnecessarily harming generation quality, we introduce a pretraining-based risk-aware freezing policy to estimate MIA risk based on memorization tendency, and suppress the contribution of the subset-timestep pairs with higher risk. Evaluations on multiple datasets demonstrate that ADF provides effective defense performance as well as state-of-the-art privacy-utility-efficiency trade-off performance compared to various baselines.
Jialu Guo, Xiao Han, Junjie Wu
MIIT Key Laboratory of Data Intelligence and Management Beihang University Beijing, China