Abstract
With the recent availability of Electronic Health Records (EHR) and great opportunities they offer for advancing medical informatics, there has been growing interest in mining EHR for improving quality of care. Disease diagnosis due to its sensitive nature, huge costs of error, and complexity has become an increasingly important focus of research in past years. Existing studies model EHR by capturing co-occurrence of clinical events to learn their latent embeddings. However, relations among clinical events carry various semantics and contribute differently to disease diagnosis which gives precedence to a more advanced modeling of heterogeneous data types and relations in EHR data than existing solutions. To address these issues, we represent how high-dimensional EHR data and its rich relationships can be suitably translated into HeteroMed, a heterogeneous information network for robust medical diagnosis. Our modeling approach allows for straightforward handling of missing values and heterogeneity of data. HeteroMed exploits metapaths to capture higher level and semantically important relations contributing to disease diagnosis. Furthermore, it employs a joint embedding framework to tailor clinical event representations to the disease diagnosis goal. To the best of our knowledge, this is the first study to use Heterogeneous Information Network for modeling clinical data and disease diagnosis. Experimental results of our study show superior performance of HeteroMed compared to prior methods in prediction of exact diagnosis codes and general disease cohorts. Moreover, HeteroMed outperforms baseline models in capturing similarities of clinical events which are examined qualitatively through case studies.
Introduction
Automated medical diagnosis using Electronic Health Records (EHR) is a critical yet challenging task. EHR data is inherently complex, characterized by high heterogeneity, frequent missing values, and intricate semantic relationships. Traditional models often treat clinical events as simple sequences, relying on co-occurrence patterns similar to skip-gram models in natural language processing. However, this approach fails to capture the specific medical semantics of different relationships—for instance, the link between a laboratory test and a diagnosis is fundamentally different from the link between a patient's age and their symptoms. HeteroMed addresses these challenges by modeling EHR data as a Heterogeneous Information Network (HIN).
Methodology
The core of HeteroMed is a graph-based representation where nodes represent patients and various clinical events, while edges represent their relationships.
HIN Construction and Data Processing
The framework integrates diverse data types from EHRs:
- Structured and Categorical Data: Laboratory results are flagged (e.g., "normal" vs. "abnormal"), and demographic data like age is discretized into bins.
- Unstructured Text: High-quality symptoms are extracted from clinical notes using phrase mining techniques like AutoPhrase.
- Network Structure: The resulting network categorizes events into "Diagnostic Events" (symptoms, labs, demographics) and "Treatment Events" (prescriptions, procedures, diagnoses).
Metapaths and Joint Embedding
To capture higher-level medical logic, HeteroMed utilizes metapaths—predefined templates for walks through the graph. For example, a Patient → Symptom ← Patient path helps identify patients with similar clinical presentations, while Symptom → Patient → Prescription learns similarities between symptoms that lead to the same treatment.
The model employs a dual-objective learning process. An unsupervised component learns the general structure of the medical network by predicting node neighborhoods based on metapaths. Simultaneously, a supervised component uses a hinge loss ranking objective to refine embeddings specifically for diagnosis, ensuring a patient's representation is mathematically closer to their actual diagnosis codes than to incorrect ones.
Experimental Evaluation
The study utilized the MIMIC-III dataset, encompassing approximately 46,000 patient stays. The data includes procedures, prescriptions, microbiology, lab events, and discharge summaries.
Performance Results
HeteroMed was evaluated on two primary tasks: exact ICD-9 code prediction and general disease cohort prediction.
- Exact Code Prediction: HeteroMed achieved a MAP@3 of 0.81, significantly outperforming Med2vec (0.75) and standard skip-gram models (0.73).
- Cohort Prediction: The model consistently outperformed deep learning baselines (Deep Mimic) and shallow supervised models (Random Forest) across nearly all 20 high-level disease categories.
Qualitative Analysis
Qualitative similarity searches demonstrated HeteroMed's semantic richness. For example, it correctly identified "peripheral neuropathy" as highly related to Diabetes, whereas baseline models often returned less relevant or overly generic terms like "dietary change."
Discussion and Conclusion
HeteroMed demonstrates that modeling the specific nature of relationships in EHR data leads to more robust and accurate diagnostic models. By treating missing data as the absence of an edge rather than a value to be imputed, the model avoids common biases in clinical data analysis.
While powerful, the current model treats patient stays as static snapshots. Future work could incorporate temporal dynamics using Recurrent Neural Networks (RNNs) and explore automated metapath discovery to uncover non-obvious clinical relationships. Additionally, extending the network to include real-time time-series data and treatment recommendations remains a promising direction.
Summary updated