Course contentsShow
← Machine Learning and Deep Learning
Lesson 3340 of 3,53873. Privacy in Machine LearningFree lesson

The Laplace Mechanism

Adding calibrated Laplace noise to query results to achieve ε-differential privacy for numeric outputs.

The Laplace Mechanism

What you'll learn: How to add carefully calibrated noise to numeric query results to guarantee ε-differential privacy.

The Core Idea

The Laplace Mechanism is the foundational tool for achieving differential privacy when releasing numeric statistics. Instead of publishing exact query results (like a sum, count, or average), you add random noise drawn from the Laplace distribution. The amount of noise is precisely calibrated based on two factors: your privacy budget ε (how much privacy loss you'll tolerate) and the sensitivity of the query (how much one person's data could change the result).

How It Works

The mechanism adds noise proportional to Δf / ε, where:

  • Δf (sensitivity): The maximum amount one individual can influence the query output
  • ε (epsilon): Your privacy parameter—smaller ε means more noise, stronger privacy

For example, if you're releasing a count and one person can change that count by at most 1, the sensitivity is 1. With ε = 0.1, you'd add Laplace noise with scale 1/0.1 = 10.

The Laplace Distribution

The Laplace distribution is symmetric and peaked at zero, resembling two exponential distributions back-to-back. It's centered at your true answer, with most noise values small but occasional large deviations. This property ensures plausible deniability: any individual's presence or absence in the dataset is obscured by the noise.

Key Takeaway: The Laplace Mechanism achieves ε-differential privacy for numeric queries by adding noise scaled to sensitivity / ε, balancing privacy protection with utility of the released statistic.