SStatistics, Built

Stage V · PhD Research

Part 63 of 65

Privacy and Fairness

PhDstarts at this level70 min of film14 chaptersprerequisites: Part 41, Part 46, Part 50

How much does protecting individuals cost the statistics, and what does fairness require?

In the mid-1990s Massachusetts releases state employees' hospital records without names, and Latanya Sweeney finds Governor Weld's by joining ZIP code, birth date and sex to a twenty-dollar voter roll. Anonymity is not a property of a dataset, so privacy becomes a property of the release: differential privacy, whose price is noise. The part reads the definition as a hypothesis test between two neighbouring databases, with trade-off curves and Gaussian differential privacy, and adds up losses with Renyi and zero-concentrated accountants. It then prices privacy in mean squared error under the central and local models, repairs a confidence interval that ignored the noise (85.4% against 95.2% coverage), and follows the 2020 Census and noisy gradient descent. The second half turns to ProPublica's COMPAS data: independence, separation and sufficiency, Chouldechova's identity and the theorem that they cannot all hold when base rates differ, multicalibration by patching, and counterfactual fairness.

What you need. Neyman-Pearson testing as in Part 46; minimax lower bounds as in Part 50; measurement error and survey practice as in Part 41.

Hook
re-identification from ZIP, sex and birth date
Mathematics
DP and its accountants, DP as hypothesis testing, the cost of privacy, private inference, the 2020 Census, fairness criteria, impossibility, multicalibration
Built
statkit.privacy

What you will be able to do

Bachelor's

  • Explain how a join on ZIP code, birth date and sex re-identifies a record with no name on it.
  • Compute false positive rates, false negative rates and predictive values by group, and say which fairness criterion each belongs to.

Master's

  • Prove that the Laplace mechanism and randomized response are epsilon-differentially private, and debias a randomized-response proportion.
  • Derive Chouldechova's identity and the impossibility that follows from unequal base rates.

PhD

  • State differential privacy as a bound on every test's trade-off curve, and prove that independent Gaussian mechanisms compose to a Gaussian curve with the root sum of squares.
  • State the central and local minimax costs of privacy and the assumptions behind each.

Practice

  • Build a confidence interval from a privatized count that adds the mechanism's variance, and publish the mechanism and its parameters with it.
  • Audit a score by group: error rates, calibration within score cells, and which gaps a change of threshold can and cannot remove.

Contents

Each chapter has a home level. Choose a track to see what to read and watch: Bachelor's 12 min · Master's 28 min · PhD 70 min · Practice 28 min.

  1. 0A governor's record, 1997Bachelor's5 min
  2. 1Differential privacyPhD6 min
  3. 2DP as hypothesis testingPhD5 min
  4. 3AccountantsPhD6 min
  5. 4The cost of privacyPhD5 min
  6. 5Private inferencePractice5 min
  7. 6The 2020 CensusPractice5 min
  8. 7DP-SGD and membership inferencePractice6 min
  9. 8Fairness criteriaBachelor's5 min
  10. 9ImpossibilityPhD6 min
  11. 10MulticalibrationPhD5 min
  12. 11Causal fairnessPhD5 min
  13. 12Open problemsPhD4 min
  14. Recap, problems, and the road aheadAll tracks2 min

Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · Build the film.

Lecture

The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film. A dashed box stands for a number the film computes when it is rendered (hover over it to see what is computed); the README's figures for each chapter, where it lists them, follow the chapter's text.

A governor's record, 1997Bachelor's5 min

In the mid-nineteen-nineties, the Group Insurance Commission of Massachusetts released the hospital records of state employees to researchers. Names and addresses had been removed, and the governor, William Weld, assured the employees that their privacy was protected. But each record still carried a ZIP code, a birth date and a sex, next to the diagnoses. Latanya Sweeney, then a graduate student, bought the voter roll of Cambridge, where the governor lived, for twenty dollars. It listed every voter's name, address, ZIP code, birth date and sex. She found the governor's records, and mailed them to his office.

The attack is a join, of the kind every database supports. The medical table and the voter table share three columns, the quasi-identifiers. In Cambridge, by the usual account, six people shared the governor's birth date; three of them were men; and only one of those lived in his ZIP code. Removing names had not made anyone anonymous. It had only removed one of many keys.

The Museum's NHANES extract contains 5,176 adults with complete age, sex, body-mass index and at least one blood-pressure measurement. This is an unweighted complete-case sample, with age top-coded at eighty. Age and sex alone single out nobody in this extract. Adding body-mass index to one decimal makes about eighty-one percent unique within this sample. Adding rounded average systolic pressure makes almost everyone sample-unique. Linking an external record would additionally require matching measurements, inclusion knowledge and a suitable identified source. Sample uniqueness alone is not a demonstrated re-identification attack or a population uniqueness estimate.

The governor was not unlucky. In 2000 Sweeney estimated from the 1990 census that about eighty-seven percent of Americans were unique by five-digit ZIP code, sex and birth date; Philippe Golle, repeating it with the 2000 census, found sixty-three percent, still a majority. In 2008 Arvind Narayanan and Vitaly Shmatikov re-identified users of the Netflix Prize data from a few movie ratings and their dates. The same year, Nils Homer and colleagues showed that published summary statistics of a genetic study, allele frequencies alone, could reveal whether a person's DNA was in it, and access to such summaries was restricted. And Irit Dinur and Kobbi Nissim had proved in 2003 that answering too many counting queries too accurately lets anyone reconstruct the database itself. Aggregates leak too.

The lesson took a decade to sink in. Anonymity is not a property of a dataset, because what identifies someone depends on what else the attacker knows, and that cannot be listed in advance. So privacy has to be a property of the process that produces a release: a promise about what any attacker, with any side knowledge, can learn about any one person. That promise is differential privacy, and its price is noise. This part prices it in the statistician's own currency: mean squared error, coverage and power.

The same records feed decisions. ProPublica studied COMPAS scores for Broward County defendants in 2016, using two-year rearrest as its outcome. Among defendants without a recorded rearrest, Black defendants were labelled medium or high risk nearly twice as often as white defendants. The company emphasized predictive performance and approximate calibration instead. These are different criteria, and both descriptive patterns can coexist. The empirical predictive values and score-specific rates are not exactly equal across groups; the mathematical conflict does not prove every empirical claim made in that dispute.

The plan. Chapters one to four: differential privacy, the same definition as a hypothesis test, accountants that add privacy losses, and the minimax cost of privacy. Chapters five to seven: honest inference on privatized data, the 2020 United States census, and private machine learning. Chapters eight to eleven: fairness criteria, the theorem that they cannot all hold, multicalibration, and causal fairness.

Two promises come due. Part eighteen published a survey's tables as if aggregates revealed nothing about anyone; chapters one to six measure what each release leaks, and what hiding it costs. Part nineteen judged a classifier by one error rate; chapters eight to eleven split the errors by group, and ask which differences can be removed.

1Differential privacyPhD6 min

Differential privacy: a promise about any one person, against any attacker. Differential privacy compares neighboring datasets under a specified adjacency relation. They may differ by adding or removing one person, or by replacing one record at fixed sample size; sensitivity must match that choice. A mechanism is epsilon-private when, for every neighboring pair and every output event, one output probability is at most e to epsilon times the other. The reverse holds by symmetry. Approximate privacy adds delta to this event inequality. Delta is an additive probability slack, not in general the probability of a data-independent switch into an unprotected mode. Small epsilon and delta limit the additional evidence supplied by a release about the chosen neighboring alternatives. They do not promise secrecy of facts already inferable without this record.

The Bayesian reading is precise for two fixed neighboring alternatives, with the other records held fixed. Under pure epsilon privacy, the likelihood ratio multiplies prior odds by a factor between e to minus epsilon and e to epsilon. This is not a universal bound on learning every correlated secret under an arbitrary prior over whole databases. The mechanism's guarantee continues to hold in the presence of auxiliary information, including the other records; no list of possible linkage keys is needed. Its object is the incremental effect of this record under the stated adjacency. Population patterns and correlations can remain highly informative.

The oldest private mechanism is older than the definition. Stanley Warner proposed it in 1965 for embarrassing survey questions. Each respondent answers truthfully with probability pi, and gives the opposite answer otherwise. The ratio of the chances of any report, under a true yes and a true no, is pi over one minus pi, so the mechanism is differentially private with epsilon the log of that ratio. A fair coin deciding between the truth and a second coin toss gives pi of three quarters, and epsilon the log of three. The analyst still learns the population's proportion: the expected fraction of yes reports is a known linear function of the true one, and inverting it gives an unbiased estimate. The price is variance: dividing by two pi minus one inflates it.

