Privacy and preparation
Dataset synthetic identifier collisions: when fake IDs join two people
By SourceX Editorial · Reviewed by Noah Loul ·
9 sections
Short answer
Detect pseudonym collisions by testing the mapping and the joins, not the pseudonyms themselves. Keep a private crosswalk from original keys to pseudonyms, confirm each pseudonym traces to exactly one original key, keep blank and placeholder inputs from receiving a person pseudonym, and check that joins on pseudonyms return the same rows as joins on original keys. Then review pseudonyms whose records contradict each other.
Redaction
Dataset synthetic identifier
Key takeaways
- A collision merges two people under one synthetic ID; it invents history that a model and a buyer will trust.
- With a full-length hash, collisions come from shared inputs such as empty emails, unscoped system IDs and recycled phone numbers, not from the hash function.
- Truncating pseudonyms to a few characters turns a sound keyed hash into a collision source as volume grows.
- Join parity, comparing joins on original keys and on pseudonyms inside your environment, measures the damage directly.
- A collision-free pseudonym is necessary but does not make a dataset anonymous; the surrounding fields still need review.
How do you detect pseudonym collisions that join different people's records?
You detect them by testing the mapping and the joins, not by inspecting the pseudonyms. Keep a private crosswalk from each original key to its pseudonym, confirm that every pseudonym traces back to exactly one original key, and confirm that joining tables on pseudonyms returns the same rows as joining them on the original keys. Then look for pseudonyms whose records contradict each other.
A collision is the failure in which two different people, accounts or employees end up with the same synthetic identifier. It is the opposite of a split, in which one person receives two identifiers. Splits lose history; collisions invent it. A model trained on a collided record learns that one customer filed tickets in two time zones, held two contract start dates and churned twice, and a buyer evaluating the dataset may never notice.
Collisions also have a privacy edge. When two people share a pseudonym, a recipient who recognizes one of them in the merged profile now sees the other person's records attached to that identity. The test in this guide is therefore both a data quality check and a disclosure check, and it belongs before the dataset leaves your systems.
Where do merged identities come from in a real export?
With a full-length keyed hash, collisions come from the inputs and the scoping, not from the hash function. Strong keyed hashes almost never collide on distinct inputs; the trouble starts when distinct people arrive at the pseudonymizer with identical inputs, or when the output is shortened to fit a column.
Recycled identifiers deserve special attention because they look correct. The FCC runs a Reassigned Numbers Database precisely because telephone numbers pass from one subscriber to another; carriers must age a permanently disconnected number for at least 45 days before reassigning it. A ten-year call center archive keyed on phone number can contain several unrelated people behind one number.
| Cause | How it shows up | Typical source | Test that catches it |
|---|---|---|---|
| Blank or placeholder input | Every record with a missing email receives one shared pseudonym | Help desk requesters with no email, CRM contacts saved as unknown or N/A | T3 null and sentinel inputs |
| Same raw key in two systems | Customer 1001 in the help desk and account 1001 in billing become one person | Auto-increment IDs in Zendesk, NetSuite or a homegrown database | T4 namespace scoping |
| Recycled identifier | One phone number, badge number or mailbox serves different people over time | Call logs, access control, shared inboxes such as support@ | T6 attribute conflicts, T7 impossible activity |
| Truncated output | Pseudonyms shortened to 8 hex characters start repeating as volume grows | Legacy scripts that trimmed hashes to fit a column | T9 length and volume check |
| Over-eager entity resolution | Two people with the same name and city merged before hashing | Matching on name plus ZIP code to unify CRM and billing | T6, T8 cluster size outliers |
| Aggressive normalization | Distinct case-sensitive IDs or plus-addressed emails collapse to one value | Lowercasing tokens that are case-sensitive in the source | T1 crosswalk injectivity |
How long must a pseudonym be before accidental collisions stop mattering?
Long enough that the expected number of accidental collisions across your full volume is effectively zero, or you should assign pseudonyms in a way that cannot collide at all. For random or hash-derived values, the expected number of colliding pairs is roughly the number of identifiers squared divided by two to the power of the pseudonym length in bits, plus one.
As an illustrative calculation, one million customers mapped to 32-bit pseudonyms (eight hexadecimal characters) yield an expected 116 colliding pairs. The same million customers mapped to 64-bit pseudonyms yield an expected count far below one in a million. Truncation, not the choice of algorithm, is what turns a sound keyed hash into a collision source.
Two designs avoid the arithmetic. A counter or a random token checked for uniqueness against a lookup table cannot assign the same value twice; ENISA describes the counter as the simplest technique and a good candidate for small, simple datasets. A keyed hash such as HMAC, which Python's standard hmac module implements following RFC 2104, keeps pseudonyms consistent across systems without storing a table, and ENISA notes that without the key the identifiers and pseudonyms cannot be mapped. A 2019 ENISA workshop summary lists negligible collision probability among the technical features of a sound scheme.
Whatever the design, derive the pseudonym from a secret, not from the person's data alone. HHS guidance on the HIPAA Privacy Rule, for example, allows a covered entity to keep a re-identification code only if the code is not derived from or related to information about the individual, and treats hashed values under expert determination as acceptable when the keys are not disclosed.
What should the pseudonym collision and join integrity test include?
It should include ten checks that run against the private crosswalk and the planned joins before release, each with a numeric pass rule and a defined response. The table below is the test as a team can run it; thresholds marked for review are starting points to agree with your privacy reviewer, not standards.
| Check | How to run it | Pass rule | If it fails |
|---|---|---|---|
| T1 Crosswalk injectivity | Group the crosswalk by pseudonym and count distinct original keys | Every pseudonym maps to exactly one original key | Find the shared input or normalization step and re-key the affected records |
| T2 Split check | Group by normalized original key and count distinct pseudonyms within one release | Every key maps to one pseudonym per release | Fix inconsistent normalization such as trailing spaces or mixed case |
| T3 Null and sentinel inputs | List the 50 most frequent input values that received a pseudonym | No blank, placeholder or shared-role value receives a person pseudonym | Assign null or a role token such as SHARED_INBOX, never a person pseudonym |
| T4 Namespace scoping | Pseudonymize a value known to exist in two systems for different entities | Inputs include system and entity type, so the outputs differ | Prefix inputs with system and entity type, or resolve entities first |
| T5 Join parity | Run every planned join on original keys and on pseudonyms; compare row counts and fan-out | Identical row counts and identical rows per parent | Trace the extra rows to the colliding pseudonym |
| T6 Attribute conflicts | Per pseudonym, count distinct values of attributes that should not change, such as account open date or hire date | Conflicts below a review threshold agreed with the reviewer; every conflict listed | Sample conflicts by hand; split recycled identifiers by validity period |
| T7 Impossible activity | Flag overlapping sessions in distant regions, activity after a closure date, two concurrent employments | Zero unexplained cases in a reviewed sample | Treat as a suspected merge until explained |
| T8 Cluster size outliers | Plot records per pseudonym and review the largest clusters | Largest clusters are plausible for one real entity | Usually a sentinel input or a shared account; fix at T3 |
| T9 Length and volume | Compute expected colliding pairs for current and projected volume | Expected pairs effectively zero, or uniqueness enforced by a table | Lengthen the output or switch to a checked lookup table |
| T10 Recipient separation | Pseudonymize one input under two recipient keys | Outputs differ, so two recipients cannot join copies | Issue a separate key per recipient and rotate it per agreement |
Running the join parity check before anything leaves your systems
Join parity is the single most informative check, because it measures the damage directly. If the help desk table joined to the billing table on original keys returns 412,000 rows and the same join on pseudonyms returns more, some pseudonym is standing in for more than one entity; if it returns fewer, something split.
Run it where the crosswalk lives, inside your own environment, and never ship the crosswalk or the key. NIST's glossary describes pseudonymization as a type of de-identification that removes the association with a data subject and adds an association between the subject's characteristics and one or more pseudonyms; that added association is what the crosswalk records, and whoever holds it can reverse the process.
- List every join a buyer is expected to make, including joins across releases if deliveries will be incremental.
- For each join, record row counts, distinct parent keys and the maximum number of child rows per parent using original keys.
- Repeat with pseudonyms only and compare the three numbers; any difference is a finding, not a rounding issue.
- For each mismatch, pull the pseudonym with the largest change and inspect its original keys inside your environment.
- Record the before and after counts in the release notes so a buyer can see that the check was run and what it found.
Worked example: a help desk and billing export that shared a customer number
This example is illustrative; the counts are invented to show the method, not drawn from a real company. A field service company prepares five years of Zendesk tickets and NetSuite invoices for licensing. Tickets reference the requester's email; invoices reference a customer number. The first pseudonymization pass hashes each identifier with one key and no namespace.
The cluster size check fails first: one pseudonym owns 2,310 tickets, about 3 percent of the archive. Its input is an empty string, because tickets created by phone had no requester email. Three more large clusters trace back to support@, billing@ and a former office manager's shared mailbox.
Namespace scoping then fails for 37 values. Small integers such as 1001 appear both as Zendesk user IDs and as NetSuite customer numbers for different businesses, and the unscoped hash fused them. Join parity confirms the damage: the ticket-to-invoice join returns 1.8 percent more rows on pseudonyms than on original keys.
After the fix, empty and role inputs receive null or role tokens, inputs carry a system and entity prefix, and phone-keyed records are split by validity period. Join parity matches exactly, the largest cluster drops to 140 tickets for a genuinely busy customer, and attribute conflicts fall to 9 records, each reviewed and explained in the release notes.
Which identifying combinations survive a collision-free pseudonym?
A pseudonym that never collides still leaves everything around it. Consistent pseudonyms let a recipient assemble a long, rich profile per person, and that profile can be distinctive even without a name: a rare job title, a small town, an unusual sequence of purchases, a voice on a call recording or a signature block in an email body.
So treat the collision test as necessary but not sufficient. Pair it with a residual risk review of quasi-identifiers and free text, and remember that modalities linked to the same pseudonym multiply what can be learned. Under HIPAA, for instance, HHS guidance permits hashed codes only under expert determination with the keys withheld, which is a statement about the whole dataset, not just the identifier column.
- Free text that names the person, their colleagues or their address despite a clean identifier column.
- Quasi-identifiers such as birth year, ZIP code, job title and tenure that combine into a unique profile.
- Linked audio, images or documents where the person can be recognized directly.
- Long event histories whose timing alone matches a known public event or a recipient's own records.
Deliberate merges, and the findings that should halt a release
Sometimes one identifier for several people is the correct design. A household account, a shared company login or a departmental mailbox is a real entity in the source system; model it as its own entity type with its own token, and document it, so no one mistakes it for a person.
Other findings should stop the release until a privacy specialist and a data owner have reviewed them. A legacy dataset that already contains truncated hashes but no crosswalk cannot be tested for injectivity at all. Attribute conflicts that persist after splitting recycled identifiers suggest a matching rule that is merging people. And any pseudonym derived from personal data without a secret key should be replaced before delivery, not explained in a footnote.
What a licensing review asks about your identifiers
A licensing review wants to know three things about identifiers: how pseudonyms were assigned, whether they can collide or be reversed by the recipient, and whether the joins a buyer will rely on behave the same as in your systems. The test results above answer all three without sharing the crosswalk or the key.
At SourceX, the company approves the scope and terms and signs the agreement before any data is delivered, and de-identification is carried out by SourceX through approved processing routes, so the identifier design is settled with your team before anything moves. Whether your records qualify is answered by a short company assessment, before any identifier or file is shared.
Frequently asked questions
Is a pseudonym collision the same thing as a hash collision?
Not usually. A cryptographic hash collision means two different inputs produce the same output, which is vanishingly rare with full-length modern hashes. More often, pseudonym collisions happen because two people reach the pseudonymizer with the same input, such as an empty email field, or because the output was truncated.
Can SHA-256 or HMAC pseudonyms collide?
At full length, accidental collisions between distinct inputs are not a practical concern for business volumes. They become one when the output is cut to a few characters, or when distinct people share an input. HMAC adds a secret key, which stops outsiders from recomputing pseudonyms but does not fix shared inputs.
Should we keep the crosswalk after delivery?
Keep it only if you need it for later releases, corrections or deletion requests, and then store it separately with restricted access. Whoever holds the crosswalk or key can reverse the pseudonyms, so it never travels with the dataset. Your retention decision belongs in the agreement and your own retention policy.
Does a collision-free pseudonym make the dataset anonymous?
No. It means each pseudonym corresponds to one real entity, which is a quality and disclosure safeguard. The surrounding fields, free text and linked media can still identify people, so a separate residual risk review is needed.
How often should the collision test run?
Run it on every release, and again whenever a source system, a matching rule, the key or the pseudonym length changes. Incremental deliveries also need a cross-release check so the same person keeps the same pseudonym and no new person inherits an old one.
Sources
- The FCC operates a Reassigned Numbers Database because telephone numbers are reassigned, and providers must age permanently disconnected numbers for at least 45 days before reassignment. Source
- ENISA's 2021 report describes the counter as a simple technique suited to small, simple datasets and says that with a keyed MAC the identifiers and pseudonyms cannot be mapped without the key. Source
- An ENISA 2019 workshop summary lists negligible collision probability among the technical features that support successful pseudonymisation. Source
- Python's standard hmac module implements the HMAC algorithm described by RFC 2104, computed with a secret key. Source
- HHS guidance allows a re-identification code only if it is not derived from or related to information about the individual, and permits cryptographic hash values under expert determination when the keys are not disclosed. Source
- NIST defines pseudonymization as de-identification that removes the association with a data subject and adds an association between the subject's characteristics and one or more pseudonyms. Source
- Splink's evaluation guide advises checking the largest clusters, since one person appearing hundreds of times usually signals false positive links. Source
See if your company qualifies
A short company assessment. No data uploads are needed.