Singular Learning Theory: Basics
These are informal notes I originally sketched on my iPad while reading a variety of sources on SLT, starting primarily with Zach Furman's lectures at the Iliad intensive in Berkeley in August 2026; any errors are mine, or transcription errors by Claude, which I asked to turn my handwritten notes and figures into this interactive page, so there may also be some notational clashes. Since I spent so much time writing these notes, this transcription is primarily meant for self-reference, and I'm making it public in case it is helpful to anyone else. Much of it may be rewriting things that seem obvious, but that is just the way I wrote stuff down explicitly and thought about things.
Notation
- $\ell,\ K,\ K_n,\ S_n$ depend explicitly on the true distribution $q$.
- $L_n$ depends on $q$ only implicitly (the data are drawn from $q$).
- $p(x|w),\ \varphi(w),\ W$ are all independent of $q$.
Note that
since
So $K_n(w)$ is basically $L_n(w)$ up to $S_n$, which does not depend on the model, only on $q$.
The Learning Problem
Setup. A learning problem is a triple $(p,q,\varphi)$:
- $p$: a model, a distribution on $\X$ for each parameter setting;
- $q$: what we want to learn;
- $\varphi$: a prior, our best guess as to which $w\in W$ gives us the lowest loss.
There exists $w\in W$ such that $\pw=q(\cdot)$. Equivalently,
A Bayesian learning machine outputs a distribution on $W$, having seen a dataset $\Dn$:
The numerator is the likelihood function on $W$. Note that here we vary $w$ and not $x$.
- Hold $w$ fixed and vary $x$. This yields a distribution on $\X$:
$$w\longmapsto \pw \qquad\text{and}\qquad \int_\X p(x|w)\dd x = 1 .$$This is the parameter–function map.
- Hold $x$ fixed and vary $w$:
$$w\longmapsto p(x|w)\ \text{ for fixed }x,\qquad\text{but}\qquad \int_W p(x|w)\dd w\neq 1 ,$$so this is not a distribution on $W$.
We are interested in the loss landscape, i.e. what happens when we vary $w$? What does the geometry look like?
One of the payoffs of building this machinery is that it may offer an explanation for phenomena we see in deep learning, like phase transitions (which are not explained by regular models). Caution: this assumes SGD shares characteristics with Bayesian learning. Completely heuristic, as far as I know.
The loss landscape factorizes
Now note that $K(w)=\KL(q\,\|\,\pw)$ trivially factorizes as
$\Psi$ takes $w$ and gives a distribution. $\eta$ measures how far this distribution is from $q$.
- $\eta$ is a “nice map”: no degeneracies, convex, a unique zero at $q$. It knows nothing about the model.
- $\Psi$ is where the weird geometry lives, but it has nothing to do with $q$.
$\eta$ gives a nice bowl on $\mathrm{Dist}(\X)$ with a unique minimum at $q(x)$. We then pull this bowl back via $\Psi$, which might be degenerate. See :
The posterior in terms of $K_n$
Derivationposterior in terms of $K_n$expand
Recall $K_n(w)=\frac1n\sum_i\log\frac{q(x_i)}{p(x_i|w)}$. Then
so
Also recall $\Znz=\int_W e^{-nK_n(w)}\varphi(w)\dd w = \Zn\big/\prod_{i=1}^n q(x_i)$. So
which gives
A Bayesian learning machine averages over the posterior:
The Log-Likelihood and First Geometry
The score (the $w$-derivative of $\ell$)
For a fixed $x\in\X$, $w\mapsto\log p(x|w)$ is a smooth function on $W$ and $s$ is its gradient. $s(x,w)$ varies with the data, so it is a random vector.
Mean zero property. We have
Derivationmean zero propertyexpand
Indeed (the same $w$ is required in both places!)
where the last line is measure theory magic to swap $\int$ and $\gr$.
Sample from $p$ and compute the score of $p$ using those samples. The average of these scores is $0$ (the individual scores are not small, only their mean is). You cannot train a model on its own data: zero gradient.
Population loss and $K$
Recall
so
Hence
and
It is the same landscape over $w$: the loss landscape $\ell(w)$ is the same as the landscape $K(w)$, except inverted and translated. The curvature of the log-likelihood is minus the curvature of the KL bowl.
Relating empirical and population quantities
We want to study $K(w)$ but can't, due to its explicit dependence on $q$. So instead we study $K_n$, which as $n\to\infty$ approaches $K$ in expectation. $K_n(w)$ also has a $q$ dependence, but only implicitly, and it is $L_n(w)$ up to a constant that is independent of $w$ and fully determined by $q$. So studying $L_n(w)$ as $w$ wiggles is equivalent to studying $K_n(w)$ as $w$ wiggles.
$K(w)$ vanishes up to second order
Let $W\subset\R^d$ be the parameter space. Consider
Taylor expand in $\delta$ at $\delta=0$. Denote $p_w=\pw$ and $p_{w+\delta}=p(\,\cdot\,|w+\delta)$:
Derivationthe first-order term vanishesexpand
Therefore
We call
the Fisher information matrix. If $p=q$, i.e. $w=\ws$, then $-\E_q[\gr^2_w\log p(x|\ws)]=\gr^2_w K(\ws)$ (see ).
Fisher Information
Let $w\in W$.
The first form is the variance of the score $s(x,w)=\gr_w\log p(x|w)$, i.e. the expected variance of the gradients of the log-likelihood. The second form is the expected curvature of the log-likelihood.
Consider training data $q(x)\sim\mathrm{Ber}(1/4)$, $W\subset[0,1]$, and suppose $w\in W$. Then
Then the gradient with respect to $w$ at the true parameter $w_0=1/4$ is
Now
as expected. But the variance of the score is
Alternatively we can consider the curvature of the expected log-likelihood:
Now the curvature of this with respect to $w$, evaluated at $1/4$, is
Geometry of Fisher
Consider the setting $\ws\in\Wz$, so that $p(x|\ws)=q(x)$. Then recall
Derivation$I=\gr^2K$ on $\Wz$expand
But $q(\cdot)=p(\,\cdot\,|\ws)$, so this is
On $\Wz$, $I(w)$ is the curvature of $K$. Consequently (recall from that the first two terms vanish)
Geometrically, consider $\{w\in W\mid K(w)<\eps\}$. This is an ellipsoid
whose semi-axes have lengths $\sqrt{2\eps/\kappa_j}$, determined by the eigenvalues $\kappa_j$ of $I$. ($I(w)$ is positive semi-definite, so all eigenvalues are $\ge 0$.) See .
- $\kappa_1$, the largest eigenvalue: travel along the corresponding eigenvector and the loss quickly grows, so the distributions become distinguishable.
- $\kappa_2$, a small eigenvalue: travel along the corresponding eigenvector and you can do so for a long time before the loss exceeds $\eps$.
Start at $\ws=0$, where $K(\ws)=0$. I give you a loss budget of $\eps$, i.e. I allow $K$ to be up to $\eps>0$. If you perturb $\ws$ in the eigenvector direction corresponding to $\kappa_1$, you will not go far before $K(\ws+u)>\eps$, so the volume of distributions with loss below $\eps$ in that direction is small!
Perturbing in the $\kappa_2$ direction, you can go far before $K(\ws+u)>\eps$, so there is a big volume of distributions with loss below $\eps$ in that direction.
A flat direction!
Seeing more data concentrates the posterior mass, but if you have flat directions the mass remains spread out (unlike the regular case, where you kill posterior mass uniformly, like a bowl).
Singular and Regular Models
A model is regular if
- $w\mapsto\pw$ is injective on $W$;
- $I(w)>0$ for all $w\in W$.
Otherwise the model is singular.
Note that $I(w)\ge 0$ for all $w$; (2) is a strictness claim. When $I(w)=0$, it indicates flatness in $K$.
Derivation$I(w)=0$ means a flat directionexpand
Indeed, let $w\in\Wz$. Then as discussed earlier ()
If $I(w)=0$, then
Moving $w$ in the direction $v$ does not change the log-likelihood, i.e. it is a degenerate direction in the loss landscape.
Phase transitions require $\lambda$ to vary. You cannot see them in regular models, where $\lambda=d/2$ is constant.
Three simple examples of different kinds of degeneracies ().
- Redundant parameterization. Let $W=[-1,1]^2$, $w\mapsto p(\,\cdot\,|a,b)=\N(a+b,1)$, $q=\N(0,1)$. Then the direction $v=\binom{1}{-1}$ has $v\cdot s\equiv 0$. Indeed
$$\Wz=\{w\mid K(w)=0\}=\{a+b=0\},$$so moving along $\binom{1}{-1}$ has no effect. This degeneracy is fixed by just quotienting out the redundant parameter, though.
- Reparameterization. Consider $W=[-1,1]$, $p(x|w)=\N(w^3,1)$, $q\sim\N(0,1)$. Again
$$\Wz=\{w\in W\mid K(w)=0\}=\{w^3=0\}.$$But $\frac{\partial}{\partial w}w^3=3w^2$, which is $0$ at $w=0$, so $I(0)=0$. Simply setting $u=w^3$ removes this degeneracy, though.
- Genuine singularities. A degenerate fibre structure with no rescue via smooth transformations. This is where we want to focus!
Examples of singularities
Setup. Throughout, $q\sim\N(0,1)$, $W=[-1,1]^2$, $\varphi$ uniform, and
The parameter–function map just takes $w$, computes $\mu(w)$, some function of $w$, and uses it as the mean of $\N(\mu,1)$. Therefore
Here set $W=[-1,1]$ (not $[-1,1]^2$) and $\mu(w)=w$ (the identity). Then
Now
so
Since (1) $w\mapsto\N(w,1)$ is injective and (2) $I(w)>0$, the model is regular.
Go back to $W=[-1,1]^2$ and set $\mu(a,b)=ab$. Then
Then $I(a,b)=-\E_{p(x|a,b)}\big[\gr^2\log p(x|a,b)\big]$, and we only need
which gives
Now $I(0,0)=0$, so we have a singularity. If we did
this would clearly be false, since off the axes $K\big(\tbinom ab\big)\neq 0$. So there must be some direction of change, e.g. $v=\binom11$. This lives in higher order, unseen by $I$!
Note though that for points on the axes but not at $(0,0)$, $I$ still works. Take e.g. $(a_0,0)$ with $a_0\neq 0$. Then
so
Perturbing $\binom{a_0}{0}$ to $\binom{a_0+\delta}{b}$ causes a loss of $\approx\tfrac12 a_0^2b^2$. $I(w)$ can be used everywhere away from the origin to approximate $K(w+u)$, since it sees everything up to quadratic order and $K$ is not flatter than quadratic away from $(0,0)$!
Same setup as , except $\mu(a,b)=ab^2$, so
$\Wz$ is unchanged and is $\{ab=0\}=\{a=0\}\cup\{b=0\}$. But now
The entries that depend on $x$ are
so
$\Wz$ is still the same axes cross, but the behaviour differs on $a=0$ versus $b=0$. In particular:
- Let $\big\{\tbinom ab\in W\mid a=0,\ b=b_0\neq 0\big\}\subset\Wz$. Then
$$I(0,b_0)=\begin{pmatrix}b_0^4&0\\0&0\end{pmatrix}\neq 0\qquad\text{for all }b_0\neq 0 .$$So just as in on the $a$-axis, we can (for $a$ and $\delta$ small) write$$K\Big(\tbinom{a}{b_0+\delta}\Big)\approx\tfrac12(a,\,\delta)\begin{pmatrix}b_0^4&0\\0&0\end{pmatrix}\binom{a}{\delta} =\tfrac12(a,\,\delta)\binom{ab_0^4}{0}=\tfrac12 a^2b_0^4 .$$The eigenvalues are $\kappa_1=b_0^4$ (moving along $a$) and $\kappa_2=0$ (moving along $b$), so $I$ has rank $1$. You can move in the $b$ direction as much as you want, but not in the $a$ direction. An unbounded cylinder! Moving in $a$ is a quadratic volume loss. The only degeneracy is the flat direction in $b$.
- Contrast this with $b=0$. Let $\big\{\tbinom ab\in W\mid a=a_0\neq 0,\ b=0\big\}\subset\Wz$. Then
$$I(a_0,0)=\begin{pmatrix}0&0\\0&0\end{pmatrix}=0\qquad\text{for all }a_0 .$$Here $I(a_0,0)$ fails to approximate what happens when you move away from $a_0$, since trivially $\tfrac12 v^\top I\tbinom{a_0}{0}v=0$. However, if we actually compute (for $\delta,b$ small)$$K(a_0+\delta,\,b)\approx\tfrac12 a_0^2b^4 ,$$so moving off $b=0$, $K$ grows quartically. But $I$ only sees quadratic terms, so it falsely reports $0$!! This is why we want $\lambda$, the LLC.
Note what this means: there is an asymmetry. You can move further from the $b$ axis without growing $K$ much than from the $a$ axis. Growth in $a$ is quadratic, growth in $b$ is quartic. See and .
RLCT and LLC
We saw in that $I(w)$ fails to estimate $K$ near $\ws$ when there are degeneracies (flat directions that grow slower than quadratically). Instead we consider the volume of the sublevel set
$\lambda\log n$ is a penalization for complexity due to parameters. In the regular case this is constant at $\lambda=d/2$. The idea is that low $\lambda$ means more flatness, which means more posterior volume, which means more parameters achieve the optimum loss.
Some intuition
Recall that the posterior mass is ()
In what follows we replace $K_n$ by $K$. In general $n(K_n-K)=O_p(\sqrt n)$, but relative finite variance makes it $O_p(1)$ on the set $\{K\lesssim 1/n\}$, which is the only region that matters below.
Now observe that if $K(w)>1/n$, then $e^{-nK(w)}<e^{-n\cdot\frac1n}=e^{-1}$. Indeed, as $K(w)$ increases, $e^{-nK(w)}\to 0$. Conversely, as $K(w)\to 0$, $e^{-nK(w)}\to 1$.
Essentially, the mass is nontrivial only when
Now let $\ws\in\Wz$ and consider a unit vector $u\in\R^d$ and $t<\delta$ small. The question we've been asking over and over again is: what does $K(\ws+tu)$ look like? When $I(\ws)$ is non-degenerate we can use it to estimate this up to order 2, but as we saw, this fails if $K$ vanishes up to order 2 but still contains quartic or higher terms. Now from above,
Say $K(t)\approx\tfrac12\kappa t^2$. (This is a direction that would work with $I(w)$, since it is quadratic, and $\kappa$ would be the eigenvalue.) Then
In , at a point $(a_0,0)$ on the $b=0$ axis, moving off the axis in the $b$ direction,
How big can $\|t\|$ be so that $K(t)\le\eps$?
| $K(t)$ growth | Surviving width at level $\eps$ | Surviving width at $\eps=1/n$ | Contribution to $\lambda$ |
|---|---|---|---|
| $t^2$ (quadratic in $t$) | $\eps^{1/2}$ | $n^{-1/2}$ | $1/2$ |
| $t^4$ (quartic) | $\eps^{1/4}$ | $n^{-1/4}$ | $1/4$ |
| $t^{2k}$ | $\eps^{1/2k}$ | $n^{-1/2k}$ | $1/2k$ |
| $K\equiv 0$ | $O(1)$ | $O(1)$ | $0$ |
Some remarks.
- Column 1 measures the following. Consider a unit vector $u$ and $K(\ws+tu)$. Then we're interested in the set $\{t : K(\ws+tu)<\eps\}$. Now say
$$K(\ws+tu)\approx\tfrac12\kappa t^{2k}<\eps\iff |t|<\underbrace{\Big(\frac{2\eps}{\kappa}\Big)^{1/2k}}_{\text{width}},$$the width of the interval that $t$ can move along before $K(\ws+tu)$ exceeds $\eps$. Now if you multiply the widths across all directions you get the volume $V(\eps)$. At a point where $K$ decouples into a sum over directions, $K\approx\sum_j c_j t_j^{2k_j}$,$$\mathrm{width}_j\propto\eps^{1/2k_j}\ \Longrightarrow\ \Vol(\eps)\propto\prod_{j=1}^d\eps^{1/2k_j}\propto\eps^{\sum_j 1/2k_j} ,$$and $\lambda=\sum_j\frac{1}{2k_j}$ is just this exponent. Note that the unit vectors are the eigenbasis in the regular case.
- Regular means $K(\ws+tu)\approx\tfrac12\kappa t^2$ for all $u$. Note that you might have regular and degenerate directions, e.g. (asymmetry), where at $\ws=(0,b_0)$ the direction $\binom10$ is regular but $\binom01$ is degenerate.
- If a model is regular, then every direction $u$ contributes $\tfrac12$ to $\lambda$. There are $\dim W=d$ directions, so
$$\lambda=d\cdot\tfrac12=\frac d2 .$$A singular model has at least one direction where the contribution to $\lambda$ is $<\tfrac12$. So for singular models$$\lambda<\frac d2 .$$
Multiplying widths, as in , assumes the constraints in the different directions decouple. That holds when $K$ is a sum, $K\approx\sum_j c_j t_j^{2k_j}$: you need every $t_j$ small (an AND). It fails when $K$ is a product, $K\approx c\prod_j t_j^{2k_j}$: you only need the product small (an OR), and then you take a minimum, not a sum:
At the origin of , $K=\tfrac12 a^2b^2$, the sum rule would give $0+0=0$, but the direct integration in gives $\lambda=\tfrac12$. At a generic point of a stratum of $\Wz$ the sum rule does work: at $(a_0,0)$ in it gives $0+\tfrac12=\tfrac12$. The global $\lambda$ is then the minimum over the strata of $\Wz$. For this gives $\lambda=\min\big(\tfrac14\text{ at }(a_0,0),\ \tfrac12\text{ at }(0,b_0)\big)=\tfrac14$, which is what shows numerically.
RLCT
Let $\eps>0$. Define the volume
$\lambda$ is the real log canonical threshold and $m$ its multiplicity [Wat09, Ch. 6].
Consider the symmetric axes example (), where $w=(a,b)\mapsto p(x|a,b)=\N(ab,1)$. Let $\eps>0$. Then
Note the symmetry in $(a,b)$, i.e. $|ab|=|-ab|=|a\cdot(-b)|=|(-a)(-b)|$, so we need only consider $(a,b)\in[0,1]^2$. Now
since for fixed $a\in[0,1]$ (with $a,b$ positive) $|ab|<c\iff b<c/a$, so the region is $b\in[0,\min(1,c/a)]$. Evaluating,
(Here $\varphi$ uniform means $\varphi\equiv\tfrac14$ on $[-1,1]^2$; the constant does not affect the scaling.) Compare the numerical curve in .
Summary.
| Object | What it sees | What it misses |
|---|---|---|
| $I(w)$ | the coefficient of the order 2 term at a point | directions flatter than quadratic |
| $\operatorname{rank}I(w)$ | the number of non-degenerate directions, i.e. the number of directions that are not flat up to order 2 | the difference between flat and degenerate, i.e. everything quartic counts as degenerate and would give rank $0$ |
| $\lambda_U$ | the volume scaling over $U$ |
Free Energy
The free energy formula
Recall
$\Dn$ is the training data, e.g. pairs $x$ and $y$; $p(\Dn)$ has the $w$-dependence integrated out. $\Fn$ measures how surprised $p$ is by $\Dn$.
Core result.
Here $nS_n$ is model independent, $S_n=-\frac1n\sum_{i=1}^n\log q(x_i)$ being the entropy of the data; $\lambda$ is the RLCT and $m$ its multiplicity. This is Watanabe's Main Theorem 6.2 [Wat09, Ch. 6] (in the realizable case). The statement in exactly this form, $F=nL_n(w_0)+\lambda\log n-(m-1)\log\log n+R_n$ with $R_n$ converging in law, is Theorem 2 of [Wat13]; there $L_n(w_0)$ is Watanabe's average negative log-likelihood, which equals $S_n$ when the truth is realizable.
- $\Fn$ low is good: the posterior settles on low loss.
- $S_n$ is completely determined by the data: the entropy of $\Dn$.
- $\lambda\log n$ is a penalization for complexity due to parameters. In the regular case this is constant at $\lambda=d/2$. The idea is that low $\lambda$ means more flatness, which means more posterior volume, which means more parameters achieve the optimum loss (note that here we assume the model is realizable, so the optimum is $K(\ws)=0$).
- $(m-1)$: the multiplicity accounts for multiple degeneracies, which means more flatness, which means more posterior mass near the optimum; we subtract it off since it lowers the free energy.
is the standard Bayesian Information Criterion, which is what happens in the regular case.
Local RLCT
In all of the above we worked globally on $W$. Now we go local. Take $U\subset W$.
Its volume scaling tells you how much posterior mass lies within $\eps$ of the minimum.
The first term measures how well you fit the data, something like a measure of accuracy on the training data. Low $\lambda_U$ means more posterior volume near the optimum (more degenerate or flat directions). See [LLC23] for the local learning coefficient.
Seeing more data concentrates the posterior mass, but if you have flat directions the mass remains spread out (unlike the regular case, where you kill posterior mass uniformly, like a bowl). and show exactly this: shrink $\eps$ (think $\eps=1/n$) and the tube around the flat direction barely narrows.
Phase transitions
One of the payoffs of building this machinery is that it may offer an explanation for phenomena we see in deep learning, like phase transitions (which are not explained by regular models).
This assumes SGD shares characteristics with Bayesian learning. Completely heuristic, as far as I know.
Consider $U_1$ and $U_2$, basins of separated local minima, so that each region's minimum is interior and $\lambda_U$ is well-defined (cutting $W$ arbitrarily would put the minimum on a boundary). Then by
A transition requires the two terms to have opposite signs: one region fits worse but is flatter, the other fits better but is stiffer. Then the $\log n$ term dominates at small $n$ and the linear term overtakes it, with the crossover at
See . Note that $\hat K_n$ is random, so $n^*$ is a random variable, not a fixed threshold. Note also that different components of $\Wz$ always have $\Delta\hat K=0$, so they give a drift, not a transition; the two axes in are exactly this case.
Phase transitions require $\lambda$ to vary. You cannot see them in regular models, where $\lambda=d/2$ is constant.
Next time: Estimating $\lambda_U$, the local learning coefficients. Developmental interpretability: using $\hat\lambda_U$ as observables.
References
- [Wat09]S. Watanabe. Algebraic Geometry and Statistical Learning Theory. Cambridge Monographs on Applied and Computational Mathematics 25, Cambridge University Press, 2009. RLCT and multiplicity via the zeta function, Chapter 6; the free energy asymptotics, Main Theorem 6.2.
- [Wat13]S. Watanabe. A widely applicable Bayesian information criterion. Journal of Machine Learning Research 14 (2013), 867–897. jmlr.org Theorem 2: $F=nL_n(w_0)+\lambda\log n-(m-1)\log\log n+R_n$.
- [LLC23]E. Lau, Z. Furman, G. Wang, D. Murfet, S. Wei. The Local Learning Coefficient: A Singularity-Aware Complexity Measure. arXiv:2308.12108, 2023. Local RLCT $\lambda(\ws)$ as a volume-scaling exponent; the local free energy $F_n(B)=nL_n(\ws)+\lambda(\ws)\log n+o_p(\log\log n)$.
- [Car23]L. Carroll. Distilling Singular Learning Theory (DSLT), sequence of posts, LessWrong / AI Alignment Forum, 2023. lesswrong.com
- [Fur24]Z. Furman. Singular learning theory: exercises. Timaeus blog / LessWrong, 30 August 2024. timaeus.co