Content-Aware Differential Privacy with Conditional Invertible Neural Networks

Malte Tölle, Ullrich Köthe, Florian André, Benjamin Meder, Sandy Engelhardt

TL;DR

This paper introduces Content-Aware Differential Privacy (CADP), a method that uses Conditional Invertible Neural Networks (cINNs) to anonymize images while preserving their diagnostic utility. By adding noise to a structured latent space rather than raw pixels, the authors achieve significantly higher accuracy on downstream tasks compared to traditional private training methods like DP-SGD.

What Problem Does This Paper Address?

Differential Privacy (DP) is the "gold standard" for privacy, but it has a rocky relationship with image data. Standard DP works by adding calibrated noise to data. If you add enough noise to an image to guarantee privacy, you usually end up with a "snowy" mess that is useless for machine learning.

Existing workarounds often involve training Generative Adversarial Networks (GANs) to create entirely synthetic data. However, synthetic data can "hallucinate" features (like fake pathologies in medical scans) or fail to capture the nuances of real-world samples. The challenge is: How can we modify a real image to protect an individual's identity while keeping the specific features (like a tumor or a bone fracture) perfectly intact for a classifier?

Methods

The authors propose using Invertible Neural Networks (INNs), specifically a type of generative model called Normalizing Flows.

  1. The Mapping: An INN learns a bijective (two-way) mapping between the complex distribution of images ($x$) and a simple latent space ($z$), typically a spherical Gaussian.
  2. Conditioning: They use Conditional INNs (cINNs). By conditioning the network on metadata (e.g., a "pneumonia" label), the network learns to separate task-relevant features from "style" or "identity" features in the latent space.
  3. The Perturbation: To achieve $\epsilon$-Differential Privacy, the authors:
  4. Pass a real image through the cINN to get its latent representation $z$.
  5. Clip the $L_1$-norm of $z$ to bound sensitivity.
  6. Add Laplacian noise to $z$.
  7. The Reconstruction: The noisy latent vector $\tilde{z}$ is passed back through the inverse of the same network to produce a privatized image $\tilde{x}$.

Because the noise is added in the latent space, the resulting image looks like a "plausible alternative" version of the original (e.g., a different person's face with the same expression) rather than a corrupted, noisy image.

Datasets

The authors evaluated CADP across a diverse range of data types:

  • MNIST: The classic handwritten digit benchmark.
  • CelebA: A large-scale face attributes dataset used to demonstrate identity anonymization.
  • Medical Imaging: Two high-stakes datasets:
  • Retinal OCT: Optical Coherence Tomography scans (4 classes of eye diseases).
  • Chest X-ray: Scans for detecting pneumonia.
  • Categorical Data: The Diabetes dataset from scikit-learn, proving the method isn't just for pixels.

Key Insights and Ideas

  • Spatial Correlation Matters: Traditional DP fails on images because it ignores the fact that neighboring pixels are highly correlated. By moving to the latent space, CADP perturbs the concepts of the image rather than the raw values.
  • Conditioning as a Utility Shield: By conditioning on the class label during training, the network "knows" which parts of the latent space represent the label. This allows the noise to alter identity-related dimensions while leaving the diagnostic dimensions relatively stable.
  • Robustness to Post-Processing: Because the output is a differentially private image, any subsequent model trained on this data inherits those privacy guarantees. This is a major advantage for multi-center medical collaborations where raw data cannot be shared.

Key Results

The authors compared CADP against DP-SGD, the current industry standard for private deep learning.

  • Higher Utility: On MNIST with a very strict privacy budget ($\epsilon = 0.2$), CADP achieved 92.94% accuracy, outperforming DP-SGD’s 89.24%.
  • Medical Breakthrough: The gap was even wider for complex medical data. On the Retinal OCT dataset, the classifier trained on CADP-privatized data outperformed the DP-SGD baseline by 23.63% on average across various privacy levels.
  • Visual Quality: Qualitatively, the images remain sharp and recognizable to human observers, whereas pixel-level noise or blurring (like in Google Street View) often renders images uninterpretable for both humans and machines.

Limitations and Future Work

  • Information Loss via Clipping: To satisfy the mathematical requirements of DP, the latent vectors must be clipped. This process discards some information, which can occasionally lead to reconstruction artifacts.
  • Latent Space Interpretability: While the method works, we don't yet fully understand which specific dimensions in the latent space correspond to which physical features. The authors suggest that an "in-depth exploration of the latent space" is a necessary next step.
  • Computational Cost: Training INNs to convergence on high-resolution images is more computationally intensive than training standard CNNs.

Summary updated

Abstract

Differential privacy (DP) has arisen as the gold standard in protecting an individual’s privacy in datasets by adding calibrated noise to each data sample. While the application to categorical data is straightforward, its usability in the context of images has been limited. Contrary to categorical data the meaning of an image is inherent in the spatial correlation of neighboring pixels making the simple application of noise infeasible. Invertible Neural Networks (INN) have shown excellent generative performance while still providing the ability to quantify the exact likelihood. Their principle is based on transforming a complicated distribution into a simple one e.g. an image into a spherical Gaussian. We hypothesize that adding noise to the latent space of an INN can enable differentially private image modification. Manipulation of the latent space leads to a modified image while preserving important details. Further, by conditioning the INN on meta-data provided with the dataset we aim at leaving dimensions important for downstream tasks like classification untouched while altering other parts that potentially contain identifying information. We term our method content-aware differential privacy (CADP). We conduct experiments on publicly available benchmarking datasets as well as dedicated medical ones. In addition, we show the generalizability of our method to categorical data. The source code is publicly available at https://github.com/Cardio-AI/CADP .
BibTeX
@inproceedings{tolle2022content,
  author = {Malte Tölle and Ullrich Köthe and Florian André and Benjamin Meder and Sandy Engelhardt},
  title = {{Content-Aware Differential Privacy with Conditional Invertible Neural Networks}},
  booktitle = {DeCaF/FAIR @ MICCAI},
  year = {2022},
  url = {https://openreview.net/forum?id=jY8F9qo-5E},
}

Loading related content...

Figure