[Paper Review] Kungfupanda at SemEval-2020 Task 12: BERT-Based Multi-Task Learning for Offensive Language Detection
This paper presents a BERT-based multi-task learning model for offensive language detection in social media, jointly training on three hierarchical sub-tasks: offensive language detection (A), categorization (B), and target identification (C). The approach achieves a macro-F1 score of 91.51% on SemEval-2020 Task 12 Sub-task A using only the OLID dataset, ranking 7th among 85 submissions, demonstrating that multi-task learning with shared BERT representations improves performance over single-task fine-tuning.
Nowadays, offensive content in social media has become a serious problem, and automatically detecting offensive language is an essential task. In this paper, we build an offensive language detection system, which combines multi-task learning with BERT-based models. Using a pre-trained language model such as BERT, we can effectively learn the representations for noisy text in social media. Besides, to boost the performance of offensive language detection, we leverage the supervision signals from other related tasks. In the OffensEval-2020 competition, our model achieves 91.51% F1 score in English Sub-task A, which is comparable to the first place (92.23%F1). An empirical analysis is provided to explain the effectiveness of our approaches.
Motivation & Objective
- To improve offensive language detection in social media by leveraging multi-task learning with related sub-tasks.
- To investigate whether shared representations from BERT and joint optimization across sub-tasks enhance detection performance.
- To evaluate the effectiveness of pre-training on large-scale noisy data (SOLID) versus fine-tuning on smaller, high-quality datasets (OLID).
- To determine whether supervision from related tasks (e.g., target identification) improves the primary task of offensive language detection.
- To analyze the impact of different loss weighting and model ensemble strategies on macro-F1 performance.
Proposed method
- Fine-tune a pre-trained BERT model on the OLID dataset for three hierarchical sub-tasks: offensive classification (A), categorization (B), and target identification (C).
- Implement multi-task learning by sharing the BERT encoder across all three sub-tasks and using separate classification heads for each.
- Optimize the model using a weighted combination of cross-entropy losses for sub-tasks A, B, and C, with loss weights of 0.4, 0.3, and 0.3 respectively.
- Apply early stopping and learning rate scheduling (initial 3e-6, batch size 32) over up to 20 epochs to prevent overfitting.
- Use majority voting across five independently initialized MTL models to improve generalization and robustness.
- Convert SOLID’s AVG_CONF scores to binary labels using a threshold of 0.3, derived via cross-validation on OLID.
Experimental results
Research questions
- RQ1Can joint learning across offensive language detection, categorization, and target identification improve performance on the primary detection task?
- RQ2Does pre-training on large-scale noisy data (SOLID) with regression loss on confidence scores improve downstream performance on OLID?
- RQ3How does multi-task learning with shared BERT representations compare to single-task fine-tuning in terms of macro-F1 score?
- RQ4What is the impact of model ensemble and hyperparameter tuning on detection performance?
- RQ5Why does pre-training on SOLID not improve performance despite its large scale?
Key findings
- The multi-task learning model achieved a macro-F1 score of 91.51% on the official test set of SemEval-2020 Task 12 Sub-task A, ranking 7th out of 85 submissions.
- The ensemble of five MTL models with different random initializations yielded the best performance, indicating improved generalization through diversity.
- Pre-training on SOLID using mean squared error loss on confidence scores did not improve performance and even slightly degraded results, likely due to data noise.
- The BERT-based multi-task model outperformed single-task BERT fine-tuning on OLID, with a 1.38% absolute improvement in macro-F1 (from 82.03% to 83.41%).
- The model's performance on SOLID was consistent with OLID, indicating robustness across datasets despite differing data quality.
- The results confirm that internal task relationships (e.g., if B is NULL, then A must be NOT) are effectively captured by multi-task learning, enhancing prediction certainty.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.