Emergent Mind

Fractal Patterns May Unravel the Intelligence in Next-Token Prediction

Published Feb 2, 2024 in cs.CL and cs.AI


We study the fractal structure of language, aiming to provide a precise formalism for quantifying properties that may have been previously suspected but not formally shown. We establish that language is: (1) self-similar, exhibiting complexities at all levels of granularity, with no particular characteristic context length, and (2) long-range dependent (LRD), with a Hurst parameter of approximately H=0.70. Based on these findings, we argue that short-term patterns/dependencies in language, such as in paragraphs, mirror the patterns/dependencies over larger scopes, like entire documents. This may shed some light on how next-token prediction can lead to a comprehension of the structure of text at multiple levels of granularity, from words and clauses to broader contexts and intents. We also demonstrate that fractal parameters improve upon perplexity-based bits-per-byte (BPB) in predicting downstream performance. We hope these findings offer a fresh perspective on language and the mechanisms underlying the success of LLMs.


  • The paper investigates the relationship between fractal patterns in language and the predictive abilities of LLMs.

  • Language is understood as a self-similar process with fractal characteristics, quantifiable by statistical parameters like the Hurst parameter.

  • Fractal analysis improves upon conventional metrics like perplexity in predicting LLM performance, indicating the potential value of fractal parameters.

  • Insights from this analysis suggest that training length does not necessarily correlate with improved performance, highlighting complexities in model training.

Introduction to Fractal Analysis in Language

The intricate qualities of language make it both a fascinating and challenging subject for computational modeling. In the past, various heuristic methods have emerged in an attempt to capture these qualities, with varied success. This paper delves into the realm of fractals and their relation to language structures, revealing insights with implications for the predictive capabilities of LLMs.

Fractal Patterns in Language

A notable contribution of the paper is the establishment of language as a self-similar process, consistent with fractal characteristics seen in natural phenomena. Not only does this overturn simplifying assumptions in previous linguistic models, but it also identifies the fractal structure as an endeared quality that can be precisely quantified. The study introduces the concept of self-similarity and long-range dependence (LRD) in language with a statistical formalism, characterized by the Hölder and Hurst parameters.

A fascinating statistical result posited by the authors is that the Hurst parameter (H) has been calculated to be 0.70 ± 0.09. This suggestively sweet spot lies between utter randomness and complete predictability, potentially facilitating the LLMs learning process. This paper does not shy away from the numerical support for its claims, pushing the known bounds of how we perceive language structuring.

Beyond Perplexity: Predicting Language Model Performance

Conventional metrics such as perplexity, often used to measure model performance, are enriched by this fractal analysis. The authors propose a combined metric, leveraged from fractal dimensions, which significantly outperforms perplexity metrics alone in predicting downstream performance. Specifically, this fusion increases the adjusted R2 from approximately 0.65 with perplexity to over 0.86, highlighting the robustness and forecasting prowess of fractal parameters. This metric, however, does not improve the prediction of rankings, an insight that suggests the nuanced application of these mathematical constructs.

Insights on Model Training and Inference

The implications of self-similarity and LRD extend to practical considerations in training LLMs. While one might assume that training models on longer text contexts could inherently improve performance due to capturing more of language's self-similar structures, the study finds that context length at training time does not necessarily correlate to increased performance. This insight serves as a testament to the complexity of language and the nuances in training models to capture its full breadth.

In summary, the paper provides a comprehensive analysis with concrete estimations of language parameters across several domains and model architectures. It posits that the intelligent behavior exhibited by LLMs can be viewed through the lens of fractal structures in language, a fresh perspective that might pave the way for advancements in understanding and harnessing these models' capabilities. The collaborative nature of the inquiry and the authors' concentration on established statistical methods ensure that the conclusions drawn are solidly grounded in empirical evidence, opening doors for future research in this field.

Get summaries of trending AI/ML papers delivered straight to your inbox

