Contrastive learning with transformer for adverse endpoint prediction in patients on DAPT post-coronary stent implantation

Fang Li, Zenan Sun, Ahmed Abdelhameed, Tiehang Duan, Laila Rasmy, Xinyue Hu, Jianping He, Yifang Dang, Jingna Feng, Jianfu Li, Yichen Wang, Tianchen Lyu, Naomi Braun, Si M. Pham, Michael Gharacholou, DeLisa Fairweather, Degui Zhi, Jiang Bian, Cui TaoFrontiers in Cardiovascular Medicine 2025 · DOI

Abstract

The robust performance of our contrastive learning-based model underscores its potential to enhance DAPT management significantly. By delivering precise predictive insights at multiple time points, our method meets the current need for adaptive, personalized therapeutic strategies in cardiology, thereby offering substantial value in improving patient outcomes.

Introduction: The DAPT Balancing Act

In modern cardiology, managing patients after drug-eluting stent (DES) implantation involves a delicate equilibrium. Dual Antiplatelet Therapy (DAPT)—typically a combination of aspirin and a P2Y12 inhibitor—is essential to prevent ischemic events such as stent thrombosis or recurrent myocardial infarction. However, the potent antithrombotic effect of these medications inherently increases the risk of major bleeding.

Clinicians currently rely on scoring systems like the DAPT or PRECISE-DAPT scores to navigate this "Goldilocks" problem. While useful, these tools often provide static risk assessments with modest predictive power (C-index ~0.70). This paper, published in Frontiers in Cardiovascular Medicine, introduces a dynamic deep-learning framework designed to provide individualized, time-dependent risk assessments using real-world electronic health record (EHR) data.

Methods: A Multi-Stage Deep Learning Architecture

The researchers developed a sophisticated model that integrates several advanced machine learning techniques to capture the complexity of patient health profiles.

Figure 2: The multi-stage deep learning architecture combining autoencoders, transformers, and contrastive learning for risk prediction.

The architecture consists of four primary components:

  1. Autoencoder Module: This stage compresses high-dimensional patient features—including demographics, comorbidities, and medications—into a dense latent representation.
  2. Transformer Encoder: Utilizing multi-head self-attention, the Transformer identifies non-linear relationships and "attends" to the most relevant clinical variables for a specific patient.
  3. Contrastive Learning (Triplet Loss): A novel addition to survival modeling, this technique "sharpens" the model's discriminative ability by minimizing the distance between representations of patients with similar outcomes while maximizing the distance between those with different outcomes.
  4. Multi-Task Output: The model predicts cumulative risk at 1, 2, 3, 6, and 12-month intervals using a piecewise constant hazard loss, allowing for dynamic clinical decision-making.

Data and Cohort Selection

The study leveraged the OneFlorida+ Clinical Research Consortium, a massive database containing EHRs for over 16 million individuals. The final study cohort included 19,713 adult patients who underwent DES implantation between 2012 and 2020.

Figure 1: Flowchart illustrating the study cohort selection process from the OneFlorida+ database.

The cohort was split into training (70%), validation (10%), and testing (20%) sets to ensure robust model evaluation against established benchmarks like DeepSurv and SurvTrace.

Key Results and Performance

The proposed model demonstrated superior performance across all evaluated time windows. For ischemic event prediction, the model achieved a time-dependent concordance index (C<sup>td</sup>-index) of 0.88 at one month, maintaining a high 0.80 at twelve months. Bleeding event prediction also showed strong results, with a C<sup>td</sup>-index ranging from 0.82 to 0.77 over the same period.

Crucially, calibration analysis indicated that the model's predicted probabilities closely aligned with observed clinical outcomes, particularly for ischemic risks. This high level of accuracy suggests the model could serve as a reliable tool for adjusting DAPT duration as a patient's risk profile evolves.

Limitations and Future Directions

While the results are promising, the study relies on structured EHR data (ICD codes and prescriptions) and does not yet incorporate unstructured clinical notes or imaging data. Furthermore, real-world DAPT adherence may differ from prescription records. Future research aims to develop a multimodal system incorporating Natural Language Processing (NLP) and external validation across diverse geographic regions to enhance generalizability and predictive depth.

Summary updated

Abstract

The robust performance of our contrastive learning-based model underscores its potential to enhance DAPT management significantly. By delivering precise predictive insights at multiple time points, our method meets the current need for adaptive, personalized therapeutic strategies in cardiology, thereby offering substantial value in improving patient outcomes.
BibTeX
@inproceedings{li2025contrastive,
  author = {Fang Li and Zenan Sun and Ahmed Abdelhameed and Tiehang Duan and Laila Rasmy and Xinyue Hu and Jianping He and Yifang Dang and Jingna Feng and Jianfu Li and Yichen Wang and Tianchen Lyu and Naomi Braun and Si M. Pham and Michael Gharacholou and DeLisa Fairweather and Degui Zhi and Jiang Bian and Cui Tao},
  title = {{Contrastive learning with transformer for adverse endpoint prediction in patients on DAPT post-coronary stent implantation}},
  booktitle = {Frontiers in Cardiovascular Medicine},
  year = {2025},
  doi = {10.3389/fcvm.2024.1460354},
}
Figure