TL;DR
This paper introduces a novel hierarchical network with label embedding for contextual emotion recognition. By leveraging BERT for sentence encoding and a BiGRU with attention for context encoding, the model captures nuanced emotional states within their surrounding text. The key innovation is a joint learning approach that incorporates a label embedding matrix to explicitly model emotion correlations, leading to improved accuracy in recognizing complex emotional expressions.
What Problem Does This Paper Address?
Recognizing emotions in text, known as Textual Emotion Recognition (TER), is crucial for applications like mental health monitoring and emotional management. While often treated as a simple text classification task, emotions are complex and highly context-dependent. The same sentence can convey different emotions depending on the surrounding sentences. Existing methods often focus on individual sentences, neglecting this vital contextual information. Furthermore, emotions rarely exist in isolation; they often co-occur or are mutually exclusive, a phenomenon known as emotion correlation. This paper addresses the challenge of accurately recognizing emotions by considering both the contextual information of a sentence and the inherent correlations between different emotion labels.
Methods
The proposed approach, a Hierarchical Network with Label Embedding, tackles emotion recognition in two main ways:
- Hierarchical Contextual Encoding:
- Sentence-Level Encoding: The model uses a pre-trained BERT model as a sentence-level encoder. BERT is chosen for its ability to capture rich linguistic knowledge from large amounts of unlabeled text, providing robust representations for individual sentences.
- Context-Level Encoding: For each sentence, its representation and the representations of preceding sentences (context) are fed into a BiGRU (Bidirectional Gated Recurrent Neural Network). This is followed by an attention mechanism. The BiGRU handles the sequential nature of context, while the attention layer allows the model to focus on the most relevant contextual sentences for predicting the current sentence's emotion. This hierarchical structure mirrors how humans process information, first understanding individual sentences and then integrating them into a broader context.
- Label Embedding for Emotion Correlation:
- Label Embedding Matrix: A crucial component is a learnable label embedding matrix. Each row in this matrix represents an emotion label (e.g., "Joy," "Anger") and learns a semantic representation of that emotion.
- Joint Learning: The model is trained using an assembled training objective that combines three loss functions:
- Multilabel Loss (ML): A standard loss function for multi-label classification, ensuring the model predicts probabilities for each emotion.
- Cosine Embedding Loss (C): This loss encourages the contextual representation of the input sentence to be closer to the embeddings of positive emotion labels and farther from negative ones.
- Label Embedding Loss (L): This loss trains the label embedding matrix itself to accurately represent individual emotions, ensuring it can capture semantic features among labels.
- Prediction: The final prediction is made by interacting the contextualized sentence representation with the label embedding matrix, specifically through an element-wise product followed by a sigmoid activation. This interaction allows the model to leverage the learned emotion correlations for more accurate predictions.
Datasets
The experiments were conducted on the RenCECps dataset. This is a Chinese emotional corpus derived from blog texts, annotated at the document, paragraph, and sentence levels with eight emotion categories: "Joy," "Hate," "Love," "Sorrow," "Anxiety," "Surprise," "Anger," and "Expect." For this study, the researchers used sentence-level annotations and considered the preceding two sentences as context. The dataset was split into 24,310 training samples and 6,746 testing samples.
Key Insights and Ideas
- Context is King (for Emotions): The paper strongly emphasizes that understanding emotions in text requires looking beyond the sentence itself. The hierarchical approach effectively captures how surrounding text influences emotional interpretation.
- Emotions are Social: Emotions don't exist in a vacuum. The explicit modeling of emotion correlations through label embeddings is a significant step towards capturing the complex relationships between different emotional states (e.g., "Joy" and "Love" often co-occur).
- BERT as a Foundation: Leveraging pre-trained models like BERT as sentence encoders significantly boosts performance by providing a strong linguistic foundation.
- Joint Learning for Synergy: Combining losses for sentence representation, label embedding, and emotion correlation in a single training objective allows the model to learn these aspects synergistically, leading to better overall performance.
Key Results
The proposed hierarchical network with label embedding achieved state-of-the-art results on the RenCECps dataset.
- Micro-F1 Score: The model achieved a micro-F1 score of 0.5665, outperforming strong baselines like RERC (0.5116) and HANS (0.5573).
- Macro-F1 Score: It also showed improvement in macro-F1 score, reaching 0.4186 compared to RERC (0.4161) and HANS (0.4003).
- Multilabel Metrics: The model demonstrated significant improvements in multilabel evaluation metrics, including a reduction in ranking loss by 46.15% and one-error by 21.78% compared to the RERC baseline.
- Label Embedding Effectiveness: Ablation studies showed that the label embedding layer and the assembled training objective were crucial for performance gains, contributing to better emotion correlation learning.
Limitations and Future Work
- Limitations: The paper acknowledges that while the model performs well, emotion recognition is inherently complex. The current approach primarily relies on textual context and might not fully capture nuances conveyed through tone, sarcasm, or implicit social cues that are not explicitly stated in the text.
- Future Work: The authors suggest incorporating external resources like emotion lexicons and knowledge graphs to further enhance the system's robustness and accuracy. Exploring more sophisticated ways to model emotion correlations and extending the model to handle different types of hierarchical texts (e.g., dialogues, social media threads) are also promising directions.
Summary updated