Laya-IsoToken: Switch Clinical Coding Systems in Seconds Without Labeled Data

Laya-IsoToken decouples text reading from code classification, enabling zero-label code set switching via three-second compilation.
Laya-IsoToken addresses the pain point of re-annotating massive medical records when hospitals switch coding systems by proposing an architecture that decouples clinical text evidence reading from per-code classifiers. The reader is trained on the source system without binding to specific codes; when switching code sets, it only needs public code descriptions of the target system and uses closed-form matrix compilation to align concept spaces in under three seconds. On MIMIC-IV ICD-9 data, the model matches supervised baselines (Micro-F1 62.6%) and reduces active calibration error by 32%; when zero-shot switching to ICD-10, F1 is 5.4 points higher than semantic cross-mapping and 3.5 points higher than CMS official mapping, with per-admission latency of only 9.4 ms. Combined with geometric residual routing that directs unfamiliar concepts to an offline 31B verifier, zero-training ICD-10 coding achieves 40.6% Micro-F1 with 0.0% invalid-code hallucination. This architecture enables hospitals to deploy coding assistance on day one of a code set switch, changing the months-long deployment model of the past.
Hospitals have to update their disease classification and procedure coding systems every few years — from ICD-9 to ICD-10/11, and on to adjustments in DRG groupers. Each switch means massive volumes of historical medical records need to be re-annotated. Traditional supervised coding networks bind the clinical text encoder together with fixed per-code classification weights, so changing the code set means retraining from scratch; hospitals often need to annotate tens of thousands of records just to get the system back online. And using large language models directly for coding is not only high-latency but may also generate nonexistent invalid codes.

