MCP
arXivarXiv
Preprint
Published: August 2, 2026
cs.LG

xMICD: Explainable Representation of Multiple ICD Codes

Abstract
Electronic Health Records (EHRs) are widely used for clinical risk prediction using machine learning. International Classification of Diseases (ICD) codes provide structured information about patient diagnoses, but representing them effectively remains challenging. Existing approaches often face a trade-off between predictive performance and interpretability: grouping-based representations are interpretable but may lose information, while embedding-based representations achieve strong predictive performance but are difficult to interpret. We propose Explainable Representation of Multiple ICD Codes (xMICD), a method for constructing low-dimensional patient representations from sets of ICD codes. xMICD combines clinically meaningful diagnostic groupings with similarity in a pre-trained ICD embedding space. Instead of using binary group membership, the method assigns codes to groups via similarity-based relative assignments, yielding features that reflect how closely a patient's diagnoses align with each clinical group. Experiments on large-scale EHR datasets demonstrate that xMICD achieves predictive performance comparable to embedding-based representations such as ICD2Vec across multiple clinical prediction tasks. At the same time, the resulting features remain clinically interpretable because each dimension corresponds to a recognizable diagnostic group. xMICD therefore provides a practical way to integrate embedding-based semantic relationships into interpretable clinical feature spaces for machine learning models.
0
AI overview
Reviews
Citation graph
References · 45
Structured
This preview uses generator v1; v2 is available

Overview

This paper proposes xMICD, an interpretable representation method for multiple ICD codes, which strikes a middle balance between prediction performance and interpretability by combining semantic similarity in a pretrained ICD embedding space with clinically meaningful anchor groupings.

Background on the Core Problem of ICD Code Representation in Electronic Health Records

Electronic health records (EHRs) have been widely used in machine-learning-based clinical risk prediction tasks, in which International Classification of Diseases (ICD) codes provide structured information related to patient diagnoses and serve as the core structured input for such clinical modeling tasks. Building effective representations of ICD codes remains a clear challenge to this day, and existing schemes generally face the trade-off dilemma between prediction performance and interpretability: grouping-based representation schemes offer good interpretability but may lose detail information carried by the original codes during the grouping mapping process; embedding-based representation schemes can achieve stronger prediction performance, but the resulting implicit vectors are difficult for stakeholders in clinical settings to interpret.

Characteristics and Trade-offs of Existing ICD Representation Schemes

There is a clear inherent trade-off between the two existing mainstream ICD code representation schemes. Binary grouping-based representation schemes offer extremely strong readability and traceability, but may lose some of the valid information carried by the original ICD codes during construction.

Embedding-based representation schemes, represented by ICD2Vec, can capture rich semantic associations between different ICD codes and preserve more predictive signals usable for downstream tasks, but such distributed representations provide almost no interpretability.

The Core Design Goals and Framework Positioning of xMICD

xMICD (Interpretable Multiple ICD Codes representation) is an ICD code representation method proposed for electronic health record scenarios, whose core design goal is to balance prediction performance in downstream clinical prediction tasks with the interpretability of the representation itself. The method maps a patient's entire set of ICD codes into a single low-dimensional vector, where every dimension of the vector corresponds to a code grouping with clear clinical meaning, such as ICD-10-CM standard blocks. This design places xMICD directly in the middle ground between the two traditional ICD representation schemes: it retains the dimension-level semantic interpretability characteristic of grouping-based representations, while avoiding the information loss problem of purely binary indicators through an embedding-related mechanism.

Unlike the traditional approach of using only a binary flag to determine whether a patient belongs to a grouping, xMICD introduces a relative assignment mechanism based on similarity in a pretrained ICD embedding space. The final value of each dimension directly reflects the similarity between the patient's diagnosis set and the corresponding predefined clinical reference group, capturing graded associations between diagnoses and clinical groupings rather than a simple binary 'present/absent' flag. This design neither turns the representation space into a completely uninterpretable dense embedding, nor falls back to hard grouping flags with extremely coarse information granularity, achieving a fusion of the advantages of both traditional schemes.

The Computation Pipeline and Implementation Mechanism of xMICD

