# Generating Diverse and Verified Synthetic Clinical Notes with Labels by Construction

Synthetic German clinical letters with exact PHI labels

Matthias Lehmann, Madeleine Werthebach · arXiv · 2026-11-7

- **Problem** Public de-identification benchmarks are in-distribution, so they rarely push de-identifiers into edge cases. German suffers most because privacy law limits how much labeled data can be shared.
- **Method** SPARCLING is an LLM-based pipeline that samples patient profiles before any text is written. The generator sees only masked placeholders, so the PHI spans are exact by construction.
- **Results** SPARCLING-DE is more diverse than existing public datasets, with Self-BLEU of 0.014 against 0.060 for MIMIC IV. Training on its synthetic data can yield better de-identifiers than training on scarce public data alone.

![Table 4: Main training results on GraSCCo at character-level.Synthetic onlyis a medBERT.de trained purely on SPARCLING-DE and evaluated on the held-out public…](https://refivu.com/papers/38221292-a102-4bbf-b6a9-96262c2a9e40/figures/figure-b77f056c635caaae635da01c46d87e4c.png?thumb=512)

**Table 4** : Main training results on GraSCCo at character-level.Synthetic onlyis a medBERT.de trained purely on SPARCLING-DE and evaluated on the held-out public folds;Public onlyis trained on the public training folds;Synthetic → Publicpretrains on SPARCLING-DE and finetunes on the public training folds. The hybrid regime improves span F1 over public-only on all folds.

[Original paper](https://arxiv.org/abs/2611.10789v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Matthias Lehmann, Madeleine Werthebach · Generating Diverse and Verified Synthetic Clinical Notes with Labels by Construction · Original paper figure · Extracted the figure area from page 9 of the original PDF.

## Why de-identification benchmarks fall short for German

The gap is sharpest for German, where strict privacy legislation limits how much labeled data can be shared. Researchers therefore fall back on private datasets or on the few public benchmarks that exist, such as i2b2. Those public benchmarks lack the properties that would let their results generalize well.

The authors require three properties from a de-identification benchmark. First, the benchmark needs exact and complete character-level spans for every PHI mention. Second, the clinical notes need enough surface plausibility to embed the PHI in realistic context. Third, the benchmark needs pervasive yet controlled diversity, including edge cases and the underrepresented long tail.

Real clinical data gives surface plausibility, but these benchmarks are inherently in-distribution. Because of this, they rarely push de-identifiers into edge cases and lack the diversity a holistic evaluation needs. Synthetic benchmarks built by altering public datasets inherit those same weaknesses without adding meaningful diversity. Notes generated from scratch with LLMs are scalable, but they lack inherent diversity and offer only questionable label precision.

The authors respond by splitting the problem so that each pipeline piece targets one of these properties. Their stated contributions include a challenging benchmark for German de-identification models that uncovers even commonly silent failure modes.

## Deciding the PHI before the text exists

The key idea is to fix the PHI before any text is written, so the labels cannot drift from the letter. The generator LLM only sees a masked profile, which exposes PHI classes and grammatical features but no actual values. Because the sampled values never pass through the LLM, the span labels are exact by construction. The authors say they avoid noisily labeling PHI after generation, since they can instantiate values from the sampled profiles with exactness guarantees.

The first step samples a structured profile of patient, clinical and document attributes from a knowledge base. Sampling is hierarchical and includes rare and adversarial trick cases, such as medical eponyms and look-alike strings. The profile also carries negative decoys that resemble PHI but should stay unredacted, so the later checks can tell intended PHI from benign look-alikes.

The third step fills the placeholders with the sampled values, inflects them, and logs character offsets, which become the span labels. The fourth step runs a deterministic known-PHI string check and an LLM red-team audit on the masked letter. Any finding discards the document, which keeps the verification conservative.

## What the dual checks catch

The dual quality control in SPARCLING-DE targets LLM hallucinations, and it has to catch real leakage before a letter enters the dataset. Of 1,150 generated data points, 40 (3.48%) failed the initial placeholder verification because the LLM wrote invalid or broken placeholders. The dual quality control then caught 91 (7.91%) cases with potential leakage.

Only 16 (1.39%) were caught exclusively by the known-PHI deterministic check, and 68 (5.91%) exclusively by the LLM-based residual detection. Seven (0.61%) were caught by both mechanisms, so the two checks largely cover different failures.

The overlap is small, and the 7 overlapping cases hold mostly distinct findings. Only 5 entities across 3 cases were tagged by both mechanisms in the entire dataset. All 75 letters flagged by the red-team LLM contained actual PHI leaks, and none was a false positive. The red-team agent detected 88 unaccounted PHI instances across these 75 letters, with age (47) the most frequent type.

Professions (17), names (7), institutions (6), IDs (5), dates (3), and nationalities (3) made up the rest. Except for the detected professions, every finding was a hallucination by the generating LLM that was absent from the sampled profiles.

The authors trace most hallucinated ages to cases where age was not a planned PHI, so the generator received no age placeholder. In that situation the LLM's only option was to write an age outside placeholders, which the audit then catches. The deterministic known-PHI check instead prevents unplanned name collisions. Of its 23 exclusions, 7 were false positives where patient names randomly collided with non-PHI text, and the remaining 16 were all leaked professions.

Planned collision cases are whitelisted for the deterministic checks, so they aren't excluded.

## Diversity against public corpora

The authors compare SPARCLING-DE with four public clinical corpora, MIMIC IV Note, i2b2, GraSCCo and GERNERMED. They also add a 63-document subsample of their own corpus, matched to GraSCCo's size, because corpus size shifts count-based measures. Per-document and pairwise metrics such as MTLD and Self-BLEU are less sensitive to corpus size, so they form the main comparison.

The authors also note that i2b2 and MIMIC-IV are English, so their lexical values are only indicative.

Self-BLEU is 0.014 for SPARCLING-DE, compared to 0.021 for GERNERMED and 0.060 for MIMIC IV. A lower Self-BLEU means the corpus repeats fewer n-grams, so it avoids a few recurring templates.

The 1,019 letters cover 3,046 unique ICD codes, and no code combination repeats across letters. The average pairwise Gower distance is 0.600, so the profiles are well separated from one another. Only one of 518,671 profile pairs falls below a Gower distance of 0.1. Across all 518,671 document pairs, no pair exceeds a 5-gram Jaccard similarity of 0.8.

The authors treat this content spread, more than lexical variety, as the core value of the corpus for a benchmark.

## How realistic the letters look

SPARCLING-DE's surface density is 41.4 spans per thousand word tokens, which matches GraSCCo's 43.2 almost exactly. The authors treat this density as the most relevant dimension of realism for their purpose, since it shows realistic PHI use. Its Flesch-Kincaid Grade Level is 20.75, compared to 14.84 for GraSCCo and 9.50 for MIMIC-IV, so the letters read at a markedly higher grade.

The SMOG readability index, by contrast, is 16.65 for SPARCLING-DE, 13.69 for GraSCCo and 12.19 for MIMIC-IV. Mean document length is 7,163 characters, which sits between GraSCCo at 3,947 and MIMIC-IV at 10,602.

Deeper clinical realism is where the letters fall behind real corpora, as the authors expected. Gemini 3.7 Flash acts as a single judge and scores every document on a scale from 1 (lowest) to 5 (highest). The judge covers nine dimensions, including structure, clinical plausibility, temporal consistency and overall realism. Temporal consistency reaches 3.42 for SPARCLING-DE, against 3.86 for real German letters.

Structure reaches 3.37, against 4.10 for real German letters, so the two dimensions show near-parity. SPARCLING-DE falls behind in all other dimensions, although its mean scores stay at mid-scale across them.

![Table 2: Surface-level and LLM-judged realism of SPARCLING-DE against two clinical reference corpora. LLM rows are mean judge scores (1–5). SPARCLING-DE matche…](https://refivu.com/papers/38221292-a102-4bbf-b6a9-96262c2a9e40/figures/figure-b9b8515c5ab813a93d040fd424a84aca.png?thumb=512)

**Table 2** : Surface-level and LLM-judged realism of SPARCLING-DE against two clinical reference corpora. LLM rows are mean judge scores (1–5). SPARCLING-DE matches the corpora on surface density and structure, but the LLM judge still separates it from real text on deeper clinical realism.

[Original paper](https://arxiv.org/abs/2611.10789v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

The authors attribute the larger gap on content to design choices rather than to a flaw in the pipeline. The authors state that SPARCLING aims for surface plausibility to embed PHI, not for clinically validated patient trajectories.

Realism falls as the difficulty tier rises, which ties the weakness to the adversarial configurations. Linguistic realism and internal consistency degrade most clearly across the tiers. Failure cases show the same pattern, for example a homograph collision where the surname Stein is the common noun for stone. The deterministic scan flags that document conservatively, because it cannot resolve the lexical ambiguity.

## What removing sampling or placeholders does

Removing structured sampling makes the generated letters collapse on several diversity measures at once. Trigram novelty drops to 0.25 from 0.82, and Self-BLEU rises to 0.214 from 0.013. MTLD falls to 258 from 306, so the lexical richness of the corpus shrinks as well. Without the detailed patient profiles, letters become much shorter, at 4,301 mean characters versus 7,549.

Length also becomes near uniform, with a standard deviation of 468 instead of 4,795. PHI variety drops by a factor of 4, and documents carry more than 10 fewer spans. Surname entropy falls from 6.52 bits to 3.14, and only 14 distinct ages appear instead of 61.

Removing placeholder generation changes the job of the LLM: it gets the unmasked profile and writes the full text. To still get label spans, the LLM emits them as a secondary output. The authors reuse the exact sampled profiles from SPARCLING-DE, so the comparison isolates the placeholder step. The share of documents flagged for leaked PHI rises from 9% to 21% on the 100-document subset.

The primary leaked PHI type becomes names, which the authors call arguably the most harmful leaks. A higher exclusion rate also distorts the intended data distribution more heavily.

The placeholder system therefore keeps the quality control burden low and protects the dataset from leakage. Because the LLM never sees the sampled values, it has far fewer chances to write names into the text. Both ablations show that the design choices, not the LLM alone, drive the diversity and the cleanliness of SPARCLING-DE.

## What the benchmark reveals about current de-identifiers

The authors score a rule-based baseline, Presidio with spaCy and with Flair, OpenMed, Gemma 4 E2B and Gemini 3.7 Flash on their gold spans. Matching is lenient, with an IoU of at least 0.5.

The authors say Gemini is the only method that is high in recall and preserves content, yet it still misses some PHI, mainly ZIP codes and professions. Every non-LLM method leaks more than 25% of PHI.

Over-redaction is the other failure: Presidio removed 41.4% of negative spans and OpenMed 58.3%. For medical eponyms the rates are 39.6% for Presidio and 61.9% for OpenMed.

## Training on synthetic letters

SPARCLING was used to train a German de-identifier, and the authors ask whether this helps against scarce public data. All training runs used medBERT.de on a single NVIDIA Tesla T4, and the hyperparameters were not tuned. The authors fine-tuned medBERT.de on 90% of SPARCLING-DE and evaluated it on the held-out 10% and on GraSCCo. In distribution, this synthetic-only detector reached a character-level F1 of 99.7%.

Out of distribution, the same model reached 89% F1 on GraSCCo and caught 84% of PHI characters, so synthetic data transfers to human-written letters.

The second experiment used a 5-fold cross validation on GraSCCo, where pretraining on SPARCLING-DE came before finetuning on public data. This hybrid setup raised character recall to 0.975, compared to 0.955 for training on public data only. Character recall is the primary safety-oriented metric, because it measures the fraction of sensitive characters the detector covers.

Span recall, by contrast, weights every PHI entity equally regardless of its length.

The authors also tested the adversarial edge cases by removing them, which covers about 10% of the training data. The authors attribute this drop to the adversarial content rather than to reduced training volume, based on further experiments in Appendix C.5. Training on the adversarial cases therefore seems to matter for precision, not only for coverage.

## Limits and open questions

The study leaves several things untested, starting with language and note type. The authors validate SPARCLING only for their focal domain of German discharge letters. They didn't test other languages or other kinds of clinical notes. The generated letters also lack fine-grained realism, and the authors partly attribute this to prioritizing diversity.

They leave methods that constrain generation toward realistic output while preserving diversity to future work.

The realism assessment rests on a single LLM judge, Gemini 3.7 Flash, so the scores reflect one evaluator. The authors read this drop as evidence that the lower realism comes from the adversarial configurations. Training runs used a single NVIDIA Tesla T4, and hyperparameters were not tuned.

The authors suggest reusing the generated templates to compute counterfactuals. Counterfactuals would help isolate failure modes that are hard to separate in real corpora. They also see value in testing the approach on ICD coding, since the sampling already yields ground truth ICD codes. They didn't run these adjacent-domain or counterfactual experiments in this study.

## Paper info

- **Authors**: Matthias Lehmann, Madeleine Werthebach
- **Venue**: arXiv · Preprint
- **First published**: 2026-11-7
- **Added**: 2026-11-10
- **Updated**: 2026-11-7
- **Version**: v1
- **arXiv**: 2611.10789
- **Category**: cs.LG · cs.AI · cs.CL
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2611.10789v1) · [PDF ↗](https://arxiv.org/pdf/2611.10789v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

Under strict privacy regulations in the clinical domain, de-identification is necessary to enable the use of clinical data such as for natural language processing. However, we currently lack sophisticated ways to tell which de-identification models actually are suitable. Specifically, we need benchmarks that are challenging, diverse, and clinically plausible, all while ensuring label correctness. To this end, we present SPARCLING, an LLM-based pipeline to generate synthetic discharge letters with character-exact PHI span annotations. Our pipeline combines structured attribute sampling, template generation, and red teaming to obtain diverse PHI-labeled discharge letters. In our experiments, we demonstrate this superior content diversity over existing public datasets. Further, we show SPARCLING's downstream utility as a benchmark to uncover failure modes of de-identifiers in the German clinical domain. Finally, our experiments show that training on our synthetic data can yield more capable de-identifiers than training on the scarce public data alone. Our code is available at https://github.com/Matt00n/phi\_discharge\_letter\_generator.

## Quote from the paper

Matthias Lehmann, Madeleine Werthebach (2026). Generating Diverse and Verified Synthetic Clinical Notes with Labels by Construction. arXiv:2611.10789v1. https://arxiv.org/abs/2611.10789v1

**BibTeX**

```
@misc{lehmann2026generating,
  title = {{Generating Diverse and Verified Synthetic Clinical Notes with Labels by Construction}},
  author = {Matthias Lehmann and Madeleine Werthebach},
  year = {2026},
  eprint = {2611.10789},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.10789v1}
}
```

## Other paper commentary

- [Gendered Misclassification from Surname-Based Race Imputation](https://refivu.com/en/papers/0fca607c-6566-4aa3-a93d-57d2e54268c9-gendered-misclassification-from-surname-based-race.md)
- [Prove What You Can: Hybrid Neurosymbolic Reasoning for Logical Natural Language Inference](https://refivu.com/en/papers/7ace6c85-d1e6-4bd6-8cac-47f06ddabf88-prove-what-you-can-hybrid-neurosymbolic-reasoning-for.md)
- [Natural TTS Synthesis by Conditioning WaveNet on Mel Spectrogram Predictions](https://refivu.com/en/papers/596b5353-6c04-4ada-a92e-25d0fee13147-natural-tts-synthesis-by-conditioning-wavenet-on-mel.md)
- [Universal Language Model Fine-tuning for Text Classification](https://refivu.com/en/papers/f2470a4a-1c9b-423c-8757-ba73cfe37b54-universal-language-model-fine-tuning-for-text-classification.md)
- [BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension](https://refivu.com/en/papers/13b055d5-7dcd-422f-b6d8-3704e3d48533-bart-denoising-sequence-to-sequence-pre-training-for.md)
- [Prefix-Tuning: Optimizing Continuous Prompts for Generation](https://refivu.com/en/papers/01cf041e-b71c-444b-8b44-e94ac976a9db-prefix-tuning-optimizing-continuous-prompts-for-generation.md)
- [Guiding future global temperature distributions with simulations and observations](https://refivu.com/en/papers/0f0e0eec-05c1-4800-8206-66b04e61e097-guiding-future-global-temperature-distributions-with.md)
- [CompAIssionate Other: Identity Assumptions in LLM Responses to Distress](https://refivu.com/en/papers/f171dfa4-94f8-4cf6-80f5-42840da00823-compaissionate-other-identity-assumptions-in-llm-responses.md)
- [The Surprising Effectiveness of Deleting Weights in LLM Post-Training](https://refivu.com/en/papers/808cc5f0-6bc7-46ef-942b-24b57c03d919-the-surprising-effectiveness-of-deleting-weights-in-llm.md)
- [Pole or Vector? Encoders Capture Bangla Compound Verbs, but LLMs Read Them Literally](https://refivu.com/en/papers/9dbfb8e2-39c3-4ec7-906a-723e53e21889-pole-or-vector-encoders-capture-bangla-compound-verbs.md)
- [Beyond the Mean Gap: What Transferred-Angle QAOA Retains on a Superconducting Processor](https://refivu.com/en/papers/8f033d4e-6221-47eb-ba57-a9271b2927e9-beyond-the-mean-gap-what-transferred-angle-qaoa.md)
- [SRA: Spatial Reasoning Adapter via Evolving Social Interaction Graphs for Trajectory Prediction](https://refivu.com/en/papers/7221c636-85ce-4e7c-b428-10dd832a274f-sra-spatial-reasoning-adapter-via-evolving-social.md)

## Terms in this paper

- [Phi](https://refivu.com/en/terms/fdec7fc094a3-phi)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/38221292-a102-4bbf-b6a9-96262c2a9e40-generating-diverse-and-verified-synthetic-clinical-notes)
