LLM-Microscope: Uncovering the Hidden Role of Punctuation in Context Memory of Transformers
cs.CL, cs.AI
Submitted: 2025-02-20
Updated: 2026-09-14
Comments: accepted to NAACL 2025
Code: https://github.com/AIRI-Institute/LLM-Microscope
License: http://creativecommons.org/licenses/by/4.0/
The gist: 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
Terminology
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.
Sources
- Eliciting Latent Predictions from Transformers with the Tuned Lens
- On Behalf of the Stakeholders: Trends in NLP Model Interpretability in the Era of LLMs
- Sparse Autoencoders Find Highly Interpretable Features in Language Models
- Jump to Conclusions: Short-Cutting Transformers With Linear Transformations
- TinyStories: How Small Can Language Models Be and Still Speak Coherent English?
- Estimating the intrinsic dimension of datasets by a minimal neighborhood information
- Scaling and evaluating sparse autoencoders
- Measuring Massive Multitask Language Understanding
- BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystack
- Locating and Editing Factual Associations in GPT
- Compressive Transformers for Long-Range Sequence Modelling
- Your Transformer is Secretly Linear
- Information Leakage from Embedding in Large Language Models
- Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 small
- Towards AI-Complete Question Answering: A Set of Prerequisite Toy Tasks
- Knowledge Circuits in Pretrained Transformers
- TinyLlama: An Open-Source Small Language Model
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering