MIPT-NSU-UTMN at SemEval-2021 Task 5: Ensembling Learning with Pre-trained Language Models for Toxic Spans Detection

Mikhail Kotyushev, Anna Glazkova, Dmitry MorozovACL 2021

TL;DR

This paper presents a system for detecting toxic spans in social media text, a crucial task for moderating online discourse. They achieved strong results by ensembling multiple pre-trained BERT models, demonstrating the effectiveness of a two-step knowledge transfer approach and careful span detection post-processing.

What Problem Does This Paper Address?

The proliferation of toxic and abusive language on social media platforms poses a significant challenge for maintaining healthy online communities. While detecting toxic comments is a well-studied problem, identifying the specific spans of text that contribute to toxicity is more nuanced and challenging. This task is vital for providing targeted moderation and understanding the precise nature of harmful content. The SemEval-2021 Task 5 aimed to address this by requiring systems to pinpoint these toxic segments within user-generated text.

Methods

The core of the proposed system relies on pre-trained language models, specifically BERT, adapted for token classification. The authors employed a two-step knowledge transfer strategy:

  1. Pre-training on a Larger Dataset: First, they fine-tuned BERT models on the Jigsaw toxic comment classification dataset. This step aimed to imbue the models with a general understanding of toxic language before tackling the more specific span detection task. They carefully removed data that overlapped with the target task's spans to prevent data leakage.
  2. Fine-tuning for Toxic Span Detection: The models were then further fine-tuned on the SemEval-2021 Task 5 dataset. This step focused on the actual token-level classification of toxic spans.

To enhance performance, they utilized an ensemble of models. Specifically, they trained multiple BERT models (using different folds of the data) and then combined their predictions. The paper mentions exploring "hard voting" (union or intersection of predicted spans) and "soft voting" (weighted sum of probabilities) as ensemble strategies, with the "spans intersection" yielding the best results.

Datasets

  • Jigsaw Toxic Comment Classification Dataset: Used for the initial pre-training/fine-tuning step to build a general understanding of toxic language.
  • SemEval-2021 Task 5 Dataset: The primary dataset for training, validation, and testing the toxic span detection system. This dataset consists of social media comments annotated at the span level, indicating the presence of toxicity. It was split into training (7939 posts), trial (690 posts), and test (2000 posts) subsets.

Key Insights and Ideas

  • Two-Step Knowledge Transfer is Effective: Pre-training on a larger, related dataset (Jigsaw) significantly improved performance on the target toxic span detection task. This highlights the benefit of leveraging broader toxic language understanding before specializing.
  • Ensembling Boosts Performance: Combining predictions from multiple BERT models (specifically, using the intersection of predicted spans) led to better results than individual models. This suggests that different models capture slightly different aspects of toxicity.
  • Token Classification as a Foundation: Framing the problem as a token classification task, rather than directly predicting spans, provided a robust foundation for identifying toxic segments.
  • Challenges with Implicit Toxicity: The model struggled with posts where toxicity was implied or conveyed through sarcasm, especially when no explicit toxic spans were annotated. This points to the difficulty of capturing subtle forms of harmful language.
  • Annotation Credibility Issues: The authors noted instances where the provided annotations themselves seemed questionable, suggesting that even human labeling can be subjective and challenging for complex cases.

Key Results

The paper reports that their system achieved a F1-score of 67.55% on the test data for SemEval-2021 Task 5. This performance placed them among the top-performing teams, exceeding the average result by almost 10%. The ensemble of BERT models, particularly using the "spans intersection" strategy, was key to achieving this score.

Limitations and Future Work

  • Limitations:
    • The model's performance was impacted by posts with implicit toxicity or where toxicity was not explicitly annotated.
  • The subjectivity and potential inaccuracies in human annotations presented a challenge.
  • Future Work:
    • The authors plan to explore various language models, including distilled versions of BERT (like DistilBERT) and RoBERTa, to potentially improve efficiency and performance.

Summary updated

BibTeX
@inproceedings{kotyushev2021mipt,
  author = {Mikhail Kotyushev and Anna Glazkova and Dmitry Morozov},
  title = {{MIPT-NSU-UTMN at SemEval-2021 Task 5: Ensembling Learning with Pre-trained Language Models for Toxic Spans Detection}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2021},
}
Figure