the.ai

Privacy / Optimization

verified

DP-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.

Viz primitive · loss-curvesteps = 2000 · lr = 0.002 · batch = 4 · params = 1
loss
step 02000

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.

4

Reviewed by opendroid · 2026-08-18