BERT-Based Transformers for Early Detection of Mental Health Illnesses

Rodrigo Martínez-Castaño, Amal Htait, Leif Azzopardi, Yashar Moshfeghi

Research output: Chapter in Book/Published conference outputConference publication


This paper briefly describes our research groups' efforts in tackling Task 1 (Early Detection of Signs of Self-Harm), and Task 2 (Measuring the Severity of the Signs of Depression) from the CLEF eRisk Track. Core to how we approached these problems was the use of BERT-based classifiers which were trained specifically for each task. Our results on both tasks indicate that this approach delivers high performance across a series of measures, particularly for Task 1, where our submissions obtained the best performance for precision, F1, latency-weighted F1 and ERDE at 5 and 50. This work suggests that BERT-based classifiers, when trained appropriately, can accurately infer which social media users are at risk of self-harming, with precision up to 91.3% for Task 1. Given these promising results, it will be interesting to further refine the training regime, classifier and early detection scoring mechanism, as well as apply the same approach to other related tasks (e.g., anorexia, depression, suicide).

Original languageEnglish
Title of host publicationExperimental IR Meets Multilinguality, Multimodality, and Interaction
Subtitle of host publication12th International Conference of the CLEF Association, CLEF 2021, Virtual Event, September 21–24, 2021, Proceedings
EditorsK. Selçuk Candan, Bogdan Ionescu, Lorraine Goeuriot, Birger Larsen, Henning Mueller, Alexis Joly, Maria Maistro, Florina Piroi, Guglielmo Faggioli, Nicolo Ferro
ISBN (Electronic)9783030852511
Publication statusPublished - 14 Sept 2021
Event12th International Conference of the CLEF Association - Virtual Event
Duration: 21 Sept 202124 Sept 2021

Publication series

NameLecture Notes in Computer Science
PublisherSpringer, Cham
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349


Conference12th International Conference of the CLEF Association
Abbreviated titleCLEF 2021

Bibliographical note

Copyright © 2021 for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). Acknowledgements & Funding: The first author would like to thank the following funding bod-
ies for their support: FEDER/Ministerio de Ciencia, Innovaci ́on y Universidades, Agencia Estatal de Investigaci ́on/Project (RTI2018-093336-B-C21), Conseller ́ıa de Educacion, Universidade e Formaci ́on Profesional and the European Regional DevelopmentFund (ERDF) (accreditation 2019–2022 ED431G-2019/04, ED431C 2018/29, ED431C2018/19). The second and third authors would like to thank the UKRI’s EPSRC Project Cumulative Revelations in Personal Data (Grant Number: EP/R033897/1) for theirsupport. They would also like to thank David Losada for arranging this collaboration.


  • Self-harm
  • Depression
  • Classification
  • Social media
  • Early detection
  • BERT


Dive into the research topics of 'BERT-Based Transformers for Early Detection of Mental Health Illnesses'. Together they form a unique fingerprint.

Cite this