DP-SGD¶
Implements DP-SGD, differentially private SGD via per-example gradient clipping and Gaussian noise.
To bound the influence of any single training example, each per-example gradient is clipped to a fixed \(L_2\) norm \(C\) before aggregation. Calibrated Gaussian noise with standard deviation \(\sigma C\) is then added to the summed clipped gradients, and the result is averaged over the lot of size \(L\). The descent step uses this noisy gradient, yielding a \((\varepsilon, \delta)\)-differential privacy guarantee tracked across steps by the moments accountant.
where \(\theta\) are the parameters, \(\eta_t\) the learning rate, \(g_t(x_i)\) the gradient on example \(x_i\) in the lot, \(C\) the clipping bound, \(\sigma\) the noise multiplier, \(L\) the lot size, and \(\mathcal{N}(0, \sigma^2 C^2 \mathbf{I})\) the spherical Gaussian noise.
Reference: Martín Abadi, Andy Chu, Ian Goodfellow, H. Brendan McMahan, Ilya Mironov, Kunal Talwar, Li Zhang, "Deep Learning with Differential Privacy", ACM CCS 2016. https://arxiv.org/abs/1607.00133