ArticleslgStudy

computer science

Differential privacy

Differential privacy is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Differential privacy rather than just read about it. In short: Differential privacy (DP) is a mathematically rigorous framework for releasing statistical information about datasets while protecting the privacy of individual data subjects. It enables a data holder to share aggregate patterns of the group while limiting information that singles out specific individuals.

Differential privacy — main illustration
Differential privacy — illustration

Key takeaways

  • Differential privacy belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Differential privacy to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Differential privacy from memory before moving on to harder problems.

Reference excerpt

Differential privacy (DP) is a mathematically rigorous framework for releasing statistical information about datasets while protecting the privacy of individual data subjects. It enables a data holder to share aggregate patterns of the group while limiting information that singles out specific individuals. This is done by injecting carefully calibrated noise into statistical computations such that the utility of the statistic is preserved while provably limiting what can be inferred about any individual in the dataset. Another way to describe differential privacy is as a constraint on the algorithms used to publish aggregate information about a statistical database which limits the disclosure of private information of records in the database. For example, differentially private algorithms are used by some government agencies to publish demographic information or other statistical aggregates while ensuring confidentiality of survey responses, and by companies to collect information about user behavior while controlling what is visible even to internal analysts. Roughly, an algorithm is differentially private if an observer seeing its output cannot tell whether a particular individual's information was used in the computation. Differential privacy is often discussed in the context of identifying individuals whose information may be in a database. Although it does not directly refer to identification and reidentification attacks, differentially private algorithms provably resist such attacks.

ε-differential privacy

The 2006 Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam D. Smith article introduced the concept of ε-differential privacy, a mathematical definition for the privacy loss associated with any data release drawn from a statistical database. (Here, the term statistical database means a set of data that are collected under the pledge of confidentiality for the purpose of producing statistics that, by their production, do not compromise the privacy of those individuals who provided the data.) The definition of ε-differential privacy requires that a change to one entry in a database only creates a small change in the probability distribution of the outputs of measurements, as seen by the attacker. The intuition for the definition of ε-differential privacy is that a person's privacy cannot be compromised by a statistical release if their data are not in the database. In differential privacy, each individual is given roughly the same privacy that would result from having their data removed. That is, the statistical functions run on the database should not be substantially affected by the removal, addition, or change of any individual in the data. How much any individual contributes to the result of a database query depends in part on how many people's data are involved in the query. If the database contains data from a single person, that person's data contributes 100%. If the database contains data from a hundred people, each person's data contributes just 1%. The key insight of differential privacy is that as the query is made on the data of fewer and fewer people, more noise needs to be added to the query result to produce the same amount of privacy. Hence the name of the 2006 paper, "Calibrating Noise to Sensitivity in Private Data Analysis."

Definition Let ε be a positive real number and 𝒜 be a randomized algorithm that takes a dataset as input (representing the actions of the trusted party holding the data). Let im 𝒜 denote the image of 𝒜. The algorithm 𝒜 is said to provide (ε, δ)-differential privacy if, for all datasets D1 and D2 that differ on a single element (i.e., the data of one person), and all subsets S of im 𝒜:

where the probability is taken over the randomness used by the algorithm. This definition is sometimes called "approximate differential privacy", with "pure differential privacy" being a special case when δ=0. In the latter case, the algorithm is commonly said to satisfy ε-differential privacy (i.e., omitting δ=0). Differential privacy offers strong and robust guarantees that facilitate modular design and analysis of differentially private mechanisms, as it supports composability, robustness to post-processing, and predictable degradation with correlated data.

Example According to this definition, differential privacy is a condition on the release mechanism (i.e., the trusted party releasing information about the dataset) and not on the dataset itself. Intuitively, this means that for any two datasets that are similar, a given differentially private algorithm will behave approximately the same on both datasets. The definition gives a strong guarantee that presence or absence of an individual will not affect the final output of the algorithm significantly. For example, assume we have a database of medical records D1 where each record is a pair (Name, X), where X is a Boolean denoting whether a person has diabetes or not. For example:

Now suppose a malicious user (often termed an adversary) wants to find whether Chandler has diabetes or not. Suppose he also knows in which row of the database Chandler resides. Now suppose the adversary is only allowed to use a particular form of query Qi that returns the partial sum of the first i rows of column X in the database. In order to find Chandler's diabetes status the adversary executes Q5(D1) and Q4(D1), then computes their difference. In this example, Q5(D1)=3 and Q4(D1)=2, so their difference is 1. This indicates that the "Has Diabetes" field in Chandler's row must be 1. This example highlights how individual information can be compromised even without explicitly querying for the information of a specific individual. Continuing this example, if we construct D2 by replacing (Chandler, 1) with (Chandler, 0) then this malicious adversary will be able to distinguish D2 from D1 by computing Q5−Q4 for each dataset. If the adversary were required to receive the values Qi via an ε-differentially private algorithm, for a sufficiently small ε, then they would be unable to distinguish between the two datasets.

Composability and robustness to post processing Composability refers to the fact that the joint distribution of the outputs of (possibly adaptively chosen) differentially private mechanisms satisfies differential privacy.

… excerpt ends here. Continue reading the full article.

Illustrations

Differential privacy: An informal definition of differential privacy
An informal definition of differential privacy
Differential privacy: A formal definition of ε-differential privacy. D1 is a dataset without the private data, and D2 is one with it. This is "pure ε-differential privacy", meaning δ=0.
A formal definition of ε-differential privacy. D1 is a dataset without the private data, and D2 is one with it. This is "pure ε-differential privacy", meaning δ=0.
Differential privacy: Laplace mechanism offering .5-differential privacy for a function with sensitivity 1.
Laplace mechanism offering .5-differential privacy for a function with sensitivity 1.

Worked examples

Example 1 — a first encounter with Differential privacy

Start with the simplest possible case. Write down what Differential privacy claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Differential privacy before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Differential privacy ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Differential privacy

In research
Differential privacy appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Differential privacy in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Differential privacy is common in secondary-school and first-year university syllabi. It links to neighbouring topics Differential privacy, Information privacy, Theory of cryptography, so understanding it makes those chapters shorter.
In everyday life
Look for Differential privacy outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Differential privacy” →

How to study Differential privacy in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Differential privacy means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Differential privacy out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Differential privacy in simple terms?

Differential privacy (DP) is a mathematically rigorous framework for releasing statistical information about datasets while protecting the privacy of individual data subjects. It enables a data holder to share aggregate patterns of the group while limiting information that singles out specific indi…

Why does Differential privacy matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Differential privacy?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Differential privacy.

Tags

  • Differential privacy
  • Information privacy
  • Theory of cryptography

Keep exploring