Privacy and preparation
Task-preserving deidentification review: two tests on one file
By SourceX Editorial · Reviewed by Noah Loul ·
9 sections
Short answer
A task-preserving deidentification review signs off a transformed file only when two tests pass on that same file: the buyer's task labels come out exactly as on the source, and no record stands alone under a written intruder model. On 18,484 fictional customers, removing names kept every task but left 99.0 percent alone; one date offset per customer at state level left 3.3 percent but broke the month task.
Redaction
Task preserving
Key takeaways
- Removing names, emails, phones and street addresses changed none of three task labels and left 18,306 of 18,484 sample customers (99.0 percent) alone on birth date, gender and postal code.
- Year-only dates with state geography cut that to 3.5 percent and kept none of the three tasks.
- One random offset per customer, with geography cut to state, kept every gap and 18,478 exact ages with 3.3 percent alone, but the calendar month survived for only 8.5 percent.
- Putting the true month back to rescue a seasonal task raised the share standing alone from 3.3 to 28.4 percent: the added field recreated the person.
- Write the utility bar, the intruder model and the group threshold down before scoring, scope each release to its tasks, and rerun both tests on the file that ships.
What does a task-preserving deidentification review decide?
It decides whether one specific transformed file may go to a buyer: the task the buyer named still works on it, and nobody in it stands alone under intruder assumptions written down before testing. Both tests run on the same file, after the last transformation, and the outcome is one of four: release it, change the recipe, release less, or move the task into a controlled environment where the buyer never holds the rows.
The task has to be concrete enough to compute. "Training a repurchase model" is not testable; "days between a customer's last two orders", "age in whole years at the last order" and "the calendar month of the last order" are. Compute each label on the source and on the release. The task is preserved for a record only when the release yields the same value, not a plausible-looking one.
Why both at once: every transformation that lowers identifiability spends some task signal, and every shortcut that keeps the signal tends to keep the person. A review that scores only privacy picks a recipe that quietly breaks the model; one that scores only utility ships a file in which many people are still unique. The measured example below shows both mistakes on public, fictional data, and shows that which recipe is right depends on which task the buyer actually needs.
Why taking names out settles neither question
Dropping names, emails, phone numbers and street addresses usually leaves the task untouched and the person exposed. In the sample file below it changed none of the three task labels, and 18,306 of 18,484 customers (99.0 percent) were still the only record with their exact birth date, gender and postal code.
Rule-makers in three jurisdictions frame the problem the same way. In the EU, the European Data Protection Board's Guidelines 01/2025 on pseudonymisation treat pseudonymised data that can be attributed to a person with additional information as personal data, including when another party holds that information (paraphrase). In the UK, the ICO's glossary defines the motivated intruder test as one that considers "all the practical steps and all the means that are reasonably likely to be used by someone who is motivated to identify" the people behind apparently anonymous information. In the US, NIST's Generative AI Profile (NIST AI 600-1) lists among data privacy risks "leakage and unauthorized use, disclosure, or de-anonymization" of personally identifiable or sensitive information.
Secure transfer answers a different question. Encryption in transit and short-lived links protect the copy while it moves; they do nothing about what the copy reveals once it arrives. The strongest objection to testing at all is that a contracted buyer will not try to identify anyone. Contract terms and access limits genuinely lower what is reasonably likely, so they belong in the intruder model, but a review still has to say who could single out whom if those controls failed. None of this is legal advice; counsel applies the law that governs the records.
Seven recipes on one fictional customer file: what each kept and what each exposed
No recipe kept all three tasks with few customers standing alone; the right recipe depended on which tasks the buyer needed. The file is AdventureWorksDW, the data warehouse sample Microsoft publishes for Adventure Works Cycles, a company its documentation calls fictitious: 18,484 invented customers with birth date, gender and a postal code in six countries, and 27,659 internet sales orders from December 2010 to January 2014. Nobody in it exists, which is why it can be measured in public.
Three tasks stand in for what a buyer might train on: the gap in days between each customer's last two orders (6,865 customers have two or more), exact age at the last order, and the calendar month of the last order. A task counts as kept when at least 99 percent of its labels match the source exactly. The risk test asks how many released records an outsider who knows a customer's true birth date, gender and postal code could not tell apart from that customer, given the recipe's published rules. A group of one means the customer stands alone; fewer than five is a second screening level, not a legal standard.
Year-only dates with state or province geography (R2) left 3.5 percent alone and kept none of the three tasks. One random offset per customer on every date (R3, R4) keeps gaps and ages, because shifting two dates by the same number of days leaves the distance between them unchanged; with postal code kept, 37.0 percent still stood alone, and with geography cut to state, 3.3 percent. The same offset scrambles the calendar, so the month of the last order survived for only 1,563 customers (8.5 percent). Cutting dates to year and month (R5) keeps the month but left 28.5 percent alone, because birth year and month with state still narrows many groups; keeping the order month but only the birth year (R6) served the month task at 3.5 percent alone.
Rule-based methods can go further than any recipe here. The Safe Harbor method under the US HIPAA Privacy Rule, written for health information, removes all geographic subdivisions smaller than a state, apart from an initial three-digit ZIP code whose area holds more than 20,000 people; these recipes are illustrations, not claims to meet it. Across twenty other seeds, R4 left between 3.2 and 3.4 percent alone and R3 between 36.7 and 37.5 percent. The table gives each recipe's result:
| Recipe applied to the fictional file | Last gap exact (of 6,865) | Age at last order exact (of 18,484) | Month of last order kept | Customers alone; in groups under 5 |
|---|---|---|---|---|
| R1: names, emails, phones and street addresses removed | 6,865 (100%) | 18,484 (100%) | 18,484 (100%) | 99.0%; 100% |
| R2: dates cut to year, postal code and city removed (state kept) | 0 | 0 (all within one year) | Not released | 3.5%; 12.6% |
| R3: one random offset per customer on every date, postal code kept | 6,865 (100%) | 18,478 | 1,563 (8.5%) | 37.0%; 92.9% |
| R4: the same offset, geography cut to state | 6,865 (100%) | 18,478 | 1,563 (8.5%) | 3.3%; 12.6% |
| R5: all dates cut to year and month, state kept | 0 | 16,966 (91.8%) | 18,484 (100%) | 28.5%; 74.4% |
| R6: birth year only, order year and month, state kept | 0 | 0 (all within one year) | 18,484 (100%) | 3.5%; 12.6% |
| R7: R4 plus each customer's true month of last order | 6,865 (100%) | 18,478 | 18,484 (100%) | 28.4%; 74.7% |
When putting a task field back recreates the person
Adding a field back to rescue a task can quietly undo the protection that made the file safe. R7 takes R4, which left 3.3 percent of customers alone, and adds each customer's true month of last order so the seasonality task works again. The released month tells anyone comparing it with the shifted date which 28 to 31 offsets are possible for that customer, out of 365. With the offset pinned to about a month, the share standing alone rose to 28.4 percent (5,248 of 18,484).
The width of the offset window is the same trade in miniature. At state level, a window of plus or minus 30 days left 16.8 percent alone and kept the month for 50.0 percent; 91 days left 6.4 percent alone and kept the month for 16.8 percent; 182 days, 3.3 and 8.5 percent; 365 days, 1.7 and 8.7 percent. Gaps stayed exact at every width and exact age never fell below 18,478 of 18,484. A seasonality task and a strong shift do not fit in one file.
That is the practical meaning of preserving the task without recreating the person. Scope each release to the tasks it serves, and treat any field added late, a true month, a raw date or an unrounded amount, as a new recipe that reruns the risk test. Two releases built for different tasks also need to be tested together if they could be joined, because a join recreates R7.
The privacy-utility review matrix: one row per field the task touches
The matrix forces one decision per field: how much of it the task consumes, how much it identifies, and which record settles the choice. Fill it before choosing a recipe, because the recipe should fall out of the rows rather than the other way round. Fields the task never touches leave the release, whatever their risk.
Read each row left to right; the last column names the evidence a reviewer files with the sign-off:
| Field role | What the task consumes | Identifying power | Default action | Record that settles it |
|---|---|---|---|---|
| Names, emails, phones, street addresses | Nothing in the three tasks | Names a person directly | Remove, or replace with a keyed token held apart | Field inventory of the final file showing no such column or value |
| Event dates (orders, tickets, visits) | Exact gaps between events | High when combined with birth date and place | One offset per person on every date | Gap labels recomputed on the release match the source |
| Birth date | Age at an event, not the date | High | Shift with the person's offset, or release age at the event only | Exact-age match count with the misses explained |
| Postal code and city | Whatever level the task uses | High in small groups | Cut to the task's level, here state or province | Candidate-group counts at each level tried |
| Calendar fields (month, weekday, season) | Only for seasonal tasks | Pins a date offset when released beside shifted dates | Release in a separate, separately tested file, or not at all | Candidate test rerun with the calendar field included |
| Income, household, occupation | Only if the task uses them | Splits groups further | Keep if used; band or drop if not | Candidate test rerun with these fields included |
| Free text and attachments | Depends on the task | Can contain anything | Detector pass plus human review of a sample | Sample review log with misses and fixes |
Write the utility bar, intruder model and group threshold down first
Set three things in writing before any recipe is scored, or the results will be read to fit the preferred answer. The utility bar is the share of task labels that must come out identical, per task; the example used 99 percent, which R4 passes for gaps and ages and fails for the month. The intruder model lists who might try, what each already knows and which controls limit them. The group threshold is the largest candidate group still treated as standing alone, chosen by the privacy specialist for this release, not copied from another dataset.
Treat the within-file count as a screening test. It finds records that stand out; it cannot say whether anyone outside holds the matching facts. Under the ICO's approach the question is what is reasonably likely in context rather than what is merely conceivable (paraphrase of the guidance), and ISO/IEC 27559:2022, the international de-identification framework standard, sets out a risk-management process covering re-identification risk and the lifecycle of de-identified data (paraphrase of the standard's scope). A file that passes screening still goes to a specialist where records are sensitive, the release is broad or the intruder model is uncertain.
Decide in advance what happens to records that remain alone after the best recipe. Options are a wider offset, suppressing a field for those records, dropping them, or accepting them with a documented reason and controls. In the sample, 619 customers remained alone under R4; a reviewer would record which option applied to them and rerun the counts.
Sign-off checklist for the file that actually ships
Sign off only on the file that will be delivered, after its last transformation, with both tests rerun on it:
Checklist · 8 items
- The task specification is attached: each label, how it is computed and the share that must match exactly.
- Task labels were recomputed on the final file and the match share is recorded per task, with every miss explained.
- The intruder model names who could try, what they know and which contractual or access controls apply.
- Candidate-group counts were rerun on the final file at the agreed threshold, including every demographic, geographic and calendar field actually released.
- Any field added after the first test, such as a true month or an unshifted date, triggered a full rerun rather than a note.
- Records still standing alone have a recorded treatment: suppressed, dropped, re-shifted or accepted with a reason.
- Releases built for different tasks were checked for a shared key that would let them be joined, and tested together if so.
- The privacy specialist and the data owner signed the same version of the file, identified by its checksum and date.
0 of 8 ticked. Tick each item as you go.
Where this review meets SourceX preparation
On SourceX deals, preparation happens after the agreement, and the review above is the kind of evidence worth having before it starts. SourceX's trust page states: "Once SourceX gives the go-ahead, the data is extracted, transferred and de-identified through approved processing routes." Its legal framework page says names, emails, phone numbers and account numbers are removed or replaced, that "The method used is recorded for each dataset", and that de-identification reduces risk but cannot remove it entirely. For healthcare administration data the same page says SourceX requires HIPAA de-identification, by the Safe Harbor method or an expert determination, before the data is used or shared.
A supplier can shorten that work by arriving with two documents: the field inventory with each field's role, and a plain description of what the records show about how work gets done. Those let a reviewer see early which fields carry the task and which only carry people. The first step is a short company assessment with no data uploaded; it checks fit and is not an offer of any amount.
Methods note: data, counting rules and limits of the measurement
Data: DimCustomer.csv, DimGeography.csv and FactInternetSales.csv from microsoft/sql-server-samples at commit 348bbbc25079785f93ea74be3dd0d6369a59358f (folder samples/databases/adventure-works/data-warehouse-install-script; pipe-delimited UTF-8, no byte-order mark), read by a script that runs nothing from the repository and keeps only customer key, geography key, birth date and gender from the customer file; no name, email, phone or address is stored, printed or saved. All 18,484 customers have a birth date, a geography row and at least one order, so none were dropped; the 60,398 order lines collapse to 27,659 distinct sales order numbers, each with one order date and one customer. Customers sit in six countries: the United States, Australia, the United Kingdom, France, Germany and Canada.
Rules: each customer's orders are sorted by OrderDate, then SalesOrderNumber. The gap is the day difference between the last two (8 customers have both on the same day, gap 0); age is whole years from BirthDate to the last order date, counting a birthday as reached on the day; the month is that date's calendar month. Offsets are integers drawn uniformly from minus W to plus W days inclusive (W = 182 unless stated; zero allowed, 48 customers drew zero) with Python random.Random(20261028), one per customer in ascending CustomerKey order, applied to the birth date and every order date. Fine geography is country code plus postal code (324 distinct among customers); state geography is country code plus state or province name (53 distinct). The candidate group for R1, R2, R5 and R6 is the customers sharing the released birth value, gender and released geography; for R3 and R4 it is the customers of the same gender and geography whose released birth date lies within W days of the target's true birth date; for R7 it is those whose released birth date minus the target's true birth date is an offset still possible for them, meaning within W days and consistent with their released true month. R6 uses the R2 group because order months are not among the outsider's facts. Under R5, age counts as exact only when birth month and last-order month differ, since only then do year and month fix whole years. A task is kept at 99 percent exact matches. The 6 exact-age misses under R4 all had a last order 0 or 1 days from the birthday anniversary. Percentages are rounded to one decimal; none fell on a tie.
Limits: a fictional file has invented distributions, so the levels here do not transfer to real records; the method does. The test is within-file and assumes the outsider knows exactly a true birth date, gender and postal code; an outsider who also knew order dates, income or household size would find smaller groups. It uses no outside data and attempts no linkage to real people. Twenty further seeds were run only to show the shift results are stable. Script and output: bin/xs0851_frontier.py and bin/xs0851_frontier_output.txt in the writer's scratch folder.
Frequently asked questions
Is one date offset per person enough on its own?
Not in the measured example. Shifting every date of a customer by the same random number of days kept the gap and age tasks, but with postal code still released 37.0 percent of the 18,484 fictional customers stood alone. Cutting geography to state brought that to 3.3 percent, at the cost of any task that needs the real calendar month.
Does a unique record mean someone can be identified?
No. Within-file uniqueness says a record stands out; identification also needs an outsider who holds the matching facts. The UK ICO frames the question as what is reasonably likely in context, so the review names plausible outsiders and what they know, and a specialist judges the rest.
Why not release the true month next to shifted dates?
Because the month tells a reader which offsets are possible, about one month out of a year, which largely undoes the shift. In the example, adding it raised the share of customers standing alone from 3.3 to 28.4 percent. A seasonal task needs its own release, tested on its own and kept from being joined to the shifted one.
Who should set the group-size threshold?
The privacy specialist responsible for the release, with counsel where the law requires it. The threshold depends on how widely the file will travel, how sensitive the records are and what controls bind the recipient, so a number borrowed from another dataset is a poor default.
Why measure on fictional data instead of real records?
So the method can be shown in public without handling anyone's personal data. The AdventureWorks figures describe that sample only; the useful part is the procedure, which a supplier reruns on its own file under its own privacy review.
Sources
- Microsoft's sql-server-samples repository publishes the AdventureWorksDW data (DimCustomer, DimGeography, FactInternetSales) used for the measurement, at commit 348bbbc25079785f93ea74be3dd0d6369a59358f under the MIT License. Source
- Microsoft documentation (SQL Server 2008 samples): Adventure Works Cycles is the fictitious company on which the AdventureWorks sample databases are based. Source
- ICO anonymisation glossary (UK): the motivated intruder test considers all the practical steps and means reasonably likely to be used by someone motivated to identify people behind apparently anonymous information. Source
- ICO guidance on effective anonymisation (UK): the identifiability assessment looks at what is reasonably likely in the circumstances, and the motivated intruder test is a good starting point. Source
- EDPB Guidelines 01/2025 on pseudonymisation (EU): pseudonymised data that can be attributed to a person with additional information remain personal data, also when another party holds that information. Source
- NIST AI 600-1, the Generative AI Profile (US): data privacy risks include leakage and unauthorized use, disclosure or de-anonymization of personally identifiable or sensitive information. Source
- ISO/IEC 27559:2022 provides a privacy-enhancing data de-identification framework for identifying and mitigating re-identification risks and risks across the lifecycle of de-identified data. Source
- 45 CFR 164.514 (US HIPAA Privacy Rule): the Safe Harbor method removes geographic subdivisions smaller than a state, including city and county, except an initial three-digit ZIP code whose area holds more than 20,000 people. Source
- SourceX trust page: once SourceX gives the go-ahead, data is extracted, transferred and de-identified through approved processing routes. Source
- SourceX legal framework page: personal details such as names, emails, phone numbers and account numbers are removed or replaced, the method is recorded for each dataset, de-identification reduces risk but cannot remove it entirely, and healthcare administration data requires HIPAA de-identification by Safe Harbor or expert determination. Source
See if your company qualifies
A short company assessment. No data uploads are needed.