Identifying Cancer Patients at Risk for Heart Failure Using Machine Learning Methods

Xi Yang, Yan Gong, Nida Waheed, Keith March, Jiang Bian, William R. Hogan, Yonghui Wu

TL;DR

This study leverages machine learning and historical electronic health record (EHR) data to predict which cancer patients are at highest risk for developing heart failure following their diagnosis. By applying Gradient Boosting models to a cohort of over 140,000 patients, researchers achieved a high predictive accuracy (AUC 0.9077), demonstrating that computational methods can effectively identify early warning signs of treatment-related cardiotoxicity.

What Problem Does This Paper Address?

Modern oncology is a double-edged sword. While targeted therapies and traditional chemotherapies have significantly reduced cancer mortality, they often come with a heavy price: cardiotoxicity. Treatments like anthracyclines, HER2 inhibitors, and even newer immune checkpoint inhibitors can cause structural and functional damage to the heart, leading to cardiomyopathy or heart failure.

This creates a clinical dilemma. If a patient develops heart failure, their life-saving cancer treatment must often be interrupted, increasing the risk of cancer recurrence. The emerging field of "Cardio-Oncology" aims to manage this balance, but clinicians lack robust tools to identify high-risk patients before the damage becomes irreversible. This paper explores whether machine learning can bridge that gap by mining longitudinal EHR data for predictive clinical patterns.

Methods

The researchers conducted a retrospective case-control study using four common machine learning algorithms: Logistic Regression (LR), Random Forests (RF), Support Vector Machines (SVM), and Gradient Boosting (GB).

The workflow involved several sophisticated data-processing steps:

  • Case-Control Matching: To ensure a fair comparison, the team matched 1,958 heart failure "cases" with 15,488 "controls" based on gender, race, age, and cancer type.
  • Feature Engineering: They systematically grouped sparse clinical data. ICD-9/10 diagnosis codes were mapped to "PheWAS" groups (Phenome-wide association studies), and thousands of specific medication brand names were mapped to their core active ingredients (RxNorm).
  • NLP-Inspired Encoding: A key technical contribution was comparing standard one-hot encoding (simply noting if a feature exists) against TF-IDF encoding (Term Frequency-Inverse Document Frequency). While TF-IDF is usually used in text analysis to weight the importance of words, the authors used it here to weight the frequency and significance of clinical events within a patient's record.
Figure 1. An overview of case-control matching procedure

Datasets

The study utilized the University of Florida Health (UF Health) Integrated Data Repository (IDR).

  • Scale: The repository contains data for 1.17 million patients.
  • Cohort: The researchers extracted records for 143,199 cancer patients treated between 2011 and 2017.
  • Data Types: The dataset included demographics, ICD-9/10 diagnoses, RxNorm medication codes, and CPT procedure codes.

Key Insights and Ideas

  • Frequency Matters: The shift from one-hot encoding to TF-IDF encoding improved performance for most models. This suggests that the frequency of a clinical observation (e.g., how often a patient complains of shortness of breath or receives a specific medication) is a vital signal that binary "yes/no" flags miss.
  • The "Chemo" Specificity Trap: When the model was tested specifically on patients exposed to chemotherapy, the sensitivity remained high, but specificity dropped significantly (from ~0.81 to ~0.63). This indicates that while chemotherapy is a massive risk factor, it isn't deterministic—many patients receive cardiotoxic drugs but do not develop heart failure, making it harder for the model to distinguish between high-risk and low-risk individuals within that specific subgroup.
  • Clinical Alignment: The model’s top-weighted features—hypertension, atrial fibrillation, and tobacco use—align perfectly with known clinical risk factors. This "sanity check" validates that the machine learning models are capturing meaningful biological signals rather than just noise in the data.

Key Results

The Gradient Boosting (GB) model using TF-IDF encoding was the clear winner, outperforming the baseline Logistic Regression and other methods.

Metric GB (TF-IDF) Performance
AUC 0.9077
Sensitivity 0.8520
Specificity 0.8138
Table 3. Comparison of machine learning methods using one-hot encoding and TF-IDF encoding.

As shown in Table 3 above, the GB model achieved the highest AUC, while SVMs generally struggled with this specific dataset, showing significantly lower performance.

Limitations and Future Work

Despite the strong results, the authors acknowledge several hurdles:

  • EHR Data Quality: Like all EHR studies, this work is subject to "coding bias" and incomplete information. If a clinician fails to log a symptom, the model cannot see it.
  • Causality: The study identifies patients who develop heart failure after cancer, but it cannot definitively prove the cancer treatment caused the heart failure in every case.
  • Next Steps: The researchers plan to incorporate deep learning (specifically RNNs to better handle the temporal sequence of events) and integrate genomic data to see if genetic markers can explain why some chemotherapy patients are more resilient than others.

Summary updated

BibTeX
@misc{yang2019identifying,
  author = {Xi Yang and Yan Gong and Nida Waheed and Keith March and Jiang Bian and William R. Hogan and Yonghui Wu},
  title = {{Identifying Cancer Patients at Risk for Heart Failure Using Machine Learning Methods}},
  year = {2019},
  eprint = {1910.00582},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1910.00582},
}
Figure