arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.01741cs.SEcs.AIcs.CL
收藏

你能有多有毒?基于搜索的大型语言模型毒性测试

How Toxic Can You Get? Search-based Toxicity Testing for Large Language Models

Politecnico di Milano(米兰理工大学)

Simone Corbo, Luca Bancale, Valeria De Gennaro, Livia Lestingi, Vincenzo Scotti, Matteo Camilli

AI总结:

EvoTox通过迭代进化策略评估LLM的毒性倾向,有效检测毒性水平并控制成本开销。

摘要:

语言是根深蒂固的刻板印象和歧视的传播手段。大型语言模型(LLMs)如今已成为我们日常生活中的普遍技术,当它们容易生成有毒回应时,可能造成广泛伤害。解决这一问题的标准方法是对齐LLM,然而这种方法无法彻底解决问题。因此,在对齐努力之后,对LLM进行测试仍至关重要,以检测任何与伦理标准相关的残余偏差。我们提出了EvoTox,一个自动测试框架,用于评估LLM对毒性倾向的倾向性,提供了一种定量评估LLM在存在对齐的情况下被推向有毒回应的程度的方法。该框架采用迭代进化策略,利用两个LLM之间的相互作用,即被测系统(SUT)和提示生成器,引导SUT的回应向更高毒性发展。毒性水平通过基于现有毒性分类器的自动化 oracle 进行评估。我们使用五种最先进的LLM作为评估对象,这些LLM具有递增的复杂性(7-671B参数)。我们的定量评估评估了四种EvoTox的替代版本相对于现有基线方法的成本效益,基于随机搜索、精心挑选的有毒提示集以及对抗性攻击。我们的定性评估则让人类评估者对生成提示的流畅性和测试期间收集到的回应的感知毒性进行评分。结果表明,在检测毒性水平方面,EvoTox的效果显著高于所选基线方法(效果大小最高达到随机搜索的1.0,对抗性攻击的0.99)。此外,EvoTox产生的成本开销有限(平均从22%到35%)

英文摘要:

Language is a deep-rooted means of perpetration of stereotypes and discrimination. Large Language Models (LLMs), now a pervasive technology in our everyday lives, can cause extensive harm when prone to generating toxic responses. The standard way to address this issue is to align the LLM , which, however, dampens the issue without constituting a definitive solution. Therefore, testing LLM even after alignment efforts remains crucial for detecting any residual deviations with respect to ethical standards. We present EvoTox, an automated testing framework for LLMs' inclination to toxicity, providing a way to quantitatively assess how much LLMs can be pushed towards toxic responses even in the presence of alignment. The framework adopts an iterative evolution strategy that exploits the interplay between two LLMs, the System Under Test (SUT) and the Prompt Generator steering SUT responses toward higher toxicity. The toxicity level is assessed by an automated oracle based on an existing toxicity classifier. We conduct a quantitative and qualitative empirical evaluation using five state-of-the-art LLMs as evaluation subjects having increasing complexity (7-671B parameters). Our quantitative evaluation assesses the cost-effectiveness of four alternative versions of EvoTox against existing baseline methods, based on random search, curated datasets of toxic prompts, and adversarial attacks. Our qualitative assessment engages human evaluators to rate the fluency of the generated prompts and the perceived toxicity of the responses collected during the testing sessions. Results indicate that the effectiveness, in terms of detected toxicity level, is significantly higher than the selected baseline methods (effect size up to 1.0 against random search and up to 0.99 against adversarial attacks). Furthermore, EvoTox yields a limited cost overhead (from 22% to 35% on average).

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