Abstract
Idiomatic expressions are used in everyday language and typically convey affect, i.e., emotion. However, very little work investigating the extent to which automated methods can recognise emotions expressed in idiom-containing text has been undertaken. This can be attributed to the lack of emotion-labelled datasets that support the development and evaluation of such methods. In this paper, we present the IDioms with EMotions (IDEM) dataset consisting of a total of 9685 idiom-containing sentences that were generated and labelled with any one of 36 emotion types, with the help of the GPT-4 generative language model. Human validation by two independent annotators showed that more than 51% of the generated sentences are ideal examples, with the annotators reaching an agreement rate of 62% measured in terms of Cohen’s Kappa coefficient. To establish baseline performance on IDEM, various transformer-based emotion recognition approaches were implemented and evaluated. Results show that a RoBERTa model fine-tuned as a sequence classifier obtains a weighted F1-score of 58.73%, when the sequence provided as input specifies the idiom contained in a given sentence, together with its definition. Since this input configuration is based on the assumption that the idiom contained in the given sentence is already known, we also sought to assess the feasibility of automatically identifying the idioms contained in IDEM sentences. To this end, a hybrid idiom identification approach combining a rule-based method and a deep learning-based model was developed, whose performance on IDEM was determined to be 84.99% in terms of F1-score.
Introduction
Idioms are the "spices" of language—they add flavor and nuance, but they are notoriously difficult for machines to digest. When someone says they are "weak at the knees," a literal-minded AI might check for joint pain rather than recognizing overwhelming desire or fear. Most sentiment analysis focuses on broad categories like positive, negative, or neutral. However, human emotion is far more granular. Idioms are a primary vehicle for expressing these nuances because they are non-compositional—their meaning cannot be deduced simply by looking at the individual words.
While datasets for idiom identification exist, there has been a significant gap in resources that map these expressions to fine-grained emotions. Without labeled data, NLP models struggle to interpret the affective stance of a speaker who uses figurative language, often leading to "literal" misinterpretations.
The IDEM Dataset
The researchers developed IDEM (IDioms with EMotions), a dataset of nearly 10,000 sentences containing idioms labeled across 36 distinct emotion types. The authors took a multi-stage approach to build IDEM:
- Synthetic Data Generation: GPT-4 was used to generate five sentences for each of the 2,322 idioms found in the SLIDE (Sentiment Lexicon of IDiomatic Expressions) dataset.
- Fine-Grained Labeling: Instead of standard 6–10 emotions, they adopted a rich typology of 36 emotions based on research from TU Delft.
- Human Validation: Human annotators reviewed a subset of the data, finding that 51% of the generated sentences were "ideal" examples.
Methodology
To establish baseline performance, several architectures were tested:
- Fine-tuned BERT and RoBERTa: Evaluated in "idiom-ignorant" (sentence only) and "idiom-aware" (sentence + idiom definition) configurations.
- Prompt-learning: Reformulating the task as a "fill-in-the-blank" problem.
- Zero-shot GPT-4: Utilizing the model's internal knowledge.
Additionally, a hybrid idiom identification system was developed to automate the pipeline. This system combines rule-based lemmatization with a deep-learning model (DISC) to identify idioms in raw text before emotion classification.
Key Results
- Emotion Recognition: GPT-4 (zero-shot) achieved the highest performance with a 61.05% weighted F1-score. Notably, the idiom-aware RoBERTa model followed closely at 58.73%, despite having significantly fewer parameters.
- Idiom Identification: The hybrid identification approach achieved an 84.99% F1-score on the IDEM test set.
- End-to-End Feasibility: Replacing "gold standard" idiom labels with automatically generated ones only resulted in a ~1% drop in emotion recognition accuracy, proving the viability of a fully automated pipeline.
Discussion and Conclusion
The study highlights the "Power of the Dictionary": providing explicit idiom definitions significantly boosts model performance. It also demonstrates that generative models can serve as "tireless annotators" to scale dataset creation, provided human-in-the-loop validation is maintained.
Future work will look to address current limitations, such as the English-language bias and the single-label constraint, as idioms often convey complex, multi-layered feelings. By bridging the gap between figurative language and affective computing, IDEM provides a vital benchmark for making AI a more nuanced communicator.
Summary updated