Differential Privacy › The Gaussian Mechanism

Michael BrenndoerferFebruary 24, 20263 min read
Language AI HandbookAll chapters
Part 60 of 67Safety and Security
Chapter 464Differential Privacy › The Gaussian Mechanism
Reading section 4 of 12 · The Gaussian Mechanism · 3 minSection 4 of 12 · 3 min

Book contents

Section 4 of 12 · 3 min read

Differential Privacy › The Gaussian MechanismOne section · Sections in this chapter4 / 12 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

To make any function differentially private, you add noise proportional to how sensitive the function's output is to a single data point. The Gaussian mechanism is the standard approach for vector-valued functions such as gradients.

The ℓ2\ell_2 sensitivity of a function ff measures the maximum change in its output norm when one record is added or removed:

Δ2f=max⁡D,D′:∥D−D′∥Hamming=1∥f(D)−f(D′)∥2\Delta_2 f = \max_{D, D': \|D - D'\|_{\text{Hamming}}=1} \| f(D) - f(D') \|_2

where:

  • Δ2f\Delta_2 f is the ℓ2\ell_2 sensitivity of function ff, measuring the worst-case change in output when one record changes.
  • ∥D−D′∥Hamming=1\|D - D'\|_{\text{Hamming}} = 1 restricts the maximum to neighboring datasets that differ by exactly one record.
  • ∥f(D)−f(D′)∥2\| f(D) - f(D') \|_2 is the Euclidean distance between the outputs on the two neighboring datasets.

The Gaussian mechanism adds isotropic Gaussian noise scaled to the sensitivity:

M(D)=f(D)+N(0,σ2⋅I)\mathcal{M}(D) = f(D) + \mathcal{N}(0, \sigma^2 \cdot \mathbf{I})

where:

  • N(0,σ2⋅I)\mathcal{N}(0, \sigma^2 \cdot \mathbf{I}) is multivariate Gaussian noise with standard deviation σ\sigma in each dimension.
  • σ\sigma controls the amount of noise added, which in turn controls the privacy-utility tradeoff.
  • Larger σ\sigma means more noise, which means stronger privacy but lower utility.

For approximate DP with parameters (ε,δ)(\varepsilon, \delta), the Gaussian mechanism satisfies DP when:

σ≥2ln⁡(1.25/δ)⋅Δ2fε\sigma \geq \frac{\sqrt{2 \ln(1.25/\delta)} \cdot \Delta_2 f}{\varepsilon}

where:

  • σ\sigma is the noise standard deviation to be added.
  • 2ln⁡(1.25/δ)\sqrt{2 \ln(1.25/\delta)} is a constant derived from the tail bounds of the Gaussian distribution, growing slowly as δ\delta decreases.
  • Δ2f\Delta_2 f is the ℓ2\ell_2 sensitivity of the function being computed.
  • ε\varepsilon is the target privacy parameter; smaller ε\varepsilon requires larger σ\sigma.

This formula captures the three-way tradeoff precisely. To achieve stronger privacy (smaller ε\varepsilon), you need more noise (larger σ\sigma). To guarantee the privacy bound holds more reliably (smaller δ\delta), you again need more noise, because the Gaussian's tail probability shrinks only logarithmically with σ\sigma. The sensitivity Δ2f\Delta_2 f anchors the scale of the noise to the specific function being computed: a function that barely changes when one record is removed needs very little noise to hide that change.

The Gaussian mechanism has an important property that makes it particularly well-suited to machine learning: in high dimensions, Gaussian noise distributes evenly across all directions. Adding σ2I\sigma^2 I noise to a gradient vector perturbs all parameter directions equally, which tends to have a smaller effect on the overall model quality than directional noise would. This isotropy is part of why the Gaussian mechanism is preferred over alternatives for neural network training.