Algorithm Search⌘K

Definitionintro

Differential privacy

Also called pure differential privacy, epsilon-differential privacy.

A randomized algorithm is epsilon-DP if changing one record changes the probability of each output set by at most a factor e^epsilon.

Differential privacy is a property of a randomized algorithm that reads a dataset. The algorithm is ε\varepsilon-differentially private (ε\varepsilon-DP) if adding, removing or changing one record changes the probability of every set of outputs by at most a factor eεe^{\varepsilon}. So the output looks almost the same whether or not any one person's data is in the input, and an observer learns almost nothing about that person that the observer could not learn without the data. Dwork, McSherry, Nissim and Smith (2006) gave the definition, and Dwork (2006) gave it its name. This page defines the pure form; the approximate form adds a small additive term δ\delta.

Definition

A dataset is a list x=(x1,…,xn)x = (x_1, \ldots, x_n) of records from a universe X\mathcal X, or its histogram in N∣X∣\mathbb N^{|\mathcal X|}. Two datasets are neighbors, written x∼x′x \sim x', if they differ in one record. There are two neighbor relations, and every claim of privacy must say which one it uses:

  • add/remove (unbounded): x′x' is xx with one record added or removed, so the sizes differ by 1. Dwork and Roth use histograms with ∥x−x′∥1≤1\lVert x - x' \rVert_1 \le 1, which is this relation.
  • replace (bounded): xx and x′x' have the same size nn, and one record is changed.

A mechanism MM is a randomized algorithm that takes a dataset and returns an output in a set Y\mathcal Y. Its randomness comes only from its own coins.

Definition. Let ε≥0\varepsilon \ge 0. A mechanism MM is ε\varepsilon-differentially private under a neighbor relation ∼\sim if, for all x∼x′x \sim x' and all sets S⊆YS \subseteq \mathcal Y of outputs,

