arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.12824cs.CLcs.AI
收藏

耳语专家:语言模型中毒性缓解的神经干预

Whispering Experts: Neural Interventions for Toxicity Mitigation in Language Models

Apple(苹果公司);KU Leuven(鲁汶大学)

Xavier Suau, Pieter Delobelle, Katherine Metcalf, Armand Joulin, Nicholas Apostoloff, Luca Zappella, Pau Rodríguez

AI总结:

本文提出AUROC适应(AurA)干预方法,通过按神经元区分有毒内容的能力成比例降低其激活水平,有效缓解大型语言模型的毒性,同时保持常识零样本能力,并可与预提示策略结合增强效果。

摘要:

大型语言模型(LLMs)的一个重要问题是其产生有毒语言的不良能力。在本工作中,我们表明,负责毒性的神经元可以通过其区分有毒句子的能力来确定,并且可以通过按此能力成比例地降低其激活水平来缓解有毒语言。我们提出了AUROC适应(AurA),一种可应用于任何预训练LLM以缓解毒性的干预方法。由于该干预与每个神经元区分有毒内容的能力成比例,因此它没有任何依赖模型的超参数。我们表明,AurA可以实现高达$2.2 \ imes$的毒性降低,而困惑度仅增加$0.72$。我们还表明,AurA在不同规模(从1.5B到40B参数)的模型中均有效,并且在所有规模下,其在缓解有毒语言的同时保持常识零样本能力的效果均成立。AurA可以与预提示策略结合,将其平均缓解潜力从$1.28\ imes$提升到$2.35\ imes$。此外,AurA可以对抗恶意引发有毒内容的对抗性预提示,使其成为部署更安全、毒性更低的模型的有效方法。

英文摘要:

An important issue with Large Language Models (LLMs) is their undesired ability to generate toxic language. In this work, we show that the neurons responsible for toxicity can be determined by their power to discriminate toxic sentences, and that toxic language can be mitigated by reducing their activation levels proportionally to this power. We propose AUROC adaptation (AurA), an intervention that can be applied to any pre-trained LLM to mitigate toxicity. As the intervention is proportional to the ability of each neuron to discriminate toxic content, it is free of any model-dependent hyperparameters. We show that AurA can achieve up to $2.2 \times$ reduction in toxicity with only a $0.72$ perplexity increase. We also show that AurA is effective with models of different scale (from 1.5B to 40B parameters), and its effectiveness in mitigating toxic language, while preserving common-sense zero-shot abilities, holds across all scales. AurA can be combined with pre-prompting strategies, boosting its average mitigation potential from $1.28\times$ to $2.35\times$. Moreover, AurA can counteract adversarial pre-prompts that maliciously elicit toxic content, making it an effective method for deploying safer and less toxic models.

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

↑