For a numerical statistic, the noise is calibrated to its sensitivity, the most that one person's record can change it. A count has sensitivity one. The Laplace mechanism adds noise with a two-sided exponential density, of scale sensitivity over epsilon. Why it works: the ratio of the output's densities under two neighbours is e to the minus epsilon times the distance from one centre, over e to the minus epsilon times the distance from the other. By the triangle inequality the ratio is at most the exponential of sensitivity divided by the scale, which is e to epsilon. For a count at epsilon one the noise has standard deviation about 1.4: invisible in a national total, fatal in a block of three people.

Gaussian noise is more natural for a statistician, and it adds up better, but it needs the slack delta, because the Gaussian's tails make the density ratio unbounded far out. The textbook calibration, from Dwork and Roth, takes sigma equal to the square root of two log of 1.25 over delta, times the sensitivity, over epsilon, for epsilon below one. Borja Balle and Yu-Xiang Wang computed in 2018 the exact delta of the Gaussian mechanism at every epsilon, an expression in two normal distribution functions. Solving it for sigma gives the analytic Gaussian mechanism. The exact calculation needs less noise for the same guarantee.

The noise each mechanism needs for one count, against epsilon, on log scales, with delta of one in a hundred thousand for the Gaussians. The Laplace mechanism's standard deviation is root two over epsilon: a straight line of slope minus one. The classic Gaussian calibration needs at epsilon one, the edge of its validity. The analytic calibration needs for exactly the same guarantee, about a quarter less, and it stays valid for larger epsilon. Loose bounds cost accuracy, and this part keeps meeting that lesson.

Three properties make the definition usable. Post-processing: anything computed from a private output, without going back to the data, is exactly as private. Rounding, clipping, fitting a model to noisy counts: all free. Composition: releasing k outputs with budgets epsilon one to epsilon k is private with their sum. Every statistic published spends from one budget. Group privacy: a group of k people is protected with k times epsilon, so a household, or a family in a genetic study, gets weaker protection than one person.

What it does not promise. A study that shows smoking causes cancer teaches the world something about every smoker, including those not in it. Differential privacy permits that: it protects against harms caused by participating, not against what the data reveal about populations. It also says nothing about which epsilon is small enough. Values from a tenth to ten are used in practice, and the meaning of e to the ten is weak. And non-numeric outputs, such as choosing the best of several options, need other mechanisms: McSherry and Talwar's exponential mechanism picks an option with probability growing exponentially in its quality.

2DP as hypothesis testingPhD5 min

Differential privacy is a statement about hypothesis tests. Larry Wasserman and Shuheng Zhou noticed in 2010 that the definition is about tests, the subject of Part forty-six. An attacker who sees the output wants to decide between two hypotheses: the data are D, which contains your record, or D prime, which does not. Any decision rule has a type one error alpha, accusing you of being in the data when you are not, and a type two error beta, missing you when you are. Peter Kairouz, Sewoong Oh and Pramod Viswanath showed in 2015 that epsilon-delta privacy is exactly two linear constraints on every test's pair of errors.

Picture the square of possible error pairs. Guessing at random, ignoring the output, achieves every point on the diagonal, alpha plus beta equals one. No release, no information. A perfect attacker would reach the corner, both errors zero. A private mechanism keeps every test above a curve, its trade-off function: the smallest type two error achievable at each type one error. The closer the curve hugs the diagonal, the more private the release.

The trade-off plot. Guessing is the grey diagonal. Epsilon of one forbids the purple region, bounded by two straight lines, from the two inequalities. The Laplace mechanism at epsilon one, in white, follows those lines near the ends and bows above them in the middle. In green, the trade-off curve of a Gaussian mechanism whose noise equals the sensitivity, called one-GDP. Near the axes it dips into the purple region: no Gaussian mechanism is purely epsilon-private, which is why it needs a delta. In gold, an attack simulated forty thousand times: a released mean of a hundred values with Gaussian noise, and an attacker who knows the other ninety-nine and thresholds the release. The attack lands on the green curve, because the Neyman-Pearson test is the best possible. At a five percent false accusation rate, it catches the target only percent of the time.

Dong, Roth and Su use trade-off functions to define f-privacy: every neighboring pair must have its optimal testing curve above f. Mu-GDP means the experiment is at least as hard to distinguish as unit-variance normals separated by mu. Equality is not required for every mechanism or every neighboring pair. For a Gaussian mechanism, a pair separated by sensitivity Delta has the exact curve G of Delta over sigma. Smaller shifts are more private; attaining the sensitivity makes the worst pair exact. Gaussian trade-off composition gives G with the root sum of squared mus. This bound is sharp for independent Gaussian shifts; arbitrary mechanisms satisfying those GDP bounds can be strictly more private.

A mu reads directly as an attacker's power. At mu of one, a test with a five percent false alarm rate has power one minus Phi of 1.645 minus one, which is . At mu of a half, the power is about , barely above the five percent of guessing; at mu of three, it is , and privacy is mostly gone. The epsilon-delta pairs of a mu-GDP mechanism form a whole curve, one delta for each epsilon, so a single pair throws information away. Reporting mu, or the trade-off curve, is more honest.

Why does Gaussian privacy recur? Dong, Roth and Su prove limit theorems for compositions of many weak mechanisms. Under their moment and negligibility conditions, the composition's trade-off approaches a Gaussian curve, with its parameter determined by the components. Merely having many steps is insufficient. Approximate GDP accounting can be useful for specified subsampled training mechanisms, but its finite-step approximation error needs control. It is not a universal exact certificate for any training algorithm. The analogy with a central limit theorem is helpful. For independent product experiments the privacy loss adds independent terms; adaptive training involves conditional increments and requires the appropriate composition argument.

3AccountantsPhD6 min

Accountants: how privacy losses add up over many releases. Privacy loss is the log likelihood ratio of a released output under a neighboring pair. Pure epsilon privacy bounds its absolute value by epsilon almost surely. Approximate privacy instead bounds suitable tail excesses. For independent releases, joint privacy loss is a sum. Adaptive releases also decompose into conditional losses, and composition theorems handle that dependence. Fluctuations can grow on a square-root scale, while the positive mean accumulates. Advanced composition therefore includes both a square-root term and a term proportional to k epsilon squared for small epsilon; square-root growth does not persist indefinitely at fixed per-step privacy.

Cynthia Dwork, Guy Rothblum and Salil Vadhan turned that into the advanced composition theorem, in 2010. k releases, each epsilon-private, are together private with epsilon prime equal to the square root of two k log one over delta prime, times epsilon, plus k epsilon times e to the epsilon minus one, at the cost of an extra delta prime. For small epsilon per step the first term dominates: square root of k growth. But it is a Hoeffding bound, from Part fifty-one, applied to a worst case. When each step's epsilon is near one, the second term is larger than basic composition itself. Bounds that throw away the distribution of the loss pay for it.

Ilya Mironov's Renyi differential privacy, of 2017, tracks the whole distribution of the loss through its moments. The Renyi divergence of order alpha between the output distributions, one over alpha minus one times the log of the expected likelihood ratio to the power alpha, is bounded by a function epsilon of alpha. For the Gaussian mechanism it is exactly alpha Delta squared over two sigma squared, and under composition the functions simply add. At the end, convert: the mechanism is epsilon-delta private with epsilon equal to the Renyi bound plus log one over delta over alpha minus one, minimized over alpha.

Mark Bun and Thomas Steinke's zero-concentrated privacy, from 2016, keeps one number. A mechanism is rho-zCDP if its Renyi divergence of every order alpha is at most rho alpha: a line through the origin. The Gaussian mechanism is exactly Delta squared over two sigma squared zCDP, and rhos add. The conversion: rho-zCDP implies epsilon-delta privacy with epsilon equal to rho plus two times the square root of rho log one over delta. This is the accountant the Census Bureau used.

The accountants compared. Each release adds Gaussian noise of standard deviation to a statistic of sensitivity one, and we ask for the total epsilon at delta of one in a hundred thousand after k releases, on log scales. Basic composition grows like k, reaching after a thousand releases. Advanced composition is worse here, , because each step's epsilon is near one. The Renyi accountant gives , and zCDP essentially the same, . Same mechanism, same data, same guarantee asked for: an accounting times tighter. For a single release, the exact calculation is still best; the gain is in composition.

The redistricting release's stated zCDP budget is rho 2.63, split into 2.56 for person tables and .07 for housing. Its protected neighboring universe must respect published invariants; exact state totals are outside that protection. The standard zCDP conversion at delta ten to minus ten gives epsilon about eighteen point two. That is a weak multiplicative worst-case bound, and the guarantee should be read with its adjacency and invariants. A large upper bound is not evidence that an actual attack attains it. For comparison only, a continuous Gaussian shift experiment with rho 2.63 has mu equal to root two rho, about 2.29, and power about .74 at five percent false positives. The real release uses discrete noise, hierarchy and post-processing. Rho-zCDP alone does not imply this exact GDP curve or this attack power for the census.

