Clear Sky Science · en

A dual attention transformer modelling for explainable mental health analysis in academic environments using TaBERT

· Back to index

Why Student Well-Being and Grades Belong Together

Many college students quietly struggle with stress, anxiety, and money worries while trying to keep their grades up. This study explores how modern artificial intelligence can help schools spot students who may be at risk, long before a crisis appears. By looking at thousands of students’ everyday experiences—how they sleep, study, exercise, socialize, and cope with financial pressure—the authors build a new kind of computer model that not only predicts who might be in trouble, but also explains which life factors matter most. The goal is to turn raw data into clear, actionable insight for counselors, teachers, and policy makers who want to support student mental health without invading privacy.

Figure 1
Figure 1.

Looking Closely at Student Life

The researchers analyzed an anonymized dataset of more than 7,000 vocational college students, mostly between 18 and 25 years old. For each student, the data included psychological measures such as stress, depression, anxiety, and financial strain, as well as sleep quality, physical activity, diet, and use of counseling or substances. Personal details like age, relationship status, and extracurricular involvement were recorded alongside social factors such as housing type, social support, and campus engagement. Academic performance was measured with cumulative grade point average. Rather than focusing on a single cause of distress, the study treats student well-being as the result of many overlapping influences from mind, lifestyle, and environment.

Teaching a Smart System to Read the Patterns

To uncover these patterns, the authors used a transformer-based model called TaBERT, adapted from language technology that powers modern chatbots. Instead of reading sentences, TaBERT “reads” columns of numbers and categories describing each student. A dual attention mechanism allows the model to look at all features at once and learn which combinations move together—for example, how heavy course loads interact with money worries and low sleep quality. The team compared TaBERT with familiar approaches such as support vector machines, logistic regression, random forests, gradient boosting, and even other deep learning models. Across mental, personal, and social feature groups, TaBERT achieved the best performance, reaching up to 96% accuracy in predicting student mental health–related outcomes.

What Matters Most in Student Well-Being

Beyond raw accuracy, the study asks a more human question: which factors actually drive the predictions? Using feature-ranking methods, the authors found that financial stress stands out among mental health indicators, followed closely by anxiety, depression, and overall stress level. Age emerges as the most informative personal factor, likely reflecting differences in maturity and coping skills, while housing type dominates social influences, with physical activity and perceived social support also playing important roles. Explainable AI tools, LIME and SHAP, were then used to show, for each individual prediction, how much each feature pushed the model toward a better or worse outcome. These tools consistently highlighted financial strain, physical activity, social support, and course load as powerful levers that can tip a student toward struggle or success.

Figure 2
Figure 2.

From Hidden Numbers to Visible Risk

The authors also ran traditional statistical tests to check which variables were reliably linked to outcomes across the entire population. Lifestyle and engagement measures—such as extracurricular involvement, social support, physical activity, housing, substance use, counseling use, and sleep quality—showed significant associations. Interestingly, some psychological scores that looked less significant in simple tests still played a major role inside the AI model, hinting at complex, non‑linear relationships that standard methods miss. Together, these results argue that early-warning systems should not rely on a single questionnaire or symptom score, but on a broader picture of how students live, study, and connect with others.

Turning Insight into Support

In plain terms, this work shows that a carefully designed AI system can reliably flag patterns of risk in student populations while also explaining its reasoning in ways educators can understand. Financial strain, heavy course loads, weak social support, and inactive or irregular lifestyles emerge as recurring warning signs, whereas stable housing, supportive networks, and healthy habits appear protective. By combining powerful pattern-recognition with transparent explanations, TaBERT offers schools a way to move from reactive crisis management to proactive care—guiding targeted scholarships, counseling outreach, and wellness programs that can safeguard both mental health and academic success.

Citation: Yuan, Q., Sun, W., Li, F. et al. A dual attention transformer modelling for explainable mental health analysis in academic environments using TaBERT. Sci Rep 16, 11201 (2026). https://doi.org/10.1038/s41598-026-40080-x

Keywords: student mental health, academic performance, explainable AI, transformer models, college wellbeing