Abstract
<title>Abstract</title> <p>Pediatric intraoperative deterioration (IoD) is a rare, high-consequence event with no validated pre-operative risk model. We developed PORT (Pediatric Operative Risk Transformer), a decoder-only transformer pretrained on perioperative electronic health record (EHR) timelines and adapted with low-rank adaptation, to predict IoD from pre-operative data. We studied a single-center retrospective cohort of 189,704 anesthesia encounters (127,874 patients, 2014-2021). On a patient-level held-out test set (37,948 encounters; 101 IoD events), PORT achieved an AUROC of 0.942 (95% CI 0.915-0.964) and an AUPRC of 0.237, outperforming a tuned BiLSTM and other baselines while remaining well calibrated (ECE 0.001); discrimination held in a temporally held-out post-2019 cohort (AUROC 0.949). Integrated Gradients attributed predictions to pre-operative tokens, and a high-risk subgroup (0.4% of encounters) captured 31.7% of IoD events. Lightweight adaptation of a pretrained generative EHR backbone thus yields accurate, calibrated, and interpretable risk estimates, supporting proactive perioperative planning.</p>