PRECODE - A Generic Model Extension To Prevent Deep Gradient Leakage

Daniel Scheliga, Patrick Mäder, Marco SeelandWACV 2022

TL;DR

This paper introduces PRECODE, a novel, generic module that can be integrated into existing neural network architectures to prevent sensitive training data from being reconstructed from model gradients. Unlike existing methods that often degrade model performance, PRECODE uses variational modeling to effectively disguise gradient information, achieving near-zero reconstruction success rates with minimal impact on training and final model accuracy.

What Problem Does This Paper Address?

Collaborative training, like federated learning, allows multiple parties to train a shared model without directly sharing their private data. However, recent research has revealed a significant privacy vulnerability: attackers can reconstruct sensitive training data from the gradients exchanged between clients and the central server. This "gradient leakage" poses a serious threat, especially in domains like healthcare where data privacy is paramount. Existing defense mechanisms, such as gradient perturbation (e.g., adding noise or quantization), often come with a steep price: reduced model performance, longer training times, or increased data requirements, making them impractical for many real-world scenarios. The paper aims to bridge this gap by proposing a defense that effectively prevents gradient leakage without compromising model utility.

Methods

The core of PRECODE is a variational bottleneck (VB) module. This module is inserted between the last feature extraction layer and the final classification layer of an existing neural network. The VB acts as a probabilistic encoder that maps the network's hidden representation to a latent distribution, from which a new representation is stochastically sampled. This stochastic sampling is key: it ensures that the gradients computed from this new representation are no longer directly tied to the original input data.

Specifically, the VB consists of:

  • A probabilistic encoder (B): This takes the hidden representation z from the base network and models it as a multivariate Gaussian distribution N(μ_b, σ_b).
  • A stochastic decoder (D): This samples a bottleneck feature b from the distribution learned by the encoder.
  • A new representation z_hat: This is generated by the decoder and used for the final prediction.

The training objective is modified to include a Kullback-Leibler divergence term that encourages the latent distribution to match a standard normal distribution, promoting a well-behaved latent space. The reparameterization trick is used to allow gradients to flow through the stochastic sampling process. PRECODE is designed to be generic, meaning it can be applied to various model architectures without requiring significant modifications.

Datasets

The paper evaluates PRECODE on three standard image classification datasets:

  • CIFAR-10: A dataset of 60,000 color images (32x32 pixels) across 10 classes.
  • CIFAR-100: Similar to CIFAR-10 but with 100 classes, making it a more challenging task.
  • Medical MNIST: A dataset of 64x64 grayscale images, with one class having fewer images than the others, representing a more imbalanced scenario.

The authors use these datasets to train both shallow and deep multi-layer perceptrons (MLPs) and a LeNet architecture, evaluating PRECODE's effectiveness across different model complexities.

Key Insights and Ideas

  • Stochasticity as a Privacy Shield: The fundamental insight is that introducing controlled stochasticity into the model's internal representations can effectively break the direct link between input data and output gradients, thus preventing reconstruction.
  • Generic and Integrable Solution: PRECODE is not a new model architecture but a module that can be "plugged into" existing ones, making it highly practical for adoption.
  • Trade-off Reversal: Existing defenses often force a trade-off between privacy and performance. PRECODE aims to achieve strong privacy without this trade-off, which is a significant advancement.
  • Variational Modeling's Dual Role: Variational modeling, typically used for generative tasks, is repurposed here as a powerful tool for privacy enhancement.

Key Results

  • Near-Perfect Privacy: PRECODE consistently reduced the success rate of gradient inversion attacks (measured by SSIM and ASR) to 0% across various models and datasets.
  • Minimal Performance Impact: The introduction of PRECODE resulted in only a slight decrease in training and test accuracy, often less than 1-2%, and did not increase convergence time.
  • Superior to Perturbation Methods: Compared to noisy gradients (NG-3) and gradient compression (GC), PRECODE offered significantly better privacy protection while maintaining much higher model accuracy. For instance, to achieve similar privacy levels as PRECODE, noisy gradient methods required noise levels that severely degraded model performance.
  • Robustness Across Architectures: PRECODE demonstrated effectiveness on both MLPs (which are theoretically more vulnerable to gradient attacks) and convolutional networks like LeNet.
  • Effectiveness Against Different Attacks: The paper shows PRECODE's efficacy against both the Inverting Gradients Attack (IGA) and the Client Privacy Leakage (CPL) attack.

Limitations and Future Work

  • Focus on Optimization-Based Attacks: The study primarily evaluates PRECODE against optimization-based gradient inversion attacks. The authors acknowledge that its effectiveness against purely analytical attacks is not guaranteed, though they suggest that the stochastic nature of PRECODE might inherently complicate such attacks.
  • Limited to Deep Learning Tasks: The current evaluation is focused on image classification tasks. The authors suggest that future work should explore PRECODE's applicability to other domains like natural language processing.
  • Model Complexity and Attack Time: While PRECODE itself adds a negligible computational overhead, the paper notes that more complex models and sophisticated attack strategies (like those requiring extensive parameter tuning or restarts) can still pose challenges, though these were not systematically evaluated due to computational constraints.
  • Future Directions: The authors plan to investigate PRECODE's performance on a wider range of model architectures, datasets, and tasks to further validate its generic applicability.

Summary updated

BibTeX
@inproceedings{scheliga2022precode,
  author = {Daniel Scheliga and Patrick Mäder and Marco Seeland},
  title = {{PRECODE - A Generic Model Extension To Prevent Deep Gradient Leakage}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2022},
}
Figure