In many high-dimensional linear problems, I want to calculate how one variable (or coordinate) responds to constraints on the remaining. A classic example is the disordered linear dynamical system, where we have a large system of sites, arranged into a vector , which undergo random but coupled dynamics. The goal is to find an equation to describe the dynamics of a single site, marginalizing out the effects of the other sites. This is a rich system; Blake gives a nice introduction in his 2026 review paper with Cengiz Pehlevan, and Mark wrote up a detailed walkthrough of it on his blog.
The color of site represents its activity , the size of its halo is its external drive , and the edges are the couplings . We want a self-contained equation for the dynamics of a single site (e.g., circled).
Two other problems with similar structure:
- High-dimensional linear regression. We have a random function "vector" whose expected covariance is known. We want to find an equation that predicts the distribution of a single element conditioned on observations at several other training points.
- Gaussian free field. We have a free field with kinetic operator . We place a point source at the endpoint of a semi-infinite 1D lattice. What's ?
What all of these problems have in common is that they're linear problems that can be solved by the matrix block inversion formula. I thought that this formula was pretty opaque, and I wanted to better understand where it comes from. The point of this blog post is to give a few different derivations of it, and then show how to use it to solve the disordered linear dynamical system. I'll leave the other two problems as exercises :—)
Why is this about block inversion?
At the core of all these problems is the linear relation , where the symmetric matrix is known, but and are both only partially-known to us, with some unknown components we need to solve for. For example, the linear dynamical system is governed by , which can be written as . We want to isolate the behavior of a single site (wlog, index 0), which we can depict as separated from the remaining "bath" variables:
This site-bath structure makes the problem interesting — in some sense it precludes naive spectral approaches, since the site basis is privileged. In the second line I've renamed the blocks for simplicity of notation: (for "site") is a scalar, (for "coupling") is a vector, and (for "bath") is a matrix.
To solve for without explicit reference to , we clearly need to invert in terms of the blocks , , and . The formula is pretty complicated:
I think it's important to understand what's going on in this formula. I want to give a few different derivations, all of which give some physical intuition for this formula, and for the linear dynamical system. If you don't care about that, you can skip to the next section.
Using Gaussian elimination
This is the most straightforward method, but imo the least illuminating. We just write the two block rows of :
Solve for the bath site variables using the bath row equation: . Substitute this into the site row and collect :
The quantity is called the Schur complement. Dividing it from both sides gives the top row of the block inverse, and plugging back into our equation for gives the bottom row.
As we'll soon see, the Schur complement shows up a lot in these problems. Sadly, this derivation didn't give me much intuition for what it means, or why it has that functional form. Also, the Schur complement is dimensionful; we know from physics that oftentimes the key structural insight comes from trying to extract dimension-free quantities. The next method (using the Sherman-Morrison formula) does this directly.
Using the Sherman-Morrison formula
Notice that the site-bath coupling is the annoying part of the inverse. If we could just nix it, , then we'd have
since that's how block-diagonal matrices work. This is intuitive — the site and the bath don't talk, so their inverses are independent. Can we just sneak the coupling back in somehow? A useful starting observation is that the uncoupled interaction matrix is a low-rank perturbation of the full interaction matrix:
where contains the couplings, and is the first canonical basis vector. The problem has now transformed: we want to invert a low-rank perturbation of a matrix whose inverse we already know. This is where the Sherman-Morrison formula comes in. First we factor out the uncoupled part:
where contains the coupling as seen through the uncoupled inverse, and . I'll leave it as an exercise to go through the same steps as in my previous blog post; as a hint, it's useful to observe that and . It's also useful to define . If you do the calculation, you find that
Notice that our quantity has two nice properties: a) it shows up everywhere, and b) it's dimensionless! I think this is a strong signal that it's worth trying to interpret its meaning. We can get some intuition by relying on the visual derivation in my previous blog post. First, our quantity is exactly analogous to the from the blog post. It represents the coupling that remains after we factor out the uncoupled inverse. Then, since skews the bath variables according to the first site's activity, and skews the site variable according to the bath's activity, the quantity is akin to a gain, or echo: it measures the strength of the round-trip effect of the site on itself through the bath.
This interpretation of becomes a lot more explicit when we solve the inverse problem using an iterative method. That's what we'll do next.
Using Gauss-Seidel iteration (alternating minimization)
In non-convex optimization, alternating minimization is a powerful method. (An example from neuroscience is sparse coding w/ dictionary learning.) The idea is that even though the full problem is jointly non-convex, the sub-problems where we optimize only one variable while keeping the others fixed are often individually convex. So, we just alternate between minimizing each variable separately. Applying that idea to blockwise inversion is called Gauss-Seidel iteration: we solve the site row for holding the bath fixed, then solve the bath row for holding the site fixed, and repeat.
The uncoupled bath satisfies . How does the site react? It responds to both its drive and the bath: . Then the bath reacts to this, , and that reaction comes back to the site as , where is the same dimensionless gain from the previous section. Each round trip through the bath multiplies the latest correction by , so
which is the top row of the block inverse again. Therefore is the cumulative effect of all the echoes, cycling through the site and the bath and back to the site again, multiple times.Technically the iteration only converges when , but our solution is correct as long as . In the case , iteration is simply not the right approach.
Returning to the linear dynamical system
Our problem is , where contains the site activities, contains the per-site external drive, and is the time-independent interaction matrix. The trouble here is the , which is a bit hard to handle. Things will get a lot easier if we Fourier transform, since this takes to , i.e., just a scalar times the identity matrix:
Here I'm using tildes to denote Fourier-space variables, i.e., functions of . We want to solve for the site activity in terms of . To do this we can just invert (using the block inversion formula) and read off the top row:
where I've introduced . Our equation for is, in some sense, complete: it does not directly depend on the other site trajectories. But, the annoying thing about our equation is that it still depends on the drive's bath variables, as well as all the bath couplings. If the system has permutation symmetry — there are no privileged sites — then we should expect to be able to simplify this further, to somehow "average out" the aggregate effect of the bath. This requires studying the remaining bath terms.
The first remaining bath term is . A few notes:
- Since , where is the same dimensionless gain from the previous section, you can think of it as a dimensionful gain factor.
- If is a symmetric random matrix with i.i.d. entries (zero mean and variance for sites), then is independent of , and in the large-bath limit the random quadratic form concentrates to its expectation: where is the normalized trace (i.e., trace divided by matrix dimension). This "deterministic equivalent" is therefore a consequence of self-averaging in the large bath limit.
- If the system is large enough that , then we can discard that particular coupling. Then the site 0 inverse matrix element converges to a deterministic quantity: If the system also has permutation symmetry, then the full system acts the same as the bath by itself, and all the diagonal elements are equal to the normalized trace (which, recall, is just ): This leave-one-out approximation gives a self-consistent equation for , which we can just solve! This is what I meant earlier by "averaging out the aggregate effect of the bath." Under the (pretty reasonable) assumptions we made, we don't actually need to know any of the bath details to solve how the bath actually interacts with the site (through ).
- Finally, a note on nomenclature: in this particular problem, is often called the memory kernel (it'll become clear why later).
The second remaining bath term is . A few more notes:
- Consider the bath activities if we nixed the coupling, , or equivalently just removed site zero entirely. I'll use to denote these counterfactual bath activities. In this scenario, we'd have . Then .
- If we assume again that has i.i.d. entries, then is independent of , and in the large-bath limit converges to a Gaussian process (by central limit theorem). The autocovariance of the GP is just the autocovariance of .
- If we assume self-consistency again (i.e., that the permutation symmetry + large bath implies that the full system acts the same as the bath by itself) then the autocovariance of is equal to the autocovariance of which is equal to the autocovariance of .
- Finally, a note on nomenclature: in this particular problem, is often called the noise term since it's a Gaussian process that does not directly respond to either or .
We've now killed all the bath variables (yay!). After rearranging, here's what's left:
Now we finally Fourier transform back, using the convolution theorem for the product :
This is quite amazing: we have an ODE for a single site's dynamics that explicitly depends only on the site's own history (through the memory kernel ) and its own external drive . The dependence on the bath is implicit; it lives in the autocovariance of the Gaussian process , and in the functional form of . We already obtained a self-consistent equation for earlier; I'll leave it to you to do the same for . (You can find details in Mark's blogpost and Blake's paper.)
(Left.) A system of interacting sites. Each site's color is its activity , and the size of its halo is its external drive . The cavity site is circled, and one of its neighbors has a dashed circle. (Top Right.) The cavity site's true trajectory (solid) is well predicted by the single-site equation we derived (dashed). The faint envelope shows the memory kernel . (Bottom right.) The neighbor site's true trajectory (solid) stays close to the counterfactual sans-cavity-site field (dashed).
To recap, the main cavity idea here is exact: it follows from the block-inverse formula, which is straight up correct. Then, to simplify even more, we make the following extra approximations:
- concentration: with large bath, things self-average and many random variables converge to deterministic limits
- cavity (leave-one-out) approximation: when we remove the site, nothing much changes in the bath (at least, as far as its correlations are concerned). This gives self-consistency: noise autocovariance and memory kernel are shared across all sites. This allows us to solve for them with no dependence on the bath's details.
Two exercises
Kernel regression. We have a random function with zero mean and known covariance , so its values at a test point and at a set of training points are jointly Gaussian:
We observe the training labels . Conditioned on these, what's the mean and variance of ? Hint: use the probability density function for high-dim Gaussians and isolate the part of the log density that depends on (the rest can be absorbed into the normalizing constant). You should find that the mean is the kernel regression estimator and the variance is the Schur complement .
Gaussian free field. We have , where is the discretized on a semi-infinite 1D lattice with endpoint : , , and zero otherwise. The source is and zero otherwise. Solve for . Hint: solving for will involve a self-consistency argument (note that the bath itself is self-similar to the site+bath system). Another hint: make sure the system is well-behaved in the large-mass limit.
In the end, you should get
As an extra challenge, try to find the field everywhere.
As another extra challenge, try the full infinite chain, with somewhere in the middle. You should get .