Time-distance vision transformers in lung cancer diagnosis from longitudinal computed tomography

Thomas Z. Li, Kaiwen Xu, Riqiang Gao, Yucheng Tang, Thomas A. Lasko, Fabien Maldonado, Kim L. Sandler, Bennett A. Landman

TL;DR

This paper introduces novel "time-distance" Vision Transformer (ViT) architectures (TeViT and TaViT) designed to analyze medical images taken at irregular time intervals, crucial for diagnosing diseases like lung cancer. These methods significantly improve the classification of malignant vs. benign pulmonary nodules by explicitly modeling temporal changes, outperforming existing cross-sectional and longitudinal approaches.

What Problem Does This Paper Address?

Diagnosing lung cancer from medical imaging, particularly from screening CT scans, is challenging. While individual scans can reveal nodules, their malignancy is often determined by how they change over time. However, real-world medical imaging data is often "sparse" and "irregularly sampled" – scans are not taken at fixed intervals, making it difficult to capture subtle growth patterns. Traditional methods struggle with this irregularity. This paper aims to bridge this gap by developing a deep learning framework that can effectively leverage longitudinal (time-series) medical imaging data, even when the time intervals between scans are inconsistent.

Methods

The core innovation lies in adapting the Vision Transformer (ViT) architecture to handle time-series medical data with irregular sampling. The authors propose two main approaches:

  • Time Encoding ViT (TeViT): This method incorporates a "time encoding" that represents the time difference between scans. This encoding is added to the image features before they are processed by the standard ViT self-attention mechanism. This is analogous to how time is handled in time-series forecasting.
  • Time-Aware ViT (TaViT): This approach uses a "temporal emphasis model" (TEM) to dynamically adjust the self-attention weights. The TEM is designed to down-weight the influence of features from scans taken further back in time, prioritizing more recent information. This is achieved by scaling the attention scores based on the time distance between image tokens.

Both methods build upon the standard ViT architecture, which uses self-attention to process image patches (or extracted features) as a sequence.

Datasets

  • Synthetic Nodules (Tumor-CIFAR v1 & v2): A dataset of synthetic benign and malignant nodules superimposed on CIFAR10 images. Version 1 uses regularly sampled time intervals, while Version 2 uses irregular intervals, specifically designed to test the models' ability to handle temporal inconsistencies.
  • National Lung Screening Trial (NLST): A real-world dataset of longitudinal chest CT scans from patients undergoing lung cancer screening. The study curated cohorts with two consecutive scans for each subject, focusing on cases with confirmed lung cancer and controls with positive screening results.

Key Insights and Ideas

  • Temporal Dynamics are Crucial: The paper strongly reinforces that how a nodule changes over time is a more powerful indicator of malignancy than static features alone, especially in the context of screening.
  • Self-Attention for Irregular Time Series: Vision Transformers, with their self-attention mechanism, are surprisingly well-suited for handling irregularly sampled time-series data, provided they are adapted to explicitly consider temporal information.
  • Explicit Time Modeling Outperforms Positional Encoding: Simply adding positional encodings (which represent the order of items in a sequence) is insufficient for irregularly sampled data. Explicitly modeling time differences (as in TeViT and TaViT) is key to achieving high performance.
  • Domain-Specific Inductive Bias: The TaViT's "temporal emphasis model" introduces a domain-specific inductive bias, reflecting the intuition that recent scans are more informative for current diagnosis.

Key Results

  • Synthetic Data: On the Tumor-CIFAR v2 dataset (irregular sampling), the TeViT and TaViT achieved near-perfect performance (AUCs of 0.9996 and 0.9988 respectively), significantly outperforming a standard positional ViT (AUC 0.5052) and matching the DLSTM (AUC 0.9991).
  • NLST Data: In cross-validation on the NLST cohort, the proposed TeViT and TaViT achieved AUCs of 0.785 and 0.786, respectively. This significantly outperformed a cross-sectional baseline (CS-CNN, AUC 0.734) and matched the performance of the leading longitudinal algorithm, DLSTM (AUC 0.779).
  • Qualitative Example: A visual comparison showed that the time-distance ViTs were more accurate in estimating malignancy risk for both benign and malignant cases compared to the CS-CNN, particularly in correctly identifying a growing malignant nodule.

Limitations and Future Work

  • NLST Scan Adherence: The authors note that the NLST dataset, while longitudinal, had relatively high adherence to annual screening schedules. This might have limited the observed differences between time-distance and positional approaches, as the time intervals were not extremely varied.
  • Feature Extraction: The current methods rely on a pre-trained nodule detection model to extract features. This limits the model's ability to learn from complete medical image volumes and integrate nodule detection with diagnosis.
  • Future Directions: The authors suggest integrating these time-distance techniques with more sophisticated 3D ViT architectures to develop end-to-end optimized networks that combine nodule detection and cancer diagnosis from longitudinal imaging. They also propose validating these methods on real-world clinical settings with more varied scan acquisition patterns.

Summary updated

BibTeX
@inproceedings{li2023time,
  author = {Thomas Z. Li and Kaiwen Xu and Riqiang Gao and Yucheng Tang and Thomas A. Lasko and Fabien Maldonado and Kim L. Sandler and Bennett A. Landman},
  title = {{Time-distance vision transformers in lung cancer diagnosis from longitudinal computed tomography}},
  booktitle = {Image Processing},
  year = {2023},
  doi = {10.1117/12.2653911},
}
Figure