2025-02-24 · 专家 · 自然语言处理 · 机器学习

LLM-Microscope: Uncovering the Hidden Role of Punctuation in Context Memory of Transformers

这篇论文通过提出LLM-Microscope工具包,揭示了标点符号等看似无关的填充词在维持语境中的重要性,并分析了大语言模型内部编码和存储上下文信息的方式。

更新于 2025-02-24。作者:Anton Razzhigaev、Matvey Mikhalchuk、Temurbek Rahmatullaev、Elizaveta Goncharova、Polina Druzhinina、Ivan Oseledets、Andrey Kuznetsov。

中文摘要

我们介绍了量化大型语言模型(LLMs)如何编码和存储上下文信息的方法,揭示了一些通常被视为微不足道的标记(例如限定词、标点符号)却承载着意想不到的高上下文信息。值得注意的是,移除这些标记——特别是停用词、冠词和逗号——在MMLU和BABILong-4k上的性能会持续下降,即使只移除无关的标记也是如此。我们的分析还显示,上下文与线性之间存在强烈的关联,线性衡量的是从一层嵌入到下一层转换可以通过单一线性映射来近似有多接近。这些发现强调了填充标记在维护上下文中的隐藏重要性。为了进一步探索,我们提出了LLM-Microscope,这是一个开源工具包,用于评估标记级非线性、评估上下文记忆、可视化中间层贡献(通过改进的Logit Lens)以及测量表示的内禀维度。这个工具包揭示了看似微不足道的标记如何对长距离理解至关重要。

英文摘要

We introduce methods to quantify how Large Language Models (LLMs) encode and store contextual information, revealing that tokens often seen as minor (e.g., determiners, punctuation) carry surprisingly high context. Notably, removing these tokens -- especially stopwords, articles, and commas -- consistently degrades performance on MMLU and BABILong-4k, even if removing only irrelevant tokens. Our analysis also shows a strong correlation between contextualization and linearity, where linearity measures how closely the transformation from one layer's embeddings to the next can be approximated by a single linear mapping. These findings underscore the hidden importance of filler tokens in maintaining context. For further exploration, we present LLM-Microscope, an open-source toolkit that assesses token-level nonlinearity, evaluates contextual memory, visualizes intermediate layer contributions (via an adapted Logit Lens), and measures the intrinsic dimensionality of representations. This toolkit illuminates how seemingly trivial tokens can be critical for long-range understanding.

解读

一句话总结

这篇论文通过提出LLM-Microscope工具包,揭示了标点符号等看似无关的填充词在维持语境中的重要性,并分析了大语言模型内部编码和存储上下文信息的方式。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt