DP2-VAE: Differentially Private Pre-trained Variational Autoencoders

Dihong Jiang, Guojun Zhang, Mahdi Karami, Xi Chen, Yunfeng Shao, Yaoliang YuarXiv 2022

Abstract

Modern machine learning systems achieve great success when trained on large datasets. However, these datasets usually contain sensitive information (e.g. medical records, face images), leading to serious privacy concerns. Differentially private generative models (DPGMs) emerge as a solution to circumvent such privacy concerns by generating privatized sensitive data. Similar to other differentially private (DP) learners, the major challenge for DPGM is also how to achieve a subtle balance between utility and privacy. We propose DP$^2$-VAE, a novel training mechanism for variational autoencoders (VAE) with provable DP guarantees and improved utility via pre-training on private data. Under the same DP constraints, DP$^2$-VAE minimizes the perturbation noise during training, and hence improves utility. DP$^2$-VAE is very flexible and easily amenable to many other VAE variants. Theoretically, we study the effect of pretraining on private data. Empirically, we conduct extensive experiments on image datasets to illustrate our superiority over baselines under various privacy budgets and evaluation metrics.

Introduction

Training generative models like GANs or VAEs on sensitive data—such as medical records or face images—poses a significant privacy risk. Malicious actors can perform "model inversion attacks" to reconstruct training samples from the model's weights. Differential Privacy (DP) is the gold standard for preventing this, typically achieved by adding noise during training (DP-SGD). However, there is a notorious privacy-utility trade-off: the more noise added to protect privacy, the worse the model performs.

While pre-training on public data helps, many domains (like healthcare) lack relevant public datasets. Pre-training on private data is usually considered a "no-go" because the pre-training process itself can leak information. DP$^2$-VAE addresses this by asking: How can we safely use private data to pre-train a model before we even start the formal DP training process?

Methods

The authors propose a two-stage framework called DP$^2$-VAE:

  1. Stage 1: Private Pre-training (The "Internal" Phase): The private dataset is split into $K$ small subsets. For each subset, a separate encoder-decoder pair is trained non-privately but with gradient clipping. At the end of this stage, the decoders are discarded, and only the $K$ encoders are kept. Crucially, these encoders are never released to the public.
  2. Stage 2: DP Training (The "Public" Phase): A brand-new decoder is initialized from scratch. In each training step, the algorithm randomly selects one of the pre-trained encoders from Stage 1. This encoder processes its corresponding private data subset to provide high-quality latent representations to the new decoder. The decoder is then updated using DP-SGD (clipping gradients and adding Gaussian noise).

The "Aha!" Moment: Because the decoder is initialized randomly in Stage 2 and all its updates are protected by DP noise, the final released decoder is provably private. The encoders act as "warm-start" guides that have already learned the structure of the data, but since they remain internal, they do not break the privacy budget of the released model.

Experimental Evaluation

The researchers evaluated DP$^2$-VAE on standard computer vision benchmarks including MNIST, Fashion MNIST, and CelebA. The method was compared against several State-of-the-Art (SoTA) baselines, including GS-WGAN and G-PATE.

Visual comparison of generated MNIST digits across different differentially private generative models.

Key Results

  • Utility (Classification Accuracy): On MNIST, a classifier trained on synthetic data from DP$^2$-VAE achieved 81.2% accuracy (with a privacy budget of $\epsilon=10$). As shown in the quantitative results below, this is comparable to or better than most GAN-based private generators.
  • Image Quality (FID): The Fréchet Inception Distance (FID) was 134.3 for DP$^2$-VAE. While some GAN models achieved lower FID (sharper images), the VAE approach provided a more stable training process and better density estimation.
Quantitative performance on MNIST at $\epsilon=10$ comparing FID and classification accuracy across various architectures.

Discussion and Conclusion

DP$^2$-VAE leverages the asymmetry of VAEs—where only the decoder is needed for generation—to keep "leaky" pre-trained encoders hidden while privatizing the useful decoder component. This avoids the "fine-tuning trap" where starting weights might contain private info.

However, limitations remain. The method requires training a large number of encoders ($K=2500$ in this study), which is computationally intensive. Additionally, like most VAEs, the generated images tend to be slightly blurrier than those produced by GANs. Scaling DP generative models to high-resolution, complex images remains an open challenge for the field due to the massive amount of noise required by DP constraints.

Summary updated

BibTeX
@misc{jiang2022dp,
  author = {Dihong Jiang and Guojun Zhang and Mahdi Karami and Xi Chen and Yunfeng Shao and Yaoliang Yu},
  title = {{DP2-VAE: Differentially Private Pre-trained Variational Autoencoders}},
  year = {2022},
  eprint = {2208.03409},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2208.03409},
}
Figure