1 of 1

Emotion Detection in COVID-related Reddit Posts

Problem we solved & its importance

Introduction

Using Reddit posts from the peak of the COVID-19 pandemic, we aim to create a model that detects perceived emotions from text and identify the triggers related to them. Our model will be detect which emotions are conveyed in users' posts and be able to generate automated summaries of the specific text that correspond to each detected emotion. Previous models that detect emotion from text struggle to handle multi-emotion detection and lack automated summarization of emotionally charged text. Our project solves these issues by taking a deeper look into emotional triggers and an analysis of correlations between emotion and language.

  1. We utilize a transformer model to determine every one of the seven Plutchik sentiments that are present in the post, and return a one-hot encoded vector representation of those emotion(s).
  2. To create the generative automated summaries, we use a generative model that takes in the original Reddit posts and the detected sentiments in the posts produced by our transformer model. It generates a sentence similar to the original Reddit post but focuses on the triggers contributing to the target emotion. This process is repeated with the other emotions identified in that Reddit post.
  3. We expect the model to correctly identify the emotions present in any given Reddit post regarding the COVID-19 pandemic. We also expect the model to be generalizable to other tasks and datasets, , as we use a generalized and pretrained embedding, as well as dropout layers to minimize overfitting.

Cogito Brunésum: Gabrielle Shieh, Nolan Serbent, Hao Wen, Jonathan Goshu

Acknowledgements & References

We would like to thank David Lubawski, our TA and project mentor, as well as Professor Ritambhara Singh for a great semester!

How we want to solve our problem

We are unfortunately unable to get our model to run due to an error with the trainable weights of the model. With the help of Dave, our mentor TA, we made several efforts to debug our model but we ultimately were unsuccessful. Regardless, we learned A LOT about transformers in this project, as well as word embeddings. While Homework 5 gave us a lot of knowledge about the structure of each component of a transformer (general preprocessing, positional encoding, attention, and decoding), we had to work through how each component fit together into one cohesive model, including self-attention, attention masks, word embeddings, and encoded inputs and outputs.

Future work on this project could involve training the model on a more expansive dataset that represents a broader range of emotional diversity and communication from differing time periods. This could improve our model's processing of emotional intensity and lead to better accuracy in multi-emotion detection. Additionally, the scope of our project could be expanded to further analyze methods of emotional expression and context of text data. We hope our model will be beneficial in advancing user studies research and can help create effective results for natural language processing applications.

Methodology + Hypothesis

Discussion

What we learned and future work

Details of our model architecture

Our Model

[1] Hongli Zhan, Tiberiu Sosea, Cornelia Caragea, and Junyi Jessy Li. 2022. Why Do You Feel This Way? Summarizing Triggers of Emotions in Social Media Posts. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 9436–9453, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.

  • We preprocessed our data by creating an embedding matrix, tokenizing the posts, and turning each post into a vector and replacing each word with its correlating word index.
  • The encoder of our transformer takes in the Reddit posts and the word embedding, and uses self-attention and feed forward layers to return the encoded posts and the positional encoded posts.
  • The decoder of our transformer takes in Reddit posts and the encoded Reddit posts, and uses decoder attention, self-attention and feed forward layers to return a one-hot encoded vector of the seven Plutchik emotions for each input.
  • We used categorical cross entropy as our loss function because our labels are one-hot encoded. Furthermore, we used the Adam optimizer with a learning rate of 0.001.

How we planned to have our model produce summaries

Summarization Task

  • Transfer the attention: the parts of the post which contributed towards classifying an emotion as present are to be translated into a standalone sentence, rather than part of a composite emotioned sentence.
  • The model minimizes perplexity and the presence of other emotions, while preserving/maximizing the presence of the target emotion.