You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> -**Baseline beats Mullenbach 2018 CAML on F1.** Micro F1 0.617 (+0.003 vs. CAML), Macro F1 0.584 (+0.052). Trails on P@5 (0.526 vs. 0.609) — a deliberate trade from `class_weight="balanced"` + F1-optimal thresholds.
9
+
> -**Baseline ships strong absolute numbers.** Micro F1 0.617, Macro F1 0.584 on held-out patient-level test split (n=12,091, 6,567 patients). P@5 = 0.526 — a deliberate trade from `class_weight="balanced"` + F1-optimal per-label thresholds.
10
10
> -**Signature failure pattern:** Z87.891 (personal history of nicotine dependence) is systematically over-fired in 9 of the top 10 confusion pairs at 36–49% FP rates on unrelated conditions. Root cause is calibration, not representation — a transformer encoder alone will not fix this.
11
11
> -**Pre-registered transformer predictions:** F17.210 (current vs. former smoker), K59.00 (buried constipation meds), and Z23 (buried immunization) should exit the worst-10 after Bio_ClinicalBERT fine-tuning. Specific F1 targets and falsification conditions are at the bottom of this document.
Copy file name to clipboardExpand all lines: reports/eval_report.qmd
+22-17Lines changed: 22 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -15,19 +15,19 @@ format:
15
15
16
16
*To be filled after baseline training completes.*
17
17
18
-
One paragraph: model choice, cohort, headline metrics, delta versus Mullenbach et al. 2018.
18
+
One paragraph: model choice, cohort, absolute headline metrics, key MLOps disciplines (patient-level splits, per-label thresholds, reproducibility, calibration analysis).
19
19
20
20
# Research Question
21
21
22
-
Given a free-text discharge summary, predict the set of ICD-10 codes assigned to that admission. Benchmark against Mullenbach et al. 2018 CAML (MIMIC-III top-50ICD-9).
22
+
Given a free-text discharge summary, predict the set of ICD-10 codes assigned to that admission. The multi-label framing, patient-level evaluation discipline, and top-50 cardinality are inherited from Mullenbach et al. 2018 (CAML, MIMIC-III/ICD-9 top-50); this work targets MIMIC-IV/ICD-10 and does not claim apples-to-apples benchmark equivalence — see [`DECISIONS.md`](../DECISIONS.md) 2026-04-26.
23
23
24
24
# Data
25
25
26
26
Cohort construction, composition, and limitations are documented in [`reports/data_card.md`](data_card.md). Headline numbers:
27
27
28
28
- MIMIC-IV-Note v2.2 + MIMIC-IV v3.1 Hosp, joined on `hadm_id`.
29
29
- Top-50 ICD-10 codes covering 91.04% of admissions; long tail spans 19,440 distinct codes.
30
-
- Modelable cohort: **122,288 admissions**.
30
+
- Modelable cohort: **122,283 admissions**.
31
31
- Splits: patient-level 80/10/10 by `subject_id`, seed = 42.
32
32
33
33
# Methods
@@ -47,14 +47,16 @@ Full rationale in [`DECISIONS.md`](../DECISIONS.md).
Test-split results on MIMIC-IV-Note v2.2 + MIMIC-IV v3.1 Hosp, top-50 ICD-10 codes. Patient-level held-out test split, n=12,091 admissions, seed=42.
56
51
57
-
CAML baseline values are from Mullenbach et al. 2018, Table 5 ("Results on MIMIC-III, 50 labels"), CAML row. P@8 is not reported in Table 5 (the top-50 setting); the paper's P@8 values (0.709 for MIMIC-III full, 0.523 for MIMIC-II full) are from different evaluation settings and are not used here. See [`src/mimic_icd_coder/evaluate.py::MULLENBACH_CAML_TOP50`](../src/mimic_icd_coder/evaluate.py) for the citation.
Targets are absolute, not benchmark-relative. They reflect the operational threshold for "the transformer branch is delivering value over the baseline." Numerical comparison to Mullenbach et al. 2018's published numbers is not methodologically valid because this work targets MIMIC-IV/ICD-10 (different dataset, different coding system, different cohort, different label space) — see [`DECISIONS.md`](../DECISIONS.md) 2026-04-26.
58
60
59
61
## Per-Label Error Analysis
60
62
@@ -74,23 +76,26 @@ Macro F1 reported by:
74
76
75
77
Temporal fairness deferred pending Silver-stage date un-shifting. Race-stratified analysis is deferred pending Silver/Gold integration of the demographic columns — race is already ingested to Bronze (per `feat/ingest-demographic`), but the fairness slicing pass has not been implemented. See [`DECISIONS.md`](../DECISIONS.md) 2026-04-21.
76
78
77
-
# Comparison to Mullenbach 2018
79
+
# Methodological inheritance from Mullenbach 2018
80
+
81
+
Mullenbach et al. 2018 (CAML) established the multi-label ICD-coding benchmark on MIMIC-III/ICD-9 top-50. This work inherits its methodological framing — multi-label classification with sigmoid + per-label decisions, patient-level evaluation, P@k as a coder-assist-relevant metric, top-50 label cardinality as a tractable problem size. These are methodological inheritances, not benchmark equivalences.
78
82
79
-
Metric deltas are reported with the following caveats:
83
+
Numerical comparison between this work's results and Mullenbach's published numbers is **not methodologically valid**. The work differs from Mullenbach 2018 along all four axes that matter:
80
84
81
-
- Cohort differences — size (47K MIMIC-III vs. 122K here), era (pre-2015 vs. 2008–2019), code system (ICD-9 vs. ICD-10).
82
-
- ICD-10 sub-code fragmentation redistributes common conditions (CHF, CKD, COPD, T2DM) across several codes, so top-50 label spaces are not identical.
83
-
- CAML trained on full-length notes with custom attention; this work uses chunked Bio_ClinicalBERT.
85
+
-**Different dataset.** Mullenbach used MIMIC-III v1.4; this work uses MIMIC-IV v3.1 + MIMIC-IV-Note v2.2.
86
+
-**Different coding system.** Mullenbach used ICD-9-CM; this work uses ICD-10-CM. Label spaces are non-overlapping; the top-50 codes in each are different sets covering different clinical concepts.
87
+
-**Different cohort.** Different size (47K MIMIC-III vs. 122K here), different era (pre-2015 vs. 2008–2019), different documentation conventions.
88
+
-**Different model architecture.** CAML used full-length notes with custom label-attention; this work uses chunked Bio_ClinicalBERT.
84
89
85
-
Deltas are informative but not strictly apples-to-apples.
90
+
A future apples-to-apples reproduction on MIMIC-III/ICD-9 — using Mullenbach's published cohort logic and label set — would make benchmark comparison meaningful. Tracked as future work in [`DECISIONS.md`](../DECISIONS.md) 2026-04-26; out of scope for the current deliverable.
86
91
87
92
# Limitations
88
93
89
94
See [`reports/data_card.md`](data_card.md). Key points relevant to eval interpretation:
90
95
91
96
- Cohort is 48% of all ICD-10 admissions in v3.1 Hosp, limited by MIMIC-IV-Note v2.2 sampling.
92
97
- Temporal and race-stratified fairness evaluation are deferred, not absent.
93
-
- Top-50 K is comparability-driven, not coverage-optimal; raising K would improve coverage but weaken the CAML comparison.
98
+
- Top-50 K is methodologically inherited from Mullenbach 2018 as a tractable problem size, not coverage-optimal. Raising K would improve coverage but the choice here keeps the methodological framing aligned with prior published work even though direct numerical comparison is invalid (see *Methodological inheritance from Mullenbach 2018* above).
Copy file name to clipboardExpand all lines: reports/model_card.md
+14-12Lines changed: 14 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,38 +18,40 @@ Template: Mitchell et al. 2019.
18
18
19
19
## Intended Use
20
20
21
-
-**Primary use:**Production-grade benchmark for clinical NLP ICD-10 auto-coding on MIMIC-IV, deployed as an Azure Databricks Model Serving endpoint for reproducible inference. Demonstrates the full MLOps lifecycle — feature engineering, model validation against a published benchmark (Mullenbach et al. 2018 CAML), Unity Catalog Model Registry, drift monitoring.
21
+
-**Primary use:**Reproducible end-to-end clinical NLP + MLOps reference build for ICD-10 auto-coding on MIMIC-IV, deployed as an Azure Databricks Model Serving endpoint for reproducible inference. Demonstrates the full MLOps lifecycle — feature engineering, multi-label model training and evaluation discipline, Unity Catalog Model Registry, drift monitoring. Methodologically inspired by Mullenbach et al. 2018 (CAML) on MIMIC-III/ICD-9; this work targets MIMIC-IV/ICD-10 and does not claim apples-to-apples benchmark equivalence (see [`DECISIONS.md`](../DECISIONS.md) 2026-04-26).
22
22
-**Out of scope:** Clinical decision support, real-world coding workflows, any production health-system deployment. The MIMIC-IV license restricts use to research and benchmarking on credentialed PhysioNet data only.
23
23
-**Users:** Data scientists and ML engineers evaluating production clinical NLP patterns; research teams benchmarking against this implementation on MIMIC-IV top-50 ICD-10.
24
24
25
25
## Training Data
26
26
27
27
Cohort definition, composition, and limitations are documented in [`reports/data_card.md`](data_card.md). Model-specific details:
28
28
29
-
- Modelable cohort: **122,288 admissions**.
29
+
- Modelable cohort: **122,283 admissions**.
30
30
- Splits: patient-level 80/10/10 by `subject_id`, seed = 42.
31
31
- Labels: top-50 ICD-10 codes, covering 91.04% of cohort admissions.
32
32
33
33
## Evaluation Data
34
34
35
35
-**Test split:** Held-out 10% of patients, no overlap with train or val.
-**Reference baseline:** Mullenbach et al. 2018 CAMLon MIMIC-III top-50 ICD-9 — Table 5 of the paper. Micro F1 = 0.614, Macro F1 = 0.532, P@5 = 0.609. P@8 is not reported for the top-50 setting.
37
+
-**Methodological inspiration:** Mullenbach et al. 2018 (CAML) established the multi-label ICD-coding benchmark on MIMIC-III/ICD-9 top-50 — its multi-label framing, patient-level evaluation discipline, and top-50 cardinality are inherited here. Numerical comparison is *not* methodologically valid because this work targets MIMIC-IV/ICD-10 (different dataset, different coding system, different cohort, different label space). See [`DECISIONS.md`](../DECISIONS.md) 2026-04-26.
38
38
39
-
Full evaluation methodology and comparison caveats are in [`reports/eval_report.qmd`](eval_report.qmd).
39
+
Full evaluation methodology is in [`reports/eval_report.qmd`](eval_report.qmd).
40
40
41
41
## Performance
42
42
43
-
| Metric | Target | Floor | Mullenbach 2018 CAML (MIMIC-III top-50) | Target Δ vs. CAML | Result |
Test-split results on MIMIC-IV-Note v2.2 + MIMIC-IV v3.1 Hosp, top-50 ICD-10 codes. Patient-level held-out test split, n=12,091 admissions, seed=42.
49
44
50
-
Baseline = TF-IDF (1–2 gram, min_df=5, max_features=200k) + One-vs-Rest Logistic Regression (`class_weight="balanced"`, liblinear solver, max_iter=1000) with per-label F1-optimal thresholds. Evaluated on held-out patient-level test split, n=12,091 admissions, seed=42. MLflow run `4e577699a67a4027bc27628e9b237ac5`. Baseline beats Mullenbach CAML on both F1 metrics; P@k is intentionally de-emphasized for the baseline and is the transformer branch's primary gate — see [`DECISIONS.md`](../DECISIONS.md) 2026-04-23.
CAML values from Mullenbach et al. 2018 Table 5 (MIMIC-III, 50 labels). See [`src/mimic_icd_coder/evaluate.py::MULLENBACH_CAML_TOP50`](../src/mimic_icd_coder/evaluate.py) for the citation.
52
+
Targets are absolute, not benchmark-relative. They reflect the operational threshold for "the transformer branch is delivering value over the baseline" rather than a literature comparison.
53
+
54
+
Baseline = TF-IDF (1–2 gram, min_df=5, max_features=200k) + One-vs-Rest Logistic Regression (`class_weight="balanced"`, liblinear solver, max_iter=1000) with per-label F1-optimal thresholds. MLflow run `4e577699a67a4027bc27628e9b237ac5`. P@k is intentionally de-emphasized for the baseline and is the transformer branch's primary gate — see [`DECISIONS.md`](../DECISIONS.md) 2026-04-23.
0 commit comments