A recent study from rss proposes Laya-IsoToken, attempting to solve this "usable on day one" problem. Its core idea is to separate "reading the medical record" from "recognizing the code": a clinical span reader trained on the source coding system extracts textual evidence, and then closed-form matrix compilation maps public target code descriptions into the same concept space. The entire process requires no labeled medical records from the target system, and compilation takes less than three seconds.
Decoupling Textual Evidence from Code Classifiers
The key design of Laya-IsoToken is that the clinical span reader contains no per-code classification parameters. Traditional supervised models attach a fully connected layer after the encoder, with each code corresponding to a set of weights; changing the code set is equivalent to replacing the entire output layer. Laya-IsoToken instead separates textual evidence from historical disease prevalence during training — the reader is only responsible for locating code-relevant text fragments in the medical record, without binding to specific codes.
As a result, the reading capability trained on the source system can be retained, and switching code sets only requires handling concept alignment. This decoupling means the model's performance on the source system is not compromised either: on 32,804 ICD-9 discharge records from MIMIC-IV, Laya-IsoToken matched published supervised baselines with a Micro-F1 of 62.6%, while reducing active calibration error by 32%.
Active Calibration Error is a metric that measures the deviation between predicted confidence and actual accuracy in active learning or distribution shift scenarios. In high-risk tasks like medical coding, models need not only to predict codes but also to provide reliable confidence scores to support human review. After a code set change, traditional supervised models often suffer severe calibration failure because the output layer weights change completely, leading to large numbers of high-confidence errors. By decoupling the reader from the classifier, Laya-IsoToken retains the evidence extraction capability learned on the source system, allowing it to maintain good calibration performance on the target system without retraining; the reported 32% reduction refers to the improvement in this metric relative to the baseline.
Closed-form Compilation: Switching Code Sets in Three Seconds
The hardest part of changing code sets is concept alignment. The same disease may be described with different wording across coding systems, and there is substantial duplication and subtle variation among sibling codes. Laya-IsoToken's approach is: given public code descriptions of the target system, use closed-form matrix compilation to align distribution shifts, compensate for paraphrase differences, and deduplicate sibling codes. The entire process requires no target labeled data, and compilation completes in under three seconds.
The research team conducted zero-target-training-note switching tests on 13,783 unseen patients' ICD-10 discharge records, MS-DRG grouping, and multilingual cohorts. Results show that Laya-IsoToken outperforms biomedical dense retrievers and semantic cross-mapping, with F1 higher by 5.4 points on ICD-10 (paired d_z=0.49, p<0.001); it also outperforms the official US CMS equivalence mapping by 3.5 points (p<0.001). Per-admission processing latency is 9.4 milliseconds.
Closed-form Matrix Compilation refers to a method that directly computes the mapping matrix using an analytical solution rather than iterative optimization. In Laya-IsoToken, given the concept space of the source system and the text embeddings of public code descriptions in the target system, a linear system (such as the closed-form solution of least squares or ridge regression) is solved to align the two distributions. Compared with gradient descent training, the closed-form solution requires no target labeled data, no hyperparameter tuning, and has fixed and extremely low computational cost, thus enabling compilation of the entire code set mapping within three seconds. Its core assumption is that the concept space has a linearly alignable structure, while sibling code deduplication and paraphrase difference compensation are achieved through preprocessing of description text and matrix regularization.
Geometric Residual Routing and Offline Verification
Zero-shot switching inevitably encounters codes unfamiliar in the concept space. Before deployment, Laya-IsoToken computes a geometric residual and routes unfamiliar concepts to an offline language model for verification. This design separates online coding from offline validation, maintaining low latency while reducing the risk of invalid codes.
Pairing the reader with an offline 31B verifier, on 1,000 complete discharge summaries, zero-training ICD-10 coding Micro-F1 rises to 40.6% (category F1 57.0%, d_z=0.66, p<0.001), with invalid-code hallucination at 0.0%. This shows that the offline verification step can indeed catch the edge cases in zero-shot switching.
Geometric Residual Routing is an uncertainty detection mechanism based on the geometric properties of the concept space. Before deployment, the model computes for each target code the residual distance between its description embedding and the source system's concept clusters: if the residual exceeds a threshold, it indicates that the code has no sufficiently close neighbors in the source space and is an "unfamiliar concept," which is routed to an offline large language model for verification during online coding. This approach avoids the latency overhead of calling large models online while using the offline 31B model for fine-grained judgment of edge cases, thereby reducing invalid-code hallucination to 0.0% while maintaining 9.4-millisecond online latency.
What This Means for Hospital Coding Systems
The significance of this research is not in topping some benchmark score, but in changing the economics of deploying coding systems. In the past, changing code sets meant re-annotation, retraining, and re-validation, with cycles measured in months; Laya-IsoToken compresses the switch to seconds of compilation plus one offline verification, making it possible for hospitals to have usable coding assistance on day one of the target system's launch.
Of course, the absolute performance of zero-shot switching still has room for improvement — 40.6% Micro-F1 is still far from fully replacing manual coding. But considering that it requires no target labeled data, this starting point is already sufficient to support a "deploy first, iterate later" strategy. For multilingual medical systems and markets with frequently adjusted grouping rules, this quickly switchable architecture may have more practical value than simply pursuing higher benchmark scores.
DRG Grouper is a core component of hospital insurance settlement. It assigns inpatient cases to corresponding diagnosis-related groups based on principal diagnosis, procedures, complications, and other codes, thereby determining payment standards. Grouping rules are typically adjusted annually or every few years, and grouper versions differ significantly across countries/regions. Traditionally, grouper adjustments also require retraining of coding systems, because changes in the code output distribution affect grouping accuracy. Laya-IsoToken's zero-shot switching capability allows coding assistance systems to adapt quickly independently of grouper versions — hospitals only need to update target code descriptions to complete compilation, without re-annotating medical records, thereby compressing the system deployment cycle caused by grouping rule adjustments from months to seconds of compilation plus offline verification.
Related articles

GLM-5.4 Loop Transformer Deep Dive: Architecture and Cost-Effectiveness
An in-depth analysis of GLM-5.4's Loop Transformer architecture: shared-weight looping, 30B ablation data, multi-model API cost simulations, strong-weak collaboration strategies, and the challenges of scaling computational depth.

Zhipu GLM-5.4 Debuts Loop Transformer, Upgrading Coding and Vision
Zhipu releases GLM-5.4, debuting the Loop Transformer architecture, adding vision capabilities and stronger coding, with existing users' quota raised to 1.5x. Also covers MiniMax H3's low-VRAM runtime, the information compression perspective, and subscription ecosystem developments.

Zhipu GLM-5.4 Released: 750B Model Achieves 2-3 Trillion Parameter-Level Intelligence
Zhipu releases GLM-5.4, a 750B model achieving 2-3 trillion parameter-level intelligence via repeated layers, with a 30B experiment showing major math reasoning gains plus new vision capabilities and generalized programming applications.