Custodian Guardian Layer · Reproducibility Package

Custodian Guardian Layer · 复现包

EN · 中文

Reproduce the audit.复现这次评测。
Scripts, data, paper.脚本、数据、论文。

Everything needed to re-run the structure-preservation study: the scoring scripts, the 250-document benchmark subsets (original + transformed), and the workshop paper. Public and self-contained — no proprietary access required. 复现这次结构保持性评测所需的一切:评分脚本、250 文档 benchmark 子集(原始 + 脱敏后)、以及 workshop 论文。公开、自包含 —— 无需任何私有权限。

3 analysis scripts分析脚本7 benchmarks · 7 languagesbenchmark · 7 语言1,750 docs文档

Paper论文

📝 Workshop paper (PDF)Workshop 论文(PDF)

The paired multi-detector protocol, TOST equivalence testing, and the C1/C2/C3 comparison experiments. Every table below is produced by the scripts in §02.配对多检测器协议、TOST 等价检验、C1/C2/C3 对比实验。论文里的每张表都由 §02 的脚本产出。

Scripts脚本

analyze_equivalence.py Masked-span recall + TOST equivalence (pooled & per-benchmark, Δ sweep) + McNemar. Produces the paper's headline and Table 2.被遮蔽 span 召回 + TOST 等价检验(合并与逐 benchmark、Δ 扫描)+ McNemar。产出论文标题结论与表 2。
run_redact_baseline.py C1 — redaction floor: replace masked values with ***** and re-detect. Produces Table 3.C1 — 遮蔽地板值:把被遮蔽值换成 ***** 再检测。产出表 3。
run_faker_baseline.py C2 — open-surrogate baseline: substitute the same spans with Faker, re-detect. Produces Table 4.C2 — 开源替身基线:用 Faker 替换同一批 span 再检测。产出表 4。
metrics.py Span-level P/R/F1 (strict / type / overlap) and leakage rate — the shared scorer.span 级 P/R/F1(strict / type / overlap)与泄漏率 —— 共用评分器。

Data — 250-doc subsets数据 — 250 文档子集

Each benchmark: the original subset and the Guardian-Layer-transformed subset, aligned by doc_id with gold PHI spans.每个 benchmark:原始子集与 Guardian Layer 脱敏后子集,按 doc_id 对齐、带 gold PHI span。

Benchmark基准OriginalTransformed
ASQ-PHI (en, clinical).jsonl.jsonl
MEDDOCAN (es, clinical).jsonl.jsonl
MultiCoNER v2 (multi).jsonl.jsonl
PII-300k (en).jsonl.jsonl
PII-300k (nl).jsonl.jsonl
PII-300k (fr).jsonl.jsonl
PII-300k (de).jsonl.jsonl

Reproduce如何复现

# deps: numpy scipy scikit-learn presidio-analyzer faker + spaCy models
pip install presidio-analyzer presidio-anonymizer faker

# C3 — equivalence (pooled + per-benchmark, McNemar, TOST Δ∈{1,2,3})
python scripts/analyze_equivalence.py

# C1 — redaction floor (Presidio, CPU)
PYTHONPATH=. python scripts/run_redact_baseline.py

# C2 — open-surrogate baseline (Faker + Presidio, CPU)
PYTHONPATH=. python scripts/run_faker_baseline.py

Scripts read the paired result files under results/. C1/C2 run on CPU; the equivalence analysis is pure re-analysis (no model inference).results/ 下的配对结果文件为输入。C1/C2 纯 CPU;等价分析是纯再分析(不做模型推理)。

License & data statement许可与数据声明

All benchmarks are public or synthetic (ASQ-PHI synthetic; MEDDOCAN shared-task; PII-Masking-300k synthetic; MultiCoNER v2 public). No real patient data. Respect each source dataset's original license.所有 benchmark 均为公开或合成数据(ASQ-PHI 合成;MEDDOCAN 评测任务;PII-Masking-300k 合成;MultiCoNER v2 公开)。不含真实病患数据。请遵守各源数据集的原始许可。