TL;DR
This paper introduces TOXICCHAT, a novel benchmark dataset for toxicity detection in real-world user-AI conversations, highlighting the significant domain gap between social media toxicity and chatbot interactions. Their findings reveal that existing toxicity detection models struggle with this new domain, particularly with "jailbreaking" prompts designed to circumvent safety measures.
What Problem Does This Paper Address?
Conversational AI, powered by large language models (LLMs) like ChatGPT, has seen rapid advancement. However, ensuring these AI systems remain non-toxic and safe for users is a critical challenge. Existing toxicity detection research has largely focused on data from social media or LLM-generated content. This paper argues that user-AI conversations present unique challenges due to their interactive nature, where users might pose questions or give instructions that, while seemingly innocuous, can be subtly toxic or designed to elicit harmful responses. This domain difference means that models trained on social media data often fail to generalize effectively to user-AI interactions, leaving a gap in our ability to build truly safe conversational AI.
Methods
The authors introduce TOXICCHAT, a new dataset comprising 10,166 real user queries from an open-source chatbot (Vicuna). To construct this dataset efficiently, they employed a human-AI collaborative annotation scheme. This involved using moderation APIs (OpenAI Moderation and Perspective API) to filter out clearly non-toxic content, thereby reducing the annotation workload by approximately 60% while maintaining label reliability. They also identified and specifically labeled a new category of toxic prompts called "jailbreaking" queries, where users deliberately try to trick chatbots into generating toxic content through clever phrasing.
Datasets
- TOXICCHAT: A newly introduced benchmark dataset of 10,166 real-world user-AI conversations, annotated for toxicity. This dataset is distinct from social media datasets due to the nature of user-AI interactions.
- Existing Datasets: The paper also uses several existing toxicity datasets for comparison and model training, including HSTA, MovieReview, Jigsaw, Toxigen, RealToxicPrompts, and ConvAbuse.
Key Insights and Ideas
- Domain Shift is Real: Toxicity in user-AI conversations is fundamentally different from social media toxicity. Models trained on social media data perform poorly on user-AI interaction data.
- "Jailbreaking" is a Critical Challenge: Users are actively developing sophisticated "jailbreaking" prompts to bypass AI safety filters. Detecting these prompts is a significant hurdle for current models.
- Human-AI Collaboration for Annotation: Leveraging moderation APIs can significantly reduce annotation costs while maintaining high-quality labels, making large-scale dataset creation more feasible.
- Model Output is Not Always Helpful: Surprisingly, using the chatbot's response as a feature for toxicity detection did not significantly improve performance and sometimes even decreased it.
Key Results
- Existing toxicity detection models and APIs (OpenAI Moderation, Perspective API, HateBERT, ToxDectRoberta) showed significantly lower performance on the TOXICCHAT benchmark compared to their performance on social media datasets. For instance, Table 2 shows that a model trained on TOXICCHAT achieved a much higher F1 score (72.1) on the TOXICCHAT test set than models trained on other domains.
- The jailbreaking recall (JR) was notably lower for models trained on out-of-domain datasets, indicating their difficulty in identifying these specific types of toxic prompts.
- The authors' human-AI collaborative annotation process successfully reduced annotation workload by ~60% while maintaining label accuracy.
Limitations and Future Work
- Data Source Limitation: The TOXICCHAT dataset is derived from a single open-source chatbot (Vicuna) and primarily consists of English conversations. The authors acknowledge that data from higher-traffic sites like ChatGPT or Bard might better reflect diverse user demographics and languages, but this data is proprietary.
- Annotation Scale: While the human-AI approach was efficient, the authors note that a larger scale of purely human annotation could potentially yield even higher quality.
- Model Performance Goal: The paper's primary goal was to highlight domain differences and challenges, not to achieve state-of-the-art performance on toxicity detection.
- Future Work: The authors suggest that TOXICCHAT can serve as a valuable resource for developing more robust and nuanced toxicity detection models for user-AI conversations. Future research should focus on addressing the unique challenges of this domain, including the detection of "jailbreaking" prompts and ethical considerations in data acquisition for non-open-source LLMs.
Summary updated