Subsampling can amplify privacy. When a person is selected secretly at random with probability q, suitable mechanisms and adjacency relations admit a smaller effective budget. Revealing batch membership can destroy that amplification. For Poisson subsampling under the relevant add/remove model, the pure epsilon expression is log of one plus q times e to epsilon minus one; it is approximately q epsilon when epsilon is small. Replacement and fixed-size sampling have different details. Abadi and colleagues' moments accountant tracks subsampled Gaussian training more tightly than basic composition. Modern numerical privacy-loss accountants can give certified bounds with discretization and truncation error control; an FFT by itself is not a proof of tightness.

4The cost of privacyPhD5 min

The cost of privacy, measured as a minimax rate. Start with the simplest problem: estimate a proportion p from n people's bits. In the central model a trusted curator holds the data and adds Laplace noise to the count. The mean squared error is the sampling variance, p times one minus p over n, plus the noise's variance, two divided by the square of n times epsilon. The privacy term falls like one over n squared, faster than sampling error. For large samples, central privacy is nearly free.

In the local model there is no trusted curator: each person randomizes their own bit before sending it, by randomized response. Apple and Google have used local privacy for usage statistics. The estimator from chapter one has variance about one over n times the factor e to the epsilon over e to the epsilon minus one, squared. For small epsilon that is one over n epsilon squared: the noise is now order one over n, the same order as sampling error, multiplied by a large constant. John Duchi, Michael Jordan and Martin Wainwright proved in 2013 that this is unavoidable: under local privacy, for proportion estimation at small epsilon the local minimax squared-error rate is of order the minimum of one and one over n epsilon squared. Other problems can have additional dimension-dependent losses, so n epsilon squared is not a universal effective sample size.

Simulated, with p of and epsilon of one, twenty thousand runs at each sample size, on log scales. The grey dashed line is the error without privacy. The central Laplace estimator sits just above it, and the gap closes as n grows, because the noise term falls like one over n squared. Local randomized response runs parallel, about times the central error at the largest displayed sample size, approaching a constant factor as n grows. In this proportion example, roughly five private reports give the precision of one unprivatized observation. A parallel line on a log-log plot is a constant factor that no amount of data removes.

In more dimensions, the model class and norm determine the price. Cai, Wang and Zhang study specified bounded and sub-Gaussian mean classes. A representative squared-error rate has sampling term d over n and privacy term d squared log one over delta over n squared epsilon squared, under the stated parameter ranges and scale normalization. Upper bounds for broader tail classes can have additional logarithms. Equating these two displayed terms gives n of order d log one over delta divided by epsilon squared, not d root log divided by epsilon. With d a thousand, epsilon one and delta ten to minus five, that is about eleven thousand five hundred. The exact minimax statement needs its distribution class and privacy regime. Related results for private regression use clipping and noisy optimization, but no universal rate covers every dimension, tail law and loss.

The lower bounds use Part fifty's machinery, with one new ingredient. Under local privacy, two input distributions that are close in total variation produce output distributions whose Kullback-Leibler divergence is at most a constant times e to the epsilon minus one, squared, times their total variation squared. A strong data-processing inequality: the privatizing channel contracts information. Feed that into Le Cam's two-point method or Fano's inequality, and n is replaced by n times e to the epsilon minus one, squared. Under central privacy the tool is a coupling argument, or tracing attacks, which show that an accurate estimator must reveal who was in the sample: accuracy beyond the rate would let an attacker win the test of chapter two.

The lessons. Central privacy is cheap for large populations and simple statistics: its cost is second order. It is expensive for small groups, many statistics, or high dimensions, where the second-order term is not small. A census block of five people is a small sample, however large the country. Local privacy, which needs no trust, costs a constant factor at every sample size, so it suits only enormous populations and simple questions.

5Private inferencePractice5 min

Private inference: confidence intervals and tests that survive the noise. An analyst receives a privatized count, say the number of people in a survey with some condition, released with Laplace noise. The usual next step is the Wald interval of Part eleven, the estimate plus or minus 1.96 standard errors, as if the noisy count were the real one. But the released proportion has two sources of error, sampling and privacy noise, and the Wald interval accounts for only the first. When the privacy noise is comparable to the sampling noise, the interval is too short, and its coverage falls below ninety-five percent.

Model the published noise as part of the experiment. For the untruncated noisy proportion, variance is p times one minus p over n plus two over the square of n epsilon. Clipping the released estimate changes that exact identity. Our noise-aware Wald approximation uses that sum, with a clipped plug-in value only for its sampling variance. Its center remains the raw noisy proportion. A Gaussian critical value is an approximation, especially when Laplace noise dominates; including a variance term alone is not a finite-sample coverage theorem. Exact or calibrated alternatives include inversion of the binomial-Laplace convolution and noise-aware bootstrap methods. Karwa and Vadhan's normal-mean intervals and Ferrando and colleagues' private bootstrap address specific models with their own assumptions.

A simulation: a true proportion of 0.3, a Laplace-noised count, and a thousand runs at each sample size and budget. At epsilon of a tenth, the naive interval covers only percent of the time with a hundred people, and percent with a thousand. The privacy noise has standard deviation fourteen counts, against a sampling standard deviation of about four and a half at n of a hundred. At epsilon of a half, the noise is five times smaller, and the naive interval nearly works. The noise-aware interval covers between and percent across these grid points. Those estimates have Monte Carlo error and do not establish coverage for all proportions and budgets.

Two subtleties, both familiar. The released proportion can be negative, or above one, and clipping it to the unit interval is free post-processing for privacy but biases it, the census problem of the next chapter. And when the data are clipped before release, to bound the sensitivity of a mean of unbounded values, the clipping introduces a bias the analyst must also model. Clip too tightly and the bias dominates; too loosely and the noise does. The best clipping level is a bias-variance trade-off, Part nine's oldest lesson, with the privacy budget in it.

Tests behave the same way. A chi-squared test of independence on a noisy contingency table, computed as if the counts were exact, rejects a true null far more often than five percent, because the noise looks like dependence. Marco Gaboardi and coauthors showed this in 2016, and corrected the reference distribution. Jordan Awan and Aleksandra Slavkovic found in 2018 the uniformly most powerful private test for a binomial proportion, by a privacy-constrained version of the Neyman-Pearson lemma. Its rejection probability is a smooth function of the count, a randomized test of Part forty-six: the privacy requirement forces the randomization.

Transparency helps inference. Traditional swapping often concealed design details, making its induced measurement error hard to model. Suppression rules and some earlier disclosure methods have also been public, so secrecy is not universal. Differential privacy permits publication of the mechanism and its parameters. The realized noise itself must not be disclosed alongside the noisy answer, since subtraction would recover the original. With a fully specified release, users can incorporate privacy randomization into inference. Complex optimization, clipping and invariants can still make that likelihood difficult; transparency enables the calculation without making every calculation easy.

6The 2020 CensusPractice5 min

The 2020 United States census, the largest use of differential privacy. The Census Bureau is bound by law not to reveal any person's answers. For decades it protected them by swapping some households between blocks and keeping the details secret. Then it attacked its own 2010 publications. From the billions of published table cells, it reconstructed person-level records of block, sex, age, race and ethnicity, and linked many to commercial data, an exercise in Dinur and Nissim's reconstruction. The conclusion was that swapping could not survive modern computing. For 2020 the Bureau, led on this by its chief scientist John Abowd, adopted differential privacy for its main products.

The TopDown algorithm works down the geographic hierarchy: nation, state, county, tract, block group, block. At each level it measures many tables of counts with discrete Gaussian noise, spending a share of the total budget, rho of 2.63 for the redistricting data. Some numbers, called invariants, were published exactly, including each state's total population, which apportions Congress. Then post-processing: an optimization finds nonnegative integer counts, consistent across levels and with the invariants, as close as possible to the noisy measurements. The optimization costs no additional privacy conditional on the published invariants. Publishing a confidential total exactly is not free post-processing of noisy counts: it restricts the protected universe or adds an unprotected release.

A toy version shows what post-processing does to the statistics. Four hundred blocks in a county, with populations from a skewed distribution: many tiny blocks and a few large ones. Add rounded Gaussian noise of standard deviation four to each count. Some small blocks get negative counts. Then take the continuous least-squares nonnegative projection onto the county total and round by largest remainders. The integer counts still add up exactly. This is a fixed-public-total illustration, not a calibrated implementation of TopDown. The solution subtracts one constant from every count, and sets to zero those that would go negative: a water-filling.

The average error of each block's count over two hundred runs, by the block's true size. The noisy measurements, in blue, are unbiased in every size class, but percent of them are negative. After the projection, in purple, the smallest blocks, with fewer than five people, are inflated by of a person on average, a large relative error, and the mass comes out of the larger blocks, which are slightly too small. No count is negative and the total is exact. Post-processing cost nothing in privacy, and it bought consistency with a systematic bias.

