Leveraging large language models and ensemble techniques for real-time mental health monitoring on social media
摘要
Depression and suicidal ideation are becoming increasingly prevalent in modern high-pressure societies, significantly impacting individuals’ personal and professional lives. Social media platforms, particularly Twitter, serve as rich sources of user-generated content that reflect emotional and psychological states, thereby providing opportunities to detect early signs of mental health issues through linguistic analysis. This study proposes an automated framework for detecting indicators of depression and suicidal tendencies by analyzing tweets. The data collection process involved acquiring a large volume of tweets, followed by preprocessing and data augmentation to enhance model performance. Dataset annotation was performed using automated keyword heuristics and sentiment analysis models to ensure scalability and consistency. Transformer-based models, including BERT, DistilBERT, and RoBERTa, were employed for classification. Furthermore, an ensemble learning approach was developed to improve predictive accuracy. Experimental results demonstrated that BERT achieved 95.22% accuracy, DistilBERT 95.05%, and RoBERTa 92.20%, while the ensemble model outperformed individual models with an accuracy of 95.42%. These findings highlight the effectiveness of integrating social media analysis with transformer-based architectures and ensemble learning for scalable and accurate mental health detection.