Data Vault (3D)

A Blender-built vault of synthetic records: add Laplace noise, spend a privacy budget, generalise the table to k-anonymity and watch a linkage attack succeed or fail.

Presets

Playback

Privacy budget and query

The released table

Actions

Camera

Layers

Quality

Model check

The science

What is simulated

A table of invented people (age, ZIP code, sex and one sensitive yes/no condition) generated by a seeded random process. There are no real persons and no real data. Two protections are compared: k-anonymity for releasing the table and differential privacy for answering counting questions about it. A third element, the attacker, holds a public list (think of a voter roll) and tries to link it to the released rows.

Differential privacy and the Laplace mechanism

A randomised answer M(x) is epsilon-differentially private if for every pair of tables x, x' differing in one person and every set of outputs O: P[M(x) in O] <= e^epsilon P[M(x') in O]. For a counting query the sensitivity is Delta = 1 (adding or removing one person changes the count by at most 1). Adding noise drawn from the Laplace density p(z) = exp(-|z|/b) / (2b) with b = Delta / epsilon gives exactly this guarantee because the density ratio at any output is exp((|x - c - 1| - |x - c|)/b) <= e^(1/b) = e^epsilon.

Accuracy: the expected absolute error is E|z| = b = 1/epsilon, the standard deviation is sqrt(2) b, and P(|z| > t) = exp(-t epsilon). Halving epsilon doubles the noise. The accuracy graph shows where the error drops below 10 % of the true count, a rough "useful answer" line.

Composition and the privacy budget

Answering n queries with parameters epsilon_i costs sum epsilon_i (sequential composition). A fixed budget epsilon split over k queries gives each epsilon / k, so each answer is k times noisier. If the vault does not account for the budget, an analyst repeats one question n times and averages: the error falls like sqrt(2) b / sqrt(n), so the noise cancels and the privacy loss becomes n epsilon_i. With accounting on, the vault refuses queries once the budget is spent, and the door of the 3D vault swings shut.

k-anonymity and equivalence classes

Quasi-identifiers (age, ZIP, sex) are generalised: age into bands, ZIP digits masked, sex kept or dropped. Records with equal generalised values form an equivalence class of size s. Records in classes smaller than the target k are suppressed. If the attacker knows the target is in the table, the prosecutor risk of one record is 1/s, the worst case is 1/k_min, and the average over released records is (number of classes) / (number of released records). The cost is information: wider bands, fewer ZIP digits and suppression all lower the usefulness of the data (the information-loss figure and the frontier graph).

Linkage attack with an auxiliary list

The attacker's public list contains each person independently with probability f. For a person in a released class of size s, the attacker sees the other list members that fall in the same class and guesses uniformly. Averaged over lists, the chance that a given released record is re-identified correctly is (1 - (1 - f)^s) / s, derived from E[1/(1 + Binomial(s-1, f))] = (1 - (1 - f)^s)/(s f). The page also runs an actual random attack on demand and compares the simulation with this formula.

What k-anonymity does not protect: homogeneity

If everybody in a class shares the same sensitive value, the attacker learns it without identifying anyone. The readout "attribute leak" is the fraction of released records in such classes. Defences such as l-diversity or t-closeness limit this; differential privacy avoids the problem by bounding what any output can reveal about one person.

Numerical checks on this page

(1) Forty thousand Laplace draws must have mean absolute value b and RMS sqrt(2) b. (2) For the composed mechanism, the largest log-density ratio between neighbouring counts over 4,000 sampled outputs must not exceed epsilon, and the analytic worst case equals epsilon exactly. (3) The mean number of successful re-identifications over 150 simulated auxiliary lists must match the closed form sum over classes of (1 - (1 - f)^s) within sampling error. (4) The hashed grouping into classes must equal a brute-force pairwise grouping on 700 records, and the mean per-record risk must equal classes divided by records.

Honest simplifications

The model is the central (trusted curator) setting with pure epsilon-DP and one counting query family; it ignores floating-point side channels, correlated records and attackers with background knowledge beyond a public list. The synthetic population is small and has made-up structure, so the numbers illustrate the mechanisms but are not predictions for any real dataset. Real releases should follow a formal standard and legal advice. This is an educational model, not a compliance tool.

Loading model...
Loading Blender model...
One query: Laplace noise around the true count
Averaging attack: error of the mean of n answers
Accuracy cost of privacy: error against epsilon
Utility against re-identification (each dot is a release setting)
Made with 🟠 Blender · Three.js