LOGBOOK

HELP

Quiz Entry - updated: 2026.07.14

In the judiciary case, why isn't k-anonymity enough on its own, and how does l=2 diversity fix it?

k-anonymity hides which row is yours inside a group — but if every row in the group shares the same secret, the attacker doesn't need to pick yours; they already know it. l=2 forces each group to contain at least two different secret values, so uncertainty is restored.

Two k=3 classes — one all-Yes (leaks), one mixed (safe); l=2 forces at least one Yes and one No per class.

* Both classes are k-anonymous, but the all-Yes class leaks 100% of the time; l=2 restores uncertainty. *

The setup, briefly. The dataset has people's age, ZIP, "owns luxury car?", and a sensitive flag — Convicted: Yes/No. The release goal is absolute: no outsider should be able to say with certainty whether a specific person was convicted.

What k-anonymity does (and doesn't) do. k-anonymity generalizes the quasi-identifiers — e.g. exact DOB → an age range, full ZIP → 600* — until every record is identical to at least k − 1 others on those columns. Those identical-looking rows form an equivalence class. An attacker who knows your quasi-identifiers can narrow you down to the class, but not to a single row.

Where it breaks — the homogeneity attack. Pin the attacker to a k=3 class of three rows. If all three have Convicted: Yes, blending in didn't help: every candidate shares the secret, so the attacker learns it without needing to identify you. This is especially likely for binary sensitive attributes — with only two possible values, "all the same" happens by chance whenever a class is small.

Concretely:

Equivalence class Rows in class Convicted values
age 40–50, ZIP 600*, luxury car: Yes 7, 12, 19 Yes, Yes, Yes ← leak
age 40–50, ZIP 600*, luxury car: No 3, 9, 14 Yes, No, No ← safe

Both classes are k-anonymous (k=3). The top one still leaks 100% of the time.

How l=2 diversity fixes it. l-diversity layers an extra rule on top of k-anonymity: every equivalence class must contain at least l distinct values of the sensitive attribute. With l=2, each class is required to hold at least one Yes and at least one No. Pinning the attacker to a class now tells them only "this person is either convicted or not" — which is no information at all. The absolute-privacy requirement is met.

Tip: k hides who you are in the crowd; l hides what you did. For a binary sensitive column, l ≥ 2 is essentially mandatory — without it, k-anonymity is privacy theater.

Go deeper:

From Quiz: PRIVACY / Data Anonymization — k-Anonymity, l-Diversity & Re-identification | Updated: Jul 14, 2026