Learning to be adversarially robust and differentially private

Jamie Hayes, Borja Balle, M. Pawan KumararXiv 2022

Abstract

We study the difficulties in learning that arise from robust and differentially private optimization. We first study convergence of gradient descent based adversarial training with differential privacy, taking a simple binary classification task on linearly separable data as an illustrative example. We compare the gap between adversarial and nominal risk in both private and non-private settings, showing that the data dimensionality dependent term introduced by private optimization compounds the difficulties of learning a robust model. After this, we discuss what parts of adversarial training and differential privacy hurt optimization, identifying that the size of adversarial perturbation and clipping norm in differential privacy both increase the curvature of the loss landscape, implying poorer generalization performance.

Introduction

In the pursuit of "trustworthy AI," researchers frequently target two critical objectives: Adversarial Robustness—ensuring models are resilient against malicious input perturbations—and Differential Privacy (DP)—guaranteeing that models do not leak sensitive training data. While both are individually desirable, their combination often results in a significant "performance tax," leading to a substantial drop in model accuracy compared to standard training.

This paper investigates the underlying reasons for this performance degradation. By examining how the constraints of privacy, such as gradient clipping and noise injection, interact with the requirements of robustness, the authors quantify the widening gap between standard (nominal) risk and adversarial risk when privacy is enforced. The core finding is that both techniques increase the curvature, or sharpness, of the loss landscape, which fundamentally hinders optimization and generalization.

Theoretical Analysis and the Dimensionality Tax

The research begins with a theoretical analysis of logistic regression on linearly separable synthetic data. This simplified model allows for the derivation of explicit convergence rates across four distinct settings: nominal training, robust training, private training, and the combined private-robust setting.

A key discovery is the Dimensionality Tax. Differential privacy introduces an error term that scales with the dimensionality of the data ($d$). In the combined setting, this $d$-dependent term acts as a multiplier, making it significantly more difficult for the model to close the gap between its standard performance and its robust performance as the complexity of the input space grows.

Figure 2: The gap between adversarial and nominal risk increases significantly with data dimensionality (d) in private settings compared to the non-private baseline.

Curvature: The Culprit of Poor Generalization

Beyond dimensionality, the authors identify the Hessian (the matrix of second-order derivatives) as a primary driver of optimization difficulty. They prove that the curvature of the loss landscape is heavily influenced by the ratio of the adversarial budget ($c$) to the magnitude of the model weights.

Both adversarial training and the gradient clipping required for DP increase the "sharpness" of the loss landscape. In deep learning, sharp minima are well-known to generalize poorly. The study demonstrates that a smaller adversarial budget and larger clipping norms (less aggressive clipping) lead to smoother solutions with lower Hessian eigenvalues. Conversely, the aggressive clipping needed for high privacy levels restricts weights in a manner that maintains a sharp, difficult-to-optimize landscape.

Figure 6: Heatmap showing that smaller clipping norms (k) and larger attack budgets (c) lead to higher maximum Hessian eigenvalues, indicating a sharper loss landscape.

Empirical Results and Optimization Hierarchy

The theoretical findings were validated using MNIST and CIFAR-10 datasets. On MNIST, a nominal model achieved 99.03% accuracy, but the introduction of privacy ($\epsilon=3.8$) and robustness (perturbation size 0.3) caused accuracy to fall to 94.43%.

The experiments reveal a clear "hierarchy of risk" in optimization difficulty:

  1. Nominal Training: The most straightforward optimization path.
  2. Robust Training: Introduces moderate difficulty.
  3. Private Training: Generally harder than standard robust training.
  4. Private & Robust: The most challenging regime, incurring the highest loss and slowest convergence.

Empirical tests confirmed that models with smaller maximum Hessian eigenvalues consistently achieved better test accuracy, validating the theoretical link between landscape smoothness and generalization performance.

Conclusion and Future Directions

This work clarifies why combining adversarial robustness and differential privacy is so challenging: it is a "double whammy" that increases loss landscape curvature while introducing dimensionality-dependent errors. While the paper identifies the root causes of the trade-off, it highlights several open challenges. Future research is needed to develop optimization techniques that can "smooth" the loss landscape without compromising privacy or robustness, particularly for non-convex deep neural networks where current theoretical bounds are not yet tight.

Summary updated

BibTeX
@misc{hayes2022learning,
  author = {Jamie Hayes and Borja Balle and M. Pawan Kumar},
  title = {{Learning to be adversarially robust and differentially private}},
  year = {2022},
  eprint = {2201.02265},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2201.02265},
}
Figure