Skip to content

Privacy and preparation

How to test whether a de-identified dataset can be re-identified

By SourceX Editorial · Reviewed by Noah Loul ·

Short answer

To test whether a de-identified dataset can be re-identified, attack a sample on purpose: list the clues left in the records, try to link them to public and internal sources, count how many records become unique or nameable, fix the fields that allowed it, retest and document the result. The testers should not be the people who prepared the data.

Key takeaways

  • Removing names is a preparation step, not a test; combinations of ordinary fields can still single out a person.
  • A useful test names its attacker: an outsider with public sources, and an insider who knows the events.
  • Score each sampled record as named, narrowed, unique but unnamed, or indistinguishable.
  • Free-text business records need a reading attack, not only uniqueness counts on columns.
  • The test file, the fixes and the residual-risk decision belong in the release documentation.

Why is removing names not enough?#

Removing names is not enough because ordinary details combine into a fingerprint. Latanya Sweeney estimated from 1990 U.S. Census data that 87% of the population was likely unique on five-digit ZIP code, gender and date of birth alone. In the Netflix Prize research, Narayanan and Shmatikov reported that eight movie ratings, two of which may be wrong, plus dates with up to a 14-day error were enough to uniquely identify 99% of records.

Business records carry their own fingerprints: a rare job title, a named product integration, an outage on a known date, a project in a small town. None of these is a name, and any of them can point to one customer or one employee for someone who knows the context.

That is why de-identification is judged by what an attacker could do with the released file, not by which columns were deleted. A test turns that judgment from an assumption into evidence.

What do the main standards expect a test to show?#

The main standards expect evidence that identification is not reasonably likely, using methods someone could repeat. They differ in wording and in where they apply, so the test file should speak to whichever ones counsel says are relevant to the deal.

What do the main standards expect a test to show?
FrameworkWhat it asksWhat your test file should show
California deidentified data (Cal. Civ. Code 1798.140(m))Data cannot reasonably be linked to a consumer or household; reasonable measures, a public commitment not to re-identify, and contractual obligations on recipientsThe measures taken, the test result and the contract terms passed to the buyer
HIPAA Expert DeterminationA qualified expert finds the risk of re-identification very small and documents the methodsMethod, assumptions and result, even where HIPAA does not apply, as a recognized model
GDPR Recital 26Account for all means reasonably likely to be used, such as singling out, weighing cost, time and available technologyWhich attackers and sources were considered and why others were ruled out
NIST SP 800-188 and ISO/IEC 27559Assess goals and risks, then choose a release model and govern itA risk assessment tied to the chosen delivery method
  1. 01Your work records
  2. 02Personal details removed
  3. 03You approve the release
  4. 04Licensed to AI developers
How it works with SourceX: Your work records → Personal details removed → You approve the release → Licensed to AI developers.Illustrative

The red-team procedure, step by step#

The red-team procedure is a planned attempt to re-identify records from the prepared dataset, run by people who did not prepare it. Outside reviewers or colleagues from another team work well; the preparers know too much about what they removed to attack it fairly.

  • Define the release: which files, which fields, and how the buyer will receive and store them.
  • Name the attackers: an outsider with public sources and skill, often called a motivated intruder, and an insider such as a former employee or customer who knows the events.
  • Draw a sample that includes rare cases on purpose: small customers, unusual products, senior roles, short time windows.
  • List the quasi-identifiers left in each record: dates, locations, titles, product names, amounts, sequence of events.
  • Attempt linkage against public sources such as company websites, press releases, professional profiles, review sites and court filings, and against what each insider would know.
  • Score every sampled record and note which fields made identification possible.
  • Fix those fields by generalizing, suppressing or removing them, then repeat the attack on a fresh sample.
  • Document the attackers, sources, sample, scores, fixes and the final decision.

How should results be scored?#

Results should be scored per record on a short scale that separates a confident name from a narrowed guess. A single number for the whole file hides the rare records that matter most.

For structured fields, the classic measure is k-anonymity: a release is k-anonymous when each record cannot be distinguished from at least k-1 others. Later work on l-diversity and t-closeness addresses a gap in that measure, where everyone in a group shares the same sensitive value. Mainstream tooling now computes these: Google's Sensitive Data Protection API offers k-anonymity, l-diversity, k-map and delta-presence analysis.

How should results be scored?
ScoreWhat it meansAction
NamedTester identified the person or company with confidenceFix the fields involved; retest required
NarrowedTester reduced the candidates to a small groupGeneralize the narrowing fields; retest
Unique but unnamedRecord stands out but could not be linked to a nameReview whether a better-informed attacker could link it
IndistinguishableRecord blends in with many similar recordsNo action

