AI can spot signs that someone may be at risk of depression, self-harm, or anorexia in their Reddit posts, potentially giving healthcare professionals an earlier warning that someone may need help. As part of his master's thesis, former student Ron Hochstenbach, together with Assistant Professor Flavius Frasincar and Jasmijn Klinkhamer, developed an AI model that improves on existing methods for identifying these risks from written text.
The researchers trained and tested their model using Reddit posts from people diagnosed with depression, anorexia, or self-harm, alongside posts from users without these conditions. Compared with an existing AI model, their model, called Context-HAN, was able to identify people at risk earlier in their posting history. The researchers also found that longer and more recent posts provide the clearest clues about a person's mental state. Although the tool is not intended to replace healthcare professionals, it could serve as an early signal that someone may benefit from further assessment.
Teaching AI to understand context
Many studies have already explored whether AI can detect signs of mental health problems from social media posts. Rather than starting from scratch, Hochstenbach focused on improving an existing state-of-the-art model.
The key improvement lies in helping the AI better understand context. Instead of simply looking for individual words, the model learns patterns in how people write over time. It considers how the meaning of words changes depending on the surrounding text and analyses multiple posts together, giving it a better understanding of the broader picture. According to Frasincar, this allows the AI to better interpret what people are communicating.
The researchers trained the model on an existing dataset compiled by experts rather than collecting their own data. This allowed them to compare their results with previous research using the same benchmark. The dataset contains Reddit posts from users who had publicly disclosed a diagnosis of depression, anorexia, or self-harm, alongside a control group. The model was evaluated not only on how accurately it identified users at risk, but also on how many posts it needed before it could make that prediction.
From master's thesis to scientific publication
The project began as Hochstenbach's master's thesis. ‘When looking for a topic, I wanted to apply the technical skills I had acquired during my studies to something that could benefit people’s health in a very tangible way.’ He found that opportunity in mental health detection, after coming across earlier work by Frasincar.
For Frasincar, the publication also demonstrates what motivated master's students can achieve. ‘Many students underestimate themselves,’ he says. ‘Exceptional students can do great things.’ Hochstenbach is proud of the publication, and pleased that it highlights how ‘econometricians can make a positive contribution to helping people who struggle mentally.’ Currently, he works as a consultant at McKinsey & Company. All research and the resulting publication were completed before he joined McKinsey and do not represent McKinsey's views.
Supporting, not replacing, healthcare professionals
The researchers see the tool as a possible aid for healthcare professionals rather than a replacement for clinical judgement. Frasincar envisions it being used only with a patient's consent, providing doctors with an additional source of information alongside existing assessments.
- Assistant professor
- More information
For more information, please contact Ronald de Groot, Media and Public Relations Officer at Erasmus School of Economics, rdegroot@ese.eur.nl, or +31 6 53 641 846.
- Related content
