Introduction
Cancer survivors today face a complex "dual challenge." While advancements in oncology have significantly improved survival rates, many patients must navigate the long-term cardiotoxic side effects of treatments such as chemotherapy and radiation. Identifying patients at high risk for heart failure (HF) following a cancer diagnosis is critical for clinical intervention. However, traditional predictive modeling in healthcare often struggles with the inherent limitations of Electronic Health Record (EHR) data structures.
Researchers at the University of Florida have proposed a paradigm shift: moving away from treating medical codes as discrete, independent numbers and instead treating them as a "narrative" for Large Language Models (LLMs). This study demonstrates that converting structured medical codes into descriptive narrative features allows clinical LLMs to predict heart failure risk in cancer patients with significantly higher accuracy than traditional machine learning or standard deep learning approaches.
The Limitations of Traditional Feature Engineering
Most existing predictive models rely on one-hot encoding. In this approach, every unique medical code (such as an ICD-10 diagnosis or an RxNorm medication code) is treated as an independent category. This method suffers from two primary flaws:
- Sparsity: With tens of thousands of possible codes, the resulting data matrices are overwhelmingly populated by zeros. This makes it difficult for models to learn meaningful patterns, especially in smaller patient cohorts.
- Semantic Blindness: Traditional models lack clinical context. To a standard model, "Acute Hepatitis B" and "Acute Myocarditis" are simply two different integers. The model does not "understand" that both describe acute inflammatory conditions, missing the semantic relationships that a human clinician would immediately recognize.
Methods: From Codes to Narratives
The researchers compared three distinct approaches to feature engineering and modeling:
- Traditional ML (XGBoost, SVM): Utilized one-hot encoding of aggregated medical groups (PheWAS).
- Deep Learning (T-LSTM): Employed a Time-Aware Long Short-Term Memory network to capture the chronological sequence of medical events using one-hot features.
- Clinical LLMs (GatorTron): Introduced a novel "subword feature" strategy. Instead of raw codes, the researchers used the official text descriptions of ICD and RxNorm codes, arranging them into a chronological narrative paragraph.
By feeding this narrative into GatorTron—a clinical LLM trained on 90 billion words of medical text—the model leverages its internal linguistic knowledge to interpret the clinical context of a patient's history. This approach effectively uses the LLM’s natural sequence-processing ability as a surrogate for encounter time.
Dataset and Cohort
The study utilized a real-world dataset from the University of Florida (UF) Health Integrated Data Repository, focusing on 12,806 unique patients diagnosed with lung, breast, or colorectal cancers between 2012 and 2020. Within this cohort, 1,602 patients developed heart failure after their cancer diagnosis. The features extracted included demographics, ICD-9/10 diagnosis codes, and RxNorm medication codes.
Key Results and Performance
The clinical LLM, GatorTron-3.9B, emerged as the superior model across nearly all performance metrics. It achieved a top F1 score of 0.699, outperforming traditional SVMs by 39% and the T-LSTM deep learning model by 7%.
As shown in the performance comparison below, the inclusion of medication and demographic data significantly enhanced the predictive power of both the GatorTron and T-LSTM architectures. However, GatorTron consistently maintained a lead in F1, Precision, and AUC, particularly when integrated with full clinical narratives.
Subgroup and Interpretability Insights
The model proved exceptionally robust for complex cases, reaching an F1 of 0.824 for patients with more than one type of cancer. Furthermore, using LIME (Local Interpretable Model-agnostic Explanations), the researchers confirmed that the model correctly prioritized high-risk clinical indicators such as "abnormal ECG," "rosuvastatin," and "furosemide" (a diuretic commonly used for heart failure management).
Discussion and Future Directions
The success of the narrative approach is attributed to increased feature density and semantic awareness. Subword tokenization allows different medical codes that share common words (e.g., "hypertension") to overlap, helping the model find patterns that one-hot encoding would treat as unrelated.
Despite these gains, the study noted a 512-token limit in the transformer architecture, which necessitated truncating the histories of patients with very long medical records. Future work will explore techniques like FlashAttention to expand this window and investigate the use of generative models (like GPT-4) to summarize complex EHRs into even more concise, high-density risk narratives.
Summary updated