Subsampling is not Magic: Why Large Batch Sizes Work for Differentially Private Stochastic Optimisation

Ossi Räisä, Joonas Jälkö, Antti Honkela
2/6/2024
stat.MLcs.CRcs.LG

No official code found. Best implementation: DPBayes/subsampling-is-not-magic (0 stars, last commit 2024-05-29).

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.

View on arXivView PDF

Code Implementations(1)

This repository contains the code and Mathematica notebooks for the "Subsampling is not Magic: Why Large Batch Sizes Work for Differentially Private Stochastic Optimisation" paper

00Shell, PythonMay 29, 20242 years ago

Cite this paper

@article{ris2024subsampling,
  title  = {Subsampling is not Magic: Why Large Batch Sizes Work for Differentially Private Stochastic Optimisation},
  author = {Ossi Räisä and Joonas Jälkö and Antti Honkela},
  year   = {2024},
  eprint = {2402.03990},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.03990v3},
  journal = {ICML 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.03990.svg)](https://codeofpaper.com/paper/2402.03990)

Discussion