Differential Privacy › The Core Idea
Language AI HandbookAll chapters Differential Privacy › The Core IdeaOne section · Sections in this chapter2 / 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
Before diving into formalism, consider a concrete privacy problem. Suppose a hospital trains a text classifier to predict diagnosis codes from clinical notes. A curious adversary knows everything about the training procedure, has access to the trained model, and wants to determine whether a specific patient's record appeared in the training set. If they succeed, they learn something private about that individual. This is called a membership inference attack, and it is a real threat: models trained without any privacy protection often make it possible to infer with high confidence whether a given record was used for training.
The classic defense would be to remove identifying information from the training data. But as the memorization chapter demonstrated, neural networks can reconstruct quasi-identifying combinations even without obvious personally identifiable information. A clinical note can be stripped of names and dates while still being identifiable by its combination of age, diagnosis codes, and medication history. Anonymization is brittle.
Differential privacy takes a fundamentally different approach. Instead of attempting to scrub the data, it adds carefully calibrated random noise to the training process itself. The noise is designed so that no single training example has more than a bounded influence on the final model parameters. The key insight is that this is a property of the algorithm, not of the data. Even if you have perfect knowledge of the training algorithm, hyperparameters, architecture, and everything except the specific training set used, you cannot determine with high confidence whether any particular record was included.
A randomized algorithm is differentially private if running it on a dataset with one person's record produces nearly the same distribution of outputs as running it on the dataset with that person's record removed. "Nearly the same" is controlled by a parameter : smaller means stronger privacy.
To build intuition for what this means in practice, think of it this way. Imagine you flip a coin to decide whether Alice's record is included in the training set, then train a model and show it to an adversary. The adversary knows the coin was fair, but they also see the trained model. How much does the model reveal about which outcome the coin landed on? Differential privacy bounds the adversary's ability to answer that question: their posterior belief about the coin flip can shift by at most a factor of from the prior, regardless of how cleverly they analyze the model.
This framing reveals why the guarantee is so strong. An adversary with unlimited compute, access to any side information, and full knowledge of the training algorithm still cannot exploit the model to learn much about any individual. The protection is worst-case, not average-case.