Differential privacy

On this page 7

Differential privacy is a mathematical definition of privacy for data analysis: an algorithm is differentially private when its output is almost equally likely whether or not any single individual’s data is included. The guarantee is achieved by adding carefully calibrated random noise, and its strength is controlled by a parameter called epsilon, often described as the privacy budget.

In privacy engineering, differential privacy stands apart from anonymization techniques because it makes a provable statement that holds against any attacker, including one with unlimited background knowledge. It protects the release of statistics, synthetic data and machine learning models rather than the raw records themselves.

How the differential privacy guarantee is defined

The formal definition compares two neighboring datasets that differ only in the data of one person. A randomized mechanism M satisfies (epsilon, delta)-differential privacy when, for every pair of neighboring datasets and every set of possible outputs S, the probability P[M(D) in S] is at most e^epsilon times P[M(D') in S], plus delta.

Intuitively, an observer who sees the output cannot reliably tell whether a particular person took part. The factor e^epsilon bounds how much any individual can shift the result, and delta is a small probability that the bound does not hold. With delta set to zero, the guarantee is called pure differential privacy.

Two properties make the definition practical. Post-processing immunity means that any computation on a differentially private output stays equally private. Composition means that the privacy loss of several releases can be added up, which lets engineers track a cumulative privacy budget across many queries.

Key parameters and mechanisms

The behavior of a differentially private system depends on a small set of parameters. The table summarizes them, their usual ranges and what they control.

ParameterTypical rangeWhat it controls
EpsilonAbout 0.1 to 10 in practicePrivacy loss bound; lower means stronger privacy and more noise
DeltaMuch smaller than 1 divided by the record countProbability that the epsilon bound fails
SensitivityDepends on the query, for example 1 for a countMaximum change one person can cause in the true result
Privacy budgetTotal epsilon allotted to a datasetHow many releases can be made before protection weakens
Core parameters of differential privacy

Mechanisms turn these parameters into noise. The Laplace mechanism adds noise with scale equal to sensitivity divided by epsilon, so a count with sensitivity 1 and epsilon of 1 receives noise with a typical magnitude of about one unit. The Gaussian mechanism gives approximate (epsilon, delta) guarantees and composes well over many steps, which is why it underpins differentially private stochastic gradient descent in machine learning.

MechanismGuaranteeTypical use
Laplace mechanismPure epsilonCounts, sums and histograms
Gaussian mechanismApproximate epsilon and deltaModel training, high-dimensional statistics
Randomized responsePure epsilon, localCollecting sensitive yes-or-no answers
Exponential mechanismPure epsilonSelecting the best item from a set of options
Common differential privacy mechanisms

Central and local differential privacy

Differential privacy can be applied at the data curator or on each user’s device, and the choice determines both the trust model and the accuracy. In the central model, a trusted party holds the raw data and adds noise to the outputs. In the local model, each device randomizes its own data before sending it, so the collector never sees true values.

The local model needs far more noise for the same epsilon, because every individual record is perturbed. It is therefore useful mainly for very large populations, such as telemetry from millions of devices. The central model gives much better accuracy but requires strong security around the raw dataset, sometimes supported by secure enclaves or cryptographic aggregation.

Differential privacy compared with other privacy techniques

Differential privacy protects outputs, while most neighboring techniques transform records. The comparison shows where each technique fits in a privacy engineering toolkit.

TechniqueWhat it changesResistance to linkage attacksData remains personal data
Differential privacyReleased statistics or modelsProvable within the budgetOutputs typically not, inputs yes
AnonymizationRecords, irreversiblyVaries; often weaker than assumedNo, if truly anonymous
PseudonymizationDirect identifiers replacedLow without other measuresYes
Data maskingValues hidden or substitutedLow to moderateUsually yes
k-anonymityRecords generalized into groupsWeak against background knowledgeDepends on the result
Differential privacy and related techniques

Classical anonymization methods have repeatedly been defeated by linkage with external data. Differential privacy avoids this weakness by design, but it does not produce a releasable copy of individual records, so it complements rather than replaces pseudonymization and access control.

Limitations and common mistakes

Differential privacy is only as strong as its implementation and parameter choices. A mathematically correct design can be undermined by engineering shortcuts.

  • Oversized epsilon: very large values offer little meaningful protection while still being described as differentially private.
  • Ignored composition: answering unlimited queries without tracking the budget lets attackers average away the noise.
  • Small groups: statistics about small subpopulations become noisy, which creates a real accuracy trade-off.
  • Floating-point flaws: naive noise sampling on computers can leak information; vetted libraries avoid this.
  • Wrong unit of privacy: protecting single events instead of whole users weakens the guarantee for frequent users.

Choosing epsilon is ultimately a policy decision, not only a technical one. There is no universal safe value, so organizations should document the chosen budget, the unit of privacy and the reasoning behind both.

The short version

Differential privacy is a way to share useful statistics without exposing any one person. Before results are published, a small, carefully measured amount of random noise is added. The overall picture stays accurate. But nobody can tell whether a specific person was in the data.

It works like asking a large crowd a question while each answer is slightly blurred. Patterns remain clear, individuals do not. A setting called epsilon decides how much blur is used. Less blur means more accuracy and less privacy.

Where it makes a difference

A city transport authority wants to publish hourly passenger counts for every station pair, based on smart card journeys. Some station pairs are used by only a handful of commuters, so exact counts could reveal the routines of identifiable people, especially when combined with public knowledge about where someone lives and works.

The data team releases the table with the Laplace mechanism, a total budget of epsilon equal to 1 spread across the release, and a rule that suppresses cells whose noisy count falls below a threshold. Busy routes remain accurate to within a few percent, while journeys of individual commuters become statistically indistinguishable from noise. The authority documents the budget and does not answer further ad hoc queries on the same data, so the guarantee is not eroded by composition.