The laplace mechanism is a differentially private algorithm for computing statistics over a dataset. The key idea is to add laplace noise to the true statistic, thus incorporating randomization and ensuring privacy.
Formally, the mechanism takes dataset
Our algorithm first computes
Sensitivity
To formally specify the degree of noise and its relation to the definition of differential privacy, we define a measure called โsensitivity.โ Intuitively, sensitivity
for neighbors
Some common sensitivity examples are below:
- Average:
for and . - Standard deviation:
for the same . - Maximum:
for the same . - Median:
for odd , split in the middle.
Laplace Sampling
For a laplace distribution centered at
Note that this formulation is extremely useful if our sensitivity is inversely proportional to the number of samples
Differential Privacy Analysis
Weโll now show that the algorithm above is
Now, observe that
Thus, our equation above is
Note that the above derivation showed the difference in probabilities for neighboring individual outcomes. To relate this to the definition of differential privacy, which is concerned with all possible sets
Thus, our laplace mechanism is