> ## Content Index
> Fetch the complete content index at: https://globalfeed.ai/llms.txt
> Use this file to discover other available public pages before exploring further.

# Half a second for a million characters: how does Protegrity's open model find personal data?
- URL: https://globalfeed.ai/en/half-a-second-for-a-million-characters-how-does-protegritys-open-model-find-personal-data/
- Published: 2026-11-17T01:43:47.000Z
- Updated: 2026-11-17T01:43:47.000Z
- Description: Protegrity-PII labels names, phone numbers, IBANs and ID numbers across 69 types. We explain how it works, how it was trained and how to try it yourself.
- Author: GlobalFeed Editor
- Tags: Protegrity, PII, Open Model, Hugging Face, privacy, dil-en, elle

Any team that wants to hand a support transcript, a patient note or a loan application to an AI agent runs into the same question first: what finds and masks the names, phone numbers, IBANs and ID numbers inside, quickly and without missing any? Data security company Protegrity has put its answer on Hugging Face. [Protegrity-PII](https://huggingface.co/Protegrity/protegrity-pii?ref=globalfeed.ai) labels personal data in text across 69 entity types and, by the company's measurement, scans a million characters in half a second on a single GPU.

Version 1.0.0 was released on 27 October and the model card was last updated on 13 November. It comes with a [technical report](https://arxiv.org/abs/2610.30518?ref=globalfeed.ai) dated 21 October and a new benchmark called PII-SCOPE. Below we explain how PII detection works, how the model was trained and how to try it on your own machine.

## How PII detection works

Pattern matching catches emails and IBANs easily, but no pattern can tell that a first name in a sentence is a person. Learned models read the context instead. Protegrity-PII is a token classifier: the text is split into tokens and each token gets a BIO tag, where B marks the beginning of a PII span, I marks its continuation and O marks ordinary text. With 69 types, that is 139 possible tags per token. A Viterbi decoding step then turns the tag sequence into spans such as "a phone number runs from this character to that one." The taxonomy covers names, contact details and address parts, IBAN, BIC, card numbers, CVV codes, passport and driver's license numbers, medical record numbers, health conditions, genetic and biometric data, crypto addresses, IP and MAC addresses, usernames and passwords, plus GDPR special categories such as political opinion and religious belief.

## How it was trained

**Backbone.** The model is built on the multilingual XLM-RoBERTa base encoder with a linear classification head, 277.6 million parameters in total, trained with token-level cross entropy. Long documents are split into overlapping 512-token windows.

**Data.** Training used about 1.2 million purely synthetic texts from Protegrity's LLM-based generation pipeline, with no real personal data. About 61% of examples are English, the rest Spanish, Portuguese, German, French, Italian and Dutch, drawn from HR, finance, healthcare, legal, retail, insurance and IT scenarios. The team says it first tried off-the-shelf detectors and models trained on public PII datasets, and neither met its coverage needs. The report explains why: many public synthetic sets contain real PII that was never labeled, which it calls overgeneration and finds most often in SPY. PII-SCOPE is also denser, with 13.17 entities and 7.60 distinct types per row against 8.15 and 5.44 for Nemotron-PII.

**Pruning, distillation and calibration.** For production speed, layers are pruned by block importance, then a frozen teacher model is distilled into the smaller student. Finally, because missing PII costs far more than over-masking and recall cannot be trained on directly, the team sets a decision threshold after training that maximizes precision above a recall floor. Users can tune that threshold for their own data.

## What the numbers say

On the 8,030-example PII-SCOPE set the model card reports typed recall of 0.910 at 0.902 precision; the report's version gives 0.915 and 0.907 on 9,716 rows. In the same test AWS Comprehend reaches 0.465, GLiNER2.5 Multi 0.429, OpenAI Privacy Filter 0.387, Microsoft Presidio 0.386 and Rampart 0.307, partly because several of them do not support all 69 types. Claude Fable 5, included as a frontier reference, scores 0.848 and leads on several public sets: 0.783 against 0.696 on AI4Privacy and 0.676 against 0.500 on Gretel. Protegrity-PII's edge is speed and cost: 0.49 seconds and $0.0005 per million characters with batched inference on an RTX 6000, against $1.00 for AWS Comprehend and $11.65 for Fable 5\. All comparisons are Protegrity's own.

## How to try it

The repository is gated with automatic approval after you accept the terms on Hugging Face. The license is a slightly modified Apache 2.0\. Run `hf download Protegrity/protegrity-pii --local-dir protegrity-pii`, then `pip install -r requirements.txt` and `python inference.py --text "Contact Jane Doe at jane.doe@example.com"`. It uses a GPU when available and also runs with `--device cpu`. The card recommends tuning the threshold, adding validators such as Luhn checks for cards and check digits for IBANs, and normalizing text with Unicode NFKC. Recall is highest in English and Spanish, Portuguese has not been evaluated, training code is not released, and quasi-identifiers are not flagged.

Sources: [Hugging Face model card](https://huggingface.co/Protegrity/protegrity-pii?ref=globalfeed.ai), [Protegrity-PII technical report (arXiv)](https://arxiv.org/abs/2610.30518?ref=globalfeed.ai), [Protegrity benchmark page](https://www.protegrity.com/pii-detection-benchmark?ref=globalfeed.ai)