用自动演化方法测试大模型能多毒,发现对齐后仍存风险。
How Toxic Can You Get? Search-based Toxicity Testing for Large Language Models
- 两模型互演:一个生成毒化提示,一个生成响应,循环强化毒性。
- 在7-671B参数模型上测试,毒性检测效果比基线高1.0(最大)。
- 成本仅增加22%-35%,适合安全评估团队用。
语言是刻板印象与歧视的深层传播工具。如今广泛应用的大语言模型(LLMs)一旦生成有毒内容,可能造成广泛危害。当前主流的对齐方法虽能缓解问题,但无法根治。因此,对对齐后的模型进行毒性测试仍至关重要。本文提出EvoTox,一种基于自动演化策略的毒性测试框架,可量化评估模型在对齐后仍可能被诱导至多毒响应的程度。该框架利用两个大模型协作:待测系统(SUT)与提示生成器,后者不断生成更具挑衅性的输入以驱动SUT输出更毒的内容。毒性水平由现有分类器作为自动化判断依据。我们在五款先进模型(参数量从7亿到6710亿)上进行了定量与定性评估。定量部分比较了四种EvoTox变体与随机搜索、精选毒提示数据集及对抗攻击等基线方法的成本效益;定性部分则通过人工评分判断生成提示的流畅性及响应的感知毒性。结果显示,EvoTox在毒性检测效果上显著优于基线(最大效应量达1.0对比随机搜索,0.99对比对抗攻击),且平均成本仅增加22%至35%。
原文摘要 · Abstract (English)
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).
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。