ToVo: Toxicity Taxonomy via Voting

Tinh Son Luong, Thanh-Thien Le, Thang Viet Doan, Linh Ngo Van, Thien Huu Nguyen, Diep Thi-Ngoc Nguyen · DOI

TL;DR

This paper introduces ToVo, a novel dataset creation method for toxic content detection that uses a voting mechanism and chain-of-thought prompting to generate high-quality, explainable, and open-source data. They then use this dataset to train models that demonstrate improved transparency, customizability, and adaptability compared to existing closed-source solutions.

What Problem Does This Paper Address?

The field of toxic content detection, crucial for safe human-AI interactions, is hampered by several limitations in existing models. These models often rely on closed-source training data and lack transparency, making it difficult to understand their decision-making processes. This opacity hinders customization for specific use cases or community standards and impedes reproducibility and further research. Users cannot easily fine-tune these models or understand why a piece of content is flagged, leading to potential misunderstandings and control issues.

Methods

The core innovation lies in the Toxicity Taxonomy Voting (ToVo) dataset creation mechanism. This process involves:

  1. Dataset Sourcing: Starting with a large dataset of LLM conversations, they filter for potentially toxic responses using a preliminary model (HateBERT).
  2. Metric Selection: For each selected sample, they randomly choose 1 to 6 toxicity metrics from a pool of 42 derived from existing tools like Llama Guard 2, OAIM, and Perspective API.
  3. Voting Procedure: Three open-source LLMs are tasked with classifying the sample against the selected metrics.
  4. Chain-of-Thought (CoT) Prompting: To ensure explainability, the LLMs are prompted to provide not just a classification score but also a rationale for their decision. This CoT approach helps in understanding the nuances of toxicity.
  5. Gold Label Generation: The final "gold label" for a sample is determined by the consensus of the voting LLMs, with the rationale coming from the model that showed the highest agreement with the majority.

The authors then use this ToVo dataset to train two baseline models: one that outputs reasoning and one that does not. These models are fine-tuned using LoRA.

Datasets

  • Training Data: Prompts are extracted from the chat-lmsys-1M dataset, filtered for toxicity. Responses are generated by open-source models like Mistral-Instruct and Zephyr.
  • Evaluation Data:
    • ToVo Dataset: The newly created dataset, featuring diverse classification metrics and CoT rationales.
  • Existing Benchmarks: The paper also evaluates their models against existing toxicity metrics from Llama Guard 2, OAIM, and Perspective API.
  • Out-of-Domain (OOD) Test Set: A custom test set with 10 metrics unrelated to toxicity is created to assess model generalization.
  • BeaverTails-30K: Used for further evaluation and comparison with other models.

Key Insights and Ideas

  • The Power of Voting and CoT for Explainability: Combining a voting mechanism with Chain-of-Thought prompting is a robust way to generate high-quality, explainable toxicity labels, addressing the "black box" problem of many existing models.
  • Open-Source is Key for Customization: The ToVo dataset, being open-source, directly tackles the limitations of closed-source models, enabling users to tailor toxicity detection to their specific needs and community standards.
  • Reasoning Enhances Robustness: Models trained with reasoning capabilities show significantly better performance, especially on out-of-domain or novel metrics, highlighting the importance of interpretability for adaptability.
  • Metric Granularity Matters: The paper suggests that simply relying on metric descriptions can be insufficient; understanding the degree of unsafety and having more nuanced metric definitions are crucial for accurate classification.

Key Results

  • The ToVo dataset creation mechanism successfully generates a high-quality, open-source dataset with diverse metrics and explanatory rationales.
  • The trained ToVo models show high consensus rates with existing moderation tools (Llama Guard 2, OAIM, Perspective API), indicating good alignment. OAIM showed the highest overall consensus with the ToVo dataset.
  • The reasoning model demonstrated exceptional performance on the Out-of-Domain test set, achieving an overall consensus rate of 92.536% compared to 84.689% for the non-reasoning model. This highlights the adaptability of the reasoning approach.
  • For the BeaverTails-30K test set, the reasoning model achieved an Unsafe F1 score of 0.4164 with custom BeaverTails metrics, showing competitive performance.

Limitations and Future Work

  • Data Generation Time: Generating large amounts of data using the voting process is still time-consuming and labor-intensive.
  • Inference Speed: LLMs, especially with reasoning, can have slow inference speeds due to their size and the complexity of generating explanations.
  • Binary Classification: The current taxonomy primarily supports binary classification, which may not always capture the full spectrum of toxicity nuances.
  • Future Work: The authors plan to extend their research to human-human interactions, web content, and online forums. They also aim to refine the taxonomy for more nuanced classifications and improve the robustness and versatility of their models for diverse contexts.

Summary updated

BibTeX
@misc{luong2024tovo,
  author = {Tinh Son Luong and Thanh-Thien Le and Thang Viet Doan and Linh Ngo Van and Thien Huu Nguyen and Diep Thi-Ngoc Nguyen},
  title = {{ToVo: Toxicity Taxonomy via Voting}},
  year = {2024},
  eprint = {2406.14835},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.14835},
}
Figure