Modeling Patient Care Trajectories with Transformer Hawkes Processes
Organizations: Computational and Data-Enabled Sciences, University at Buffalo, Buffalo, USA · Department of Computer Science and Engineering, University at Buffalo, Buffalo, USA
Abstract
Patient healthcare utilization consists of irregularly time-stamped events, such as outpatient visits, inpatient admissions, and emergency encounters, forming individualized care trajectories. Modeling these trajectories is crucial for understanding utilization patterns and predicting future care needs, but is challenging due to temporal irregularity and severe class imbalance. In this work, we build on the Transformer Hawkes Process framework to model patient trajectories in continuous time. By combining Transformer-based history encoding with Hawkes process dynamics, the model captures event dependencies and jointly predicts event type and time-to-event. To address extreme imbalance, we introduce an imbalance-aware training strategy using inverse square-root class weighting. This improves sensitivity to rare but clinically important events without altering the data distribution. Experiments on real-world data demonstrate improved performance and provide clinically meaningful insights for identifying high-risk patient populations.
Figures & tables
| Model | Event-Type Prediction | Time-to-Event Prediction | |||
|---|---|---|---|---|---|
| Macro-F1 | IP F1 | ED F1 | OP F1 | MedAE (days) | |
| GLM | 0.290 | 0.0002 | 0.0070 | 0.9511 | 28.25 |
| LSTM Hawkes (weighted CE) | 0.432 | 0.108 | 0.246 | 0.943 | 18.00 |
| Transformer Hawkes (THP, weighted CE) | 0.480 | 0.162 | 0.334 | 0.942 | 13.00 |
| Model | Macro-F1 | F1(IP) | F1(ED) | F1(OP) | MedAE |
|---|---|---|---|---|---|
| THP (w/o weighted CE) | 0.368 | 0.001 | 0.147 | 0.955 | 13.58 |
| THP (weighted CE) | 0.480 | 0.162 | 0.334 | 0.942 | 13.00 |
Trajectory Prediction
Trajectory prediction forecasts how people, vehicles, robots, and other dynamic systems will move from observed histories and context.
See all 187 papers