TL;DR
This paper introduces a novel neural transformer framework, MUDES, for detecting specific "toxic spans" within online text, moving beyond simply flagging entire posts. Their approach achieved competitive results in the SemEval-2021 Task 5 competition, demonstrating the effectiveness of transformers for this fine-grained task.
What Problem Does This Paper Address?
The proliferation of toxic and offensive content on social media poses a significant challenge for platforms and users alike. While many systems have been developed to detect entire posts containing such content, there's a critical gap in identifying the specific words or phrases that make a post offensive. This fine-grained identification is crucial for more nuanced content moderation, better understanding the nature of toxicity, and providing more interpretable results. SemEval-2021 Task 5 specifically aimed to address this by focusing on "toxic spans detection," providing a dataset annotated at the word level.
Methods
The WLV-RIT team explored several approaches, starting with a simple lexicon-based word-matching algorithm as a baseline. They then moved to more sophisticated neural network models, including Bidirectional Long Short-Term Memory (Bi-LSTM) networks combined with Conditional Random Fields (CRF). The core of their contribution lies in their use of neural transformers, specifically fine-tuning pre-trained models like BERT. They experimented with various transformer architectures and explored adding a CRF layer on top of BERT, though this did not yield significant improvements. Based on their successful transformer-based approach, they developed MUDES (Multilingual Detection of Offensive Spans), an open-source framework that supports multiple transformer types, language modeling, and model ensembling.
Datasets
The primary dataset used for this work is from the SemEval-2021 Task 5: Toxic Spans Detection competition. This dataset is derived from the Civil Comments Dataset and is annotated with specific "toxic spans" (word-level annotations) indicating offensive content. The paper also mentions the HateXplain dataset as another source of word-level annotations for offensive language.
Key Insights and Ideas
- Fine-grained detection is crucial: Simply flagging an entire post as toxic is insufficient. Identifying the specific offensive spans provides much richer information for moderation and analysis.
- Transformers excel at span detection: Pre-trained transformer models, particularly BERT and its variants like RoBERTa, demonstrate strong performance in identifying these fine-grained toxic spans.
- MUDES framework offers flexibility: The developed MUDES framework is valuable because it supports various transformer architectures, incorporates language modeling, and allows for model ensembling, leading to improved performance.
- CRF layer may not always be necessary: While CRFs are common in sequence labeling, the authors found that simply fine-tuning a transformer with a token-level classifier was sufficient and adding a CRF layer did not significantly improve results for this specific task.
Key Results
The WLV-RIT team's best performing model, MUDES RoBERTa, achieved an 0.68 F1-score on the test set for SemEval-2021 Task 5. This result is competitive with the best-performing models in the competition. Their transformer-based models generally outperformed simpler methods like lexicon-based matching and Bi-LSTM-CRF models. The MUDES framework, with its additional features like language modeling and ensembling, showed improvements over a vanilla BERT transformer.
Limitations and Future Work
The authors acknowledge that while their transformer models achieved good results, they are computationally intensive. They also note that the transfer learning approach using the HateXplain dataset did not yield further improvements in their experiments.
For future work, they propose exploring multi-task learning architectures that can simultaneously predict toxic spans at both the word and post levels. They also aim to evaluate these architectures on multi-domain and multilingual settings and investigate other recurrent network models. The MUDES framework is made available as an open-source project with pre-trained models and a prototype user interface.
Summary updated