Enhancing Interpretability in Anxiety Detection on Reddit: A Machine Learning Approach with LIME and Topic Modeling
In modern society, mental disorders, particularly anxiety, are becoming more and more prevalent concerns. Individuals express their opinions and feelings on social media platforms like Reddit which offers valuable information for understanding mental health. This study applies BERTopic and Local Interpretable Model-agnostic Explanations (LIME) to demonstrate the interpretation of machine learning models in anxiety detection. To analyze and identify the linguistic patterns, a novel dataset has been collected from Reddit communities utilizing multiple subreddits pertaining to anxiety and casual conversations. For topic modeling BERTopic was used to discover key topics in discussions. In addition, TF-IDF features were used to train a Random Forest Classifier, which obtained an accuracy of 88% in classifying the post between anxiety and non-anxiety. Furthermore, to ensure transparency in model decision making process, LIME was used to examine textual features that influence models. This study emphasizes the importance of explainability with regards to AI-assisted mental health solutions while also demonstrating the usefulness of social media data in analyzing how anxiety is articulated, and language is employed differently.
Authors
- Erum Saba (ORCID: https://orcid.org/0000-0002-7013-7462)
- Muhammad Shehram Shah Syed (ORCID: https://orcid.org/0000-0003-4640-5540)
- Ghulam Memon
- Shakeel Ahmed Laghari
Institutions
- Mehran University of Engineering and Technology (PK)
- Sindh Agriculture University (PK)
Publication Details
- Journal
- VFAST Transactions on Software Engineering
- Published
- 2025-06-30
- DOI
- https://doi.org/10.21015/vtse.v13i2.2139
- Citations
- 1
- Primary Topic
- Mental Health via Writing
- Type
- article
- Field-Weighted Citation Impact
- 2.44