6.4.10 · D3AI Safety & Alignment

Worked examples — Privacy (differential privacy, membership inference)

2,763 words13 min readBack to topic

This page is the worked-example engine for Privacy (differential privacy, membership inference). We take every knob the topic can turn — the size of the privacy budget, the sign and scale of sensitivity, degenerate inputs, limiting values, and a couple of exam traps — and grind through each one until the machinery feels obvious.

Before we compute anything, we re-anchor the three symbols we lean on, so nothing is used before it is earned.

Everything below is just: find → divide by → that is your noise scale. The whole art is finding honestly in each scenario.


The scenario matrix

Each cell is a class of situation this topic can throw at you. The examples that follow are tagged with the cell they cover.

# Cell (case class) What is unusual about it Covered by
A Normal numeric query, moderate baseline sanity Ex 1
B Zero-range / degenerate input () sensitivity collapses Ex 2
C Sign & scale of sensitivity (counting vs. bounded-range sum) how is found, not guessed Ex 3
D Limiting ( and ) the two extremes of the dial Ex 4
E Add/remove vs. replace-one (the factor-of-2 trap) which neighbor definition Ex 5
F Composition — many queries stacked budget adds up Ex 6
G DP-SGD scaling ( + subsampling) the deep-learning case Ex 7
H Membership inference word problem the attack that motivates all this Ex 8
I Exam twist — vector query, sensitivity sensitivity of a list of numbers Ex 9

We now walk cells A → I.





Figure — Privacy (differential privacy, membership inference)

The figure above shows why is a dial: it plots the Laplace noise for a fixed as sweeps. The legend names each curve by its and the resulting scale . Follow them from the amber curve (, the flattest and widest — strongest privacy) up to the violet curve (, the tallest, sharpest peak — least privacy). Smaller is literally a fatter blur.







Recall gauntlet

Recall Every cell in one breath

Baseline mean-age noise scale for ::: Sensitivity of a query no individual can change ::: , so Ratio of noise: bounded-sum vs a count ::: more noise for the sum As the mechanism becomes ::: pure noise (infinite ), maximum privacy As the mechanism returns ::: the raw truth, no privacy Replace-one vs add/remove sensitivity factor ::: under replace-one Basic composition of five -DP queries ::: DP-SGD for ::: sensitivity of a disjoint 3-bucket histogram ::: , per-bucket