Dancing Tokens on the Vocabulary Network from LLM Generation
Organizations: Dongguan Institute of Materials Science and Technology, Dongguan, China · Songshan Lake Materials Laboratory, Dongguan, China
Abstract
Large language models (LLMs) generate text one token at a time, yet how a particular generation relates to the geometry learned in pre-training remains unclear. The fundamental explainability of LLMs is elusive. Here, we build a similarity network from the input embeddings of six open LLMs and map generation onto it. The token-embedding network is scale-free while heavy-tailed, as are random embeddings with matched covariance, but far more fragmented. Distillation barely changes this topology because input embeddings are largely inherited. The knowledge space is thus deterministic from pre-training. Consecutive generated tokens are rarely graph neighbours and, in most models, no more often than in shuffled order, so generation is not a walk on the predefined network, although the tokens it visits are concentrated within it. Through the logit lens in a layer- wise manner, tokens settle late in depth in most models, and repetitive models remain confined to small domain-specific sub-graphs. These observables could serve as inference-time monitors of degeneration. We thus provide a fresh perspective on understanding LLM generation in the microscopic way from node or link prediction by graph learning.
Figures & tables
| Model | Type (starting checkpoint) | Architecture | heads/KV | ||||
|---|---|---|---|---|---|---|---|
| Meta-Llama-3.1-8B | pretrained base | Llama | 8.0 B | 32 | 4096 | 32/8 | 128256 |
| Qwen3-8B | post-trained, hybrid thinking (Qwen3-8B-Base) | Qwen3 | 8.2 B | 36 | 4096 | 32/8 | 151936 |
| DeepSeek-R1-0528-Qwen3-8B | R1-0528 distilled (Qwen3-8B-Base) | Qwen3 | 8.2 B | 36 | 4096 | 32/8 | 151936 |
| DeepSeek-R1-Distill-Llama-8B | R1 distilled (Llama-3.1-8B) | Llama | 8.0 B | 32 | 4096 | 32/8 | 128256 |
| DeepSeek-R1-Distill-Qwen-7B | R1 distilled (Qwen2.5-Math-7B) | Qwen2 | 7.6 B | 28 | 3584 | 28/4 | 152064 |
| gpt-oss-20B | reasoning, post-trained | GPT-OSS (MoE) | 20.9 B | 24 | 2880 | 64/8 | 201088 |
LLM Interpretability
Large language model (LLM) interpretability studies how internal representations and computations produce outputs, and how they can be explained or controlled.
See all 837 papers