Skip to main content

A Convolutional Neural Network Model for Emotion Detection from Tweets

  • Conference paper
  • First Online:
Proceedings of the International Conference on Advanced Intelligent Systems and Informatics 2018 (AISI 2018)

Abstract

Sentiment analysis and emotion recognition are major indicators of society trends toward certain topics. Analyzing opinions and feelings helps improving the human-computer interaction in several fields ranging from opinion mining to psychological concerns. This paper proposes a deep learning model for emotion detection from short informal sentences. The model consists of three Convolutional Neural Networks (CNNs). Each CNN contains a convolutional layer and a max-pooling layer, followed by a fully-connected layer for classifying the sentences into positive or negative. The model employs the word vector representation as textual features, which works on random initialization for the word vectors, and are set to be trainable and updated through the model training phase. Eventually, task-specific vectors are generated as the model learns to distinguish the meaning of words in the dataset. The model has been tested on the Stanford Twitter Sentiment dataset for classifying sentiment into two classes positive and negative. The presented model achieved to record 80.6% accuracy as a prove that even with randomly initialized word vectors, it can work very well in text classification tasks when trained with CNNs.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 169.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Coppersmith, G., Hollingshead, K., Dredze, M., Harman, C.: From ADHD to SAD: analyzing the language of mental health on twitter through self-reported diagnoses. In: Proceedings of the 2nd Workshop on Computational Linguistics and Clinical Psychology: From Linguistic Signal to Clinical Reality, pp. 1–10 (2015)

    Google Scholar 

  2. Resnik, P., Armstrong, W., Claudino, L., Nguyen, T.: The University of Maryland CLPsych 2015 shared task system. In: The Conference of the North American Chapter of the Association for Computational Linguistic, pp. 54–60 (2015)

    Google Scholar 

  3. Zhang, X., Zhao, J., LeCun, Y.: Character-level convolutional networks for text classification. In: Advances in Neural Information Processing Systems, pp. 649–657 (2015). arXiv:1509.01626

  4. Taboada, M., Brooke, J., Tofiloski, M., Voll, K., Stede, M.: Lexicon-based methods for sentiment analysis. Comput. Linguist. 37(2), 267–307 (2011)

    Article  Google Scholar 

  5. LeCun, Y., Bengio, Y., Hinton, G.: Deep learning. Nature 521(7553), 436–444 (2015)

    Article  Google Scholar 

  6. Mikolov, T., Chen, K., Corrado, G., Dean, J.: Efficient estimation of word representations in vector space. In: Proceedings of the International Conference on Learning Representations, pp. 1–12 (2013). https://doi.org/10.1162/153244303322533223

  7. Go, A., Bhayani, R., Huang, L.: Twitter sentiment classification using distant supervision. Processing 150(12), 1–6 (2009)

    Google Scholar 

  8. Paltoglou, G., Thelwall, M.: Twitter, MySpace, Digg: unsupervised sentiment analysis in social media. ACM Trans. Intell. Syst. Technol. 3(4), 66 (2012)

    Article  Google Scholar 

  9. Montejo-Ráez, A., Martínez-Cámara, E., Teresa Martín-Valdivia, M., Alfonso Ureña-López, L.: A knowledge-based approach for polarity classification in Twitter. J. Assoc. Inf. Sci. Technol. 414–425 (2014). https://doi.org/10.1002/asi.22984

  10. Kim, Y., Jernite, Y., Sontag, D., Rush, A.M.: Character-aware neural language models. In: Association for the Advancement of Artificial Intelligence (AAAI), pp. 2741–2749 (2016). arXiv:1508.06615

  11. Kim, Y.: Convolutional neural networks for sentence classification (2014). arXiv:1408.5882

  12. Johnson, R., Zhang, T.: Semi-supervised convolutional neural networks for text categorization via region embedding. Neural Inf. Process. Syst. 28, 919–927 (2015)

    Google Scholar 

  13. Severyn, A., Moschitti, A.: UNITN: training deep convolutional neural network for Twitter sentiment classification. In: Proceedings of the 9th International Workshop on Semantic Evaluation, pp. 464–469 (2015). https://doi.org/10.18653/v1/s15-2079

  14. Nguyen, H., Nguyen, M.-L.: A deep neural architecture for sentence-level sentiment classification in Twitter social networking (2017). arXiv:1706.08032

  15. Simonyan, K., Zisserman, A.: Very deep convolutional networks for large-scale image recognition. In: ICLR (2015). arXiv:1409.1556

  16. Ren, S., He, K., Girshick, R., Zhang, X., Sun, J.: Object detection networks on convolutional feature maps. IEEE Trans. Pattern Anal. Mach. Intell. 39(7), 1476–1481 (2017)

    Article  Google Scholar 

  17. Zhang, I., Pezeshki, M., Brakel, P., Zhang, S., Laurent, C., Bengio, Y., Courville, A.: Towards end-to-end speech recognition with deep convolutional neural networks (2017). arXiv:1701.02720

  18. Qian, Y., Woodland, P.C.: Very deep convolutional neural networks for robust speech recognition. In: IEEE Spoken Language Technology Workshop, SLT, San Diego, CA, USA, pp. 481–488 (2016)

    Google Scholar 

  19. Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I., Salakhutdinov, R.: Dropout: a simple way to prevent neural networks from overfitting. J. Mach. Learn. Res. 15(1), 1929–1958 (2014)

    MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Eman Hamdi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Hamdi, E., Rady, S., Aref, M. (2019). A Convolutional Neural Network Model for Emotion Detection from Tweets. In: Hassanien, A., Tolba, M., Shaalan, K., Azar, A. (eds) Proceedings of the International Conference on Advanced Intelligent Systems and Informatics 2018. AISI 2018. Advances in Intelligent Systems and Computing, vol 845. Springer, Cham. https://doi.org/10.1007/978-3-319-99010-1_31

Download citation

Publish with us

Policies and ethics