
Gaussian mechanism for (epsilon, delta)-differential privacy
Source:R/dp_native.R
morie_dp_gaussian_mechanism.RdAdds N(0, sigma^2) noise with \(\sigma = \Delta_2\sqrt{2\log(1.25/\delta)}/\epsilon\).
Value
list with release, sigma, epsilon,
delta, sensitivity, and warnings when the
classical bound does not apply.
Details
Calibrated to L2 sensitivity, not L1, which is why it beats Laplace for high-dimensional queries. The classical bound above is only valid for \(\epsilon \le 1\); past that it is not a proof of anything, and this function says so rather than returning a number that looks fine.
References
Dwork, C. and Roth, A. (2014). The algorithmic foundations of differential privacy. FnTTCS, 9(3-4), Appendix A.
Examples
round(morie_dp_gaussian_mechanism(10, 1, 0.5, 1e-5, seed = 1)$sigma, 4)
#> [1] 9.6896