Why the bias? A block of one person with noise of standard deviation four is pushed below zero about a third of the time, and nonnegativity lifts every such measurement up to zero. Truncation raises the mean. To keep the total exact, the projection takes the excess from everyone else, a little from each large block. Related nonnegativity and consistency constraints can bias small-area counts in real releases. The actual hierarchy and optimization are more complex than this toy, so it does not quantify the real census bias. The Bureau later published the noisy measurements themselves, which analysts can use without the post-processing bias: the redistricting file appeared in June 2023.

The change was fought over. Christopher Kenny and coauthors, studying the Bureau's demonstration data in 2021, argued that the noise could distort redistricting and voting-rights analyses, especially for racially mixed areas. The State of Alabama sued to stop the method in 2021; in June a three-judge federal court declined to block it, calling the challenge premature. Demographers worried about small-area estimates, and the Bureau set the final budget above that of its early demonstration data, buying accuracy with privacy. Every user of census data now works with a declared privacy-accuracy trade-off.

Who should choose epsilon? John Abowd and Ian Schmutte argued in 2019 that privacy and accuracy are both public goods, and that the budget is an economic choice: spend it until the marginal social cost of lost privacy equals the marginal social benefit of accuracy. Mathematical models and empirical evaluations describe privacy-accuracy trade-offs under specified releases and losses. It does not say where to stand on the curve. That is a decision for the society whose data they are, informed by the curve, which is more than any previous disclosure method offered.

7DP-SGD and membership inferencePractice6 min

Private learning, and the attacks that audit it. Private stochastic gradient descent clips per-example gradients before adding calibrated noise. Each clipped vector has norm at most C. Adding or removing one contribution changes a sum by at most C; replacing one contribution by another can change it by two C. The adjacency and sensitivity must agree. Add Gaussian noise to the sum and divide by a fixed public batch size. Our fixed-size full-batch example uses replacement sensitivity two C, so its noise standard deviation is two C times the square root of steps over two rho. Adaptive Gaussian composition accounts for the steps. Subsampling amplification is absent in this full-batch example. The model inherits the resulting privacy bound, provided preprocessing and hyperparameter selection are also public or privately accounted.

A small test. The Museum's Wisconsin breast biopsies: thirty measurements of each sample's cell nuclei, and whether it was malignant. Logistic regression, trained on biopsies by sixty steps of full-batch gradient descent, each gradient clipped to norm one. The noise is set so the whole run is rho-zCDP, for a range of rho, and converted to epsilon at delta of one in a hundred thousand. Accuracy is measured on the remaining , averaged over the same ten random splits at each budget, using fixed feature units and pointwise clipping rather than data-fitted scaling. Each model has its own budget; these public-data accuracy diagnostics and repeated models are not one jointly private release.

The non-private model, in blue, classifies percent of held-out biopsies correctly. The private models, in purple, with one standard deviation across splits. At epsilon of , accuracy falls to percent, and varies a lot from split to split. At epsilon of , it is percent. The accuracy loss varies with budget in this small public-data experiment. Overlapping descriptive standard deviations are not an equivalence test or a proof that the models have equal performance. Four hundred examples and thirty-one parameters is a small problem; the noise needed shrinks as the training set grows, as chapter four predicts.

Why bother, for a model rather than a table? Because large models memorize. Nicholas Carlini and colleagues extracted, in 2021, hundreds of verbatim training sequences from the language model GPT-2, including names, phone numbers and addresses, by sampling from it and ranking the outputs. A model is a statistic of its training data, with millions of parameters: Dinur and Nissim's reconstruction warning applies to it. Differential privacy bounds memorization directly: whatever the model outputs, it would have output with nearly the same probability without any one training example.

The basic attack on a model is membership inference: was this example in the training set? Reza Shokri and colleagues framed it in 2017, training shadow models to imitate the target. It is chapter two's hypothesis test exactly: in or out, with a false positive rate and a true positive rate. Carlini and coauthors argued in 2022 that the honest summary is the true positive rate at a very low false positive rate, such as one in a thousand: an attack that confidently identifies a few members is a real breach, even if its average accuracy is near half. Their likelihood-ratio attack is Neyman and Pearson's test, with shadow models estimating the two distributions. And epsilon-DP caps every such attack: its true positive rate is at most e to the epsilon times its false positive rate, plus delta.

An attack can give a lower confidence bound on the privacy budget. For a specified neighboring experiment and fixed delta, the inequality true-positive rate at most e to epsilon times false-positive rate plus delta yields epsilon at least log of true-positive rate minus delta over false-positive rate, when the numerator is positive. Use simultaneous one-sided confidence bounds rather than raw empirical ratios. Audits can expose privacy implementations weaker than their claimed bounds; a failed attack cannot prove the claimed upper bound. Single-run canary methods can improve efficiency under their randomization and testing design. Their multiple tests and dependencies must be included in the statistical analysis.

A bridge to the second half. Eugene Bagdasaryan, Omid Poursaeed and Vitaly Shmatikov documented settings in 2019 where DP-SGD imposed larger accuracy losses on underrepresented groups. This is an empirical risk, not a universal ordering for every dataset or training recipe. The reason is in the mechanism: rare examples have large, unusual gradients, which are the ones clipping cuts, and their signal is the one the noise drowns. Privacy for everyone can be paid for unequally. Which raises the question of the next four chapters: what would it mean for a statistical procedure to be fair?

8Fairness criteriaBachelor's5 min

The setting: a score R, computed from a person's features, used to predict an outcome Y, for people who belong to groups A. In COMPAS, R is a decile score from one to ten, Y is rearrest within two years, and A is race. Solon Barocas, Moritz Hardt and Arvind Narayanan organize the many proposed definitions into three families, each a conditional independence, the language of Part five. Leaving race out of the features does not settle anything, because the other features carry information about it: we saw how few facts identify a person.

Independence means the entire score distribution is the same across groups. Equal shares above one threshold are only a weaker, binary-decision version of demographic parity. Separation means score independence from group conditional on the outcome. At a chosen binary threshold this gives equal false-positive and false-negative rates; equalized odds for one threshold does not establish separation of the entire score. Sufficiency means the outcome distribution conditional on the score is the same across groups. When scores are probabilities and correctly scaled, calibration additionally requires the outcome rate to equal that numeric score. A decile label is a rank category, not probability divided by ten. These are distinct statistical criteria. Their estimates require uncertainty assessment, and none alone defines fairness for every decision.

The data. In 2016 Julia Angwin, Jeff Larson, Surya Mattu and Lauren Kirchner of ProPublica obtained COMPAS scores for defendants in Broward County, Florida, in 2013 and 2014, and matched them to criminal records over the following two years. After their published filters, defendants remain; the Museum keeps their age, sex, race, number of prior offences, decile score and outcome, with names removed. are Black or white, the comparison ProPublica made. Following ProPublica, a decile of five or more counts as labelled high risk.

The rates, by group. percent of Black defendants and percent of white defendants were rearrested: the base rates differ. and percent were labelled high risk, so independence fails. Among those not rearrested, percent of Black defendants were labelled high risk, against percent of white defendants: false positive rates nearly two to one. Among those rearrested, the false negative rates run the other way, against percent. Separation fails, ProPublica's finding. But among those labelled high risk, and percent were rearrested: similar positive predictive values, the company's reply.

Sufficiency, decile by decile: the fraction rearrested at each score, for each group, with dots sized by the number of defendants. The two curves nearly coincide: the score is broadly similar rates; not exact equality, as Northpointe said, and as the criminologists Anthony Flores, Kristin Bechtel and Christopher Lowenkamp also found. What differs is how the deciles are filled. Black defendants received a ten, against white defendants, and most white defendants are in the lowest deciles. Conditional rates are broadly similar but not identical, with finite cell counts. This descriptive plot does not establish exact sufficiency or numeric probability calibration.

Before COMPAS, a general fact: the criteria conflict in pairs. Independence and sufficiency cannot both hold if the group and the outcome are dependent, because a calibrated score must then track the different base rates. Independence and separation cannot both hold for a binary score when the base rates differ, unless the score is useless, independent of the outcome. And separation and sufficiency cannot both hold when the base rates differ, unless the outcome is recoverable from the score, including a perfectly inverted binary score. This full sufficiency statement is stronger than equality of positive predictive value alone. That last one is the COMPAS dispute, and the next chapter proves it with one line of algebra.

9ImpossibilityPhD6 min

Impossibility results: which fairness requirements conflict, under which conditions. Alexandra Chouldechova derived it in 2017. Take a binary label, high or low, in one group with base rate p. Count the true positives two ways. Among the high labels, a fraction PPV are rearrested; among the rearrested, a fraction one minus FNR are labelled high. And the false positives: among the high labels, one minus PPV; among the not rearrested, a fraction FPR. Dividing one count by the other, the number of high labels cancels. The false positive rate equals p over one minus p, times one minus PPV over PPV, times one minus the false negative rate. An identity, true of every classifier in every group.

Check it on the table. For Black defendants: a base rate of , a PPV of and a false negative rate of give a false positive rate of , exactly the observed value. For white defendants, , and give , again exact. So with base rates of fifty-two and thirty-nine percent, the first factor is for one group and for the other. Equal PPVs and equal false negative rates would force the false positive rates apart by that ratio, to one.

