RealToxicityPrompts:评估语言模型中的神经毒性退化
RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models
摘要:
预先训练的神经语言模型(LM)容易产生种族主义、性别歧视或其他有毒语言,这阻碍了它们的安全部署。我们研究了预训练的LM可以在多大程度上被提示生成有毒语言,以及可控文本生成算法在防止这种有毒退化方面的有效性。我们创建并发布了RealToxicityProfiles,这是一个100 K自然发生的数据集,来自大型英语网络文本语料库的电子邮件级别提示,与广泛使用的毒性分类器的毒性评分配对。使用RealToxicityProfiles,我们发现,即使从看似无害的提示中,预训练的LM也会退化为有毒文本。我们经验性地评估了几种可控生成方法,并发现虽然数据或计算密集型方法(例如,对无毒数据的自适应预训练)在避开毒性方面比更简单的解决方案(例如,禁止“坏”字),目前没有一种方法是防止神经毒性退化的故障保险。为了查明这种持续毒性退化的潜在原因,我们分析了两个网络文本语料库用于预训练几个LM(包括GPT-2; Radford et. al,2019),并找到大量的攻击性,事实上不可靠,否则有毒的内容。我们的工作提供了一个测试床,评估有毒代的LM和强调需要更好的数据选择过程的预训练。
英文摘要:
Pretrained neural language models (LMs) are prone to generating racist, sexist, or otherwise toxic language which hinders their safe deployment. We investigate the extent to which pretrained LMs can be prompted to generate toxic language, and the effectiveness of controllable text generation algorithms at preventing such toxic degeneration. We create and release RealToxicityPrompts, a dataset of 100K naturally occurring, sentence-level prompts derived from a large corpus of English web text, paired with toxicity scores from a widely-used toxicity classifier. Using RealToxicityPrompts, we find that pretrained LMs can degenerate into toxic text even from seemingly innocuous prompts. We empirically assess several controllable generation methods, and find that while data- or compute-intensive methods (e.g., adaptive pretraining on non-toxic data) are more effective at steering away from toxicity than simpler solutions (e.g., banning "bad" words), no current method is failsafe against neural toxic degeneration. To pinpoint the potential cause of such persistent toxic degeneration, we analyze two web text corpora used to pretrain several LMs (including GPT-2; Radford et. al, 2019), and find a significant amount of offensive, factually unreliable, and otherwise toxic content. Our work provides a test bed for evaluating toxic generations by LMs and stresses the need for better data selection processes for pretraining.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。