Data Anon Lab
← All labs
0% mastered
COE 526 · Lecture 5

Publish useful data.
Limit what it reveals.

Experiment with quasi-identifiers, equivalence classes, disclosure attacks, k-anonymity, l-diversity, and t-closeness.

ZIPAGEDIAGNOSIS
5371125Flu
5371*25–29Diabetes
5371*25–29Flu
5371231Asthma
01 · Know the columns

Three attribute roles

Removing names does not guarantee anonymity. Attackers can link combinations such as ZIP code, birth date, and sex to external records.

DIRECT

Key attribute

Uniquely identifies a person directly.

Name · address · phone number
LINKABLE

Quasi-identifier

May identify someone when combined with external information.

ZIP · age · sex
PROTECTED VALUE

Sensitive attribute

Needed for analysis but capable of causing privacy harm.

Diagnosis · wage · medication
PRACTICE · 6 ATTRIBUTES

Classify each attribute

For every row, choose one role. You can change an answer before checking.

Key identifies directlyQI becomes identifying when linkedSensitive is the value to protect
02 · Hands-on model

The k-anonymity workbench

Every released record must share its quasi-identifier pattern with at least k−1 other records. Increase k to see broader generalization and lower re-identification probability.

2
Upper bound on record linkage

Generalization

Replace a value with a less specific, semantically consistent range or category.

Age 27 → 25–29

Suppression

Remove selected values and replace them with a wildcard.

ZIP 53711 → 5371*

Trade-off

Higher k usually improves protection from record linkage while reducing analytical precision.

03 · Algorithm intuition

Greedy partitioning

A k-d-tree style algorithm repeatedly splits a multidimensional data set while ensuring that each resulting partition can still contain at least k records.

StepPartitionSplitReason
1Full tableZIP at 53711Creates two valid groups
2Left groupAge at 26Both children retain at least k=2
3Each childNo allowable cutAnother split would create a group smaller than k
Key ideaGreedy selection is efficient, but optimal strict multidimensional partitioning is NP-hard.
04 · Threat model

What k-anonymity does not solve

k-anonymity limits identification through quasi-identifiers. It does not guarantee that sensitive values inside an equivalence class remain uncertain.

HOMOGENEITY

Everyone has the same diagnosis

A 5-anonymous class still reveals a diagnosis when all five sensitive values match.

BACKGROUND KNOWLEDGE

Outside facts narrow the answer

Knowing that Carl does not have heart disease may reveal which remaining diagnosis applies.

LINKAGE

External records restore identity

Pseudonyms alone can fail when dates, ratings, locations, or demographics overlap with public data.

Attack detector

A 3-anonymous class contains three people. Every sensitive value is “Diabetes.” What remains exposed?

05 · Stronger distribution checks

Beyond k-anonymity

Select a model to compare the protection goal and its main limitation.

Distribution thought experiment

HIV prevalence in the full table is 1%. An equivalence class contains 50% positive records and 50% negative records. It has two distinct sensitive values.

Why is diversity alone misleading? The class distribution is far from the population distribution, so membership in the class sharply increases the inferred probability of a positive result. t-closeness evaluates this shift.

06 · Retrieval practice

Mastery check