Early detection of at-risk health sciences students: a machine learning-based predictive study using midterm grades Authors: Reem A. M. Al Hashmi, Ilhan Ozturk, Hussein M. Elmehdi Published: 2025 ABSTRACT BackgroundEarly identification of students at academic risk is critical in health sciences education, particularly in regions prioritizing healthcare workforce development. This study evaluated the application of established machine learning (ML) classifiers as a regional case study in the United Arab Emirates (UAE), using first-term midterm performance as early, formative assessment indicators of academic integration and student persistence.MethodsAcademic records from 346 first-year students across seven programs were analyzed. All students were enrolled in three common courses: Biology, English for Medical Sciences, and Introduction to Health Sciences. Five supervised ML models (XGBoost, Random Forest, Logistic Regression, Gradient Boosting Machine (GBM), and Naïve Bayes) were trained using Random Over-Sampling Examples (ROSE) with five-fold cross-validation. Model performance was assessed with F1-scores and area under the curve (AUC). Interpretability was examined via variable-importance plots and Shapley Additive exPlanations (SHAP) for XGBoost.ResultsXGBoost and Logistic Regression showed the highest performance (F1 = 0.84; AUC > 0.91). Midterm scores in Biology and Introduction to Health Sciences were consistently the strongest predictors, and SHAP analyses indicated they had the largest case-level impact on risk predictions.ConclusionsFindings demonstrate the feasibility of using midterm grades as early, pedagogically meaningful indicators to identify at-risk students in a UAE health sciences context. While limited in scope to one cohort and institution, the study provides regionally relevant evidence to support timely academic interventions. Future research should include behavioral and psychosocial predictors and validate across multiple cohorts and institutions.Trial registrationNot applicable. Introduction University dropout remains a critical issue with far-reaching consequences for students, institutions, and national development agendas. For students, attrition carries long-term economic and social costs, including reduced lifetime earnings, limited employment opportunities, and diminished access to professional and academic networks [1, 2]. These effects are compounded by the psychological consequences of academic failure and the loss of educational investment [3]. For institutions, high dropout rates negatively impact funding in outcome-based financing models, strain academic and administrative resources, and erode institutional reputation [4, 5]. At the national level, attrition undermines the return on public investment in higher education and contributes to skill shortages in strategically vital sectors such as healthcare [6, 7]. The challenge is particularly pronounced in health sciences education. Programs in fields such as nursing, physiotherapy, and allied health tend to report elevated withdrawal rates due to the academically intensive, time-compressed, and technically demanding nature of their curricula [8–10]. Students are expected to rapidly master foundational scientific content while adapting to high-stakes assessment environments, often with limited opportunities for academic recovery. These demands make first-year health sciences students especially vulnerable to early academic disengagement and dropout [11]. In response, growing international attention has focused on the importance of timely identification of at-risk students, ideally prior to the onset of academic probation or withdrawal so that targeted support and institutional interventions can be deployed during the most critical period for student persistence [12]. In the UAE, addressing early dropout in health sciences education has become both an institutional concern and a national strategic imperative. The UAE’s Health Workforce Strategic Plan 2023–2030, issued by the Ministry of Health and Prevention, prioritizes the development of a skilled, sustainable, and Emirati-led healthcare workforce. The plan calls for improved educational outcomes, early risk identification, and reduced attrition in high-stakes programs such as nursing, pharmacy, and medical sciences, where national workforce demands remain acute [13]. As the country pursues Emiratization and future-readiness initiatives, student retention in these disciplines has become tightly linked to broader development goals [14]. Unlike many Western systems, where dropout is often studied through the lens of individual motivation or campus integration, persistence in the UAE is shaped by structural and policy-related forces. Health sciences programs are typically delivered in English, posing a steep linguistic transition for many students who completed secondary education in Arabic. This language shift is frequently associated with increased academic anxiety, reduced participation, and underperformance in first-year coursework [15–17]. Moreover, many students are enrolled under performance-based government scholarships or stipends, further elevating the stakes of academic success [18]. These factors combine to create a high-pressure environment in which failure to progress has financial, personal, and societal implications. As such, early detection of academic risk is not only critical for student success but also for institutional accountability and national workforce planning [19]. However, current systems used to identify at-risk students in the UAE are often reactive, flagging students only after cumulative GPA thresholds are breached typically at the end of the second semester, leaving a significant window for preventable dropout to occur [20]. Traditional early warning systems in higher education have historically relied on pre-admission characteristics, such as high school GPA, gender, and admission type or end-of-semester outcomes like cumulative GPA [21]. These models are often grounded in classical dropout theories such as Tinto’s Student Integration Model and Bean and Metzner’s Model of Nontraditional Student Attrition. Both frameworks emphasize the central role of academic integration and performance in shaping persistence, particularly during the first year [22–24]. From this perspective, midterm grades can be understood as an early, theory-driven proxy for academic integration, signaling whether students are successfully adapting to the curricular and institutional environment. This positions formative assessment not merely as performance data but as a pedagogical checkpoint in persistence frameworks. Yet conventional systems remain largely rule-based and reactive, identifying students only after cumulative GPA thresholds are breached [25]. This delayed risk detection poses a significant limitation, particularly in academically intensive programs like health sciences. Students often encounter rapid curricular pacing, high cognitive demands, and limited flexibility for recovery. A single failed midterm can cascade into a broader pattern of disengagement, yet institutional systems may not flag risk until cumulative GPA falls below a defined threshold, typically after two semesters [26, 27]. Furthermore, conventional models often overlook granular, course-level data such as midterm scores or sudden declines in participation signals that are increasingly accessible through modern student information systems [28, 29]. These signals are particularly valuable in first-year health sciences programs, which follow standardized tracks where all students take the same foundational courses and are exposed to high levels of academic stress and risk of burnout early in the curriculum [30]. In such contexts, midterm performance offers a unique opportunity to identify students whose academic difficulties may not yet be reflected in term-end indicators [31, 32]. In the UAE, where institutions frequently apply block registration and assess academic standing only after two full semesters [33, 34], midterm data remains an underutilized yet potentially powerful signal for identifying students at risk [13, 14]. By operationalizing midterm performance as a predictive tool, universities can move from reactive to proactive risk management strategies, improving student outcomes while supporting broader educational policy objectives. The growing availability of academic data has paved the way for machine learning (ML) to serve as a more dynamic and responsive alternative to traditional early warning systems. ML techniques are capable of identifying complex, non-linear patterns in large datasets, enabling earlier and more precise prediction of student risk than classical rule-based models allow [35]. Unlike cumulative GPA or pre-admission metrics, which tend to offer static and retrospective insights, ML models can integrate multiple data points from early in the academic term, including midterm scores, course engagement, and academic load to generate real-time risk assessments that support just-in-time intervention [36–38]. This capability is especially critical in health sciences education, where academic underperformance escalates quickly and students have limited flexibility to recover. Midterm scores in standardized foundational courses, such as Biology or English for Medical Sciences, offer a high-frequency and policy-aligned signal that can be modeled using ML to forecast end-of-year dropout risk. These features are particularly relevant in the UAE, where institutional definitions of “at-risk” status are not applied until after two full semesters, even though signs of academic difficulty may be apparent much earlier, including psychological distress and reduced well-being among health sciences students [20, 27, 39, 40]. Beyond predictive accuracy, interpretability has become an essential requirement for deploying ML in educational settings. Feature importance scores and threshold-based decision graphs allow institutional stakeholders to understand which variables contribute most to model predictions and where actionable cutoffs may be placed. In addition, Shapley Additive exPlanations (SHAP) complement these tools by providing case-level attributions that illustrate how individual features influence predictions toward or away from ‘at risk,’ thereby reinforcing transparency, supporting advisor dialogue, and enabling institutional auditability. This enhances the transparency and usability of ML tools for academic advising, policy planning, and targeted support strategies [41, 42]. Despite its promise, most ML-based dropout studies have focused on retrospective prediction using full-program data from Western universities [43], often overlooking the need for context-specific models tailored to non-Western settings [44]. Moreover, many existing models offer limited interpretability, making it difficult for institutions to translate predictions into actionable interventions [45]. Evidence from MENA health sciences programs remains scarce, particularly with regard to early-term predictors and transparent model outputs. The objectives of this study are fourfold: To evaluate the effectiveness of midterm academic indicators, particularly from standardized, first-term courses, in predicting student dropout by the end of the first academic year.To compare the performance of five supervised ML models (XGBoost, Random Forest, Logistic Regression, Gradient Boosting Machine (GBM), and Naïve Bayes) in identifying students at risk of attrition.To determine the most influential predictors of dropout in a health sciences context using data from the institutional Student Information System (SIS) and Learning Management System (LMS).To evaluate the interpretability of ML model outputs using feature importance scores, SHAP explanations (for XGBoost), and threshold plots, thereby supporting institutional advising and policy intervention strategies. To evaluate the effectiveness of midterm academic indicators, particularly from standardized, first-term courses, in predicting student dropout by the end of the first academic year. To evaluate the effectiveness of midterm academic indicators, particularly from standardized, first-term courses, in predicting student dropout by the end of the first academic year. To compare the performance of five supervised ML models (XGBoost, Random Forest, Logistic Regression, Gradient Boosting Machine (GBM), and Naïve Bayes) in identifying students at risk of attrition. To compare the performance of five supervised ML models (XGBoost, Random Forest, Logistic Regression, Gradient Boosting Machine (GBM), and Naïve Bayes) in identifying students at risk of attrition. To determine the most influential predictors of dropout in a health sciences context using data from the institutional Student Information System (SIS) and Learning Management System (LMS). To determine the most influential predictors of dropout in a health sciences context using data from the institutional Student Information System (SIS) and Learning Management System (LMS). To evaluate the interpretability of ML model outputs using feature importance scores, SHAP explanations (for XGBoost), and threshold plots, thereby supporting institutional advising and policy intervention strategies. To evaluate the interpretability of ML model outputs using feature importance scores, SHAP explanations (for XGBoost), and threshold plots, thereby supporting institutional advising and policy intervention strategies. In this study, ‘at-risk’ (CGPA < 2.3) is used as a pragmatic, institutionally endorsed proxy for dropout risk to enable earlier, policy-aligned intervention. Anchored in established persistence frameworks such as Tinto’s Student Integration Model [24] and Bean and Metzner’s Model of Attrition [22], this work contributes a contextually grounded case study from a UAE health sciences setting. It demonstrates how interpretable ML outputs can be embedded into regional advising and workforce priorities, providing a foundation for more comprehensive, multi-factor models in the future. Method Research design and institutional context This study employed a quantitative, predictive research design to develop and empirically evaluate machine learning (ML) models for the early identification of at-risk students in a health sciences college at a leading university in the United Arab Emirates (UAE). A predictive design was selected to support timely, data-driven interventions aligned with institutional objectives and national education policy. The research responds to the UAE’s National Strategy for Health Workforce Development 2023–2030, which prioritizes academic success, retention, and the long-term supply of Emirati and resident healthcare professionals [13]. The institutional setting is a multidisciplinary health sciences college offering undergraduate degrees in Nursing, Medical Laboratory Sciences, Healthcare Management, Physiotherapy, Environmental Health Sciences, Clinical Nutrition and Dietetics, and Medical Diagnostic Imaging. These programs share a common first-year structure that facilitates comparative analysis of student risk using early academic performance data. This study demonstrates how existing institutional data pipelines, particularly the Student Information System (SIS) and Learning Management System (LMS), can be leveraged to develop early warning systems in the UAE context [46]. Data source and sample selection Student-level data were extracted from two institutional platforms: the Student Information System (Ellucian Banner) and the Learning Management System (Blackboard). The study targeted first-year undergraduate students enrolled in the Fall and Spring semesters of the 2024–2025 academic year. To ensure consistency in academic exposure and comparability of performance indicators, the sample was limited to students who were block-registered in three mandatory first-term courses: Biology, Introduction to Health Sciences, and English for Medical Sciences, and who remained enrolled through the second semester. Exclusion criteria included incomplete academic records, withdrawal prior to semester completion, non-registration in any of the three required courses, or enrollment in foundation or bridging tracks. Following these inclusion and exclusion criteria, the final dataset comprised 346 students. Of these, 123 were classified as at-risk and 223 as not at-risk based on cumulative GPA. The sample included 273 females and 73 males, with 185 UAE nationals and 161 non-nationals. A majority of students (317) came from a scientific high school track, while 29 were from non-scientific backgrounds. Outcome variable: defining At-Risk students The outcome variable in this study is student risk status, defined as a binary classification: At-Risk or Not At-Risk. While institutional policy formally places students on probation if their cumulative GPA (CGPA) falls below 2.0, the University’s Deans’ Council has endorsed a preventive benchmark of CGPA < 2.3 as an official internal threshold. This benchmark is embedded in the institution’s academic strategy and key performance indicators (KPIs), reflecting a proactive approach to risk detection. Using this formally approved threshold ensures alignment with institutional practice and supports earlier identification and intervention, consistent with persistence frameworks that emphasize the importance of early academic integration and prior evidence that underperformance is a primary predictor of attrition [25]. Predictor variables and preprocessing The predictor variables included midterm scores from three first-semester courses (sourced from Blackboard), along with high school average, gender, nationality, age at admission, and high school track (scientific vs. non-scientific), retrieved from the Banner SIS. Midterm assessments were selected for their early availability and predictive value prior to final exam outcomes. Each course carried a total grade of 100, with midterms weighted as follows: 25% in Introduction to Health Sciences, 35% in Biology, and 20% in English for Medical Sciences. All analyses were conducted on an exported dataset that contained no missing values after applying the a priori exclusion criteria. No imputation or feature scaling was performed, and predictors were retained on their native scales. Categorical predictors were supplied as factors and encoded internally by the caret framework during model fitting. For the SHAP analysis, one-hot encoding via dummyVars was estimated on the training partition and then applied to the held-out test set; no transformation or resampling step was ever estimated on the full dataset. To address class imbalance due to the lower proportion of at-risk students, the ROSE (Random Over-Sampling Examples) technique was applied once to the training set only. While this approach improved class representation and model sensitivity to the minority class, it may slightly overestimate performance compared with fold-level resampling, a limitation noted for future work [47, 48]. The predictor set was intentionally limited to early academic and demographic indicators, reflecting variables consistently available in institutional records. While this design enhances feasibility and policy alignment, it excludes broader contextual or pedagogical factors such as LMS engagement metrics, advising interactions, or psychosocial indicators. Future research should integrate such dimensions to capture the multidimensional nature of student persistence. Table 1 provides a summary of the predictor and target variables included in the final dataset. Table 1Description of variables used in model trainingVariableTypeDescriptionPROBATION → AT_RISKBinaryTarget variable; 1 = At-Risk, 0 = Not At-RiskFEMALEBinaryGender (1 = Female, 0 = Male)UAE_NATIONALBinaryNationality (1 = Emirati, 0 = Non-Emirati)AGE_AT_ADMISSIONNumericAge at the time of university entryHIGH_SC_AVERAGENumeric (%)High school final averageSCIENTIFIC_HIGHSCHOOLBinary1 = Scientific track, 0 = OtherINTRO_TO_HS_MIDTERMNumeric (Score)Midterm score in Introduction to Health Sciences (25%)BIOLOGY_MIDTERMNumeric (Score)Midterm score in Biology (35%)ENGLISH_FOR_MEDICAL_MIDTERMNumeric (Score)Midterm score in English for Medical Sciences (20%) Table 1Description of variables used in model trainingVariableTypeDescriptionPROBATION → AT_RISKBinaryTarget variable; 1 = At-Risk, 0 = Not At-RiskFEMALEBinaryGender (1 = Female, 0 = Male)UAE_NATIONALBinaryNationality (1 = Emirati, 0 = Non-Emirati)AGE_AT_ADMISSIONNumericAge at the time of university entryHIGH_SC_AVERAGENumeric (%)High school final averageSCIENTIFIC_HIGHSCHOOLBinary1 = Scientific track, 0 = OtherINTRO_TO_HS_MIDTERMNumeric (Score)Midterm score in Introduction to Health Sciences (25%)BIOLOGY_MIDTERMNumeric (Score)Midterm score in Biology (35%)ENGLISH_FOR_MEDICAL_MIDTERMNumeric (Score)Midterm score in English for Medical Sciences (20%) Description of variables used in model training Model training and evaluation Five supervised machine learning algorithms were implemented using RStudio (version 2025.05.0 + 496 “Mariposa Orchid”) with R version 4.4.0. The following packages were used: caret for model training and cross-validation, ROSE for class imbalance correction, pROC for ROC/AUC evaluation, xgboost, randomForest, gbm, e1071, and naivebayes for the Naïve Bayes classifier. The models included Random Forest, Extreme Gradient Boosting (XGBoost), Gradient Boosting Machine (GBM), Logistic Regression, and Naïve Bayes. The dataset was partitioned into training (70%) and testing (30%) subsets, and 5-fold cross-validation was applied to the training set to ensure model stability and generalizability [49]. As the study was based on a single cohort, no external validation across additional semesters or cohorts was possible. Within each 5-fold cross-validation, models were tuned using caret’s default hyperparameter grids (no custom tuneGrid/tuneLength): Random Forest tuned mtry; GBM tuned n.trees, interaction.depth, shrinkage, and n.minobsinnode; and XGBoost (xgbTree) tuned a compact grid over nrounds, max_depth, eta, gamma, colsample_bytree, min_child_weight, and subsample. Logistic Regression and Naïve Bayes used default settings (no tunable hyperparameters). Thresholds for converting probabilities to classes were explored post-hoc on the hold-out test set using F1–threshold curves. While this provided actionable insights into institutional trade-offs between precision and recall, it also risks optimistic bias. Future work should embed threshold tuning within cross-validation (nested CV) and reserve the test set strictly for final evaluation. All models were trained on the ROSE-balanced training data. Model performance was assessed using five evaluation metrics: Accuracy, Precision, Recall, F1 Score, and Area Under the Receiver Operating Characteristic Curve (AUC). In educational settings, where false negatives (failing to identify an at-risk student) are particularly costly, F1 Score vs. Threshold plots were used to illustrate trade-offs between precision and recall, highlighting the importance of balancing sensitivity and specificity [48]. Model interpretability and visualization To improve model transparency and institutional usability, variable importance scores were computed using the caret package in R, highlighting the most influential predictors across the tested models [50]. These rankings support academic decision-making by identifying which features, such as midterm performance or demographic attributes contribute most to risk classification. Such interpretability is critical for embedding ML outputs into advising practices, ensuring that academic staff can translate technical predictions into targeted interventions. Receiver Operating Characteristic (ROC) curves were plotted to evaluate each model’s ability to balance sensitivity and specificity across thresholds. In addition, F1 Score vs. Threshold graphs were generated for all models, illustrating how predictive performance changes under different cutoffs. While these tools are standard in machine learning research, their value in this study lies in translating technical performance into institutional decision-making: they help advisors identify intervention points that balance sensitivity (catching at-risk students) with specificity (avoiding unnecessary alerts). In this way, model evaluation outputs become both interpretable and pedagogically actionable in real-world academic contexts. For the best-performing model (XGBoost), we computed local feature attributions using TreeSHAP via the SHAPforxgboost package. Predictors were one-hot encoded with caret::dummyVars fit on the training data, and SHAP values were computed on the held-out test set using the trained booster (xgbTree → $finalModel). SHAP values represent each feature’s contribution (in log-odds) to the AT_RISK prediction relative to the model’s expected value. We visualized global patterns with a beeswarm summary plot and report mean |SHAP| as a global importance measure. SHAP analysis was conducted post hoc for interpretability only and did not inform model selection, tuning, or threshold choice. The complete modeling pipeline is illustrated in Fig. 1. Fig. 1Machine learning pipeline for at-risk student prediction, organized into three stages: Data Preparation (blue), Model Training and Threshold Optimization (green), and Evaluation (red). Academic data from SIS and LMS platforms were pre-processed, balanced with ROSE, and modeled using five supervised algorithms under 5-fold cross-validation Machine learning pipeline for at-risk student prediction, organized into three stages: Data Preparation (blue), Model Training and Threshold Optimization (green), and Evaluation (red). Academic data from SIS and LMS platforms were pre-processed, balanced with ROSE, and modeled using five supervised algorithms under 5-fold cross-validation Ethical considerations Ethical approval for this study was obtained from the university’s research ethics committee (REC-25-06-15-02-PG). All data were fully anonymized prior to analysis and processed in strict accordance with institutional privacy regulations and international research ethics guidelines. No personally identifiable information was accessed, stored, or reported at any stage of the study. The methodological framework presented here adheres to principles of transparency, reproducibility, and responsible data use. It establishes a replicable, ethically sound foundation for implementing institutional early warning systems aimed at improving health sciences student retention through timely, data-informed interventions. Clinical trial number: not applicable. Results Descriptive statistics and class distribution The final dataset included 346 first-year undergraduate health sciences students enrolled during the 2024/2025 academic year across seven programs: Nursing, Medical Laboratory Sciences, Healthcare Management, Physiotherapy, Environmental Health Sciences, Clinical Nutrition and Dietetics, and Medical Diagnostic Imaging. Of the total sample, 273 (79%) were female, and 73 (21%) were male. UAE nationals constituted 53% (185 students), while 47% (161 students) were non-nationals. The majority (92%) came from a scientific high school track (317 students), with the remainder (8%) from a non-scientific background. Based on cumulative GPA (CGPA) at the end of the second semester, 123 students (35.5%) were classified as at-risk (CGPA < 2.3), while 223 students (64.5%) were not at-risk. Figure 2 presents the original class distribution. To address class imbalance, the ROSE technique was applied, resulting in a more balanced training set as shown in Fig. 3. Fig. 2Distribution of at-risk versus not at-risk students before applying the ROSE balancing technique Distribution of at-risk versus not at-risk students before applying the ROSE balancing technique Fig. 3Distribution of at-risk versus not at-risk students in the training set after ROSE balancing Distribution of at-risk versus not at-risk students in the training set after ROSE balancing This adjustment produced a more even distribution for model training, though as noted in the methodology, it may slightly inflate performance since balancing was applied outside of cross-validation folds. Feature relationships and preliminary insights A correlation heatmap (Fig. 4) revealed meaningful relationships among key demographic and academic variables. Notably, midterm scores in Biology (r = 0.39), English for Medical Sciences (r = 0.32), and Introduction to Health Sciences (r = 0.33) exhibited moderate positive correlations with high school average. These findings are consistent with prior research showing that prior academic achievement provides a useful, though not definitive, foundation for predicting early university performance [51]. In this study, the observed correlations align with international findings while contributing UAE-specific evidence, thereby supporting the inclusion of both high school GPA and midterm scores as input features in risk prediction models. Fig. 4Correlation heatmap of predictor variables used in the machine learning model. The heatmap shows that midterm grades in Biology, English for Medical Sciences, and Introduction to Health Sciences are moderately correlated with high school average (r = 0.32–0.39). The three midterm scores are also moderately correlated with each other (0.52–0.73), reflecting their shared role as early academic indicators. Demographic variables such as gender and nationality show weaker correlations, underscoring their limited predictive power compared with academic performance measures Correlation heatmap of predictor variables used in the machine learning model. The heatmap shows that midterm grades in Biology, English for Medical Sciences, and Introduction to Health Sciences are moderately correlated with high school average (r = 0.32–0.39). The three midterm scores are also moderately correlated with each other (0.52–0.73), reflecting their shared role as early academic indicators. Demographic variables such as gender and nationality show weaker correlations, underscoring their limited predictive power compared with academic performance measures However, the moderate strength of these associations also points to the influence of additional, unmeasured factors, such as academic habits, emotional wellbeing, or linguistic readiness underscoring the importance of broader data integration in future models to improve prediction accuracy. To visualize these relationships, three scatterplots were generated comparing high school average with midterm performance in each core course. In Fig. 5, students classified as NOT_AT_RISK (blue) cluster in the upper-right quadrant, reflecting strong performance on both indicators. In contrast, AT_RISK students (red) are more dispersed, with many scoring below 15/25 on the biology midterm, even among those with mid-to-high high school averages. This suggests that while prior GPA is informative, it is not sufficient for identifying risk without complementary early-term academic indicators, which provide a more actionable signal for advisors. Fig. 5Scatterplot of Biology midterm scores versus high school average, stratified by at-risk status. Students classified as not at-risk (blue) cluster in the upper-right quadrant with strong performance on both indicators, while at-risk students (red) are more dispersed and concentrated below 15/25 on the Biology midterm, even among those with higher high school averages. This pattern highlights the added predictive value of early-term midterm performance beyond prior GPA Scatterplot of Biology midterm scores versus high school average, stratified by at-risk status. Students classified as not at-risk (blue) cluster in the upper-right quadrant with strong performance on both indicators, while at-risk students (red) are more dispersed and concentrated below 15/25 on the Biology midterm, even among those with higher high school averages. This pattern highlights the added predictive value of early-term midterm performance beyond prior GPA Figure 6 illustrates a similar stratification for English for Medical Sciences. A concentration of AT_RISK students is observed below the 15/20 midterm score range, particularly among those with high school averages in the 80–90% bracket. NOT_AT_RISK students are more tightly clustered near the maximum score. These results indicate that English midterm performance may capture transition-related challenges, especially in contexts where students shift from Arabic-medium secondary education to English-instructed university programs [17], highlighting the pedagogical significance of language readiness in health sciences education. Fig. 6Scatterplot of English for Medical Sciences midterm scores versus high school average. Students not at-risk (blue) cluster near the maximum midterm score, whereas many at-risk students (red) fall below 15/20 even with high school averages in the 80–90% range. This suggests that English midterm performance captures transition-related challenges, particularly linguistic readiness, beyond what prior GPA alone can reveal Scatterplot of English for Medical Sciences midterm scores versus high school average. Students not at-risk (blue) cluster near the maximum midterm score, whereas many at-risk students (red) fall below 15/20 even with high school averages in the 80–90% range. This suggests that English midterm performance captures transition-related challenges, particularly linguistic readiness, beyond what prior GPA alone can reveal In Fig. 7, a comparable trend appears for the Introduction to Health Sciences midterm: NOT_AT_RISK students are again clustered in the top-right quadrant, whereas AT_RISK students show broader dispersion. Several red points fall in the lower midterm range despite relatively strong high school performance, reinforcing that early-term assessments can detect adaptation issues not captured by prior GPA, offering instructors a timely basis for intervention. Fig. 7Scatterplot of Introduction to Health Sciences midterm scores versus high school average. Not at-risk students (blue) are clustered in the upper-right quadrant, reflecting consistently strong performance across both indicators, while at-risk students (red) are more dispersed, with several scoring poorly on the midterm despite relatively high high school averages. This highlights the value of early-course assessments in detecting adaptation difficulties that prior academic records do not capture Scatterplot of Introduction to Health Sciences midterm scores versus high school average. Not at-risk students (blue) are clustered in the upper-right quadrant, reflecting consistently strong performance across both indicators, while at-risk students (red) are more dispersed, with several scoring poorly on the midterm despite relatively high high school averages. This highlights the value of early-course assessments in detecting adaptation difficulties that prior academic records do not capture Finally, the kernel density plot in Fig. 8 visualizes the distribution of high school averages by risk classification. NOT_AT_RISK students are concentrated between 90% and 98%, while AT_RISK students show a broader and flatter distribution, peaking between 80% and 88%. Although the curves overlap, their divergence affirms the partial, but limited, predictive value of high school GPA and reinforces the need for real-time academic signals in early warning systems. Fig. 8Density distribution of high school average by at-risk classification. Not at-risk students (blue) cluster more tightly at the upper end of the distribution (90–98%), while at-risk students (red) show a flatter and broader distribution, peaking between 80–88%. The overlap indicates that high school GPA has partial but limited discriminative power, reinforcing the need for midterm performance as a more immediate predictor of academic risk Density distribution of high school average by at-risk classification. Not at-risk students (blue) cluster more tightly at the upper end of the distribution (90–98%), while at-risk students (red) show a flatter and broader distribution, peaking between 80–88%. The overlap indicates that high school GPA has partial but limited discriminative power, reinforcing the need for midterm performance as a more immediate predictor of academic risk Collectively, these findings are consistent with international research while providing UAE-specific evidence. They show that Biology and English are particularly discriminative courses, likely reflecting both cognitive demands and linguistic complexity in the UAE’s English-medium instructional context. Model performance and comparative metrics Five machine learning models: XGBoost, Logistic Regression, Gradient Boosting Machine (GBM), Naïve Bayes, and Random Forest, were trained using the ROSE-balanced dataset under a 5-fold cross-validation strategy. Performance was assessed using multiple evaluation metrics, with an emphasis on F1-Score to prioritize the balance between precision and recall. As shown in Table 2, the models achieved high overall accuracy (85–88%) and strong AUC values (> 0.91), confirming that early academic and demographic indicators provide a foundation for risk prediction in this context. While Random Forest achieved the highest AUC (0.933), both XGBoost and Logistic Regression recorded the top F1-Scores (0.84), indicating a stronger balance between false positives and false negatives, critical for early risk identification. Logistic Regression also demonstrated the highest recall (0.94), meaning it captured the largest proportion of at-risk students but generated more false positives. By contrast, XGBoost combined high recall with stronger precision, providing a more balanced model for institutional use. Table 2Model performance summaryModelAccuracyPrecisionRecallF1-ScoreAUCOptimal ThresholdXGBoost88.2%0.820.860.840.9230.70Logistic Reg.87.3%0.760.940.840.9230.50GBM86.3%0.760.890.820.9180.60Naïve Bayes86.3%0.740.940.830.9180.55Random Forest85.3%0.760.860.810.9330.60 Table 2Model performance summaryModelAccuracyPrecisionRecallF1-ScoreAUCOptimal ThresholdXGBoost88.2%0.820.860.840.9230.70Logistic Reg.87.3%0.760.940.840.9230.50GBM86.3%0.760.890.820.9180.60Naïve Bayes86.3%0.740.940.830.9180.55Random Forest85.3%0.760.860.810.9330.60 Model performance summary Figure 9 further illustrates these trade-offs through ROC curves, showing that all models had excellent classification power (AUC > 0.91). Random Forest offered the strongest sensitivity–specificity balance, but XGBoost’s combination of high F1, strong AUC, and consistent threshold behavior makes it the most practical candidate for deployment in early warning systems. Rather than introducing new algorithms, these results confirm the applicability of established models to the UAE health sciences context, demonstrating their value for timely and context-specific interventions. Fig. 9Receiver Operating Characteristic (ROC) curves for all five machine learning models. All models demonstrated excellent classification performance with area under the curve (AUC) values above 0.91, indicating strong sensitivity–specificity balance. Random Forest achieved the highest overall AUC (0.933), while XGBoost and Logistic Regression offered the most favorable trade-off between recall and precision, making them the most practical candidates for early warning deployment Receiver Operating Characteristic (ROC) curves for all five machine learning models. All models demonstrated excellent classification performance with area under the curve (AUC) values above 0.91, indicating strong sensitivity–specificity balance. Random Forest achieved the highest overall AUC (0.933), while XGBoost and Logistic Regression offered the most favorable trade-off between recall and precision, making them the most practical candidates for early warning deployment Feature Importance, SHAP Explanations, and threshold tuning Variable importance was extracted using the varImp() function in the caret package. For tree-based models (XGBoost, GBM, and Random Forest), importance was computed using total gain, relative influence, and mean decrease in accuracy, respectively. For Logistic Regression, importance was derived from the absolute value of standardized coefficients, and for Naïve Bayes, from the variation in conditional class probabilities. Across models, Biology midterm emerged as the single most influential predictor, followed by Introduction to Health Sciences and English midterms (Figs. 10, 11, 12, 13 and 14). High school average contributed moderately, while demographic variables such as gender and nationality carried negligible weight. This pattern aligns with persistence frameworks emphasizing the primacy of early academic performance, while also showing that structural background variables are comparatively less informative in this UAE setting. Fig. 10F1 Score vs. Classification Threshold for all machine learning models. All models reached peak F1 performance between thresholds of 0.50 and 0.70, indicating an optimal trade-off between precision and recall in this range. Logistic Regression maximized recall at a threshold of 0.50 but generated more false positives, whereas XGBoost balanced recall and precision with its highest F1 at 0.70, reducing unnecessary alerts. These patterns highlight how threshold selection directly affects institutional trade-offs between advisor workload and risk coverage F1 Score vs. Classification Threshold for all machine learning models. All models reached peak F1 performance between thresholds of 0.50 and 0.70, indicating an optimal trade-off between precision and recall in this range. Logistic Regression maximized recall at a threshold of 0.50 but generated more false positives, whereas XGBoost balanced recall and precision with its highest F1 at 0.70, reducing unnecessary alerts. These patterns highlight how threshold selection directly affects institutional trade-offs between advisor workload and risk coverage Fig. 11Variable importance plot for the XGBoost model Variable importance plot for the XGBoost model Fig. 12Variable importance plot for the Logistic Regression model Variable importance plot for the Logistic Regression model Fig. 13Variable importance plot for the GBM model Variable importance plot for the GBM model Fig. 14Variable importance plot for the Naïve Bayes model. Variable importance plot for the Naïve Bayes model. Beyond global feature importance, effect size estimation from the Logistic Regression model revealed that a 10-point decrease in Biology midterm scores increased the probability of being at risk by ~ 31% points on average. Comparable decreases in Introduction to Health Sciences and English raised risk by ~ 25 and ~ 18% points, respectively. These findings underscore the steep consequences of early underperformance, particularly in Biology and Introduction to Health Sciences, and translate statistical outputs into actionable signals for advisors. Post-hoc TreeSHAP analyses on the held-out test set supported the global importance findings. Biology midterm exhibited the largest average absolute contribution to the model output (mean |SHAP| ≈ 1.37, log-odds scale), followed by Introduction to Health Sciences (≈ 1.00) and English (≈ 0.81). By contrast, high-school average and demographic variables had comparatively small effects (all mean |SHAP| < 0.40). The beeswarm summary (Fig. 15) shows a monotonic pattern: lower midterm scores are associated with positive SHAP values, i.e., increases in the log-odds of classification as AT_RISK, whereas higher scores are associated with negative SHAP values. These local explanations are concordant with the logistic-regression marginal-effect estimates and clarify how individual students’ midterm performance influences predicted risk. Fig. 15Variable importance plot for the Random Forest model. Variable importance plot for the Random Forest model. To refine classification performance, F1 Score vs. Threshold curves were generated (Fig. 16), guiding the selection of model-specific thresholds. For example, the optimal threshold was 0.70 for XGBoost, 0.55 for Naïve Bayes, and 0.50 for Logistic Regression. These thresholds illustrate different institutional trade-offs: Logistic Regression maximized recall but increased false positives, while XGBoost balanced recall with higher precision, reducing unnecessary alerts. These insights are particularly relevant for academic early warning systems where minimizing missed at-risk cases is critical [52]. Thresholds were optimized on the hold-out test set using F1-score curves, after all models were trained on ROSE-balanced data via 5-fold cross-validation. This approach ensured that no data from the test set was used during training or model selection. Fig. 16Confusion matrix for the XGBoost model. XGBoost correctly identified most at-risk students (31/36) while producing relatively few false positives (7), showing balanced sensitivity and precision Confusion matrix for the XGBoost model. XGBoost correctly identified most at-risk students (31/36) while producing relatively few false positives (7), showing balanced sensitivity and precision Confusion matrices (Figs. 17, 18, 19, 20 and 21) further illustrate these trade-offs. A model with high recall, such as Logistic Regression, minimizes missed cases (few false negatives) but increases the number of students incorrectly flagged as at-risk, raising the cost of over-intervention in terms of advisor workload and student experience. Naïve Bayes showed a similar pattern. By contrast, XGBoost balanced recall with stronger precision, reducing unnecessary alerts while still capturing most at-risk students. Random Forest produced comparable results, though with slightly lower recall. These findings demonstrate how model outputs can be tuned to institutional priorities, whether the goal is to maximize coverage of at-risk students or reduce advisor overload from false alerts. These trade-offs underscore the need for institutions to calibrate models according to their advising capacity and tolerance for risk: settings with limited resources may prefer precision, while high-stakes programs may prioritize recall to ensure no student is overlooked. Fig. 17Confusion matrix for the Logistic Regression model. Logistic Regression minimized false negatives (only 2 missed) but generated more false positives (11), reflecting a high-recall but lower-precision profile Confusion matrix for the Logistic Regression model. Logistic Regression minimized false negatives (only 2 missed) but generated more false positives (11), reflecting a high-recall but lower-precision profile Fig. 18Confusion matrix for the GBM model. GBM identified 32 at-risk students but missed 4 and incorrectly flagged 10 not at-risk students, offering moderate balance between recall and precision Confusion matrix for the GBM model. GBM identified 32 at-risk students but missed 4 and incorrectly flagged 10 not at-risk students, offering moderate balance between recall and precision Fig. 19Confusion matrix for the Naïve Bayes model. Naïve Bayes achieved high recall (34/36 at-risk students identified) but also flagged 12 not at-risk students incorrectly, increasing advisor workload from false positives Confusion matrix for the Naïve Bayes model. Naïve Bayes achieved high recall (34/36 at-risk students identified) but also flagged 12 not at-risk students incorrectly, increasing advisor workload from false positives Fig. 20Confusion matrix for the Random Forest model. Random Forest captured 31 at-risk students but missed 5, while misclassifying 10 not at-risk cases, providing a slightly weaker recall than Logistic Regression or Naïve Bayes Confusion matrix for the Random Forest model. Random Forest captured 31 at-risk students but missed 5, while misclassifying 10 not at-risk cases, providing a slightly weaker recall than Logistic Regression or Naïve Bayes Fig. 21SHAP summary for XGBoost. Beeswarm plot of TreeSHAP values computed on the test set for the trained XGBoost model. Points show per-student, per-feature contributions (x-axis) to the log-odds of being AT_RISK; color encodes the feature value (yellow = low, purple = high). Biology, Introduction to Health Sciences, and English midterms exhibit the largest mean |SHAP| values (numbers on the left), indicating the greatest average impact on predictions; demographic features contribute comparatively little SHAP summary for XGBoost. Beeswarm plot of TreeSHAP values computed on the test set for the trained XGBoost model. Points show per-student, per-feature contributions (x-axis) to the log-odds of being AT_RISK; color encodes the feature value (yellow = low, purple = high). Biology, Introduction to Health Sciences, and English midterms exhibit the largest mean |SHAP| values (numbers on the left), indicating the greatest average impact on predictions; demographic features contribute comparatively little Taken together, the results confirm that midterm scores and high school academic background can produce high-performing predictive models for at-risk identification [20, 51]. Importantly, model interpretability, strong AUC values (all >0.91), and tunable thresholds underscore the feasibility of embedding these models in real-world educational settings as decision-support tools rather than purely technical artifacts. Discussion This study provides regionally grounded evidence on the predictive value of midterm assessments in UAE health sciences programs, addressing gaps in international literature on MENA higher education. While similar models have been validated internationally, this work contributes by demonstrating how interpretable ML can be applied within a MENA setting where empirical studies remain scarce. The findings emphasize contextual rather than methodological novelty, aligning the study with institutional and national policy priorities. Midterm grades in Biology, English for Medical Sciences, and Introduction to Health Sciences emerged as the strongest predictors of risk. Block registration ensured that all students shared these courses, offering comparable academic signals across programs. Defining academic risk as CGPA < 2.3, rather than the probation threshold of 2.0, enabled earlier identification of vulnerable students. From a pedagogical perspective, these results support persistence frameworks that highlight the importance of formative assessment and early integration [41, 51]. This is consistent with Tinto’s Student Integration Model and Bean & Metzner’s Model of Attrition, both of which emphasize the central role of early academic performance in shaping students’ persistence and attrition trajectories [22–24]. Effect-size estimation showed that a 10-point decline in Biology raised dropout probability by ~ 31% points, with comparable drops in Introduction to Health Sciences and English increasing risk by ~ 25 and ~ 18 points, respectively. These findings translate statistical outputs into actionable signals for advisors, highlighting the steep consequences of early underperformance. Global variable importance plots confirmed that midterm scores and high school average were the most influential predictors, with gender showing modest effects. These patterns mirror international evidence on the primacy of academic indicators [51], while providing UAE-specific validation [53]. Interpretability was strengthened by combining global importance plots, effect-size estimation, and SHAP analyses. Together, these methods clarified how early academic performance drives predictions at both aggregate and individual levels, supporting transparent, advisor-facing use of ML outputs [41]. The findings also support embedding ML-based early warning systems into institutional infrastructures such as Banner SIS and Blackboard LMS. Automated alerts by mid-semester could enable timely interventions, including tutoring, counseling, or skills workshops, directly aligning with the UAE Health Workforce Strategic Plan 2023–2030 [13]. The framework demonstrated here is replicable across regional institutions, given their similar reliance on institutional data pipelines. Model performance trade-offs revealed important practical considerations. Logistic Regression and Naïve Bayes achieved higher recall, minimizing false negatives but risking unnecessary interventions. XGBoost balanced recall with greater precision, reducing advisor burden while capturing most at-risk students. Institutions must therefore calibrate thresholds according to advising capacity: resource-limited settings may favor precision, whereas programs with high stakes for student success may prioritize recall. These trade-offs underscore the institutional costs of over- versus under-identification. This study has several limitations. First, it was conducted within a single institution using data from one academic year, limiting generalizability. Second, the predictor set was restricted to early academic and demographic indicators, excluding potentially valuable signals such as attendance, LMS engagement, and psychosocial measures. Third, although the study employed standard supervised classifiers, more advanced learners and refined hyperparameter tuning could further improve performance. Finally, thresholds were tuned on the hold-out test set, which may inflate results; future work should apply nested cross-validation and pursue independent validation across institutions. Expanding interpretability techniques (e.g., model-agnostic LIME, partial-dependence or counterfactual analyses) and auditing subgroup fairness are also recommended. Implications and future directions In practice, the model is best deployed as a mid-semester triage tool to complement, not replace, academic advising. Institutions should (i) select thresholds aligned with advising capacity, (ii) monitor false positives/negatives and recalibrate each term, (iii) implement non-punitive data governance, and (iv) audit subgroup performance for bias. Future research should integrate behavioral and psychosocial predictors, conduct external multi-cohort validation, and evaluate workflow impact (e.g., advisor workload, uptake of support services) to demonstrate policy relevance at scale [1, 54]. Conclusion This study demonstrated that machine learning can be effectively applied to identify at-risk students in UAE health sciences programs using midterm performance and background variables available within the first semester. By drawing on real institutional data, the study contributes region-specific evidence from a MENA context where empirical research on predictive analytics remains limited. The findings highlight the predictive value of foundational first-term courses, particularly Biology and Introduction to Health Sciences, which provided consistent signals across all students due to block registration. Using midterm assessments as early indicators positions institutions to act proactively, aligning with persistence frameworks that emphasize the importance of formative academic checkpoints. Importantly, this work underscores the policy relevance of early risk detection. Embedding predictive tools within existing SIS and LMS infrastructures could enable automated alerts and timely advising interventions, supporting both institutional practice and national workforce priorities. As the UAE advances its Health Workforce Strategic Plan (2023–2030), early monitoring of student performance will be essential to strengthening retention and sustaining a skilled healthcare pipeline. Future research should extend these findings by incorporating behavioral and psychosocial predictors, validating models across multiple cohorts and institutions, and assessing the impact of interventions triggered by risk alerts. In doing so, early warning systems can evolve into scalable, evidence-based tools that enhance student persistence and inform national education policy.