Modeling electronic health record data using a knowledge-graph-embedded topic model

Yue Li, Yuesong Zou, Ahmad Pesaranghader, Aman Verma, David L. Buckeridge, Yue Li 0017arXiv 2022 · DOI

Introduction

Electronic Health Records (EHRs) are a cornerstone of modern clinical research, offering a longitudinal view of patient health. However, modeling this data is notoriously difficult due to its high dimensionality, extreme sparsity, and inherent noise. Most patients only possess a small fraction of the thousands of possible medical codes, making it hard for traditional models to learn meaningful patterns.

Standard topic models, such as Latent Dirichlet Allocation (LDA), treat medical codes (e.g., ICD-9 for diagnoses) as independent "words" and patient histories as "documents." These models are often "knowledge-blind," failing to recognize that "Type 2 Diabetes" is clinically related to "Insulin." This lack of context makes it nearly impossible to accurately model rare diseases or infrequent drug prescriptions. To address this, researchers developed KG-ETM, an end-to-end framework that anchors latent disease topics in a medical knowledge graph.

Methodology

The Knowledge-Graph-Embedded Topic Model (KG-ETM) bridges the gap between raw EHR data and clinical domain knowledge through a deep learning architecture. The framework relies on several key innovations:

  1. Graph Attention Networks (GAT): Rather than learning code embeddings from scratch, the model uses a GAT to process a medical knowledge graph. This graph includes hierarchical taxonomies of ICD-9 and ATC codes, along with known links between drugs and the diseases they treat.
  2. Graph Augmentation: To improve information flow, every node in the hierarchy is connected to all of its ancestors. This ensures that specific, rare codes can "borrow" statistical strength from their more general, common ancestors.
  3. Multimodal Embedded Topic Model (ETM): The model learns "topics" (clusters of related diseases and drugs) in a continuous embedding space. Because the code embeddings are informed by the knowledge graph, the resulting topics are forced to be clinically coherent.
  4. End-to-End Training: KG-ETM uses a Variational Autoencoder (VAE) framework to learn graph parameters and topic model parameters simultaneously. This allows the EHR data to refine the medical knowledge embeddings during training, ensuring the model adapts to the specific population being studied.
Table of notations and descriptions for the KG-ETM model components.

Experimental Setup

The model was evaluated on the Population Health Record (PopHR) dataset, which contains longitudinal data from 1.2 million patients in Quebec, Canada, spanning up to 20 years. The vocabulary consisted of 5,107 unique ICD-9 diagnosis codes and 1,057 ATC drug codes. The data was split into training, validation, and testing sets using a 6:3:1 ratio.

Key Results

KG-ETM consistently outperformed standard ETM and other graph-based baselines across several critical metrics:

  • Reconstruction Performance: KG-ETM achieved a significantly lower Negative Log-Likelihood (172.69) compared to standard ETM (198.26), indicating a superior ability to predict future health observations.
  • Topic Quality: The model achieved a better balance of topic coherence and diversity. Qualitative analysis showed that the model successfully clustered medical codes by biological systems (e.g., respiratory, circulatory) without explicit supervision.
  • Drug Imputation: In predicting drug prescriptions based on diagnoses, KG-ETM showed a massive advantage for rare drugs. For the rarest 20-40% of drugs, the model's accuracy was 9 times better than standard ETM, proving the power of the knowledge graph prior.

Discussion and Future Work

While KG-ETM represents a significant step forward, there are several avenues for future research. The current model uses a relatively simple undirected graph; incorporating richer webs of knowledge like the Universal Medical Language System (UMLS) could further enhance performance. Additionally, the authors plan to extend the model to handle multi-relational graphs and temporal dynamics, moving beyond the current "bag-of-words" approach to capture the sequential nature of clinical events.

Summary updated

BibTeX
@misc{li2022modeling,
  author = {Yue Li and Yuesong Zou and Ahmad Pesaranghader and Aman Verma and David L. Buckeridge and Yue Li},
  title = {{Modeling electronic health record data using a knowledge-graph-embedded topic model}},
  year = {2022},
  eprint = {2206.01436},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2206.01436},
}
Figure