Muted: Multilingual Targeted Offensive Speech Identification and Visualization

Christoph Tillmann, Aashka Trivedi, Sara Rosenthal, Santosh Borse, Rong Zhang, Avirup Sil, Bishwaranjan Bhattacharjee

Introduction

Detecting offensive language online has traditionally been a binary classification task: a model flags a sentence as "toxic" or "not toxic." However, this approach provides little insight into why a sentence was flagged or who the intended target was. At the 2023 Conference on Empirical Methods in Natural Language Processing (EMNLP), researchers introduced MUTED (MUltilingual Targeted Demonstration), a system designed to provide granular, interpretable insights into offensive speech. By identifying specific toxic spans and their targets across multiple languages, MUTED moves beyond "black box" classification toward a more transparent moderation framework.

The Challenge of Granularity in HAP Detection

Most Hate, Abuse, and Profanity (HAP) detection systems lack the detail required for effective real-world moderation. To understand the nature of harm, it is necessary to distinguish between the Target (the entity being attacked) and the Argument (the offensive content itself). While "toxic span" detection has gained traction, existing tools are predominantly English-centric. MUTED addresses this gap by providing a multilingual toolset capable of pinpointing these elements, which is essential for providing context-aware warnings to users and helping developers debug model biases.

Methodology: Leveraging Attention and Parsing

The MUTED system adopts an "out-of-the-box" approach to span identification, avoiding the need for expensive, span-level fine-tuning.

1. Attention-Based Span Detection

The core of the system is Piccolo-HAP, a 4-layer XLM-Roberta model trained on HAP detection across six languages. Rather than training a new architecture, the researchers utilized the internal mechanics of the transformer. By extracting attention weights from the final layer—specifically focusing on how the "CLS" token attends to other tokens—the system creates a natural heatmap of "offensiveness." Since transformers operate on sub-word tokens, the system aggregates these into word-level scores by selecting the maximum attention score of any constituent token.

2. Linguistic Parsing with spaCy

To differentiate between the Target and the Argument, MUTED integrates the spaCy library’s dependency parser. By analyzing linguistic structures such as subject (subj) and object (obj) labels in relation to the high-attention words, the system programmatically identifies the "who" and the "what" of the offensive statement. This combination of deep learning attention and traditional linguistic parsing allows for interpretable labels without specialized training data for every possible target.

Datasets and Benchmarking

The researchers evaluated MUTED using several key benchmarks:

  • TBO (Target Based Offensive Language): English Twitter data containing token-level annotations for targets and arguments.
  • TSD (Toxic Spans Detection): A Sem-Eval 2021 dataset focused on marking spans that contribute to a sentence's offensive score.
  • German TBO: Recognizing the lack of non-English resources, the authors introduced a new evaluation set by annotating 255 German tweets from the GermEval corpus.

Key Results and Performance

MUTED demonstrates that sentence-level classifiers can be repurposed for high-accuracy span detection.

  • State-of-the-Art Accuracy: Piccolo-HAP achieved an F1 score of 0.51 on the TSD task. This significantly outperformed larger, specialized models such as HateBERT (0.15–0.23) and the Multilingual Toxicity Classifier Plus (0.29).
  • Cross-Lingual Efficacy: On the new German TBO dataset, the system reached an F1 of 0.44 for identifying the Target + Argument pair, surpassing existing open-source German and multilingual baselines.
  • Operational Efficiency: The system is optimized for real-time use. The entire pipeline—including prediction, attention mapping, and visualization—processes roughly 100 examples per minute, with a latency of approximately 0.65 seconds per input on a single GPU.

Insights and Limitations

A significant finding of the study is that attention mechanisms naturally "focus" on toxic words to make classification decisions, effectively providing a "free" span detector. However, the researchers noted that identifying the Target in isolation remains a challenge. Targets are often neutral words (e.g., "people") that only acquire an offensive character through their proximity to an Argument. Consequently, the model performs better at identifying the "Argument" or the "Target + Argument" pair than the "Target" alone.

The system also faces hurdles common in social media analysis:

  • Informal Language: Typos and slang (e.g., "yal") can occasionally confuse the parser.
  • Parser Disparity: The spaCy dependency parser for German was found to be less descriptive than its English counterpart, limiting target identification in non-English contexts.
  • Implicit Targets: In cases where an offense is general or lacks a specific mentioned target, the model may attempt to force a target label, leading to false positives.

Conclusion

MUTED represents a significant advancement in multilingual NLP, providing a scalable and efficient method for interpreting offensive speech. By moving beyond simple binary labels, it offers a path toward more accountable AI moderation that can explain its reasoning across diverse languages and contexts.

Summary updated

BibTeX
@inproceedings{tillmann2023muted,
  author = {Christoph Tillmann and Aashka Trivedi and Sara Rosenthal and Santosh Borse and Rong Zhang and Avirup Sil and Bishwaranjan Bhattacharjee},
  title = {{Muted: Multilingual Targeted Offensive Speech Identification and Visualization}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.emnlp-demo.19},
}
Figure