# You’re Measuring Model Complexity Wrong

**TLDR**: We explain why you should care about *model complexity*, why the *local learning coefficient* is arguably the correct measure of model complexity, and how to estimate its value.

In particular, we review [a new set of estimation techniques introduced by Lau et al. (2023)](https://arxiv.org/abs/2308.12108). These techniques are foundational to the [Developmental Interpretability research agenda](https://www.lesswrong.com/posts/TjaeCWvLZtEDAS5Ex/towards-developmental-interpretability) and constitute the first generation of methods for detecting and understanding phase transitions, with potential applications for both interpretability and mechanistic anomaly detection. We expect this set of techniques to become a fixture in the alignment toolkit, and we've published a [library](https://github.com/timaeus-research/devinterp/) and [examples](https://github.com/timaeus-research/devinterp/tree/main/examples) to help you get started.

> This post is based on the paper, ["Quantifying degeneracy in singular models via the learning coefficient" by Edmund Lau, Daniel Murfet, and Susan Wei (2023).](https://arxiv.org/abs/2308.12108) The content builds on previous posts by [@Liam Carroll](https://www.lesswrong.com/users/liam-carroll?mention=user) on [effective dimensionality in neural networks](https://www.lesswrong.com/posts/4eZtmwaqhAgdJQDEg/dslt-1-the-rlct-measures-the-effective-dimension-of-neural) and [the resulting perspective on phase transitions](https://www.lesswrong.com/posts/aKBAYN5LpaQMrPqMj/dslt-4-phase-transitions-in-neural-networks).

Why Model Complexity?
=====================

Model Comparison
----------------

**Comparing models matters for safety.** Given two models with the same behavior on a particular set of evals, we would like to be able to predict how they'll behave on out-of-distribution data. Can we distinguish the deceptively aligned model from the non-deceptively aligned model? As a first pass, can we predict that two models will or will not behave similarly in the future? 

**Comparing via weights.** Because models are *singular* (parameters do not correspond one-to-one with functions), it's not possible to compare weights directly. Very different choices of weights can implement the same functions, and very similar choices of weights can implement qualitatively different functions. 

**Comparing via behavior.** We also can't compare models at the level of the loss because different functions are compatible with the same loss. The same is true even if we compare models sample-by-sample: we'd need an astronomical number of inputs to meaningfully constrain behavior (some of which we'd rather not expose our model to). 

**Comparing via invariants.** Another option is to take a pointer from the mathematicians and physicists: in classifying mathematical objects like spaces, it helps to turn geometric problems into algebraic problems where we can compute invariants. If two spaces have different values of that invariant, then we know that they're different. If the values are the same, the results are inconclusive.

**The local learning coefficient**. The quantity we'll look at in this post, the (local) learning coefficient$\hat\lambda(w^*)$, is an invariant that measures model complexity — a coarse-grained feature of the model that is useful for making high-level comparisons with other models. Though having identical learning coefficients doesn't imply that two models are the same, having different learning coefficients tells us that two models are *qualitatively* different. 

The learning coefficient is unique in that it is an output *of the theory* rather than an ad-hoc invention. Except for the loss itself, the learning coefficient is the *most principled* way to compare different models. 

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/b34dbca1170bf291bb01a2b750c4eab62e4252cf1655fffd.png)

Figure 5 of [Lau et al. (2023)](https://arxiv.org/abs/2308.12108) demonstrates that two different optimizers (SGD and entropy-SGD) find qualitatively different solutions on MNIST, where entropy-SGD finds simpler solutions. 

Model Development
-----------------

**Model comparison is necessary to study model development.** [We're interested in comparing models across time to understand how they develop](https://www.lesswrong.com/posts/TjaeCWvLZtEDAS5Ex/towards-developmental-interpretability). High-level observables like the local learning coefficient give us insight into this process without requiring a detailed understanding of the model's internal mechanisms. 

In particular, we're aiming to understand phase transitions during learning — moments in which models go through sudden, unanticipated shifts. We want to be able to detect these transitions because we think most of the risk is contained in sudden, undesired changes to values or capabilities that occur during training (~sharp left turns) and sudden, undesired changes to behaviors that occur in-context (treacherous turns / mechanistic anomalies).

Local learning coefficient estimation is one of the first steps towards building tools for detecting and understanding these transitions. 

**Do phase transitions actually show up?** So far, the places where theoretically predicted phase transitions are easiest to confirm are simplified settings like [deep linear networks](https://arxiv.org/pdf/1312.6120.pdf) and [toy models of superposition](https://transformer-circuits.pub/2022/toy_model/index.html). For larger models, we expect phase transitions to be common but "hidden." Among our [immediate priorities](https://www.lesswrong.com/posts/TjaeCWvLZtEDAS5Ex/towards-developmental-interpretability) are testing just how common these transitions are and whether we can detect hidden transitions.

**Deep linear networks.** Let's consider the example of deep linear networks (DLNs). These are neural networks without nonlinear activations. In terms of expressivity, these models are identical to a simple affine transformation but in terms of dynamics they're much more interesting. The observed ["saddle-to-saddle" transitions](https://browse.arxiv.org/pdf/2106.15933.pdf) involve sudden jumps in the loss that coincide with sudden increases in the learning coefficient. 

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/0bd85a89e4e7d02da1ed26fe5568b30649678721fce23148.png)

[DLNs](https://github.com/timaeus-research/devinterp/blob/main/examples/dlns.ipynb) show sudden increases in model complexity, $\hat\lambda$ (**orange**), coinciding with sudden decreases in loss (**blue**).

From Basins to Model Complexity
===============================

In this section, we'll motivate the learning coefficient by attempting to formalize a working definition of basin volume (through which we'll see that what we really care about is basin volume *scaling*). We'll see in what sense the learning coefficient measures model complexity and examine the resulting perspective on phase transitions. 

Intractable: Basin Volume
-------------------------

**Basin volume and model simplicity.** Learning theorists have long been interested in the link between basin volume and model simplicity. We don't really care what model we end up with as long as its loss is below some threshold $\epsilon$. This is particularly true as that threshold approaches its minimum: we want to know how many "almost-as-good" solutions there are in the neighborhood of an obtained solution $w^*$. 

Intuitively, broader basins (with more suitable models) are simpler. Because they take up more volume, they require fewer bits to locate. In accordance with Occam's razor, we want the simplest possible solution for the problem at hand$$.[^1s1fnajc57s] 

**To measure a basin.** In particular, given an upper bound to the loss $L(w) \le \epsilon$, we want to compute the following volume (="area" in the case of two parameters):

$$
V(\epsilon) = \int_{L(w)\le\epsilon}\varphi(w) \mathrm{d}w
$$

for some prior $\varphi(w)$ over weights $w$. For our purposes, we can safely neglect the prior and treat it as constant. Consider the toy loss landscape below, where $V(\epsilon)$ is indicated by the gray projection. 

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/21d1f367b7d0fe501d37ecd7e7b4bd2c3d5368ebc9930b66.png)

A cartoon depiction of a loss landscape (modeled by a sum of random paraboloids).   
This is *not* a good representation of real-world loss landscapes.

**Model complexity and comparison.** Every model in a given basin has the same basin volume. This metric is a coarse-grained observable (much like volume in thermodynamics) that partitions weight space into subclasses of similar models. So seeing that two models have similar volumes increases the odds that they're computationally similar. Conversely, having different volumes / complexities suggests that two models are qualitatively distinct. 

Unfortunately, actually computing basin volume is intractable. This is because of the curse of dimensionality (the volume scales exponentially with dimensions) and because we can only ever approximate the "true" population loss $L(w)$ through an empirical loss $L_n(w)$ evaluated on a finite dataset $D_n=\{x_i\}_{i=1}^n$. 

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/1d242d729fde15d2fff44a7fb6fbc0a1aee74af276216f4c.png)

If two models belong to basins with different volumes, they're likely to be qualitatively different kinds of models. Computing this is intractable.

Wrong: Basin Flatness
---------------------

**From broadness to flatness.** The usual workaround to this intractability is to use a Taylor expansion: as long as we're close enough to the bottom of the basin, we can approximate the basin locally with a polynomial. 

[Most people stop at a second-order approximation](https://www.lesswrong.com/posts/QPqztHpToij2nx7ET/hessian-and-basin-volume), modeling the basin as a paraboloid whose curvatures are given by the Hessian at the minimum. It's a simple matter of then computing the resulting surface volume. 

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/84d10374e960ca3eb4950fcc3a63f249aebbb9b959b84387.png)

**Left:** the original basin along with the "true" volume. **Right**: a volume approximation using a paraboloid centered at the basin's minimum whose curvature is given by the Hessian.   
This is an invalid approximation.

**Unfortunately, this approximation is wrong**. Minimum flatness is a terrible proxy for basin volume. The fundamental problem is that [neural networks are *singular*](https://www.lesswrong.com/posts/fovfuFdpuEwQzJu2w/neural-networks-generalize-because-of-this-one-weird-trick): their loss landscapes have degenerate critical points. In practice, Hessians of the loss generally have many zero eigenvalues ([often a majority](https://arxiv.org/abs/1611.07476)). When we attempt to approximate the volume with a paraboloid that has zero curvature, we naively predict unphysical infinite volumes.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/13ad6c637506d61a8b8d0ea6f3eb24e2b888b006a5f00fca.png)

When a model is singular, the loss landscape is qualitatively distinct from its second order Taylor approximation. This makes Hessian-based volumes invalid.

[The standard correction is to add a small constant to these zero eigenvalues](https://www.lesswrong.com/posts/QPqztHpToij2nx7ET/hessian-and-basin-volume?commentId=SbbDWXgQS8XBoJN2C), which stabilizes the Hessian. We get a very large volume, instead of an infinite volume. But this misses the point: when second order terms vanish, the qualitative equivalence between a function and its second-order Taylor approximation breaks down, and these Hessian-based approximations become invalid.

Instead, we need to go to higher order terms in the Taylor expansion. The largest contributions to the volume will come from the first non-vanishing terms in the expansion. 

**Flatness ≠ broadness.** In the literature, flatness (in the sense of a small determinant of the Hessian) and broadness often get conflated. This is unfortunate: the two are not the same. Basin broadness is an interesting question. Minimum flatness is the wrong question. 

Instead: Basin Dimension
------------------------

**Volume dynamics.** We care about relative — not absolute — volumes. But even more importantly, we're interested in *dynamics:* how the volume changes as learning progresses. As we gather more and more data, we're able to become more discriminating and our threshold $\epsilon$ comes down. The real question, then, is: how does the volume scale as $\epsilon$ changes? This is more relevant *even in the non-degenerate regular case.*

**Volume scaling > volume.** Studying volume scaling solves several others problems with the volume. First, for sufficiently small $\epsilon$, relative volumes become independent of $\epsilon$, which allows us to eliminate the dependence on this arbitrary cut-off. Furthermore, volume scaling is invariant under reparametrizations and non-diverging even near degenerate critical points.

**The learning coefficient as effective dimensionality.** The volume scales as

$$
V(\epsilon)\sim c\epsilon^\lambda\quad \text{as}\quad \epsilon \to 0.
$$

The scaling exponent $\lambda$ is known as the **learning coefficient** (or "[real log canonical threshold](https://www.lesswrong.com/posts/4eZtmwaqhAgdJQDEg/dslt-1-the-rlct-measures-the-effective-dimension-of-neural)"). It plays the role of an effective dimensionality (up to a constant multiple).

 Let's illustrate this with some examples. 

**Regular models.** First, consider the  case of *regular* (=non-singular) models, where the loss landscape has no degenerate critical points. In this case, the Hessian-based approximation holds, and the volume grows with exponent $\lambda=d/2$, where $d$ is the number of dimensions (or parameter count).

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/d6d56bc3942aae7c48ea018cbb3bf6f839ddb6525d226772.png)

The area under the potential $L(w_1, w_2) = w_1^2 + w_2^2$ scales as $\epsilon$.

**Singular models.** Consider the function $L(w_1, w_2) = w_1^4 + w_2^4$. At the origin, the Hessian is equal to the zero matrix, and the learning coefficient is $\lambda=1/2$.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/e2963100f5c93176a14fe042f970ee9691a5c3411c2b99a5.png)

The area under the potential $L(w_1, w_2) = w_1^4 + w_2^4$ scales as $\epsilon^{\frac{1}{2}}$.

Compare this to the function $L(w_1, w_2) = w_1^2 w_2^4$. Again the Hessian at the origin is the zero matrix, but the learning coefficient now takes a different value $\lambda=1/4$. 

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/0c302099aedc3ba97d02f599a803573c749dff5bfd5166fd.png)

The area under the potential $L(w_1, w_2) = w_1^2 w_2^4$ scales as $\epsilon^\frac{1}{4}$. As we approach the bottom of this landscape, there's *much* more volume available than in the preceding examples. 

For singular models, the parameter count sets an upper bound $2\lambda \le d$. Lower learning coefficient means the volume scales slower for for large $\epsilon >1$ but *faster* for small $\epsilon < 1$. There's exponentially more volume in the immediate vicinity of degenerate critical points than in the vicinity of non-degenerate critical points. 

**Against Hessians.** The two preceding examples explicitly demonstrate the failures of the Hessian mentioned earlier. Their Hessians are identical at the origin, but their scaling behaviors are radically different. The Hessian is a poor judge of volume, and derived metrics like the rank of the Hessian are insufficient notions of model complexity.[^y3eyq6a3fpf] 

**The learning coefficient as an inductive bias.** The Occam's razor intuition that simpler models (with lower complexity) generalize better is formalized by [Watanabe's free energy formula](http://watanabe-www.math.dis.titech.ac.jp/users/swatanab/ag-slt.html),

$$
F_n \to n L_n(w^*) + \lambda \log n+O(\log\log n)\quad\text{as}\quad n\to\infty,
$$

where $n$ is the number of training samples, $L_n$ is the loss (more precisely, the negative log likelihood) which depends on a dataset $D_n$ of $n$ samples, and $w^*$ is an optimal choice of weights.

A full explanation and derivation of this formula is beyond the scope of this post (see [Liam's excellent sequence](https://www.lesswrong.com/posts/xRWsfGfvDAjRWXcnG/distilling-singular-learning-theory)), but the important bit is that we can construe the problem of Bayesian learning as a problem of trying to minimize this free energy, involving a tradeoff between *accuracy* (lower $nL_n(w^*)$) and *complexity* (lower $\lambda \log n$). Neural networks are intrinsically biased towards simpler solutions. 

**Intuition for phase transitions.** Consider a toy landscape with two local minima at $w_1$and $w_2$ with heights $L(w_1) > L(w_2)$. Both minima have an associated learning coefficient that determines how the volume scales in its neighborhood. Suppose $\lambda(w_1)<\lambda(w_2)$. Solution 1 is simpler but with higher loss, and solution 2 is more accurate but also more complex. 

Coming back to the volume for a moment, what happens as we gradually lower the threshold $\epsilon$? 

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/c8d637bdc0dcba17e01bc647f488fc390e81c74104b8df47.png)

**A** ***cartoon*** **analogy for thinking about the learning process.** In this toy landscape, there are two "phases" depicted by the orange and green projections. The **orange phase** is *higher loss* and *more degenerate*. The **green phase** is *lower loss* and *less degenerate*. As learning continues (**left to right**), we become less tolerant of high-loss solutions: the sea recedes, and we suddenly jump from the majority of the volume being occupied by the orange phase to the entirety of the volume being occupied by the green phase. In Bayesian learning, learning is dominated by transitions that lower loss and increase complexity. The link with SGD is an open question. 

What we're interested in is the fraction of the surface area (=the volume of weight space) that is taken up by different kinds of solutions. At first, this surface area, and thus the behavior of our models, is dominated by the more degenerate solution at $w_1$. 

As we sample more data ($n \to \infty$) the sea starts to recede. When the sea level approaches the level of one of these highly degenerate, low-accuracy solutions, that solution suddenly and very rapidly loses a massive amount of surface area *precisely because it is so degenerate*. Shallow puddles vanish all at once. 

The fraction of surface area taken up by successive, more complex solutions jumps just as suddenly and rapidly. There's a phase transition — a qualitative change in the kind and complexity of functions being learned.

The sea continues to sink. From where we're sitting — above the water — we can't see below the surface. We don't know where or when the next transition will take place. We hold our breaths...

Estimating Learning Coefficients
================================

We've seen what the learning coefficient is and how it measures the complexity of a model. But how can we go about practically estimating its value? In this section, we describe a set of techniques introduced by [Lau et al. (2023)](https://arxiv.org/abs/2308.12108).

Deriving the Estimator
----------------------

**From free energies to learning coefficients.** The free energy formula we saw earlier, 

$$
F_n \to n L_n(w^*) + \lambda \log n+O(\log\log n)\quad\text{as}\quad n\to\infty,
$$

offers a means of calculating the learning coefficient. We simply shuffle the terms around to obtain:

$$
\lambda \to \frac{F_n - nL_n(w^*)}{\log n} + O\left(\frac{\log\log n}{\log n}\right).
$$

**WBIC**. Unfortunately, performing the integral required to evaluate $F_n$ is intractable. As an alternative, we can consider the Widely Applicable Bayesian Information Criterion (WBIC), which generalizes the Bayesian Information Criterion (BIC) to singular models, 

$$
\begin{align}\mathrm{WBIC}&:=\mathbb{E}_w^{\beta^*}\left[n L_n(w)\right]\&=\int nL_n(w)\,p^{\beta^*}(w|D_n)\,\mathrm dw,\end{align}
$$

where $p^{\beta^*}(w|D_n)$ is the [tempered Bayesian posterior](http://arxiv.org/abs/1901.05353),

$$
p^\beta(w|D_n) = \frac{p(D_n|w)^\beta \varphi(w)}{p^{\beta}(D_n)},
$$

sampled at inverse temperature $\beta^*=1 / \log n$ [(Watanabe, 2013)](https://www.jmlr.org/papers/volume14/watanabe13a/watanabe13a.pdf). The two highest order terms in the expansion of the WBIC match that of the asymptotic expansion of $F_n$, which means we can substitute this in for $F_n$ to estimate the learning coefficient:

$$
\hat\lambda=\frac{\mathbb{E}_w^{\beta^*}\left[n L_n(w)\right] - n L_n(w^*)}{\log n}.
$$

**Expectations to empirical averages.** To use this estimator, we need to first estimate the expectation value $\mathbb E^{\beta^*}_w[nL_n(w)]$. We can do this by sampling a set of weights $W^{\beta^*}=\{w_1, \dots, w_m|w_i\sim p^{\beta^*}(w|D_n)\}$ and replacing the expectation value with an empirical average over the losses associated to those weights, 

$$
\mathbb E^{\beta^*}_w[nL_n(w)] \approx \frac{1}{m}\sum_{i=1}^m nL_n(w_i).
$$

Unfortunately, estimating $\mathbb E^{\beta^*}_w[nL_n(w)]$ in practice runs into significant curse-of-dimensionality effects for systems at scale. $$

The Local Learning Coefficient
------------------------------

**From global to local.** The problem becomes substantially more tractable if, instead of attempting to estimate the *global* learning coefficient, we estimate a *local* learning coefficient instead. We restrict our attention to a subset of weights and study how the volume scales in just that region. The scaling is dominated by the most complex local singularities. 

As we saw in the aside on phase transitions, this *local* quantity is also more interesting from the perspective of dynamics. When actually training models, we don't care about the behaviors of all possible models, we care about the behavior of a specific model as it moves through the loss landscape.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/758841edbe1f6d787405d7f680e2ba1da64e08475c0b0ba0.png)

Volume scaling restricted to a subset of weights is dominated by the *local* learning coefficient. 

**The local learning coefficient.** To estimate the local learning coefficient, Lau et al. (2023) replace the prior $\varphi(w)$ with a *localizing prior* centered at the point $\hat w^*$ whose learning coefficient we want to estimate:

$$
\varphi(w) \to \varphi(w-\hat w^*).
$$

This ensures that samples drawn will remain "close" to the original point. Substituting this into the global $\hat\lambda$ estimator we saw earlier, we obtain the definition of the local learning coefficient,

$$
\hat\lambda(\hat w^*)=\frac{\mathbb{E}_{w|\hat w^*}^{\beta^*}\left[n L_n(w)\right] - n L_n(\hat w^*)}{\log n},
$$

known colloquially as "**lambda-hat**," where $\mathbb E_{w|\hat w^*}$ indicates the use of a localizing prior. 

To estimate this expectation value, we compute an empirical average over the losses of a set of samples $\{w_i\}_{i=1}^m$, now drawn from the *localized posterior:*

$$
p (w|D_n, \hat w^*) \propto p(D_n|w)\,\varphi(w-\hat w^*).
$$

Given this empirical average, we plug it into the above formula for $\hat\lambda$ (subtracting $n$ times the loss at $\hat w ^*$ and dividing by $\log n$) to obtain an estimate for the local learning coefficient. 

Implementing the Estimator
--------------------------

**How to localize?** The first practical question we run into when implementing the local learning coefficient estimator is how to localize. Lau et al. consider a Gaussian prior parametrized by a scale $\gamma$. This is not the only possible choice, but it is perhaps the most straightforward choice: a gentle quadratic restoring force. 

**How to sample?** To draw samples from the posterior $p^{\beta^*}(w|D_n, \hat w^*, \gamma)$, the natural thought is to use MCMC techniques. Explaining why these work is beyond the scope of this piece and is well covered elsewhere, but what's important here is that standard MCMC methods run into the curse of dimensionality, which makes them unsuitable for larger models. 

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/43b84c61702623d698f24df0f722fb1e7582e6953747c6ed.png)

**Comparing MCMC and SGD on a toy landscape**, $L(w_1, w_2) = w_1^2w_2^4$. MCMC-NUTS (**left**) approximates the local posterior well, but does not generalize well to higher dimensions. SGD (**right**) is not a sampling mechanism.

**SGLD.** To scale MCMC methods to higher dimensions, we need to incorporate information from gradients. This allows us to "preselect" low-loss, high-posterior regions of weight space. One of the simplest examples of such a technique is Stochastic Gradient Langevin Dynamics (SGLD), which is SGD with the addition of an explicit noise term $\eta \sim N(0, \epsilon)$ ([Welling & Teh 2011](http://people.ee.duke.edu/~lcarin/398_icmlpaper.pdf)). This allows random movement along low loss dimensions, while quickly pushing any step to a higher loss area back down. 

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/3f74f5b3d066be9a43d43a7b10d9fcac2fd093b7a94c2327.png)

**Comparing SGLD and SGNHT on a toy landscape, **$L(w_1, w_2) = w_1^2 w_2^4$. SGLD and SGNHT both better explore the local posterior better than SGD, even when (as pictured here) sampling 10x fewer points than SGD.

**SGNHT and beyond.** Adding momentum & friction would allow us to explore these ridges of the posterior more effectively. One such example is the Stochastic Gradient Nosé-Hoover Thermostat (SGNHT), which uses a thermostat for its friction term ([Ding et al. 2014](https://proceedings.neurips.cc/paper/2014/file/21fe5b8ba755eeaece7a450849876228-Paper.pdf)). Although clearly performing better in the toy potential above, it's still unclear how well this approach generalizes to higher dimensions as these samplers can be harder to get working than SGLD.

Limitations
-----------

**Engineering limitations.** The above estimators do not yet live up to their full theoretical potential. To give an example, $\hat\lambda(w)$ depends on hyperparameters like the number of samples, the localizing strength $\gamma$, the SGLD learning rate $\epsilon$, etc. The true coefficient $\lambda(w)$ is independent of these hyperparameters.

We care less about whether $\hat\lambda$ is an unbiased estimator of $\lambda$ and more about whether this estimator satisfies certain basic desiderata of model complexity. These include properties like ordinality: that $\lambda(w_1)\ge\lambda(w_2)$ implies $\hat\lambda(w_1)\ge\hat\lambda(w_2)$. Improving this estimator and confirming that it satisfies these desiderata is currently bottlenecked more on engineering than on theory.

**Theoretical limitations**. At the same time, this estimator sometimes exceeds its theoretical underpinnings, yielding sensible results despite violating certain technical assumptions. This means there's work to do for theorists in terms of finding assumptions to relax and studying, for example, how to extend the learning coefficient outside of non-minima. Currently, if not applied at a local minimum, the estimator can sometimes yield unphysical negative model complexities.[^p983co85zrc]

There are limiting assumptions underlying the learning coefficient and additional limiting assumptions underlying the *local* learning coefficient*.* Both require further attention.

**Proceed with caution.** The current techniques for estimating $\hat\lambda$ are finicky to get working and should be applied with care. This is a research tool, not a plug-and-play observable printing press. Expect annoying hyperparameter tuning, (un)correlated estimates, weirdly high $\hat\lambda$'s, negative $\hat\lambda$'s, infinite $\hat\lambda$'s, etc. This requires at least as much caution as MCMC in any other high-dimensional system: pay careful attention to diagnostics of chain health and vary hyperparameters to hunt for dependencies, systematic or otherwise.

What's Next
===========

**Improving estimates.** An immediate priority is to confirm that $\hat\lambda$ and $\lambda$ match where it counts. Does it satisfy our desiderata? And can we calibrate $\hat\lambda$ in settings where we can analytically derive $\lambda$? There's work to do on the theoretical front and on the computational front in terms of exploring more scalable and more accurate ways to sample from the local posterior beyond SGLD.

**More observables.** SLT also tells us how to measure other quantities of interest, such as the singular fluctuation. We're also working on the second and third generations of techniques for studying transitions that extract vector and higher-order information about how models are changing.

**Go forth and estimate!** Although the current implementation is far from perfect, it should be good enough to start applying these techniques in practice. It's as easy as [`pip install devinterp`](https://github.com/timaeus-research/devinterp/) and `from devinterp.slt import estimate_learning_coeff` (or at least, it's easy up until that point). We recommend checking out [these example notebooks](https://github.com/timaeus-research/devinterp/blob/main/examples/introduction.ipynb) for inspiration. 

If you want to learn more about the learning coefficient, see [this post](https://www.lesswrong.com/posts/4eZtmwaqhAgdJQDEg/dslt-1-the-rlct-measures-the-effective-dimension-of-neural), [this lecture](https://www.youtube.com/watch?v=bFVGc2UKARc&list=PL4vaU_gO_6LJ4isj5DESGg4OwfVEk98Y-&index=5), or [this book](https://www.cambridge.org/core/books/algebraic-geometry-and-statistical-learning-theory/9C8FD1BDC817E2FC79117C7F41544A3A). For updates on developmental interpretability, join the [discord](https://devinterp.com/discord). Stay tuned for more updates soon!

> Thank you to [@Daniel Murfet](https://www.lesswrong.com/users/daniel-murfet?mention=user), [@Edmund Lau](https://www.lesswrong.com/users/edmund-lau?mention=user), [@Alexander Gietelink Oldenziel](https://www.lesswrong.com/users/alexander-gietelink-oldenziel?mention=user), and [@Liam Carroll](https://www.lesswrong.com/users/liam-carroll?mention=user) for reviewing early drafts of this document. 

[^1s1fnajc57s]: Actually extending the minimum description length principle ('choose the model that takes the fewest bits to specify') to singular models is an open problem. The free energy formula (covered later) is not quite the same, though it fulfills the same purpose of formalizing Occam's razor.  

[^y3eyq6a3fpf]: To give the Hessian some credit: its rank can give an us a lower bound on the model complexity. The Hessian still has its place. (EDIT: this originally said upper bound — that was wrong) 

[^p983co85zrc]: This occurs when the sampler strays beyond its intended confines and stumbles across models with much lower loss than those in the desired neighborhood.