Fractal Fuzz: making up for size
GPT-3 recognizes 50k possible tokens. For a 1000 token context window that means there are (5⋅105)103≈105000 possible prompts. Astronomically large. If we assume the output of a single run of gpt is 200 tokens then for each possible prompt there are ≈102500 possible continuations.
GPT-3 is probabilistic, defining for each possible prompt x (≈105000) a distribution q(x) on a set of size 102500, in other words a 102500−1 dimensional space. [1]
Mind-boggingly large. Compared to these numbers the amount of data (40 trillion tokens??) and the size of the model (175 billion parameters) seems absolutely puny in comparison.
I won't be talking about the data, or 'overparameterizations' in this short, that is well-explained by Singular Learning Theory. Instead, I will be talking about nonrealizability.
Nonrealizability & the structure of natural data
Recall the setup of (parametric) Bayesian learning: there is a sample space Ω, a true distribution q(x) on Ω and a parameterized family of probability distributions p(x|w),w∈W⊂Rd.
It is often assumed that the true distribution is 'realizable', i.e. q(x)=p(x|w0) for some w0. Seeing the numbers in the previous section this assumption seems dubious but the situation becomes significantly easier to analyze, both conceptually and mathematically when we assume realizability.
Conceptually, if the space of possible true distributions is very large compared to the space of model parameters we may ask: how do we know that the true distribution is in the model (or can be well-approximated by it?).
One answer one hears often is the 'universal approximation theorem' (i.e. the Stone-Weierstrass theorem). I'll come back to this shortly.
Another point of view is that real data sets are actually localized in a very low dimensional subset of all possible data .[2] Following this road leads to theories of lossless compressions, cf sparse coding and compressed sensing which are of obvious important to interpreting modern neural networks.
That is lossless compression, but another side of the coin is lossy compression.
Fractals and lossy compression
GPT-3 has 175 billion parameters, but the space of possible continuations is many times larger >>101000 . Even if we sparse coding implies that the effective dimensionality is much smaller - is it really small enough?
Whenever we have a lower-dimensional subspace W of a larger dimensional subspace there are points y in the larger dimensional space that are very (even arbitrarily) far from W. This is easy to see in the linear case but also true if W is more like a manifold[3]- the volume of a lower dimensional space is vanishly small compared to the higher dimensional space. It's a simple mathematical fact that can't be denied!
Unless... W is a fractal.
This is from Marzen & Crutchfield's "Nearly Maximally Predictive Features and Their Dimensions". The setup is Crutchfield Computational Mechanics, whose central characters are Hidden Markov Models. I won't go into the details here [but give it a read!].
The conjecture is the following: a 'good architecture' defines a model space W that is effectively a fractal in much larger-dimensional space of Δk realistic data distributions such that for any possible true distribution q(x)∈Δk the KL-divergence minw∈WK(w)=K(wopt)≤ϵ for some small ϵ .
Grokking
Phase transitions in loss when varying model size are designated 'grokking'. We can combine the fractal data manifold hypothesis with a SLT-perspective: as we scale up the model, the set of optimal parameter Wopt become better and better. It could happen that the model size gets big enough that it includes a whole new phase, meaning a wopt with radically lower loss K and higher λ.
EDIT: seems I'm confused about the nomenclature. Grokking doesn't refer to phase transitions in model size, but in training and data size.
EDIT2: Seems I'm not crazy. Thanks to Matt Farugia to pointing me towards this result: neural networks are strongly nonconvex (i.e. fractal)
EDIT: seems to me that there is another point of contention in which universal approximation theorems (Stone-Weierstrass theorem) are misleading. The stone-Weierstrass applies to a subalgebra of the continuous functions. Seems to me that in the natural parameterization ReLU neural networks aren't a subalgebra of the continuous functions (see also the nonconvexity above).
To think about: information dimension
Ooooo okay so this seems like it's directly pointing to the fractal story! Exciting!