Early Mental Health Detection in Adults using Temporal and Linguistic Analysis of Social Media Data

Authors

  • Hareem Ashraf Department of Data Science, University of Central Punjab, Lahore, Pakistan
  • Rabia Tehseen Department of Computer Science, University of Central Punjab, Lahore, Pakistan
  • Esha Fatima Department of Zoology, University of Central Punjab, Lahore, Pakistan
  • Rubab Javaid Department of Software Engineering, University of Central Punjab, Lahore, Pakistan
  • Uzma Omer Department of Information Sciences, University of Education, Lahore, Pakistan

Keywords:

Depression, Social Media Analysis, Deep Learning, Transformer Models, Explainable AI

Abstract

Conventional screening methods for mental-health conditions, like depression, are based on self-report and clinical evaluation and scale poorly, making early detection essential for prompt intervention. This paper suggests a hybrid approach that combines temporal behavioral patterns and linguistic representations to detect depression in adults at an early stage, based on Reddit data. The temporal cues are represented by a two-layer LSTM (long short-term memory network) whose output is fused with linguistic features extracted by fine-tuned Roberta transformer (transformer with Roberta pre-training) by a cross-modal attention fusion layer, which is then fed to a classification layer. We evaluate the model on the publicly available Depression: Reddit Cleaned dataset (7,732 posts; 53% non-depression, 47% depression), partitioned via stratified sampling into 70% training (5,412 posts), 15% validation (1,160 posts) and 15% testing (1,160 posts). The proposed fusion model attains 92.7% accuracy, 91.8% precision, 93.4% recall, 92.6% macro-F1 and 96.8% AUC, outperforming the strongest text-only Roberta baseline by +3.3% accuracy, +3.5% F1 and +2.2% AUC, and surpassing the behavior-only LSTM by +7.7% accuracy and +7.9% F1. An ablation confirms the contribution of each component: removing the temporal branch drops F1 by 3.5 points, removing the linguistic branch drops F1 by 7.9 points, replacing cross-modal attention with simple concatenation drops F1 by 2.0 points, and freezing the Roberta encoder drops F1 by 4.1 points. Improvements over baselines are statistically significant (paired t-test, p < 0.01). The proposed model also surpasses the recent DABLNet base architecture by an absolute 18.8 F1 points (92.6% vs. 73.76%). SHAP-based explanations reveal the linguistic and temporal features underlying each prediction, thus aiding the building of scalable and interpretable digital mental-health screening tools.

References

Loris Belcastro, Riccardo Cantini, “Detecting mental disorder on social media: A ChatGPT-augmented explainable approach,” Online Soc. Networks Media, vol. 48, p. 100321, 2025, doi: https://doi.org/10.1016/j.osnem.2025.100321.

Anam Fatima, Md Sohail Akhter, “A Scoping Review of the Use and Determinants of Social Media Among College Students,” Healthcare, vol. 13, no. 17, p. 2234, 2025, doi: 10.3390/healthcare13172234.

S. C. Patil and M. Dixit, “A Systematic Review of Machine Learning and Deep Learning for Mental Health Diagnosis,” pp. 339–348, 2026, doi: 10.1007/978-3-032-07837-7_25.

P. Angelin Jeba, Jebaseeli T. Jemima, “Emotion and Cognition Based Mental Health Analysis from Social Media,” J. Trends Comput. Sci. Smart Technol., vol. 8, no. 1, pp. 155–175, 2026, doi: 10.36548/jtcsst.2026.1.008.

S. Ji, T. Zhang, K. Yang, S. Ananiadou, E. Cambria, and J. Tiedemann, “Domain-specific Continued Pretraining of Language Models for Capturing Long Context in Mental Health,” Apr. 2023, Accessed: May 24, 2026. [Online]. Available: http://arxiv.org/abs/2304.10447

Z. Guo, A. Lai, J. H. Thygesen, J. Farrington, T. Keen, and K. Li, “Large Language Models for Mental Health Applications: Systematic Review,” JMIR Ment. Heal., vol. 11, 2024, doi: 10.2196/57400.

Eldar Yeskuatov, Sook Ling Chua, “Detecting Suicidal Ideations on Reddit with Transformer Models,” Front. Artif. Intell. Appl., 2025, doi: 10.3233/FAIA250112.

