arXiv:2609.05743cs.CLSep 2026

Manuscript Offprint

arXiv:2609.05743

Some Tokens Behave like Magnets: Revealing Linguistic Organization in the Layers of Language Models

Andrew Liu, Devan Srinivasan, Gerald Penn

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We identify a special group of token vectors inside large language models (LLMs) — which we term magnetic vectors — that organize the surrounding tokens by either attracting or repelling them. Particularly, tokens pointing the same way as an attracting magnet are elongated; tokens pointing the same way as a repelling magnet are compressed. Just as physical magnets pull or push away the iron filings around them, these vectors organize their surroundings through two opposing polarities. Moreover, we identify a statistically significant pattern in linguistic category where function words consistently act as repelling magnets in early layers, and we also find magnets consistently reorganize their polarities in unique ways deeper in the model. In a further case study we find this observation may unveil a deliberate, layer-wise organization in how LLMs process language.

This pattern is consistent across different LLM architectures, sizes, and layer configurations. It is also causally relevant. When the LLM is fine-tuned for a downstream task, the task-functional tokens emerge as magnets. E.g., in question answering, the answer-span tokens become uniquely repelling magnets in the final layer, geometrically carving the answer out of the surrounding context. Furthermore, removing early-layer repelling magnets devastates syntactic tasks (POS tagging accuracy drops from 91% to below 10%) while sparing semantic ones, and removing late-layer attracting magnets does the reverse. We believe this phenomenon warrants further investigation, as it opens the first probe-free path to understanding how language models geometrically organize linguistic computation across their layers.¹

Figure

Figure 1: Magnets. In the sentence The movie was amazing . we see magnetism of different kinds as progress through the model. Early on, function tokens The, was, and . are strong repelling magnets, shortening surrounding vectors which point in the same direction. Later on we see The and amazing are strong attractors, lengthening surrounding vectors that point similarly to them. The right panel shows the underlying geometry: a repelling magnet (e.g., The) compresses tokens aligned with it, while an attracting magnet (e.g., amazing) elongates them. This pattern is consistent across LLM families.

1 Introduction

A recent thread of research on explaining black-box language models, known as mechanistic interpretability, has utilized ideas from representational geometry, where researchers analyse the geometry of vector embeddings of meaning. While fruitful, these results focus on angles and cosines, commonly ignoring lengths/norms (Lee et al. (2025); Elhage et al. (2022); Jha et al. (2025); Ethayarajh (2019); Mikolov et al. (2013) are some examples). This seems to have happened without forethought; indeed, we surmise that most researchers in this area would readily acknowledge that both are important to a vector representations.

In this paper, we elucidate a peculiar, coarse but nevertheless linguistically interpretable geometric organization in token vector representations within stacked transformer-based language models. At some transformer layer, certain vectors serve as

*Equal contribution. ¹Our code is available at https://github.com/Andrwy1/SomeTokensBehaveLikeMagnets magnets of a repelling or attracting polarity. Repelling magnets have the effect where vectors that point in a similar direction are shortened, and those that are more orthogonal are lengthened. Attracting magnets perform oppositely, vectors that point similarly are lengthened, while those more orthogonal are shortened. Formally, their angular parallelism to other vectors is tightly correlated with the norms of those other vectors, mediated by the depth of the representation within the transformer. We coin these curious vectors as magnets (Figure 1). Magnets exhibit clear patterns across transformer blocks and they have important consequences for downstream tasks.

Magnets naturally reveal layer-wise linguistic patterns not just in classical models like BERT, but also larger more recent models, and consistently across numerous natural language topics (healthcare, news, etc.). Magnets exhibit a progression from early to middle to late blocks of these models in a way that is consistent across different LLM families and sizes. Even more strikingly, they discriminate between tokens based on whether the tokens are function words/affixes (determiners, conjunctions etc.) or content words/affixes (nouns, verbs etc.). But these regularities are only observable by considering both angles and magnitude. They're found purely from the intrinsic geometry of the model, absent of any confounding auxiliary mechanisms such as probes. As such, magnetic vectors provide a new lens through which we can assess the potential functional importance of layers in neural language models. This is, to our knowledge, the first direct, observational evidence of linguistic organization across layers that is intrinsic to the models themselves.

We additionally investigate the role of these magnets at differing layers on downstream tasks, by focusing on BERT as a case-study: if magnets support the idea of early-layer syntax and late-layer semantics, early-layer magnets should be important to syntactic tasks and later-layer magnets to semantic ones. Shockingly, we find that this is the case: early-layer magnets have outsized influence on part-of-speech tagging (a syntactic task) performance, while late-layer magnets are sharply connected with sentiment analysis and question answering (semantic tasks).

Together, our results present the first model-faithful support for layer-wise linguistic attribution, an idea long supported but never adequately substantiated, and extends it to modern large-scale language models. Magnet vectors offer a new lens and geometric perspective to understanding representations. Cumulatively, the contributions of this work are as follows:

  1. We identify magnetic vectors in the representations of numerous large language models

  2. We find magnets exhibit consistent organization across layers and are sensitive to linguistic categories across models.

  3. We provide evidence that BERT's early-layer and late-layer magnets play an important role in a chosen pair of syntactic and semantic tasks, respectively.

References (28)