Why free text needs a different attack#

Free text needs a reading attack because its identifying details do not sit in columns that a uniqueness count can measure. Support tickets, email, chat and project notes describe events, and events are what insiders remember.

Testers should read sampled records looking for nicknames, signatures that survived cleaning, unusual job titles, project code names, quoted contract terms, local landmarks and references to well-known incidents. They should also look across records, since several harmless tickets from one coded customer can add up to an obvious identity.

Record the clue types found, not just the counts. A list such as release names tied to a single customer or city names inside product configuration tells the preparation team exactly which rule to add.

Illustrative: testing a support ticket release#

Illustrative: a fictional vertical software company prepares several years of Zendesk tickets for license, with names, emails and company names replaced by codes. Its general counsel asks two people from the finance team and an outside reviewer to attack a sample.

The outside reviewer, using only the company's public changelog and customer case studies, links a group of tickets to a named customer: a custom integration mentioned in the tickets appears in a published case study, and an outage date matches a public status page. A finance analyst, acting as an insider, names a customer from a renewal dispute described in detail.

The team generalizes custom integration names to their category, coarsens dates to the month, and removes commercial negotiation threads from scope. A fresh sample is attacked again and no record is named. The test, the fixes and the retest are filed with the release documentation.

How SourceX documents re-identification testing#

SourceX places re-identification testing at the end of the Preparation step in the SourceX five-step transaction, before the supplier's Approval. The sample, the attackers considered, the scores, the fixes and the residual-risk decision are recorded in the privacy record of the SourceX Evidence Packet.

The license itself should carry the other half of the protection: a prohibition on re-identification attempts and on combining the data to single people out. California's definition of deidentified data expects recipients to be bound contractually, so the test and the contract terms work together.

Frequently asked questions

How large should the test sample be?

Large enough to include the rare records, which is where identification happens. Stratify the sample so small customers, unusual products, senior roles and short time windows are all represented, rather than drawing purely at random. If the dataset has distinct record families, sample each one separately.

Who should run the test?

People who did not prepare the data, ideally including someone outside the company and someone who knows the business from the inside. The outsider tests public linkage; the insider tests what a former employee or customer could recognize. Counsel should agree the attacker definitions before the test starts.

Does passing the test make the data anonymous under the law?

Not by itself. A passed test is evidence that supports a legal conclusion, which also depends on the law that applies, the contract terms and how the data is delivered and stored. Counsel assesses that conclusion deal by deal, using the test file as one input.

When should we retest?

Retest when the dataset changes materially, when new fields are added, when a later release could be combined with an earlier one, or when new public information appears about the company, such as a case study or a press release that describes customers or incidents.

What if the buyer combines our data with other datasets?

Combination is the main residual risk, which is why the attacker definition should include other data a buyer plausibly holds. The license should prohibit re-identification and linking aimed at individuals, and the release should avoid fields that make joins easy, such as exact timestamps.

Sources

  • Latanya Sweeney estimated from 1990 U.S. Census data that 87% of the U.S. population were likely unique on five-digit ZIP, gender and date of birth. Source
  • Narayanan and Shmatikov reported that eight movie ratings, two of which may be completely wrong, plus dates with up to a 14-day error are enough to uniquely identify 99% of records in the Netflix Prize dataset. Source
  • Sweeney's 2002 paper defines a release as k-anonymous when each person's record cannot be distinguished from at least k-1 other individuals in the same release. Source
  • l-diversity and t-closeness were proposed to strengthen k-anonymity against attribute disclosure, such as homogeneity and background-knowledge attacks. Source
  • Google's Sensitive Data Protection API offers k-anonymity, l-diversity, k-map estimation and delta-presence estimation as re-identification risk-analysis metrics. Source
  • Under Cal. Civ. Code 1798.140(m), deidentified information cannot reasonably be linked to a consumer, and the business must take reasonable measures, publicly commit not to reidentify it, and contractually obligate recipients to comply. Source
  • Under 45 CFR 164.514(b), Expert Determination requires a qualified expert to find the re-identification risk very small. Source
  • Expert Determination under 45 CFR 164.514(b)(1) requires a qualified expert to determine that the risk of re-identification is very small and to document the methods. Source
  • GDPR Recital 26 says account should be taken of all the means reasonably likely to be used, such as singling out, weighing objective factors such as cost and time against available technology. Source
  • NIST SP 800-188 tells agencies to assess goals and risks first and then choose a data-sharing model. Source
  • ISO/IEC 27559:2022 provides a framework for identifying and mitigating re-identification risks across the lifecycle of de-identified data. Source

Related resources

See if your company qualifies

A short company assessment. No data uploads are needed.

See if your company qualifies