Unsubscribe anytime.

  1. Wavelets, spectrum analysis and 1/f processes. Wavelets and statistics, pp.  15–29
  2. Alabdulmohsin, I. M. Summability calculus: A comprehensive theory of fractional finite sums. Springer
  3. On the origin of long-range correlations in texts. Proceedings of the National Academy of Sciences, 109(29):11582–11587
  4. Andres, J. On de Saussure’s principle of linearity and visualization of language structures. Glottotheory, 2(2):1–14
  5. Gemini: A Family of Highly Capable Multimodal Models
  6. PaLM 2 Technical Report
  7. Apostol, T. M. An elementary view of Euler’s summation formula. The American Mathematical Monthly, 106(5):409–418
  8. Aref, S. Hurst phenomenon and fractal dimensions in long-term yield data. In Conference on Applied Statistics in Agriculture
  9. Ausloos, M. Generalized Hurst exponent and multifractal function of original and translated texts mapped into frequency and length time series. Physical Review E, 86(3):031108
  10. JAX: composable transformations of Python+NumPy programs, 2018. http://github.com/google/jax.

  11. Web 1T 5-gram Version 1, 2006. https://catalog.ldc.upenn.edu/LDC2006T13. Web Download. Philadelphia: Linguistic Data Consortium.

  12. Sparks of artificial general intelligence: Early experiments with GPT-4
  13. PaLM: Scaling Language Modeling with Pathways
  14. Scaling Instruction-Finetuned Language Models
  15. Training Verifiers to Solve Math Word Problems
  16. Cover, T. M. Elements of information theory. John Wiley & Sons
  17. Explaining world wide web traffic self-similarity. Technical report, Boston University Computer Science Department
  18. An introduction to the bootstrap. CRC press
  19. Eftekhari, A. Fractal geometry of texts: An initial application to the works of Shakespeare. Journal of Quantitative Linguistics, 13(2-3):177–193, 2006. doi: 10.1080/09296170600850106.
  20. An introduction to the theory of self-similar stochastic processes. International journal of modern physics B, 14(12n13):1399–1420
  21. Feller, W. The Asymptotic Distribution of the Range of Sums of Independent Random Variables. The Annals of Mathematical Statistics, 22(3):427 – 432, 1951. doi: 10.1214/aoms/1177729589. https://doi.org/10.1214/aoms/1177729589.

  22. The Pile: An 800GB Dataset of Diverse Text for Language Modeling
  23. The estimation and application of long memory time series models. Journal of time series analysis, 4(4):221–238
  24. Stochastic models that separate fractal dimension and the Hurst effect. SIAM Review, 46(2):269–282, 2004. doi: 10.1137/s0036144501394387.
  25. Fractal dynamics in physiology: alterations with disease and aging. Proceedings of the national academy of sciences, 99(suppl_1):2466–2472
  26. On calibration of modern neural networks. In ICML. PMLR
  27. Heaps, H. S. Information retrieval, computational and theoretical aspects. Academic Press
  28. Measuring Massive Multitask Language Understanding
  29. Hurst, H. E. Long-term storage capacity of reservoirs. Transactions of the American society of civil engineers, 116(1):770–799
  30. A domain-specific supercomputer for training deep neural networks. Communications of the ACM, 63(7):67–78
  31. Language Models (Mostly) Know What They Know
  32. The psychology and neuroscience of curiosity. Neuron, 88(3):449–460
  33. Complexity and human writings. Complexity, 7:1–6
  34. Kolmogorov, A. N. Wienersche spiralen und einige andere interessante kurven in hilbertscen raum, cr (doklady). Acad. Sci. URSS (NS), 26:115–118
  35. High time-resolution measurement and analysis of LAN traffic: Implications for LAN interconnection. In IEEE INFCOM
  36. On the self-similar nature of Ethernet traffic. IEEE/ACM Transactions on networking, 2(1):1–15
  37. The flan collection: designing data and methods for effective instruction tuning. In Proceedings of the 40th International Conference on Machine Learning, ICML’23. JMLR.org
  38. Mandelbrot, B. How long is the coast of Britain? Statistical self-similarity and fractional dimension. science, 156(3775):636–638
  39. Mandelbrot, B. Gaussian self-affinity and fractals: globality, the earth, 1/f noise, and R/S. Springer Science and Business Media
  40. Mandelbrot, B. B. The fractal geometry of nature. WH freeman New York
  41. Noah, Joseph, and operational hydrology. Water resources research, 4(5):909–918
  42. Long-range fractal correlations in literary corpora. Fractals, 10(04):451–461
  43. The fractal patterns of words in a text: a method for automatic keyword extraction. PloS one, 10(6):e0130617
  44. GPT-4 Technical Report
  45. Wide area traffic: the failure of Poisson modeling. IEEE/ACM Transactions on networking, 3(3):226–244
  46. Long-range correlations in nucleotide sequences. Nature, 356(6365):168–170
  47. Fractal analysis of time-series data sets: Methods and challenges. In Ouadfeul, S.-A. (ed.), Fractal Analysis, chapter 2. IntechOpen, Rijeka, 2018. doi: 10.5772/intechopen.81958. https://doi.org/10.5772/intechopen.81958.

  48. Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer
  49. Scaling Up Models and Data with $\texttt{t5x}$ and $\texttt{seqio}$
  50. Long range correlations in DNA: scaling properties and charge transfer efficiency. Physical review letters, 91(22):228101
  51. Samorodnitsky, G. Long memory and self-similar processes. In Annales de la Faculté des sciences de Toulouse: Mathématiques, volume 15, pp.  107–123
  52. Long range correlation in human writings. Fractals, 1(01):47–57
  53. Shannon, C. E. Prediction and entropy of printed English. Bell system technical journal, 30(1):50–64
  54. Adafactor: Adaptive learning rates with sublinear memory cost. In International Conference on Machine Learning, pp. 4596–4604. PMLR
  55. SlimPajama: A 627B token cleaned and deduplicated version of RedPajama, June 2023. https://huggingface.co/datasets/cerebras/SlimPajama-627B.

  56. Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language models
  57. Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Them
  58. Watkins, N. Mandelbrot’s stochastic time series models. Earth and Space Science, 6(11):2044–2056
  59. Self-similarity in high-speed packet traffic: analysis and modeling of Ethernet traffic measurements. Statistical science, pp.  67–85
  60. Self-similarity through high-variability: statistical analysis of Ethernet LAN traffic at the source level. IEEE/ACM Transactions on networking, 5(1):71–86

Show All 60