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

语言模型词汇键表示空间中的相关性与导航

Correlation and Navigation in the Vocabulary Key Representation Space of Language Models

University of California, San Diego(加利福尼亚大学圣迭戈分校)

Letian Peng, Chenyang An, Jingbo Shang

AI总结:

本文研究语言模型 NTP 分布中键相似性引发的虚假相关性,提出上下文内导航方法 ICN,通过将已探索结果纳入上下文推动查询远离已探索键,从而提升生成多样性与自洽投票性能。

摘要:

语言模型(LM)解码基于下一词元预测(NTP)概率分布。对于神经语言模型(例如基于 Transformer 的模型),NTP 分布本质上是编码后的输入上下文(查询)与固定词汇表示(键)之间经过 softmax 正则化的点积。本文研究键分布对 NTP 分布的影响,重点关注键之间的相似性是否会在 NTP 中引发虚假相关性。通过知识探测任务,我们表明在 NTP 分布中,排名靠前的少数词元通常是准确的。然而,中间排名的预测高度偏向于那些与这些顶部词元在分布上(不一定是语义上)相似的词元。例如,如果“P”被预测为 top-1 词元,那么“A”到“Z”都将在 NTP 中排名靠前,无论它们是否能够导致正确的解码结果。这损害了采样多样性,并使正确、长尾结果的采样变得无望且充满噪声。我们尝试通过一种新颖的上下文内方法来缓解这一问题,该方法迭代地将查询表示推离已探索的区域。具体来说,我们将已探索的解码结果纳入上下文,并提示语言模型生成其他内容,这鼓励语言模型产生一个与已探索键具有较小点积的查询表示。在知识探测任务上的实验表明,我们的方法能够高效地从已探索的键导航至正确的新键。我们进一步将该方法扩展到开放式生成和思维链(用于推理)生成。实验结果表明,ICN 有助于提高生成多样性和改进自洽投票性能。最后,我们讨论了由固定键空间引起的潜在训练问题,以及未来研究中应对这些问题的挑战和可能途径。

英文摘要:

Language model (LM) decoding is based on the next-token prediction (NTP) probability distribution. For neural LMs (e.g., Transformer-based), NTP distribution is essentially a softmax-regularized dot product between an encoded input context (query) and fixed vocabulary representations (keys). In this paper, we study the effect of the key distribution on the NTP distribution, with a focus on whether the similarity between keys will trigger spurious correlations in NTP. Through knowledge-probing tasks, we show that in the NTP distribution, the few top-ranked tokens are typically accurate. However, the middle-ranked prediction is highly biased towards the tokens that are distributionally (not necessarily semantically) similar to these top ones. For instance, if "P" is predicted as the top-1 token, "A"-"Z" will all be ranked high in NTP, no matter whether they can lead to correct decoding results. This hurts the sampling diversity and makes the sampling of correct, long-tail results hopeless and noisy. We attempt to alleviate this issue via a novel in-context method that iteratively pushes the query representation away from explored regions. Specifically, we include the explored decoding results in the context and prompt the LM to generate something else, which encourages the LM to produce a query representation that has small dot products with explored keys. Experiments on knowledge-probing tasks show that our method leads to efficient navigation away from explored keys to correct new keys. We further extend our method to open-ended and chain-of-thought (for reasoning) generation. Experiment results show that ICN contributes to better generation diversity and improved self-consistency voting performance. Finally, we discuss potential training issues caused by the fixed key space together with the challenges and possible ways to address them in future research.

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

↑