Volume 49
Out-of-Time Prediction of National PISA Performance with Explainable Machine Learning: Cross-Country Transferability and Evidence from Morocco
Adil Ghafir, Soukaina El Hajjaji, Anas Bennani
Existing machine-learning studies of PISA performance often emphasize within-cycle prediction or explanatory importance, leaving a methodological question unresolved: can a model selected on historical countries transfer to a genuinely future PISA cycle, and do its errors transfer uniformly across countries? This study develops a transferabilityaware framework for national PISA prediction using lagged structural indicators. It adopts a post-positivist epistemological stance and a quantitative predictive approach in which empirical claims are evaluated through grouped validation, out-oftime testing, uncertainty estimates and non-causal interpretation. OECD PISA outcomes were combined with World Bank and UNESCO indicators in a country-by-cycle panel. Seven algorithms were compared through five-fold GroupKFold on 387 complete observations from 84 countries/economies for 2006–2022; PISA 2025 was kept untouched during model selection. Random Forest was selected historically (RMSE=37.07; R²=0.560) and achieved RMSE=32.05, MAE=25.08 and R²=0.677 in 2025. TreeSHAP showed that development, participation and completion were the dominant predictive signals. Transferability was nevertheless heterogeneous: Morocco’s observed three-domain mean was overpredicted by 45.88 points. The latest pre-2025 country residual strongly predicted the 2025 residual (r=0.849), and a leakagesafe residual diagnostic reduced RMSE from 30.02 to 21.05 on the common sample. The evidence supports a twolayer interpretation: global structural indicators capture broad cross-country expectations, while persistent country-specific deviations remain relevant for future prediction. Results are predictive rather than causal.

