Abstract
We introduce EUREKA, an ensemble-based approach for performing automatic euphemism detection. We (1) identify and correct potentially mislabelled rows in the dataset, (2) curate an expanded corpus called EuphAug, (3) leverage model representations of Potentially Euphemistic Terms (PETs), and (4) explore using representations of semantically close sentences to aid in classification. Using our augmented dataset and kNN-based methods, EUREKA was able to achieve state-of-the-art results on the public leaderboard of the Euphemism Detection Shared Task, ranking first with a macro F1 score of 0.881. Our code is available at https://github.com/sedrickkeh/EUREKA.
Introduction
Euphemisms—mild or indirect expressions used to mask harsh or sensitive topics (e.g., saying "economical" instead of "cheap")—represent a significant challenge for Natural Language Processing (NLP). The primary difficulty lies in context: a word like "slim" can be literal (a thin line) or euphemistic (a physical appearance).
Existing euphemism detection tasks are often hampered by two main issues: small, noisy datasets where human-annotated rows contain inherent ambiguity, and coarse model representations. Standard Transformer models usually rely on the [CLS] token, which provides a single vector for the entire sentence, often "drowning out" the specific nuance of the euphemistic term itself. EUREKA addresses these challenges through targeted data cleaning, novel augmentation, and term-focused modeling.
Methodology
The EUREKA system attacks the problem from both the data and modeling sides to improve discriminatory power.
Data Innovations: Cleaning and Augmentation
To address dataset noise, the authors implemented a cleaning pipeline using BERTScore. By replacing a Potentially Euphemistic Term (PET) with its literal meaning and calculating the semantic similarity, the system identifies sentences where the label (euphemistic vs. literal) is likely incorrect and flags them for review.
Beyond cleaning, two augmentation strategies were employed to expand the training corpus:
- EuphAug-R (Representation-based): External sentences from WikiText containing PETs were assigned labels based on how similar the new sentence's vector was to labeled examples in the training set.
- EuphAug-S (Sense-based): A manually curated "sense inventory" was used to create synthetic training examples by searching for literal and euphemistic synonyms and swapping them back to the original PET.
Modeling Innovations: PET Embeddings and kNN
EUREKA moves away from whole-sentence [CLS] representations. Instead, the model performs classification using PET Embeddings—the sum of the embeddings of the specific tokens making up the PET. This forces the model to focus specifically on the term in question.
Furthermore, the system incorporates a k-Nearest Neighbors (kNN) store. For any new sentence, the model retrieves the five most similar sentences in the training set and uses their labels to "nudge" the final prediction, capturing topical clusters (e.g., politics or social issues) where euphemisms frequently occur.
The final EUREKA system is a majority-vote ensemble of three RoBERTa-large models utilizing different combinations of these features.
Key Results
EUREKA achieved first place in the Euphemism Detection Shared Task at the EMNLP 2022 FigLang Workshop with a macro F1 score of 0.881, significantly outperforming the baseline RoBERTa-large score of 0.839.
Ablation studies highlighted the impact of the individual components:
- PET Embeddings alone improved the F1 score to 0.853.
- Data Quality: Identifying just 25 mislabeled rows and adding targeted synthetic data provided a major performance boost, proving that data innovations can be more significant than architectural complexity.
Conclusion
EUREKA demonstrates that focusing on specific term embeddings rather than broad sentence context is vital for figurative language tasks. By combining rigorous data curation with retrieval-based modeling, the system achieves state-of-the-art robustness. Future work will explore zero-shot euphemism detection and expanding the methodology to languages beyond English.
Summary updated