Predicting Mental Health Status using a Fine-Tuned CNN-LSTM Hybrid Model
DOI:
https://doi.org/10.52436/1.jutif.2026.7.3.5882Keywords:
Mental Health Classification, CNN–LSTM, Deep Learning, Twitter Data, Text MiningAbstract
Mental health has become a critical global concern in the digital era, particularly as social media platforms increasingly serve as spaces where users express psychological conditions, emotions, and personal struggles. This study aims to predict mental health status from Twitter text using a fine-tuned hybrid CNN–LSTM deep learning model. A total of 12,214 tweets were collected, cleaned, and labeled into five categories: Normal, Stress, Anxiety, Depression, and High-Risk Condition. The dataset was split using stratified sampling into 70% training, 15% validation, and 15% testing portions. Text was transformed into numerical representations through tokenization, padding, and 100-dimensional word embeddings. The hybrid CNN–LSTM architecture combines the CNN’s ability to extract local linguistic features with the LSTM’s strength in capturing long-term contextual dependencies, supported by dropout, early stopping, and hyperparameter fine-tuning. Experimental results show that the hybrid model achieves superior performance compared to standalone CNN and LSTM architectures, obtaining an overall accuracy of 0.892, macro precision of 0.874, macro recall of 0.861, and a macro F1-score of 0.865. Class-wise evaluation indicates that the Normal category achieves the highest accuracy (0.960), followed by Anxiety (0.884) and High-Risk Condition (0.808). Meanwhile, Stress (0.751) and Depression (0.745) show lower accuracies due to semantic overlap in linguistic expressions commonly found on social media. The training process demonstrates stable convergence without significant overfitting, confirming the effectiveness of the selected architecture and training strategy. Overall, this study highlights the effectiveness of the hybrid CNN–LSTM model for early mental health detection based on text data. The findings provide a strong foundation for developing scalable and data-driven mental health monitoring systems in digital environments and contribute to advancing natural language processing approaches for mental health analysis.
Downloads
References
World Health Organization, “Over a billion people living with mental health conditions – services require urgent scale-up.” Accessed: Sep. 12, 2025. [Online]. Available: https://www.who.int/news/item/02-09-2025-over-a-billion-people-living-with-mental-health-conditions-services-require-urgent-scale-up?utm_source=chatgpt.com
M. E. Aragón, A. P. López-Monroy, M. Montes-y-Gómez, and D. E. Losada, “Online expressions, offline struggles: Using social media to identify depression-related symptoms,” Online Soc. Netw. Media, vol. 50, p. 100338, 2025, doi: https://doi.org/10.1016/j.osnem.2025.100338.
A. Younus and A. Al-Allawee, “A Comparative Study between Logistic Regression and SVM for Resource Management in Network Slicing,” sinkron, vol. 9, pp. 1924–1934, Nov. 2025, doi: 10.33395/sinkron.v9i4.15222.
M. Krichen and A. Mihoub, “Long Short-Term Memory Networks: A Comprehensive Survey,” AI, vol. 6, p. 215, Nov. 2025, doi: 10.3390/ai6090215.
H. Asnal, K. Andesa, and F. Erlin, “Hybrid Machine Learning Model for Risk Prediction and Action Recommendation Based on Artificial Mental Systems,” 415 TEKNIKA, vol. 14, no. 3, pp. 415–423, 2025, doi: 10.34148/teknika.v14i13.1357.
Y. Zhang et al., “Employing Machine Learning and Deep Learning Models for Mental Illness Detection,” Computation, vol. 13, no. 8, 2025, doi: 10.3390/computation13080186.
J. Aina, O. Akinniyi, M. M. Rahman, V. Odero-Marah, and F. Khalifa, “A Hybrid Learning-Architecture for Mental Disorder Detection Using Emotion Recognition,” IEEE Access, vol. 12, pp. 91410–91425, 2024, doi: 10.1109/ACCESS.2024.3421376.
A. A. Maulani, S. Winarno, J. Zeniarja, R. T. E. Putri, and A. N. Cahyani, “Comparison of Hyperparameter Optimization Techniques in Hybrid CNN-LSTM Model for Heart Disease Classification,” Sinkron, vol. 9, no. 1, pp. 455–465, Jan. 2024, doi: 10.33395/sinkron.v9i1.13219.
M. Wojciuk, Z. Swiderska-Chadaj, K. Siwek, and A. Gertych, “Improving classification accuracy of fine-tuned CNN models: Impact of hyperparameter optimization,” Heliyon, vol. 10, no. 5, Mar. 2024, doi: 10.1016/j.heliyon.2024.e26586.
C. Chatzaki and M. Tsiknakis, “An Overview of Stress Analysis Based on Physiological Signals: Systematic Review of Open Datasets and Current Trends,” Sensors, vol. 25, no. 23, 2025, doi: 10.3390/s25237108.
N. Holzapfel, “A Depression, Anxiety, and Stress Scale (DASS-42) Study on the Mental Health Conditions of Japanese Employees,” Japanese Psychological Research, vol. n/a, no. n/a, Feb. 2025, doi: https://doi.org/10.1111/jpr.12587.
M. D. Pham et al., “Mental Health Problems Among Indonesian Adolescents: Findings of a Cross-Sectional Study Utilizing Validated Scales and Innovative Sampling Methods,” Journal of Adolescent Health, vol. 75, no. 6, pp. 929–938, Dec. 2024, doi: 10.1016/j.jadohealth.2024.07.016.
M. D. Pham et al., “Mental Health Problems Among Indonesian Adolescents: Findings of a Cross-Sectional Study Utilizing Validated Scales and Innovative Sampling Methods,” Journal of Adolescent Health, vol. 75, no. 6, pp. 929–938, 2024, doi: https://doi.org/10.1016/j.jadohealth.2024.07.016.
Q. Cheng et al., “Determinants of healthcare utilization under the Indonesian national health insurance system – a cross-sectional study,” BMC Health Serv. Res., vol. 25, no. 1, Dec. 2025, doi: 10.1186/s12913-024-11951-8.
A. Pandya et al., “Evaluating current trends in stress and depression detection using artificial intelligence and machine learning,” Intelligent Hospital, vol. 2, no. 1, p. 100047, 2026, doi: https://doi.org/10.1016/j.inhs.2025.100047.
Z. S. Chen, P. (Param) Kulkarni, I. R. Galatzer-Levy, B. Bigio, C. Nasca, and Y. Zhang, “Modern views of machine learning for precision psychiatry,” Patterns, vol. 3, no. 11, Nov. 2022, doi: 10.1016/j.patter.2022.100602.
M. Garg, “Mental Health Analysis in Social Media Posts: A Survey,” Archives of Computational Methods in Engineering, vol. 30, no. 3, pp. 1819–1842, Apr. 2023, doi: 10.1007/s11831-022-09863-z.
T. Zhang, K. Yang, S. Ji, and S. Ananiadou, “Emotion fusion for mental illness detection from social media: A survey,” Information Fusion, vol. 92, pp. 231–246, 2023, doi: https://doi.org/10.1016/j.inffus.2022.11.031.
H. Asnal, K. Andesa, and F. Erlin, “Hybrid Machine Learning Model for Risk Prediction and Action Recommendation Based on Artificial Mental Systems,” 415 TEKNIKA, vol. 14, no. 3, pp. 415–423, 2025, doi: 10.34148/teknika.v14i13.1357.
M. Malgaroli, T. D. Hull, J. M. Zech, and T. Althoff, “Natural language processing for mental health interventions: a systematic review and research framework,” Dec. 01, 2023, Springer Nature. doi: 10.1038/s41398-023-02592-2.
J. Golec and T. Hachaj, “Ten Natural Language Processing Tasks with Generative Artificial Intelligence,” Applied Sciences, vol. 15, no. 16, 2025, doi: 10.3390/app15169057.
H. Bichri, A. Chergui, and H. Mustapha, “Investigating the Impact of Train / Test Split Ratio on the Performance of Pre-Trained Models with Custom Datasets,” International Journal of Advanced Computer Science and Applications, vol. 15, Nov. 2024, doi: 10.14569/IJACSA.2024.0150235.
Y. Hu, C. Xu, B. Lin, W. Yang, and Y. Y. Tang, “Medical multimodal large language models: A systematic review,” Intelligent Oncology, vol. 1, no. 4, pp. 308–325, 2025, doi: https://doi.org/10.1016/j.intonc.2025.09.005.
E. Oro, F. M. Granata, and M. Ruffolo, “A Comprehensive Evaluation of Embedding Models and LLMs for IR and QA Across English and Italian,” Big Data and Cognitive Computing, vol. 9, no. 5, 2025, doi: 10.3390/bdcc9050141.
S. K. Sharma, A. R. Khan, G. G. Tejani, D. Bassir, and S. Tripathi, “MultiMindNet: AI-based mental health analysis using hybrid deep learning approach and Hybrid Ant-Grey Wolf Optimization (HAGWO) algorithm,” PLOS Digital Health, vol. 5, no. 4 April, Apr. 2026, doi: 10.1371/journal.pdig.0001158.
P. Ta, N. Tran, H. Nguyen, and H. D. Nguyen, “Detecting signs of depression on social media: A machine learning analysis and evaluation,” Sustainable Futures, vol. 10, p. 100827, 2025, doi: https://doi.org/10.1016/j.sftr.2025.100827.
T. Aris and C. Ningning, “Integration of CNN and LSTM Networks for Behavior Feature Recognition: An Analysis,” Int. J. Adv. Sci. Eng. Inf. Technol., vol. 14, pp. 1793–1799, Nov. 2024, doi: 10.18517/ijaseit.14.5.10116.
M. Dwirizqy Wimbassa, T. Marsyah Noor, S. Yasara, and T. Muhammad Arsyah, “Emotional Text Detection dengan Long Short Term Memory (LSTM) 1,” Jurnal Format, vol. 12, 2023.
W. Hussain et al., “Ensemble genetic and CNN model-based image classification by enhancing hyperparameter tuning,” Sci. Rep., vol. 15, no. 1, Dec. 2025, doi: 10.1038/s41598-024-76178-3.
N. Alkaabi, S. Shakya, and R. Mizouni, “A hyperparameter optimization framework for transformer-based time series forecasting using evolutionary algorithms,” Neural Comput. Appl., vol. 38, no. 7, p. 236, 2026, doi: 10.1007/s00521-026-11959-7.
A. Lubis, Irawan Yuda, Junadhi, and Defit Sarjon, “Leveraging K-Nearest Neighbors with SMOTE and Boosting Techniques for Data Imbalance and Accuracy Improvement,” Journal of Applied Data Sciences, vol. 5, no. 4, pp. 1625–1638, Dec. 2024, doi: 10.47738/jads.v5i4.343.
Y. Deng, M. R. Eden, and S. Cremaschi, “Metrics for Evaluating Machine Learning Models Prediction Accuracy and Uncertainty,” in 33rd European Symposium on Computer Aided Process Engineering, vol. 52, A. C. Kokossis, M. C. Georgiadis, and E. Pistikopoulos, Eds., in Computer Aided Chemical Engineering, vol. 52. , Elsevier, 2023, pp. 1325–1330. doi: https://doi.org/10.1016/B978-0-443-15274-0.50211-0.
O. Peretz, M. Koren, and O. Koren, “Naive Bayes classifier – An ensemble procedure for recall and precision enrichment,” Eng. Appl. Artif. Intell., vol. 136, p. 108972, 2024, doi: https://doi.org/10.1016/j.engappai.2024.108972.
H. Handoko, A. Asrofiq, J. Junadhi, and A. S. Negara, “Sentiment Analysis of Sirekap Tweets Using CNN Algorithm,” INTENSIF: Jurnal Ilmiah Penelitian dan Penerapan Teknologi Sistem Informasi, vol. 8, no. 2, pp. 312–329, Aug. 2024, doi: 10.29407/intensif.v8i2.23046.
H. Asnal, K. Andesa, F. Erlin, and Junadhi, “Hybrid Machine Learning Model for Risk Prediction and Action Recommendation Based on Artificial Mental Systems,” Teknika, vol. 14, no. 3, pp. 415–423, 2025, doi: 10.34148/teknika.v14i3.1357.
Additional Files
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Agustin, Junadhi, Susi Erlinda, Triyani Arita Fitri, Lusiana Efrizoni

This work is licensed under a Creative Commons Attribution 4.0 International License.





