Content-Aware Differential Privacy with Conditional Invertible Neural Networks

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

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.

Introduction

Differential Privacy (DP) is widely regarded as the most robust framework for data anonymization, providing mathematical guarantees that the presence or absence of a single individual in a dataset does not significantly affect the output of an algorithm. However, applying DP to high-dimensional image data presents a significant challenge. Traditional DP methods involve adding calibrated noise directly to the data. In the case of images, where information is encoded in the spatial correlation of neighboring pixels, this noise often results in a "snowy" corruption that destroys the diagnostic or semantic utility of the image.

To circumvent this, researchers have explored synthetic data generation using Generative Adversarial Networks (GANs). While promising, synthetic data can suffer from "hallucinations"—the creation of features that do not exist in the original sample—which is particularly dangerous in medical contexts. This paper introduces Content-Aware Differential Privacy (CADP), a novel approach that leverages Conditional Invertible Neural Networks (cINNs) to perturb images in a structured latent space, preserving critical features while satisfying formal privacy requirements.

Methodology

Invertible Neural Networks and Latent Spaces

The core of CADP is the Invertible Neural Network (INN), specifically a class of generative models known as Normalizing Flows. Unlike standard neural networks, INNs learn a bijective (two-way) mapping between the complex distribution of input images ($x$) and a simplified latent space ($z$), typically a spherical Gaussian. Because the mapping is invertible, any point in the latent space can be mapped back to a unique image.

The CADP Pipeline

The authors propose a four-step process to achieve $\epsilon$-Differential Privacy:

  1. Mapping: A real image $x$ is passed through the cINN to determine its latent representation $z$.
  2. Conditioning: The network is trained using conditional metadata (e.g., a disease label $y$). This conditioning encourages the network to disentangle task-relevant features (content) from identity-specific features (style) within the latent space.
  3. Perturbation: To satisfy DP, the $L_1$-norm of the latent vector $z$ is clipped to bound its sensitivity. Laplacian noise is then added to the clipped vector to produce a privatized latent representation $\tilde{z}$.
  4. Reconstruction: The noisy latent vector $\tilde{z}$ is passed through the inverse of the network to generate a privatized image $\tilde{x}$.

By adding noise in the latent space rather than the pixel space, the resulting modifications appear as plausible variations of the original image (e.g., changing the specific contours of a face while maintaining the expression) rather than random corruption.

Experimental Evaluation

The authors evaluated CADP across several benchmarks, comparing its performance against DP-SGD, the standard method for training private models.

Benchmarking and Utility

  • MNIST: On the classic handwritten digit dataset, CADP achieved an accuracy of 92.94% under a strict privacy budget of $\epsilon = 0.2$, significantly outperforming the 89.24% achieved by DP-SGD.
  • Medical Imaging: The method showed its greatest strength in high-stakes medical datasets. On the Retinal OCT (Optical Coherence Tomography) dataset, classifiers trained on CADP-privatized data outperformed DP-SGD baselines by an average of 23.63% across various privacy levels. Similar success was observed in Chest X-ray scans for pneumonia detection.
  • Identity Anonymization: Using the CelebA dataset, the authors demonstrated that CADP could alter identifying facial attributes while preserving the underlying characteristics required for classification.
  • Generalizability: Beyond images, the method was successfully applied to the Diabetes dataset, demonstrating that the latent-space perturbation approach is effective for categorical data as well.

Discussion and Key Insights

Spatial Correlation and Concept Perturbation

Traditional DP fails on images because it treats pixels as independent entities. CADP succeeds because the latent space of a cINN captures the "concepts" of an image. Perturbing these concepts allows the model to maintain the structural integrity and semantic meaning of the data, which is vital for downstream machine learning tasks.

The Role of Conditioning

Conditioning the INN on class labels acts as a "utility shield." By informing the network which features are essential for the task at hand, the noise can be directed toward dimensions that contain identifying information while leaving diagnostic dimensions relatively stable. This ensures that the privatized images remain useful for multi-center medical collaborations where raw data sharing is prohibited.

Limitations and Future Work

While CADP represents a significant step forward, the authors note several areas for improvement. The requirement to clip latent vectors to satisfy DP can lead to information loss and occasional reconstruction artifacts. Furthermore, while the latent space is more structured than pixel space, it is not yet fully interpretable; identifying exactly which dimensions correspond to specific physical features remains an open research question. Finally, training INNs is computationally more demanding than training standard convolutional neural networks, which may limit scalability for extremely high-resolution imagery.

Conclusion

Content-Aware Differential Privacy (CADP) provides a robust framework for anonymizing sensitive image data without sacrificing the utility required for deep learning. By moving the privacy mechanism from the pixel level to a structured, conditional latent space, CADP bridges the gap between mathematical privacy guarantees and the practical needs of medical and scientific research.

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},
}
Figure