Accurate and Data-Efficient Toxicity Prediction when Annotators Disagree

Harbani Jaggi, Kashyap Coimbatore Murali, Eve Fleisig, Erdem Biyik

Abstract

Standard natural language processing (NLP) approaches to toxicity detection often rely on majority voting to resolve disagreements among human annotators. However, this process discards the nuanced, subjective perspectives that drive these disagreements. Researchers from UC Berkeley and USC present a method for predicting individual annotator ratings by integrating annotator history, demographics, and survey data. Using an embedding-based architecture, the study demonstrates that individual perspectives are predictable features rather than random noise, achieving significant improvements in prediction accuracy over text-only baselines.

Introduction

In subjective NLP tasks like hate speech detection or sentiment analysis, there is rarely a single "ground truth." What one individual perceives as offensive, another may find acceptable. The current industry standard—majority voting—treats the variance in human judgment as noise to be filtered out. This paper argues that this "noise" contains valuable information about the diverse backgrounds and perspectives of annotators. The authors tackle the challenge of individual annotator rating prediction: building models that understand who is reading the text to predict their specific reaction. This is a critical step toward creating AI sensitive to cultural contexts and building more nuanced moderation tools.

Methodology

The researchers compared three distinct architectural approaches to incorporate annotator-specific information:

  1. Embedding-Based Architecture: This hybrid approach concatenates the text to be rated with strings representing the annotator's metadata (history, demographics, and survey responses). These strings are processed by OpenAI’s text-embedding-3 models to generate high-dimensional vectors, which then serve as input for a multi-layer regression model.
  2. Neural Collaborative Filtering (NCF): Inspired by recommendation systems, this model uses a RoBERTa-based architecture where annotator IDs are mapped to embeddings. These are concatenated with text embeddings and passed through dense layers to predict a rating.
  3. In-Context Learning (ICL): Using Large Language Models (LLMs) like Mistral-7B and GPT-3.5, the authors provided the annotator's background and rating history directly in the prompt, asking the model to predict the rating for a new piece of text.
Flowchart of the embedding-based architecture for predicting individual annotator ratings.

A key innovation in the methodology was the use of imputed demographics. Because collecting sensitive demographic data (e.g., race, gender) is often restricted, the team tested whether these traits could be predicted from general survey responses and then used as model features.

Datasets

The study utilized a dataset introduced by Kumar et al. (2021), featuring sentences rated for toxicity on a scale of 0 to 4. Each sentence was labeled by five different annotators. Crucially, the dataset includes rich annotator metadata: demographic information, survey responses regarding social media habits and technology opinions, and historical rating behavior.

Key Results and Insights

The experimental results confirm that personalization significantly outperforms "text-only" baselines. The embedding-based architecture using text-embedding-3-large achieved the highest performance with a Mean Absolute Error (MAE) of 0.61, a substantial improvement over the text-only baseline (MAE ~0.75-0.81).

Mean Absolute Error (MAE) across different models and feature sets, showing the impact of adding metadata.

Major Findings:

  • Surveys as Proxies: Demographic data (race, gender) provided little additional predictive power once survey responses were included. Survey responses appear to capture the underlying worldviews that drive rating behavior more effectively than broad demographic categories.
  • Privacy-Preserving Potential: Models using predicted demographics performed nearly as well as those using true demographics. This suggests it may be possible to build personalized systems without explicitly requiring sensitive personal information.
  • NCF Limitations: While collaborative filtering is effective for product recommendations, it struggled in this context. The authors suggest the relationship between identity and toxicity perception is more complex and non-linear than standard NCF modules can capture.

Discussion and Future Work

While the results are promising, the authors note several limitations. The dataset is limited to English-speaking annotators from the U.S. and Canada, which may not generalize to other cultural contexts. Additionally, the computational cost of embedding-based and ICL approaches is higher than simple classification, posing challenges for real-time deployment.

Ethically, the ability to infer demographics from survey data presents a risk of "proxy" capability being misused to reveal sensitive information without consent. Future research will focus on expanding these methods to other subjective tasks like humor or sarcasm detection and identifying survey questions that predict ratings without inadvertently revealing sensitive demographic traits.

Summary updated

BibTeX
@inproceedings{jaggi2024accurate,
  author = {Harbani Jaggi and Kashyap Coimbatore Murali and Eve Fleisig and Erdem Biyik},
  title = {{Accurate and Data-Efficient Toxicity Prediction when Annotators Disagree}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.1221},
}
Figure