You need to agree to share your Hugging Face information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

PII Tagger HIPAA Large

A 440M-parameter GLiNER span tagger (DeBERTa-v3-large) for the identifiers HIPAA's Safe Harbor method lists, in clinical text. It gives their exact positions and writes no text. Beyond the small HIPAA model's labels, it is also asked for dates, ages over 89 and unique characteristics, which only rules looked for before.

It is one of three readers in veil's larger HIPAA system, for libraries and servers. The other two are Deerpark/pii-tagger-hipaa (45M) and the listing reader Deerpark/pii-lister-hipaa. The figures below are for the three together, beside veil's HIPAA rules; it wasn't chosen to be used alone.

Use

from gliner import GLiNER

model = GLiNER.from_pretrained("Deerpark/pii-tagger-hipaa-large")

LABELS = ["name", "street address", "postcode", "email address", "phone number", "ssn", "account number",
          "credit card number", "iban", "swift code", "date of birth", "customer id", "employee id", "username",
          "passport number", "driver license number", "tax id",
          "employer", "town or county", "other identifying number", "date", "age over 89", "unique characteristic"]
model.predict_entities(text, LABELS, threshold=0.20)
  • Ask with these label names. The last six are this model's own (veil_labels in gliner_config.json); it is asked for town or county instead of city. Medical record and health plan numbers come back as customer id.
  • 0.20 is the threshold chosen on dev for the three readers together.
  • Give it up to about 200 words at a time, split on whole lines.

In veil, HipaaLargeRedactor runs it with the other two readers beside the HIPAA profile's rules.

Results

The three readers with veil's HIPAA rules, scored once on a sealed test of 960 agent-written clinical documents (10,955 identifiers), written before any of them was trained. Found: every word of an identifier hidden. Audited: blind reviewers ruled on every miss, and a mark they judged not an identifier, or a miss that left only a label or article showing, is corrected. Other words hidden: of the words no mark covers.

System Found Found, audited Documents fully de-identified Other words hidden
rules + pii-tagger-hipaa 97.05% 98.32% 73.4% 3.92%
rules + the three readers 99.32% 99.87% 92.6% 4.45%

Found rose by 2.27 points (+1.96 to +2.59; 2,000 resamples of documents). Counting the six debatable misses as found, the audited figure is 99.93%. On dev, this tagger with the rules alone found 99.51%, against 98.61% for the rules with the small model, while hiding fewer other words (4.27% against 4.76%). That option wasn't tested on the sealed test.

Every test document is agent-written, as the training documents are; how this carries to real notes hasn't been measured.

Training

From knowledgator/gliner-pii-large-v1.0, four 500-step segments, each continuing the last (batch 8, learning rates 1e-5 and 2e-5, focal loss 0.75 and 2, bf16). 15 of the 2,000 batches were skipped because they didn't fit in GPU memory. The training mix:

  • Agent-written clinical documents (1,600 from the training writers, less 3 too close to a test, plus a spent sealed test of 960, less 6), each taken twice: discharge summaries, emergency and EMS notes, clinic notes, letters, lab and device reports, nursing and hospice notes, billing and claims, patient messages, in English and some Spanish, with every identifier marked; all invented. No training document shares more than a fifth of its 8-word runs with any dev or test document.
  • The same documents in capitals or OCR-misread.
  • Nemotron-PII's healthcare and pharmaceutical documents (train split), © NVIDIA, CC BY 4.0.
  • Case reports from the PubMed Central open-access subset, under CC BY or CC0. Each article remains under its own licence; the list of PMCIDs and licences is in veil's repository (benchmarks/train/clinical/pmc_raw/reports.jsonl).
  • Replay: a third of the mix, round 7's training chunks and judged chat turns, so the general labels stay found.

The protocol, the data and the scripts are in veil's repository (benchmarks/judged/PROTOCOL.md, "A larger HIPAA model"; benchmarks/hipaa_large.py).

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Deerpark/pii-tagger-hipaa-large

Finetuned
(4)
this model

Dataset used to train Deerpark/pii-tagger-hipaa-large