Back to BlogHealthcare

PHI Detection: Snow Labs 96% vs GPT-4o

Not all de-identification tools are equal. ECIR 2025 benchmarks show F1 scores from 79% to 96%. Learn why accuracy matters and how to evaluate tools.

February 24, 20267 minute read
PHI detectionde-identificationNER accuracyHIPAAbenchmarks

Updated for 2026

Not All De-Identification Tools Are Equal

Accuracy is the only metric that matters for PHI de-identification. A 4% gap looks small. On one million records, that is 40,000 exposed patients.

ECIR 2025 benchmarks show wide accuracy gaps across leading tools. These results should shape every healthcare buying decision.

ECIR 2025 Benchmark Results

<!-- VERIFIED-EXTERNAL: John Snow Labs ECIR 2025 Text2Story Workshop paper -->
ToolF1-ScorePrecisionRecall
John Snow Labs96%95%97%
Azure AI91%90%92%
AWS Comprehend Medical83%81%85%
GPT-4o79%82%76%

F1-score blends two things. Precision: how many flagged items were real PHI. Recall: how many real PHI items were found.

  • Low precision means over-redaction and lost context.
  • Low recall means missed PHI — a breach.

Why the Gap Exists

Training Data Matters

John Snow Labs trains on clinical notes. These notes are messy and full of short forms. GPT-4o trains on a broad mix of text. It was not built for clinical data.

ToolTraining Focus
John Snow LabsHealthcare-specific, clinical notes
Azure AIGeneral medical + clinical
AWS Comprehend MedicalGeneral medical entities
GPT-4oBroad training, not healthcare-specific

Entity Coverage Varies

Not every tool finds the same PHI types.

EntityJohn SnowAzureAWSGPT-4o
Patient namesYesYesYesYes
Medical record numbersYesYesLimitedLimited
Medication dosagesYesYesYesPartial
Procedure codesYesYesLimitedNo
Clinical abbreviationsYesPartialNoPartial
Family member namesYesYesPartialPartial

Context Is Hard to Get Right

Take this clinical note:

"Patient reports taking Smith's medication. Dr. Johnson recommends increasing the dose."

A good PHI tool must do three things here:

  1. Read "Smith" as a brand name, not a patient.
  2. Flag "Dr. Johnson" as a provider name to redact.
  3. Know "Patient" is a role label, not a name.

GPT-4o misses these cases. That pushes recall to 76%.

The Cost of Low Accuracy

Going from 79% to 96% cuts exposure by 170,000 records per million processed.

<!-- VERIFIED: arithmetic derived from ECIR 2025 benchmark figures -->
AccuracyRecordsPHI Exposure
96%1,000,00040,000
91%1,000,00090,000
83%1,000,000170,000
79%1,000,000210,000

HIPAA Penalties Scale With Exposure

<!-- VERIFIED-EXTERNAL: HIPAA Journal penalty tiers / 45 CFR 160.404 -->
TierCausePenalty Per Violation
1Unaware$100–$50,000
2Reasonable cause$1,000–$50,000
3Willful neglect, corrected$10,000–$50,000
4Willful neglect, uncorrected$50,000+

Picking a 79% tool when 96% tools exist may be willful neglect under HHS rules. The gap is known. A better tool is on the market.

How a Hybrid Pipeline Raises Accuracy

No single method finds all PHI types. A hybrid pipeline stacks methods. Each one fills the gaps the others leave.

Input Text
    ↓
[Regex Patterns] — Structured data: SSN, MRN, dates
    ↓
[spaCy NER] — Names, locations, organizations
    ↓
[Transformer Models] — Context-dependent entities
    ↓
[Medical Dictionaries] — Healthcare-specific terms
    ↓
Merged Results (highest confidence wins)
MethodStrengthsWeaknesses
RegexPerfect for structured dataNo context handling
spaCyFast, common entitiesLimited medical vocab
TransformersContext-aware, high recallSlower
DictionariesFull medical termsStatic, needs updates

Each method catches what the others miss. See how this works in the security compliance page and legal conformance docs.

Questions to Ask Any Vendor

Before you sign, ask five things:

  1. What F1-score on clinical notes? Get third-party data. Reject vague claims.
  2. Which entity types? All 18 HIPAA Safe Harbor identifiers must be covered.
  3. How do you handle abbreviations? "Pt," "Dx," and "Hx" need correct resolution.
  4. Do you catch family member PHI? "Mother has diabetes" is PHI. Many tools miss it.
  5. Do you support all note formats? Progress notes, discharge summaries, and radiology reports differ a lot.

Red flags to watch for:

  • No specific accuracy numbers
  • Testing only on clean, structured data
  • No healthcare training data
  • Few entity types
  • No HIPAA Safe Harbor validation

Testing Tools Yourself

Run your own test in four steps.

Step 1 — Build a dataset. Use de-identified notes from many specialties. Cover all 18 HIPAA types plus edge cases like short forms and family names.

