U ncle LM at S em E val-2025 Task 11: RAG -Based Few-Shot Learning and Fine-Tuned Encoders for Multilingual Emotion Detection (2025)

Abstract: This paper presents our approach for SemEval-2025 Task 11: Bridging the Gap in Text-Based Emotion Detection. We investigate multiple methodologies, including fine-tuning transformer models and few-shot learning with GPT-4o-mini, incorporating Retrieval-Augmented Generation (RAG) for emotion intensity estimation. Our approach also leverages back-translation for data augmentation and threshold optimization to improve multi-label emotion classification. The experiments evaluate performance across multiple languages, including low-resource settings, with a focus on enhancing cross-lingual emotion detection.

## introduction emotion detection from text has emerged as a fundamental task in natural language processing (nlp), enabling advancements in domains such as sentiment analysis, affective computing, and human-computer interaction (mohammad and @xcite . despite progress, challenges persist, especially in multilingual settings where emotional expressions vary across languages and cultures @xcite . detecting nuanced, fine-grained emotional states is further complicated by the inherent contextdependence and subtlety of emotions. this paper is motivated by our participation in the semeval-2025 task 11 @xcite . this shared task spans three sub-tracks: track a (multi-label emotion classification), track b (emotion intensity prediction), and track c (cross-lingual emotion detection). each track poses distinct challenges, ranging from the classification of overlapping emotional states in a single text snippet to the estimation of emotion intensity across scales, and even transferring emotion detection across languages. to address these challenges, we adopt state-ofthe-art transformer-based architectures. specifically, we fine-tune roberta-large @xcite for english tasks and xlm-roberta-large @xcite for multilingual and cross-lingual settings. for track a, our approach incorporates fine-tuning these models with a strong focus on threshold optimization to balance precision and recall. additionally, we employ back-translation as a data augmentation technique for english models to improve their robustness @xcite . in track b, we leverage the capabilities of gpt-4o-mini through few-shot learning, a paradigm particularly well-suited for estimating emotion intensity @xcite . relevant training examples are retrieved using cosine similarity of text embeddings, derived via ope-nai's embedding models. by retrieving semantically similar examples, the model is guided toward making more contextually appropriate predictions for varying emotion intensities. notably, we introduce tailored prompting and iterative refinement of responses, which significantly improve the model's capacity to handle complex emotional expressions @xcite . we further experimented with a hybrid approach in track b, combining outputs from gpt-4o-mini with predictions from an independently trained multi-layer perceptron (mlp) model using ope-nai embeddings. while the hybrid model achieved notable gains in detecting "surprise", it fell short of surpassing the few-shot gpt-based predictions in other categories. for track c, our work extends the multilingual and cross-lingual capabilities of xlm-robertalarge. leveraging insights from prior work (conneau, 2019), we exploit shared linguistic representations in related languages to enhance crosslingual transfer learning. datasets like xed @xcite and goemotions @xcite 2020) underscore the importance of high-quality annotated resources for training robust emotion detection models, and we align our methodology with these principles. ## datasets this study utilizes the brighter dataset (muhammad et al., 2025a), a multilingual corpus for emotion recognition spanning 28 diverse languages. the dataset addresses a significant gap in the availability of annotated emotional data, particularly for low-resource languages, and is constructed from a range of textual sources, including social media posts, news articles, personal narratives, and literary texts. in tasks related to ethiopian languages, particularly amharic, we incorporated insights from prior work on multi-label emotion classification @xcite , using knowledge derived from the ethioemo dataset @xcite . each data instance in the dataset is annotated for one or more of the six core emotions: anger, disgust, fear, joy, sadness, and surprise. a neutral label indicates the complete absence of these emotions, where all emotion intensities are set to zero. the brighter dataset enhances the conventional multi-label emotion detection task by providing an emotion intensity scale ranging from 0 to 3 for each emotion, thereby enabling a more granular analysis of emotional nuances. this capability is pivotal for fine-grained emotion detection and cross-lingual tasks. to further enhance model robustness for english, we augmented the brighter dataset with samples from goemotions @xcite , a widely-used resource for fine-grained english emotion annotation. the augmentation enriched the training data and provided broader context for modeling diverse emotional expressions. ## methods our approach combines fine-tuned transformer models, few-shot learning with large language models (llms), and threshold optimization for multi-label classification. to handle the multilingual aspect, we fine-tuned xlm-roberta-large @xcite and roberta-large @xcite for track a, applying back-translation as a data augmentation technique for english @xcite . we also optimized classification thresholds to improve model calibration across all languages. for emotion intensity estimation in track b, we utilized a retrieval-augmented generation (rag) framework @xcite to enhance fewshot learning with gpt-4o-mini. specifically, we retrieved the most relevant training examples using embedding-based cosine similarity search and incorporated them directly into the prompts. by including these contextually relevant examples, the model benefited from enhanced in-context learning, allowing it to better generalize across different intensity levels @xcite . ## results and analysis 4.1 track a: multi-label classification we evaluated the performance of roberta-large and xlm-roberta-large on multiple languages. the results of our experiments, including macro f1scores and emotion-specific scores, are presented in