Laya-IsoToken: Day-One Clinical Codebook Switching via Closed-Form Operator Compilation
Organizations: Department of Computer Science, University of Surrey, Guildford, UK
Abstract
Healthcare systems periodically revise diagnostic and procedural classifications (ICD-9 to ICD-10/11), update hospital reimbursement groupers (MS-DRG), and deploy clinical coding across languages. Supervised coding networks bind clinical text encoders to fixed per-code classifier weights, forcing hospitals to re-annotate tens of thousands of records before switching codebooks, whereas standalone large language models incur high latency and hallucinate invalid codes. Here we show that day-one clinical codebook switching becomes feasible without target-labeled notes when local clinical evidence reading is decoupled from a strictly frozen multilingual concept space. Laya-IsoToken trains a clinical span reader once on source records with zero per-code classifier parameters, separating text evidence from historical disease prevalence. Given only public target code descriptions, closed-form matrix compilation aligns distributional shifts, compensates for paraphrased definitions, and deduplicates sibling codes in under three seconds, while a pre-deployment geometric residual routes unfamiliar concepts to offline language model verification. Across 32,804 MIMIC-IV ICD-9 discharges, Laya-IsoToken matches published supervised baselines (62.6% Micro-F1) while reducing active calibration error by 32%. Switched with zero target training notes to 13,783 unseen-patient ICD-10 discharges, MS-DRG groups, and multilingual cohorts, it outperforms biomedical dense retrievers, semantic crosswalks (+5.4 F1 points on ICD-10, paired , ), and official US CMS equivalence mappings (+3.5 points, ) at 9.4 ms per admission. Pairing this reader with an offline 31B verifier across 1,000 full discharge summaries lifts zero-training ICD-10 coding to 40.6% Micro-F1 (57.0% category F1, , ) with 0.0% invalid code hallucinations.
Figures & tables
| Model | Label Params | Exact Edin Frequent ( codes) | Active ECE | Latency | |||||
|---|---|---|---|---|---|---|---|---|---|
| MiF1 | MaF1 | MiAUC | MaAUC | MiAUPRC | MaAUPRC | ms/note | |||
| Published supervised reference baselines on identical split (Edin et al. [ 3 ] ) | |||||||||
| CNN [ 3 ] | Per-code | 52.4 | 12.6 | 98.1 | 89.4 | — | — | — | — |
| Bi-GRU [ 3 ] | Per-code | 55.5 | 16.6 | 98.8 | 93.8 | — | — | — | — |
| CAML [ 6 ] | Per-code | 58.6 | 19.3 | 98.8 | 90.7 | — | — | — | — |
| MultiResCNN [ 7 ] | Per-code | 60.4 | 27.7 | 99.2 | 95.1 | — | — | — | — |
| Method (0 target notes unless noted) | MIMIC ICD-10 Test (26K) | MS-DRG Test (1.6K) | ES CodiEsp | EL Cardio | ZH CHIP | ||||
|---|---|---|---|---|---|---|---|---|---|
| MiF1 | Proc | Rare | R@50 | Top-1 | R@50 | Test MiF1 | MiF1 | MiF1 | |
| BM25 Lexical Baseline [ 29 ] | 5.71 | 0.00 | 1.59 | 14.01 | 0.91 | 27.44 | 12.76 | 0.00 | 35.62 |
| ZeroShot MedCPT (biomedical bi-encoder) [ 30 ] | 0.72 | 0.33 | 0.14 | 2.05 | 1.21 | 20.03 | 0.01 | 9.59 | 0.01 |
| ZeroShot BioLORD-2023-M (ontology bi-encoder) [ 31 ] | 2.25 | 1.08 | 1.12 | 6.76 | 3.44 | 48.98 | 0.64 | 12.02 | 0.96 |
| ZeroShot Qwen3-0.6B (bi-encoder) [ 19 ] | 2.75 | 1.63 | 1.61 | 9.92 | 3.23 | 42.49 | 0.42 | 9.64 | 5.08 |
| Laya-PLM-ICD + CAST-Norm (3s) [ 17 ] | 4.41 1.05 | 0.75 0.05 | 1.14 0.22 | 23.64 2.02 | 1.95 0.08 | 36.37 0.94 | 0.36 0.03 | 13.74 1.19 | 0.24 0.03 |
| Configuration | Src ICD-9 | MiF1 | Prec | Rec | Diag | Proc | Rare | R@50 |
| Frozen clinical reader + MLP label head (self-encoded labels) | 16.8 | 7.34 | 7.53 | 7.16 | 7.80 | 0.00 | 0.04 | — |
| Frozen clinical reader + aligned cosine head (self-encoded labels) | 35.2 | 10.88 | 12.53 | 9.62 | 12.30 | 0.88 | 0.42 | — |
| Frozen clinical reader + 256-token chunk isometric head | 34.4 | 11.12 | 15.31 | 8.74 | 12.15 | 0.26 | 0.63 | — |
| Laya-IsoToken (12 layers unfrozen, , Qwen3 vectorizer) | 60.9 | 30.01 | 32.79 | 27.67 | 32.27 | 3.54 | 7.66 | — |
| Laya-IsoToken (22 layers unfrozen, , Qwen3 vectorizer) | 62.2 | 30.31 | 35.54 | 26.43 | 32.70 | 2.94 | 8.47 | 51.64 |
| Laya-IsoToken (22 layers, prior-deconfounded , raw cosine) | 62.2 | 25.06 | 22.71 | 27.95 | 27.36 | 6.32 | 11.95 | — |
| Routing Arm | MiF1 | 3-Char | Proc | Prec | Rec | Invalid | Latency (s) | LLM |
|---|---|---|---|---|---|---|---|---|
| Compact open-weight System-2 verifier: Qwen3.5-9B ( , 295 unseen patients, untruncated notes) | ||||||||
| Standalone Qwen3.5-9B (zero-shot) | 12.48 | 26.03 | 0.00 | 17.22 | 9.79 | 70.3% | 18.73 | 100% |
| Laya-IsoToken Qwen3.5-9B Full Audit | 30.73 | 50.72 | 4.90 | 30.59 | 30.88 | 0.0% | 8.83 | 100% |
| Laya-IsoToken Qwen3.5-9B Confidence-Anchored ( ) | 31.82 | 52.87 | 5.00 | 29.32 | 34.79 | 0.0% | 8.83 | 100% |
| Extrapolation-Guided Qwen3.5-9B (20% escalated) | 32.62 | 52.53 | 3.19 | 35.68 | 30.04 | 0.0% | 1.79 | 20% |
| Frontier open-weight System-2 verifier: Gemma-4-31B-it ( , 935 unseen patients, untruncated notes) | ||||||||
| Inputs: Frozen source span reader with global scalars and validation thresholds ; aggregate source codebook summary ; public target codebook with optional group rules ; offline frozen vectorizer ; optional offline LLM verifier and escalation budget . |
|---|
| Phase I: One-Time Offline Codebook Compilation ( – , zero target clinical notes) |
| 1. Vectorize public descriptions: Encode for all (and pool group centroids if ). |
| 2. Pre-deployment extrapolation risk: Center and compute (Eq. 8 ). |
| 3. Distribution alignment: Inspect public metadata of ; set via Eq. 5 (non-Latin or ), (single-label uppercase ), or ; normalize . |
| 4. Paraphrase gain & bias compilation: Compute nearest source affinity and ; compile Wiener gain (Eq. 6 ), whitened CSLS offset , and cardinality/prior bias (Eq. 7 ) with threshold . |
| Return compiled artifact . |
| Subgroup Stratum | Admissions | Patients | Laya-IsoToken | Crosswalk | F1 | Laya-IsoToken P / R |
| Sex | ||||||
| F | 6,883 | 4,167 | 32.16 | 27.23 | +4.93 | 37.1 / 28.4 |
| M | 6,900 | 4,088 | 32.38 | 28.10 | +4.28 | 36.2 / 29.3 |
| Clinical Service | ||||||
| Medicine | 7,529 | 4,427 | 35.66 | 30.96 | +4.70 | 39.3 / 32.6 |
| OB/GYN | 482 | 394 | 21.07 | 14.15 | +6.92 | 32.9 / 15.5 |
| ICD-10 Clinical Chapter | Gold Instances | Unique Codes | Laya-IsoToken | Crosswalk | F1 |
|---|---|---|---|---|---|
| Health Status/Factors (Z) | 31,178 | 544 | 37.73 | 36.83 | +0.90 |
| Circulatory (I) | 27,576 | 664 | 27.02 | 17.54 | +9.48 |
| ICD-10-PCS Procedures | 23,576 | 3,987 | 2.93 | 1.38 | +1.55 |
| Endocrine/Metabolic (E) | 22,506 | 259 | 46.24 | 43.34 | +2.91 |
| Symptoms/Signs (R) | 13,813 | 412 | 35.54 | 32.16 | +3.39 |
| Digestive (K) | 12,827 | 479 | 34.03 | 25.59 | +8.44 |
| Benchmark Split | Lang | Catalog Size | Admissions | Unique Patients | Overlap Control | Evaluation Role |
| MIMIC-IV ICD-9 Source Train | EN | 11,324 | 154,542 | 72,216 | 0 | Source training |
| MIMIC-IV ICD-9 Source Val | EN | 11,324 | 21,980 | 10,068 | 0 | Model/threshold selection |
| MIMIC-IV ICD-9 Locked Test | EN | 11,324 (6,150 freq.) | 32,804 | 15,425 | 0 | Locked in-domain test |
| MIMIC-IV ICD-10 Dev (disjoint) | EN | 26,085 | 9,077 | 5,394 | 4,301 excl. | Dev ablation only |
| MIMIC-IV ICD-10 Locked Test (disjoint) | EN | 26,085 | 13,783 | 8,255 | 6,019 excl. | Locked zero-train test |
| MIMIC-IV ICD-10 Cascade-300 / 1,000 | EN | 26,085 | 300 / 1,000 | 295 / 935 | Disjoint subset | Locked System-2 audit |
| Operating Point / Audit Stratum | MiF1 / Top-1 | MiAUC / Base | MiAUPRC / PCS / Gap | Active ECE / | Active Brier | Latency / Note |
| Panel A: Locked MIMIC-IV ICD-10 calibration progression ( , Qwen3 codebook, seed 42, GPU Span-NMS) | ||||||
| Raw cosine (0 operators) | 25.17 | 97.17 | 15.57 | 0.0537 | 0.1219 | 9.07 ms |
| + CSLS hubness centering ( ) | 25.72 | 97.16 | 16.22 | 0.0473 | 0.1247 | 9.02 ms |
| + Centered Bayesian Prior Proj. ( ) | 30.35 | 97.43 | 20.88 | 0.1192 | 0.1210 | 9.06 ms |
| + Full Compiled Policy (Wiener + Span-NMS) | 32.27 | 97.42 | 19.91 | 0.1341 | 0.1227 | 9.41 ms |
| Panel B: Zero-target public fan-out-gated CMS GEMs PCS hybrid on locked ICD-10 test (3 seeds, ) | ||||||
| Offline Codebook Vectorizer | Lang | Syn8 | ICD-9 MiF1 | ICD-9 MaAUC | ICD-10 MiF1 | ICD-10 Pure | MS-DRG (Base) | ES Test | EL | ZH | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Self-encoded reader (frozen mmBERT mean-pool) | 768 | Multi | 0.42 | — | — | 11.12 (dev) | — | 0.27 (dev) | 0.03 (dev) | 11.78 | 0.02 |
| all-MiniLM-L6-v2 (22M, EN-only) [ 34 ] | 384 | EN | 0.83 | 62.19 | 96.92 | 31.00 | 27.82 | 6.07 (12.9) | 2.27 | 15.42 | 0.00 |
| Qwen3-Embedding-0.6B (causal) [ 19 ] | 1024 | Multi | 0.82 | 62.26 | 97.39 | 32.28 | 28.10 | 4.58 (10.0) | 5.23 | 13.33 | 0.86 |
| pplx-embed-v1-0.6B (bidir.) [ 20 ] | 1024 | Multi | 0.62 | 62.62 | 97.41 | 30.12 | 26.47 | 6.21 (14.5) | 4.23 | 18.85 | 0.78 |
| Qwen3-Embedding-4B (causal) [ 19 ] | 2560 | Multi | 0.80 | 62.50 | 97.57 | 33.01 | 30.17 | 8.80 (18.0) | 6.86 | 13.46 | 0.94 |
| Benchmark (Clusters) | Paired Comparison | Score | 95% Bootstrap CI | Two-sided | Cohen’s | Win Rate | |
|---|---|---|---|---|---|---|---|
| MIMIC-IV ICD-9 Test ( pat.) | Laya-IsoToken (Qwen3, 3s) vs. Laya-PLM-ICD | +0.50% | +0.04 | +0.07 | 53.4% | ||
| MIMIC-IV ICD-9 Test ( pat.) | Laya-IsoToken (pplx, 3s) vs. Laya-PLM-ICD | +0.74% | +0.08 | +0.10 | 55.2% | ||
| MIMIC-IV ICD-10 Test ( pat.) | Laya-IsoToken (Qwen3, 3s) vs. ZeroShot BioLORD-2023-M | +29.95% | +1.80 | +0.96 | 98.0% | ||
| MIMIC-IV ICD-10 Test ( pat.) | Laya-IsoToken (Qwen3, 3s) vs. Semantic Crosswalk | +5.36% | +0.49 | +0.45 | 72.4% | ||
| MIMIC-IV ICD-10 Test ( pat.) | Laya-IsoToken (Qwen3, 3s) vs. Official CMS GEMs+NMS | +3.53% | +0.07 | +0.11 | 55.5% | ||
| MIMIC-IV ICD-10 Test ( pat.) | Laya-IsoToken (Qwen3-4B vs. 0.6B, s42) | +0.73% | +0.02 | +0.03 | 51.7% |
Automated Medical Coding
Automated medical coding uses clinical records and coding rules to assign standardized diagnosis and procedure codes for billing, care, and research.
See all 28 papers