S tanford ML ab at S em E val-2025 Task 11: Track B –Emotion Intensity Detection (2025)

Abstract: We outline our SemEval 2025 Track B: Emotion Intensity Prediction submission, for which the objective is to predict the intensity of six primary emotions—anger, disgust, fear, joy, sadness, and surprise—between 0 and 3, with 0 being none and 3 being very strong. We used a regression fine-tuned BERT-based model that makes use of pretrained embeddings in order to sense subtle emotional wordings in text.We include tokenization with a BERT tokenizer, training with AdamW optimization, and an ExponentialLR scheduler used for learning rate modification. Performance is monitored based on validation loss and accuracy through closeness of model outputs to gold labels.Our best-performing model is 68.97% accurate in validation and has a validation loss of 0.373, demonstrating BERT’s capability in fine-grained emotion intensity prediction. Key findings include that fine-tuning transformer models with regression loss improves prediction accuracy and that early stopping and learning rate scheduling avoid overfitting.Future improvements can include larger datasets, ensemble models, or other architectures such as RoBERTa and T5. This paper shows the potential of pretrained transformers for emotion intensity estimation and lays the groundwork for future computational emotion analysis research.

## introduction the semeval 2025 task 11 track b: emotion intensity prediction seeks to create models that make predictions about the perceived intensity of six emotions-joy, sadness, fear, anger, surprise, and disgust-in a sentence. the intensity is on an ordinal scale of 0 (no emotion) to 3 (strong emotion), which allows us to have a more nuanced view of emotional expression. this task is essential to the creation of emotion-aware nlp applications, such as sentiment analysis, mental health tracking, and human-computer interaction, by identifying not just the presence of emotion, but also its intensities. the dataset comprises eleven languages-amharic, algerian arabic, mandarin chinese, german, english, spanish, hausa, portuguese, romanian, russian, and ukrainian-and covers a multilingual range of emotion detection. for the full description of the task, dataset, and evaluation setup, refer to the semeval 2025 task 11 track b overview paper @xcite . our approach employs a transformer-based model, which depends on multilingual pre-trained language models (plms) such as xlm-roberta to acquire semantic and contextualized representations across languages. because the task is ordinal, we experiment with both regression-based and ordinal classification approaches, complementing data augmentation and fine-tuning methods for improving generalization. we also explore languagespecific and multilingual training settings, balancing the trade-offs of cross-lingual knowledge transfer and fine-tuning particular to languages. to further enhance our predictions, we integrate ensemble learning techniques and utilize different model outputs in combination to reduce variance and increase robustness. through this assignment, we gained valuable lessons in multilingual emotion intensity prediction tasks. our system performed well with high-resource languages like english and spanish, performing within the top 60% of submissions. it declined for low-resource languages such as hausa and amharic, revealing the limitations of plms to handle underrepresented languages. additionally, our model struggled with subtle distinctions between moderate and high emotion intensities, suggesting directions for future optimization in label calibration. contrastive learning and emotion-aware embeddings are directions of future work that can enhance the degree of granularity in emotion intensity predictions. our code has been publicly released and can be accessed at: https://colab.research.google. com/drive/1ydbxsn65gddzgwz9trfihlm6_ n7qdxeq?@xmath0, the main aim is to create a model that could predict the perceived intensity of emotions within a sentence, across different languages. more specifically, each language had 5-6 major emotions that could be detected in a sentence-joy, sadness, fear, anger, surprise, and disgust. the predictions are a perceived intensity on a scale of 0-3 of each emotion within a sentence, with 0 being no emotion at all and 3 being strong emotion. the datasets provided for this algorithm included the languages amharic, algerian arabic, mandarin chinese, german, english, spanish, hausa, portuguese, romanian, russian, and ukrainian. there were separate datasets for dev, test, and train, with varying amounts of data between each language (usually a couple thousand sentences for each dataset). ## system overview our detection system is built using pytorch and the huggingface transformers library. first for preprocessing, the dataset will be tokenized using the autotokenizer from huggingface transformers and padded to the default max_length for the model. the labels(emotions) are also converted to tensors for training. we used the bidirectional encoder representations from transformers, or bert, base model (uncased) from hugging face as a pre-trained model that we then fine-tuned for a regression task on the provided emotion intensity dataset. we set the tokenizer to the bert tokenizer, and ran each of the datasets (train, val, test) through our preprocessing pipeline. for the model itself, we used the bert model for sequence classification with 5 labels for the emotions (6 for languages with 6 emotions), and set the problem type to regression for this task. we used an adamw optimizer with a learning rate of 5e-5. in the training loop, we iterated over each batch of data and evaluated the output of the model given tokenized input ids and attention masks that allows the model to differentiate between actual tokens and padding. the loss was then calculated in each iteration using mean squared error, which is the default for a regression task. at the end of the loop, gradients are calculated with loss.backward() and model weights are updated. ## results the proposed model achieved a validation accuracy of 68.97% and a validation loss of 0.373, indicating robust performance in emotion intensity prediction. these results affirm that regression-based finetuning of bert effectively captures subtle variations in emotional expression. our system ranked within the top 60% overall, demonstrating competitive performance across multiple languages. the model performed well in high-resource languages such as english and spanish but exhibited limitations in low-resource languages like hausa and amharic, suggesting potential constraints in crosslingual transfer learning. ## analysis 6.1 quantitative analysis and ablation studies the choice of model architecture played a crucial role in performance. the use of bert-base-uncased provided a strong baseline, but alternative models such as roberta-base and deberta-v3-base could offer enhanced contextual representations. training on a merged multilingual dataset proved beneficial for high-resource languages, yet it provided limited advantages for low-resource languages, suggesting that improved cross-lingual learning strategies are necessary. the implementation of adamw with an exponentiallr scheduler contributed to training stability. experiments with various batch sizes and learning rates confirmed that our chosen hyperparameters struck an optimal balance between convergence speed and generalization. ## conclusion this study demonstrates that transformer-based models, particularly bert, are effective for emotion intensity prediction. however, challenges remain in handling low-resource languages and refining distinctions between emotion intensities. future work will explore alternative architectures such as roberta-base and deberta-v3-base, as well as incorporating contrastive learning techniques to improve representation learning. expanding dataset diversity is essential to enhance generalization across languages. furthermore, conducting human evaluations will provide deeper insights into model predictions and refine calibration strategies. despite these limitations, our approach con-tributes to the growing field of computational emotion analysis, underscoring the value of pretrained transformers in emotion intensity estimation. the findings provide a strong foundation for future advancements in emotion-aware natural language processing applications.