Skip to content
Nikhil Kumar Reddy
← All work
eval2026

Student Mental Health Early Warning

Flags struggling students three to five weeks earlier — and explains why for every single one.

0.975
XGBoost AUCmeasured in repo
91%
Accuracymeasured in repo
0.88
F1measured in repo
3–5 weeks
Earlier detectionmeasured in repo
01

The problem

Universities usually identify a struggling student after a failed assessment, which is weeks after the behaviour changed. The signal is in engagement patterns long before it reaches grades. But a model that outputs a risk score and nothing else is useless to a counsellor — they cannot act on a number they cannot interrogate, and they should not be asked to.

02

Architecture

Behavioural and academic features are engineered from the OULAD dataset, with XGBoost as the model and logistic regression and random forest as baselines. SHAP TreeExplainer surfaces the top three drivers for every individual student, so a counsellor sees why this student was flagged. A Claude multi-agent workflow then runs Risk Analyst → Intervention Advisor → Outreach Writer, streamed sequentially, with TF-IDF retrieval over 12 counselling guidance documents grounding the recommendations. A human always sends the message.

03

What broke

AUC 0.975 on OULAD is a strong number on a clean academic dataset, and I would expect it to fall on live institutional data with messier engagement logging and different module structures. The bigger risk is not statistical: a model that flags students for intervention can encode bias in who gets flagged, and the top predictors — engagement span, decline slope, dropout history — correlate with circumstances like working while studying. SHAP makes that visible rather than solving it, which is why every output goes to a human before it reaches a student.

04

Results

AUC 0.975, 91% accuracy and 0.88 F1 across 32,593 student-module records spanning seven modules, identifying roughly 4,100 at-risk students (12.6%). For about 80% of high-risk students it opens a three-to-five week intervention window that did not previously exist.