A Two-Stage Time-Aware Transformer for Short-Horizon AECOPD Risk Prediction
Authors: Dongyang Wang, Weihao Qu, Ling Zheng, Haowen Pan
Organizations: Department of Computer Science and Software Engineering, Monmouth University, West Long Branch, NJ, USA · Changzhou Yaoyuanxing Electronic Technology Co., Ltd., China
Acute exacerbation of chronic obstructive pulmonary disease (AECOPD) can worsen rapidly, making timely prediction a clinical priority. Most existing machine learning approaches rely on episodically collected clinical variables, introducing delays that limit their practical utility in home monitoring settings. Home ventilators offer a lower-latency alternative, producing a near-continuous record of respiratory status during daily use. However existing ventilator-based approaches either compress the waveform into handcrafted features or focus primarily on binary risk classification, leaving the timing of an impending event unresolved. In this paper, we present a two-stage framework that operates directly on raw pressure and flow waveforms from the most recent seven days of home ventilator use. The first-stage classification model identifies patients at high risk of a severe exacerbation. The second-stage regression model then estimates how many days remain before the event occurs. Our experimental results demonstrate that the two-stage model outperforms traditional baseline models on both risk classification and time-to-event estimation, with our selected Stage 1 classifier achieving F1 = 0.91 and our Stage 2 regression model achieving RMSE = 1.00 days and R^2 = 0.76, giving clinicians both an early warning and actionable lead time before a severe exacerbation occurs.
Figures & tables
Fig. 1 : Representative raw ventilator waveform segment comparing the original 5 Hz recording with the same segment reduced to 1 reading per second.
Fig. 2 : Architecture of the Two-Stage AECOPD Time-Aware Transformer Model.
Configuration
LR
SVM
DT
RF
XGB
withtime32
0.91 [0.67,1.00]
0.80 [0.33,1.00]
0.75 [0.00,1.00]
0.77 [0.40,1.00]
0.80 [0.40,1.00]
withtime64
1.00 [1.00,1.00]
1.00 [1.00,1.00]
1.00 [1.00,1.00]
1.00 [1.00,1.00]
1.00 [1.00,1.00]
withtime128
1.00 [1.00,1.00]
1.00 [1.00,1.00]
0.71 [0.36,0.93]
1.00 [1.00,1.00]
1.00 [1.00,1.00]
notime32
0.57 [0.00,1.00]
0.00 [0.00,0.00]
0.31 [0.00,0.62]
0.20 [0.00,0.53]
0.37 [0.17,0.58]
notime64
0.55 [0.00,0.86]
0.00 [0.00,0.00]
0.17 [0.00,0.46]
0.00 [0.00,0.00]
0.00 [0.00,0.00]
notime128
0.13 [0.00,0.38]
0.00 [0.00,0.00]
0.11 [0.00,0.32]
0.00 [0.00,0.00]
0.37 [0.17,0.58]
TABLE I : Stage 1 classification: test-set F1 (label 1) with 95% bootstrap CIs for the raw ventilator data
Configuration
LR
SVM
DT
RF
XGB
jump_withtime32
0.89 [0.50,1.00]
0.75 [0.00,1.00]
0.67 [0.00,1.00]
0.89 [0.50,1.00]
0.80 [0.40,1.00]
jump_withtime64
0.89 [0.50,1.00]
0.57 [0.00,1.00]
0.36 [0.00,0.71]
0.80 [0.33,1.00]
0.80 [0.40,1.00]
jump_withtime128
0.80 [0.40,1.00]
0.80 [0.40,1.00]
0.89 [0.50,1.00]
0.80 [0.40,1.00]
0.89 [0.50,1.00]
TABLE II : Stage 1 classification: test-set F1 (label 1) with 95% bootstrap CIs for the jump-point baseline
Dim
Setting
Model
AccL0
Label 0
Label 1
32
Strong
XGBoost
0.97
78
7
32
Weak
Logistic Regression
0.00
0
85
32
Strong
Decision Tree
0.97
83
2
64
Strong
XGBoost
1.00
85
0
64
Strong
Logistic Regression
1.00
85
0
64
Weak
SVM
0.00
0
85
TABLE III : Cross-window stability check on the first 7 days of each patient’s 30-day recording window
Threshold
Sens.
Spec.
PPV
NPV
<1 day
0.97
0.78
0.44
0.99
<2 days
0.96
0.75
0.62
0.98
<3 days
0.96
0.70
0.72
0.96
<4 days
0.99
0.24
0.63
0.95
<5 days
1.00
0.00
0.72
—
TABLE V : Stage 2 alert threshold: sensitivity, specificity, PPV, and NPV on the 29 label-1 patients (embed_dim=64)
Fig. 3 : Illustrative time-to-event prediction example for one representative test patient, not an averaged trajectory. The same patient is evaluated with the 32-, 64-, and 128-dimensional time-aware regression models. The x-axis is shown in reverse order from 6 to 0 days before event.