A context-aware BERT framework for detecting and modeling the mental health impact of online toxic language
Ibitoye, Ayodeji Olusegun ORCID: https://orcid.org/0000-0002-5631-8507, Oladosu, Oladimeji O., Olaleye, Isaac and Emuoyibofarhe, Ozichi Nweke
(2026)
A context-aware BERT framework for detecting and modeling the mental health impact of online toxic language.
Data Science and Management.
ISSN 2666‑7649 (Online)
(doi:10.1016/j.dsm.2025.12.002)
Preview |
PDF (Open Access Preprint)
53463 IBITOYE_A_Context-Aware_BERT_Framework_For_Detecting_And_Modeling_The_Mental_Health_(OA PREPRINT)_2026.pdf - Published Version Available under License Creative Commons Attribution Non-commercial No Derivatives. Download (2MB) | Preview |
Abstract
Toxic language in online communities poses significant risks to mental health, often exacerbating conditions, such as anxiety, depression, and stress. While existing methods for detecting toxic languages in online spaces have made progress, they struggle to understand the underlying context, emotional tone, and specific mental health topics tied to such languages. This study proposes a novel framework that leverages the power of fine-tuned bidirectional encoder representations from transformers (BERT) to detect and analyze toxic languages in a contextualized manner, focusing on their impact on mental health. This study quantifies the relationship between toxic comments and mental health issues by fine-tuning BERT for both toxicity classification and sentiment analysis. The toxic language impact score (TLIS) is introduced, which combines toxicity, emotional sentiment, and the relevance of comments to mental health topics. In addition, a cumulative exposure model (CEM) is developed to track the long-term effects of repeated exposure to toxic languages. The methodology analyzed a dataset of 8,200 social media comments labeled for mental health and toxicity, yielding high precision (0.87), recall (0.82), and F1-score (0.84) in detecting toxic content. The results underscore the profound impact of toxic language on well-being, offering new insights for creating targeted interventions to mitigate its effects on online communities.
| Item Type: | Article |
|---|---|
| Uncontrolled Keywords: | cumulative exposure model, BERT, mental health, mental health impact probability, toxic language, toxic language impact score, social network |
| Subjects: | B Philosophy. Psychology. Religion > BF Psychology Q Science > Q Science (General) Q Science > QA Mathematics Q Science > QA Mathematics > QA75 Electronic computers. Computer science |
| Faculty / School / Research Centre / Research Group: | Faculty of Engineering & Science Faculty of Engineering & Science > School of Computing & Mathematical Sciences (CMS) |
| Last Modified: | 29 May 2026 10:42 |
| URI: | https://gala.gre.ac.uk/id/eprint/53463 |
Actions (login required)
![]() |
View Item |
Downloads
Downloads per month over past year
Tools
Tools