Time Series Transformer for long-term CD4 trajectory prediction in HIV patients: a novel deep learning approach.
Qianqian Lu, Tingting Li, Jie Chen, Huanhuan Ba, Yuan Zhang, Jiajia Li, Jinling Yin, Kangxiao Ma,
Department of Infectious Diseases, The Eighth's Hospital of Xi'an, Xi'an, Shaanxi, China. · Drug Clinical Trial Institution Office, Xi'an Chest Hospital, Xi'an, Shaanxi, China.
Key points
From the paper's conclusion- 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.
Abstract
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.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Digital twin technology for HIV patient virtual modeling: a novel approach to treatment optimizationFrontiers in Pharmacology · 2026
- Adaptive forecasting of antiretroviral therapy demand using machine learning in India's national HIV programmemedRxiv · 2026
- Intervention-Conditioned Counterfactual Human Digital Twin GeneratorarXiv · 2026
- Interpreting antiretroviral therapy loss to follow-up predictive models using LIME and SHAPDiscover Public Health · 2026
- Interpretable Trajectory-Based Feature Extraction from Longitudinal Electronic Health RecordsmedRxiv · 2026
- ICare-DT: a digital twin for continuous forecasting of intensive care patientsarXiv · 2026