Differential Privacy Budget
(ε, δ)-differential privacy: ε bounds privacy loss; δ is probability of failure (typically 1/n²). Lower ε = stronger privacy. Apple uses ε≈8; medical/Census often ε<0.1–1. RDP gives tighter composition than basic.
Why This ML Metric Matters
Why: Differential privacy ensures ML models don't leak individual data. ε (epsilon) bounds the max privacy loss; δ is the failure probability. Production systems use RDP accounting for tight bounds.
How: Enter dataset size, batch size, epochs, noise multiplier σ, delta δ, clipping norm. Select mechanism (Gaussian/Laplace) and composition method (RDP recommended). Calculator computes ε and privacy level.
- ●ε<0.1 for medical/Census
- ●Apple uses ε≈8
- ●RDP 2–10× tighter than basic
- ●δ < 1/n² rule of thumb
Differential Privacy Budget Calculator
Calculate ε (epsilon) and δ (delta) via RDP accounting. Model Apple (ε≈8), Google Federated, US Census (ε<0.1), and medical standards.
📊 Quick Examples — Click to Load
DP-SGD Parameters
ε vs Epochs
Privacy–Utility Tradeoff (ε vs σ)
For educational and informational purposes only. Verify with a qualified professional.
🤖 AI & ML Facts
Apple uses ε≈8 for on-device learning (Learning with Privacy at Scale)
— Apple
US Census Bureau uses ε≈0.1–1 for 2020 Census data release
— Census Bureau
Abadi et al. 2016 introduced DP-SGD with Gaussian noise and moment accounting
— Abadi 2016
Meta Opacus provides PyTorch primitives for DP training with RDP accounting
— Opacus
📋 Key Takeaways
- • (ε, δ)-differential privacy: ε bounds privacy loss; δ is probability of failure (typically 1/n²)
- • Lower ε = stronger privacy. Apple uses ε≈8; medical/Census often ε<0.1–1
- • RDP (Rényi DP) gives tighter composition than basic composition — use for production
- • Sampling rate q = batch/dataset affects privacy: smaller batches = more privacy per step
- • Noise multiplier σ: higher σ = more privacy, lower utility. Typical range 0.5–4
- • Gradient clipping (C) limits per-sample influence; essential for DP-SGD
💡 Did You Know
📖 How It Works
1. DP-SGD Pipeline
Per batch: clip gradients to norm C, add Gaussian noise N(0, σ²C²), then update. Each step is (ε_step, δ)-DP.
2. Composition
Basic: ε_total ≈ T × ε_step. Advanced/RDP: use Rényi divergence for tighter bounds (Abadi 2016).
3. Sampling Amplification
Subsampling (q < 1) amplifies privacy. With Poisson sampling, privacy improves by ~1/√q.
4. Epsilon Interpretation
ε is the max log-ratio of output probabilities on neighboring datasets. ε=1 means ~2.7× difference; ε=0.1 means ~1.1×.
5. Delta
δ is the probability of a catastrophic privacy breach. Rule of thumb: δ < 1/n² where n = dataset size.
🎯 Expert Tips
Use RDP accounting
RDP gives 2–10× tighter epsilon than basic composition. Opacus and TF Privacy use it by default.
Set δ < 1/n²
For n=100k, δ=1e-10 is safe. For n=1M, use δ=1e-12.
Tune σ first
Start with σ=1–2, then adjust epochs/batch to hit target ε. Larger σ = more privacy, less accuracy.
Clip norm C
C=1 is common. For large gradients, try C=0.5–2. Too small = gradient starvation; too large = weak DP.
⚖️ Privacy Standards by Use Case
| Use Case | Typical ε | δ | Source |
|---|---|---|---|
| Apple on-device ML | ~8 | 1e-10 | Apple Learning with Privacy |
| Google Federated | 1–10 | 1e-8 | Google FL papers |
| US Census | 0.1–1 | 1e-10 | Census Bureau |
| Medical / HIPAA | <0.1 | 1e-6 | Healthcare DP guidelines |
| Strong privacy research | 0.01–0.1 | 1e-10 | Academic benchmarks |
❓ Frequently Asked Questions
What is epsilon (ε) in differential privacy?
ε bounds the maximum log-ratio of output probabilities on neighboring datasets. Lower ε = stronger privacy. ε=1 means outputs can differ by at most e≈2.7×; ε=0.1 means ~1.1×.
What is delta (δ)?
δ is the probability of a catastrophic privacy breach. Rule of thumb: δ < 1/n² where n = dataset size. For n=100k, δ=1e-10 is common.
Why use RDP instead of basic composition?
RDP (Rényi DP) gives 2–10× tighter epsilon bounds. Basic composition is loose; RDP moment accounting (Abadi 2016) is the industry standard.
What noise multiplier (σ) should I use?
σ=1–2 is common for DP-SGD. Higher σ = more privacy, lower accuracy. Start with σ=1.2 (Apple-style) and tune.
How does gradient clipping help?
Clipping limits per-sample gradient norm to C. Without it, one sample could dominate and leak information. C=1 is typical.
Apple vs Census vs Medical — which ε?
Apple: ε≈8 (utility-focused). Census: ε≈0.1–1 (strong). Medical: ε<0.1 (strict). Choose by sensitivity of data.
What is Bayes security?
β measures worst-case adversary success at distinguishing outputs. β→0 = strong privacy; β→1 = weak. β ≈ 1 - exp(-ε/4) is a simplified bound.
Gaussian vs Laplace mechanism?
Gaussian is standard for DP-SGD (smooth, well-studied). Laplace is used for counting queries. This calculator focuses on Gaussian (DP-SGD).
📊 Differential Privacy by the Numbers
📚 Official Sources
⚠️ Disclaimer: This calculator provides simplified DP budget estimates for educational and planning purposes. Production systems should use verified libraries (Opacus, TensorFlow Privacy) with proper RDP accounting. Epsilon bounds are approximations; actual privacy depends on implementation details. Consult privacy experts for compliance (HIPAA, GDPR, Census).
Related Calculators
AI Fairness & Bias Calculator
Calculate demographic parity, equalized odds, equal opportunity, and disparate impact ratio. Based on IBM AIF360 and Microsoft Fairlearn.
Machine LearningML Carbon Footprint Calculator
Estimate CO2 emissions from ML training. Calculate energy consumption, carbon equivalents, and compare to everyday activities.
Machine LearningActivation Memory Calculator
Estimate activation memory with and without gradient checkpointing. Based on NVIDIA selective recomputation research.
Machine LearningAttention Head Configuration Calculator
Configure MHA, MQA, and GQA attention. Calculate head counts, dimensions, KV cache savings, and memory per attention type.
Machine LearningBatch Size & Learning Rate Calculator
Calculate optimal learning rates using linear and square root scaling rules. Visualize warmup and cosine/linear schedules.
Machine LearningCompute-Optimal Model Size Calculator (Chinchilla)
Find the compute-optimal model size and training tokens given a compute budget using Chinchilla scaling laws.
Machine Learning