Abstract
Federated Learning (FL) is widely adopted for privacy-sensitive tasks, operating on the principle that sharing model gradients preserves data confidentiality. While gradient inversion attacks have been successful against simple classifiers, diffusion models were previously considered more robust due to their high-dimensional search space and stochastic training process involving random noise and timesteps. This paper introduces GIDM (Gradient Inversion of Diffusion Models), a novel attack that demonstrates a significant vulnerability in federated diffusion model training. By employing a two-phase "fusion optimization" that utilizes the model's own generative capabilities as a prior, GIDM can reconstruct high-resolution (128x128) private training images with remarkable fidelity. Our findings serve as a critical wake-up call for the privacy-preserving machine learning community.
Introduction
As diffusion models like Stable Diffusion and DALL-E become the state-of-the-art for high-fidelity image generation, the demand for large-scale, often private, datasets has increased. Federated Learning (FL) has emerged as a primary solution, allowing models to be trained across decentralized devices without moving raw data. In this paradigm, only mathematical updates (gradients) are shared with a central server. However, the security of FL rests on the assumption that "sharing gradients is not sharing data." This research challenges that assumption, proving that the complex structure of diffusion models can actually be exploited to facilitate data recovery.
Methodology: Breaking the Diffusion Shield
Diffusion models learn to reverse a process of adding Gaussian noise ($\epsilon$) to an image over multiple timesteps ($t$). For an attacker, the combination of unknown noise and timesteps creates an enormous search space, often referred to as the "curse of dimensionality." Previous inversion techniques typically resulted in unrecognizable, blurry outputs when applied to these complex models.
The GIDM Framework
To overcome these challenges, the authors propose a two-phase "fusion optimization" strategy:
- Phase 1 (Generative): Instead of optimizing directly in pixel space, GIDM uses the partially trained diffusion model as a "prior." It searches through a lower-dimensional latent space to find an image that aligns with the model's learned distribution and produces a similar gradient. This phase effectively recovers the global structure, layout, and style of the original image.
- Phase 2 (Fine-tuning): Once a representative image is found, the algorithm switches to pixel-wise optimization. This stage sharpens the details and adjusts the image to match the client's shared gradient exactly.
For scenarios where noise and timesteps are kept private by the client, the authors developed GIDM+. This advanced version introduces three independent optimizers that simultaneously estimate the image, the noise, and the timestep, effectively breaking through additional layers of privacy protection.
Experimental Evaluation
The attack was evaluated on three standard benchmarks:
- CelebA: High-resolution (128x128) human face images.
- LSUN-Bedroom: High-resolution (128x128) interior design photos.
- CIFAR-100: Lower resolution (32x32) images used primarily for testing the more difficult GIDM+ scenario.
The primary metrics used to assess reconstruction quality were the Structural Similarity Index (SSIM) and Peak Signal-to-Noise Ratio (PSNR).
Results and Discussion
The results indicate a severe privacy risk for federated diffusion training. On the CelebA dataset, GIDM achieved an SSIM of 0.91 and a PSNR of 79.49. Visually, the reconstructed images are almost indistinguishable from the ground truth. In contrast, existing baseline methods like DLG-dm failed completely at 128x128 resolution, achieving an SSIM of only 0.39.
The attack's success on the LSUN-Bedroom dataset was even more pronounced, reaching an SSIM of 0.99. These findings suggest that the generative power of the model being trained acts as a double-edged sword: the model "knows" what real images look like, which allows the attacker to ignore random noise and focus the search on realistic-looking data.
Conclusion and Future Work
This work highlights a critical security flaw in federated diffusion models. The ability to reconstruct high-resolution private data from gradients suggests that current FL protocols are insufficient for protecting sensitive information in generative AI. While resolution scaling remains a computational hurdle for attackers, the fundamental vulnerability is clear. Future research must focus on robust defensive measures, such as Differential Privacy (DP) and gradient compression, to mitigate these risks without destroying the model's performance.
Summary updated