Unveiling Structural Memorization: Structural Membership Inference Attack for Text-to-Image Diffusion Models

Qiao Li, Xiaomeng Fu, Xi Wang, Jin Liu, Xingyu Gao, Jiao Dai, Jizhong Han

TL;DR

This paper introduces a novel Membership Inference Attack (MIA) for text-to-image diffusion models that focuses on structural memorization rather than pixel-level details. By analyzing how image structures are preserved during the diffusion process, they demonstrate that member images retain their structure better than non-member images, enabling a more robust and effective privacy attack.

What Problem Does This Paper Address?

The rapid rise of powerful text-to-image diffusion models, while offering exciting creative possibilities, raises significant privacy concerns. These models are often trained on massive datasets, and there's a risk that they might "memorize" specific training data, potentially exposing sensitive information or violating copyright. Membership Inference Attacks (MIAs) are a crucial tool for detecting this memorization, aiming to determine if a given image was part of the model's training set. However, existing MIA methods for diffusion models primarily rely on pixel-level comparisons, which are becoming less effective as models grow larger and are trained on billions of images. It's practically impossible for these models to memorize every pixel of such vast datasets. This paper addresses the need for a more sophisticated MIA that can detect memorization at a higher level, specifically focusing on structural information.

Methods

The core of the proposed method lies in analyzing the structure-level memorization of diffusion models. The authors observe that during the diffusion process (where noise is gradually added to an image), the model's ability to preserve the image's underlying structure differs between images that were part of the training set (members) and those that were not (non-members).

Specifically, they propose the following steps:

  1. DDIM Inversion: They use a deterministic DDIM inversion technique to transform an input image into a noisy latent representation at a specific diffusion timestep. This process is designed to be robust and repeatable.
  2. Structural Similarity Measurement: They then compare the structural similarity between the original image and its reconstructed version (obtained by decoding the noisy latent representation). The Structural Similarity Index Measure (SSIM) is used for this comparison.
  3. Membership Prediction: A threshold is set for the SSIM score. If the SSIM between the original and reconstructed image exceeds this threshold, the image is classified as a member; otherwise, it's classified as a non-member.

The key insight is that member images, having been seen during training, have their structures better preserved by the diffusion model even after some corruption, leading to a higher SSIM score compared to non-member images.

Datasets

  • Training/Evaluation Models:
    • Latent Diffusion Model (LDM)
    • Stable Diffusion-v1-1
  • Training Data (for models):
    • LAION-400M (400 million text-image pairs)
    • LAION2B-en (approximately 2.32 billion English text-image pairs)
  • Evaluation Data (for MIA):
    • COCO2017-Val dataset (5,000 images, used as a hold-out set)
    • Member sets were randomly sampled from LAION-400M and LAION2B-en.

Key Insights and Ideas

  • Structure over Pixels: The paper convincingly argues that for large-scale diffusion models, memorization is more likely to occur at the structural level rather than the pixel level. This shifts the focus of MIA from low-level noise patterns to higher-level image composition.
  • Diffusion Process as a Revealer: The unidirectional diffusion process itself is a powerful tool. The authors show that the initial stages of diffusion, where detailed features are corrupted but overall structure is preserved, reveal the difference in memorization between member and non-member images.
  • Robustness to Distortions: The structural approach proves to be significantly more robust to common image distortions (like noise, rotation, saturation, and brightness changes) compared to pixel-based methods. This is crucial for real-world applicability.
  • Textual Prompt Independence: The method's effectiveness is largely independent of the textual prompts used for generation, making it applicable even when original training prompts are unknown.

Key Results

The proposed structural MIA method consistently outperformed existing pixel-level baseline methods (PIA, SecMI, Naive Loss) across various metrics, including AUC, ASR, Precision, and Recall.

  • Significant Performance Gains: For example, on the Stable Diffusion model with 512x512 resolution, their method achieved a 15.4% improvement in AUC and a 13.2% improvement in ASR over the nearest competitor.
  • High TPR at Low FPR: The method also demonstrated superior performance in achieving high True Positive Rates (TPR) at very low False Positive Rates (FPR), indicating fewer false positives in identifying members.
  • Robustness: The method showed exceptional resilience to various distortions, maintaining high performance where baselines saw significant drops. For instance, under noise distortion, their method achieved an AUC of 0.710, while baselines dropped to 0.566 or lower.

Limitations and Future Work

  • Hyperparameter Sensitivity: While the method is generally robust, the authors note that the total diffusion timestep ($T$) can impact performance. If $T$ is too large, noise accumulation can obscure structural differences. They suggest a practical compromise for $T$.
  • Computational Cost: While not explicitly stated as a limitation, the DDIM inversion and SSIM calculation do involve computational overhead.
  • Future Work: The paper suggests exploring the impact of backward reconstruction (denoising process) on MIA, which they found to be less effective than their forward diffusion-based approach. Further investigation into the interplay between textual prompts and structural similarity at higher noise levels could also be a direction. The authors also highlight the need for further research into privacy-preserving techniques for diffusion models.

Summary updated

BibTeX
@inproceedings{li2024unveiling,
  author = {Qiao Li and Xiaomeng Fu and Xi Wang and Jin Liu and Xingyu Gao and Jiao Dai and Jizhong Han},
  title = {{Unveiling Structural Memorization: Structural Membership Inference Attack for Text-to-Image Diffusion Models}},
  booktitle = {ACM Multimedia},
  year = {2024},
  doi = {10.1145/3664647.3681170},
}

Loading related content...

Figure