The identity as a picture: the false positive rate it forces, against a group's base rate, holding the PPV and false negative rate fixed. Orange and teal use each group's own values. The two observed false positive rates sit on their curves, as they must. Now suppose a new score had exactly equal PPVs and false negative rates in both groups, at their averages, and . The gold curve: at the two base rates, it forces false positive rates of and . The disparity ProPublica found is not a defect peculiar to COMPAS. Any score with equal predictive values and equal miss rates must have it, provided base rates differ and the shared factor is positive. A PPV of one gives zero false positives without requiring zero false negatives; degenerate cases need separate treatment.

Jon Kleinberg, Sendhil Mullainathan and Manish Raghavan proved the version for scores rather than labels, in 2016. Ask for three things: calibration within groups; balance for the positive class, meaning the people who are rearrested get the same average score in each group; and balance for the negative class, the same for people who are not. All three can hold together only if the base rates are equal, or prediction is perfect, every score zero or one. And approximately: if all three hold nearly, the base rates must be nearly equal or the prediction nearly perfect. The conflict is not an artefact of thresholds.

So something must give, and the statistics can say what each choice costs. Sam Corbett-Davies, Emma Pierson, Avi Feller, Sharad Goel and Aziz Huq framed it in 2017 as Part forty-five's decision theory: detaining someone has a cost, releasing someone who reoffends has another. Under that framing the rule that minimizes expected cost is one threshold on a calibrated risk, the same for everyone, under group-invariant classification costs. Different base rates alone do not force this particular threshold to violate equalized odds; the full score and operating point matter. Equalizing false positive rates instead can require group-dependent or randomized thresholds, detaining some lower-risk people of one group or releasing some higher-risk people of another. Each option is a value judgement; the arithmetic makes the trade explicit.

And a statistician's caution about the outcome itself. Y is rearrest, not reoffending. Arrest depends on where police patrol and whom they stop. If one group is policed more heavily, its members are rearrested more often for the same behaviour, and a score calibrated to rearrest is calibrated to the policing, not to the conduct. That is Part forty-one's differential measurement error, in the outcome. Every criterion in this chapter inherits it, and no criterion computed from the data alone can detect it. Chapter eleven needs a causal model for exactly this reason.

The algebra clarifies a conflict, rather than certifying either party's entire empirical case. With unequal nondegenerate base rates and a shared positive error factor, equal PPV and false-negative rates force unequal false-positive rates. PPV equal to one is a zero-false-positive exception even when some positives are missed; that is not necessarily perfect prediction. The result does not choose which rates matter. Decisions, costs, labels and uncertainty all enter that judgment. Report the full descriptive table with appropriate uncertainty and distinguish PPV parity of a binary decision from sufficiency of a full score.

10MulticalibrationPhD5 min

Multicalibration: calibrated for every group one can name. A model can calibrate overall while missing opposing subgroup errors. Multicalibration asks for small conditional residuals across a specified class of groups and sufficiently large score cells, including chosen intersections. For each protected group-bin cell, average outcome minus prediction should be small. A guarantee must specify the group class, bin resolution, tolerance and minimum cell mass. Rich computable group classes can be handled with an appropriate auditing oracle and sample complexity. No finite sample automatically protects every computable subgroup, including arbitrarily tiny or adaptively chosen cells.

The algorithm is a patching loop, a cousin of boosting from Part thirty-four. Find a group and score bin where the average residual, outcome minus score, is largest. If it exceeds alpha, shift that cell's scores by the residual. Repeat. Each patch reduces the squared error by at least alpha squared times the cell's share, so the loop stops after at most order one over alpha squared, times one over the smallest share, patches, however many groups there are.

On the COMPAS data: a logistic regression on age and the log of prior offences, with no race in it, fitted to a random half of the defendants. The groups: Black, white, women, and people under twenty-five, crossed with five score bins, and only cells of at least a hundred people. The worst cell starts percentage points off. patches bring every cell within two points, alpha, on the training half.

The real test is on the other half, which the patches never saw, repeated over random splits. The gap is the size-weighted average miscalibration across each group's score bins. In red the base model, in green after the patches. For women the gap falls from to , and for people under twenty-five from to : these absolute gaps describe errors without identifying their sign. Directional bias would need signed residuals, which this chart does not show. For the two race groups, the gaps were already small, about two to three points, consistent with the last chapter's calibration curves, and the white-group average gap increases. The displayed gaps alone do not establish population significance or fairness for every group.

Held-out calibration is better evidence than training calibration. Our reported gap is a size-weighted mean absolute cell residual across four overlapping groups, not the maximum multicalibration violation. The training average falls more than the test average, because patch selection fits residual noise as well as signal. Twenty random halves reuse the same defendants, so their split-to-split variability describes this resampling exercise; it is not uncertainty for independent new populations. The white-group average gap actually increases, even while the overall gap decreases. Population transfer requires complexity control for the audited class, confidence and cell-mass factors, not just one over alpha squared observations per cell. Our alpha .02 stopping criterion is an empirical eligible-cell condition, not a held-out population certificate.

Part fifty-seven made the same move for prediction sets. Split conformal prediction covers ninety-five percent on average, and can cover far less in a subgroup. Mondrian conformal fixes coverage within a few named groups, by calibrating separately in each. Isaac Gibbs, John Cherian and Emmanuel Candes asked for coverage over a whole class of groups, or of weighting functions, at once, and achieved it with a quantile regression over that class, the conformal analogue of multicalibration. Both answer the same question: guaranteed on average is not guaranteed for you, so ask for every subpopulation one can describe, and pay with data.

Several related notions extend this idea. Multiaccuracy controls average residuals over a specified function or group class without requiring score-bin calibration. Outcome indistinguishability restricts which tests can distinguish real outcomes from simulated model outcomes. Its strength depends on what the tests observe and their computational class. Omniprediction results post-process suitably multicalibrated scores into decisions competitive with a specified comparator class for a specified class of losses. This does not mean optimal for every loss or every possible decision. Exact sufficiency retains its conflict with separation under the usual nondegeneracy assumptions; approximate finite-class calibration needs quantitative analysis.

11Causal fairnessPhD5 min

Causal fairness: which paths from the group to the decision are allowed? The criteria of chapter eight are all observational: statements about the joint distribution of score, outcome and group. Moritz Hardt and coauthors noted that two worlds with different causal structures can produce identical joint distributions, one in which the score uses the group through a legitimate path and one in which it uses it through an illegitimate one. No observational criterion can tell them apart. To say which dependence is unfair, one needs to say how it arose, and that is a causal question, Part thirty-six's territory.

Kusner and colleagues define counterfactual fairness within a structural causal model. Condition on an individual's observed information, infer a distribution of background factors, and compare predictions when the protected attribute is intervened on while those background factors are shared. Equality of these counterfactual predictive distributions is the criterion; a small group-average prediction gap does not establish it. Using genuine nondescendants can suffice. In a correctly specified additive model, subtracting the known structural effect of A recovers an invariant component. Ordinary regression residuals need not do that, especially with confounding, nonlinearities, clipping or an incorrectly estimated effect.

Our revised toy uses a continuous prior-arrest measurement index, not an integer count. Train on ten thousand simulated people and evaluate on twenty thousand independent people. Background propensity U and measurement noise have the same law in both groups. The measurement is one point five plus U plus one point two times A plus noise. The coefficient one point two is known by construction. Subtracting it times A leaves one point five plus U plus noise, unchanged by a paired intervention on A. The outcome depends only on U in this toy. This deliberately specified model permits an oracle fair feature; real arrest data do not identify that decomposition automatically.

The average score of group A minus that of the others. The true rearrest rates differ by , zero up to sampling. A logistic regression on prior arrests scores group A higher, about nine points, with an area under the ROC curve of . A regression on the oracle structural residual after subtracting the known coefficient one point two times A, a function of U and noise only, scores the groups within of each other, and its area under the curve is higher, . Here fairness and accuracy agree, because the extra priors were measurement error with respect to risk. That is a property of this specified causal model. Directly paired counterfactual predictions agree to numerical precision for the oracle residual and change for the raw index. Group-average gaps and AUC alone would not prove counterfactual fairness.

Not every path from the group is unfair. Niki Kilbertus and colleagues, also in 2017, separated proxy variables from resolving variables: a path through a variable chosen freely, such as the department applied to, may be acceptable, while a path through a proxy for the group is not. Razieh Nabi and Ilya Shpitser made it a path-specific effect, Part thirty-six's mediation analysis: constrain the effect of A along the forbidden paths only, and estimate the best predictor subject to that. Which paths are forbidden is a moral and legal choice; once made, the statistics are identification and estimation, as in Part sixty-two.

