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

哪些类型的 Token 受益于远距离文本?关于长上下文语言建模的分析

What Kinds of Tokens Benefit from Distant Text? An Analysis on Long Context Language Modeling

Wangxuan Institute of Computer Technology, Peking University(北京大学王选计算机研究所);School of Intelligence Science and Technology, Peking University(北京大学智能科学与技术学院);School of Electronics Engineering and Computer Science, Peking University(北京大学电子与计算机工程学院)

Yutong Hu, Quzhe Huang, Kangcheng Luo, Yansong Feng

AI总结:

本文通过分析 token 概率随上下文长度的变化,揭示实词、词首 token、N-gram 与先验知识对长上下文预测的影响及模型过度自信现象。

摘要:

随着大型语言模型能够处理的上下文长度持续增加,这些模型在语言建模等任务中表现出更强的利用远距离信息的能力。这种能力与人类的阅读和写作习惯形成对比:除了伏笔等情形外,人们很少记住并使用特别遥远的信息。本文旨在探究语言模型中哪些类型的词更能从长上下文中受益。通过分析 token 概率随上下文长度增加而发生的变化,我们发现实词(例如名词、形容词)以及词的起始 token 受益最大。上下文中的频繁模式(N-gram)也会显著影响预测。此外,模型的先验知识在影响预测方面发挥着关键作用,尤其是对稀有 token 而言。我们还观察到,语言模型在上下文更长时会变得更加自信,从而产生更尖锐的概率分布。这种过度自信可能会促使具有远距离上下文信息的 token 概率不断上升。我们希望本文的分析能够帮助社区更好地理解长文本语言建模,并为设计更可靠的长上下文模型作出贡献。

英文摘要:

As the context length that large language models can handle continues to increase, these models demonstrate an enhanced ability to utilize distant information for tasks such as language modeling. This capability contrasts with human reading and writing habits, where it is uncommon to remember and use particularly distant information, except in cases of foreshadowing. In this paper, we aim to explore which kinds of words benefit more from long contexts in language models. By analyzing the changes in token probabilities with increasing context length, we find that content words (e.g., nouns, adjectives) and the initial tokens of words benefit the most. Frequent patterns in the context (N-grams) also significantly impact predictions. Additionally, the model's prior knowledge plays a crucial role in influencing predictions, especially for rare tokens. We also observe that language models become more confident with longer contexts, resulting in sharper probability distributions. This overconfidence may contribute to the increasing probabilities of tokens with distant contextual information. We hope that our analysis will help the community better understand long-text language modeling and contribute to the design of more reliable long-context models.

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

↑