The computation of xMICD first computes raw similarities for every input ICD code and every preset anchor, yielding a similarity matrix whose dimensions equal the total number of codes multiplied by the total number of anchors. To eliminate scale differences between codes and focus on the relative importance of anchors for each code, the method applies a row-wise min-max scaling normalization to each row of the similarity matrix. You can use the figure below to fully trace the end-to-end design logic from ICD code input to the final anchor-based representation output.

Fig. 1: Overview of the xMICD computation pipeline: map a set of ICD codes into the embedding space, compute similarities with anchor groupings, normalize within each code, and aggregate across codes to obtain the final anchor-based representation

After row-wise normalization is complete, the method aggregates the normalized similarities of all codes within the same visit across codes, ultimately producing an xMICD representation vector whose dimension equals the total number of anchors. The value of each dimension of this vector does not represent the absolute geometric distance between codes and the corresponding anchor, but rather characterizes whether that anchor is relatively dominant among all codes in the visit: if a dimension takes the value 1, the corresponding anchor is the anchor with the highest normalized similarity for at least one code; if the value is less than 1, the anchor never ranked first in the similarity ordering of any code, and the lower the value, the more persistently disadvantaged it was in the anchor comparisons across all codes. This design means xMICD ultimately encodes the contextual dominance relationships of anchors among the visit's full set of codes, rather than global absolute similarities.

Validation Results of xMICD Performance and Interpretability Across Multiple Tasks

xMICD representations built on ICD2Vec embeddings, except for the ECI-based variant, achieve prediction performance comparable to ICD2Vec itself on downstream clinical prediction tasks. For XGBoost models, xMICD occasionally slightly outperforms ICD2Vec, while for MLP models, ICD2Vec usually retains only a marginal performance advantage; the overall performance difference between the two representations is small, demonstrating that xMICD preserves the vast majority of ICD2Vec's predictive capability while providing a more structured and more interpretable representation.

The similarity agreement between the different xMICD variants and the original ICD2Vec representation is far higher than that of binary grouping-based representation schemes. Among them, xMICD-FPS shows the highest agreement with ICD2Vec, followed in order by xMICD-CCSR, xMICD-Block, and xMICD-ECI, whereas the correlation coefficients between binary grouping features and ICD2Vec all fall in a clearly lower range.

The features of binary grouping representations directly correspond to clinical concepts familiar to clinicians, such as diagnoses, comorbidities, or disease categories, and are overall highly readable, whereas the dimensions of embedding-based representations like ICD2Vec correspond to implicit numerical components without clearly interpretable labels and cannot be directly interpreted. Every dimension of the xMICD representation is anchored to a clinically meaningful diagnosis grouping, so it largely retains readability: clinical practitioners can associate each feature with an identifiable disease category, even though the specific feature values are obtained through similarity computation.

By fusing embedding-based similarity computation with clinically meaningful anchors, xMICD representations provide an intermediate form of explanatory capability. Taking the xMICD-CCSR representation as an example, each feature corresponds to the similarity between the patient's diagnosis records and a specific disease grouping, and the resulting explanations both meet the requirements of clinical interpretability and reflect the complex associations learned in the embedding space.

Core Conclusions and Method Boundaries

Through multi-task validation results, the study clearly supports its core hypothesis: high interpretability does not necessarily require sacrificing predictive capability. Except for the ECI-based variant, xMICD achieved prediction performance comparable to ICD2Vec on the vast majority of downstream prediction tasks, with the performance gap between the two methods remaining low, directly validating the validity of this hypothesis.

xMICD is a flexible framework for interpretable patient representation of multiple ICD codes, designed with the goal of balancing prediction performance and clinical interpretability. The method's validity depends on two core components: a pretrained ICD embedding model (e.g., ICD2Vec), and a clinically defined ICD grouping system (e.g., Blocks, CCSR). The framework fuses these two components through a relative assignment mechanism, and the resulting low-dimensional patient diagnosis representation captures semantic associations between co-occurring ICD codes while keeping its representation logic interpretable to clinical practitioners.

Rating
No ratings yet
Rate
Community rating
—
/ 5
No ratings yet
Rating
—
Soundness
—
Presentation
—
Contribution
—
Confidence
—
Discussion
Top
Newest
Questions
Replication
Author
No comments yet — be the first