Journal of Translational Medicine

Development and internal validation of a time-aware transformer model for predicting pediatric myopia progression from irregular longitudinal school screening data

Mingxuan Zhang, Tuluhong Wumaier, Aixianjiang Maimaiti, Yingxiang Zhao, Salissou Moutari, Muhammad Usama, Zhihui Zhang, Shaochong Bu,

Observational · n=2,874

Key points

From the paper's conclusion
  • We developed and internally validated a time-aware deep learning model that forecasts refractive progression directly from irregularly sampled school screening records, and assessed whether school-level geospatial context adds prognostic information.

Abstract

Background Rising global myopia rates are a major public health challenge because of the risk of irreversible vision loss in high myopia, and this creates a need for early identification of children on rapidly progressing trajectories. School-based screening characterises a child’s current refractive state but does not forecast where that trajectory is heading. We developed and internally validated a time-aware deep learning model that forecasts refractive progression directly from irregularly sampled school screening records, and assessed whether school-level geospatial context adds prognostic information. Methods A Time-Aware Transformer was adapted to process irregularly sampled refractive screening sequences without imputation. It combines an Adaptive-Frequency Time Embedding, which tunes a sinusoidal frequency spectrum to clinical sampling intervals using two learnable parameters, with a temperature-scaled Gated Residual Network that selectively integrates school-level environmental indices. The model was developed on a Gold Standard cohort of 2874 students from Yecheng County, China with complete four-year screening trajectories (2020 to 2023). Outcomes were one-year-ahead spherical equivalent refraction (SER) and classification of rapid myopic progression ( $$\:{\Delta\:}$$ SER $$\:\le\:-0.75$$ D/year). Internal validation used a held-out test set, five-fold cross-validation, a ten-seed stability analysis, a school-level grouped split and leave-one-school-out validation. Discrimination, calibration and net benefit were assessed, and nine baseline models were compared using paired test-set bootstrap tests with post hoc multiplicity control. Results The model achieved a mean squared error (MSE) of 0.168 D 2 and an $$\:{R}^{2}$$ of 0.929 for one-year-ahead SER, and an area under the receiver operating characteristic curve of 0.891 for identifying rapid progressors, with good calibration (calibration slope 0.968, intercept $$\:-0.014$$ D) and higher net benefit than referring all or no children across referral thresholds of 0.10 to 0.55. Performance was stable in five-fold cross-validation (MSE 0.171 ± 0.017) and across ten random seeds (MSE 0.168 ± 0.004). Accuracy was comparable to the strongest baselines rather than clearly superior: the difference from ContiFormer was 0.010 D in root mean squared error, well below the precision of non-cycloplegic autorefraction, while the proposed model used 42% fewer parameters (52 K versus 89 K) and trained 2.7 times faster. When whole schools were held out, MSE rose to 0.191 and the benefit attributable to environmental features fell from 0.027 to 0.005 D 2 , indicating that most of the apparent geospatial signal reflects school identity rather than measured environment. Prediction was hardest for children who converted to myopia during follow-up (MSE 0.243) and easiest for persistent non-myopes (MSE 0.105). Conclusion A compact time-aware transformer forecasts one-year-ahead refractive error from routinely collected school screening data with accuracy comparable to substantially larger continuous-time models, with calibrated risk estimates and clinically interpretable attention. The case for this architecture rests on efficiency, stability and interpretability rather than on an accuracy advantage. School-level environmental indices should be understood as geospatial baseline priors rather than as individual-level exposures.

Read the paper

Discussion

Science Skim's AI key points, plus readers' public thoughts

Readers' thoughts

No reader thoughts yet.

Related papers

Development and internal validation of a time-aware transformer model for predicting pediatric myopia progression from irregular longitudinal school screening data — Science Skim