Joel Philip Thekkekara, Sira Yongchareon, “An attention-based CNN-BiLSTM model for depression detection on social media text,” Expert Syst. Appl., vol. 249, 2024, [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0957417424007000

Kailai Yang, Tianlin Zhang, Ziyan Kuang, Qianqian Xie, Jimin Huang, Sophia Ananiadou, “MentaLLaMA: Interpretable Mental Health Analysis on Social Media with Large Language Models,” arXiv:2309.13567, 2024, [Online]. Available: https://arxiv.org/abs/2309.13567

Xiangyong Chen, Xiaochuan Lin, “Generating Medically-Informed Explanations for Depression Detection using LLMs,” arXiv:2503.14671, 2025, [Online]. Available: https://arxiv.org/abs/2503.14671

Kamini Lamba, Shalli Rani, “Explainable machine learning for mental health prediction from social media behavior: a nested cross-validation study with SHAP and LIME interpretability,” Discov. Ment. Heal., vol. 6, no. 1, p. 25, 2026, doi: 10.1007/s44192-026-00373-z.

Sidra Hameed, Muhammad Nauman, “Explainable AI-driven depression detection from social media using natural language processing and black box machine learning models,” Front. Artif. Intell, vol. 8, 2025, [Online]. Available: https://www.frontiersin.org/journals/artificial-intelligence/articles/10.3389/frai.2025.1627078/full

Qasim Bin Saeed, Young Jin Cha, “Multi-modal deep-attention-BiLSTM based early detection of mental health issues using social media posts,” Sci. Rep., vol. 15, no. 1, 2025, [Online]. Available: https://pubmed.ncbi.nlm.nih.gov/41062710/

Kanishka Bhatt, Ashwini Kumar Singh, “Cross platform social media analysis for mental health detection,” Discov. Ment. Heal., vol. 6, no. 1, p. 33, 2026, doi: 10.1007/s44192-026-00368-w.

S. Dalal, S. Jain, and M. Dave, “Review of Advancements in Depression Detection Using Social Media Data,” IEEE Trans. Comput. Soc. Syst., vol. 12, no. 1, pp. 77–100, 2025, doi: 10.1109/TCSS.2024.3448624.

Iqra Arshad, Shahid Naseem, Marwa Mussarat, Atika Zanib, Shaha Al-Otaibi, Abdallah Yousif, Tariq Mahmood & Amjad R. Khan, “A Multi-Platform Approach to Optimizing Depression Detection in Social Media Through Feature Engineering and Contextual Analysis,” Int. J. Comput. Intell. Syst., vol. 19, no. 97, 2026, [Online]. Available: https://link.springer.com/article/10.1007/s44196-026-01225-y

A. V. Naik, G. K. Sheelam, N. Panchakatla, K. Muthukumaran, and K. Saranya, “Comprehensive Analysis on Depression Detection From Social Media Using Deep Learning and Transformer Architectures,” Int. Conf. Commun. Comput. Inf. Technol. IC3IT 2025, 2025, doi: 10.1109/IC3IT66137.2025.11341160.

Ranjeet Singh Thakur, “Explainable Depression Detection on Reddit: A BiLSTM-Attention Framework with SHAP and LIME Interpretability,” Int. J. Res. Appl. Sci. Eng. Technol., vol. 13, no. 9, pp. 527–537, 2025, doi: 10.22214/ijraset.2025.73995.

M. E. Aragón et al., “Detecting Mental Disorders in Social Media Through Emotional Patterns - The Case of Anorexia and Depression,” ITAfC, vol. 14, no. 1, pp. 211–222, Jan. 2023, doi: 10.1109/TAFFC.2021.3075638.

Khalid Hasan, Jamil Saquer, Yifan Zhang, “Mental Multi-class Classification on Social Media: Benchmarking Transformer Architectures against LSTM Models,” 24th IEEE Int. Conf. Mach. Learn. Appl., 2025, [Online]. Available: https://arxiv.org/abs/2509.16542

H. Yoo and H. Oh, “Depression detection model using multimodal deep learning,” May 2023, doi: 10.20944/PREPRINTS202305.0663.V1.

Muskan Garg, Chandni Saxena, Sriparna Saha, Veena Krishnan, Ruchi Joshi, Vijay Mago, “CAMS: An Annotated Corpus for Causal Analysis of Mental Health Issues in Social Media Posts,” ACL Anthol., 2022, [Online]. Available: https://aclanthology.org/2022.lrec-1.686/

J. Parapar, P. Martín-Rodilla, D. E. Losada, and F. Crestani, “Overview of eRisk 2024: Early Risk Prediction on the Internet,” Lect. Notes Comput. Sci. (including Subser. Lect. Notes Artif. Intell. Lect. Notes Bioinformatics), vol. 14959 LNCS, pp. 73–92, 2024, doi: 10.1007/978-3-031-71908-0_4/SAVE-RESEARCH.

Vandana, Nikhil Marriwala, “A hybrid model for depression detection using deep learning,” Meas. Sensors, vol. 25, p. 100487, 2023, doi: https://doi.org/10.1016/j.measen.2022.100587.

A. Aldkheel and L. Zhou, “Depression Detection on Social Media: A Classification Framework and Research Challenges and Opportunities,” J. Healthc. Informatics Res., vol. 8, no. 1, p. 88, Mar. 2023, doi: 10.1007/S41666-023-00152-3.

Khalid Hasan, Jamil Saquer, “A Benchmark Suite of Reddit-Derived Datasets for Mental Health Detection,” arXiv:2604.23458v1, 2026, [Online]. Available: https://arxiv.org/html/2604.23458v1

Xuhai Xu, Bingsheng Yao, Yuanzhe Dong, Saadia Gabriel, Hong Yu, James Hendler, Marzyeh Ghassemi, Anind K. Dey, Dakuo Wang, “Mental-LLM: Leveraging Large Language Models for Mental Health Prediction via Online Text Data,” arXiv:2307.14385, 2024, [Online]. Available: https://arxiv.org/abs/2307.14385

Y. R. Devi, A. Bharthepudi, and A. Govindarajula, “A Review on Sentiment Analysis Using Transformers and Ensemble methods,” 6th IEEE Int. Conf. Recent Adv. Inf. Technol. RAIT 2025, 2025, doi: 10.1109/RAIT65068.2025.11089332.

Biodoumoye George Bokolo, Qingzhong Liu, “Deep Learning-Based Depression Detection from Social Media: Comparative Evaluation of ML and Transformer Techniques,” Electronics, vol. 12, no. 21, p. 4396, 2023, doi: 10.3390/electronics12214396.

A. F. Hanif and E. Utami, “Multimodal Approach for Depression Detection on Social Media: A Systematic Literature Review,” pp. 1–6, Dec. 2025, doi: 10.1109/ICORIS67789.2025.11295991.

Z. Li, Z. An, W. Cheng, J. Zhou, F. Zheng, and B. Hu, “MHA: a multimodal hierarchical attention model for depression detection in social media,” Heal. Inf. Sci. Syst., vol. 11, no. 1, p. 6, Dec. 2023, doi: 10.1007/S13755-022-00197-5.

“Temporal Word Embeddings for Early Detection of Psychological Disorders on Social Media | Journal of Healthcare Informatics Research | Springer Nature Link.” Accessed: May 24, 2026. [Online]. Available: https://link.springer.com/article/10.1007/s41666-025-00186-9

Nawshad Farruque, Randy Goebel, “Deep temporal modelling of clinical depression through social media text,” Nat. Lang. Process. J., vol. 6, p. 100052, 2024, doi: https://doi.org/10.1016/j.nlp.2023.100052.

Mohaiminul Islam Bhuiyan, Nur Shazwani Kamarudin, Nur Hafieza Ismail, “Enhanced Suicidal Ideation Detection from Social Media Using a CNN-BiLSTM Hybrid Model,” arXiv:2501.11094, 2025, [Online]. Available: https://arxiv.org/abs/2501.11094

Khalid Hasan, Jamil Saquer, “Beyond Architectures: Evaluating the Role of Contextual Embeddings in Detecting Bipolar Disorder on Social Media,” arXiv:2507.14231v1, 2025, [Online]. Available: https://arxiv.org/html/2507.14231v1

İsmail Baydili, Burak Tasci, “Deep Learning-Based Detection of Depression and Suicidal Tendencies in Social Media Data with Feature Selection,” Behav. Sci, vol. 3, p. 352, 2025, doi: https://doi.org/10.3390/bs15030352.

Jingfang Liu, Mengshi Shi, “A Hybrid Feature Selection and Ensemble Approach to Identify Depressed Users in Online Social Media,” Front. Psychol., vol. 12, 2021, [Online]. Available: https://www.frontiersin.org/journals/psychology/articles/10.3389/fpsyg.2021.802821/full

Waleed Bin Tahir, Shah Khalid, “Depression Detection in Social Media: A Comprehensive Review of Machine Learning and Deep Learning Techniques,” IEEE Access, vol. 13, 2025, doi: 10.1109/ACCESS.2025.3530862.

Allah Ditta, Nazish Iftikhar, Khurram Gulzar Rana, Asghar Ali Shah, Muhammad Adnan Khan, “Suicidal Thoughts Detection on Social Media in Roman Urdu Using an Attention-Based Hybrid Deep Learning Model,” Eng. Reports, 2026, [Online]. Available: https://onlinelibrary.wiley.com/doi/10.1002/eng2.70810

Downloads

Published

2026-05-13

How to Cite

Ashraf, H., Tehseen, R., Fatima, E., Javaid, R., & Uzma Omer. (2026). Early Mental Health Detection in Adults using Temporal and Linguistic Analysis of Social Media Data. International Journal of Innovations in Science & Technology, 8(2), 958–975. Retrieved from https://journal.50sea.com/index.php/IJIST/article/view/1903

Most read articles by the same author(s)

1 2 > >>