Canonical Correlation Analysis for Analyzing Sequences of Medical Billing Codes

Corinne L. Jones, Sham M. Kakade, Lucas W. Thornblade, David R. Flum, Abraham D. FlaxmanarXiv 2016

Introduction

Medical billing data, comprising ICD-9 diagnosis codes, procedure codes, and drug codes, represents a rich longitudinal record of patient health. However, utilizing this data for predictive modeling is challenging due to its high dimensionality and sparsity. Traditional machine learning approaches often treat these codes as independent "one-hot" vectors. This method fails to capture clinical relationships—for instance, treating "abdominal pain" and "diverticulitis" as entirely unrelated—and leads to the "curse of dimensionality," which hinders model performance and increases computational costs.

Researchers at the University of Washington have addressed these challenges by adapting Canonical Correlation Analysis (CCA) to generate dense, low-dimensional embeddings for medical billing codes. By treating a patient's medical history as a temporal sequence of "words," they successfully reduced feature dimensionality from hundreds of thousands to just 50 while maintaining high predictive accuracy.

Methodology

While CCA is a staple in Natural Language Processing (NLP) for creating word embeddings, its application to medical data requires specific modifications to account for the unique structure of clinical records:

  1. Time-Based Context: Unlike NLP, where context is defined by adjacent words in a sentence, medical context is defined by the time elapsed between visits. The researchers defined context based on the number of weeks between codes.
  2. Temporal Weighting: A decay function was implemented to weight pairs of codes occurring closer in time more heavily than those separated by years.
  3. Patient-Level Normalization: To ensure that patients with extensive medical histories did not disproportionately influence the model, the authors normalized contributions so that every patient provided equal weight to the final correlation matrix.

This process projects approximately 76,000 sparse codes into a dense 50-dimensional space where clinically related codes cluster together.

Dataset and Task

The study utilized the Truven Health MarketScan Research Database (2007–2014), containing insurance claims for over 30 million Americans. The primary predictive task focused on a cohort of 82,231 patients with diverticulitis. The goal was to predict which patients would undergo elective surgery between 52 and 104 weeks after their initial diagnosis, using medical history from the first 48 weeks as input features.

Results and Analysis

Quantitative Performance

The researchers compared CCA features against traditional unigram and bigram features using several algorithms. The results demonstrated that 50 CCA features could match or exceed the performance of models using hundreds of thousands of raw features.

Comparison of predictive performance (AUC) across different algorithms and feature sets.

As shown in the table above, CCA features significantly boosted the performance of "weaker" models. For example, Penalized Logistic Regression saw its Area Under the Curve (AUC) jump from 0.58 (near random) with unigrams to 0.74 with CCA features, making it competitive with more complex models like Gradient Boosting.

Qualitative Validation

To verify that the embeddings captured clinical meaning, the researchers examined the "nearest neighbors" of specific codes in the dense vector space. The results aligned closely with clinical expectations.

Nearest neighbors for selected medical codes based on CCA embeddings.

For the code Diverticulitis of colon, the model identified Abdominal pain and CT pelvis with contrast as the closest neighbors—standard diagnostic indicators for the condition. However, some spurious correlations appeared, such as clustering an antidepressant (Bupropion) near a blood pressure medication (Lisinopril), likely reflecting common comorbidities rather than direct clinical links.

Conclusion

This research demonstrates that CCA is a powerful tool for reducing the complexity of medical billing data without losing critical information. By treating medicine as a language and patient histories as documents, the authors showed that latent clinical concepts are far simpler than the raw vocabulary suggests. Future work may involve comparing these statistical spectral methods against modern deep learning techniques like Word2Vec to further refine the accuracy of patient journey mapping.

Summary updated

BibTeX
@misc{jones2016canonical,
  author = {Corinne L. Jones and Sham M. Kakade and Lucas W. Thornblade and David R. Flum and Abraham D. Flaxman},
  title = {{Canonical Correlation Analysis for Analyzing Sequences of Medical Billing Codes}},
  year = {2016},
  eprint = {1612.00516},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1612.00516},
}
Figure