A deep learning algorithm to predict risk of pancreatic cancer from disease trajectories

Davide Placido, Bo Yuan, Jessica Xin Hjaltelin, Chunlei Zheng, Amalie Dahl Haue, Piotr Jaroslaw Chmura, Chen Yuan, Jihye Kim, Renato Umeton, Gregory C. Antell, Alexander Chowdhury, Alexandra Franz, Lauren K. Brais, Elizabeth Andrews, Debora S. Marks, Aviv Regev, Siamack Ayandeh, Mary T. Brophy, Nhan Do, Peter Kraft, Brian M. Wolpin, Michael H. Rosenthal, Nathanael R. Fillmore, Søren Brunak, Chris SanderNature Medicine 2023

Abstract

Pancreatic cancer is an aggressive disease that typically presents late with poor outcomes, indicating a pronounced need for early detection. In this study, we applied artificial intelligence methods to clinical data from 6 million patients (24,000 pancreatic cancer cases) in Denmark (Danish National Patient Registry (DNPR)) and from 3 million patients (3,900 cases) in the United States (US Veterans Affairs (US-VA)). We trained machine learning models on the sequence of disease codes in clinical histories and tested prediction of cancer occurrence within incremental time windows (CancerRiskNet). For cancer occurrence within 36 months, the performance of the best DNPR model has area under the receiver operating characteristic (AUROC) curve = 0.88 and decreases to AUROC (3m) = 0.83 when disease events within 3 months before cancer diagnosis are excluded from training, with an estimated relative risk of 59 for 1,000 highest-risk patients older than age 50 years. Cross-application of the Danish model to US-VA data had lower performance (AUROC = 0.71), and retraining was needed to improve performance (AUROC = 0.78, AUROC (3m) = 0.76). These results improve the ability to design realistic surveillance programs for patients at elevated risk, potentially benefiting lifespan and quality of life by early detection of this aggressive cancer.

Introduction

Pancreatic cancer is often referred to as a "silent killer" because it is typically diagnosed only after it has reached an incurable stage. Currently, 80% of patients are diagnosed when the disease is already locally advanced or metastatic, leading to one of the lowest survival rates of any cancer. While early-stage patients can often be cured through surgery and chemotherapy, there is currently no viable way to screen the general population. Existing screening programs focus almost exclusively on individuals with known genetic risks or family history, leaving the vast majority of cases undetected until it is too late.

Methods

The researchers developed CancerRiskNet, a deep learning system that treats a patient's medical history as a disease trajectory—a time-ordered sequence of ICD (International Classification of Diseases) codes. This approach moves beyond traditional "checklist" methods by capturing the predictive signal hidden in the sequence and timing of medical events.

Overview of the CancerRiskNet workflow, model architecture, and prediction intervals.

Key technical components of the methodology included:

  • Sequential Modeling: The study compared several architectures, including Transformers and Gated Recurrent Units (GRUs), against non-sequential baselines like Multi-Layer Perceptrons (MLP). The sequential models consistently outperformed others, proving that the order of illnesses contains vital predictive information.
  • Time-Dependent Prediction: The model estimates risk within specific windows (3, 6, 12, 36, and 60 months) rather than providing a simple binary classification.
  • Data Exclusion Intervals: To ensure the model was not simply identifying symptoms of already-present cancer (such as jaundice immediately before diagnosis), the researchers trained versions that "ignored" data from the 3, 6, or 12 months preceding the diagnosis.

Datasets

The study utilized two massive, independent longitudinal datasets representing approximately 9 million patients:

  1. Danish National Patient Registry (DNPR): 6.2 million patients with records spanning from 1977 to 2018. This dataset provided long histories (median 23 years) but relatively sparse coding.
  2. US Veterans Affairs (US-VA): 3 million patients from 1999 to 2020. This dataset is denser but covers a shorter median timeframe and a specific demographic (predominantly older, male veterans).
Comparison of age distribution at pancreatic cancer diagnosis between the Danish and US-VA cohorts.

As shown in the age distribution analysis, the cohorts differ significantly in their demographic makeup, which presented a challenge for model portability.

Key Results

  • High Predictive Accuracy: The best Danish model achieved an AUROC of 0.88 for predicting cancer within 36 months. Even when blinded to the 3 months of data immediately before diagnosis, the model maintained a strong AUROC of 0.83.
  • Clinical Utility: For patients over age 50, the model identified a high-risk group (the top 0.1% of the population) that had a 59-fold increased relative risk compared to the general population.
  • The Portability Gap: A model trained on Danish data performed poorly when directly applied to US-VA data (AUROC dropped to 0.71). This highlights the need for retraining or fine-tuning models when moving between healthcare systems with different coding practices and demographics.

Discussion and Limitations

While CancerRiskNet demonstrates the power of AI in identifying high-risk patients, several limitations remain. The model currently relies solely on ICD codes, excluding lab results, imaging, and clinical notes that likely contain additional predictive signals. Furthermore, the demographic bias in the US-VA dataset may limit generalizability to broader populations.

Future work will focus on integrating more diverse data types and conducting prospective clinical trials to determine if AI-triggered surveillance can successfully improve survival rates through earlier detection in the real world.

Summary updated

BibTeX
@inproceedings{placido2023deep,
  author = {Davide Placido and Bo Yuan and Jessica Xin Hjaltelin and Chunlei Zheng and Amalie Dahl Haue and Piotr Jaroslaw Chmura and Chen Yuan and Jihye Kim and Renato Umeton and Gregory C. Antell and Alexander Chowdhury and Alexandra Franz and Lauren K. Brais and Elizabeth Andrews and Debora S. Marks and Aviv Regev and Siamack Ayandeh and Mary T. Brophy and Nhan Do and Peter Kraft and Brian M. Wolpin and Michael H. Rosenthal and Nathanael R. Fillmore and Søren Brunak and Chris Sander},
  title = {{A deep learning algorithm to predict risk of pancreatic cancer from disease trajectories}},
  booktitle = {Nature Medicine},
  year = {2023},
  doi = {10.1038/s41591-023-02332-5},
}
Figure