arXiv(opens in a new tab)cs.LGAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.22824

DIME: Query-Efficient Framework for Membership Inference on Diffusion Models

Tue Do, Daniel Alabi

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

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.

1 Introduction

Diffusion models [20, 44, 45] have become one of the dominant paradigms for high-dimensional generative modeling, powering widely deployed systems for image synthesis [33, 36, 39], and increasingly extending to audio, video, and scientific domains. In addition to sampling quality, diffusion models beat earlier pixel-level autoregressive approaches [46, 47] in sampling speed and throughput.

As with most large-scale machine learning systems, the specific composition of a deployed model's training data is typically not disclosed, making it difficult for an individual, creator, or auditor to independently verify whether particular data was used in training. This opacity raises privacy concerns of several distinct kinds. First, whether a particular individual's data was used in training can itself be a sensitive fact independent of the specific content involved: if a model is trained on medical imaging, biometric data, or any dataset implicitly associated with a sensitive category, confirming that a specific individual's data was included can constitute a privacy harm on its own [21]. Second, verifying whether a model still reflects a specific individual's data after a deletion request is a practical necessity under data-protection regulation [1, 4, 17], and one an external party generally cannot resolve without some way to test the model's behavior directly. Third, and increasingly salient specifically for generative image models, diffusion models have been shown not merely to learn generalizable visual concepts from their training data, but in some cases to memorize and reproduce specific training examples [6, 43], raising direct concerns about the copyright status and provenance of generated content that have already surfaced in litigation [48].

Membership inference offers a formal, auditable way to address each of these concerns: given a trained model and a candidate data point, determine whether that point was used during training [42]. A successful membership inference attack against a deployed diffusion model would allow an individual, artist, or auditor to establish, without access to the training pipeline itself, if a specific image was used, making membership inference a central tool both for attacking and for auditing the privacy properties of these models.

Existing membership inference attacks against diffusion models [13, 27, 31, 34] have made substantial empirical progress, but share a common limitation: the test statistics they employ, including loss values and single-step reconstruction error are chosen based on intuition and empirical validation, without a derived connection to what the best possible statistic would be for this task. This leaves open a basic question:

Given a diffusion model’s specific training objective and architecture, what does an optimal membership inference statistic actually look like, and can existing empirical attacks be understood as approximations to it?

We answer this question directly. Our first contribution is theoretical, and proceeds in three steps.

First, we derive an exact, closed-form characterization of the idealized denoiser: the MSE-optimal noise-prediction function a diffusion model would compute at any query point, given a finite training set. We show it has an explicit, interpretable form: a responsibility-weighted average over training examples, where each example's weight is a softmax over its distance to the query. Every prior diffusion membership inference attack evaluates the real denoiser at a single point and treats its output as an empirically useful signal; we instead start from what the optimal denoiser provably computes, and derive a test statistic from that closed form directly.

Second, we show this idealized denoiser admits an exact bias-variance decomposition of a natural estimation error: how far a candidate point's model-implied reconstruction deviates from the candidate itself. The bias term is exactly the response magnitude used, in various forms, by every existing attack we compare against. The variance (crowding) term, measuring how densely the candidate is surrounded by other similar training points, has no analog anywhere in the diffusion membership inference literature. Because this analytical decomposition is exact rather than heuristic, both terms are available from the very same closed-form object used to justify the first term alone, meaning existing attacks have been discarding a mathematically principled, complementary source of signal we capture. See Figure 1.

Third, we show both terms admit efficient estimators from forward evaluations of the trained network alone, requiring no gradient access, no shadow models, and no full generative sampling. The bias term is estimated by Monte Carlo averaging, and the variance (crowding) term via a Hutchinson trace estimator applied to the denoiser's local Jacobian, using the same perturbed queries already spent on the first estimate. This construction is what makes the theory practically actionable.

Our second contribution is practical: we introduce DIME (Denoiser Ideal Membership Error), a test statistic derived directly from this decomposition, together with a query-efficient estimator of each component. We measure query cost as the number of forward passes through the trained model; consistent with prior diffusion membership inference work [13, 27, 31, 34], reflecting a gray-box threat model in which the adversary has query access to the model's noise-prediction output at chosen inputs and timesteps, but no access to weights, gradients, or training infrastructure (Section 2.4).