Pr⁡[M(x)∈S]≤eεPr⁡[M(x′)∈S].\Pr[M(x) \in S] \le e^{\varepsilon}\Pr[M(x') \in S].

The probability is over the coins of MM only; the datasets are fixed. Both relations are symmetric, so the bound also holds with xx and x′x' swapped. A smaller ε\varepsilon is a stronger guarantee. Values from 0.1 to a few units are common; e0.1=1.105e^{0.1} = 1.105 and e1=2.718e^{1} = 2.718.

For a finite or countable Y\mathcal Y, the definition is the same as the pointwise bound Pr⁡[M(x)=y]≤eεPr⁡[M(x′)=y]\Pr[M(x) = y] \le e^{\varepsilon}\Pr[M(x') = y] for every output yy: the pointwise bound is the case S={y}S = \{y\}, and the sum over y∈Sy \in S gives the set bound. For outputs with densities pxp_x and px′p_{x'}, a bound px(y)≤eεpx′(y)p_x(y) \le e^{\varepsilon} p_{x'}(y) for every yy is enough. In terms of the privacy loss L(y)=ln⁡(Pr⁡[M(x)=y]/Pr⁡[M(x′)=y])L(y) = \ln(\Pr[M(x) = y] / \Pr[M(x') = y]), the mechanism is ε\varepsilon-DP if and only if ∣L(y)∣≤ε|L(y)| \le \varepsilon for every output yy that has positive probability, for every pair of neighbors.

Three equivalent readings help to use the definition.

  1. Odds. Let an observer have a prior on whether the input is xx or x′x'. After seeing any output yy, by Bayes' theorem the posterior odds are the prior odds times Pr⁡[M(x)=y]/Pr⁡[M(x′)=y]\Pr[M(x) = y]/\Pr[M(x') = y], which lies in [e−ε,eε][e^{-\varepsilon}, e^{\varepsilon}]. With prior probability 0.01 for xx and ε=1\varepsilon = 1, the posterior probability of xx is at most 0.01e/(0.01e+0.99)=0.0267240.01e/(0.01e + 0.99) = 0.026724.
  2. Tests. Any test that decides between xx and x′x' from the output, with false positive rate α\alpha and false negative rate β\beta (see type I and type II errors), has α+eεβ≥1\alpha + e^{\varepsilon}\beta \ge 1 and eεα+β≥1e^{\varepsilon}\alpha + \beta \ge 1. Proof: if the test says "x′x'" on the output set SS, then α=Pr⁡[M(x)∈S]\alpha = \Pr[M(x) \in S] and 1−β=Pr⁡[M(x′)∈S]≤eεα1 - \beta = \Pr[M(x') \in S] \le e^{\varepsilon}\alpha; the other bound is the same with the roles swapped. For ε=1\varepsilon = 1 and α=0.05\alpha = 0.05, β≥1−0.05e=0.864\beta \ge 1 - 0.05e = 0.864.
  3. Harm. For any future event that depends only on the output, the probability that a person faces it changes by at most the factor eεe^{\varepsilon} when the person's record is added or removed (Dwork-Roth Section 2.3.1).

The definition does not promise that nothing can be learned about a person. If the data show that smokers often get cancer, a smoker is affected by that result whether or not the smoker is in the data. The definition only bounds the effect of the presence of one record.

Examples and non-examples

Randomized response. Each person reports a true bit with probability 3/43/4 and the flipped bit with probability 1/41/4. The ratio of the probabilities of any answer for two values of the bit is at most (3/4)/(1/4)=3(3/4)/(1/4) = 3, so the release of all answers is ln⁡3\ln 3-DP under replace, where one person changes the bit. See randomized response.

Laplace mechanism. Release a count plus noise with density ε2e−ε∣z∣\frac{\varepsilon}{2}e^{-\varepsilon|z|}. A count changes by at most 1 between neighbors, and the density ratio at each output is at most eεe^{\varepsilon}. So the output is ε\varepsilon-DP under both relations. See Laplace mechanism and global sensitivity.

The relation matters. Release a histogram with Lap(1/ε)\mathrm{Lap}(1/\varepsilon) noise on each bin. Under add/remove one bin changes by 1, and the release is ε\varepsilon-DP. Under replace two bins change by 1, and the same release is only 2ε2\varepsilon-DP. In general ε\varepsilon-DP under add/remove gives 2ε2\varepsilon-DP under replace, because a replace step is a removal followed by an addition (the group privacy theorem with k=2k = 2). The converse fails: a mechanism that publishes nn exactly is 00-DP under replace and is not DP for any ε\varepsilon under add/remove.

Constant output. A mechanism that ignores the data and returns a fixed value or a fixed random value is 00-DP. It is private and useless; the definition measures privacy, not utility.

Non-example: an exact count. A deterministic count f(x)f(x) is not ε\varepsilon-DP for any ε\varepsilon: for neighbors with f(x)≠f(x′)f(x) \ne f(x'), the set S={f(x)}S = \{f(x)\} has probability 1 under xx and 0 under x′x'. Every nonconstant deterministic function of the data fails the same way, so every DP mechanism with useful output is randomized.

Non-example: a sample of the records. Publish each record independently with probability 0.010.01. A record that is in xx and not in x′x' appears in the output with probability 0.010.01 under xx and 0 under x′x', so the release is not ε\varepsilon-DP for any ε\varepsilon. It is (0,0.01)(0, 0.01)-DP in the approximate sense, which shows why δ\delta must be very small.

Non-example: k-anonymity. A table that is k-anonymous is the output of a deterministic map of the data, and it is not DP. It can also leak a sensitive value when all the records of a group share it.

  • Approximate DP. (ε,δ)(\varepsilon, \delta)-DP adds δ\delta to the right side of the bound. Pure DP is the case δ=0\delta = 0.
  • Sensitivity. The global sensitivity of a query is the largest change between neighbors. It sets the noise of the Laplace and the Gaussian mechanisms.
  • Basic properties. DP survives any processing of the output that does not read the data (post-processing theorem). Two releases with ε1\varepsilon_1 and ε2\varepsilon_2 are (ε1+ε2)(\varepsilon_1 + \varepsilon_2)-DP together (sequential composition theorem). A group of kk records gets kεk\varepsilon (group privacy theorem).
  • Local DP. In local differential privacy each person randomizes the record before it leaves the device, and the bound holds for any two values of one record. The curator is not trusted.
  • Divergence forms. Renyi DP, zero-concentrated DP and Gaussian DP bound other measures of the distance between M(x)M(x) and M(x′)M(x'). Pure ε\varepsilon-DP is the bound on the largest privacy loss, the Renyi divergence of order ∞\infty.
  • Metric forms. Geo-indistinguishability replaces the neighbor relation by a distance between locations, with the bound eεd(x,x′)e^{\varepsilon d(x, x')}.
  • Noninterference. Noninterference asks that public outputs do not depend on secret inputs at all. DP allows a bounded dependence, which is what makes useful statistics possible.

References

  1. Cynthia Dwork, Frank McSherry, Kobbi Nissim and Adam Smith, Calibrating noise to sensitivity in private data analysis, TCC 2006, LNCS 3876, pages 265 to 284, the first form of the definition, with a bound on the ratio of output probabilities for datasets that differ in one row
  2. Cynthia Dwork, Differential privacy, ICALP 2006, LNCS 4052, pages 1 to 12, the name differential privacy and the argument that a guarantee of this kind is needed
  3. Cynthia Dwork and Aaron Roth, The Algorithmic Foundations of Differential Privacy, Foundations and Trends in Theoretical Computer Science 9(3-4), 2014, pages 211 to 407, Section 2.3, Definition 2.3 (distance between databases), Definition 2.4 (differential privacy, with delta = 0 for the pure form), Proposition 2.1 and Theorem 2.2; Section 2.3.1 (what differential privacy promises)

Where this leads

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.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/CG87A2/text.yaml