DPIS: An Enhanced Mechanism for Differentially Private SGD with Importance Sampling

Jianxin Wei, Ergute Bao, Xiaokui Xiao, Yin Yang

Introduction

Training deep neural networks with Differential Privacy (DP) has become a standard for protecting individual data privacy. The most widely adopted algorithm for this task is DP-SGD (Differentially Private Stochastic Gradient Descent). However, DP-SGD introduces a significant "utility gap," where private models often underperform compared to non-private counterparts. This gap stems from the core mechanism: DP-SGD samples data points uniformly, clips gradients to a fixed bound, and injects Gaussian noise to mask individual contributions. This uniform sampling is inherently high-variance, requiring a high "noise floor" to maintain privacy guarantees.

To address this, we present DPIS (Differentially Private Importance Sampling), a drop-in replacement for the standard DP-SGD optimizer. DPIS significantly boosts the accuracy of private models by sampling training data based on "importance" (gradient norms) rather than uniform randomness, thereby reducing both sampling variance and the total noise required for privacy.

The DPIS Framework

DPIS integrates Importance Sampling (IS) into the DP-SGD framework through four primary components:

  1. Importance Sampling Strategy: Rather than picking records at random, DPIS samples records with a probability proportional to their gradient norm. To maintain an unbiased estimate of the gradient, the algorithm weights the resulting gradients inversely to their sampling probability.
  2. Private Statistics Release: Because sampling probabilities are derived from private data (gradient norms), their release must also be private. DPIS utilizes a rigorous Rényi Differential Privacy (RDP) analysis to account for the additional privacy cost of releasing the sum of these norms.
  3. Efficient Rejection Sampling: Calculating gradients for every record in every iteration to determine importance would be computationally prohibitive ($O(N)$). DPIS employs a rejection sampling strategy that approximates importance sampling with significantly lower overhead ($O(kb)$, where $b$ is the batch size and $k$ is a small constant).
  4. Adaptive Clipping: Standard DP-SGD relies on a fixed clipping bound $C$. In contrast, DPIS adaptively updates this bound based on the observed distribution of gradient norms, preventing information loss from over-clipping and excessive noise from under-clipping.

Key Innovations and Insights

The "Double Win" of Importance Sampling

In non-private machine learning, importance sampling is a well-known variance reduction technique. In the private setting, it offers a unique second benefit: it allows for a smaller noise multiplier. By sampling high-norm gradients more frequently but weighting them less, the overall sensitivity of the batch is reduced. This allows the optimizer to inject less additive noise while maintaining the same privacy guarantee.

Dynamic Noise Levels

Traditional DP-SGD maintains a constant noise level throughout training. In DPIS, as the model converges and gradient norms naturally shrink, the "cost" of the importance sampling statistics decreases. This allows the noise multiplier to trend downward over time—for example, dropping from 0.81 to 0.42 in Fashion MNIST tests—providing a cleaner signal during the critical final stages of training.

Privacy-Utility Efficiency

Experimental results demonstrate that DPIS can achieve the same accuracy as state-of-the-art competitors while using only half the privacy budget ($\epsilon$). This effectively doubles the strength of the privacy guarantee for a given utility target.

Experimental Evaluation

The authors evaluated DPIS across four standard benchmarks: MNIST, Fashion MNIST (FMNIST), CIFAR-10, and IMDb. The IMDb dataset is particularly significant as it utilizes Recurrent Neural Networks (RNNs), which are notoriously difficult to train under DP due to high gradient variance.

  • Accuracy Gains: On the IMDb sentiment analysis task, DPIS achieved 70.2% accuracy at $\epsilon=4$, compared to 67.4% for standard DP-SGD.
  • Consistency: The performance gap was most pronounced in complex tasks like CIFAR-10 and IMDb, where gradient variance is naturally higher and the benefits of importance sampling are most realized.
  • Noise Reduction: Experimental observations confirmed that the noise multiplier in DPIS decreases as training progresses, whereas it remains a flat, high line for traditional DP-SGD.

Limitations and Future Work

While DPIS offers superior utility, it introduces some trade-offs:

  • Computational Overhead: Despite the efficiency of rejection sampling, DPIS is roughly 3–5 times slower than standard DP-SGD because it must check more record gradients to form a single batch.
  • Memory Usage: The mechanism requires storing and updating gradient norm estimates, adding a slight memory overhead.

Future research will focus on further accelerating the training process and expanding the "sampling pool" to improve the quality of the importance sampling approximation in larger-scale models and datasets.

Summary updated

BibTeX
@inproceedings{wei2022dpis,
  author = {Jianxin Wei and Ergute Bao and Xiaokui Xiao and Yin Yang},
  title = {{DPIS: An Enhanced Mechanism for Differentially Private SGD with Importance Sampling}},
  booktitle = {CCS},
  year = {2022},
  doi = {10.1145/3548606.3560562},
}
Figure