The Information of Large Language Model Geometry

Zhiquan Tan, Chenghai Li, Weiran HuangarXiv 2024 · DOI

Abstract

Large Language Models (LLMs) exhibit predictable performance improvements with scale, yet the underlying geometric and information-theoretic drivers remain poorly understood. This paper bridges this gap by establishing a theoretical link between representation entropy and model scaling laws. We demonstrate that representation entropy follows a power-law relationship with model size and show that semantic information is distributed across token sequences rather than being localized in final embeddings. By modeling the pretraining process as a bipartite skill graph and utilizing rate-distortion theory, we provide a rigorous framework for understanding how LLMs organize information.

Introduction

The phenomenon of "scaling laws" in Large Language Models—where performance improves predictably with increases in parameters, data, and compute—is well-documented but largely empirical. While we observe these trends, the theoretical justification for why the geometry of internal representations evolves this way is less clear. Furthermore, a fundamental question persists at the micro-level: does the final token in an auto-regressive sequence encapsulate the entire context's meaning, or is information distributed across the sequence? This work addresses these macro and micro questions through the lens of information theory.

Theoretical Framework and Methodology

To analyze the internal dynamics of LLMs, we employ several mathematical frameworks. Central to our approach is the Skill Graph, which models the pretraining corpus as a bipartite graph connecting text segments to latent "skills."

The Skill Graph: A bipartite representation connecting text segments to a power-law distribution of skills.

By assuming these skills follow a power-law distribution, we can theoretically derive scaling laws for model parameters and dataset size. To measure the information density within high-dimensional embeddings, we utilize Rate-Distortion Entropy Estimation. Additionally, we treat the sequence of token representations as a Gaussian Process (GP), allowing us to link the "information gain" of subsequent tokens to the mathematical properties of Ridge Regression.

Scaling Laws and Representation Entropy

A primary finding of this research is that "representation entropy" follows a distinct power law relative to model size. As models grow, they do not merely improve linearly; they fundamentally reorganize their geometric space to pack information more efficiently.

Normalized entropy as a function of model size, illustrating the power-law relationship that underpins scaling laws.

Validation across the Pythia model suite (70M to 1.4B parameters) confirms this relationship. Larger models exhibit more stable information gain trends over long contexts, suggesting they are less "surprised" by extended sequences compared to their smaller counterparts.

Token-Level Information and Semantic Clustering

Our analysis challenges the common assumption that the final token's embedding serves as a sufficient summary of a sentence. Using UMAP and PCA visualizations, we find that the mean embedding (the average across all tokens) captures semantic distance significantly better than the last token alone. This indicates that meaning is a distributed property of the entire sequence.

Furthermore, we compared standard attention weights with Lasso regression to identify which tokens contribute most to semantic meaning. While attention often fixates on punctuation or stop words, Lasso regression identifies more intuitive, core semantic subjects. For instance, in predicting a country name, Lasso focuses on the primary subject rather than syntactic markers.

Conclusion and Future Directions

This paper provides a theoretical backbone for LLM scaling laws by linking them to representation entropy. While the current framework relies on linear approximations and Gaussian assumptions, it opens new avenues for data-centric AI. Future work may involve optimizing dataset design to increase the frequency of specific "skills" or applying this information-theoretic perspective to Mixture of Experts (MoE) architectures to understand how specialized components manage entropy across the skill graph.

Summary updated

Abstract

This paper investigates the information encoded in the embeddings of large language models (LLMs). We conduct simulations to analyze the representation entropy and discover a power law relationship with model sizes. Building upon this observation, we propose a theory based on (conditional) entropy to elucidate the scaling law phenomenon. Furthermore, we delve into the auto-regressive structure of LLMs and examine the relationship between the last token and previous context tokens using information theory and regression techniques. Specifically, we establish a theoretical connection between the information gain of new tokens and ridge regression. Additionally, we explore the effectiveness of Lasso regression in selecting meaningful tokens, which sometimes outperforms the closely related attention weights. Finally, we conduct controlled experiments, and find that information is distributed across tokens, rather than being concentrated in specific "meaningful" tokens alone.
BibTeX
@misc{tan2024information,
  author = {Zhiquan Tan and Chenghai Li and Weiran Huang},
  title = {{The Information of Large Language Model Geometry}},
  year = {2024},
  eprint = {2402.03471},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.03471},
}
Figure