Longitudinal Multimodal Transformer Integrating Imaging and Latent Clinical Signatures from Routine EHRs for Pulmonary Nodule Classification

Thomas Z. Li, John M. Still, Kaiwen Xu, Ho Hin Lee, Leon Y. Cai, Aravind R. Krishnan, Riqiang Gao, Mirza S. Khan, Sanja Antic, Michael N. Kammer, Kim L. Sandler, Fabien Maldonado, Bennett A. Landman, Thomas A. Lasko

Introduction

Solitary pulmonary nodules (SPNs)—small, isolated growths in the lung—represent a significant diagnostic challenge in modern medicine. While the prevalence of SPNs is high, determining whether a nodule is benign or malignant remains difficult. Clinicians typically rely on Computed Tomography (CT) scans, but interpreting a single image in isolation often lacks the necessary context. In practice, physicians use a patient’s broader medical history—including previous infections, medications, and laboratory results—to differentiate between cancer and benign conditions like pneumonia or inflammation.

However, integrating this heterogeneous electronic health record (EHR) data into automated deep learning models is technically demanding. EHR data is notoriously "messy": it is high-dimensional, irregularly sampled, and asynchronous, with medical events occurring at different intervals than imaging. Traditional machine learning approaches often attempt to solve this by "binning" data into fixed time windows, a process that frequently discards the subtle temporal dynamics essential for accurate diagnosis. This paper introduces TDSig, a multimodal Transformer designed to integrate longitudinal imaging and latent clinical signatures to improve SPN classification.

Methodology

The researchers developed a two-pronged strategy to address the complexities of longitudinal multimodal data: the extraction of latent clinical signatures and the implementation of a time-sensitive attention mechanism.

Latent Clinical Signatures

To manage the high dimensionality of EHR data, the authors utilized Independent Component Analysis (ICA). They processed 9,195 unique EHR variables from a large internal dataset of approximately 288,000 subjects, disentangling them into 2,000 "clinical signatures." These signatures represent independent underlying physiological processes or disease mechanisms. By using these signatures instead of raw billing codes or discrete lab values, the model gains a more manageable and interpretable representation of the patient's physiological state.

The TDSig Architecture

The TDSig (Time-Distance Transformer) model treats both image features (extracted via a ResNet) and clinical signature expressions as "tokens" within a sequence. The core innovation of this architecture is the Time-Distance Scaled Self-Attention.

Unlike standard Transformers that treat all sequence elements with equal temporal weight, TDSig incorporates a Temporal Emphasis Model (TEM). The TEM utilizes a learnable, flipped sigmoid function to scale attention weights based on the time elapsed between a medical event and the current assessment. This allows the model to prioritize recent observations—which are typically more relevant to the current state of a nodule—while maintaining the ability to attend to critical historical data when necessary.

Experimental Setup

The study utilized a combination of public and private datasets for training and validation:

  • NLST (National Lung Screening Trial): A public imaging dataset used for initial pretraining.
  • EHR-Pulmonary: An unlabeled internal dataset used to derive the 2,000 latent clinical signatures via ICA.
  • Image-EHR: A labeled internal dataset of 922 subjects with paired CT and EHR data used for multimodal pretraining.
  • Image-EHR-SPN: A specific subset of 227 subjects with challenging nodules used for final evaluation and cross-validation.

Key Results and Insights

The TDSig model demonstrated a significant performance advantage over traditional imaging-only and cross-sectional multimodal baselines.

Performance Metrics

  • Primary Accuracy: TDSig achieved an AUC of 0.824, significantly outperforming the longitudinal imaging-only baseline, which achieved an AUC of 0.741.
  • Multimodal Superiority: Even when compared to a single-timepoint (cross-sectional) multimodal model (AUC 0.809), the longitudinal approach of TDSig proved superior.
  • Signature Efficacy: The model using ICA-based clinical signatures vastly outperformed a model using standard binned medical concept embeddings (TDCode2vec, AUC 0.752), validating the use of unsupervised signature extraction.

The "Benign Explanation" Effect

One of the most significant clinical insights from the study is the model's ability to find "benign explanations" for suspicious imaging. For instance, a new or growing lesion on a CT scan might be flagged as high-risk by an imaging-only model. However, if TDSig detects a simultaneous spike in clinical signatures associated with bacterial pneumonia or inflammatory markers, it can correctly lower the malignancy probability. This capability was reflected in a reclassification analysis, where TDSig was more "correctly confident," moving many benign cases flagged by imaging-only models into lower-risk categories.

Discussion and Future Work

By treating medical events as continuous longitudinal curves rather than discrete bins, TDSig preserves the exact timing of events, which is vital for calculating the "velocity" of disease progression. This moving away from fixed-window binning allows for a more nuanced understanding of patient history.

Despite these successes, the authors identify several areas for future development. While the model’s ranking ability (AUC) is strong, the absolute probability scores require better calibration before they can be used for direct clinical decision-making. Additionally, the final evaluation was conducted on a relatively small cohort of 227 subjects, necessitating larger-scale validation. Future research may also explore integrating modern BERT-based clinical embeddings (such as ClinicalBERT) to further enhance the representation of longitudinal clinical data.

Conclusion

The TDSig framework represents a significant step forward in multimodal medical AI. By effectively integrating messy, longitudinal EHR data with high-resolution imaging through latent clinical signatures and time-distance attention, the model provides a more holistic and accurate assessment of pulmonary nodules, mirroring the contextual reasoning used by expert clinicians.

Summary updated

BibTeX
@inproceedings{li2023longitudinal,
  author = {Thomas Z. Li and John M. Still and Kaiwen Xu and Ho Hin Lee and Leon Y. Cai and Aravind R. Krishnan and Riqiang Gao and Mirza S. Khan and Sanja Antic and Michael N. Kammer and Kim L. Sandler and Fabien Maldonado and Bennett A. Landman and Thomas A. Lasko},
  title = {{Longitudinal Multimodal Transformer Integrating Imaging and Latent Clinical Signatures from Routine EHRs for Pulmonary Nodule Classification}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2023},
  url = {https://openreview.net/forum?id=8av4AiXEjg},
}
Figure