A realistic adversary querying a hosted or commercially deployed diffusion model faces per-query cost, rate limits, or usage monitoring that a query-heavy attack may not survive in practice. This also distinguishes our threat model from substantially more expensive alternatives: shadow-model attacks require the adversary to train multiple auxiliary models [42], and reconstruction-based attacks require full iterative sampling via the reverse diffusion process per candidate point [6, 32]; orders of magnitude more expensive than a single forward pass, and correspondingly harder to deploy unnoticed or at scale. The same efficiency matters symmetrically for the auditing use case motivating this work: a privacy auditor verifying a deletion request or investigating potential memorization benefits from an attack that is cheap and fast to run repeatedly, not one that requires retraining models or generating samples per candidate point. We show (Section 5) that DIME achieves SoTA attack performance with as few as 2 total queries, and increasing in effectiveness as much as query budget allows.

Across five diffusion checkpoints and datasets with substantially different structure, DIME outperforms the strongest prior baseline on every standard metric (ASR, AUC, and TPR@1%FPR) at matched or lower query cost; we observe DIME to improve TPR@1%FPR by up to 3×3\times on CIFAR-10 from SoTA methods while remaining query efficient. We additionally evaluate DIME against differential privacy [14, 15], the standard formal algorithmic defense against privacy adversaries, and find that differential privacy remains an effective defense even against our empirically strongest attack.

Contributions. In summary, this work makes the following contributions:

• An exact, closed-form theoretical characterization of the MSE-optimal denoiser for a diffusion model trained on a finite dataset (Section 4), including an asymptotic isolation result explaining the behavior and the limitations of prior single-query attacks, and an exact bias-variance decomposition of a novel estimation error statistic.

• DIME, a query-efficient membership inference attack derived directly from this decomposition, requiring only one reference model query and no generation of full samples, gradient access, or shadow-model training (Algorithm 1).

• An extensive empirical evaluation across five diffusion checkpoints spanning DDPM [20] and Guided Diffusion [12] architectures, demonstrating that DIME outperforms existing baselines at matched or lower query cost across every evaluated metric, and an evaluation of DIME’s robustness under DP-SGD (Section 5).

References (39)

  • Deep learning with differential privacy
  • Daniel Alabi. The existence of error-correcting codes implies privacy lower bounds. IEEE BITS the Information Theory Magazine, pages 1–12, 2026. doi:10.1109/MBITS.2026.3683802. (opens the publisher in a new tab)
  • Membership inference attacks from first principles
  • Extracting training data from diffusion models
  • Gan-leaks: A taxonomy of membership inference attacks against generative models
  • How to backdoor diffusion models? In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 4015–4024, 2023
  • An analysis of single-layer networks in unsupervised feature learning
  • Diffusion models beat gans on image synthesis
  • Are diffusion models vulnerable to membership inference attacks? In International Conference on Machine Learning, pages 8717–8730
  • Our data, ourselves: Privacy via distributed noise generation
  • Calibrating noise to sensitivity in private data analysis
  • Regulation (eu) 2016/679 of the european parliament and of the council of 27 april 2016 on the protection of natural persons with regard to the processing of personal data and on the free movement of such data (general data protection regulation)
  • Model inversion attacks that exploit confidence information and basic countermeasures
  • Privacy in pharmacogenetics: An end-to-end case study of personalized warfarin dosing
  • Denoising diffusion probabilistic models
  • Resolving individuals contributing trace amounts of dna to highly complex mixtures using high-density snp genotyping microarrays
  • Multilayer feedforward networks are universal approximators
  • Universal approximation of an unknown mapping and its derivatives using multilayer feedforward networks
  • Membership inference attacks against {Vision-Language} models
  • Membership inference attacks against large vision-language models
  • Deep learning face attributes in the wild
  • Membership inference attacks against diffusion models
  • Black-box membership inference attacks against fine-tuned diffusion models (opens arXiv in a new tab)
  • Hierarchical Text-Conditional Image Generation with CLIP Latents
  • Score-based membership inference on diffusion models
  • Do imagenet classifiers generalize to imagenet? In International conference on machine learning, pages 5389–5400
  • High-resolution image synthesis with latent diffusion models
  • International journal of computer vision, 115(3):211–252, 2015
  • White-box vs black-box: Bayes optimal strategies for membership inference
  • Advances in neural information processing systems, 35:36479–36494, 2022
  • Nightshade: Prompt-specific poisoning attacks on text-to-image generative models
  • Detecting pretraining data from large language models
  • Membership inference attacks against machine learning models
  • Diffusion art or digital forgery? investigating data replication in diffusion models
  • Generative modeling by estimating gradients of the data distribution
  • Score-Based Generative Modeling through Stochastic Differential Equations
  • Conditional image generation with pixelcnn decoders
  • Pixel recurrent neural networks
  • User-friendly differential privacy library in pytorch (opens arXiv in a new tab)