ToVo: Toxicity Taxonomy via Voting

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

TL;DR

ToVo introduces a novel, open-source framework for toxicity detection that leverages a multi-LLM voting mechanism and Chain-of-Thought (CoT) reasoning to generate high-quality, explainable datasets. By training on this "taxonomy via voting" approach, the authors developed models that rival closed-source industry standards like OpenAI’s Moderation API while remaining highly adaptable to custom, user-defined metrics.

What Problem Does This Paper Address?

Content moderation is a cornerstone of safe AI deployment, yet the field is currently dominated by "black box" solutions. Leading tools like Llama Guard and OpenAI Moderation (OAIM) are often closed-source, meaning researchers cannot inspect their training data, reproduce their results, or—most importantly—fine-tune them for specific community standards.

Furthermore, these models typically provide a binary "safe/unsafe" label without explaining why a piece of content was flagged. This lack of interpretability makes it difficult for developers to troubleshoot false positives or adapt the models to nuanced, evolving forms of toxicity. The authors of ToVo aim to bridge this gap by providing a transparent, reproducible, and explainable alternative.

Methods

The core innovation of ToVo is its dataset creation mechanism. Rather than relying on expensive human labeling or a single (potentially biased) model, the authors used a "wisdom of the crowd" approach among open-source LLMs.

  1. Voting Ensemble: They selected six diverse open-source LLMs (including Mixtral, DeepSeek, and Yi) to act as a panel of judges.
  2. Taxonomy Mapping: For every sample, three models were randomly chosen to vote on whether the text violated specific metrics from a pool of 42 predefined toxicity categories.
  3. Chain-of-Thought (CoT) Rationale: To ensure interpretability, the models were prompted to provide a reasoning process for their classification. The final dataset uses the rationale from the model that most closely aligned with the majority consensus.
  4. Model Training: The authors fine-tuned a Mistral-Hermes-2-Pro model using LoRA (Low-Rank Adaptation). They created two versions: a standard classifier and a "reasoning" model that outputs both a label and an explanation.

Datasets

The researchers utilized several key resources to build and test ToVo:

  • Training Data: 10,000 prompt-response pairs sampled from the chat-lmsys-1M dataset. They used HateBERT for preliminary filtering to ensure the training set contained a high density of potentially toxic content.
  • Toxicity Metrics: A comprehensive pool of 42 metrics derived from Llama Guard 2, OAIM, Perspective API, and BeaverTails.
  • Out-of-Domain (OOD) Test Set: To test generalization, they created a set of 1,741 samples across 10 non-toxicity metrics, such as "Financial Literacy" and "Cooking and Recipes." The definitions for these OOD metrics are detailed in the paper's appendix: Descriptions of the Out-of-Domain metrics used to test model generalization
Descriptions of the Out-of-Domain metrics used to test model generalization

Key Insights and Ideas

  • Reasoning as a Performance Booster: One of the most significant findings was that training the model to provide reasoning (CoT) didn't just make it more interpretable—it made it more accurate. This was especially evident in the Out-of-Domain tasks, where the reasoning model significantly outperformed its non-reasoning counterpart.
  • Consensus Validates Synthetic Labels: The high level of agreement (consensus) between the ToVo voting ensemble and established APIs suggests that a committee of open-source LLMs can effectively serve as a "gold standard" for labeling, reducing the need for manual human annotation.
  • Zero-Shot Adaptability: Because the model was trained on a diverse taxonomy of 42 metrics, it developed a generalized understanding of "classification by definition." This allows it to handle entirely new, user-defined metrics with high reliability.

Key Results

The ToVo models demonstrated strong alignment with industry leaders. As shown in Table 1, the voting outcomes achieved high consensus rates with Llama Guard 2 (86.576%) and OpenAI Moderation (90.045%).

Table 1: Consensus rates between ToVo voting outcomes and established moderation tools

In the Out-of-Domain evaluation, the reasoning model (Consensus-R) achieved an overall agreement rate of 92.536%, compared to 84.689% for the non-reasoning version. This highlights the value of including explanatory rationales during training to help the model handle novel categories.

Limitations and Future Work

Despite its successes, the authors acknowledge several hurdles:

  • Inference Latency: Using 7B parameter models and requiring Chain-of-Thought reasoning results in slower processing speeds compared to simpler, non-explanatory classifiers.
  • Binary Constraints: The current taxonomy only supports binary (0 or 1) classification. The authors note that this may fail to capture the "degree" of unsafety, which is often a spectrum.
  • Data Generation Costs: While automated, generating large-scale CoT data is still time-consuming and computationally expensive.

Future work will focus on expanding the framework to human-human interactions (like online forums), refining the taxonomy to support multi-class/nuanced moderation, and optimizing models for faster inference.

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