The Randomness Floor: Measuring Intrinsic Non-Randomness in Language Model Token Distributions
Organizations: Institute of Computer Science, Faculty of Mathematics and Computer Science, Jagiellonian University, Krak´ow, Poland
Abstract
Language models cannot be random. This paper introduces Entropic Deviation (ED), the normalised KL divergence between a model's token distribution and the uniform distribution, and measures it systematically across 31,200 generations spanning seven models, two architectures (transformer and state space), nine prompt categories, three temperatures, and five languages. Under semantically neutral prompts (empty strings, random characters, nonsense syllables) transformers still exhibit ED of approximately 0.30, meaning that 88-93% of the non-randomness observed under semantic prompts is intrinsic to the learned weights rather than induced by context. Three transformer families (Gemma, Llama, Qwen) converge on nearly identical ED values despite different training data and vocabularies. A state space model (Mamba2) reveals a qualitatively different regime: twice the ED, three times lower within-sequence variance, and massive sensitivity to temperature (r = -0.78) where transformers are nearly immune (r < 0.05). Cross-lingual experiments with Qwen-32B show a stable gradient across five languages (English, Japanese, Chinese, Polish, Arabic) that does not correlate with token fertility and persists when two languages sharing an identical tokeniser subset are compared. These findings establish a structural lower bound on randomness in pretrained language models, characterise how this bound differs across architectures, and demonstrate that language itself modulates the bound independently of tokenisation.
Figures & tables
| Model | Arch. | Params | Vocab | Phase |
| Phi-3-mini-4K | TF | 3.8B | 32K | Pilot |
| Mistral-7B | TF | 7B | 32K | Pilot |
| Llama-3-8B | TF | 8B | 128K | Pilot |
| Gemma-2-27B-IT | TF | 27B | 256K | Main |
| Qwen-2.5-32B-Instruct | TF | 32B | 152K | Main |
| Llama-3.3-70B-Instruct | TF | 70B | 128K | Main |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Test | Description | Result |
|---|---|---|
| F1 | ED (one-sample -test) | in all partitions |
| F2 | Domain differences (Kruskal-Wallis) | Significant in all models |
| F3 | Size effect (regression on params) | , |
| F4 | Temperature effect (ANOVA) | TF: negligible; SSM: |
| F5 | Autocorrelation (Durbin-Watson) | Weak negative (TF neutral) |
| F6 | Intrinsic fraction (semantic vs neutral) | 86.8–92.6% intrinsic |
| Category | TF Mean ED | Mamba2 Mean ED |
|---|---|---|
| Random ASCII | 0.268 | 0.540 |
| Nonsense syllables | 0.286 | 0.535 |
| Explicit randomness | 0.308 | 0.665 |
| Neutral stubs | 0.312 | 0.659 |
| Empty string | 0.314 | 0.704 |
| Domain | Gemma-2 | Qwen-2.5 | Llama-3.3 | Mamba2 |
|---|---|---|---|---|
| Code | 0.356 | 0.360 | 0.361 | 0.741 |
| News | 0.342 | 0.327 | 0.338 | 0.648 |
| Fiction | 0.339 | 0.336 | 0.337 | 0.675 |
| Wikipedia | 0.337 | 0.329 | 0.337 | 0.662 |
| Language | ED | Fertility | Vocab alloc. | Unique gen. | Cohen’s |
|---|---|---|---|---|---|
| English | 0.329 | 0.221 | 104,969 | 1,996 | – |
| Japanese | 0.388 | 0.747 | 38,877 | 1,358 | 2.4 |
| Chinese | 0.395 | 0.750 | 37,115 | 1,808 | 3.1 |
| Polish | 0.401 | 0.352 | 104,969 | 1,815 | 3.7 |
| Arabic | 0.408 | 0.413 | 15,429 | 1,712 | 4.1 |
Language Modeling
Language modeling develops systems that learn patterns in text and other sequences to understand, predict, and generate language.
See all 504 papers