Statistical Inference for Differentially Private Stochastic Gradient Descent

Xintao Xia, Linjun Zhang, Zhanrui CaiarXiv 2025 · OpenReview

TL;DR

While Differentially Private Stochastic Gradient Descent (DP-SGD) is the gold standard for training machine learning models on sensitive data, quantifying the uncertainty of its outputs (e.g., building confidence intervals) has remained an open challenge. This paper solves this problem by deriving the asymptotic distribution of DP-SGD, showing that its variance cleanly decomposes into statistical, sampling, and privacy components. Leveraging this insight, the authors introduce two practical methods—plug-in and random scaling—to construct valid, privacy-preserving confidence intervals.

What Problem Does This Paper Address?

When deploying machine learning models in high-stakes fields like medicine or finance, understanding the uncertainty of a model's parameters is just as important as the parameters themselves. Traditionally, statisticians use confidence intervals to quantify this uncertainty. However, when data is sensitive, we must use frameworks like Differential Privacy (DP) to ensure individual data points cannot be reverse-engineered from the model.

The standard algorithm for this is DP-SGD, which protects privacy by randomly subsampling mini-batches and adding noise to the gradients. Here lies the conflict: existing statistical inference frameworks for SGD assume a cyclic data-loading rule (looping through data sequentially). DP-SGD, however, requires a randomized sampling rule to amplify privacy guarantees. This randomized sampling introduces complex, cascading dependencies across optimization steps, breaking standard central limit theorems. As a result, researchers have lacked a reliable method to perform statistical inference on DP-SGD outputs.

Methods

The authors bridge the gap between privacy and statistical inference through a multi-step theoretical framework:

  1. Asymptotic Distribution of Randomized SGD: Before tackling privacy, they use techniques from survey sampling to map out the behavior of non-private SGD under a randomized rule. They prove that the estimator is asymptotically normal but suffers a variance inflation factor based on batch size and iteration count.
  2. Variance Decomposition for DP-SGD: They extend this to DP-SGD, proving a remarkably clean result: the total asymptotic variance of the DP-SGD estimator is the sum of three independent components: $$\phi_{total} = \phi_{stat} \text{ (statistical variance)} + \phi_{sam} \text{ (sampling variance)} + \phi_{privacy} \text{ (privacy noise variance)}$$
  3. Confidence Interval Construction: They propose two distinct strategies to build valid confidence intervals:
  4. Plug-in Method: Directly estimates the Hessian and score covariance matrices from the data, injects calibrated Gaussian noise to keep the estimation private, and applies a finite-sample correction to account for the added noise.
  5. Random Scaling Method: A clever alternative that treats the optimization trajectory ($\theta^{(t)}$) as a stochastic process. By analyzing the path of the iterates, it constructs an asymptotically pivotal statistic. This completely bypasses the need to estimate covariance matrices separately, saving precious privacy budget.
  6. Gradient Clipping Analysis: They prove that standard gradient clipping (essential for bounding privacy sensitivity) does not alter the asymptotic distribution because the clipping mechanism becomes safely inactive as the algorithm converges toward the true parameter value.

Datasets

The paper evaluates its methods using both simulation and real-world data:

  • Synthetic Datasets: Used to simulate linear and logistic regression models under various covariance structures (Identity and Toeplitz) to rigorously test coverage rates across different sample sizes.
  • The Student Achievement and Retention (STAR) Project: A real-world dataset from a randomized trial ($n = 1,399$ students) evaluating the impact of academic support services and financial incentives on first-year college GPAs.

Key Insights and Ideas

  • The "More Iterations" Advantage: DP-SGD adheres to the principle of "more iterations without more privacy loss." The authors show that as the number of iterations ($T$) grows, both the sampling and privacy-induced errors shrink. Asymptotically, DP-SGD can become just as efficient as a non-private full-sample estimator.
  • Trajectory as an Information Source: The random scaling method highlights a profound "aha" moment: the history of the optimization path itself contains enough variance information to perform inference. Instead of spending a privacy budget to calculate data noise, you can look at how much the algorithm "wobbled" during training.
  • Clipping is Asymptotically Free: The realization that gradient clipping is only active during early, unstable iterations means that it doesn't introduce asymptotic bias, clearing the runway for valid statistical inference.

Key Results

  • Variance Inflation Quantified: For non-private randomized SGD, the variance inflates by a factor of $1 + 1/(km)$ (where $m$ is batch size and $k = T/n$) compared to cyclic SGD.
  • 95% Nominal Coverage: In both linear and logistic regression simulations, the proposed plug-in and random scaling methods with finite-sample corrections successfully achieved the target 95% coverage rate, even at modest sample sizes ($n = 500$). Without the authors' finite-sample corrections, standard plug-in methods severely undercovered.
  Coverage Rate vs. Sample Size (Linear Regression - Identity)
  1.00 |----------------------------------------------------- (Nominal 95%)
  0.95 |...o......o......o......o......o......o (Proposed Methods)
  0.90 |
       +-----------------------------------------------------
       500       750      1000     1250     1500   Sample Size (n)
  • DP-SGD vs. DP-GD: DP-SGD dramatically outperformed Differentially Private Gradient Descent (DP-GD). DP-SGD's privacy error scales at a rate of $O_p(1/(n\mu))$, making it independent of the number of iterations and significantly tighter than DP-GD's error.
  • Real-World Validation: On the STAR dataset, the private confidence intervals correctly identified that a combination of academic services and fellowships had a statistically significant positive effect on student performance, matching the conclusions of the non-private oracle baseline.

Limitations and Future Work

  • Smoothness and Convexity Constraints: The theoretical proofs rely heavily on the objective functions being smooth and strongly convex.
  • The Deep Learning Gap: The current framework cannot yet accommodate non-convex loss functions or high-dimensional regimes. Extending these insights to deep neural networks—where multiple local minima and massive parameter spaces complicate things—remains an open and highly challenging problem.
  • Future Horizons: The authors suggest adapting this framework to differentially private zeroth-order optimization methods, such as the Kiefer–Wolfowitz algorithm.

Summary updated

BibTeX
@misc{xia2025statistical,
  author = {Xintao Xia and Linjun Zhang and Zhanrui Cai},
  title = {{Statistical Inference for Differentially Private Stochastic Gradient Descent}},
  year = {2025},
  eprint = {2507.20560},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.20560},
}
Figure