Step 2 — Set a gold standard. Experts mark every PHI item with type and exact span.

Step 3 — Run each tool. Compare output to the gold standard. Score precision, recall, and F1.

Step 4 — Break down failures. Group misses by type, context, and format. This shows where each tool fails.

Conclusion

ECIR 2025 data is clear. A 17-point gap — 96% versus 79% — means 170,000 extra exposed records per million. Tool choice is the biggest risk variable at scale.

When you pick a PHI detection tool:

  • Require specific accuracy data on clinical text
  • Confirm full HIPAA Safe Harbor coverage
  • Test on your own document formats
  • Choose hybrid pipelines over single-method tools

Read how tokenization works in the token system docs. Common questions are in the FAQ.


anonym.legal replaces PHI with tokens before documents reach any AI tool. Names, dates, and record numbers are swapped on your side. Results come back with real details restored — only for you. Explore pricing.

When This Approach Has Limits

Choosing a high-accuracy detector materially lowers PHI exposure, but a benchmark score is not a compliance guarantee. Read the numbers with these caveats:

  • Even 96% F1 leaves a gap. A leading tool still misses roughly 4 in 100 PHI items, and on a million records that is tens of thousands of exposures. High accuracy reduces the residual; it never reaches zero. A human review step on sensitive output is still warranted.
  • Benchmark conditions rarely match your data. ECIR 2025 scores come from specific corpora and annotation rules. Your specialties, dictation styles, OCR quality, and note formats can move real-world accuracy up or down. The only number that should drive your decision is one measured on documents like yours — which is why the self-testing steps above matter.
  • Accuracy is not the same as de-identification. HIPAA Safe Harbor and Expert Determination are legal standards. A high F1 across the 18 identifier types supports them, but confirming a dataset actually meets either standard — including residual re-identification risk from rare conditions or small cohorts — is a compliance judgment, not a model output.
  • Scores drift. Vocabulary, drug names, and note conventions change, and a model that benchmarked at 96% last year is not guaranteed to hold that today. Treat accuracy as something to re-validate periodically, not a one-time procurement checkbox.

Use these benchmarks to rule out weak tools and to frame vendor questions — then validate the chosen tool on your own records and keep a review layer for the records that matter most.

Sources

Ready to protect your data?

Start anonymizing PII with 285+ entity types across 48 languages.

About this page

We update this page when our platform or the law changes.

Read our founder note for how we work.

Each change shows up in the timestamp at the top.

We follow these rules

  • GDPR (EU 2016/679).
  • ISO/IEC 27001:2022.
  • NIS2 (EU 2022/2555).
  • HIPAA safe harbor under 45 CFR § 164.514(b)(2).

Our promise

We do not sell your data.

We do not train models on your text.

We store your files in Germany.

You can delete your account at any time.

You own your work.

Where we run

Our company HQ is in Saarbrücken, Germany. Our servers run in Hetzner's Falkenstein datacenter.

Hetzner holds ISO 27001 certification.

All data stays in the EU.

Backups run every day.

Need help?

Email support@anonym.legal.

We reply within one business day.

How we test

We run a full check suite on every release.

Each surface gets its own sweep script and report.

Human reviewers spot-check the output each week.

We track recall and precision on a labelled set.

Bad runs block the deploy.

What we never do

  • We never sell your information to third parties.
  • We never train models on what you upload.
  • We never keep your work after you delete it.
  • We never share keys with any outside firm.
  • We never run ads inside the product.

Plans in plain words

We sell credits, not seats.

One credit covers one short job.

Long jobs use a few credits each.

You can top up at any time.

Unused credits roll over each month.

Read the plans page for current rates.

Who built this

A small team of engineers and lawyers built this.

We ship from Europe and work in the open.

Our founder note spells out why we started.

Where to start

How the parts fit

A browser add-on cleans text inside Chrome.

A Word plug-in handles drafts in Office.

A small desktop tool works on whole folders.

An agent protocol link feeds large models safely.

All four share one core engine and one rule set.

Words from our team

We started this work after a lunch about cookies.

One friend kept getting odd ads on her phone.

We asked why a court file leaked through a draft.

We sketched the first build on a napkin that week.

By month three we had a tiny demo for a friend.

She used it on her first case the next day.

Common questions we hear

Can the tool read scanned PDFs? Yes, with OCR.

Does it work on long files? Yes, in small chunks.

Can I roll my own rule set? Yes, save it as a preset.

Does it run offline? The desktop build runs offline.

Do you keep my files? No, the cloud build wipes after each run.

Will it learn from my work? No, we never train on inputs.

A short tour of the workflow

Upload a file or paste a snippet of prose.

Pick the entities you want gone from the draft.

Choose a method: replace, mask, hash, encrypt, or redact.

Press run and watch the side panel show each hit.

Skim the result and tweak any rule that misfired.

Save the cleaned file or send it to a teammate.