Few-Shot Electronic Health Record Coding through Graph Contrastive Learning

Shanshan Wang, Pengjie Ren, Zhumin Chen, Zhaochun Ren, Huasheng Liang, Qiang Yan, Evangelos Kanoulas, Maarten de RijkearXiv 2021

TL;DR

This paper introduces CoGraph, a novel framework for Electronic Health Record (EHR) coding that tackles the challenge of imbalanced ICD code distribution by framing it as a few-shot learning problem. CoGraph leverages graph contrastive learning to build robust representations of EHRs, significantly improving performance on both common and rare ICD codes.

What Problem Does This Paper Address?

Accurately assigning International Classification of Diseases (ICD) codes to Electronic Health Records (EHRs) is crucial for healthcare management, billing, and epidemiology. However, this task is notoriously difficult due to the extremely imbalanced distribution of ICD codes: a few codes are very frequent, while the vast majority are rare. Traditional machine learning models often excel at predicting frequent codes but struggle with rare ones due to a lack of training data. Existing methods either focus only on frequent codes, making them impractical, or treat all codes equally, leading to poor performance on rare codes. Some approaches try to improve rare code prediction through data augmentation, but this relies heavily on external knowledge or synthetic data, which can be hard to obtain. This paper aims to bridge this gap by developing a method that effectively handles both frequent and rare ICD codes within a few-shot learning paradigm.

Methods

CoGraph tackles EHR coding as a few-shot learning problem by representing each EHR as a Heterogeneous EHR Word-Entity (HEWE) graph. These graphs capture relationships between words and medical entities within an EHR. The core innovation lies in two graph contrastive learning schemes designed to pre-train a powerful graph encoder:

  • Graph Sampling Contrastive Learning (GSCL): This scheme focuses on the intra-correlation within a single HEWE graph. It works by sampling sub-graphs from a HEWE graph and training the encoder to recognize similarities between these sub-graphs, thereby learning robust structural features.
  • Graph Evolution Contrastive Learning (GECL): This scheme captures inter-correlation across HEWE graphs from the same patient over time. By treating a sequence of HEWE graphs as an evolving entity, GECL learns to identify temporal coherence and predict future states based on historical data.

These contrastive learning methods are self-supervised, meaning they don't require ICD labels during pre-training, allowing them to learn generalizable features. This pre-trained encoder is then used in a few-shot learning stage where the model learns to classify new ICD codes with only a few examples.

Datasets

The experiments were conducted on the MIMIC-III dataset, a widely used, large, and publicly available database of de-identified health-related data. The paper notes that the MIMIC-III dataset exhibits extreme imbalance in ICD code distribution, making it a challenging benchmark for this task.

Key Insights and Ideas

  • Few-Shot Learning for EHR Coding: Reframing EHR coding as a few-shot problem is a promising direction, especially for handling rare ICD codes where labeled data is scarce.
  • Graph Representation is Key: Building rich graph representations (HEWE graphs) that capture the complex relationships within EHRs is crucial for effective coding.
  • Contrastive Learning for Generalization: Self-supervised contrastive learning (GSCL and GECL) is vital for learning transferable features that are independent of specific ICD codes, which is essential for few-shot learning.
  • Complementary Nature of GSCL and GECL: GSCL captures local structural information within a graph, while GECL captures temporal dynamics across graphs. Combining both leads to a more robust pre-trained encoder.
  • Addressing the Rare Code Challenge: The significant performance gains on rare ICD codes highlight the effectiveness of CoGraph's approach in transferring knowledge from frequent to rare categories.

Key Results

CoGraph significantly outperforms state-of-the-art methods on the MIMIC-III dataset for both frequent and rare ICD codes.

  • Rare ICD Codes: CoGraph achieved the best performance across most metrics. Notably, the F1 score saw an improvement of 2.95% over the best baseline (PrototypeNet-attention) and a substantial 47.23% improvement over the worst baseline (MLP).
  • Frequent ICD Codes: CoGraph also achieved the best performance on ACC, Recall, and F1. The F1 score improved by 0.61% over the best baseline (PrototypeNet-attention).
  • Ablation Study: Removing either GSCL or GECL led to a significant drop in performance, demonstrating the importance of both contrastive learning schemes. For instance, removing both resulted in F1 score drops of 7.27% for rare and 6.12% for frequent ICD codes.

Limitations and Future Work

  • Limited Feature Extraction: CoGraph currently only extracts high-frequency words and entities from EHR text. It does not explicitly incorporate external medical knowledge or rules (e.g., concurrency or hierarchy of ICD codes).
  • Future Work: The authors plan to model correlations of ICD codes to learn better transferable features. They also aim to further improve classification performance, particularly for rare ICD codes, by incorporating medical knowledge and rules.

Summary updated

BibTeX
@misc{wang2021few,
  author = {Shanshan Wang and Pengjie Ren and Zhumin Chen and Zhaochun Ren and Huasheng Liang and Qiang Yan and Evangelos Kanoulas and Maarten de Rijke},
  title = {{Few-Shot Electronic Health Record Coding through Graph Contrastive Learning}},
  year = {2021},
  eprint = {2106.15467},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2106.15467},
}
Figure