Open-Source PII Filters Leak in Majority of Synthetic Work Documents, Benchmark Finds
Key Facts
- Vladimir Beskorovainyi benchmarked five open PII tools plus a regex baseline on 1,000 synthetic documents per language in Russian and UK English.
- The tools were pii-guard, GLiNER Guard Omni, Microsoft Presidio, OpenAI privacy-filter and Prompt Anonymizer.
- On the held-out set, the share of documents with at least one surviving value ranged from 58.3% for GLiNER Guard Omni on UK English to 99.6% for the same tool on Russian.
- Counting only the data types each tool claims to support, the best results were pii-guard at 31.5% on Russian documents and OpenAI privacy-filter at 33.0% on UK documents.
- Numbers written in words, with dots or with typos drove many pii-guard misses, while UK tools leaked even on documents with ordinary number formats.
- The author's pii-roundtrip engine left 0.3% of Russian and 0.2% of UK documents with a leak, but it missed the pre-registered Russian name-restoration threshold in version 0.5.0.
A document sent to a large language model does not need a full customer record to create a privacy problem. A name, a passport number or a bank account is enough. The usual safeguard is reversible pseudonymisation: replace the sensitive values with placeholders, send the cleaned text, then restore the values locally when the answer comes back.
That safeguard is only as good as the filter doing the detection. A pre-registered benchmark of five open-source PII tools found that, on synthetic work documents, most left at least one original value in the majority of files.
Vladimir Beskorovainyi, who also built a competing engine called pii-roundtrip, ran the benchmark. The conflict is disclosed. The document set, thresholds and stopping rule were published before the run.
The test
The benchmark covered pii-guard, GLiNER Guard Omni, Microsoft Presidio, OpenAI privacy-filter and Prompt Anonymizer, plus a regular-expression baseline with checksums. Each tool ran on the same held-out set: 1,000 synthetic documents per language, in Russian and UK English.
The documents looked like work: contracts, certificates, letters, HR files and hospital discharge summaries. About 40% contained numbers written in a hard format, such as words instead of digits, dots instead of spaces, or typos. UK English was included because it has identifiers such as NHS numbers and National Insurance numbers.
What the tools did
The synthetic work documents were harder. This table shows the share of documents where at least one original value survived cleaning, counting all data types including organization names. Lower is better.
| Tool | Russian | UK English |
|---|---|---|
| pii-guard | 60.8% | Not supported |
| GLiNER Guard Omni | 99.6% | 58.3% |
| Microsoft Presidio | 87.1% | 61.1% |
| OpenAI privacy-filter | 97.0% | 81.1% |
| Prompt Anonymizer | Not supported | 100.0% |
| Regex with checksums | 100.0% | 100.0% |
| pii-roundtrip (author’s engine) | 0.3% | 0.2% |
The regex baseline looks only for numbers, emails and phone numbers, so names and addresses survive in every document. Prompt Anonymizer is built for Japanese data and has no NHS or National Insurance recognizer, so its 100% says it does not fit the task.
The all-types comparison is also unfair to tools that never claimed to detect organization names. Counting only supported types, the best results were pii-guard at 31.5% on Russian documents and OpenAI privacy-filter at 33.0% on UK documents. Even then, the best tool left personal data in about one document in three.
The failure modes differed. Most pii-guard misses came from numbers written in words, with dots or with typos; the UK tools also leaked on documents with ordinary number formats.
The author’s engine
The author’s engine, pii-roundtrip, was built on pii-guard for Russian and GLiNER Guard Omni for both languages. He added checksum validation, rules for long numbers and numbers written in words, context-based detection for organizations and dates of birth, and consistency across a document. Placeholders carry a type, such as [NHS_1], and the mapping is stored in a local encrypted vault.
On the same held-out set, the engine left an original value in 0.3% of Russian and 0.2% of UK documents. The strict count, where any partly hidden value counts, was 0.8% and 0.2%. It did not achieve that by hiding everything: 98.4% of the spans it hid in Russian documents and 99.8% in UK documents touched personal data.
It still missed the restoration threshold for Russian names. In version 0.5.0, name placeholders came back correctly in 94.6% of cases for the weaker of two local models, against a 99% threshold. The cause was an inflection bug: the engine handed surnames to pii-guard’s inflector, which parsed “Kharitonov” as a form of the first name “Khariton” and returned “Kharitony.”
The author left the failed verdict in the preprint and the README. Later versions fixed the inflection and reached 99.3% on the stored answers, but those results are marked as reference only because the held-out set had already been seen.
What it means
The benchmark does not prove open-source PII filters are useless. Detection quality varies sharply by language, identifier type and document format; a filter can look adequate on clean data while missing values people actually write.
Test the filter on your own document types. Include the formats your users produce: numbers in words, separators, initials, local identifiers and converted text. Measure detection and restoration, because a placeholder that comes back wrong can corrupt an answer even when no data leaked.
Keep the mapping local and encrypted. The point of reversible pseudonymisation is that the real values never leave the machine. A cloud-based vault changes that threat model.
Treat the filter as a damage limiter, not a guarantee. The best supported-type result still left data in about one document in three. A filter that catches most identifiers reduces exposure; it does not make an untrusted model a safe place for a complete customer file.
The limits
All evaluation data were synthetic and came from the project’s generator. Held-out sets protect against tuning to specific documents, not against tuning to the generator’s style. The other tools were never tuned on this data, while the author’s engine was developed on earlier sets from the same generator.
The engine was not tested on real documents. The round trip used two local models, qwen3.5:9b and gemma4:12b; large cloud models may treat placeholders differently. The author ran the benchmark himself, which is why the code, data, predictions and raw model answers were published for re-checking.
Those limits do not erase the central finding. Five open tools, measured against thresholds set before the run, did not reliably remove personal data from documents that looked like ordinary work. The gap between a demo and a deployment is where the leaks live.
Sources & References
- Preprint describing the pii-roundtrip engine and the held-out evaluation. https://arxiv.org/abs/2610.34012
- Public repository with the benchmark code, data, predictions and model answers. https://github.com/beskvladimir-create/pii-roundtrip
- Archived research artifact with a persistent DOI. https://doi.org/10.5281/zenodo.23478192
Analyst-reviewed briefings on active exploitation, ransomware operations, nation-state campaigns, and the threat intelligence that connects them.
Security Digest
The most important cybersecurity stories, CVE alerts, and threat intelligence — one concise email. Unsubscribe anytime.
Related Articles
Google Shor's Algorithm Obfuscation Broken: LLM Crowdsourcing Outperforms ZKP-Verified Benchmark by 44%
An open-source contest utilizing Large Language Models (LLMs) has successfully reverse-engineered and optimized Google Quantum AI's restricted Shor's algorithm circuit optimization, exceeding Google's obfuscated benchmark by 44.0%.
Best Cloud SaaS Governance Practices from CSA
Introduction Infrastructure as Service security is almost always the focus when discussing cloud security. platforms as a service (PaaS) and infrastructure as a service (IaaS). In spite of the fact...
Revolut Data Breach: Tens of Thousands Affected
Over the weekend, the financial technology company Revolut was the victim of a 'highly targeted' cyberattack in which threat actors gained access to the personal data of 0.16% of its users (approxi...
$3,500 for Starbucks Data with PII for Sale
The Straits Times discovered that 330,000 Singaporean Starbucks customers' personal information had been compromised and sold on an online forum since September 10. On Friday, the coffee chain sent...