Subsampling is not Magic: Why Large Batch Sizes Work for Differentially Private Stochastic Optimisation
Ossi Räisä, Joonas Jälkö, Antti Honkela
TL;DR
This paper analyzes how batch size affects gradient variance in DP-SGD, decomposing it into subsampling- and noise-induced components. It proves that in the limit of many iterations, the DP-noise scale grows linearly with the subsampling rate, making the effective noise variance invariant to batch size, while the subsampling variance decreases with larger batches, reducing the total variance. Empirical results show the asymptotic regime is reached quickly and that, even outside it, large batches can further reduce DP variance, providing a theoretical explanation for the observed benefits of large batch sizes in DP-SGD. The findings advance the theoretical understanding of DP-SGD privacy-utility trade-offs and guide practical batch-size choices under differential privacy constraints.
Abstract
We study how the batch size affects the total gradient variance in differentially private stochastic gradient descent (DP-SGD), seeking a theoretical explanation for the usefulness of large batch sizes. As DP-SGD is the basis of modern DP deep learning, its properties have been widely studied, and recent works have empirically found large batch sizes to be beneficial. However, theoretical explanations of this benefit are currently heuristic at best. We first observe that the total gradient variance in DP-SGD can be decomposed into subsampling-induced and noise-induced variances. We then prove that in the limit of an infinite number of iterations, the effective noise-induced variance is invariant to the batch size. The remaining subsampling-induced variance decreases with larger batch sizes, so large batches reduce the effective total gradient variance. We confirm numerically that the asymptotic regime is relevant in practical settings when the batch size is not small, and find that outside the asymptotic regime, the total gradient variance decreases even more with large batch sizes. We also find a sufficient condition that implies that large batch sizes similarly reduce effective DP noise variance for one iteration of DP-SGD.
