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

Anton Razzhigaev, Matvey Mikhalchuk, Temurbek Rahmatullaev, Elizaveta Goncharova, Polina Druzhinina +2 more
2/20/2025
cs.CLcs.AI

No confident code implementation found for this paper.

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{razzhigaev2025llmmicroscope,
  title  = {LLM-Microscope: Uncovering the Hidden Role of Punctuation in Context Memory of Transformers},
  author = {Anton Razzhigaev and Matvey Mikhalchuk and Temurbek Rahmatullaev and Elizaveta Goncharova and Polina Druzhinina and Ivan Oseledets and Andrey Kuznetsov},
  year   = {2025},
  eprint = {2502.15007},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.15007v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.15007.svg)](https://codeofpaper.com/paper/2502.15007)

Discussion