Improving Covert Toxicity Detection by Retrieving and Generating References

Dong-Ho Lee, Hyundong Cho, Woojeong Jin, Jihyung Moon, Sungjoon Park, Paul Röttger, Jay Pujara, Roy Ka-wei Lee2024

Abstract

Models for detecting toxic content play an important role in keeping people safe online. There has been much progress in detecting overt toxicity. Covert toxicity, however, remains a challenge because its detection requires an understanding of implicit meaning and subtle connotations. In this paper, we explore the potential of leveraging references, such as external knowledge and textual interpretations, to enhance the detection of covert toxicity. We run experiments on two covert toxicity datasets with two types of references: 1) information retrieved from a search API, and 2) interpretations generated by large language models. We find that both types of references improve detection, with the latter being more useful than the former. We also find that generating interpretations grounded on properties of covert toxicity, such as humor and irony, lead to the largest improvements.

Introduction

While modern toxicity filters are proficient at identifying "overt" abuse—characterized by slurs and explicit profanity—"covert" toxicity remains a significant challenge. Covert toxicity relies on subtle connotations, cultural context, and linguistic devices like sarcasm, irony, or microaggressions. For instance, a statement about a "fake statue funded by Wall Street" may appear benign to a general classifier but can be a targeted attack within specific political contexts. Detecting such intent requires "world knowledge" or an "interpretive lens" that standard models often lack.

Methodology: The Reference Framework

The authors propose a two-step framework that shifts the model's task from direct classification to a process of gathering or generating references that elucidate the text's deeper meaning.

The proposed framework for covert toxicity detection, comparing direct classification with retrieval-based and generation-based reference methods.

Two types of references were evaluated:

  1. Non-parametric (Retrieval): The system uses the input text as a query for the Google Search API, retrieving the top five results to provide real-world context.
  2. Parametric (Generation): An LLM (GPT-3.5-turbo) is prompted to generate interpretations based on specific properties of covert toxicity, such as:
  3. Implication: "What is the implied meaning here?"
    • Irony/Sarcasm: Identifying and explaining ironic elements.
  4. Black Humor: Detecting the use of dark humor to mask malice.
  5. Rhetorical Questions: Analyzing questions used as a vehicle for attack.

These methods were tested in zero-shot settings and supervised settings (fine-tuning BERT and RoBERTa models on text combined with these references).

Datasets

The study utilized two primary benchmarks for covert hate speech:

  • Latent Hatred: A dataset focused on implicit hate speech where the toxic intent is not immediately obvious from the surface text.
  • Hatemoji: A test suite specifically designed to identify hate speech that is masked or conveyed through emojis.

Key Results and Analysis

The experiments revealed several critical insights into the nature of covert toxicity detection:

  • Interpretations Outperform Retrieval: LLM-generated interpretations (parametric) were consistently more effective than web-retrieved knowledge (non-parametric). This suggests that the primary bottleneck is not a lack of facts, but a lack of reasoning regarding how those facts are weaponized.
  • The Efficacy of Specific Properties: The most significant performance gains occurred when the LLM focused on humor and irony. By explicitly considering whether a statement was a "joke" or "sarcastic," the model became significantly better at identifying underlying malice.
Binary F1 scores on the Latent Hatred dataset across different reference types, highlighting the superior performance of humor and irony-based interpretations.
  • Chain-of-Thought (CoT) Limitations: Interestingly, CoT prompting—asking the model to "think step-by-step"—actually decreased performance in some tasks. This suggests that while CoT is effective for logical or mathematical reasoning, it may struggle with the social nuances and intent inherent in covert toxicity.
  • Performance Gains: In zero-shot settings on the Latent Hatred dataset, reference-based prompting improved the F1 score from 0.593 to 0.615. In supervised settings, adding references to a fine-tuned RoBERTa-large model increased the Binary F1 from 0.733 to 0.742.

Conclusion

Leveraging external references, particularly LLM-generated interpretations of humor and irony, significantly enhances the detection of covert toxicity. While this two-step approach is more computationally intensive, it provides a path toward more nuanced AI safety tools. Future research will focus on distilling this reference-based reasoning into smaller, more efficient models suitable for large-scale social media deployment.

Summary updated

BibTeX
@misc{lee2024improving,
  author = {Dong-Ho Lee and Hyundong Cho and Woojeong Jin and Jihyung Moon and Sungjoon Park and Paul Röttger and Jay Pujara and Roy Ka-wei Lee},
  title = {{Improving Covert Toxicity Detection by Retrieving and Generating References}},
  year = {2024},
  doi = {10.18653/v1/2024.woah-1.21},
}
Figure