On the Connection between Differential Privacy and Adversarial Robustness in Machine Learning

Mathias Lécuyer, Vaggelis Atlidakis, Roxana Geambasu, Daniel Hsu, Suman Jana

This paper, "Certified Robustness to Adversarial Examples with Differential Privacy," introduces a novel framework called PixelDP. It bridges the gap between differential privacy (DP)—a field traditionally focused on data privacy—and adversarial robustness, providing a scalable way to mathematically guarantee that a machine learning model won't be fooled by small input perturbations.

TL;DR

PixelDP is the first certified adversarial defense that scales to large-scale models like Inception on ImageNet. By treating image pixels as database records and applying differential privacy mechanisms, the authors provide a rigorous, model-agnostic way to guarantee a model's prediction remains stable under norm-bounded attacks.

What Problem Does This Paper Address?

Deep Neural Networks (DNNs) are notoriously fragile. An attacker can add human-imperceptible noise to an image (an "adversarial example") to flip a model's prediction—for instance, making a self-driving car see a "Stop" sign as a "Yield" sign.

While many "best-effort" defenses exist, they are often broken by newer, more sophisticated attacks. "Certified defenses" offer a mathematical guarantee of robustness, but until this paper, they were largely limited to small datasets (like MNIST) or specific, simple network architectures. The authors tackle the challenge of creating a defense that is both rigorous (provably robust) and scalable (works on real-world models and datasets).

Methods

The core innovation is the DP-Robustness Connection. In DP, an algorithm is "private" if its output distribution doesn't change much when one record in a database is altered. The authors realized that if you treat an image as a database and its pixels as records, DP techniques can be used to bound how much a model's prediction changes when pixels are perturbed.

The PixelDP Architecture

  1. Noise Layer: The authors insert a DP noise layer (using either Laplace or Gaussian mechanisms) early in the network. This layer adds calibrated noise to the activations.
  2. Sensitivity Control: To ensure the noise provides a specific guarantee, the "sensitivity" (how much the output changes relative to the input) of the layers before the noise must be bounded. The authors use techniques like matrix norm bounds and Parseval tight frames to achieve this.
  3. Certified Prediction: At inference time, the model doesn't just run once. It uses Monte Carlo sampling—running the noisy network multiple times to estimate the expected score for each label.
  4. Robustness Check: Using statistical bounds (like Hoeffding’s inequality), the system calculates if the gap between the top-scoring label and the runners-up is large enough to guarantee that no attack of a certain size ($L$) could possibly flip the result.
Fig. 1: Architecture. (a) In blue, the original DNN. In red, the noise layer that provides the (ϵ, δ)-DP guarantees. The noise can be added to the inputs or any of the following layers, but the distribution is rescaled by the sensitivity ∆p,q of the computation performed by each layer before the noise layer. The DNN is trained with the original loss and optimizer (e.g., Momentum stochastic gradient descent). Predictions repeatedly call the (ϵ, δ)-DP DNN to measure its empirical expectation over the scores. (b) After adding the bounds for the measurement error between the empirical and true expectation (green) and the stability bounds from Lemma 1 for a given attack size Lattack (red), the prediction is certified robust to this attack size if the lower bound of the arg max label does not overlap with the upper bound of any other labels.

For massive models like Google's Inception-v3, the authors used a clever "Option 4": they trained a separate PixelDP auto-encoder and stacked it in front of the pre-trained, unmodified Inception model. Because DP is robust to "post-processing," the entire stack becomes certified without needing to retrain the massive base model from scratch.

Datasets

The authors evaluated PixelDP across a range of standard benchmarks:

  • MNIST: Grayscale handwritten digits (the "hello world" of ML).
  • SVHN: Street View House Numbers.
  • CIFAR-10 & CIFAR-100: Small color images of objects/animals.
  • ImageNet: A large-scale dataset with over 1 million images and 1,000 classes.

Key Insights and Ideas

  • The Post-Processing Property: This is the "secret sauce." In DP, if a function is private, any further computation performed on its output is also private. This allows PixelDP to be network-agnostic; you can protect the input or an early layer, and the rest of the complex DNN inherits that protection.
  • Certified Accuracy vs. Conventional Accuracy: The authors emphasize that a model shouldn't just be right; it should be provably right. They use "certified accuracy" to measure the fraction of test samples that are both correctly classified and guaranteed robust against a specific attack size.
  • Nuanced Certificates: Instead of a simple "yes/no" for robustness, PixelDP can calculate $L_{max}$—the maximum attack size a specific prediction can withstand.
The formula used to calculate the maximum certified attack size (L_max) for a given prediction.

Key Results

  • Scalability: PixelDP provided the first-ever certified robustness bounds for ImageNet. For an $\ell_2$-norm attack of 0.09, it maintained a certified accuracy of 59% on ImageNet, with only an 8.5% drop in clean accuracy compared to the undefended baseline.
  • Competitive Performance: On CIFAR-10, PixelDP's accuracy (87%) matched the state-of-the-art "best-effort" defense (Madry et al.) while providing the added benefit of theoretical guarantees.
  • Training Efficiency: Unlike other certified defenses that require complex optimization at every training step, PixelDP adds negligible overhead to training (around 1.5%).

Limitations and Future Work

  • $\ell_\infty$ Norm Attacks: While PixelDP excels at $\ell_1$ and $\ell_2$ norm defenses, its current bounds for $\ell_\infty$ attacks (often considered the most challenging) are "crude" and less competitive than specialized, non-scalable defenses.
  • Inference Latency: The Monte Carlo sampling required for certification is computationally expensive. While parallelizable, it can slow down predictions by 3x to 42x depending on the required confidence level.
  • Tightness of Bounds: The authors acknowledge that their sensitivity bounds for certain layers are suboptimal. Future work involves finding tighter bounds to improve the strength of the certificates without increasing noise.

Summary updated

BibTeX
@inproceedings{lecuyer2019connection,
  author = {Mathias Lécuyer and Vaggelis Atlidakis and Roxana Geambasu and Daniel Hsu and Suman Jana},
  title = {{On the Connection between Differential Privacy and Adversarial Robustness in Machine Learning}},
  booktitle = {IEEE Symposium on Security and Privacy},
  year = {2019},
  doi = {10.1109/sp.2019.00044},
}
Figure