A context-aware BERT framework for detecting and modeling the mental health impact of online toxic language

Read full text
Authors: Ayodeji Olusegun Ibitoye, Olademeji O. Oladosu, Isaac Olaleye, Ozichi Nweke Emuoyibofarhe
Cited by: 1
References: 43

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.

Fields of Study & Subjects

Mental Health via Writing Hate Speech and Cyberbullying Detection Topic Modeling

Publication details

Journal / source
Data Science and Management
Publisher
Elsevier BV
Volume
9
Issue
2
Pages
100175–100175
Publication date
3 January 2026
Language
EN