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

Transformer语言模型在预测头中处理词频

Transformer Language Models Handle Word Frequency in Prediction Head

Tohoku University(东北大学);RIKEN(理化学研究所);MBZUAI(穆罕默德·本·扎耶德人工智能大学)

Goro Kobayashi, Tatsuki Kuribayashi, Sho Yokoi, Kentaro Inui

AI总结:

本研究通过BERT和GPT-2实验揭示预测头偏置参数在反映词频中的关键作用,并证明控制偏置可在不降低文本质量的前提下提升生成多样性。

摘要:

预测头是Transformer语言模型的关键组成部分。尽管它对预测有直接影响,但在分析Transformer时,这一组件常常被忽视。在本研究中,我们探究了预测头的内部工作机制,特别关注偏置参数。我们使用BERT和GPT-2模型进行的实验表明,其词预测头中的偏置在模型反映语料库中词频的能力方面发挥着重要作用,这与长尾学习中常用的logit调整方法相一致。我们还量化了在实际自回归文本生成场景中控制这些偏置的效果;在特定设置下,可以在不损害文本质量的情况下生成更多样化的文本。

英文摘要:

Prediction head is a crucial component of Transformer language models. Despite its direct impact on prediction, this component has often been overlooked in analyzing Transformers. In this study, we investigate the inner workings of the prediction head, specifically focusing on bias parameters. Our experiments with BERT and GPT-2 models reveal that the biases in their word prediction heads play a significant role in the models' ability to reflect word frequency in a corpus, aligning with the logit adjustment method commonly used in long-tailed learning. We also quantify the effect of controlling the biases in practical auto-regressive text generation scenarios; under a particular setting, more diverse text can be generated without compromising text quality.

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

↑