Long-Tail Emotion Detection: Few-Shot Learning for Rare Pandemic Emotions via Prototype Networks
Roshan Kumar, Ramesh Kumar Ayyasamy, Abdulkarim Kanaan Jebna · Journal of Advanced Research in Applied Sciences and Engineering Technology · 2025
Pandemic-related social media data presents a severe class imbalance, with rare emotions such as Joking, Thankful, and Pessimistic making up less than 1% of tweets. This imbalance often causes standard transformer models to overlook these subtle yet crucial signals, which can be crucial for public health monitoring. To address this, we propose an Idiom-Augmented Prototype Network (IAPN) that combines few-shot metric learning with idiom-aware semantic enrichment. Our work introduces a significant, publicly available benchmark of 480,000 COVID-19 tweets, organized into episodic few-shot tasks to reflect real-world emotion frequencies. The IAPN model combines contextual XLM-RoBERTa embeddings with idiom2vec representations and classifies each tweet using a nearest-prototype approach, requiring only five labeled examples per class. Experiments against strong baselines, including full fine-tuning, parameter-efficient LoRA, focal loss, and data augmentation, demonstrate that IAPN achieves a macro-F1 improvement of 4.8 points and more than doubles the recall for rare classes, while drastically reducing computational energy costs. Ablation studies confirm that idiom augmentation primarily benefits tweets rich in figurative language. Our findings underscore the importance of integrating metric learning with idiomatic knowledge for robust and efficient emotion detection in imbalanced social media data. All resources are released as open source.