# A local language model layered with rule-based and neural detectors for clinical text de-identification: an open-source toolkit and evaluation

臨床テキストの非識別化のために規則ベースおよびニューラル検出器を階層化したローカル言語モデル：オープンソースツールキットと評価

Valentin Burkin · arXiv · 2026年11月9日

- **課題** 自由記述の臨床ノートは、共有の前に患者の識別子を取り除く必要があります。手作業は規模が合わず、学習済みモデルはコーパスが変わると汎化が安定せず、強力な汎用LLMは外部サービスのためノートを送りにくいです。
- **手法** DeidSharpは、既知の識別子、パターン、臨床NER、ローカルLLMの検出器を並列に実行し、検出スパンの和集合を置き換えます。いずれかの検出器が失敗すると、実行を中止します。
- **結果** 事前に定めたプロトコルでは、再現率優先の構成が看護記録と退院サマリーの両方でStanford/Pennより多くのPHIを見つけました。適合率優先の構成はNERなしで両コーパスとも適合率が高かったものの、deidの自己正解コーパスでは上回れませんでした。

## 臨床テキストの非識別化の難しさ

臨床ノートには、患者を特定できる氏名、日付、場所、番号が多く含まれています。そのため、研究で共有する前に取り除く必要があります。手作業は規模が大きくなるほど負担が増えるため、自動化ツールが長く研究されてきました。学習済みモデルは、コーパスが変わると汎化が安定しません。また、最も強力な汎用言語モデルの多くは外部ホスティングのサービスであり、データ利用契約や機関のポリシー上、ノートを送りにくいです。本研究では、ローカルにホストした大規模言語モデル（LLM）を、決定論的検出器および臨床NERモデルと組み合わせたとき、公開ツールより多くのPHIを見つけるかどうかと、適合率や除去される臨床テキスト量にどのようなコストがあるかを検証します。

## DeidSharpの並列検出の仕組み

DeidSharpは、自由記述テキストを複数の検出器で並列に処理する.NETツールです。検出器が返したスパンの和集合を、タグまたは置換値に置き換えます。検出器はスパンとカテゴリのみを返し、マスクされた元のテキストは返しません。どの検出器でも失敗すると実行が中止されるため、失敗を「見つからなかった」として扱うことはありません。パターン検出器は、日付、電話番号、メール、URLなど形式が決まった識別子をルールで見つけます。臨床NER検出器は、i2b2 2014コーパスで学習したobi/deid\_roberta\_i2b2 RoBERTaモデルを、Presidioのアナライザを通じてローカルのコンテナで実行します。

PresidioのspaCyの一般NERと、URL、米国運転免許の認識器は、看護記録のチューニング用データの半分でほとんどが誤検出を生んだため、無効化されました。

## LLM検出器と任意の2次レビュー

モデルが作り出した、あるいは書き換えたテキストは破棄します。使用モデルはGemma 4 26B-A4Bで、Ollamaの既定の4ビット量子化で実行します。

## 構成と評価コーパス

チューニング用の半分で固定した構成は5つです。再現率優先は、既知の識別子、パターン、臨床NER、LLMを組み合わせます。バランス型は、これに2次レビューを加えます。バランス型・1回呼び出し構成は、NERの場所と機関のみを使います。適合率優先は、NERを使わず既知の識別子、パターン、LLMを用います。LLMを含まない構成は、既知の識別子、パターン、ガゼッティア、臨床NERで構成されます。評価コーパスは、PhysioNetの看護記録（889件の報告スパン）、MIMIC-IV-Noteをもとにした準合成の退院サマリー（報告の半分で29,023スパン）、合成臨床検索クエリのASQ-PHI（1,051件のクエリ、2,976スパン）です。

## 指標と統計設計

