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

背包语言模型

Backpack Language Models

Stanford University(斯坦福大学)

John Hewitt, John Thickstun, Christopher D. Manning, Percy Liang

AI总结:

本文提出 Backpacks 神经架构,通过可解释的非上下文语义向量线性组合表示词义,在保持与 GPT-2 small 相当性能的同时,支持可控文本生成和去偏干预。

摘要:

我们提出 Backpacks:一种新的神经架构,它将强大的建模性能与可解释性和可控性的接口结合在一起。Backpacks 为词汇表中的每个词学习多个非上下文的语义向量,并将序列中的一个词表示为该序列中语义向量的上下文相关的非负线性组合。我们发现,在训练之后,语义向量会专门化,每个向量编码一个词的不同方面。我们可以通过检查语义向量到输出空间的(非上下文的、线性的)投影来解释它,并在这些可解释的钩子上进行干预,以可预测的方式改变模型的行为。我们在 OpenWebText 上训练了一个 170M 参数的 Backpack 语言模型,其损失与 GPT-2 small(124M 参数)Transformer 相当。在词汇相似性评估中,我们发现 Backpack 的语义向量甚至优于 6B 参数 Transformer LM 的词嵌入。最后,我们提出了简单的算法,通过对语义向量进行干预来实现可控文本生成和去偏。例如,我们可以编辑语义词汇表使其更倾向于某个主题,或将性别偏见的来源定位到某个语义向量并全局抑制该语义。

英文摘要:

We present Backpacks: a new neural architecture that marries strong modeling performance with an interface for interpretability and control. Backpacks learn multiple non-contextual sense vectors for each word in a vocabulary, and represent a word in a sequence as a context-dependent, non-negative linear combination of sense vectors in this sequence. We find that, after training, sense vectors specialize, each encoding a different aspect of a word. We can interpret a sense vector by inspecting its (non-contextual, linear) projection onto the output space, and intervene on these interpretable hooks to change the model's behavior in predictable ways. We train a 170M-parameter Backpack language model on OpenWebText, matching the loss of a GPT-2 small (124Mparameter) Transformer. On lexical similarity evaluations, we find that Backpack sense vectors outperform even a 6B-parameter Transformer LM's word embeddings. Finally, we present simple algorithms that intervene on sense vectors to perform controllable text generation and debiasing. For example, we can edit the sense vocabulary to tend more towards a topic, or localize a source of gender bias to a sense vector and globally suppress that sense.

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

↑