Back

A hierarchical clinical fusion transformer model for personalized opioid treatment: Development and validation in diabetic surgical patients

Naderalvojoud, B.; Sutjiadi, B. J.; Koul, A.; Curtin, C.; Gevaert, O.; Hernandez-Boussard, T.

2026-06-08 health informatics
10.64898/2026.06.04.26353331 medRxiv
Show abstract

Background Machine learning (ML) models are increasingly used to predict adverse outcomes after surgery. However, most rely on static patient characteristics (e.g., age, comorbidities) and overlook clinician-controlled treatment decisions that can be actively modified at the point of care. Discharge opioid prescribing is a key modifiable, clinician-controlled decision, yet optimizing prescribing choices across multiple adverse outcomes remains underexplored in predictive modeling. This study addresses that gap by introducing a novel ML framework that explicitly separates fixed patient risk factors from modifiable prescribing options to support personalized, risk-informed opioid prescribing decisions. Methods We developed the Hierarchical Clinical Fusion Transformer (HCF-Transformer), an ML model designed to estimate patient-specific risks across four postoperative outcomes: prolonged opioid use (POU), chronic pain (CP), 30-day readmission, and opioid-associated outcomes (OAO). The model constructs patient risk profiles from fixed, non-modifiable baseline factors, followed by a transformer layer. Clinician-controllable discharge opioid regimens are modeled as alternative intervention candidates and fused with the fixed risk representation through a clinical fusion mechanism, enabling assessment and ranking based on predicted risks. A Total Relative Risk (TRR) metric, calibrated to each outcome prediction threshold, guides the recommendation process. We evaluated the model in diabetic surgical patients, a common high-risk population. Results The study included 157,853 unique diabetic surgical patients, with outcome prevalences ranging from 47.2% (POU) to 1.8% (OAO). The HCF-Transformer achieved the highest AUROCs, 0.798 for POU, 0.712 for 30-day readmission, 0.808 for CP, and 0.922 for OAO, outperforming Random Forest, FT-Transformer, and ResNet-based models. Compared to these baselines, HCF-Transformer generated more stable and discriminative risk estimates and demonstrated significant variation in TRR scores across discharge opioid options (ANOVA p < .01, eta-squared > .01). This enabled consistent identification of lower-risk regimens tailored to patient-specific profiles. Conclusions The HCF-Transformer introduces a novel hierarchical fusion approach to optimize opioid prescribing by integrating static patient risk profiles with modifiable discharge options. Using transformer-based modeling and a quantifiable TRR metric, the model delivers personalized, risk-aware recommendations. This approach enables data-driven opioid prescribing tailored to individual risk and has the potential to improve postoperative outcomes in high-risk populations. Our findings demonstrate that integrating modifiable factors with structured risk profiles through a transformer-based fusion architecture can enhance decision-support systems, paving the way for more actionable and personalized AI in healthcare.

Matching journals

The top 3 journals account for 50% of the predicted probability mass.

1
npj Digital Medicine
97 papers in training set
Top 0.2%
22.2%
2
BMC Medical Informatics and Decision Making
39 papers in training set
Top 0.1%
18.4%
3
Journal of the American Medical Informatics Association
61 papers in training set
Top 0.2%
14.5%
50% of probability mass above
4
JMIR Medical Informatics
17 papers in training set
Top 0.1%
9.0%
5
JAMIA Open
37 papers in training set
Top 0.2%
6.2%
6
Journal of Biomedical Informatics
45 papers in training set
Top 0.5%
3.5%
7
Scientific Reports
3102 papers in training set
Top 40%
3.2%
8
International Journal of Medical Informatics
25 papers in training set
Top 0.5%
3.0%
9
Journal of Medical Internet Research
85 papers in training set
Top 3%
1.5%
10
JMIR Public Health and Surveillance
45 papers in training set
Top 2%
1.3%
11
Frontiers in Artificial Intelligence
18 papers in training set
Top 0.4%
1.3%
12
PLOS ONE
4510 papers in training set
Top 58%
1.3%
13
JCO Clinical Cancer Informatics
18 papers in training set
Top 0.6%
1.2%
14
PLOS Digital Health
91 papers in training set
Top 2%
1.2%
15
BMJ Health & Care Informatics
13 papers in training set
Top 1.0%
0.7%
16
Frontiers in Digital Health
20 papers in training set
Top 2%
0.7%
17
Heliyon
146 papers in training set
Top 8%
0.6%
18
JAMA Network Open
127 papers in training set
Top 5%
0.6%
19
BMJ Open
554 papers in training set
Top 13%
0.6%
20
Acta Psychiatrica Scandinavica
10 papers in training set
Top 0.6%
0.6%