主な指標はspan recallです。予測がどれであっても正解スパンと重なれば見つけたものとして数えるため、カテゴリが誤っていても再現率には含まれます。適合率は、予測スパンのうち正解スパンと重なる割合です。補助指標として、文字の再現率、非PHIテキストの除去率、単語レベルのF1、厳密な境界一致スコアを報告します。信頼区間は患者単位の1,000回のブートストラップ再標本で計算し、同じ再標本をすべての構成とベースラインで共有します。比較はペア差の区間で判断します。最終実行では、Stanford/Pennモデルを再現率が最も高いベースラインとして選びました。事前に定めた記述Aは、再現率優先の構成が再現率をさらに高めるというものです。

記述Bは、適合率優先の構成が再現率を最大2ポイントしか失わず、適合率が高くなるというものです。記述Bの2ポイントの余裕は、公式の導出なしに選んだ上限です。

## 最終実行の主な比較

適合率はStanford/Pennより9.3ポイント低かったです。退院サマリーでは、両構成とも再現率がStanford/Pennより20ポイント超高く、この差の大部分はuntyped namesから生じました。そのカテゴリではStanford/Pennが40.7%を見つけ、再現率優先の構成と適合率優先の構成は、それぞれ89.2%と86.6%を見つけました。事前に定めた4つの比較はすべて成立しました。

