Meddies-PII: A Multilingual Framework for Personally Identifiable Information Extraction in Clinical De-identification
Organizations: Meddies AI, Vietnam
Abstract
Multilingual PII extraction in clinical text is limited by scarce governed data and by synthetic corpora whose construction is thinly documented. We present a large multilingual dataset covering seventeen languages, including seven Southeast Asian languages, and nine PII labels. We also document a detailed generation pipeline and release the complete prompts, catalogues, checks and label maps. A compact 350M-parameter BIOES token classifier trained on the resource achieves the highest score on all fifteen public benchmarks, significantly ahead of the strongest of four public systems on fourteen of them, with a mean exact-match F1 of 0.827 against 0.672 for the strongest system. We also tested it, without adaptation, on multilingual benchmarks, including two human-annotated German and Spanish clinical-style corpora, where it is competitive with the best public systems once annotation conventions are aligned, and is best in four of ten MultiGraSCCo languages; the results show that performance transfers across public benchmarks. We also analyse the data and find almost no near-duplicates and no text overlap between training and any evaluation set. The dataset, benchmark, model, generation framework and evaluation code are planned for public release upon acceptance.
Figures & tables
| Corpus | Text origin | Lang. | Documents | Annotation | Formats | Labels | Controlled variables |
|---|---|---|---|---|---|---|---|
| i2b2/UTHealth 2014 Stubbs et al. (2015) | real clinical notes | en | 1,304 | manual | – | – | – |
| MEDDOCAN Marimon et al. (2019) | clinical case reports, surrogate PHI | es | 1,000 | manual | 1 | 7 | – |
| GraSCCo_PHI Lohr et al. (2024) | alienated clinical documents | de | 63 | manual | 1 | 7 | – |
| OpenPII Ai4Privacy (2026) | synthetic | 12 | 1,636,375 | Unknown | 1 | 19 | language, region |
| Gretel PII Gretel AI (2024) | LLM-generated | en | 60k | at generation, auto-validated | – | 42 | domain, document type |
| Nemotron-PII Steier et al. (2025) | synthetic personas | en | 100,000 | at generation | 2 | 55+ | domain, document type, locale, persona |
| Safe Harbor identifier | Our label |
|---|---|
| Names | human_name |
| Geographic units smaller than a state | address |
| Dates (except year) tied to an individual | date (no shifting) |
| Telephone; fax numbers | phone_number |
| Email addresses | email_address |
| SSN; medical record; health-plan beneficiary; account; certificate/licence numbers | id_number |
| Benchmark | Ours | OpenAI Privacy Filter | GLiNER2 | SuperClinical Large 434M | LFM2.5 Encoder 350M PII Detector |
|---|---|---|---|---|---|
| Public benchmarks | |||||
| (CredData: real source code; others synthetic) | |||||
| CredData (en) † | 0.590 | 0.584 | 0.357 | 0.149 | 0.263 |
| OpenPII (ko) | 0.739 | 0.554 | 0.322 | 0.545 | 0.460 |
| OpenPII (ja) | 0.750 | 0.549 | 0.366 | 0.493 | 0.479 |
| OpenPII (zh) | 0.816 | 0.572 | 0.453 | 0.428 | 0.548 |
| System | GraSCCo_PHI (de) | MEDDOCAN (es) | ||
|---|---|---|---|---|
| Before | After | Before | After | |
| Ours | 0.583 | 0.701 | 0.720 | 0.770 |
| SuperClinical-Large | 0.619 | 0.622 | 0.589 | 0.553 |
| GLiNER2 | 0.419 | 0.487 | 0.745 | 0.726 |
| OpenAI Privacy Filter | 0.497 | 0.580 | 0.607 | 0.655 |
| LFM2.5-Encoder PII | 0.203 | 0.217 | 0.490 | 0.525 |
| Language | Ours | OpenAI PF | GLiNER2 | SuperClinical Large | LFM2.5 PII |
|---|---|---|---|---|---|
| German ∗ | 0.583 | 0.497 | 0.419 | 0.616 | 0.205 |
| English ∗ | 0.674 | 0.477 | 0.518 | 0.776 | 0.233 |
| French ∗ | 0.715 | 0.601 | 0.516 | 0.717 | 0.237 |
| Russian ∗ | 0.713 | 0.538 | 0.502 | 0.422 | 0.201 |
| Polish | 0.647 | 0.524 | 0.451 | 0.564 | 0.206 |
| Ukrainian | 0.701 | 0.488 | 0.464 | 0.439 | 0.200 |
| Section | Content | Supports | Cited from |
|---|---|---|---|
| A. Generation Prompts | Complete system prompt (Figure 4 ; the user prompt, Figure 3 , is in Sec. 3.3) | Reproducing Stage 1–2 of the pipeline | Sec. 3.3, Sec. 1 |
| B. Preparation Catalogues | 12 document types and 11 text formats (Tables 7 , 8 ), 12 scenarios with descriptions, required labels; general-domain catalogues | What can be generated vs. what was generated | Sec. 3.3, Sec. 3.5 |
| C. Surface Perturbations | The 13 requested perturbations (Table 10 in Sec. 3.3) | Adversarial half of the benchmark | Sec. 3.3, Sec. 3.4 |
| D. Verification Checks | All 15 fatal, 2 non-fatal and 2 pre-validation checks (Table 11 in Sec. 3.3) | Scope and limits of the quality gates | Sec. 3.3, Sec. 3.5 |
| E. Ontology Mappings | Label folds of the four baselines and of the two human-annotated corpora | Scoring protocol | Sec. 5.1, Sec. 5.3 |
| F. HIPAA Coverage | Safe Harbor identifiers vs. the nine labels (Table 2 in Sec. 3.2) | Scope of the ontology | Sec. 3.2, Sec. 7 |
Appendix figures & tables25 assets
Supplementary material from the paper’s appendix.
Appendix
| # | Document type | Gloss | Rows |
|---|---|---|---|
| 1 | Discharge summary | End-of-stay summary of diagnosis, treatment and follow-up, with patient, encounter and clinician identifiers. | 30,238 |
| 2 | Outpatient note | Clinician note from a non-admitted visit (reason, findings, plan) with patient and visit details. | 19,492 |
| 3 | Lab-result notification | Message telling a patient or clinician that results are available, usually with a result link and an accession or patient ID. | 29,774 |
| 4 | Patient portal access log | System record of logins, result views and downloads with user, timestamp and session data. | 25,540 |
| 5 | Insurance claim note | Payer or provider note about a claim, with policy, member and claim identifiers and contact data. | 24,464 |
| 6 | Referral letter | Letter from one clinician to another clinician or service giving patient identity and reason for referral. | 23,634 |
| # | Text format | Bucket | Gloss | Rows |
|---|---|---|---|---|
| 1 | Plain clinical note | PLAIN_TEXT | Running prose, lightly sectioned. | 13,423 |
| 2 | Markdown sections | MARKDOWN | Headings, lists and tables in Markdown. | 29,316 |
| 3 | Messy nurse / administrative note | MESSY_NOTE | Informal note with abbreviations, fragments and inconsistent punctuation. | 36,000 |
| 4 | Table-like rows | TABULAR | Rows with delimiters or aligned columns. | 34,203 |
| 5 | JSON-like object | JSON | JSON-style key–value object; not guaranteed to be valid JSON. | 42,355 |
| 6 | FHIR-like JSON | FHIR_JSON | JSON shaped like a FHIR resource. | 25,827 |
| # | Scenario | Description | Required labels | Min. labels/spans |
|---|---|---|---|---|
| 1 | All Labels Dense | Dense administrative-medical document containing every label at least once, including a private portal URL and a secret. | all nine | 9 / 12 |
| 2 | Private Portal Secret Focus | Portal or lab-result workflow emphasizing signed links, reset tokens, OTPs, cookies or API keys, plus ordinary PII. | private_url, secret, human_name, id_number | 6 / 10 |
| 3 | Adversarial Obfuscation | Voice-scribe, OCR, chat and messy admin text with several values in hard-to-parse, language-native surface forms and 1–2 values left clean. | private_url, secret, email_address, phone_number | 6 / 10 |
| 4 | Public Negative Contrast | Patient PII tagged beside untagged public guideline dates, copyright dates and public hospital or article URLs. | private_url, secret, date, human_name | 6 / 10 |
| 5 | Structured Payload | JSON, FHIR-like JSON, HL7-like text, XML, tables or portal logs; labels only inside string values, clinical facts untagged. | private_url, secret, id_number, company_name | 6 / 10 |
| 6 | General Consumer Admin Support | Account support, billing, shipping, insurance, school, telecom or e-commerce document. | human_name, email_address, id_number | 5 / 5 |
| # | Perturbation |
|---|---|
| 1 | Spoken email symbols: write @ and . as the language’s spoken words, tagging the whole spoken form. |
| 2 | Number words: spell phone or ID digits as number-words, mixing numerals and words; tag by what the number is. |
| 3 | Phonetic spelling: spell an identifier with a NATO or native spelling alphabet. |
| 4 | Entity-internal line break: split a phone, email, URL or ID across a line break inside the tagged value. |
| 5 | Odd internal spacing inside one value ( 04 12 3 4 56 78 , j smith @ example . com ). |
| 6 | Concatenated values: run one value into an adjacent value or word with no separator; each value keeps its own exact span. |
| # | Code | Fatal | Condition (what it does and does not establish) |
| 1 | empty_output | yes | Nothing remains after stripping reasoning blocks, code fences and wrappers. |
| 2 | assistant_meta_text | yes | The first 160 characters match an assistant-preface pattern. |
| 3 | no_inline_tags | yes | The string ]< does not occur. |
| 4 | leftover_or_unknown_tags | yes | A bracketed fragment followed by a tag survives parsing (unknown label name). |
| 5 | leftover_label_marker | yes | A bare <label> marker remains in the output text. |
| 6 | malformed_leftover_label_marker | yes | A malformed marker such as <label remains. |
| System | Native labels our label | Cannot emit |
|---|---|---|
| OpenAI Privacy Filter | private_person human_name; private_address address; private_date date; private_email email_address; private_phone phone_number; account_number id_number; private_url private_url; secret secret | company_name |
| GLiNER2 (requested schema) | person, full/first/last name human_name; address, street, city, state, postal code, country address; sensitive/document/expiration/transaction date date; email email_address; phone phone_number; government/national/passport/driver’s-licence/tax ID, account number id_number; password, API key, access token, recovery code secret | company_name, private_url |
| LFM2.5-Encoder-350M-PII-Detector | 40 native types, e.g. person name, username human_name; SSN, national ID, passport, driver’s licence, tax ID, credit card, IBAN, bank account, IP, MAC, device ID, medical record, health-plan ID, case number id_number; DOB date; email; phone; address, postal code, GPS address; organisation company_name; API key, password, private key, JWT, connection string, login credentials secret; URL private_url; amount, condition, medication, religion, political, orientation, health status dropped | — |
| SuperClinical-Large-434M | generic alias table of the evaluator (108 aliases: e.g. first/last/full name, username human_name; street, city, state, country, postcode, coordinate address; hospital, organisation company_name; DOB, date/time date; …); url private_url; cvv secret | — (depends on emitted native types) |
| Our label | GraSCCo_PHI (German) | MEDDOCAN (Spanish) |
|---|---|---|
| human_name | NAME_PATIENT, NAME_DOCTOR, NAME_RELATIVE, NAME_EXT | NOMBRE_SUJETO_ASISTENCIA, NOMBRE_PERSONAL_SANITARIO, FAMILIARES_SUJETO_ASISTENCIA |
| date | DATE | FECHAS |
| address | LOCATION_STREET, _ZIP, _CITY, _COUNTRY | CALLE, TERRITORIO, PAIS |
| company_name | LOCATION_HOSPITAL, LOCATION_ORGANIZATION | HOSPITAL, CENTRO_SALUD, INSTITUCION |
| id_number | ID | ID_ASEGURAMIENTO, ID_CONTACTO_ASISTENCIAL, ID_SUJETO_ASISTENCIA, ID_TITULACION_PERSONAL_SANITARIO, ID_EMPLEO_PERSONAL_SANITARIO |
| phone_number | CONTACT_PHONE, CONTACT_FAX | NUMERO_TELEFONO, NUMERO_FAX |
| Spans | Median | Markup | Docs with | Placeholder | Bare | ||||
|---|---|---|---|---|---|---|---|---|---|
| Origin | Rows | /row | chars | spans (%) | markup (%) | 555 (%) | Seq. (%) | names (‰) | repeat (%) |
| Ours, refined | 226,546 | 16.7 | 1,144 | 4.06 | 25.2 | 8.0 | 16.6 | 48.6 | 40.4 |
| Ours, initial | 572,760 | 20.8 | 2,180 | 0.02 | 0.2 | 8.0 | 31.3 | 20.6 | 27.9 |
| CredData | 3,861 | 3.2 | 1,017 | 9.55 | 11.9 | – | – | 0.0 | 0.0 |
| Nemotron-PII | 99,885 | 6.4 | 774 | 0.04 | 0.1 | 2.8 | 3.2 | 13.2 | 4.9 |
| Gretel PII | 54,998 | 4.2 | 179 | 0.00 | 0.0 | 0.1 | 0.0 | 0.0 | 0.0 |
| Model string | Rows | Share (%) | Repaired (%) | Bad spans (%) |
|---|---|---|---|---|
| mistral-medium-2505 | 145,873 | 45.9 | 34.8 | 4.7 |
| gpt-oss-120b | 55,652 | 17.5 | 41.7 | 5.6 |
| qwen/qwen3-32b | 23,447 | 7.4 | 71.9 | 8.0 |
| glm-4.5-flash | 22,258 | 7.0 | 34.2 | 4.4 |
| gpt-5.4-mini | 19,147 | 6.0 | 14.5 | 1.0 |
| google/gemma-4-31b-it:free | 12,694 | 4.0 | 26.1 | 5.1 |
| Language | Rows | Markup | 555 | Seq. | Plc. | Bare | Uniq. |
|---|---|---|---|---|---|---|---|
| burmese | 20,508 | 20.9 | 0.0 | 1.4 | 0.0 | 57.2 | 0.26 |
| chinese | 19,154 | 21.1 | 0.1 | 3.2 | 16.1 | 34.7 | 0.10 |
| english | 27,757 | 29.4 | 58.4 | 10.5 | 5.1 | 40.4 | 0.28 |
| filipino | 16,515 | 27.2 | 0.4 | 5.7 | 8.9 | 43.2 | 0.22 |
| french | 15,459 | 36.3 | 0.1 | 9.5 | 0.0 | 38.2 | 0.24 |
| german | 16,490 | 31.1 | 0.1 | 25.7 | 1.0 | 38.6 | 0.26 |
| Evaluation set | Spans | generated rows | Same source |
|---|---|---|---|
| ai4privacy_de | 122,681 | 10.1 | 12.4 |
| ai4privacy_en | 231,761 | 6.7 | 31.7 |
| ai4privacy_es | 94,407 | 7.2 | 10.6 |
| ai4privacy_fil | 30,011 | 15.6 | 16.9 |
| ai4privacy_fr | 139,404 | 7.1 | 15.5 |
| ai4privacy_id | 30,844 | 12.9 | 13.7 |
| Concept | Ours (this work) | GraSCCo_PHI (observed) | MEDDOCAN (observed) |
|---|---|---|---|
| Person name | Patient, clinician and other person names; a role or title alone is not a name. The trained model often includes honorifics in the span. | Name only; honorific is a separate name_title annotation (ignored here). | Name only; “Dr.”, “Dra.” excluded. |
| Date | Specific dates tied to a person or encounter. | Every date, including a bare year (e.g. 2007). | Every temporal expression, including “año 2004” and durations (“3 años”). |
| Location | Street address, postal code, coordinates, care location. | Street, ZIP, city, country . | Street, territory (city, province, region) and country . |
| Organization | Hospitals, clinics, departments, companies. | Hospital and other organizations ( location_hospital , _organization ). | Hospital, health centre, institution. |
| Family terms | Only names are tagged. | Relative names only. | familiares : kinship words such as “madre” are annotated. |
| Age, sex, profession | Never tagged. | age , profession annotated (ignored here). | Age, sex, profession annotated (ignored here). |
| GraSCCo_PHI (de) | MEDDOCAN (es) | |||
| System | Exact [95% CI] | Rel. | Exact [95% CI] | Rel. |
| Ours | 0.583 [0.547, 0.619] | 0.787 | 0.720 [0.709, 0.730] | 0.817 |
| SuperClinical-Large | 0.619 [0.569, 0.663] | 0.797 | 0.589 [0.578, 0.601] | 0.821 |
| GLiNER2 | 0.419 [0.387, 0.454] | 0.544 | 0.745 [0.734, 0.756] | 0.798 |
| OpenAI Privacy Filter | 0.497 [0.455, 0.540] | 0.680 | 0.607 [0.595, 0.619] | 0.713 |
| LFM2.5-Encoder PII | 0.203 [0.173, 0.237] | 0.272 | 0.490 [0.478, 0.502] | 0.560 |
| System | address | company | date | name | id | phone | |
|---|---|---|---|---|---|---|---|
| GraSCCo_PHI (de): exact / relaxed F1 | |||||||
| Ours | 0.52/0.72 | 0.00/0.00 | 0.76/0.79 | 1.00/1.00 | 0.27/0.87 | 0.64/0.64 | 0.90/0.98 |
| SuperClinical-Large | 0.30/0.66 | 0.00/0.00 | 0.73/0.86 | 0.00/0.40 | 0.66/0.84 | 0.08/0.25 | 0.34/0.72 |
| GLiNER2 | 0.34/0.62 | 0.00/0.00 | 0.40/0.40 | 1.00/1.00 | 0.49/0.78 | 0.19/0.19 | 0.88/0.92 |
| OpenAI Privacy Filter | 0.06/0.36 | 0.00/0.00 | 0.73/0.78 | 1.00/1.00 | 0.19/0.63 | 0.39/0.39 | 0.72/0.94 |
| LFM2.5-Encoder PII | 0.09/0.30 | 0.00/0.14 | 0.15/0.15 | 1.00/1.00 | 0.35/0.47 | 0.36/0.36 | 0.00/0.29 |
| Corpus | Exact | Boundary | Label | Missed |
|---|---|---|---|---|
| GraSCCo_PHI (de) | 48 | 20 | 0 | 31 |
| MEDDOCAN (es) | 64 | 14 | 5 | 17 |
| Setting | Value |
|---|---|
| Initialization | LFM2.5-Encoder-350M-PII-Detector |
| Adaptation | LoRA, rank 128, , dropout 0 |
| Head | Dropout 0.1 + Linear(1024, 37) |
| Decoder | Viterbi over valid BIOES transitions |
| Sequence length | 8,192 tokens; sequential packing with document isolation |
| Training data | 120,036 packed units from the training mix |
| Label | Spans | Share (%) | Docs with label (%) |
|---|---|---|---|
| address | 7,256 | 7.3 | 98.0 |
| company_name | 9,181 | 9.2 | 95.8 |
| date | 10,857 | 10.9 | 91.6 |
| email_address | 9,998 | 10.0 | 99.5 |
| human_name | 15,806 | 15.8 | 99.9 |
| id_number | 15,993 | 16.0 | 100.0 |
| Text format | Documents | Share (%) |
|---|---|---|
| Voice-scribe transcript | 712 | 14.0 |
| Markdown sections | 573 | 11.2 |
| HL7-like pipe-delimited text | 536 | 10.5 |
| Patient portal audit log | 502 | 9.8 |
| JSON-like object | 487 | 9.5 |
| OCR text with light noise | 482 | 9.5 |
| Set | Docs | Ours [95% CI] | Best baseline | Best baseline [95% CI] | Difference [95% CI] |
|---|---|---|---|---|---|
| OpenPII (de) | 23,616 | 0.827 [0.824, 0.829] | OpenAI PF | 0.716 [0.713, 0.718] | +0.111 [+0.109, +0.113] |
| OpenPII (en) | 40,580 | 0.878 [0.876, 0.879] | OpenAI PF | 0.745 [0.743, 0.747] | +0.132 [+0.131, +0.134] |
| OpenPII (es) | 17,877 | 0.869 [0.867, 0.872] | OpenAI PF | 0.794 [0.791, 0.797] | +0.075 [+0.073, +0.078] |
| OpenPII (fil) | 5,087 | 0.848 [0.843, 0.852] | GLiNER2 | 0.690 [0.685, 0.696] | +0.158 [+0.153, +0.162] |
| OpenPII (fr) | 25,690 | 0.843 [0.841, 0.845] | OpenAI PF | 0.738 [0.735, 0.740] | +0.106 [+0.104, +0.108] |
| OpenPII (id) | 5,363 | 0.848 [0.844, 0.853] | GLiNER2 | 0.688 [0.682, 0.693] | +0.161 [+0.156, +0.165] |
| Label | Ours | OpenAI PF | GLiNER2 | SuperClinical-L | LFM2.5 |
|---|---|---|---|---|---|
| address | 0.675 | 0.261 | 0.486 | 0.534 | 0.454 |
| company_name | 0.952 | – | – | 0.878 | 0.918 |
| date | 0.963 | 0.896 | 0.670 | 0.885 | 0.492 |
| email_address | 0.988 | 0.949 | 0.946 | 0.918 | 0.952 |
| human_name | 0.918 | 0.763 | 0.591 | 0.694 | 0.508 |
| id_number | 0.957 | 0.847 | 0.737 | 0.774 | 0.599 |
| Group | Docs | Ours [95% CI] | OpenAI PF | GLiNER2 | SuperClinical-L | LFM2.5 |
|---|---|---|---|---|---|---|
| voice-scribe transcript | 712 | 0.910 [0.902, 0.917] | 0.559 | 0.454 | 0.257 | 0.279 |
| Markdown sections | 573 | 0.954 [0.950, 0.959] | 0.617 | 0.508 | 0.271 | 0.310 |
| HL7-like pipe-delimited text | 536 | 0.828 [0.818, 0.837] | 0.424 | 0.429 | 0.180 | 0.216 |
| patient portal audit log | 502 | 0.887 [0.874, 0.899] | 0.528 | 0.458 | 0.226 | 0.277 |
| JSON-like object | 487 | 0.892 [0.882, 0.902] | 0.602 | 0.537 | 0.243 | 0.194 |
| OCR text with light noise | 482 | 0.904 [0.894, 0.912] | 0.577 | 0.489 | 0.243 | 0.288 |
| Group | Docs | Ours [95% CI] | OpenAI PF | GLiNER2 | SuperClinical-L | LFM2.5 |
|---|---|---|---|---|---|---|
| adversarial | 3,400 | 0.892 [0.889, 0.896] | 0.558 | 0.473 | 0.228 | 0.260 |
| standard | 1,700 | 0.863 [0.856, 0.872] | 0.524 | 0.478 | 0.260 | 0.277 |
| adversarial (all GPT-5.4-mini) | 3,400 | 0.892 [0.889, 0.896] | 0.558 | 0.473 | 0.228 | 0.260 |
| standard: other generators | 1,592 | 0.859 [0.850, 0.867] | 0.516 | 0.474 | 0.259 | 0.274 |
| standard: held-out (GPT-5.4-mini) | 108 | 0.923 [0.906, 0.940] | 0.619 | 0.519 | 0.270 | 0.314 |
| Language | Docs | Ours | OpenAI PF | GLiNER2 | SuperClinical Large | LFM2.5 PII |
|---|---|---|---|---|---|---|
| German ∗ | 63 | 0.583 | 0.497 | 0.419 | 0.616 | 0.205 |
| English ∗ | 60 | 0.674 | 0.477 | 0.518 | 0.776 | 0.233 |
| French ∗ | 60 | 0.715 | 0.601 | 0.516 | 0.717 | 0.237 |
| Russian ∗ | 60 | 0.713 | 0.538 | 0.502 | 0.422 | 0.201 |
| Italian | 60 | 0.686 | 0.644 | 0.512 | 0.692 | 0.205 |
| Polish | 60 | 0.647 | 0.524 | 0.451 | 0.564 | 0.206 |
| Language | Docs | Ours | OpenAI PF | GLiNER2 | SuperClinical Large | LFM2.5 PII |
|---|---|---|---|---|---|---|
| German ∗ | 63 | 0.787 | 0.679 | 0.545 | 0.796 | 0.272 |
| English ∗ | 60 | 0.810 | 0.726 | 0.635 | 0.873 | 0.363 |
| French ∗ | 60 | 0.823 | 0.752 | 0.635 | 0.838 | 0.275 |
| Russian ∗ | 60 | 0.828 | 0.766 | 0.590 | 0.725 | 0.286 |
| Italian | 60 | 0.816 | 0.773 | 0.604 | 0.820 | 0.254 |
| Polish | 60 | 0.803 | 0.685 | 0.567 | 0.788 | 0.253 |
Clinical Information Extraction
Clinical Information Extraction turns clinical notes, reports, and patient narratives into structured, searchable facts and relations.
See all 117 papers