Privacy / Optimization
verifiedDP-SGD
Train a model with a privacy guarantee by doing two things to every gradient step: clip each example's gradient so no single record can push far, then add noise to the sum. The result is a model whose weights carry a bounded amount about any one person, at the cost of accuracy and a great deal of compute.
Clipping is per-example rather than per-batch, which is what breaks the usual efficiency of batched autodiff and makes the method expensive. The noise multiplier and the clipping norm interact — tighter clipping means less noise needed for the same ε but more bias in the direction of the update — and large batches help, because the noise added is per-step while the signal grows with batch size.
Clip each per-example gradient to norm at most C, sum, add Gaussian noise of scale σC, and divide by the batch size. Privacy accounting over T steps at sampling rate q gives ε growing roughly as q√(T log(1/δ))/σ. Since q is the batch size over the dataset size, at a fixed number of epochs ε grows with the SQUARE ROOT of the batch while the signal-to-noise ratio per step grows linearly with it — a favourable trade rather than a free one, and the reason DP training uses batches far larger than ordinary training.
Loss over 2000 training steps, starting near 7.2. It falls to about 1.94, with 91% of the total improvement arriving in the first half.
Training loss under per-example clipping and added noise. Drag the batch size up to watch the run steady — noise is added once per step whatever the batch, so the signal grows with it and the privacy cost does not.
Reviewed by opendroid · 2026-08-18
- arXiv:1607.00133 — Deep Learning with Differential Privacy
- arXiv:2007.14191 — Tempered Sigmoid Activations for Deep Learning with Differential Privacy