Comparative Analysis of CNN and LSTM Neural Networks for Sentiment Classification on the Sentiment140 Dataset


Authors : Yiwen Tang

Volume/Issue : Volume 10 - 2025, Issue 7 - July


Google Scholar : https://tinyurl.com/bdeksjpe

Scribd : https://tinyurl.com/5h2xcx76

DOI : https://doi.org/10.38124/ijisrt/25jul1564

Note : A published paper may take 4-5 working days from the publication date to appear in PlumX Metrics, Semantic Scholar, and ResearchGate.

Note : Google Scholar may take 30 to 40 days to display the article.


Abstract : Text sentiment analysis is of great help in mental health diagnosis. It can identify problems in early stages and actively intervene to prevent them from becoming serious. This study explores the application of deep learning techniques for sentiment analysis aimed at assessing mental health through text. In this paper, I use PyTorch to create a convolutional neural network (CNN) and a long short-term memory network (LSTM) and train these two neural networks based on the processed Sentiment140 dataset. Test Accuracy, Recall, F1 score, Total loss, and Training time to evaluate their performance. With a Test Accuracy of 87.42% as opposed to 81.25% for CNN, the results demonstrate that the LSTM model performs better than CNN across all evaluation metrics. Finally, I develop a web interface that enables users to enter text and receive sentiment analysis result based on trained LSTM model. This research can help improve mental health diagnosis and monitoring.

Keywords : Sentiment Analysis, CNN, LSTM, Mental Health, PyTorch.

References :

  1. Kumar, A., & Sharma, R. (2023). Deep learning approaches for depression detection from social media texts: A comprehensive survey. Journal of Biomedical Informatics, 136, Article 104275.
  2. Zhang, T., Lin, Y., & Yu, S. (2023). Emotion fusion for mental health classification on social media. IEEE Transactions on Affective Computing. Advance online publication.
  3. Islam, M. R., Kabir, M. A., & Ahmed, M. M. (2022). Depression detection from social media using hybrid CNN–LSTM model. Journal of Affective Computing, 13(2), 130–139.
  4. Wang, Y., Chen, Z., & Sun, Q. (2023). Comparative study of CNN and LSTM for sentiment classification. Proceedings of the 2023 International Conference on Artificial Intelligence Applications, 88–94.
  5. Rahman, T., Hossain, M. N., & Akter, S. (2024). Mental health detection from Bangla tweets using deep learning models. Asian Journal of Computer Science and Information Technology, 15(1), 22–29.
  6. Zhang, L., Li, H., & Zhou, X. (2023). Attention-based CNN–LSTM with SHAP interpretability for suicidal ideation detection. IEEE Access, 11, 27432–27445.
  7. Chen, R., & Liu, Y. (2022). An ensemble transformer–LSTM approach for multiclass mental health prediction. Expert Systems with Applications, 198, 116842.

Text sentiment analysis is of great help in mental health diagnosis. It can identify problems in early stages and actively intervene to prevent them from becoming serious. This study explores the application of deep learning techniques for sentiment analysis aimed at assessing mental health through text. In this paper, I use PyTorch to create a convolutional neural network (CNN) and a long short-term memory network (LSTM) and train these two neural networks based on the processed Sentiment140 dataset. Test Accuracy, Recall, F1 score, Total loss, and Training time to evaluate their performance. With a Test Accuracy of 87.42% as opposed to 81.25% for CNN, the results demonstrate that the LSTM model performs better than CNN across all evaluation metrics. Finally, I develop a web interface that enables users to enter text and receive sentiment analysis result based on trained LSTM model. This research can help improve mental health diagnosis and monitoring.

Keywords : Sentiment Analysis, CNN, LSTM, Mental Health, PyTorch.

CALL FOR PAPERS


Paper Submission Last Date
31 - December - 2025

Video Explanation for Published paper

Never miss an update from Papermashup

Get notified about the latest tutorials and downloads.

Subscribe by Email

Get alerts directly into your inbox after each post and stay updated.
Subscribe
OR

Subscribe by RSS

Add our RSS to your feedreader to get regular updates from us.
Subscribe