GraphBEAT: Graph-based Bucketized Event Aggregation Over Time for Early Risk Stratification of Gastrointestinal Cancers
Authors: Leo Y. Li-Han, Chris Varghese, Elizabeth B. Habermann, Mark J. Truty, William R. G. Perry, Cornelius A. Thiels, Hojjat Salehinejad
Organizations: Department of Surgery, Mayo Clinic, Rochester, MN, USA · Kern Center for the Science of Health Care Delivery and the Department of Surgery, Mayo Clinic, Rochester, MN, USA · Kern Center for the Science of Health Care Delivery and the Department of Artificial Intelligence and Informatics, Mayo Clinic, Rochester, MN, USA
Longitudinal electronic health records (EHRs) contain complementary diagnostic and laboratory information about patient health. However, irregularity, sparsity, heterogeneity, and incompleteness in documentation complicate EHR modeling. To address the problem, we introduce GraphBEAT (Graph-based Bucketized Event Aggregation over Time), a temporal graph representation learning framework that groups clinical events into time buckets and transforms observed features into patient-specific, temporally directed graphs to enable early risk stratification for gastrointestinal cancers. Each node in an EHR graph encodes feature identity, observed value, and temporal position of clinical events. A context-aware, time-decay message-passing mechanism models transitions between successive buckets, followed by multi-head attention pooling to generate patient-level representations. GraphBEAT was trained and evaluated on multi-site longitudinal diagnosis codes and laboratory tests to predict pancreatic, liver, and intestinal cancer at 12-, 24-, and 36-month diagnostic lead times. In all experimental setups, GraphBEAT consistently outperformed baseline graph neural networks (GraphSAGE, GAT, and GCN) and sequence modeling approaches (Transformer and long short-term memory [LSTM]). GraphBEAT also required over 250x fewer floating-point operations per patient and over 20x fewer parameters than the Transformer and LSTM baselines. These results support GraphBEAT as an accurate and computationally efficient approach for cancer risk stratification from sparse, heterogeneous longitudinal health records.
Figures & tables
Fig. 1: The graph representation learning framework for cancer risk prediction from heterogeneous EHR time series. (A) An example of irregular diagnosis and laboratory trajectories for one patient. The task is to predict the risk of pancreatic, liver, and intestinal cancer using up to 20 years of clinical history, with diagnostic lead times of 12, 24, and 36 months. (B) Heatmap of the matrix representations of the diagnostic codes (blue) and laboratory results (red) for the patient. Two matrices are concatenated along the feature dimension to form the heterogeneous EHR matrix. (C) The patient-specific temporally directed EHR graph constructed from the matrix representation by retaining observed clinical events. The node feature is determined by clinical feature identity, observed values, and temporal position, while the edge weights are dynamically calculated from the context of the transition. (D) The end-to-end patient-level graph learning for cancer risk prediction. The context-aware, time-decay message passing updates node features, while the multi-head attention feature pooling aggregates a varying number of node features into a fixed-length graph feature vector for downstream classification.
Fig. 2: Mean ( ± SD) leave-one-site-out receiver operating characteristic curves (top row) and precision–recall curves (bottom row) for GraphBEAT at 12-, 24-, and 36-month prediction lead times. Columns correspond to (a) pancreatic, (b) liver, and (c) intestinal cancers, respectively.
Fig. 3: Comparison of computational complexity and predictive performance between GraphBEAT and baseline models for pancreatic cancer risk prediction with a 12-month lead time. The x- and y-axes show the mean leave-one-site-out (LOSO) AUROC and average precision (AP), respectively. Bubble area represents the logarithmically scaled number of floating-point operations (FLOPs). Annotations report the FLOPs and number of learnable parameters in millions (M).
Fig. 4: Model explainability analysis for 12-month pancreatic cancer (column a, left), liver cancer (column b, middle), and intestinal cancer (column c, right) risk prediction on the MCHS test sets. Upper row: top-10 contributing nodes and edges for true-positive predictions. Lower row: t-SNE representations of pooled graph embeddings before classification. Each dot represents a patient in the dataset.