The approach has critics. It needs a counterfactual: what would this person's record have been, had their race been different? The legal scholar Issa Kohler-Hausmann argued that race is not a variable one can intervene on while holding the rest of a life fixed, because so much of a life is constituted by it. And the answer depends entirely on an unverifiable model, here of how policing adds priors. A different model gives a different fair predictor. The honest position, as in Part sixty-two's sensitivity analysis: state the causal assumptions, show how the conclusion moves when they change, and let the reader judge.

Fairness also enters decisions, not just predictions. Part sixty-two learned treatment rules by maximizing estimated welfare over a class. Fairness constraints change the class: rules whose benefit, or whose error rates, are balanced across groups. And decisions change the future data. Lydia Liu and colleagues showed in 2018 that a fairness constraint imposed once can, through its effect on the next period's outcomes, help a group or harm it, depending on the dynamics. Fairness in one period is a static criterion; the people affected live in many.

12Open problemsPhD4 min

The part in one table: each worry, the tool that answers it, and what the tool costs. Linkage and reconstruction, answered by differential privacy, at the price of noise. An attacker's test, read off a trade-off curve. Many releases, tracked by accountants that cost nothing but mathematics. No trusted curator, local privacy, at the price of a smaller effective sample. Intervals on noisy data, which must widen to be honest. Consistent tables, bought with bias in small cells. Memorizing models, trained privately at a cost in accuracy that falls unequally. Then fairness: unequal error rates, where choosing one criterion gives up another; miscalibrated subgroups, repaired by multicalibration with enough data per cell; and unfair paths, which need a causal model to name.

Problem one: private inference beyond simple statistics. For a proportion or a mean, noise-aware intervals are understood. For a regression with many coefficients, a mixed model, or a survival analysis on privatized data, valid finite-sample intervals are mostly not known, and the parametric bootstrap can fail when the privacy noise and clipping interact. Private synthetic data, released for analysts to explore freely, is a promising route, but inference from it requires compatibility and uncertainty propagation between generator and analysis; some general-purpose guarantees exist for specified query classes, rather than arbitrary downstream inference. Useful inference results already exist for many specific models. Broadly efficient finite-sample methods across complex models, clipping rules and releases remain an active frontier.

Problem two: what epsilon means. Deployed systems use budgets from below one to above ten, and the worst-case guarantee at epsilon of ten says almost nothing. Yet attacks on such systems often fail, which suggests the worst case is far from the typical case. Per-person accounting, which charges each individual for their actual influence, and the trade-off curves of chapter two are partial answers. A principled way to choose and to explain a budget, connecting the guarantee to the harms people care about, is open.

Problem three: privacy for foundation models. Training with DP-SGD at the scale of modern language models costs accuracy and computation, and the unit of privacy is unclear: one document, one user who wrote thousands, or one fact repeated across the web. Fine-tuning a publicly pretrained model privately works far better than training from scratch, but the pretraining data were not private. What guarantee is meaningful for a model trained on the internet, and how to scale reliable audits beyond existing single-run methods, remains an active question.

Problem four: fairness over time. Decisions change the data: a lending rule changes who repays, and a policing model changes where arrests are recorded, which changes the next model's training labels. Danielle Ensign and colleagues showed how predictive policing can run away in such a loop. Static criteria, checked once, can make the long-run outcome worse. Existing dynamic fairness models provide some guarantees. Robust decisions across uncertain feedback models and multiple fairness objectives remain open.

Problem five: privacy and fairness together. Checking fairness needs group labels, often the most sensitive attributes of all, and auditing error rates by group from privatized data adds noise to the very small groups that most need checking. And chapter seven showed privacy's accuracy cost falls hardest on small groups. Procedures that are private, fair across many groups, and statistically efficient at once, with the trade-offs among the three priced exactly, are open.

Five open problems. Private inference beyond simple statistics. The meaning of epsilon. Privacy for foundation models. Fairness over time. And privacy and fairness together.

Recap, problems, and the road aheadAll tracks2 min

Part sixty-three in thirteen lines. A governor's medical record was found from three harmless facts, and almost everyone in the NHANES extract is unique by four. Differential privacy is a promise about the release process, not the data, and it is a statement about every attacker's hypothesis test. Modern accountants are twenty times tighter than adding epsilons. Central privacy costs a second-order term; local privacy shrinks the sample. Noise-aware intervals improve coverage in the simulated grid; finite-sample validity needs more than a variance correction. The census paid for consistent tables with bias in small blocks. Private training is audited by attacks. The three fairness criteria conflict, and COMPAS exhibits approximate predictive parity alongside unequal error rates. Multicalibration repairs subgroups a model missed. And deciding which dependence is unfair needs a causal model.

A promise for the next part. This part treated a model as a statistic of people's data. It assumed people made the data and the labels, and that a model's measured accuracy was exact. Part sixty-four asks what honest uncertainty looks like when machines make the predictions, generate the data and grade each other.

Where it comes back. Part sixty-four's test sets that leak into training data, the same membership question asked of benchmarks; its labels produced by models, whose errors may differ by group; and the dissertation's chapter on its data, and who they describe.

Six problems, with full solutions in the README. Randomized response's guarantee and variance; the Laplace mechanism's proof; the Gaussian trade-off curve and its composition; the sample size at which central privacy becomes cheap; Chouldechova's identity; and the impossibility it implies. Pause here if you want to try them.

The books behind this part: Dwork and Roth's Algorithmic Foundations of Differential Privacy, and Barocas, Hardt and Narayanan's Fairness and Machine Learning; with the papers from Sweeney's re-identification to counterfactual fairness.

Sixty-three parts of sixty-five. Removing names did not protect a governor; a guarantee about the process, priced in noise, protects everyone, and the price can be measured. Next, Part sixty-four: statistics in the age of AI.

Where it goes next. Part 64 answers repeated queries to a holdout through noise and reads watermark detection and judged labels as tests with the same error rates; private inference beyond the mean is one of the candidate questions of Part 65.

Key results

The part's results in one place, for revision.

