Research shelf / AI & machine learning / USG

AI & machine learning

Statistical language models that compose, and prove that they do

Classical statistical generation died of one problem. For vocabulary V and context length n the state space grows as Vⁿ, so n > 5 was infeasible and the field ceded the ground to neural models. The Universal Statistical Generator replaces the explicit state table with a fixed hash table, which trades exactness for a bounded memory footprint and buys a thousand-token context.

Result-bearing AGPL-3.0+ / commercial
Evidence level

Experiments were run and the numbers are reported here.

FolderStatistical Generation
FieldAI & machine learning
StatusResult-bearing. Python reference implementation, computationally validated theory.
What it is

Generators shown to form a mathematical category under composition, with hash-based context compression that breaks the state-explosion ceiling that capped n-gram and HMM methods at three to five tokens.

The framework synthesises three established bodies of mathematics: category theory for composition, Lévy process theory for the generative dynamics, and information-theoretic filtration for parameter selection. The central formal contribution is a proof that statistical generators form a valid category under a naturally defined composition operator — so a complex generator can be assembled from verified simple ones and inherit their guarantees.

The engineering contribution is hash-based context compression. Arbitrary-length context histories are mapped through SHA-256 into a fixed table of M = 2³² entries, making memory O(M) rather than O(Vⁿ) — independent of both vocabulary and context length. Effective context goes from 3–5 tokens to 1,000+, a 200× extension, at roughly 4 GB.

Parameter reduction runs through a two-stage information-theoretic pipeline: Minimum Description Length scoring followed by Marchenko–Pastur spectral thresholding, which separates signal eigenvalues from the random-matrix bulk. The paper reports the result as provably noise-optimal under its stated assumptions, and validates every theoretical claim computationally against a Python reference implementation.

What "90% of neural" is and is not. The comparison is held-out perplexity against a state-of-the-art neural baseline on the author’s setup. It is not a claim that the framework substitutes for a large language model. What it buys instead is determinism, auditability and formal composability — properties neural architectures do not offer and some applications require.
Claims ledger

Every number, and what stands behind it

A claim is only worth the evidence attached to it. Each row below carries its basis: measured on the author’s own hardware, derived from the construction, measured on synthetic data, projected from literature, or simply cited.

Breakdown of this page’s claims by what stands behind each one
scroll to see the whole chart →
Every claim, weighted by its evidence. The table below is the same data row by row.
ClaimFigureBasisContext
Context length vs classical methods1,000+ tokens (200×)DerivedProperty of the hash construction, not a benchmark
Memory footprintO(M), M = 2³² (~4 GB)DerivedIndependent of vocabulary size and context length
Perplexity vs state-of-the-art neuralwithin ~10%MeasuredHeld-out comparison, author-run
Convergence rateO(1/√n)DerivedFrom the Lévy-process formulation
Training timeO(N)DerivedLinear in corpus size
Composabilitygenerators form a categoryDerivedProved for the stated composition operator
Classical ceiling being replacedn = 3–5 tokensCitedn-gram, HMM and PPM literature, 1980s–2000s

Measured — author-run experiment on the stated setup. Synthetic — measured, but on synthetic rather than real data. Derived — follows from the stated construction or proof. Projected — paper-stated projection, not an author-run benchmark. Cited — taken from external literature.

Methods

How it works

  • Categorical composition. Objects are generators, morphisms are composition operations; associativity and identity are proved, so modular assembly is sound.
  • Lévy-process dynamics. Generation is modelled as an increment process, which supplies the O(1/√n) convergence rate.
  • SHA-256 context hashing. Arbitrary history → fixed table index. Collisions are the price; bounded memory is the purchase.
  • MDL + Marchenko–Pastur filtration. Two-stage parameter reduction: description-length scoring, then spectral thresholding against the random-matrix bulk.
Stated limitations

What it does not do

Taken from the folder’s own README. Nothing here has been softened.

  • Hash collisions merge distinct contexts. The paper bounds the effect but the mapping is lossy by construction.
  • "Within 10% of neural perplexity" is author-run on the author’s corpus. No third-party benchmark.
  • The determinism and composability guarantees are real; they are also the reason the model cannot do what a large neural model does.
  • The paper itself names the cases where classical methods still win: very constrained environments, structured parsing, maximum-compression applications.
  • M = 2³² is a design constant. Behaviour at other table sizes is not characterised.
Use it

Free under AGPL-3.0+ for almost everyone

Personal use, charities, education and organisations under AUD 50,000 a year pay nothing. A tiered commercial licence covers everyone else.