Self-Supervised Euphemism Detection and Identification for Content Moderation

Wanzheng Zhu, Hongyu Gong, Rohan Bansal, Zachary Weinberg, Nicolas Christin, Giulia Fanti, Suma Bhat

Abstract

Content moderation faces a constant challenge from the "euphemism treadmill," where users adopt innocuous language to bypass keyword filters. This paper introduces an unsupervised, self-supervised framework that leverages context-aware Masked Language Models (MLMs) like BERT to detect new euphemisms and identify their intended meanings. By filtering uninformative contexts and using a coarse-to-fine classification approach, the proposed pipeline achieves significantly higher accuracy than previous state-of-the-art methods without requiring manually labeled datasets.

Introduction

Content moderation is an ongoing arms race. Platforms typically rely on "ban-lists" of forbidden keywords, but fringe groups quickly adapt by using ordinary-sounding words—euphemisms—to conceal illicit discussions. For example, "ice" might refer to frozen water in a weather forum but "methamphetamine" in an underground marketplace.

Existing automated tools struggle with this because of inherent ambiguity, the rapid evolution of slang, and the necessity of deep contextual understanding. Human moderators can often tell a word is being used "weirdly" but might not know the specific secret meaning. The authors aim to automate the detection of these "hidden" words and decode their intended meanings using raw, unannotated forum data.

Methodology

The authors propose a two-stage pipeline: Euphemism Detection and Euphemism Identification.

Overview of the two-stage pipeline for euphemism detection and identification.

1. Euphemism Detection

This stage identifies candidate words that might be euphemisms for a set of target keywords (e.g., drug names).

  • MLM Probing: A pre-trained BERT model is fine-tuned on domain-specific text (like Reddit drug forums). The system masks known target keywords in sentences and asks the model to predict the missing word.
  • Denoising (The "Secret Sauce"): Not all sentences are informative. A sentence like "I want to buy [MASK]" is too generic. The authors developed a self-supervised filtering algorithm that discards "uninformative" contexts where the model's top predictions are generic words (like "it" or "him") rather than category-specific terms.
  • Candidate Generation: Words that frequently appear as high-probability replacements for masked target keywords across many informative sentences are flagged as candidate euphemisms.
The Euphemism Detection workflow, highlighting the extraction and filtering of masked sentences.

2. Euphemism Identification

Once a candidate (e.g., "weed") is found, this stage determines which specific keyword it refers to using a Coarse-to-Fine Classification approach. A binary Coarse Classifier first filters out sentences where the word is used in its innocuous sense. Then, a multi-class Fine-Grained Classifier maps the euphemistic usage to the most likely target keyword based on the surrounding context.

Datasets and Evaluation

The study evaluated the models across three sensitive domains using large-scale forum data:

  • Drugs: ~1.27 million posts from 46 subreddits, with ground truth established via the DEA’s official slang list.
  • Weapons: ~310,000 posts from Gab and other forums, using the Online Slang Dictionary and Slangpedia for ground truth.
  • Sexuality: ~2.89 million posts from Gab, with ground truth from the Online Slang Dictionary.

Key Results and Insights

  • Performance Gains: The proposed method achieved 30–400% higher accuracy than baselines like Word2vec and CantReader. Top-20 detection accuracies reached 40–45% on difficult, real-world datasets.
  • The Power of Filtering: Ablation studies confirmed that the denoising step—filtering out generic sentences—was critical for the performance boost.
  • Discovery of "Unknown Unknowns": Qualitative analysis showed the model found valid euphemisms (like "mushrooms" or "md") that were not present in the DEA's ground truth list, proving its utility for real-world discovery.
  • Context-Awareness: Unlike previous work using context-free embeddings, this approach recognizes that a word's "euphemism-ness" is a property of the sentence, not just the word itself.

Limitations and Future Work

While effective for drugs and weapons, the model struggled with racial slurs, which are often used interchangeably or imprecisely. Additionally, the current model is text-only and does not account for images or video. Future work will explore multi-modal detection and human-in-the-loop integration to assist professional moderators in real-world dashboards.

Summary updated

BibTeX
@inproceedings{zhu2021self,
  author = {Wanzheng Zhu and Hongyu Gong and Rohan Bansal and Zachary Weinberg and Nicolas Christin and Giulia Fanti and Suma Bhat},
  title = {{Self-Supervised Euphemism Detection and Identification for Content Moderation}},
  booktitle = {IEEE Symposium on Security and Privacy},
  year = {2021},
  url = {https://openreview.net/forum?id=igpfwizTQR-},
}
Figure