Source-linked AI summary
GraphBEAT: Graph-based Bucketized Event Aggregation Over Time for Early Risk Stratification of Gastrointestinal Cancers
Leo Y. Li-Han, Chris Varghese, Elizabeth B. Habermann, Mark J. Truty, William R. G. Perry, Cornelius A. Thiels, Hojjat Salehinejad
TL;DR
Irregularity, sparsity, heterogeneity, and incompleteness complicate modeling longitudinal EHRs for cancer risk stratification. GraphBEAT groups diagnoses and laboratory observations into patient-specific temporal graphs and, across the evaluated tasks, outperformed graph and sequence baselines with substantially lower computation.
Problem
Irregular, heterogeneous, and incomplete EHR documentation makes it challenging to preserve event identity, values, and timing while learning dependencies across clinical measurements.
Source: §I · p. 1Method
GraphBEAT bucketizes diagnosis and laboratory events into patient-specific temporal graphs and applies context-aware, time-decay message passing with adaptive multi-head attention pooling.
Source: §I · p. 2Results
Across all tasks, GraphBEAT outperformed graph and sequence baselines; versus GraphSAGE, AP improved 4.8% to 11.4%, with 12.5M FLOPs per patient versus 3995.3M for Transformer.
Source: §V · p. 11Takeaways & Limitations
The findings support GraphBEAT as an efficient approach for pre-diagnostic risk stratification from irregular, heterogeneous EHR data.
Source: §VI · p. 12All data came from one healthcare system, so fully independent validation in external healthcare systems remains necessary.
Source: §V · p. 12
Abstract
from arXiv · showhide
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.
I. INTRODUCTION
GraphBEAT addresses challenges in modeling irregular, heterogeneous EHR histories by encoding diagnoses and laboratory observations in patient-specific temporal graphs. The paper motivates this approach for cancer risk stratification and evaluates it across multiple cancers and care sites.
I. INTRODUCTION
- A manageable high-risk subgroup identified from routine EHR data could complement existing screening by prioritizing patients for further diagnostic assessment.Population-wide pancreatic screening is described as economically impractical, while current surveillance programs cover selected high-risk subgroups that account for a minority of future cases.Source: §I · p. 1
- Irregular, heterogeneous, and incomplete EHRs require models that preserve clinical event identity, values, and timing while learning dependencies across measurements.Diagnosis codes are sparse and may vary in accuracy; laboratory tests are continuous and selectively collected, and patients differ in utilization and record completeness.Source: §I · p. 1
- GraphBEAT jointly encodes diagnosis and laboratory trajectories in a shared temporal graph and integrates evidence across clinical history with context-aware, time-decay message passing and adaptive multi-head attention pooling.Its graph nodes encode feature identity, observed value, and temporal position.Source: §I · p. 2
- The evaluation covers pancreatic, liver, and intestinal cancer prediction at three diagnostic lead times using geographic holdouts across four Mayo Clinic care sites.The study compares GraphBEAT with established graph- and sequence-based architectures.Source: §I · p. 2
II. RELATED WORK
Prior EHR sequence and graph methods offer ways to model longitudinal clinical data, but leave a gap for patient-specific graphs where heterogeneous observations share a temporal topology. GraphBEAT addresses this gap with a bucketized graph approach.
A. Sequence Models for EHR Representation Learning
- Sequence models, including RNNs and Transformers, [27], [28],, treat clinical events as separate tokens, leaving relationships among events implicit.Repeated or miscoded diagnoses can lengthen trajectories and affect feature extraction; multimodal inputs may also require modality-specific encoders and fusion modules.Source: A. Sequence Models for EHR… · p. 3
B. Graph-based EHR Representation Learning
- Many EHR graph methods use ontology-enriched concepts, hierarchical structures, imported clinical knowledge, or additional temporal encoders,,,.A less explored design represents the full history as a patient-specific layered graph where heterogeneous data share one temporal topology and interact across intervals.Source: B. Graph-based EHR Representation… · p. 3
III. METHODS
- GraphBEAT represents diagnosis codes and laboratory measurements in a unified, time-bucketized, temporally directed graph for longitudinal cancer risk prediction.The paper formulates prediction as graph-level binary classification, using context-aware, time-decay message passing followed by adaptive multi-head attention aggregation.Source: B. Graph-based EHR Representation… · p. 3, §III · p. 3
A. Irregular EHR Data Encoding
GraphBEAT encodes diagnosis and laboratory histories in shared fixed-length time buckets, then constructs a patient-specific directed graph from observed features. The graph connects consecutive non-empty buckets and supports cross-modality message passing.
A. Irregular EHR Data Encoding
- Diagnosis histories are encoded in fixed-length buckets by recording each diagnosis code’s frequency, with unobserved diagnoses represented as zero.Each bucket spans τ days.Source: A. Irregular EHR Data Encoding · p. 3
- Laboratory histories use the same buckets, storing the mean available measurement for each test and zero for unobserved tests.Diagnosis and laboratory matrices are concatenated by feature to encode feature identity, temporal position, and value.Source: A. Irregular EHR Data Encoding · p. 3
B. Patient-Level Temporally Directed EHR Graph
- The patient graph retains observed features as nodes carrying feature identity, bucket-level value, and temporal position.Edges connect every node in a non-empty bucket to every node in the next non-empty bucket; no within-bucket edges are added, allowing direct cross-modality message passing without separate modality-specific representations.Source: B. Patient-Level Temporally Directed… · pp. 3–4
C. Learning on the Graph
GraphBEAT computes transition strengths from source and target node representations and embeds each node’s identity, value, and time. This gives nodes for the same clinical feature distinct representations when their values or temporal positions differ.
C. Learning on the Graph
- Transition strengths are computed dynamically from source and target node representations within the graph’s constructed topology.The topology defines possible transitions across data sources.Source: C. Learning on the Graph · p. 4
1) Node Feature Embedding:
- Each node representation combines embeddings for feature identity, bucket-level value, and temporal position.Diagnosis and laboratory categories share a learnable identity embedding space, while the value mapping is shared across patients and both data sources.Source: 1) Node Feature Embedding · p. 4
- Nodes for the same clinical feature can have distinct representations because their observed values and temporal positions differ.Temporal positions use sinusoidal encodings.Source: 1) Node Feature Embedding · p. 4
2) Dynamic Edge Weighting:
GraphBEAT weights transitions using source–target feature relevance and source values, then propagates weighted information across successive time buckets. Its message-passing updates account for irregular time gaps and, in the experiments, use a one-bucket receptive field.
2) Dynamic Edge Weighting:
- Transition weights combine source-node values with cosine similarity between source and target features, then normalize over the target’s incoming edges.The similarity quantifies transition relevance, while the source value provides a data-driven scaling term.Source: 2) Dynamic Edge Weighting · p. 4
3) Context-Aware, Time-Decay Message Passing:
- With search depth K set to 1, each update can incorporate information from at most one preceding bucket through directed paths.K determines the temporal receptive field; each layer propagates across one edge between consecutive non-empty buckets.Source: 3) Context-Aware, Time-Decay Message… · p. 4
- Incoming messages are aggregated by a weighted sum and exponentially decayed according to the time gap between consecutive buckets.The decay strength λ is learnable; first-bucket nodes with no incoming edges receive a zero aggregated message.Source: 3) Context-Aware, Time-Decay Message… · pp. 4–5
- Each target node’s current feature is added to its decayed neighborhood message, then transformed by a fully connected layer with GELU activation.The self-representation preserves information about the target feature.Source: 3) Context-Aware, Time-Decay Message… · p. 4
D. Feature Pooling and Classification
A multi-head attention pooling layer converts variable-sized patient graphs into fixed-length representations. The concatenated pooled features feed a multilayer perceptron that predicts cancer probability and binary outcomes.
D. Feature Pooling and Classification
- Multi-head attention pooling transforms the updated node-feature matrix into a fixed-length graph feature vector despite variation in observed node counts.Each head learns an independent scoring function to weight every node.Source: D. Feature Pooling and Classification · p. 5
- Attention pooling adaptively integrates long-range evidence across temporally encoded node representations.Different node features encode patient conditions at varying time points.Source: D. Feature Pooling and Classification · p. 5
- The pooled vectors from all attention heads are concatenated and passed to a two-hidden-layer multilayer perceptron to predict cancer probability and binary outcomes.Source: D. Feature Pooling and Classification · p. 5
A. Data
The study uses longitudinal diagnosis codes and laboratory measurements from Mayo Clinic sites to define cancer-risk tasks and compare graph and sequence models. Geographic holdout testing evaluates predictions at multiple diagnostic lead times.
A. Data
- The cohort uses time-stamped ICD-9/ICD-10 codes and 31 routine blood tests, with clinical histories spanning up to 20 years before the index date.The data came from three tertiary or quaternary medical centers and the Mayo Clinic Health System; the study was IRB-approved and the de-identified data cannot be shared.Source: A. Data · p. 5
- Three age- and sex-matched binary classification tasks predict pancreatic, liver, and intestinal cancer, excluding patients with under three years of history or fewer than three qualifying laboratory observations.Controls had no qualifying gastrointestinal cancer diagnosis; their index date was set one year before their last recorded encounter.Source: A. Data · p. 5
B. Baselines
- GraphSAGE, GAT, and GCN serve as graph baselines, while Transformer and LSTM serve as sequence baselines with the specified patient-level pooling or representation.The graph baselines use patient-level EHR graphs without GraphBEAT’s context-aware, time-decay message passing.Source: B. Baselines · p. 6
C. Model Training and Evaluation
- Leave-one-site-out testing holds out MCHS, Arizona, and Florida in turn while retaining Rochester in the development set, and evaluates 12-, 24-, and 36-month lead times.Figure 2 displays mean ± SD ROC curves in the top row and precision–recall curves in the bottom row, with cancer types in columns.Source: C. Model Training and Evaluation · p. 6, Figure 2 · p. 7
- Ten-fold cross-validation trains models on clinical history up to—but excluding—the index date, with controls randomly downsampled during training to mitigate imbalance.AUROC and average precision are primary metrics; FLOPs and learnable parameters quantify computational complexity.Source: C. Model Training and Evaluation · p. 6
- GNN hyperparameters were selected using validation performance, while the Transformer used parameters previously optimized in and the LSTM was separately tuned.The searched GNN parameters included bucket duration, embedding dimensions, message-passing depth, attention heads, learning rate, batch size, and control downsampling ratio.Source: C. Model Training and Evaluation · p. 6
D. Performance Results
Across three cancers and three diagnostic lead times, GraphBEAT outperformed the graph and sequence baselines; its patient-level graph representation also achieved a favorable performance-efficiency tradeoff. Performance was consistent across geographically distinct test sites.
D. Performance Results
- Across 12-, 24-, and 36-month leads, GraphBEAT's AUROC and AP declined for each cancer, while liver cancer scored highest on both metrics at every horizon.The reported mean LOSO-AUROC and LOSO-AP cover pancreatic, liver, and intestinal cancer across all three lead times.Source: D. Performance Results · p. 7
- Site-wise performance was consistent across the three test sites, with similar patterns for liver and intestinal cancer.For 12-month pancreatic prediction, results are reported separately for MCHS, Arizona, and Florida.Source: D. Performance Results · p. 7
- Against the strongest sequence baseline, GraphBEAT improved AP by 0.125 to 0.202 and AUROC by 0.070 to 0.102 across tasks and lead times.AP improvements over baseline models at 12 months were 4.8% to 7.6%.Source: D. Performance Results · p. 7
- GraphBEAT outperformed all GNN and sequence baselines across subtasks, improving AP by 0.024 to 0.042 and AUROC by 0.004 to 0.009 over GraphSAGE.The comparison covers pancreatic, liver, and intestinal cancer at three diagnostic lead times.Source: D. Performance Results · p. 7, Table II · p. 8
E. Computational Complexity Analysis
- 12.5M FLOPs per patient for GraphBEAT versus 3995.3M for Transformer and 3230.5M for LSTM; sequence models required around 107 to 521 times as many FLOPs as graph models.The comparison is for 12-month pancreatic cancer prediction.Source: E. Computational Complexity Analysis · p. 8
- Graph-based approaches represented over a 94% reduction in model size compared with the 7.2M LSTM; GraphBEAT used 11.2% fewer FLOPs and 2.2% fewer parameters than GraphSAGE, improving AP by 4.8%.Source: E. Computational Complexity Analysis · p. 8
F. Ablation Studies
Ablations on the MCHS test set for 12-month pancreatic cancer prediction examined node features, edge weights, and time decay. Results favored combining feature identity, observed values, and temporal information, as well as using contextual and value information in normalized, time-decayed message passing.
F. Ablation Studies
- Combining feature identity, observed value, and temporal information produced the strongest node-feature performance; removing any component reduced performance.Among two-component variants, identity plus observed value performed best at AUROC 0.922 and AP 0.499; adding time increased AP by 7.4% to 0.536, while time alone yielded AP 0.032.Source: F. Ablation Studies · p. 9
- Shared diagnosis and laboratory embedding functions outperformed separate identity embeddings (AP = 0.476) and separate value mappings (AP = 0.385), with shared functions reaching AP = 0.536.The ablations characterize the fixed architecture and did not influence model selection.Source: F. Ablation Studies · p. 9
- Combining contextual similarity and value information in edge weights yielded AP 0.536, versus AP 0.506 with similarity alone and AP 0.488 with value alone.Removing weight normalization reduced AP by over 30% to 0.370; AUROC differences across weighting strategies were at most 0.005.Source: F. Ablation Studies · p. 9
- Adding exponential time decay to message passing improved AP by 18.6%, from 0.452 to 0.536.The ablations examined the MCHS test set for 12-month pancreatic cancer risk prediction.Source: F. Ablation Studies · pp. 8–9
G. Hyperparameter Tuning Results
Monthly bucketization and a 1:3 training downsampling ratio were selected using validation AP for 12-month pancreatic cancer prediction. Explanations highlighted common chronic-care diagnoses and clinically relevant laboratory tests, alongside cancer-specific patterns and partially separated case embeddings.
G. Hyperparameter Tuning Results
- Monthly bucketization (τ = 30) achieved validation AP 0.541, above weekly (τ = 7) at 0.527 and quarterly (τ = 90) at 0.502; three pooling heads yielded the highest validation AP.The selected message-passing depth was K = 1, and increasing or decreasing node and graph feature dimensions did not improve performance.Source: G. Hyperparameter Tuning Results · p. 10
- A 1:3 training downsampling ratio achieved AP 0.541, compared with AP 0.184 without downsampling.Among evaluated hyperparameter settings, the downsampling ratio produced the largest observed performance variation.Source: G. Hyperparameter Tuning Results · p. 10
H. Model Explainability Analysis
- Across cancer tasks, top true-positive contributors were diagnoses, commonly reflecting metabolic disease, chronic disease management, screening, and healthcare interactions.Examples included diabetes (E11), hypertension (I10), long-term drug therapy (Z79), and screening encounters (Z12).Source: H. Model Explainability Analysis · p. 10
- Pancreatic explanations included repeated pancreatic disease records (577→577), which ranked among influential connections despite code 577 not appearing among the top-10 individual features.Other influential patterns included diabetes to long-term drug-therapy coding (E11→Z79) and repeated postsurgical aftercare encounters (V58→V58).Source: H. Model Explainability Analysis · p. 10
- Chronic liver disease (571) was prominent among liver-cancer features and edges, alongside alcoholic liver disease (K70→Z23) and repeated lung cancer diagnoses (C34→C34).Repeated diabetes-related diagnoses also contributed to liver-cancer risk prediction.Source: H. Model Explainability Analysis · p. 11
- Intestinal-cancer explanations were less organ-specific and dominated by general medication, screening, and chronic-disease codes; the broader small- and large-intestine class may partly dilute subtype-specific signals.The paper notes this may help explain the comparatively poorer performance for intestinal cancer despite its higher prevalence in the dataset.Source: H. Model Explainability Analysis · p. 11
- Clinically preselected blood tests included complete blood count, chemistry, and metabolic and renal markers; t-SNE embeddings showed localized cancer-case enrichment and partial case-control separation across tasks.Pancreatic and liver cases formed several compact clusters, while intestinal cases occupied a broader but structured region.Source: H. Model Explainability Analysis · p. 11
V. DISCUSSION
Across geographically held-out test sets, GraphBEAT outperformed graph and sequence baselines for three gastrointestinal cancers while using substantially fewer computations. The discussion describes how its temporal graph design handles irregular EHR data and notes clinical-use boundaries and validation needs.
V. DISCUSSION
- GraphBEAT improved average precision by 4.8% to 11.4% over GraphSAGE across prediction settings in three geographically held-out test sets comprising 107,764 patients.At 12-month lead time, mean cross-site AP was 0.523 for pancreatic, 0.584 for liver, and 0.517 for intestinal cancer.Source: §V · p. 11
- 12.5M FLOPs per patient on average, versus 3995.3M for Transformer and 3230.5M for LSTM; all GNN models outperformed sequence models with two orders of magnitude lower computation.The authors report the computational comparison alongside the broader performance results.Source: §V · p. 11
- Bucketizing events treats short-interval records as a clinical state, potentially attenuating isolated coding errors and short-term laboratory variation while shortening the modeling timeline.Repeated diagnoses are summarized by frequency and laboratory measurements by within-bucket mean.Source: §V · p. 11
- The directed acyclic graph retains observed feature-bucket pairs, missingness patterns, measurements, temporal order, and elapsed time, while diagnosis and laboratory nodes share a topology without modality-specific encoders or fusion.Empty buckets create no node layer, but time without recorded features is retained in edge time differences.Source: §V · p. 11
- With K=1, message passing combines each node with the preceding bucket, while multi-head attention pools evidence over the full record rather than limiting prediction to a short interval.The authors describe this separation as local transition modeling followed by global evidence aggregation.Source: §V · p. 11
- At a 0.03 threshold on the MCHS test set, 12-, 24-, and 36-month models yielded net benefits of 0.018, 0.016, and 0.015, respectively.The analysis was exploratory; the authors say operating thresholds should account for calibration, downstream testing capacity, and clinical requirements.Source: §V · p. 12
- External validation in other healthcare systems remains necessary; diagnosis-code-defined cancer cases may be inaccurate, and control downsampling may affect probability calibration.The authors also call for verified cancer-registry subgroup analysis and detailed calibration analysis before clinical use.Source: §V · p. 12
VI. CONCLUSION
- The conclusion presents GraphBEAT as an efficient approach for pre-diagnostic risk stratification and a potential first-stage digital enrichment tool for more specific diagnostic assessment.The stated scope is irregular, heterogeneous routine EHR data.Source: §VI · p. 12