[Paper Review] Canonical Correlation Analysis for Analyzing Sequences of Medical Billing Codes
This paper proposes using canonical correlation analysis (CCA) to generate low-dimensional, meaningful features from sequences of medical billing codes, capturing relationships between diagnoses, procedures, and drugs. Applied to diverticulitis patients, CCA-derived features outperformed one-hot and bigram features in predicting future elective surgery, especially in penalized logistic regression, with faster training and competitive AUC scores across models.
We propose using canonical correlation analysis (CCA) to generate features from sequences of medical billing codes. Applying this novel use of CCA to a database of medical billing codes for patients with diverticulitis, we first demonstrate that the CCA embeddings capture meaningful relationships among the codes. We then generate features from these embeddings and establish their usefulness in predicting future elective surgery for diverticulitis, an important marker in efforts for reducing costs in healthcare.
Motivation & Objective
- To address the challenge of feature generation in machine learning for medical claims data, where one-hot encoding fails to capture relationships between billing codes.
- To explore whether CCA can effectively model latent relationships among sequences of medical billing codes, analogous to word embeddings in NLP.
- To evaluate the utility of CCA-derived features in predicting clinically relevant outcomes, specifically elective surgery for diverticulitis.
- To compare the performance of CCA features against standard unigram and bigram features in downstream predictive modeling.
- To demonstrate that CCA features can achieve high predictive performance with significantly reduced dimensionality and faster training times.
Proposed method
- Treat each medical billing code as analogous to a word in a sentence, with context defined by adjacent codes within a sliding window of size ρ.
- Apply canonical correlation analysis (CCA) to two views: the code itself (X) and its neighboring codes (Y), maximizing correlation between their linear projections.
- Estimate the CCA transformation matrices A and B using empirical covariance matrices with Tikhonov regularization to handle sparse, infrequent codes.
- Project each code into a 25-dimensional embedding space using the learned A and B matrices, then average embeddings over time windows before and after the initial diagnosis.
- Use the averaged CCA embeddings as input features for machine learning models, standardizing them prior to training.
- Compare performance using gradient boosting, L2-regularized logistic regression, and random forest on AUC, with cross-validation and hyperparameter tuning.
Experimental results
Research questions
- RQ1Can canonical correlation analysis effectively model relationships between sequences of medical billing codes, similar to how it models word-context relationships in NLP?
- RQ2Do CCA-derived features capture clinically meaningful patterns in medical claims data, as evidenced by proximity to semantically related codes?
- RQ3How do CCA features compare to unigram and bigram features in predicting elective surgery for diverticulitis patients?
- RQ4Can CCA features achieve high predictive performance with significantly reduced feature dimensionality and faster training times?
- RQ5Does the inclusion of CCA features improve performance on models that are sensitive to high-dimensional input, such as penalized logistic regression?
Key findings
- CCA embeddings successfully captured meaningful relationships between medical billing codes, as shown by nearest neighbors in the embedding space reflecting clinical plausibility (e.g., related diagnoses and medications).
- In penalized logistic regression, CCA features achieved an AUC of 0.74 (±0.03), significantly outperforming unigram (0.58) and unigram+bigram (0.56) features.
- With gradient boosting, CCA features achieved an AUC of 0.74 (±0.04), within one standard deviation of the best-performing feature set (0.76 with unigram+bigram).
- Training times were substantially faster with CCA features (50 dimensions) compared to unigram (20,000) and unigram+bigram (240,000) features across all models.
- The multi-layer perceptron baseline showed moderate performance, with CCA features achieving an AUC of 0.74, slightly better than unigram (0.71) and unigram+bigram (0.70).
- The results suggest that CCA features are a strong, efficient alternative to traditional feature engineering for claims data, especially in models sensitive to input dimensionality.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.