Related Experiment Videos
Time Series Transformer for long-term CD4 trajectory prediction in HIV patients: a novel deep learning approach
Qianqian Lu1, Tingting Li2, Jie Chen1
1Department of Infectious Diseases, The Eighth's Hospital of Xi'an, Xi'an, Shaanxi, China.
Background:
Accurate prediction of CD4+ T-cell trajectories is essential for monitoring HIV treatment efficacy and guiding clinical decisions. Conventional statistical methods provide population-level insights but struggle to capture nonlinear, patient-specific temporal patterns in real-world data.
Methods:
We developed a Time Series Transformer integrating multi-head self-attention with static patient characteristics. Historical 12-month CD4 measurements were jointly modeled with treatment regimen, demographics, and baseline clinical parameters within an encoder-decoder framework (4 layers, 8 heads, d_model=128). The model was trained and internally validated on a retrospective cohort of 5,436 HIV patients with CD4 measurements spanning up to 24 months post-ART, using patient-level data splitting.
Results:
On the test set, the model achieved an MAE of 5.36 cells/μL, RMSE of 6.94 cells/μL, and R² of 0.9990 for 6-month forecasts. Performance was consistent across patient subgroups, with unbiased, approximately normal error distributions. Feature importance analysis identified baseline CD4, treatment regimen, and time to ART initiation as dominant predictors, aligning with clinical knowledge.
Conclusions:
A regularized Time Series Transformer can provide highly accurate, patient-specific CD4 trajectory forecasts in a real-world HIV cohort. The interpretable integration of clinical features offered a transparent framework for understanding immune recovery. This work demonstrated the potential of modern sequence models to complement conventional tools and support individualized HIV care.