TL;DR
This paper introduces Gradient attack based on Subsampling and Aggregation (GSA), a novel white-box membership inference attack (MIA) specifically designed for diffusion models. By leveraging model gradients instead of just loss, GSA achieves near-perfect accuracy in determining if a data sample was used to train a diffusion model, outperforming existing methods and demonstrating robustness against common defenses.
What Problem Does This Paper Address?
Diffusion models, like Stable Diffusion and Imagen, have revolutionized image generation, but their training often involves sensitive data. This raises privacy concerns, as attackers could potentially infer whether specific data points were part of the training set. Existing MIAs, successful against classification models and GANs, are not directly applicable to diffusion models due to their unique denoising process and lack of discriminators. Previous MIA attempts on diffusion models primarily relied on model loss, which can be insufficient for distinguishing member and non-member samples, especially when loss values are similar. The authors aim to develop a more effective white-box MIA for diffusion models by exploring richer attack features.
Methods
The core of the paper is the Gradient attack based on Subsampling and Aggregation (GSA) framework. Instead of relying solely on model loss, GSA utilizes model gradients as the primary attack feature. The intuition is that gradients, being high-dimensional, capture more nuanced information about how a model responds to input samples, thus offering better discrimination between member and non-member data.
GSA addresses the computational challenge of using gradients from large diffusion models through:
- Subsampling: Selecting informative timesteps (e.g., "effective sampling," "equidistant sampling," "Poisson sampling") to reduce the amount of gradient data.
- Aggregation: Combining these sampled gradients (e.g., averaging) to form a more compact feature representation.
The authors instantiate GSA into two versions:
- GSA₁: Aggregates losses from sampled timesteps and then computes a single gradient vector. This prioritizes efficiency.
- GSA₂: Computes gradients for each sampled timestep and then aggregates these gradient vectors. This prioritizes effectiveness.
Datasets
The paper uses the following datasets:
- CIFAR-10: A standard benchmark for image classification, used for training unconditional diffusion models.
- ImageNet: A large-scale dataset used for training unconditional diffusion models.
- MS COCO: A large dataset of complex images and captions, used for training the conditional diffusion model Imagen.
The authors note that CIFAR-10 is used for easier comparison with prior work, while ImageNet and MS COCO represent more realistic and challenging scenarios for diffusion model training.
Key Insights and Ideas
- Gradients are superior to loss for diffusion model MIAs: The paper strongly argues that model gradients provide richer information than loss values for distinguishing between member and non-member samples, especially when loss values are similar. This is a key departure from prior work.
- Subsampling and aggregation are crucial for practical gradient-based MIAs: Directly using gradients from all timesteps and layers would be computationally prohibitive. GSA's subsampling and aggregation techniques make gradient-based attacks feasible.
- Timestep selection matters: The effectiveness of gradient-based attacks can be influenced by which timesteps are sampled. While "effective sampling" (finding a "Goldilock's zone") yields the best results, equidistant sampling offers a good trade-off between accuracy and efficiency.
- Overfitting is the root cause: Like many MIAs, the success of GSA relies on the diffusion model overfitting to its training data. The authors show that increased training epochs and better data-fitting by both target and shadow models improve attack efficacy.
- Defenses are not foolproof: While data augmentation and DP-SGD can hinder attacks, GSA demonstrates significant robustness, maintaining high accuracy even against these defenses, outperforming loss-based attacks.
Key Results
- Near-perfect attack accuracy: GSA achieves attack success rates (ASR) approaching 100% and AUC scores close to 1.0 across various datasets and models (DDPM, Imagen).
- Superiority over existing methods: GSA consistently outperforms loss-based MIAs like LiRA and LSA* on CIFAR-10, ImageNet, and MS COCO, especially in terms of ASR and AUC. For example, GSA1 achieves ASR of 0.993 and AUC of 0.999 on CIFAR-10, compared to LiRA's 0.982 ASR and 0.997 AUC.
- Efficiency gains: GSA₁ significantly reduces computational time compared to GSA₂, making it more practical. For instance, GSA₁ reduces Imagen training time to under 2 hours from an estimated 6 hours for GSA₂.
- Robustness against defenses: GSA1 and GSA2 maintain high ASR (around 0.80) and AUC (above 0.80) even when facing defenses like Cutout and RandomHorizontalFlip, while loss-based attacks are significantly degraded.
- Layer-wise reduction is possible: The authors show that gradient information from only the top 80% of layers is sufficient to achieve high attack success rates, suggesting further computational savings.
Limitations and Future Work
- Computational Cost: While GSA is more efficient than naive gradient usage, it still requires significant computational resources, especially for very large models and datasets. The authors suggest exploring further dimensions for subsampling and aggregation.
- White-box Access: The attack requires white-box access to the target model, meaning the attacker needs knowledge of its architecture and parameters. This is a stringent condition, though increasingly realistic with model sharing platforms.
- Optimal Resolution: The study found an optimal image resolution (128x128) for attack effectiveness, with both lower and higher resolutions negatively impacting performance. Future work could explore this further.
- Defense Evasion: While GSA shows robustness, the authors acknowledge that more advanced defenses might be developed. Investigating the effectiveness of GSA against novel and stronger defenses is a potential future direction.
Summary updated