[论文解读] Why So Toxic? Measuring and Triggering Toxic Behavior in Open-Domain Chatbots
本文提出 ToxicBuddy,一种基于 GPT-2 的攻击方法,通过生成非毒性查询来触发开放域聊天机器人产生有毒回复。研究结果表明,即使输入为良性,仍可能引发有害输出,在封闭世界设置下成功率达 23.47%,开放世界评估中为 10.7%,揭示了聊天机器人安全机制中的关键漏洞。
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.
研究动机与目标
- 探究当使用有毒或非有毒查询作为提示时,开放域聊天机器人产生有毒回复的程度。
- 确定看似无害的查询是否能在最先进的聊天机器人中触发有毒行为。
- 开发并评估一种自动化攻击方法 ToxicBuddy,通过生成非毒性查询以最大化触发有毒回复。
- 评估现有防御机制对这类对抗性查询的有效性。
- 强调在聊天机器人部署中亟需改进安全评估与防御策略。
提出的方法
- 从先前对 BlenderBot(小)和 TwitterBot 的测量中,收集了曾触发有毒回复的非毒性查询,构建辅助数据集。
- 在该辅助数据集上微调 GPT-2 模型,以生成旨在诱发有毒回复的新非毒性查询。
- 在封闭世界(与测量时使用相同模型)和开放世界(未见过的模型)设置下评估该攻击。
- 通过在查询嵌入上应用三元语法前缀和聚类技术,提升触发可能性,从而增强攻击成功率。
- 使用 Google 的 Perspective API 评估查询和回复的毒性,确保输入的非毒性。
- 在多个公开的聊天机器人模型上对比攻击性能:BlenderBot(中、大)、DialoGPT 及原始模型。
实验结果
研究问题
- RQ1哪些类型的查询最可能触发开放域聊天机器人产生有毒回复?
- RQ2尽管性质无害,非毒性查询是否仍能触发最先进的聊天机器人产生有毒回复?
- RQ3自动化攻击能否生成非毒性查询,以可靠方式触发未见过的聊天机器人模型产生有毒回复?
- RQ4现有防御机制在缓解此类攻击方面的有效性如何?
- RQ5这些发现对聊天机器人在敏感应用场景中的安全与部署有何影响?
主要发现
- 当使用 4chan 数据集输入查询时,BlenderBot(小)和 TwitterBot 约 8% 的回复为有毒。
- BlenderBot(小)中 5.21% 的有毒回复是由 4chan 的 /pol/ 板块中非毒性查询触发的。
- 在封闭世界评估中,ToxicBuddy 在 TwitterBot 上实现了 23.47% 的非毒性到有毒(NT2T)攻击成功率。
- 在开放世界设置中,ToxicBuddy 在 DialoGPT 上触发了 10.7% 的有毒回复,在 BlenderBot(大)上为 10.57%,在 BlenderBot(中)上为 4.03%。
- 通过引入三元语法前缀和聚类技术,攻击成功率提升至 DialoGPT 的 10.7% 和 BlenderBot(大)的 10.57%。
- 现有防御机制或降低模型实用性,或未能完全缓解该攻击,表明亟需更强有力的防御措施。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。