![Figure 2: Paired differences in span recall (left) and precision (right), in percentage points with paired 95% bootstrap intervals, between the two prespecifie…](https://refivu.com/papers/fdc65999-433c-47b0-9041-21262993a56a/figures/figure-9696f098eff1a58d92ae81d0ef356f39.png?thumb=512)

**Figure 2** :Paired differences in span recall (left) and precision (right), in percentage points with paired 95% bootstrap intervals, between the two prespecified stacks and the Stanford/Penn de-identifier or deid with its corpus-specific lists, on the reporting halves. The dashed line is the non-inferiority margin, which applies to the precision-first stack against Stanford/Penn. Scales differ between panels. Philter, which found more discharge-summary spans than both stacks (paired recall−4.1and−5.4points) at 23 to 27 points lower precision, is compared in the text. Supplementary Figure S1 shows every stack and tool on an absolute scale.

[出典](https://arxiv.org/abs/2611.12709v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Valentin Burkin · A local language model layered with rule-based and neural detectors for clinical text de-identification: an open-source toolkit and evaluation · 論文の図を引用 · 元のPDFの9ページ目から図の部分を抽出しています。

## 探索的比較とdeid・Philter

deidは看護記録の正解データに合わせた既定のツールです。そのため、deid専用リストを使ったdeidと比べると、再現率優先の構成の+1.57ポイントの優位は、区間が0を含むため有意ではありませんでした。適合率優先の構成は、deidに比べて再現率に有意な差はなく、適合率は10.6ポイント高かったです。退院サマリーでは、LLMを使うすべての構成がdeidより再現率が高く、再現率優先の構成は+3.20ポイント、適合率優先の構成は+1.92ポイントでした。この探索的比較は、事前に定めた記述ではありません。

## チューニング用の半分でのアブレーション実験の結果

チューニング用の半分でのアブレーション実験の結果では、LLMのみの場合は再現率95.6%、適合率87.6%でした。臨床NERのみの場合は、再現率87.0%、適合率58.3%でした。2つの検出器を和集合で組み合わせると、再現率は98.7%になりました。NERの寄与は主に場所で、LLMが見逃した23件の場所のうち19件を見つけました。パターン検出器はLLMの上で測定可能な再現率の向上を示しませんでしたが、決定論的な階層と漏えい防止チェックに使うため残されました。同じ表では、40例のプロンプトは4例のプロンプトより適合率が10ポイント高く、ゼロショットのプロンプトは再現率が40例とほぼ同じでしたが、適合率は低かったです。

別のモデル系列であるMinistral 3 14Bは、ゼロショットで決定論的な階層の上に70.9ポイントの再現率を加えましたが、適合率はずっと低かったです。

## 適用範囲と限界

準合成と実データの2つのコーパスは、1つの病院のMIMICデータに由来します。実際のPHIではなく置換値を含んでいます。退院サマリーの正解は、MIMICの非識別化が見つけた結果であり、置換値はこの研究のルールで作られたため、実際のPHIより規則的な可能性があります。チューニング用の半分で読み取った失敗はプロンプトの例の作成に反映されているため、ベースラインはチューニングなしで評価された点で比較条件が異なります。再現率は重なりをすべて見つけたものとして数える寛容な指標であり、文書単位で全部か無かを見る評価は報告されていません。最終実行は1つのLLMと1つのサーバーバージョンで測定され、他のモデル系列はチューニング用の半分でのみ試されました。

本研究は検出の評価のみを行い、漏えい防止チェックと既知の識別子検出器は評価していません。適合率優先の構成以外の構成は、16GB GPUとDockerサイドカー環境を必要とします。

## 結論と実務上の意味

LLMを決定論的検出器および臨床NERと組み合わせると、再現率優先と適合率優先という2つの運用点が得られました。事前に定めたプロトコルでは、報告の半分の2か所のうち1か所で再現率が、2か所とも適合率が高くなりました。ただし、deidの自己正解コーパスではルールベースのツールと同程度で、上回ることはできませんでした。実務では、GPUがない場合はLLMなしの構成を、16GB GPUがある場合は適合率優先の構成を検討できます。再現率が優先であれば、再現率優先の構成が使えます。どの構成を選ぶ場合でも、サイトのノートのサンプルで再現率を測定すべきです。

## 論文情報

- **著者**: Valentin Burkin
- **学会・ジャーナル**: arXiv · プレプリント
- **公開日**: 2026年11月9日
- **登録日**: 2026年11月11日
- **更新日**: 2026年11月9日
- **バージョン**: v1
- **arXiv**: 2611.12709
- **カテゴリ**: cs.CL · cs.CY · cs.SE
- **ライセンス**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **掲載内容**: 論文情報・解説・論文の図

[元論文 ↗](https://arxiv.org/abs/2611.12709v1) · [PDF ↗](https://arxiv.org/pdf/2611.12709v1)

この解説は、Refivuの韓国語解説をAIで翻訳したものです。不正確な翻訳や誤りが含まれる可能性があります。論文と図の利用条件は各出典に従います。

## アブストラクト

Objectives: To measure whether a locally hosted large language model (LLM), stacked with deterministic and clinical named-entity recognition (NER) detectors, finds more protected health information (PHI) than open tools, and at what precision. Materials and Methods: DeidSharp, an open-source .NET toolkit, combines the findings of pluggable detectors (patterns, a clinical NER model, a local 26B mixture-of-experts LLM) and fails closed on any detector error. Configurations fixed on tuning halves were compared, under a prespecified protocol, with deid, Philter, the Stanford/Penn de-identifier, OpenAI Privacy Filter and GLiNER on reporting halves of PhysioNet's nursing notes (889 spans) and semi-synthetic MIMIC-IV-Note discharge summaries (29,023 spans), and on synthetic ASQ-PHI queries, with paired patient-level bootstrap intervals. Results: In the nursing notes, against Stanford/Penn, the recall-first stack found 98.9% of PHI (+2.8, 95% CI 1.4 to 4.4) at 9.3 points lower precision; the precision-first stack, without NER, found 96.5%, matching Stanford/Penn, at 19.6 points higher precision (83.2%). In the discharge summaries, both stacks led Stanford/Penn by more than 20 points (recall-first 95.3%, +21.5, 20.5 to 22.4), almost entirely on generated untyped names; on typed labels all three exceeded 99%. All four prespecified comparisons held. No configuration beat deid significantly on its home corpus; Philter found more discharge-summary spans than the recall-first stack at 23 points lower precision. Discussion: The LLM was the main detector and NER added place names; asked to verify its own findings, the LLM discarded a quarter of true PHI. Conclusion: A local LLM layered with deterministic detectors offers recall-first and precision-first operating points without sending text off-site.

## この論文を引用

Valentin Burkin (2026). A local language model layered with rule-based and neural detectors for clinical text de-identification: an open-source toolkit and evaluation. arXiv:2611.12709v1. https://arxiv.org/abs/2611.12709v1

**BibTeX**

```
@misc{burkin2026local,
  title = {{A local language model layered with rule-based and neural detectors for clinical text de-identification: an open-source toolkit and evaluation}},
  author = {Valentin Burkin},
  year = {2026},
  eprint = {2611.12709},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.12709v1}
}
```

## この論文の用語

- [Mixture of Experts](https://refivu.com/ja/terms/5fa1c1ebf77b-mixture-of-experts)
- [Ollama](https://refivu.com/ja/terms/0d428b9404d1-ollama)
- [Non-inferiority margin](https://refivu.com/ja/terms/9ab6e4541a97-non-inferiority-margin)
- [PHI](https://refivu.com/ja/terms/fdec7fc094a3-phi)

## ほかの論文解説

- [Language Defaults Before Content: A Causal Layer Map of Multilingual Generation](https://refivu.com/ja/papers/de0d97bc-3b9a-4e13-a9a8-8a9207115066-language-defaults-before-content-a-causal-layer-map.md)
- [To SIMD or Not to SIMD: Comparing RVV vs. CGRA SoCs for Non-Linear Functions in AI](https://refivu.com/ja/papers/863b68ad-a0a5-475e-a3d8-a641f6d0b1e9-to-simd-or-not-to-simd-comparing-rvv.md)
- [Translating KV Caches Between Hybrid-Attention Language Models: MLA Latents, Linear-Attention States and Sparse-Attention Indexers](https://refivu.com/ja/papers/5eb33cd3-9543-41d1-88c1-8ec06cec0762-translating-kv-caches-between-hybrid-attention-language.md)
- [Competing Influence in LLM Populations: Budget Timing and Baseline Drift](https://refivu.com/ja/papers/0c46aeac-7fe7-4f4c-9eb7-13d04ed0b581-competing-influence-in-llm-populations-budget-timing-and.md)
- [VeilTune: Secure Fine-Tuning of Private LoRA Adapters on Public Pretrained Language Models](https://refivu.com/ja/papers/1ac3c6eb-7952-4bcf-b058-eb348429161e-veiltune-secure-fine-tuning-of-private-lora-adapters.md)
- [Weight-Space Programming of Policies and Their Verification via Model Checking](https://refivu.com/ja/papers/812e0c2d-92df-41d6-8419-2738a51f42de-weight-space-programming-of-policies-and-their-verification.md)
- [Hidden Tails: Certifying Tail-Risk Claims under Selective Labels](https://refivu.com/ja/papers/75cb6ab3-f9c1-4466-b415-44269638d62a-hidden-tails-certifying-tail-risk-claims-under-selective.md)
- [Agnostic Marginal-Nonuniform Learning](https://refivu.com/ja/papers/016f1038-e984-4177-99de-fa3e2feb1567-agnostic-marginal-nonuniform-learning.md)
- [Graph-Guided Bayesian Factor Analysis: A Fast Integrated EFA-CFA Approach for High-Dimensional Data](https://refivu.com/ja/papers/5d2d391c-7613-40f5-b05b-d69ca40d0041-graph-guided-bayesian-factor-analysis-a-fast-integrated.md)
- [Certify, Report, or Refuse: Harm-Constrained Conformal Prediction for Clinical Actions](https://refivu.com/ja/papers/669dfe83-09c8-4625-9ed5-7bf74c7f4ef6-certify-report-or-refuse-harm-constrained-conformal.md)
- [TRACE: Adaptive Trust-Region Bayesian Optimization for Open-Ended Molecular Design](https://refivu.com/ja/papers/7d02f355-6fcb-4601-b6e6-cb56e818e45d-trace-adaptive-trust-region-bayesian-optimization-for-open.md)
- [Double Blind Evals: Resolving the Dual Confidentiality Dilemma in AI Safety Auditing](https://refivu.com/ja/papers/e07d7eee-0c57-40dd-8b0a-958e531ba4ee-double-blind-evals-resolving-the-dual-confidentiality.md)

---

AI解説には誤りが含まれることがあります。 [Refivu](https://refivu.com/ja/papers/fdc65999-433c-47b0-9041-21262993a56a-a-local-language-model-layered-with-rule-based)
