Abstract
Discovering patient phenotypes from electronic health records (EHRs) is critical for personalized medicine but is often hindered by the sparse, heterogeneous nature of clinical data. This paper presents a flexible framework using Generalized Low Rank Models (GLRMs) to identify clinical subgroups. By utilizing custom loss functions—including a novel "epistemic boolean" loss for medical codes—the authors demonstrate that GLRMs outperform standard PCA in data imputation and successfully recover clinically meaningful phenotypes in both cross-sectional hospitalization data and longitudinal autism spectrum disorder records.
Introduction
Identifying patient phenotypes—subgroups with shared clinical characteristics—is essential for tailoring medical treatments and improving hospital care. Traditionally, this process is heuristic and labor-intensive. While unsupervised machine learning offers a data-driven alternative, EHR data presents significant challenges: it is notoriously sparse, contains non-random missing values, and mixes diverse data types such as boolean diagnosis flags, continuous age variables, and count-based visit data. Standard techniques like Principal Component Analysis (PCA) assume uniform, normally distributed data, making them ill-suited for the inherent heterogeneity of medical records.
Methodology: Generalized Low Rank Models
The authors address these challenges using Generalized Low Rank Models (GLRMs). A GLRM approximates a high-dimensional data matrix $A$ as the product of two lower-dimensional matrices, $X$ and $Y$. Unlike standard PCA, GLRMs allow for the selection of specific loss functions and regularizers tailored to the data types in each column (e.g., quadratic loss for continuous variables, hinge loss for binary procedures, and Poisson loss for count data).
A significant contribution of this work is the introduction of the epistemic boolean loss function. In clinical records, the presence of a code is a high-confidence indicator of a condition, but its absence does not guarantee the condition is missing—it may simply be unrecorded. This custom loss function penalizes false negatives more heavily than false positives, better reflecting clinical uncertainty. The models were optimized using alternating proximal gradient descent via the Julia LowRankModels package.
Datasets
The framework was evaluated on two distinct datasets:
- National Inpatient Sample (NIS) 2010: A cross-sectional dataset of US hospitalizations. The study used 100,000 adult records with 557 mixed-type features including diagnoses, procedures, and demographics.
- Stanford STRIDE ASD Dataset: A longitudinal dataset of 1,746 pediatric patients with Autism Spectrum Disorder (ASD). Features included ICD9 codes and clinical concepts extracted via NLP, binned into 6-month intervals to capture disease progression.
Key Results
Superior Imputation Performance
In 5-fold cross-validation, tailored GLRMs consistently outperformed naive PCA in accurately imputing hidden values across both datasets. By matching loss functions to data types, the GLRM framework effectively handled the sparsity and heterogeneity that caused PCA to struggle.
Discovery of Clinical Phenotypes
In the NIS dataset, clustering the latent representations revealed 8 distinct patient groups mirroring standard hospital service lines, such as orthopedics and psychiatric care. Notably, the model separated obstetrics patients into two sub-phenotypes based on procedural intervention needs (e.g., a 6.2% vs. 88.4% C-section rate).
In the ASD dataset, the model successfully learned the temporal structure of the data without prior knowledge. However, the authors noted that the model primarily grouped patients by the timing of their hospital visits rather than specific clinical symptoms, suggesting that the structural signal of time-binning can sometimes mask underlying clinical phenotypes.
Discussion and Future Work
GLRMs provide a highly adaptable framework for EHR analysis, allowing researchers to swap loss functions to suit specific clinical contexts. The success of the "epistemic boolean" loss highlights the importance of modeling the unique uncertainty inherent in medical billing codes.
A primary limitation identified was that time-binning in longitudinal data can overshadow clinical signals. Future work will explore incorporating time explicitly through tensor factorization or convolutional approaches. While GLRMs offer a fast, scalable method for phenotype discovery, the authors emphasize that rigorous clinical validation remains necessary before these findings can be integrated into standard care pathways.
Summary updated