Downloads · 30 days
12
1% of all-time downloads
bharathjanumpally/phi-leak-checker-deberta-v3
phi-leak-checker-deberta-v3 is a text classification model from bharathjanumpally. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
phi-leak-checker-deberta-v3 is a text-classification model that predicts whether input text still appears to contain Protected Health Information (PHI) after redaction, or whether it should be reviewed before downstre…
Downloads · 30 days
12
1% of all-time downloads
All-time downloads
1.6K
Public
Parameters
82.1M
986 MB on disk
Likes
0
Public
Click a slice to open those files.
.pt657 MB · 50%
From the Hugging Face model README
phi-leak-checker-deberta-v3 is a text-classification model that predicts whether input text still appears to contain Protected Health Information (PHI) after redaction, or whether it should be reviewed before downstream use.
It is intended to act as a second safety gate in privacy-first workflows such as:
Recommended pipeline:
SAFE, REVIEW, and UNSAFE differently in your applicationCompanion model:
bharathjanumpally/phi-span-detector-deberta-v3
config.json: RobertaForSequenceClassificationSAFE, REVIEW, UNSAFE| Label | Meaning | Recommended action |
|---|---|---|
SAFE | no obvious PHI detected or text appears properly redacted | allow to proceed |
REVIEW | ambiguous or partially redacted content remains | flag for human review or stricter automated policy |
UNSAFE | PHI likely remains in the text | block, quarantine, or re-redact |
Conservative production policy:
SAFEREVIEWUNSAFEThis model was trained on synthetic text to keep the project openly shareable.
High-level recipe:
SAFEREVIEWUNSAFEThis gives useful supervision without real patient data, but real internal text may differ from the training distribution.
Appropriate uses:
Not intended for:
REVIEW should not be treated as equivalent to SAFE; it is best used as a cautionary middle state.Recommended mitigations:
from transformers import pipeline
clf = pipeline(
"text-classification",
model="bharathjanumpally/phi-leak-checker-deberta-v3",
)
text = "Patient John Smith MRN 001-23-4567 visited on 12/19/2025."
print(clf(text))
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
model_id = "bharathjanumpally/phi-leak-checker-deberta-v3"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
clf = pipeline(
"text-classification",
model=model,
tokenizer=tokenizer,
)
print(clf("Patient [NAME] MRN [ID] visited on [DATE]."))
from transformers import pipeline
clf = pipeline(
"text-classification",
model="bharathjanumpally/phi-leak-checker-deberta-v3",
)
texts = [
"Patient John Smith MRN 001-23-4567 visited on 12/19/2025.",
"Patient [NAME] MRN [ID] visited on [DATE].",
"Call me after the appointment if the labs are delayed.",
]
for result in clf(texts):
print(result)
from transformers import pipeline
clf = pipeline(
"text-classification",
model="bharathjanumpally/phi-leak-checker-deberta-v3",
)
result = clf("Patient [NAME] MRN [ID] visited on [DATE].")[0]
if result["label"] == "SAFE":
action = "allow"
elif result["label"] == "REVIEW":
action = "review"
else:
action = "block"
print(result, action)
A practical downstream schema is:
{
"label": "REVIEW",
"score": 0.91,
"action": "review"
}
Use the label as the primary decision, then tune around confidence if needed:
SAFE: allow by default, optionally require a higher score threshold in stricter environmentsREVIEW: route to human review, re-redaction, or stricter regex cleanupUNSAFE: quarantine or block from logging, storage, or LLM submissionExample stricter policy:
SAFE -> reviewREVIEW -> reviewUNSAFE -> blockThis repository currently publishes the model weights and config, but not a full uploaded evaluation report artifact. If you use this model seriously, validate it on an internal test set with representative formatting and document the operational thresholds you choose.
This model was trained on synthetic data and is published for research and tooling purposes. Do not send real PHI to public endpoints or public demos. Use private infrastructure and organization-approved evaluation practices for real deployments.
@misc{janumpally_phi_leak_checker_2025,
title = {PHI Leak Checker (Synthetic)},
author = {Bharath Kumar Reddy Janumpally},
year = {2025},
publisher = {Hugging Face},
howpublished = {Model on Hugging Face}
}