Calculator
Pick a mode, enter parameters, then submit. Results appear above the form.
Example data table
These examples help you sanity-check outputs and units.
| Scenario | Δf | ε | δ | b | σ | Expected output |
|---|---|---|---|---|---|---|
| Laplace (compute ε) | 1 | — | — | 1 | — | ε = 1 / 1 = 1 |
| Laplace (compute b) | 1 | 0.5 | — | — | — | b = 1 / 0.5 = 2 |
| Gaussian (compute σ) | 1 | 1 | 1e-5 | — | ≈ 4.84 | σ = sqrt(2 ln(1.25/δ)) |
| Basic composition | — | — | — | — | — | ε_total = k·εᵢ, δ_total = k·δᵢ |
Formula used
- Laplace mechanism: ε = Δf / b and b = Δf / ε. Noise standard deviation is about sqrt(2)·b.
- Gaussian mechanism (classic bound): σ = sqrt(2 ln(1.25/δ)) · Δf / ε. Rearranged: ε = sqrt(2 ln(1.25/δ)) · Δf / σ.
- Basic composition: for k releases, ε_total = Σ εᵢ and δ_total = Σ δᵢ.
- Advanced composition: ε_total = sqrt(2k ln(1/δ'))·ε + k·ε·(e^ε − 1), and δ_total = k·δ + δ'.
How to use this calculator
- Choose a mode for Laplace, Gaussian, or composition planning.
- Set sensitivity based on your query or training statistic.
- Enter epsilon, delta, and noise parameters as needed.
- For repeated releases, set k and per-release values.
- Submit to see results above the form, then export.
CSV and PDF export
After a successful submit, use the buttons in the results card to download CSV or PDF. Exports include your inputs, outputs, and any warnings.
Professional article
Epsilon as a privacy budget
Epsilon quantifies how much an individual record can change the released output. Smaller values generally require more noise and reduce leakage. In many deployments, teams benchmark ε between 0.1 and 8, then justify the choice with impact analysis, threat models, and legal guidance.
Sensitivity and scaling discipline
Sensitivity Δf links your statistic to privacy cost. For counts with bounded contribution, Δf can be 1; for sums, it is the maximum per‑user contribution; for averages, it is the range divided by n. Underestimating Δf silently weakens protection, so document bounding steps and clipping rules.
Laplace mechanism planning
For pure differential privacy, Laplace noise uses b = Δf/ε. The expected absolute noise magnitude is about b, and the standard deviation is √2·b. If Δf = 1 and ε = 0.5, then b = 2 and the standard deviation is about 2.828, which can noticeably blur small signals.
Gaussian mechanism with delta
Approximate (ε, δ) privacy for Gaussian noise often uses σ = √(2 ln(1.25/δ))·Δf/ε. With Δf = 1, ε = 1, and δ = 1e‑5, σ is roughly 4.84. Lowering δ by 10× increases σ through the logarithmic term, which impacts utility more gently than a 10× change in ε.
Composition across training rounds
Repeated releases add privacy loss. Basic composition sums ε and δ across k steps, so k = 50 with εᵢ = 0.2 yields ε_total = 10. Advanced composition can tighten the bound when εᵢ is small, but δ′ must be selected and reported with the final budget.
Operational reporting and audits
Record inputs, bounds, and accountant assumptions alongside the final ε, δ. Exportable reports help reviewers trace sensitivity choices, noise parameters, and composition settings. Pair the budget with empirical utility metrics, such as accuracy drop, AUC change, or confidence‑interval widening, to show balanced governance. As a practical check, graph ε against noise: doubling ε halves b and σ when Δf is fixed. For k‑step training, track ε_total weekly and set alert thresholds, for example 2, 4, and 8. When privacy incidents are simulated, compare attack success rates before and after noise; even a 5% reduction can support stronger policy narratives. Keep deltas explicit, and store approvals with the exported artifacts for review.
FAQs
1) What does a smaller epsilon mean in practice?
Smaller epsilon forces larger noise for the same sensitivity, typically reducing leakage risk but lowering model utility. It is best interpreted as a policy budget, not a probability of identification.
2) How should I choose sensitivity for training metrics?
Define strict per-user contribution bounds, then compute sensitivity from those bounds. Clipping gradients or capping counts is common. Document the bound and how it is enforced during data processing.
3) Why does delta matter for Gaussian noise?
Delta represents a small failure probability in (epsilon, delta) privacy. Lower delta increases the required sigma through a logarithmic term, which usually changes noise more gently than changing epsilon.
4) Can I compare Laplace and Gaussian results directly?
You can compare them as planning approximations, but they target different privacy definitions. Use the same sensitivity assumptions and interpret sigma or b as noise scales affecting utility for your statistic.
5) What does composition tell me for repeated releases?
Composition aggregates privacy loss over multiple outputs, such as training rounds or repeated analytics queries. Basic composition is conservative; advanced bounds can be tighter when per-step epsilon is small.
6) When should I rely on a dedicated accountant instead?
If you use DP-SGD, subsampling, or complex schedules, use a library accountant for accurate tracking. This calculator is best for quick estimation, documentation, and sensitivity-driven scenario comparisons.