Skip to main content
QUICK REVIEW

[Paper Review] Empirical Analysis of Multi-Task Learning for Reducing Model Bias in Toxic Comment Detection

Ameya Vaidya, Feng Mai|arXiv (Cornell University)|Sep 21, 2019
Hate Speech and Cyberbullying DetectionComputer Science39 references16 citations
TL;DR

This paper proposes an attention-based multi-task learning model that jointly predicts comment toxicity and identity mentions to reduce false positives for marginalized identities (e.g., gay, black, muslim). By sharing representations between tasks and using a custom weighted loss, the model reduces unintended bias—achieving 10% lower average toxicity scores on non-toxic identity-referencing comments compared to baseline models, including Google’s Perspective API.

ABSTRACT

With the recent rise of toxicity in online conversations on social media platforms, using modern machine learning algorithms for toxic comment detection has become a central focus of many online applications. Researchers and companies have developed a variety of models to identify toxicity in online conversations, reviews, or comments with mixed successes. However, many existing approaches have learned to incorrectly associate non-toxic comments that have certain trigger-words (e.g. gay, lesbian, black, muslim) as a potential source of toxicity. In this paper, we evaluate several state-of-the-art models with the specific focus of reducing model bias towards these commonly-attacked identity groups. We propose a multi-task learning model with an attention layer that jointly learns to predict the toxicity of a comment as well as the identities present in the comments in order to reduce this bias. We then compare our model to an array of shallow and deep-learning models using metrics designed especially to test for unintended model bias within these identity groups.

Motivation & Objective

  • Address the unintended model bias in toxic comment detection that disproportionately flags non-toxic comments referencing marginalized identities (e.g., gay, black, muslim) as toxic.
  • Investigate whether joint learning of toxicity and identity detection can reduce false positive rates for these identity groups.
  • Evaluate the proposed model against state-of-the-art shallow and deep learning models using metrics specifically designed to detect implicit bias.
  • Demonstrate that multi-task learning with attention and a weighted loss function improves fairness without sacrificing toxicity detection performance.
  • Provide empirical evidence that current models, including Perspective API, exhibit measurable bias toward certain identity groups, even when not explicitly trained to do so.

Proposed method

  • Design a multi-task learning framework that simultaneously predicts comment toxicity and identifies the presence of specific identity terms (e.g., gay, muslim) within the same input.
  • Integrate an attention mechanism to capture long-range dependencies and contextual relationships between words, improving discrimination between toxic and non-toxic comments.
  • Use a custom-weighted loss function that increases penalization for false positive predictions on non-toxic identity-referencing comments, thereby encouraging the model to minimize such errors.
  • Train the model on a large-scale dataset of 1,804,874 comments from the Jigsaw Unintended Bias in Toxicity Classification challenge.
  • Fine-tune the model using transfer learning principles, leveraging shared representations between the toxicity and identity prediction heads.
  • Compare model performance using identity-specific evaluation metrics, including average toxicity scores on non-toxic and toxic comment templates.

Experimental results

Research questions

  • RQ1Can joint learning of toxicity and identity detection reduce false positive rates for non-toxic comments that reference marginalized identities?
  • RQ2How does the proposed multi-task learning model with attention compare to baseline models (e.g., CNN, LSTM, logistic regression) in terms of fairness and bias mitigation?
  • RQ3To what extent does Google’s Perspective API exhibit unintended bias toward specific identity groups, even when not explicitly trained to do so?
  • RQ4Can a custom-weighted loss function effectively reduce false positives on identity-referencing non-toxic comments without degrading overall toxicity detection performance?
  • RQ5How robust is the proposed model across different identity groups, particularly those historically prone to high false positive rates?

Key findings

  • The proposed multi-task learning model reduced average toxicity scores on non-toxic comments referencing marginalized identities by 10% compared to baseline models, including Google’s Perspective API.
  • For non-toxic identity-referencing comments, the model never predicted a toxicity score above 0.40, indicating strong mitigation of false positives.
  • For toxic comments, the model consistently predicted scores above 0.80, showing it maintains high sensitivity to actual toxicity.
  • The model outperformed both shallow and deep learning baselines in reducing unintended bias, especially for identities such as gay, black, muslim, and jewish.
  • Google’s Perspective API showed higher-than-expected toxicity scores for comments referencing 'gay', 'lesbian', and 'bisexual', indicating measurable bias toward these identities.
  • The attention mechanism enabled better contextual understanding, allowing the model to distinguish between benign identity references and actual toxic content more effectively.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.