Skip to main content
QUICK REVIEW

[Paper Review] Why So Toxic? Measuring and Triggering Toxic Behavior in Open-Domain Chatbots

Wai Man Si, Michael Backes|arXiv (Cornell University)|Sep 7, 2022
Spam and Phishing DetectionComputer Science7 citations
TL;DR

This paper introduces ToxicBuddy, a GPT-2-based attack that generates non-toxic queries to trigger toxic responses in open-domain chatbots. It demonstrates that even benign inputs can provoke harmful outputs, with success rates up to 23.47% in closed-world settings and 10.7% in open-world evaluations, exposing critical vulnerabilities in chatbot safety.

ABSTRACT

Chatbots are used in many applications, e.g., automated agents, smart home assistants, interactive characters in online games, etc. Therefore, it is crucial to ensure they do not behave in undesired manners, providing offensive or toxic responses to users. This is not a trivial task as state-of-the-art chatbot models are trained on large, public datasets openly collected from the Internet. This paper presents a first-of-its-kind, large-scale measurement of toxicity in chatbots. We show that publicly available chatbots are prone to providing toxic responses when fed toxic queries. Even more worryingly, some non-toxic queries can trigger toxic responses too. We then set out to design and experiment with an attack, ToxicBuddy, which relies on fine-tuning GPT-2 to generate non-toxic queries that make chatbots respond in a toxic manner. Our extensive experimental evaluation demonstrates that our attack is effective against public chatbot models and outperforms manually-crafted malicious queries proposed by previous work. We also evaluate three defense mechanisms against ToxicBuddy, showing that they either reduce the attack performance at the cost of affecting the chatbot's utility or are only effective at mitigating a portion of the attack. This highlights the need for more research from the computer security and online safety communities to ensure that chatbot models do not hurt their users. Overall, we are confident that ToxicBuddy can be used as an auditing tool and that our work will pave the way toward designing more effective defenses for chatbot safety.

Motivation & Objective

  • To investigate the extent to which open-domain chatbots produce toxic responses when prompted with toxic or non-toxic queries.
  • To determine whether seemingly benign queries can trigger toxic behavior in state-of-the-art chatbots.
  • To develop and evaluate an automated attack, ToxicBuddy, that generates non-toxic queries to maximize toxic response triggers.
  • To assess the effectiveness of existing defense mechanisms against such adversarial queries.
  • To highlight the urgent need for improved safety evaluation and defense strategies in chatbot deployment.

Proposed method

  • Constructed an auxiliary dataset from non-toxic queries that triggered toxic responses in prior measurements on BlenderBot (small) and TwitterBot.
  • Fine-tuned a GPT-2 model on this auxiliary dataset to generate new non-toxic queries designed to elicit toxic responses.
  • Evaluated the attack in both closed-world (same models as in measurement) and open-world (unseen models) settings.
  • Enhanced attack success by incorporating tri-gram prefixes and clustering techniques on query embeddings to improve trigger likelihood.
  • Used Google’s Perspective API to assess toxicity of both queries and responses, ensuring non-toxicity of inputs.
  • Compared attack performance across multiple public chatbot models: BlenderBot (medium, large), DialoGPT, and the original models.

Experimental results

Research questions

  • RQ1What types of queries are most likely to trigger toxic responses in open-domain chatbots?
  • RQ2Can non-toxic queries trigger toxic responses in state-of-the-art chatbots despite their benign nature?
  • RQ3Can an automated attack generate non-toxic queries that reliably trigger toxic responses in unseen chatbot models?
  • RQ4How effective are existing defense mechanisms in mitigating such attacks?
  • RQ5What are the implications for chatbot safety and deployment in sensitive applications?

Key findings

  • Approximately 8% of responses from BlenderBot (small) and TwitterBot were toxic when queried with 4chan dataset inputs.
  • 5.21% of toxic responses from BlenderBot (small) were triggered by non-toxic queries from 4chan’s /pol/ board.
  • ToxicBuddy achieved a 23.47% non-toxic-to-toxic (NT2T) attack success rate on TwitterBot in closed-world evaluation.
  • In open-world settings, ToxicBuddy triggered toxic responses in 10.7% of cases on DialoGPT, 10.57% on BlenderBot (large), and 4.03% on BlenderBot (medium).
  • Enhancements using tri-gram prefixes and clustering increased attack success rates to 10.7% on DialoGPT and 10.57% on BlenderBot (large).
  • Existing defense mechanisms either degraded model utility or failed to fully mitigate the attack, indicating a need for stronger defenses.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.