ICDBigBird: A Contextual Embedding Model for ICD Code Classification

George Michalopoulos, Michal Malyska, Nicola Sahar, Alexander Wong, Helen H. Chen

Introduction

Assigning International Classification of Diseases (ICD) codes to clinical notes is a critical task in healthcare, impacting patient outcomes and hospital billing. However, automated ICD coding faces two primary challenges: the extreme length of clinical discharge summaries and the complex interdependencies between medical codes. Standard transformer models, such as BERT, are typically limited to 512 tokens, whereas clinical summaries in datasets like MIMIC-III often exceed 1,600 words. Furthermore, most models treat ICD codes as independent labels, ignoring the contextual relationships between diagnoses.

To address these limitations, we present ICDBigBird, a model designed to process long-form clinical text while explicitly modeling code relationships through graph-based embeddings.

Methodology

The ICDBigBird architecture integrates three core components to optimize multi-label classification of clinical notes:

  1. BigBird Backbone: Utilizing a sparse attention mechanism, BigBird extends the context window to 4,096 tokens. This allows the model to capture information across nearly the entire discharge summary, avoiding the data loss associated with truncation in standard transformers.
  2. ICD-GCN (Graph Convolutional Network): To capture code relationships, a graph is constructed where nodes represent ICD codes. Edges are defined using Normalized Point-wise Mutual Information (NPMI) based on code co-occurrence in training data. The GCN refines these embeddings, enriching the representation of each code by incorporating information from its neighbors.
  3. Label Attention Layer: A per-label attention mechanism enables the model to identify specific text segments relevant to each individual ICD code across the entire document.
  4. Optimization: The model employs Label-Distribution Aware Margin (LDAM) loss to mitigate the challenges posed by the long-tail distribution of medical codes, encouraging larger decision margins for rare classes.
The ICDBigBird architecture, featuring the BigBird backbone, ICD-GCN for code embeddings, and a label-specific attention mechanism.

Experimental Setup

The model was evaluated using the MIMIC-III (Medical Information Mart for Intensive Care) dataset, specifically targeting the top 50 most frequent ICD codes. The dataset was partitioned into 8,066 training, 1,573 validation, and 1,729 testing documents.

Results and Analysis

ICDBigBird achieved state-of-the-art performance on several key metrics, particularly in F1 scores, which are critical for imbalanced multi-label tasks. While the DCAN model showed a marginal advantage in AUC-ROC, ICDBigBird significantly outperformed existing baselines in Macro and Micro F1 scores.

Performance Comparison

Metric ICDBigBird Previous SOTA (DCAN)
Macro F1 63.1 61.5
Micro F1 69.6 67.1
P@5 65.4 64.2

Ablation Study and Key Insights

Detailed analysis revealed several critical factors contributing to the model's success:

  • Context Length: Restricting BigBird to a 512-token limit resulted in a sharp performance decline, confirming that clinical notes contain statistically significant information beyond the initial paragraphs.
  • Co-occurrence Modeling: Modeling relationships via NPMI proved more effective for the top 50 codes than relying on the official ICD hierarchy.
  • Embedding Initialization: Initializing embeddings with official definitions and refining them via GCN provided a superior starting point compared to random initialization.
Comprehensive results table comparing ICDBigBird with baseline models and detailing the ablation study findings.

Conclusion

ICDBigBird demonstrates that combining long-context transformer architectures with graph-based label modeling significantly improves automated ICD coding. Future work will focus on scaling these mechanisms to handle the full spectrum of thousands of ICD codes and evaluating the model's generalizability across diverse, multi-lingual clinical datasets.

Summary updated

BibTeX
@inproceedings{michalopoulos2022icdbigbird,
  author = {George Michalopoulos and Michal Malyska and Nicola Sahar and Alexander Wong and Helen H. Chen},
  title = {{ICDBigBird: A Contextual Embedding Model for ICD Code Classification}},
  booktitle = {BioNLP @ ACL},
  year = {2022},
  doi = {10.18653/v1/2022.bionlp-1.32},
}
Figure