Train models with differential privacy and track epsilon
8 steps · about 3 h · Intermediate
- Define neighbouring datasets and the privacy budget (reference, Wikipedia, 20 min)
Establishes what epsilon and delta guarantee about any single training record's influence.
- See why anonymization alone fails on aggregate queries (guide, Programming Differential Privacy, 20 min)
Motivates formal privacy guarantees with concrete reconstruction and differencing attacks.
- Bound sensitivity and calibrate additive noise (guide, Programming Differential Privacy, 25 min)
Demonstrates how Laplace and Gaussian mechanisms scale noise to the worst-case single-record change.
- Track cumulative privacy loss with composition (guide, Programming Differential Privacy, 25 min)
Explains why repeated queries or training steps spend privacy budget and how moments accounting tightens bounds.
- Read the DP-SGD algorithm and clipping step (article, arXiv, 30 min)
Shows why per-sample gradients must be clipped to a fixed norm before adding Gaussian noise.
- Inspect Opacus's privacy-engine architecture (repo, PyTorch Opacus, 15 min)
Shows how a production library computes per-sample gradients and hooks into standard PyTorch optimizers.
- Train a differentially private classifier end to end (tutorial, PyTorch Opacus, 30 min)
Walks through model validation, PrivacyEngine attachment and logging epsilon at each epoch.
- Tune max_grad_norm, noise_multiplier and target_epsilon (reference, PyTorch Opacus, 15 min)
Documents the exact parameters that govern accuracy versus privacy budget in practice.