Differential privacy\(\displaystyle P\bigl(M(D)\in S\bigr)\le e^{\varepsilon}P\bigl(M(D')\in S\bigr)+\delta\qquad\allowbreak \text{for }\allowbreak \text{all }\allowbreak \text{neighbours }D,D'\text{ and }\allowbreak \text{all }S\)
The trade-off curve of (epsilon, delta)-DP\(\displaystyle \beta(\alpha)\ \ge\ \max\bigl\{0,\ 1-\delta-e^{\varepsilon}\alpha,\ e^{-\varepsilon}(1-\delta-\alpha)\bigr\}\)
Gaussian differential privacy\(\displaystyle G_\mu(\alpha)=\Phi\bigl(\Phi^{-1}(1-\alpha)-\mu\bigr),\qquad\allowbreak G_{\mu_1}\otimes G_{\mu_2}=G_{\sqrt{\mu_1^2+\mu_2^2}}\)
A private proportion's mean squared error\(\displaystyle \text{central: }\frac{p(1-p)}{n}+\frac{2}{n^2\varepsilon^2},\qquad\allowbreak \text{local: }\frac{q(1-q)}{n(2\pi-1)^2},\quad\allowbreak \pi=\frac{e^\varepsilon}{1+e^\varepsilon},\ q=(2\pi-1)p+1-\pi\)
Chouldechova's identity\(\displaystyle \mathrm{FPR}=\frac{p}{1-p}\cdot\frac{1-\mathrm{PPV}}{\mathrm{PPV}}\cdot(1-\mathrm{FNR})\)

Try it

Lab 63 · Privacy as a test, and its cost in coverage

Release a mean with Gaussian noise and let an attacker test whether one person's record is in it: the attack's error rates should trace the Gaussian trade-off curve. Then release a proportion with Laplace noise and compare the interval that ignores the noise with the one that adds its variance.

Figure produced by Lab 63: Privacy as a test, and its cost in coverage
Produced by the lab below, seed 0, in 0.5 s.
python -m videos.stats.labs 63 needs numpy, scipy, matplotlib · download lab63.py · source on GitHub
attack at type I error 5%: type II error      0.741   (Gaussian trade-off curve, mu = 1: 0.741)
largest gap between the attack and the curve  0.008
Laplace against the eps-DP bound, eps = 1     smallest slack -1.1e-16, largest 0.073
eps = 0.05: 95% interval covers               naive 68.3%   noise-aware 94.4%   (privacy's share of the variance 79%)
eps = 0.1: 95% interval covers                naive 85.6%   noise-aware 94.9%   (privacy's share of the variance 49%)
eps = 0.2: 95% interval covers                naive 93.1%   noise-aware 95.1%   (privacy's share of the variance 19%)
eps = 0.5: 95% interval covers                naive 95.3%   noise-aware 95.7%   (privacy's share of the variance 4%)
eps = 1.0: 95% interval covers                naive 94.3%   noise-aware 94.6%   (privacy's share of the variance 1%)
eps = 2.0: 95% interval covers                naive 96.6%   noise-aware 96.7%   (privacy's share of the variance 0%)

The attacker's best test is exactly as good as the privacy parameter says, and the analyst's interval is honest only when it adds the variance of the noise that bought that protection.
The code (79 lines; it asserts its own result)
"""Lab 63: attack a noisy mean as a hypothesis test, then build an interval that knows about the noise."""

import numpy as np

from videos.coursekit import labs
from explainer.stats.kit import privacy

TITLE = "Privacy as a test, and its cost in coverage"
GOAL = ("Release a mean with Gaussian noise and let an attacker test whether one person's record is in it: the "
        "attack's error rates should trace the Gaussian trade-off curve. Then release a proportion with Laplace "
        "noise and compare the interval that ignores the noise with the one that adds its variance.")
TASKS = [
    "Compose the Gaussian release k = 4 times with the same noise. Check that the best attack on all four follows "
    "the curve with mu doubled, not multiplied by 4.",
    "Replace the central Laplace release by randomized response (privacy.randomized_response, privacy.rr_debias) and "
    "compare the two mean squared errors with privacy.mean_mse_central_local.",
    "Set n = 100 and eps = 0.05, where the noisy proportion often leaves [0, 1]. What does clipping it do to the "
    "noise-aware interval's coverage?",
]


def run(seed=0):
    rng = np.random.default_rng(seed)
    lab = labs.Lab()

    # 1. membership inference against a noisy mean is a test of N(0, 1) against N(mu, 1)
    n, mu = 100, 1.0
    roc = privacy.membership_attack_roc(n, (1 / n) / mu, 20000, rng)
    alpha, beta = roc["fpr"], 1 - roc["tpr"]
    theory = privacy.tradeoff_gaussian(alpha, roc["mu"])
    gap = float(np.max(np.abs(beta - theory)))
    at = int(np.argmin(np.abs(alpha - 0.05)))
    lab.row("attack at type I error 5%: type II error", f"{beta[at]:.3f}   (Gaussian trade-off curve, mu = 1: {theory[at]:.3f})")
    lab.row("largest gap between the attack and the curve", f"{gap:.3f}")
    assert abs(roc["mu"] - mu) < 1e-12 and gap < 0.02, "the best attack traces the mu-GDP trade-off curve"

    # 2. the Laplace mechanism is eps-DP: its exact trade-off curve never goes below the eps-DP bound, and touches it
    a = np.linspace(0.001, 0.999, 999)
    for eps in (0.3, 2.0, 1.0):
        slack = privacy.tradeoff_laplace(a, eps) - privacy.tradeoff_eps_delta(a, eps)
        assert slack.min() > -1e-9 and slack.min() < 1e-6, "Laplace noise meets the eps-DP bound with equality somewhere"
    lab.row("Laplace against the eps-DP bound, eps = 1", f"smallest slack {slack.min():.1e}, largest {slack.max():.3f}")

    # 3. a confidence interval for a proportion released with Laplace noise
    n, p, reps = 1000, 0.3, 1500
    grid = (0.05, 0.1, 0.2, 0.5, 1.0, 2.0)
    cover = {}
    for eps in grid:
        hit = np.zeros(2)
        for _ in range(reps):
            out = privacy.private_proportion(rng.random(n) < p, eps, rng)
            hit += [out["naive"][0] <= p <= out["naive"][1], out["aware"][0] <= p <= out["aware"][1]]
        cover[eps] = hit / reps
        share = (2 / (n * eps) ** 2) / (2 / (n * eps) ** 2 + p * (1 - p) / n)
        lab.row(f"eps = {eps}: 95% interval covers", f"naive {cover[eps][0]:.1%}   noise-aware {cover[eps][1]:.1%}"
                                                      f"   (privacy's share of the variance {share:.0%})")
    lab.note = ("The attacker's best test is exactly as good as the privacy parameter says, and the analyst's interval "
                "is honest only when it adds the variance of the noise that bought that protection.")
    assert cover[0.1][0] < 0.90 and cover[0.05][0] < 0.75, "ignoring the noise loses coverage at small eps"
    assert all(abs(cover[e][1] - 0.95) < 0.025 for e in grid), "adding the Laplace variance restores it"
    assert abs(cover[2.0][0] - 0.95) < 0.025, "at large eps the noise is negligible"

    fig, ax = labs.figure(2, size=(11, 4.2))
    ax[0].plot(alpha, beta, color=labs.BLUE, lw=3, alpha=0.6, label="simulated attack on a noisy mean")
    ax[0].plot(a, privacy.tradeoff_gaussian(a, mu), color=labs.GOLD, ls="--", label="Gaussian trade-off curve, mu = 1")
    ax[0].plot(a, privacy.tradeoff_laplace(a, 1.0), color=labs.GREEN, label="Laplace mechanism, eps = 1")
    ax[0].plot(a, privacy.tradeoff_eps_delta(a, 1.0), color=labs.RED, ls=":", label="eps-DP bound, eps = 1")
    ax[0].plot([0, 1], [1, 0], color=labs.MUTED, lw=1, label="no information: type II = 1 - type I")
    ax[0].set(title="Privacy bounds every test of 'in' against 'out'", xlabel="type I error", ylabel="type II error")
    ax[0].legend()
    x = np.arange(len(grid))
    ax[1].bar(x - 0.2, [cover[e][0] for e in grid], 0.4, color=labs.RED, label="naive Wald interval")
    ax[1].bar(x + 0.2, [cover[e][1] for e in grid], 0.4, color=labs.GREEN, label="noise-aware interval")
    ax[1].axhline(0.95, color=labs.INK, ls="--", lw=1.2, label="nominal 95%")
    ax[1].set(title=f"Coverage for a private proportion, n = {n}", xlabel="privacy parameter eps", ylabel="coverage",
              xticks=x, xticklabels=[str(e) for e in grid], ylim=(0.3, 1.12))
    ax[1].legend(loc="upper center", ncols=3)
    lab.fig = fig
    return lab

Now change it

  1. Compose the Gaussian release k = 4 times with the same noise. Check that the best attack on all four follows the curve with mu doubled, not multiplied by 4.
  2. Replace the central Laplace release by randomized response (privacy.randomized_response, privacy.rr_debias) and compare the two mean squared errors with privacy.mean_mse_central_local.
  3. Set n = 100 and eps = 0.05, where the noisy proportion often leaves [0, 1]. What does clipping it do to the noise-aware interval's coverage?

Problems, with solutions

Try each problem before opening its solution.

  1. Randomized response. Show that randomized response, truthful with probability \(\pi = e^\varepsilon/(1 + e^\varepsilon)\), is \(\varepsilon\)-DP, and find the variance of \(\hat p\).

    Solution
    • For a report r, P(r | x = 1)/P(r | x = 0) is π/(1 − π) or (1 − π)/π. With π = e^ε/(1 + e^ε), both lie in [e^{−ε}, e^ε], so the mechanism is ε-DP.
    • The report is 1 with probability q = πp + (1 − π)(1 − p) = (2π − 1)p + (1 − π). So p̂ = (q̂ − (1 − π))/(2π − 1) is unbiased.
    • Var(p̂) = q(1 − q)/(n(2π − 1)²).
  2. The Laplace mechanism. Show that adding \(\mathrm{Laplace}(\Delta/\varepsilon)\) noise to a statistic of sensitivity \(\Delta\) is \(\varepsilon\)-DP.

    Solution
    • The output densities are (ε/2Δ)exp(−ε|z − f(D)|/Δ) and the same with f(D′).
    • Their ratio is exp(ε(|z − f(D′)| − |z − f(D)|)/Δ) ≤ exp(ε|f(D) − f(D′)|/Δ) ≤ e^ε, by the triangle inequality and the definition of Δ.
    • Integrating over any set S gives the definition.
  3. Gaussian trade-off curves. Show that the Gaussian mechanism with noise \(\sigma\) and sensitivity \(\Delta\) has trade-off curve \(G_{\Delta/\sigma}\), and that \(G_{\mu_1} \otimes G_{\mu_2} = G_{\sqrt{\mu_1^2 + \mu_2^2}}\).

    Solution
    • The outputs are N(f(D), σ²) and N(f(D′), σ²). Standardizing gives N(0, 1) against N(s/σ, 1), with |s| = |f(D) − f(D′)| ≤ Δ.
    • Testing a larger shift is easier, so the worst case is s = Δ and the curve is G_{Δ/σ}.
    • For two independent mechanisms the pair is N(0, I) against N((μ₁, μ₂), I). The likelihood ratio depends only on the projection onto (μ₁, μ₂)/‖μ‖, which is N(0, 1) against N(‖μ‖, 1). Thus the independent Gaussian-shift experiment has this exact composed curve. For arbitrary mechanisms merely satisfying the GDP bounds, it is a sharp composition guarantee, not mandatory equality.
  4. When central privacy becomes cheap. For the central-DP mean of \(n\) bits, find the \(n\) at which the privacy term is a tenth of the MSE, at \(p = 0.3\), \(\varepsilon = 0.1\).

    Solution
    • The privacy term is 2/(nε)² and the sampling term is p(1 − p)/n. The privacy share is a tenth when 2/(nε)² = p(1 − p)/(9n), that is, n = 18/(ε²p(1 − p)).
    • At p = 0.3 and ε = 0.1 this is n ≈ 8,571.
  5. Chouldechova's identity. Derive Chouldechova's identity \(\mathrm{FPR} = \frac{p}{1 - p}\,\frac{1 - \mathrm{PPV}}{\mathrm{PPV}}\,(1 - \mathrm{FNR})\).

    Solution
    • The true positives number PPV · H = (1 − FNR)pn, and the false positives (1 − PPV)H = FPR(1 − p)n, where H is the number labelled high.
    • Dividing, (1 − PPV)/PPV = FPR(1 − p)/((1 − FNR)p). Solving for FPR gives the identity.
  6. The impossibility. Show that equal PPV and FNR in two groups with different base rates force unequal FPRs, unless PPV \(= 1\) or FNR \(= 1\).

    Solution
    • If both groups have the same PPV and FNR, then FPR_a/FPR_b = [p_a/(1 − p_a)]/[p_b/(1 − p_b)], provided the common factor (1 − PPV)(1 − FNR)/PPV is not zero.
    • The odds differ when the base rates differ, so the FPRs differ.
    • The factor vanishes only if PPV = 1, when both FPRs are zero, or FNR = 1, when the classifier catches no one and the identity degenerates. PPV=1 does not require perfect prediction: some positives may still be missed. At FNR=1 with no true positives, positive PPV can be undefined or zero, and the displayed division requires separate treatment.

Notes and sources

Sources

  • The hook.
    • L. Sweeney, J. Law Med. Ethics 25 (1997); Sweeney, "Simple demographics often identify people uniquely", Carnegie Mellon Data Privacy Working Paper 3 (2000); Sweeney, Int. J. Uncertainty, Fuzziness and Knowledge-Based Systems 10 (2002); P. Golle, WPES (2006).
    • A. Narayanan & V. Shmatikov, IEEE S&P (2008); N. Homer et al., PLoS Genetics 4 (2008); I. Dinur & K. Nissim, PODS (2003).
    • J. Angwin, J. Larson, S. Mattu & L. Kirchner, "Machine Bias", ProPublica (2016); W. Dieterich, C. Mendoza & T. Brennan, Northpointe (2016).
  • Differential privacy.
    • C. Dwork, F. McSherry, K. Nissim & A. Smith, TCC (2006); S. Warner, JASA 60 (1965);
    • C. Dwork & A. Roth, Found. Trends Theor. Comput. Sci. 9 (2014); B. Balle & Y.-X. Wang, ICML (2018);
    • F. McSherry & K. Talwar, FOCS (2007).
  • Testing and accounting.
    • L. Wasserman & S. Zhou, JASA 105 (2010); P. Kairouz, S. Oh & P. Viswanath, ICML (2015);
    • J. Dong, A. Roth & W. Su, JRSS B 84 (2022);
    • C. Dwork, G. Rothblum & S. Vadhan, FOCS (2010); I. Mironov, CSF (2017); M. Bun & T. Steinke, TCC (2016).
  • The cost of privacy. J. Duchi, M. Jordan & M. Wainwright, FOCS (2013) and JASA 113 (2018); T. Cai, Y. Wang & L. Zhang, Ann. Statist. 49 (2021).
  • Private inference.
    • V. Karwa & S. Vadhan, ITCS (2018); C. Ferrando, S. Wang & D. Sheldon, AISTATS (2022);
    • M. Gaboardi, H. W. Lim, R. Rogers & S. Vadhan, ICML (2016); J. Awan & A. Slavković, NeurIPS (2018).
  • The census.
    • J. Abowd et al., Harvard Data Science Review, Special Issue 2 (2022); the 2020 redistricting data's ρ = 2.63 (2.56 persons, 0.07 housing units);
    • U.S. Census Bureau, release of the 2020 redistricting noisy measurement file (15 June 2023);
    • C. Kenny et al., Science Advances 7 (2021); Alabama v. U.S. Department of Commerce (M.D. Ala., three-judge court, June 2021);
    • J. Abowd & I. Schmutte, American Economic Review 109 (2019).
  • Private learning.
    • M. Abadi et al., CCS (2016); N. Carlini et al., USENIX Security (2021); R. Shokri et al., IEEE S&P (2017);
    • N. Carlini et al., IEEE S&P (2022); M. Jagielski, J. Ullman & A. Oprea, NeurIPS (2020); M. Nasr et al., IEEE S&P (2021); T. Steinke, M. Nasr & M. Jagielski, NeurIPS (2023);
    • E. Bagdasaryan, O. Poursaeed & V. Shmatikov, NeurIPS (2019).
  • Fairness.
    • S. Barocas, M. Hardt & A. Narayanan, Fairness and Machine Learning (MIT Press, 2023);
    • M. Hardt, E. Price & N. Srebro, NeurIPS (2016); A. Flores, K. Bechtel & C. Lowenkamp, Federal Probation 80 (2016);
    • A. Chouldechova, Big Data 5 (2017); J. Kleinberg, S. Mullainathan & M. Raghavan, ITCS (2017; arXiv 2016);
    • S. Corbett-Davies, E. Pierson, A. Feller, S. Goel & A. Huq, KDD (2017).
  • Multicalibration.
    • U. Hébert-Johnson, M. Kim, O. Reingold & G. Rothblum, ICML (2018); M. Kim, A. Ghorbani & J. Zou, AIES (2019);
    • C. Dwork et al., STOC (2021); P. Gopalan et al., ITCS (2022); I. Gibbs, J. Cherian & E. Candès, arXiv:2305.12616.
  • Causal fairness.
    • M. Kusner, J. Loftus, C. Russell & R. Silva, NeurIPS (2017); N. Kilbertus et al., NeurIPS (2017);
    • R. Nabi & I. Shpitser, AAAI (2018); I. Kohler-Hausmann, Northwestern Univ. Law Rev. 113 (2019);
    • L. Liu, S. Dean, E. Rolf, M. Simchowitz & M. Hardt, ICML (2018).
  • Open problems. T. Raghunathan, J. Reiter & D. Rubin, J. Official Statistics 19 (2003); D. Ensign et al., FAT* (2018).
About this partfrom its README

Part 63 of the 65-part course, on differential privacy, statistical inference after privacy noise, census post-processing, private learning and competing fairness criteria.

The historical Weld linkage illustrates how removing names can fail. NHANES uniqueness is within the unweighted 5,176-adult complete-case extract, not a demonstrated linkage or population re-identification rate. Age is top-coded at 80 and pressure averages available readings. Successful external linkage additionally requires comparable measurements, inclusion knowledge and an identified source.

Companion material in this repository

The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
  1. Hook: re-identification (Sweeney 1997, 2000).
  2. Differential privacy (Dwork, McSherry, Nissim & Smith 2006). Mechanisms; post-processing; composition.
  3. DP as hypothesis testing (Wasserman & Zhou 2010; Kairouz et al. 2015); Gaussian DP (Dong, Roth & Su 2022).
  4. Accountants. Rényi DP (Mironov 2017); zCDP (Bun & Steinke 2016).
  5. The cost of privacy. Local DP minimax rates (Duchi, Jordan & Wainwright 2013); central DP (Cai, Wang & Zhang 2021).
  6. Private inference. CIs and tests on privatized data (Board).
  7. The 2020 Census (Abowd et al. 2022). TopDown, post-processing bias, the redistricting debate.
  8. DP-SGD and membership inference as a test.
  9. Fairness criteria. Independence, separation, sufficiency.
  10. Impossibility (Kleinberg, Mullainathan & Raghavan 2016; Chouldechova 2017); the COMPAS debate.
  11. Multicalibration (Hébert-Johnson et al. 2018) and its link to conformal (Part 57).
  12. Causal fairness (Kusner et al. 2017).
  13. Open problems.

Built: statkit.privacy. Books: Dwork & Roth; Barocas, Hardt & Narayanan.

Build the film

python -m videos.stats.stats63.compute        # the part's numbers, into .cache/stats63
python tools/build.py stats63                  # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py stats63 Hook   # one chapter, silent, with a contact sheet

Scenes: videos/stats/stats63. Setup: see the course page. Source of these notes: the README and the scenes' narration.

Build it
OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 python -m videos.stats.stats63.compute --force
pytest -q tests/test_stats63_checked.py tests/test_stats_kit_privacy.py
python tools/build.py stats63 -q l
python tools/lecture_length.py stats63 --floor 50

All 14 chapters reviewed, all 12 inputs regenerated and 20 checks pass (14 local, six legacy). Estimated English narration: 69.9 minutes. Evidence. The recorded English sampled visual checkpoint is complete; Chinese narration/captions, continuous listening/playback and final masters remain open.