Abstract: We introduce a cumulant-expansion framework for quantifying how large language models (LLMs) internalize higher-order statistical structure during next-token prediction. By treating the softmax entropy of each layer's logit distribution as a perturbation around its "center" distribution, we derive closed-form cumulant observables that isolate successively higher-order correlations. Empirically, we track these cumulants in GPT-2 and Pythia models on Pile-10K prompts. (i) Structured prompts exhibit a characteristic rise-and-plateau profile across layers, whereas token-shuffled prompts remain flat, revealing the dependence of the cumulant profile on meaningful context. (ii) During training, all cumulants increase monotonically before saturating, directly visualizing the model's progression from capturing variance to learning skew, kurtosis, and higher-order statistical structures. (iii) Mathematical prompts show distinct cumulant signatures compared to general text, quantifying how models employ fundamentally different processing mechanisms for mathematical versus linguistic content. Together, these results establish cumulant analysis as a lightweight, mathematically grounded probe of feature-learning dynamics in high-dimensional neural networks.
Introduction
While Large Language Models (LLMs) have demonstrated remarkable capabilities, understanding the internal "geometry" of how they refine representations across layers remains a significant challenge. Most existing diagnostic tools rely on simple metrics like mean probability or intrinsic dimensionality, which often fail to capture the higher-order correlations—the subtle statistical patterns that distinguish coherent human language from random noise. This paper introduces a mathematically grounded, lightweight probe based on cumulant expansion to quantify how models move from capturing simple variance to mastering the complex, "long-tail" statistical structures of language and logic.
Methodology: The Cumulant Expansion Framework
The core innovation is the application of cumulant expansion to softmax entropy, a technique borrowed from statistical physics. The process involves three key steps:
- Defining the "Center" Distribution: A "center" logit distribution ($μ$) is defined for a collection of tokens, representing the average prediction for a given prompt context.
- Perturbation Theory: The entropy of each individual layer is treated as a perturbation around this center distribution.
- The Expansion: Using a Taylor-like expansion, the authors derive a formula expressing the average entropy of a prompt as the entropy of the center minus a series of cumulants ($κ_n$). These cumulants correspond to standard statistical moments: $κ_2$ relates to variance (spread), $κ_3$ to skewness (asymmetry), and $κ_4$ to kurtosis (tail thickness).
To observe these dynamics within the "black box" of the model, the researchers utilized TunedLens, mapping intermediate layer activations back into the vocabulary space to calculate logits and their corresponding entropy.
Experimental Results
The study evaluated GPT-2 (Small, Large, XL) and Pythia-160M models across diverse datasets, including the Pile-10K (general text) and DM Mathematics (logical word problems).
Context and Statistical Depth
A primary finding is that meaningful context creates "statistical depth." When a model processes structured sentences, higher-order cumulants (skew and kurtosis) exhibit a characteristic rise-and-plateau profile as information moves through the layers. In contrast, when the same tokens are shuffled to destroy context, these higher-order cumulants remain flat near zero.
As shown in the figure above, while the second cumulant (variance) remains relatively stable for both types of text, the divergence in higher-order cumulants proves that the model's internal geometry physically reacts to the semantic structure of the input.
Training Dynamics and the Hierarchy of Learning
By tracking models throughout the training process, the researchers identified a clear hierarchy of learning. Models do not internalize all statistical features simultaneously; instead, they first capture variance ($κ_2$) before progressively learning to model the skewness and kurtosis of the data.
This progression provides a literal "progress bar" for model maturity. In the Pythia-160M model, all cumulants increase monotonically before saturating, confirming that as a model "gets smarter," its internal logit distributions become increasingly complex.
Domain-Specific Signatures
The research also revealed that mathematical prompts possess a distinct "cumulant signature" compared to general text. Mathematical content typically shows lower overall entropy and a qualitative shift in higher-order cumulants ($κ_6, κ_7$) in the middle layers. This suggests that Transformer architectures employ fundamentally different internal machinery to solve equations versus completing standard linguistic sequences.
Conclusion
Cumulant expansion offers a powerful, lightweight lens into the feature-learning dynamics of LLMs. By decomposing entropy into higher-order moments, we can visualize the progression of statistical internalization across both model depth and training time. Future work may explore the causal implications of these findings, investigating whether active manipulation of these cumulants during training could improve model performance or steer specific behaviors.
Summary updated