JUNLP _ S arika at S em E val-2025 Task 11: Bridging Contextual Gaps in Text-Based Emotion Detection using Transformer Models (2025)

Abstract: Because language is subjective, it can be difficult to infer human emotions from textual data. This work investigates the categorization of emotions using BERT, classifying five emotions—angry, fearful, joyful, sad, and surprised—by utilizing its contextual embeddings. Preprocessing techniques like tokenization and stop-word removal are used on the dataset, which comes from social media and personal tales. With a weighted F1-score of 0.75, our model was trained using a multi-label classification strategy. BERT has the lowest F1-score when it comes to rage, but it does well when it comes to identifying fear and surprise. The findings demonstrate the difficulties presented by unbalanced datasets while also highlighting the promise of transformer-based models for text-based emotion identification. Future research will use data augmentation methods, domain-adapted BERT models, and other methods to improve classification performance.

## introduction natural language processing (nlp) has made emotion identification from textual data a crucial problem because of its many uses, which include social media trend prediction, consumer sentiment analysis, mental health monitoring, and humancomputer interaction. however, because language is inherently subjective, figurative phrases like sarcasm and metaphors are present, and people express emotions differently, it is still difficult to accurately identify emotions in writing. text-based emotions, in contrast to structured data, are frequently implicit and need a thorough contextual knowledge in order to correctly categorize various emotional states. using hand-crafted features and word embeddings, traditional machine learning techniques like support vector machines (svm) @xcite and random forests have been used to emotion identification. nevertheless, these techniques frequently have trouble capturing contextual relationships and deeper semantic meaning, which results in less than ideal classification performance. transformer-based models, such as bert (bidirectional encoder representations from transformers) @xcite , have transformed natural language processing (nlp) by offering strong contextual representations that allow more accurate emotion detection thanks to developments in deep learning. bert is well-suited to handling the complexity of emotional expressions in text due to its bidirectional text processing capability, which allows it to understand both local and global relationships.. in order to enable the model to identify several emotions in a single text instance, we use bert for multi-label emotion categorization in this work. we test the model's performance using a benchmark dataset drawn from internet forums, social media postings, and personal narratives.this work is submitted under semeval 2025 task 11, track a: english-only multi-label emotion classification. we concentrate on five main emotions: anger, fear, joy, sadness, and surprise. to enhance the quality of textual inputs, the dataset is subjected to preparation procedures such as named entity recognition (ner), tokenization, and stop-word removal.our method addresses issues with ambiguity and overlapping emotional states by improving classification performance through the use of bert's contextual embeddings. ## problem statement understanding human emotions from textual data is a complex challenge due to the inherent ambiguity and subjectivity of language. the primary objective of this project is to develop a robust model capable of accurately classifying multiple emotions present in a given text snippet. specifically, we aim to predict the following emotions: joy, sadness, fear, anger, surprise. each emotion will be represented as a binary label, indicating its presence (1) or absence (0) in the text. ## dataset description we used the dataset provided in semeval-2025 task 11 @xcite , @xcite used for this challenge consists of annotated textual data sourced from personal narratives, social media posts, and various online forums. the track a english dataset contains only 2769 samples across diverse sources. the dataset comprises five primary features, with preprocessing steps such as tokenization, stop-word removal, and named entity recognition (ner) to effectively extract emotional expressions. the training and validation datasets contain 5 columns, supporting two tasks: multi-label emotion classification, where the model predicts the presence of multiple emotions (anger, fear, joy, sadness, surprise) within the text, and emotion intensity detection, where the model assesses the strength of each identified emotion. in contrast, the test data set includes only the id, text and corresponding emotion labels, which require models to infer emotional information without predefined labels. these datasets enable structured prediction of emotional states based on textual expressions. ## related work earlier approaches to emotion detection from text used machine learning models like svms and naive bayes with hand-crafted features. these lacked contextual understanding. with the rise of deep learning, models like rnns and cnns improved emotion classification but still had limitations in capturing long-range dependencies. transformer-based models, especially bert @xcite , brought significant improvements by capturing deep contextual relationships. recent studies @xcite , have shown that fine-tuning bert on emotion datasets improves multi-label classification performance. this motivates our use of bert for the current task. ## methodology in this study, we propose a methodology for emotion classification from english text using a neural network architecture built upon the bert (bidirectional encoder representations from transformers) model. our approach leverages the contextual embeddings of bert to effectively understand the semantics of textual data and classify them into five emotion categories: anger, fear, joy, sadness, and surprise. this methodology integrates stateof-the-art natural language processing techniques with a deep learning model optimized for multilabel emotion classification. ## limitations notwithstanding the encouraging outcomes of textbased emotion categorization using bert, our work has certain drawbacks. one significant issue is the dataset's class imbalance, which has an impact on the model's capacity to fairly identify all emotions. the model has the lowest f1-score when it comes to anger, but it does well when it comes to fear and astonishment. due to this imbalance, the model could perform poorly on less common emotion classes while favoring dominating ones. furthermore, bert is less suited for real-time or low-resource applications, as it is a transformerbased model that requires substantial computing resources for both training and inference. the categorization of emotions based only on textual input is another drawback. a solely textbased method lacks multimodal signals like tone, pitch, and facial expressions, which are frequently more effective in eliciting emotions. the model's capacity to distinguish between emotions that exhibit comparable textual patterns-like sarcasm or neutral statements with emotional undertones-is hence limited. additionally, even while bert does a good job of capturing contextual meanings, it may still misread emotions in texts that include casual language, slang, or cultural differences. to increase classification robustness, future studies should investigate domain-specific fine-tuning and the use of multimodal data. ## conclusion and future work in this work, we used text data to classify emotions using bert, and we assessed how well it performed across five different emotion classes : anger,fear,joy,sadness and surprise. according to the results, anger performed the worst, whereas bert successfully categorizes emotions like fear and surprise, obtaining high f1-scores. although the somewhat lower macro-average f1-score of 0.70 indicates that there is potential for improvement in addressing class imbalances, the overall weighted f1-score of 0.75 emphasizes the model's strong generalization capabilities. in order to improve classification performance, especially for underrepresented emotions, our future research will investigate domain-adapted bert models and data augmentation strategies. in order to enhance emotion recognition, we also intend to look into multimodal techniques by combining text with audio and visual data. it may also be possible to obtain more balanced categorization across all emotion categories by experimenting with ensemble models and further optimizing bert through emotion-specific pretraining.