Datasets:
File size: 9,610 Bytes
c92a5ba a1f34f3 c92a5ba a1f34f3 dded600 c92a5ba dded600 c92a5ba a1f34f3 c92a5ba a1f34f3 dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 c92a5ba dded600 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | ---
language:
- en
license: mit
tags:
- phi
- de-identification
- clinical-nlp
- privacy
- audit
- healthcare
- synthetic
- multimodal
- hipaa
- fhir
- reinforcement-learning
- risk-scoring
- adversarial
- token-classification
- text-classification
- asr
- medical
- ehr
size_categories:
- 10K<n<100K
task_categories:
- token-classification
- text-classification
configs:
- config_name: default
data_files:
- split: train
path: data/train.jsonl
- split: test
path: data/test.jsonl
default: true
- config_name: multimodal_pairs
data_files:
- split: train
path: data/multimodal_pairs.jsonl
- config_name: signed
data_files:
- split: train
path: data/signed.jsonl
- config_name: fhir
data_files:
- split: train
path: data/fhir.jsonl
- config_name: adversarial
data_files:
- split: train
path: data/adversarial.jsonl
---
# multimodal-phi-masking-benchmark
[](https://doi.org/10.5281/zenodo.18865882)
10,000 synthetic clinical records paired with token-level PHI spans, masking decisions, cryptographic audit hashes, RL reward signals, and leakage scores. Five configs covering text, ASR, imaging, waveform, and audio modalities. The only public dataset pairing PHI masking decisions with FHIR R4 audit trails, RL reward signals, and a formally modeled adversarial evasion scenario.
```python
from datasets import load_dataset
ds = load_dataset("vkatg/multimodal-phi-masking-benchmark")
pairs = load_dataset("vkatg/multimodal-phi-masking-benchmark", "multimodal_pairs")
signed = load_dataset("vkatg/multimodal-phi-masking-benchmark", "signed")
fhir = load_dataset("vkatg/multimodal-phi-masking-benchmark", "fhir")
adv = load_dataset("vkatg/multimodal-phi-masking-benchmark", "adversarial")
```
---
## Why this dataset exists
Every PHI de-identification dataset I could find is text-only, single-document, and has no model of how masking decisions were made. You get the original text, the redacted text, and maybe some span annotations. That's useful for training a PHI detector. It's not useful for training or evaluating a masking policy, studying audit traceability, or testing cross-modal re-identification risk.
This dataset was built to fill those gaps. Each record includes the full decision chain: what PHI was detected, what risk score it produced, what policy was selected and why, how much PHI leaked through after masking, and what RL reward the decision would have earned. The multimodal pairs config adds paired records across two modalities for the same synthetic patient, which is the kind of data needed to study cross-modal linkage and re-identification risk accumulation.
---
## Configs
### `default` (5,000 records: 4,000 train / 1,000 test)
Synthetic clinical records across all five modalities with full masking decision traces.
| Modality | Count |
|---|---|
| text | 785 |
| waveform_proxy | 834 |
| asr | 794 |
| image_proxy | 790 |
| audio_proxy | 797 |
| Policy | Count |
|---|---|
| pseudo | 1,653 |
| raw | 1,016 |
| synthetic | 957 |
| redact | 374 |
PHI types covered: NAME (4,000), LOCATION (1,974), MRN (1,646), DATE (1,502), DOB (1,431), AGE (889), PHONE (755), ADDRESS (453), SSN (236).
Average risk before masking: 0.607. Average leakage after masking: 0.262. Average RL reward: 0.261.
### `multimodal_pairs` (4,000 records, 2,000 patients)
Paired records for the same synthetic patient across two different modalities. Both records share the same PHI values, making this config directly useful for studying cross-modal linkage and re-identification risk when the same patient appears in multiple data streams.
Top modality pairs: asr+audio_proxy (450), asr+image_proxy (420), image_proxy+text (402), image_proxy+waveform_proxy (398), audio_proxy+waveform_proxy (396).
Each record includes a `linkage` field showing shared PHI types and the cross-modal risk nudge (+0.12) that would apply if a system tracked exposure across both records.
### `signed` (4,000 records)
Same as the default train split, with ECDSA-style signature, SHA-256 record hash, and chain timestamp added per record. Useful for evaluating audit trail verification systems and compliance tooling.
### `fhir` (4,000 records)
Default train split exported as FHIR R4 AuditEvent resources. Each record includes chosen policy, risk scores before and after masking, consent level, leakage score, RL reward, and audit hash in the `entity.detail` array. The only public de-identification dataset in FHIR format.
### `adversarial` (1,000 records)
Records where PHI is deliberately fragmented to stay sub-threshold individually (avg individual risk: 0.363) but would trigger escalation when cross-modal linkage is detected (avg combined risk: 0.483, avg risk delta: +0.12). 463 of 1,000 records have `would_trigger_cross_modal: true`.
This config models the sub-threshold probing attack described in the [phi-exposure-guard](https://github.com/azithteja91/phi-exposure-guard) system: an attacker who spaces PHI to avoid individual record thresholds while accumulating linkage signal across modalities.
---
## Schema
### default / multimodal_pairs / signed / adversarial
```json
{
"record_id": "AUDIT-000001",
"modality": "asr",
"consent_level": "standard",
"cross_modal": true,
"original_text": "John Smith date of birth 1962-03-14 MRN MRN-482910 presenting at Mayo Clinic",
"masked_text": "[NAME_a3f9b2] date of birth [DOB_c81d4e] MRN [MRN_7f2a91] presenting at [LOCATION_3d8c1a]",
"phi_spans": [
{"phi_type": "NAME", "value": "John Smith", "start": 0, "end": 10},
{"phi_type": "DOB", "value": "1962-03-14", "start": 24, "end": 34}
],
"policy_contract": {
"chosen_policy": "pseudo",
"risk_score_before": 0.72,
"risk_score_after": 0.072,
"consent_level": "standard",
"modality": "asr",
"policy_version": "v1"
},
"audit": {
"audit_hash": "a3f9c1...",
"timestamp_unix": 1741200000,
"phi_types_detected": ["DOB", "LOCATION", "MRN", "NAME"],
"span_count": 4
},
"metrics": {
"leakage_score": 0.0,
"rl_reward": 0.312
}
}
```
The `adversarial` config adds:
```json
"adversarial": {
"individual_risk": 0.38,
"combined_risk": 0.50,
"risk_delta": 0.12,
"evasion_strategy": "sub_threshold_fragmentation",
"would_trigger_cross_modal": true
}
```
The `multimodal_pairs` config adds:
```json
"pair_id": "PAIR-00001",
"patient_idx": 1,
"paired_with": "image_proxy",
"linkage": {
"shared_phi_types": ["DOB", "MRN", "NAME"],
"cross_modal_risk_nudge": 0.12
}
```
The `signed` config adds:
```json
"_signature": "a3f9c1d2...",
"_record_hash": "7badcf09...",
"_chain_ts": 1741200001.234
```
### fhir
Standard FHIR R4 AuditEvent resource with masking-specific fields in `entity.detail`.
---
## What you can use this for
**PHI detection and masking:** the default split has span-level annotations across 9 PHI types and 5 modalities. Covers text, ASR transcripts, imaging metadata, waveform headers, and audio proxy records with modality-appropriate templates.
**Masking policy learning:** the `policy_contract`, `metrics.leakage_score`, and `metrics.rl_reward` fields give you everything needed for offline RL training or supervised policy classification without running the full adaptive controller.
**Cross-modal re-identification research:** the `multimodal_pairs` config is the only public dataset with paired cross-modal clinical records sharing the same patient PHI. Directly applicable to studying how re-identification risk accumulates when the same patient appears across multiple data streams.
**Adversarial robustness evaluation:** the `adversarial` config gives you 1,000 records specifically designed to test whether a system can detect sub-threshold evasion via cross-modal linkage. 463 of them demonstrate the evasion being caught.
**Compliance tooling:** the `signed` and `fhir` configs are ready for audit trail verification and FHIR-compatible pipeline testing.
---
## Policies
| Policy | Behavior |
|---|---|
| `raw` | No masking |
| `weak` | Generalize dates and ages, bracket other PHI types |
| `synthetic` | Replace with fixed synthetic values (Alex Morgan, MRN-000000, etc.) |
| `pseudo` | MD5-keyed pseudonymization per span |
| `redact` | Replace all PHI with [REDACTED] |
Policy is selected based on risk score and consent level. `minimal` consent always produces `raw`. Above that, thresholds are: raw below 0.20, weak 0.20-0.35, synthetic 0.35-0.55, pseudo 0.55-0.75, redact above 0.75.
---
## Related
- [phi-exposure-guard](https://github.com/azithteja91/phi-exposure-guard): the adaptive masking system this dataset is built around
- [streaming-phi-deidentification-benchmark](https://huggingface.co/datasets/vkatg/streaming-phi-deidentification-benchmark): event-level adaptive masking traces with crossmodal and adversarial scenarios
- [dag-remediation-traces](https://huggingface.co/datasets/vkatg/dag_remediation_traces): DAG planning traces for post-escalation remediation
- [dcpg-cross-modal-phi-risk-scorer](https://huggingface.co/vkatg/dcpg-cross-modal-phi-risk-scorer): the risk scoring model that produces the risk fields in this dataset
---
## Citation
```bibtex
@dataset{multimodal_phi_masking_benchmark,
title = {Multimodal PHI Masking Benchmark},
author = {Ganti, Venkata Krishna Azith Teja},
doi = {10.5281/zenodo.18865882},
url = {https://huggingface.co/datasets/vkatg/multimodal-phi-masking-benchmark}
}
```
MIT License. Fully synthetic data. No real patient information anywhere in this dataset. |