Correlation Dimension of Auto-Regressive Large Language Models
Xin Du, Kumiko Tanaka-Ishii
TL;DR
This work introduces correlation dimension as a fractal-geometric metric to quantify long-range textual structure as perceived by autoregressive LLMs, addressing the limitations of perplexity in capturing global coherence. By analyzing sequences of next-token log-probability vectors via a correlation integral, it defines a dimension $d$ that reflects the recurrence structure of language, with empirical convergence to about $d\approx6.5$ across well-trained models and languages. The study reveals a three-stage pretraining evolution, sensitivity to contextual constraints, and the ability to detect degeneration and hallucination beyond local measures, while demonstrating robustness to quantization and applicability across architectures. The proposed metric offers a practical online signal for training diagnostics and generation control, providing deeper insight into generative dynamics and long-range dependencies in LLMs.
Abstract
Large language models (LLMs) have achieved remarkable progress in natural language generation, yet they continue to display puzzling behaviors -- such as repetition and incoherence -- even when exhibiting low perplexity. This highlights a key limitation of conventional evaluation metrics, which emphasize local prediction accuracy while overlooking long-range structural complexity. We introduce correlation dimension, a fractal-geometric measure of self-similarity, to quantify the epistemological complexity of text as perceived by a language model. This measure captures the hierarchical recurrence structure of language, bridging local and global properties in a unified framework. Through extensive experiments, we show that correlation dimension (1) reveals three distinct phases during pretraining, (2) reflects context-dependent complexity, (3) indicates a model's tendency toward hallucination, and (4) reliably detects multiple forms of degeneration in generated text. The method is computationally efficient, robust to model quantization (down to 4-bit precision), broadly applicable across autoregressive architectures (e.g., Transformer and Mamba), and provides fresh insight into the generative dynamics of LLMs.
