Algorithmresearch
Discrete Gaussian mechanism
Also called discrete Gaussian noise, discrete Gaussian sampler.
Adds integer noise with mass proportional to exp(-y^2/(2 sigma^2)), drawn by an exact sampler with only random integers and rational arithmetic, which avoids the flaws of float noise.
- Time
- O(1) expected
- Space
- O(1) extra
- Where
- b = the number of bits of sigma^2 and of the output
- Model
- Word RAM
- Properties
- randomizedexactrandomized
- Evidence
- Proof sketchCode in 1 languages
- Origin
- Clement L. Canonne, Gautam Kamath, Thomas Steinke, 2020
The discrete Gaussian mechanism answers an integer-valued query by releasing , where the noise is an integer with proportional to . This distribution, written , is the discrete Gaussian. It gives the same privacy as the continuous Gaussian mechanism: for sensitivity it is -zCDP. Its main value is that it can be sampled exactly with only uniform random integers and rational arithmetic, with no floating point numbers, no and no square root. Mironov showed in 2012 that float implementations of continuous noise can leak through the low-order bits of their outputs. An exact integer sampler removes that whole class of problems. Canonne, Kamath and Steinke gave the analysis and the sampler in 2020. The same distribution is central in lattice-based cryptography, where it is sampled for a different purpose (see Gaussian sampling over lattices).
In plain words
To hide one person's effect on a count, we add a random whole number to it. Small numbers near zero are likely, and large ones are rare, in the bell shape of the normal curve. This gives the same protection as normal noise with fractions.
The important part is how the random number is drawn. A computer that draws a fraction with limited precision can leave traces in the last digits that point to the true answer. This method draws only whole numbers, by a series of fair choices and exact fractions, so the result has exactly the intended distribution. It needs a few rounds on average.
The problem
Input: the true answer of a query with integer values and sensitivity , and a rational . Output: with , where
The output law must be exact, given a source of uniform random integers, and the computation must use only exact integer and rational arithmetic. The model is the word RAM.
The algorithm
DISCRETE-GAUSSIAN-MECHANISM(v, sigma2) ▷ v = f(x) in Z, sigma2 > 0 rational- 1
t <- floor(sqrt(sigma2)) + 1 ▷ the least integer with t^2 > sigma2 - 2
loop - 3
Y <- DISCRETE-LAPLACE(t) ▷ Pr[Y = y] proportional to exp(-|y|/t) - 4
gamma <- (|Y| - sigma2/t)^2 / (2 sigma2) - 5
C <- BERNOULLI-EXP(gamma) ▷ 1 with probability exp(-gamma) - 6
if C = 1 then return v + Y
Line L1 picks the scale of a discrete Laplace proposal. It is computed without a square root, as the least integer with . Lines L2 to L6 are rejection sampling: line L3 proposes from the discrete Laplace distribution, and lines L4 and L5 accept it with probability . The product of the two weights is , where the second factor does not depend on . So an accepted has exactly the discrete Gaussian law. Each round accepts with probability above .
The two subroutines are Algorithms 1 and 2 of Canonne, Kamath and Steinke.
- BERNOULLI-EXP() returns 1 with probability for rational . For : set , and while a draw from Bernoulli is 1, increase ; return 1 if is odd. The probability that is odd is . For : run the case up to times and return 0 at the first 0; then return BERNOULLI-EXP. A Bernoulli draw is "a uniform integer in is below ".
- DISCRETE-LAPLACE() draws uniform in and keeps it with probability ; draws by counting 1s from BERNOULLI-EXP until the first 0; sets , which is geometric with ratio ; draws a fair sign; starts again if the sign is negative and ; and returns the signed .
The tests of the code on this site pass a seeded generator so that each run repeats. A deployment must use a cryptographic source of randomness, such as the operating system generator, and must keep the exact arithmetic (Mironov 2012; Canonne, Kamath and Steinke 2020).
Example
Let and . Line L1 gives , since is not above but is. Suppose that the proposals are and then , and that the Bernoulli draws are 0 and then 1.
| round | (L3) | (L4) | (L5) | action (L6) | |
|---|---|---|---|---|---|
| 1 | 0.1863 | 0 | reject, go to L3 | ||
| 2 | 2 | 0.9460 | 1 | return |
A proposal of would get . The exact probabilities of the output noise are , and , and its variance agrees with to about 15 digits, from below.
For a count with , this release is -zCDP. Theorem 7 of Canonne, Kamath and Steinke gives the exact at : . The continuous Gaussian with has at the same , so the discrete version is almost the same.
Correctness
Theorem (Canonne, Kamath and Steinke). Given a perfect source of uniform random integers, DISCRETE-GAUSSIAN-MECHANISM stops with probability 1 and returns with exactly. If has sensitivity , the mechanism is -zCDP, and its tight curve is
The proof in proofs/correctness.md checks the two subroutines, then the rejection step of lines L4 and L5, and then the privacy claim. For privacy, completing the square gives
and the Poisson summation formula shows that the last ratio is at most 1. It equals 1 when is an integer.
Proof: The discrete Gaussian sampler is exact and the mechanism is zCDPfull
We work in the word RAM with exact rational arithmetic and assume a source of independent uniform random integers: a call with argument returns each of with probability . For rational , the draw "a uniform integer in is below " is a Bernoulli draw. For write and , so that has mass at .
A loop whose rounds are independent and succeed with the same probability stops with probability 1, after a geometric number of rounds with mean , and its output has the law of one round conditioned on success. We use this fact for each rejection loop.
Lemma 1 (BERNOULLI-EXP, ). The procedure that sets , increases while a Bernoulli draw is 1, and returns 1 if is odd, stops with probability 1 and returns 1 with probability .
Proof. Each , so each draw is valid. The event is that the first draws are 1, so , which tends to 0; the procedure stops with probability 1. Then , and
where the series converges absolutely. The expected number of draws is .
Lemma 2 (BERNOULLI-EXP, ). For rational , running the case up to times, returning 0 at the first 0, and else returning BERNOULLI-EXP, returns 1 with probability .
Proof. The result is 1 exactly when all independent calls return 1. By Lemma 1 this has probability .
Lemma 3 (DISCRETE-LAPLACE). For an integer , DISCRETE-LAPLACE stops with probability 1 and returns with for .
Proof. Consider one round. is uniform in and is kept with probability (Lemma 1), so . counts the 1s before the first 0 of independent Bernoulli draws, so . Every is for exactly one pair with , so
The sign is fair and independent. The round fails when and . For the round returns when and ; for , when and ; for , when and . In all three cases . This is positive and summable, so the round succeeds with a fixed probability , and the output of the loop has mass proportional to . Normalizing, .
Lemma 4 (lines L1 to L6 sample exactly). DISCRETE-GAUSSIAN-MECHANISM stops with probability 1 and returns with .
Proof. Line L1 gives an integer ; the argument below works for every such . In one round, line L3 gives with probability by Lemma 3, and lines L4 and L5 accept it with probability by Lemmas 1 and 2, where is rational. Expanding the square,
So , a constant times . The success probability of a round is , so the loop stops with probability 1, and the accepted has mass . Line L6 returns .
Lemma 5 (theta sums). For every real , , with equality when is an integer.
Proof. The Fourier transform of is . By the Poisson summation formula, which applies because and decay faster than any power,
Every term is at most its value at , because and the weights are positive. For integer all cosines are 1.
Lemma 6 (Renyi divergence). Let and for an integer . Then for every , with equality when is an integer.
Proof. For each , completing the square gives . Hence
Take of both sides. The ratio is at most 1 by Lemma 5, with equality when is an integer.
Theorem. DISCRETE-GAUSSIAN-MECHANISM is exact, and for a query with integer values and sensitivity it is -zCDP. For neighbors with , its smallest at is
Proof. Exactness is Lemma 4. For neighbors , let , an integer with . The output laws are and . A shift of both laws by does not change the divergence, so by Lemma 6, for all . The other order has shift , and the same bound holds. This is the definition of -zCDP with .
For the curve, take the case and shift so that has law and has law ; the case is the mirror image under . The smallest is the hockey-stick divergence , reached at the set where the privacy loss is above . Here
so exactly when with . Then
by the symmetry of , and and . Canonne, Kamath and Steinke (Theorem 7) also show that pairs with do not need a larger , so this curve is the tight guarantee of the mechanism whenever a pair with exists.
Complexity
In the word RAM with rationals of bits, the expected cost is arithmetic operations (Canonne, Kamath and Steinke, Theorem 32). Each round of lines L2 to L6 accepts with probability above , so the expected number of rounds is below . A call of DISCRETE-LAPLACE succeeds in each of its rounds with probability at least , and the counting loop for runs about times on average. BERNOULLI-EXP for makes at most draws on average, and for larger it stops at the first 0 from Bernoulli. Extra space is numbers. The run time depends on the noise drawn, so it is not constant.
Properties
- Exact. The output law is exactly , not an approximation, if the random integers are uniform.
- Same privacy as the continuous Gaussian. -zCDP, the same as Proposition 1.6 of Bun and Steinke for continuous noise. The for a given is close to the continuous one, and slightly larger for small .
- Variance at most (Corollary 17 of Canonne, Kamath and Steinke), and very close to once .
- Integer output. Counts stay integers; no rounding step is needed.
Variants and improvements
- Vectors. For a query with values in , add independent discrete Gaussian noise to each coordinate. The privacy depends on the sensitivity, as for the continuous mechanism.
- Discrete Laplace. The subroutine DISCRETE-LAPLACE is on its own a pure DP mechanism for integer queries, the two-sided geometric mechanism, with exact sampling.
- Snapping. Mironov's snapping mechanism keeps float Laplace noise but rounds and clamps the output, which also defends against the low-bit leak.
- Other samplers. Samplers from lattice cryptography (for example table-based and constant-time samplers) also draw discrete Gaussians; they target other trade-offs, such as constant run time.
When to use it
Use the discrete Gaussian mechanism for integer queries, such as counts and histograms, when the accounting is in zCDP or Renyi DP and the release needs a sampler that is provably exact. It is the natural replacement for float Gaussian noise in production systems. For pure -DP use discrete Laplace noise instead.
Pitfalls
- Floats at lines L4 and L5. Computing in floating point and comparing it with a float uniform brings back the rounding errors that the method exists to remove. Keep a rational and use BERNOULLI-EXP.
- A seeded generator at line L3. The exact algorithm is only as good as its random integers. A seeded pseudorandom generator is fine for tests and wrong for a release; use a cryptographic source.
- Run time at line L2. The number of rounds, and the work inside BERNOULLI-EXP, depend on the noise value. If an observer can time the release, the time can leak information about the noise. A deployment that exposes timing should hide it, for example by drawing the noise ahead of time, away from the request path.
- Wrong scale at line L1. Computing with a float square root can be off by one for large . Any positive integer keeps the output exact, but a poor makes the loop slow; use the integer test .
- Sensitivity in the wrong norm. The zCDP bound uses the sensitivity, and for a single integer query it must be an integer bound on .
Implementations
Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/discrete-gaussian-mechanism/. The authors are listed in prov/70PG4J.jsonl.
"""The discrete Gaussian mechanism with the exact sampler of Canonne, Kamath
and Steinke (NeurIPS 2020).
The noise has P[Y = y] proportional to exp(-y^2 / (2 sigma^2)) on the
integers. The sampler uses only uniform random integers and exact rational
arithmetic (fractions.Fraction): no floats, no exp, no sqrt. It is
Algorithm 1 (Bernoulli(exp(-gamma))), Algorithm 2 (discrete Laplace) and
Algorithm 3 (discrete Gaussian by rejection) of their paper.
The tests pass a seeded random.Random so that each run repeats. That is for
study only. A deployment needs a cryptographic source of randomness, for
example secrets.SystemRandom(), which has the same randrange method, and it
needs exact sampling as here: float noise from a seeded generator leaks
through its low-order bits (Mironov 2012; Canonne, Kamath and Steinke 2020).
The code assumes the word RAM, with operations on rationals of moderate size.
"""
from __future__ import annotations
import math
import random
from fractions import Fraction
from typing import Union
Rational = Union[int, Fraction]
def _as_positive_fraction(sigma2: Rational) -> Fraction:
if isinstance(sigma2, bool) or not isinstance(sigma2, (int, Fraction)):
raise TypeError("sigma2 must be an int or a Fraction, not a float")
s = Fraction(sigma2)
if s <= 0:
raise ValueError("sigma2 must be positive")
return s
def bernoulli(p: Fraction, rng: random.Random) -> int:
"""Return 1 with probability exactly p. Precondition: 0 <= p <= 1. Cost: O(1)."""
if not 0 <= p <= 1:
raise ValueError("p must be in [0, 1]")
return 1 if rng.randrange(p.denominator) < p.numerator else 0
def _bernoulli_exp_neg_unit(gamma: Fraction, rng: random.Random) -> int:
"""Return 1 with probability exp(-gamma), for 0 <= gamma <= 1.
Draw A_k ~ Bernoulli(gamma / k) for k = 1, 2, ... until the first 0; the
index K of that 0 is odd with probability exp(-gamma).
Cost: at most e expected draws.
"""
k = 1
while bernoulli(gamma / k, rng) == 1:
k += 1
return k % 2
def bernoulli_exp_neg(gamma: Rational, rng: random.Random) -> int:
"""Return 1 with probability exactly exp(-gamma). Algorithm 1 of CKS.
Precondition: gamma >= 0 is rational. Cost: O(1) expected draws, since
the loop stops at the first Bernoulli(exp(-1)) draw that is 0.
"""
g = Fraction(gamma)
if g < 0:
raise ValueError("gamma must be non-negative")
if g <= 1:
return _bernoulli_exp_neg_unit(g, rng)
whole = math.floor(g)
for _ in range(whole):
if _bernoulli_exp_neg_unit(Fraction(1), rng) == 0:
return 0
return _bernoulli_exp_neg_unit(g - whole, rng)
def discrete_laplace(t: int, rng: random.Random) -> int:
"""Return Y with P[Y = y] proportional to exp(-|y| / t). Algorithm 2 of CKS with s = 1.
Precondition: t >= 1 is an integer. Cost: O(1) expected draws.
"""
if t < 1:
raise ValueError("t must be a positive integer")
while True:
u = rng.randrange(t)
if bernoulli_exp_neg(Fraction(u, t), rng) == 0:
continue
v = 0
while bernoulli_exp_neg(1, rng) == 1:
v += 1
magnitude = u + t * v # geometric with ratio exp(-1/t)
negative = bernoulli(Fraction(1, 2), rng)
if negative == 1 and magnitude == 0:
continue # so that 0 is not counted twice
return -magnitude if negative else magnitude
def laplace_scale_for(sigma2: Rational) -> int:
"""t = floor(sigma) + 1, the least integer t with t^2 > sigma^2. Cost: O(1)."""
s = _as_positive_fraction(sigma2)
t = math.isqrt(math.floor(s))
while t * t <= s:
t += 1
return t
def acceptance_exponent(y: int, sigma2: Rational, t: int) -> Fraction:
"""gamma = (|y| - sigma^2 / t)^2 / (2 sigma^2), the exponent of line L4."""
s = _as_positive_fraction(sigma2)
d = abs(y) - s / t
return d * d / (2 * s)
def discrete_gaussian_mechanism(value: int, sigma2: Rational, rng: random.Random) -> int:
"""Release value + Y with Y from the discrete Gaussian N_Z(0, sigma2).
value is the true answer f(x) of an integer query. If f has sensitivity
Delta, the release is (Delta^2 / (2 sigma2))-zCDP.
Precondition: sigma2 > 0 rational. Cost: O(1) expected rounds of the
loop (each round accepts with probability above 0.29).
"""
s = _as_positive_fraction(sigma2)
t = laplace_scale_for(s) # @line L1
while True: # @line L2
y = discrete_laplace(t, rng) # @line L3
gamma = acceptance_exponent(y, s, t) # @line L4
c = bernoulli_exp_neg(gamma, rng) # @line L5
if c == 1: # @line L6
return value + y
def discrete_gaussian(sigma2: Rational, rng: random.Random) -> int:
"""One sample of N_Z(0, sigma2). Same precondition and cost as the mechanism."""
return discrete_gaussian_mechanism(0, sigma2, rng)
def discrete_gaussian_delta(epsilon: float, sigma2: Rational, sensitivity: int = 1) -> float:
"""The tight delta of the mechanism at epsilon, by Theorem 7 of CKS.
delta = P[Y > epsilon sigma^2 / Delta - Delta / 2]
- e^epsilon P[Y > epsilon sigma^2 / Delta + Delta / 2],
with Y ~ N_Z(0, sigma^2). This is accounting, so it uses floats; the sums
stop at |y| = 40 sigma + epsilon sigma^2 / Delta + Delta + 10, past which
the terms are below exp(-800).
Precondition: epsilon >= 0, sigma2 > 0, sensitivity >= 1.
Cost: O(sigma + epsilon sigma^2) float operations.
"""
s = float(_as_positive_fraction(sigma2))
if epsilon < 0 or sensitivity < 1:
raise ValueError("need epsilon >= 0 and sensitivity >= 1")
shift = epsilon * s / sensitivity
bound = int(40 * math.sqrt(s) + shift + sensitivity + 10)
weights = [math.exp(-(y * y) / (2 * s)) for y in range(-bound, bound + 1)]
total = math.fsum(weights)
def tail(a: float) -> float:
return math.fsum(w for y, w in zip(range(-bound, bound + 1), weights) if y > a) / total
delta = tail(shift - sensitivity / 2) - math.exp(epsilon) * tail(shift + sensitivity / 2)
return max(0.0, delta)
test_discrete_gaussian_mechanism.py 160 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/discrete-gaussian-mechanism/. The authors are listed in prov/70PG4J.jsonl.
import math
import random
from collections import Counter
from fractions import Fraction
import pytest
from discrete_gaussian_mechanism import (
acceptance_exponent,
bernoulli,
bernoulli_exp_neg,
discrete_gaussian,
discrete_gaussian_delta,
discrete_gaussian_mechanism,
discrete_laplace,
laplace_scale_for,
)
BETA = 1e-6 # failure probability for each Hoeffding or DKW margin
def margin(n):
return math.sqrt(math.log(2 / BETA) / (2 * n))
def gauss_pmf(sigma2, lo, hi):
"""The discrete Gaussian pmf on [lo, hi], normalized over a wide range."""
s = float(sigma2)
wide = int(60 * math.sqrt(s)) + 60
total = math.fsum(math.exp(-(y * y) / (2 * s)) for y in range(-wide, wide + 1))
return {y: math.exp(-(y * y) / (2 * s)) / total for y in range(lo, hi + 1)}
def hockey_stick(epsilon, sigma2, sensitivity):
"""sum_y (p(y) - e^epsilon p(y - Delta))_+ by brute force over a wide range."""
s = float(sigma2)
wide = int(60 * math.sqrt(s) + epsilon * s + 2 * sensitivity) + 60
w = {y: math.exp(-(y * y) / (2 * s)) for y in range(-wide - sensitivity, wide + 1)}
total = math.fsum(w[y] for y in range(-wide, wide + 1))
terms = (w[y] - math.exp(epsilon) * w[y - sensitivity] for y in range(-wide, wide + 1))
return math.fsum(max(0.0, d) for d in terms) / total
def test_worked_example():
# sigma^2 = 4: t = floor(2) + 1 = 3, and Y = 2 is kept with probability exp(-1/18).
assert laplace_scale_for(4) == 3
assert acceptance_exponent(2, 4, 3) == Fraction(1, 18)
assert acceptance_exponent(0, 4, 3) == Fraction(2, 9)
assert acceptance_exponent(-5, 4, 3) == Fraction(121, 72)
assert discrete_gaussian_delta(1.0, 4) == pytest.approx(0.0072488, abs=1e-7)
def test_scale_edges():
assert laplace_scale_for(1) == 2
assert laplace_scale_for(Fraction(9, 4)) == 2
assert laplace_scale_for(Fraction(1, 4)) == 1
assert laplace_scale_for(Fraction(99, 100)) == 1
assert laplace_scale_for(10**12) == 10**6 + 1
def test_bad_input():
rng = random.Random(1)
with pytest.raises(TypeError):
discrete_gaussian(4.0, rng)
with pytest.raises(ValueError):
discrete_gaussian(0, rng)
with pytest.raises(ValueError):
bernoulli_exp_neg(Fraction(-1, 2), rng)
with pytest.raises(ValueError):
discrete_laplace(0, rng)
with pytest.raises(ValueError):
bernoulli(Fraction(3, 2), rng)
def test_bernoulli_edges():
rng = random.Random(2)
assert all(bernoulli(Fraction(0), rng) == 0 for _ in range(100))
assert all(bernoulli(Fraction(1), rng) == 1 for _ in range(100))
assert all(bernoulli_exp_neg(0, rng) == 1 for _ in range(100))
def test_bernoulli_exp_neg_frequencies():
rng = random.Random(3)
n = 2500
for gamma in [Fraction(1, 3), Fraction(1), Fraction(5, 2), Fraction(7)]:
hits = sum(bernoulli_exp_neg(gamma, rng) for _ in range(n))
assert abs(hits / n - math.exp(-float(gamma))) <= margin(n)
def test_discrete_laplace_frequencies():
rng = random.Random(4)
n = 4000
t = 2
counts = Counter(discrete_laplace(t, rng) for _ in range(n))
r = math.exp(-1 / t)
for y in range(-6, 7):
want = (1 - r) / (1 + r) * r ** abs(y)
assert abs(counts[y] / n - want) <= margin(n)
@pytest.mark.parametrize("sigma2,seed", [(4, 5), (Fraction(1, 3), 6), (Fraction(50, 7), 7)])
def test_discrete_gaussian_against_exact_pmf(sigma2, seed):
rng = random.Random(seed)
n = 2000
samples = [discrete_gaussian(sigma2, rng) for _ in range(n)]
counts = Counter(samples)
width = int(6 * math.sqrt(float(sigma2))) + 2
pmf = gauss_pmf(sigma2, -width, width)
cdf_got = cdf_want = 0.0
for y in range(-width, width + 1):
assert abs(counts[y] / n - pmf[y]) <= margin(n)
cdf_got += counts[y] / n
cdf_want += pmf[y]
assert abs(cdf_got - cdf_want) <= margin(n) # the DKW inequality
# Variance at most sigma^2 (Canonne, Kamath and Steinke, Corollary 17), up to sampling error.
var = sum(y * y for y in samples) / n
assert var <= float(sigma2) * (1 + 0.2) + 0.05
def test_mechanism_adds_the_noise():
for seed in range(20):
a = discrete_gaussian_mechanism(10, Fraction(5, 2), random.Random(seed))
b = discrete_gaussian(Fraction(5, 2), random.Random(seed))
assert a == 10 + b
def test_delta_decreases_and_matches_known_values():
values = [discrete_gaussian_delta(e / 4, 4) for e in range(0, 17)]
assert all(x >= y for x, y in zip(values, values[1:]))
assert discrete_gaussian_delta(0.5, 4) == pytest.approx(0.0540072, abs=1e-7)
assert discrete_gaussian_delta(2.0, 4) == pytest.approx(1.07409e-05, rel=1e-4)
# More noise gives a smaller delta.
assert discrete_gaussian_delta(1.0, 16) < discrete_gaussian_delta(1.0, 4)
def test_random_delta_against_hockey_stick():
rng = random.Random(2020)
for _ in range(500):
sigma2 = Fraction(rng.randint(1, 240), rng.randint(4, 8))
epsilon = rng.uniform(0.0, 3.0)
sensitivity = rng.randint(1, 3)
got = discrete_gaussian_delta(epsilon, sigma2, sensitivity)
assert got == pytest.approx(hockey_stick(epsilon, sigma2, sensitivity), rel=1e-7, abs=1e-12)
def test_random_rejection_identity_exact():
# Line L4 must make Laplace weight times acceptance proportional to the Gaussian weight:
# -|y|/t - gamma(y) = -y^2/(2 sigma^2) - sigma^2/(2 t^2), exactly.
rng = random.Random(70)
for _ in range(500):
sigma2 = Fraction(rng.randint(1, 500), rng.randint(1, 9))
t = laplace_scale_for(sigma2)
assert (t - 1) ** 2 <= sigma2 < t * t
y = rng.randint(-60, 60)
lhs = -Fraction(abs(y), t) - acceptance_exponent(y, sigma2, t)
rhs = -Fraction(y * y) / (2 * sigma2) - sigma2 / (2 * t * t)
assert lhs == rhs
History
The discrete Gaussian has long been used in lattice-based cryptography, where it is the noise of many schemes and of trapdoor sampling. In differential privacy, Mironov (2012) showed that float implementations of the Laplace mechanism can leak through the low-order bits of their outputs, and proposed the snapping mechanism. Canonne, Kamath and Steinke (NeurIPS 2020) analyzed the discrete Gaussian as a privacy mechanism, showed that it matches the continuous Gaussian under zCDP, gave its exact curve, and gave the exact sampler of this page. The US Census Bureau used discrete Gaussian noise with zCDP accounting in the disclosure avoidance system of the 2020 Census.
References
- Clement L. Canonne, Gautam Kamath and Thomas Steinke, The discrete Gaussian for differential privacy, NeurIPS 2020, arXiv 2004.00010, Definition 1 (discrete Gaussian), Theorem 4 (zCDP), Proposition 5 and Lemma 6 (Renyi divergence), Theorem 7 (tight (epsilon, delta)), Corollary 17 (variance), Section 5 (Algorithms 1, 2 and 3, Propositions 33 and 34, Theorem 32)
- Ilya Mironov, On significance of the least significant bits for differential privacy, ACM CCS 2012, pages 650 to 661, the weakness of floating point implementations of noise and the snapping mechanism as a fix
- Mark Bun and Thomas Steinke, Concentrated differential privacy: simplifications, extensions, and lower bounds, TCC 2016-B, LNCS 9985, pages 635 to 658, Definition 1.1 (zCDP) and Proposition 1.3 (conversion to approximate DP)
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H1 sketch |
|
| Lean | L0 no Lean part |
|
| Code (python) | I0 not checked yet |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag 70PG4J Edit this page History Report an error Markdown