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

基于语言模型嵌入的线性有毒子空间的简单文本消歧

Simple Text Detoxification by Identifying a Linear Toxic Subspace in Language Model Embeddings

University of Virginia(弗吉尼亚大学)

Andrew Wang, Mohit Sudhakar, Yangfeng Ji

摘要:

大型预训练语言模型通常是在大量互联网数据上训练的,其中一些可能包含有毒或辱骂性语言。因此,语言模型编码有毒信息,这使得这些语言模型的实际使用受到限制。目前的方法旨在防止有毒特征出现生成的文本。我们假设在预训练的语言模型的潜在空间中存在低维有毒子空间,其存在表明有毒特征遵循某种潜在模式,因此是可移除的。为了构造这个有毒子空间,我们提出了一种方法来推广潜在空间中的有毒方向。我们还提供了一种方法,用于构建并行数据集,使用基于上下文的词屏蔽系统。通过我们的实验,我们表明,当有毒子空间被删除的一组句子表示,几乎没有有毒的表示仍然在结果中。我们的经验表明,使用我们的方法发现的子空间推广到多个毒性语料库,表明存在一个低维的有毒子空间。

英文摘要:

Large pre-trained language models are often trained on large volumes of internet data, some of which may contain toxic or abusive language. Consequently, language models encode toxic information, which makes the real-world usage of these language models limited. Current methods aim to prevent toxic features from appearing generated text. We hypothesize the existence of a low-dimensional toxic subspace in the latent space of pre-trained language models, the existence of which suggests that toxic features follow some underlying pattern and are thus removable. To construct this toxic subspace, we propose a method to generalize toxic directions in the latent space. We also provide a methodology for constructing parallel datasets using a context based word masking system. Through our experiments, we show that when the toxic subspace is removed from a set of sentence representations, almost no toxic representations remain in the result. We demonstrate empirically that the subspace found using our method generalizes to multiple toxicity corpora, indicating the existence of a low-dimensional toxic subspace.

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

↑