Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
  1. Home
  2. Blog
  3. Anonymising Training Data: What Actually Works
AI & Machine Learning

Anonymising Training Data: What Actually Works

Removing names is not anonymisation. What re-identification risk means in practice, the techniques that genuinely reduce it, and what they cost in accuracy.

Updated 2 min readBy SpiderHunts Technologies

Free estimateNo obligation

Get a free estimate

Tell us what you need. A senior engineer reads every enquiry.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →

Quick answer — TL;DR

Stripping direct identifiers leaves data that is often re-identifiable from combinations of ordinary fields. Genuine anonymisation costs some accuracy; pseudonymisation is easier but remains personal data. Decide which you need before designing the pipeline. General guidance, not legal advice.

Removing the name is not enough

The common approach is to drop name, email and address, and treat what remains as anonymous. It usually is not. Combinations of ordinary attributes are surprisingly identifying - a postcode district, a date of birth and a gender narrows most populations very sharply.

For business data the equivalent combinations are just as strong: a customer's sector, region, size band and the date of their first order may identify exactly one account.

Pseudonymisation and anonymisation are different

PseudonymisationAnonymisation
IdentifiersReplaced with a keyRemoved, with re-identification prevented
ReversibleYes, by whoever holds the keyNo
Still personal dataYesNo, if genuinely achieved
Analytical valueLargely preservedReduced
EffortLowConsiderable

Most projects that describe their data as anonymised have in fact pseudonymised it, which is a perfectly legitimate control but does not remove the data protection obligations. Being clear about which you have done matters.

Techniques that genuinely reduce risk

  • Generalisation - replace exact values with bands: age ranges, postcode area rather than full code, month rather than date.
  • Suppression - remove records or values that are unique enough to identify someone.
  • Aggregation - train on group-level data where the model does not need individuals.
  • Noise addition - perturb values, formalised in differential privacy with measurable guarantees.
  • Minimum group size - ensure every combination of quasi-identifiers covers at least several individuals.

Each costs some information, and how much depends on the problem. Generalising dates to month may cost nothing in a model about annual patterns and a great deal in one about weekday behaviour.

Check re-identification rather than assuming

Test the result. Count how many records are unique on the combination of remaining fields - if a meaningful share are, the data is not anonymous whatever it is called.

Do this with someone motivated to break it rather than the person who built the pipeline. It is a quick check and it consistently finds more than expected, particularly in business data where the population is small.

Models can leak their training data

Anonymising the input is not the whole story. Models can memorise, and in some circumstances outputs reveal information about training records - particularly large models trained on small datasets, or any model that reproduces text.

Where the training data is sensitive, that risk needs considering alongside the input pipeline. It is another argument for holding only the data the model genuinely needs, which is the most reliable protection available. Our note on privacy-preserving techniques covers the options.

If a single row is unique across the fields you kept, you have not anonymised anything.

FAQ

Frequently asked questions

The questions readers ask us after this guide.

Still have a question?

Ask us directly — a senior engineer will get back to you.

Ask about your project

Is hashing an identifier enough?

No. A hash is pseudonymisation - deterministic and reversible by guessing inputs where the space is small, as it is for phone numbers or emails.

How much accuracy will we lose?

It depends on whether the generalised fields carried the signal. Test it - sometimes the loss is negligible, sometimes the model stops working.

Can we train on anonymised data and predict on real data?

Only if the transformations are consistent. A model trained on age bands cannot take exact ages at prediction time without the same banding applied.

Is synthetic data a solution?

Sometimes, though poorly generated synthetic data can leak information about the real records it was derived from. It needs the same scrutiny.

Keep reading

More on AI & Machine Learning

Start here

Want machine learning project details from us?

Tell us what you are trying to predict and roughly what data you hold. We will come back with an honest view on whether machine learning is the right tool, what the work would involve and a realistic cost range. If a spreadsheet would do the job, we will say so.

  1. You tell us what you needTwo minutes on the form, or a message on WhatsApp.
  2. A senior engineer reviews itAnd comes back with questions, a realistic range and an honest view on fit.
  3. Free 30-minute scoping callWe talk through scope, options and a realistic estimate — with no obligation.
Free estimateNo obligation

Talk to someone who builds this

Send a short brief and we will come back with an honest view and a realistic range.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →