🤖 AI Summary
This study investigates how large language models (LLMs) encode long-range contextual information, focusing on the functional role of low-salience tokens—such as articles and punctuation—in contextual memory. Method: We introduce “contextual linearity” as a novel analytical dimension, quantified via logit lens visualization, token-level nonlinearity measurement, intrinsic dimension estimation, and inter-layer embedding linear approximation. Contribution/Results: We find a strong negative correlation between contextual linearity and model memory capacity; removing low-salience tokens significantly impairs long-range understanding—evidenced by consistent performance degradation on MMLU and BABILong-4k. Crucially, we provide the first systematic evidence that stop words are not redundant but serve as essential carriers sustaining the nonlinearity required for robust contextual modeling. To support fine-grained diagnostic analysis of context memory, we open-source LLM-Microscope, a toolkit enabling token- and layer-level interpretability.
📝 Abstract
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.