Differential Privacy: 6 Key Equations Explained

Table of Contents

Differential Privacy is a powerful framework for ensuring privacy in data analysis by adding controlled noise to computations. Its mathematical foundation guarantees that the presence or absence of any individual’s data in a dataset does not significantly affect the outcome of an analysis. Here are six key equations that capture the essence of differential privacy and its mechanisms, along with references to their origins and explanations.

Definition of Differential Privacy

Differential privacy 1 formalises privacy through the concept of indistinguishability between neighbouring datasets. A mechanism M\mathcal{M} satisfies ϵ\epsilon -differential privacy if:

Pr[M(D)S]eϵPr[M(D)S] \Pr[\mathcal{M}(D) \in S] \leq e^\epsilon \cdot \Pr[\mathcal{M}(D') \in S]

Where,

  • PrPr denotes the probability of an event.
  • D,DD, D' : Neighboring datasets differing in one entry.
  • M\mathcal{M} : The randomized mechanism applied to the dataset.
  • SS : Subset of possible outputs.
  • ϵ\epsilon : Privacy budget controlling the privacy-accuracy tradeoff.

This definition ensures that the outputs of M\mathcal{M} are statistically indistinguishable for any two neighboring datasets.

Laplace Mechanism

The Laplace mechanism 1 is a common approach for achieving ϵ\epsilon -differential privacy. It adds noise drawn from a Laplace distribution to the output of a function. The amount of noise is determined by the function’s sensitivity and the privacy budget ϵ\epsilon , balancing privacy and accuracy. The noise is defined as:

ηLap(Δfϵ) \eta \sim \text{Lap}\left(\frac{\Delta f}{\epsilon}\right)

Here:

  • Δf=maxD,Df(D)f(D)1\Delta f = \max_{D, D'} ||f(D) - f(D')||_1 : Sensitivity of the function ff , measuring the maximum difference in output for neighboring datasets.
  • ϵ\epsilon is privacy budget.

The perturbed result is:

M(D)=f(D)+η \mathcal{M}(D) = f(D) + \eta

Gaussian Mechanism

For scenarios where a small probability of failure is acceptable, (ϵ,δ)(\epsilon, \delta) -differential privacy can be achieved using the Gaussian mechanism 2. The noise is sampled from a normal distribution:

ηN(0,σ2) \eta \sim \mathcal{N}(0, \sigma^2)

The standard deviation of the noise is calculated as:

σ=Δf2ln(1.25/δ)ϵ \sigma = \frac{\Delta f \cdot \sqrt{2 \ln(1.25 / \delta)}}{\epsilon}

Where:

  • Δf\Delta f : Sensitivity of the function ff .
  • δ\delta : Probability of a privacy failure.
  • ϵ\epsilon is privacy budget.

The perturbed output is:

M(D)=f(D)+η \mathcal{M}(D) = f(D) + \eta

When applied iteratively or in compositions, the Gaussian Mechanism aligns well with advanced composition theorems (described below), making it practical for repeated queries. It is particularly useful when the function’s output has high sensitivity or when ( ϵ\epsilon , δ\delta )-differential privacy is needed instead of strict ϵ\epsilon -differential privacy.

Composition Theorems

When multiple differentially private mechanisms are applied, the privacy budget accumulates. Differential privacy provides a framework for measuring and bounding the cumulative privacy loss from multiple analyses of information about the same individuals. Two key composition approaches3 are:

Sequential Composition

If kk mechanisms M1,M2,,Mk\mathcal{M}_1, \mathcal{M}_2, \dots, \mathcal{M}_k are applied, each with privacy guarantees ϵ1,ϵ2,,ϵk\epsilon_1, \epsilon_2, \dots, \epsilon_k , the total privacy guarantee is:

ϵtotal=i=1kϵi \epsilon_{\text{total}} = \sum_{i=1}^k \epsilon_i

Suppose a dataset is queried three times using mechanisms with ϵ1=0.5\epsilon_1 = 0.5 , ϵ2=0.3\epsilon_2 = 0.3 , and ϵ3=0.2\epsilon_3 = 0.2 . The total privacy budget consumed is:

ϵtotal=0.5+0.3+0.2=1.0 \epsilon_{\text{total}} = 0.5 + 0.3 + 0.2 = 1.0

This means the combined analysis satisfies 1.01.0 -differential privacy.

Advanced Composition

A tighter bound is given by advanced composition, which accounts for small failures:

ϵtotal=2kln(1/δ)ϵ+kϵ2 \epsilon_{\text{total}} = \sqrt{2k \ln(1/\delta)} \cdot \epsilon + k \cdot \epsilon^2

Suppose a dataset is queried 100 times, each query satisfying (ϵ=0.1,δ=105)(\epsilon = 0.1, \delta = 10^{-5}) -differential privacy. Using advanced composition:

ϵtotal=2100ln(1/105)0.1+100(0.1)2 \epsilon_{\text{total}} = \sqrt{2 \cdot 100 \cdot \ln(1/10^{-5})} \cdot 0.1 + 100 \cdot (0.1)^2
  1. Calculate the first term:

    2100ln(105)0.1=210011.51290.1=2302.580.1=4.8 \sqrt{2 \cdot 100 \cdot \ln(10^5)} \cdot 0.1 = \sqrt{2 \cdot 100 \cdot 11.5129} \cdot 0.1 = \sqrt{2302.58} \cdot 0.1 = 4.8
  2. Calculate the second term:

    1000.01=1 100 \cdot 0.01 = 1
  3. ϵtotal=4.8+1=5.8 \epsilon_{\text{total}} = 4.8 + 1 = 5.8

Thus, after 100 queries, the total privacy guarantee is approximately (ϵ=5.8,δ=105)(\epsilon = 5.8, \delta = 10^{-5}) .

Comparing Sequential and Advanced Composition

AspectSequential CompositionAdvanced Composition
Privacy Parameter ( ϵ\epsilon )Sum of all individual ϵ\epsilon values.Tighter bound with sublinear growth.
Failure Probability ( δ\delta )Assumes δ=0\delta = 0 .Allows for small δ>0\delta > 0 .
Scaling with kkLinear scaling: ϵtotal=kϵ\epsilon_{\text{total}} = k \cdot \epsilon .Sublinear scaling with k\sqrt{k} .
AccuracyLess noise is required for individual mechanisms but results in higher cumulative noise.Supports smaller cumulative noise.
Use CasesSuitable for strict privacy guarantees.Suitable for practical settings with relaxed privacy.

Sensitivity

The sensitivity1 of a function quantifies its robustness to changes in individual data points. Sensitivity determines the amount of noise required to ensure privacy. Currently, the global and local sensitivity are being mainly used in differential privacy.

Global Sensitivity

Global sensitivity is the maximum change in the output of a function ΔfG\Delta f_G when applied to any two neighboring datasets DD and DD' , differing by a single element. For function ΔfG\Delta f_G , the 1\ell_1 or global sensitivity is defined as:

ΔfG=maxD,Df(D)f(D)1 \Delta f_G = \max_{D, D'} ||f(D) - f(D')||_1

Where:

  • D,DD, D' : Neighboring datasets differing in one record.
  • 1||\cdot||_1 : The 1\ell_1 -norm, representing the absolute difference in outputs.

Global sensitivity is the maximum differences in output with consideration of all possible datasets and is therefore only dependent on the query and not the dataset.

Local Sensitivity

Local sensitivity4 is a finer measure defined for a specific dataset DD . It measures the maximum change in the output of function ΔfL\Delta f_{L} for all neighboring datasets DD' of DD :

ΔfL(D)=maxDf(D)f(D)1 \Delta f_{L}(D) = \max_{D'} ||f(D) - f(D')||_1

Local sensitivity attempts to calculate the sensitivity for a local data set, where the possible changes are bound by the local data set and not the universe of all data sets.

While local sensitivity may be smaller than global sensitivity for specific datasets, it is less robust for privacy guarantees since it depends on the specific dataset and not the worst-case scenario.

Sensitivity for Common Functions

  1. Counting Queries: For functions that count individuals satisfying a condition, Δf=1\Delta f = 1 .

  2. Summation Queries: If data values are bounded (e.g., income within [0,100][0, 100] ), the sensitivity is the range of possible values. For summing incomes:

    Δf=max valuemin value=1000=100 \Delta f = \text{max value} - \text{min value} = 100 - 0 = 100
  3. Average Queries: Sensitivity for averages depends on both the range of values and the dataset size nn :

    Δf=max valuemin valuen \Delta f = \frac{\text{max value} - \text{min value}}{n}
  4. Maximum or Minimum Queries: Sensitivity is the largest possible change in the maximum or minimum when a single data point is added or removed.

Comparing Global Sensitivity vs. Local Sensitivity

AspectGlobal SensitivityLocal Sensitivity
DefinitionMeasures the maximum change in the output of a function ff over all possible neighboring datasets.Measures the maximum change in the output of ff for a specific dataset and its neighbors.
ScopeEvaluates worst-case sensitivity across all possible datasets.Evaluates sensitivity for a particular dataset DD .
RobustnessIndependent of the specific dataset; provides universal guarantees.Dependent on the specific dataset; may not generalize to other datasets.
Noise RequirementRequires more noise to account for the worst-case scenario.May allow less noise for datasets with lower local sensitivity.
Use CaseCommonly used for general differential privacy guarantees.Suitable for improving accuracy when local sensitivity is significantly smaller.
AccuracyMay result in less accurate outputs due to higher noise.Can yield more accurate results for specific datasets with low local sensitivity.
Computation ComplexityStraightforward to compute for many functions but can be conservative.Requires evaluating sensitivity for every neighboring dataset, which can be complex.
ExamplesFor a count query: Δf=1\Delta f = 1 , as adding/removing one individual changes the count by 1.For a count query: Sensitivity may be less than 1 if the specific dataset structure limits changes.

Exponential Mechanism

The exponential mechanism5 is useful for selecting outputs in a way that prioritizes utility while maintaining privacy. It assigns probabilities to each potential output rr based on a utility function u(D,r)u(D, r) :

Pr[M(D)=r]exp(ϵu(D,r)2Δu) \Pr[\mathcal{M}(D) = r] \propto \exp\left(\frac{\epsilon \cdot u(D, r)}{2 \Delta u}\right)

Where:

  • u(D,r)u(D, r) : Utility function representing the quality of rr .
  • Δu\Delta u : Sensitivity of the utility function.
  • ϵ\epsilon is the privacy budget.

Unlike mechanisms that add noise to the output (e.g., Laplace Mechanism), the Exponential Mechanism modifies the selection probability, making it suitable when adding noise would render the output meaningless or when the output space is non-numeric. It extends the concept of differential privacy to non-numeric data types and provides a foundation for private data analysis in more complex settings.

Laplace Mechanism vs. Gaussian Mechanism vs. Exponential Mechanism

AspectLaplace MechanismGaussian MechanismExponential Mechanism
PurposeAdds noise to the output of a numeric query to achieve ϵ\epsilon -differential privacy.Adds noise to the output of a numeric query to achieve (ϵ,δ)(\epsilon, \delta) -differential privacy.Selects an output from a discrete set based on a utility function, ensuring ϵ\epsilon -differential privacy.
Type of OutputNumeric values (e.g., sums, counts, averages).Numeric values (e.g., sums, counts, averages).Categorical or discrete outputs (e.g., choosing the best item or category).
Noise DistributionNoise is drawn from a Laplace distribution: Lap(Δfϵ)\text{Lap}(\frac{\Delta f}{\epsilon}) .Noise is drawn from a Gaussian (normal) distribution: N(0,σ2)\mathcal{N}(0, \sigma^2) .Selection probabilities are proportional to exp(ϵu(D,r)2Δu)\exp\left(\frac{\epsilon \cdot u(D, r)}{2 \Delta u}\right) .
Parametersϵ\epsilon (privacy budget).ϵ\epsilon (privacy budget), δ\delta (failure probability).ϵ\epsilon (privacy budget), Δu\Delta u (sensitivity of the utility function).
Sensitivity RequirementRequires global sensitivity Δf\Delta f of the function.Requires global sensitivity Δf\Delta f of the function.Requires sensitivity Δu\Delta u of the utility function.
Privacy GuaranteeStrict ϵ\epsilon -differential privacy.Approximate (ϵ,δ)(\epsilon, \delta) -differential privacy.Strict ϵ\epsilon -differential privacy.
Noise ScalingNoise scales linearly with Δfϵ\frac{\Delta f}{\epsilon} .Noise scales with Δf2ln(1.25/δ)ϵ\frac{\Delta f \cdot \sqrt{2 \ln(1.25 / \delta)}}{\epsilon} .No direct noise; selection probabilities are adjusted based on utility and ϵ\epsilon .
Failure Probability ( δ\delta )No failure probability; guarantees hold strictly for all cases.Allows a small failure probability ( δ>0\delta > 0 ) for more flexibility in noise calibration.No failure probability; guarantees hold strictly for all cases.
Key StrengthSimple to implement and provides strict privacy guarantees.Handles high-dimensional queries and provides a trade-off with a small failure probability ( δ\delta ).Ensures privacy while prioritizing outputs with higher utility, suitable for categorical data.
Key LimitationMay add excessive noise for high-dimensional queries.Requires additional parameter ( δ\delta ) and more noise for strict privacy.Limited to discrete or categorical output spaces; requires well-defined utility functions.
ApplicationsNumeric data analysis, such as counting, summation, and mean estimation.Machine learning, high-dimensional statistics, and approximate differential privacy settings.Parameter selection, private feature selection, or any situation with categorical output.
Accuracy vs. Privacy TradeoffBalances accuracy and privacy by adjusting ϵ\epsilon ; may degrade accuracy with large sensitivity.Allows finer trade-offs by adjusting both ϵ\epsilon and δ\delta ; suitable for approximate guarantees.Balances utility and privacy; prioritizes high-utility outputs while maintaining privacy.

Conclusion

Differential privacy provides a rigorous mathematical guarantee for protecting individual data in computations. These six equations form the core of differential privacy and its mechanisms. By carefully choosing the noise and parameters, analysts can ensure a balance between privacy and accuracy. Understanding these equations empowers practitioners to implement robust privacy-preserving techniques in real-world applications.

Refrences


  1. Dwork, Cynthia, Frank McSherry, Kobbi Nissim, and Adam Smith. ‘Calibrating Noise to Sensitivity in Private Data Analysis’. In Proceedings of the Third Conference on Theory of Cryptography, 265–84. TCC’06. Berlin, Heidelberg: Springer-Verlag, 2006. https://doi.org/10.1007/11681878_14↩︎ ↩︎ ↩︎

  2. Mironov, Ilya. 2012. ‘On Significance of the Least Significant Bits for Differential Privacy.’ In Proceedings of the 2012 ACM Conference on Computer and Communications Security, 650–61. Raleigh North Carolina USA: ACM. https://doi.org/10.1145/2382196.2382264↩︎

  3. Kairouz, Peter, Sewoong Oh, and Pramod Viswanath. 2015. “The Composition Theorem for Differential Privacy.” arXiv. https://doi.org/10.48550/arXiv.1311.0776↩︎

  4. Nissim, Kobbi, Sofya Raskhodnikova, and Adam Smith. 2007. “Smooth Sensitivity and Sampling in Private Data Analysis.” In Proceedings of the Thirty-Ninth Annual ACM Symposium on Theory of Computing, 75–84. San Diego California USA: ACM. https://doi.org/10.1145/1250790.1250803↩︎

  5. McSherry, Frank, and Kunal Talwar. ‘Mechanism Design via Differential Privacy’. In 48th Annual IEEE Symposium on Foundations of Computer Science (FOCS’07), 94–103, 2007. https://doi.org/10.1109/FOCS.2007.66↩︎

Related Posts

Top-down vs. Bottom up Privacy

Top-down vs. Bottom up Privacy

Tech companies and large consumer businesses are grappling with how best to protect end-user data …

Privacy Preserving Measurement

Privacy Preserving Measurement

In 1982, Andrew Yao proposed the Millionaire Problem which discusses how two millionaires can learn …

Distributed Aggregation Protocol (DAP) Primer

Distributed Aggregation Protocol (DAP) Primer

In last post we covered, Privacy Preserving Measurement (PPM) and discussed how Distributed …