Module contents
Lesson 24 of 25Research 110 min

Random matrices: the spectrum of noise, data and neural networks

Understand random-matrix spectra, the Wigner and Marchenko–Pastur laws, BBP transitions, covariance cleaning and neural-network applications.

After this lesson you can

  • Compare classical and proportional spectral limits.
  • Derive semicircle moments and interpret the Marchenko–Pastur law.
  • Analyze spike detection and eigenvector overlap across the BBP threshold.
  • Clean correlation matrices and compare realized portfolio risk.
  • Interpret network spectra using appropriate controls and assumptions.

Before you start

Motivation: as many variables as observations

Classical statistics reasons as follows: with nn observations x1,…,xn∈Rp\vb{x}_1, \dots, \vb{x}_n \in \R^p from a distribution with covariance Σ\mat{\Sigma}, the sample covariance S=1n∑kxkxk⊤\mat{S} = \frac{1}{n}\sum_k \vb{x}_k\vb{x}_k\T converges to Σ\mat{\Sigma} as n→∞n \to \infty by the law of large numbers. This convergence holds with pp fixed. In relevant problems pp and nn have the same order: 500 assets with 1000 trading days, 20 000 genes with 300 patients, a weight matrix 4096×40964096 \times 4096 whose learning you want to understand. Here S\mat{S} is not a slightly blurry Σ\mat{\Sigma}. It is something else, with a precise shape, and this lesson studies that shape.

Start with the most boring case possible: Gaussian data without any structure, Σ=I\mat{\Sigma} = \mat{I}. Everyone expects S\mat{S} to resemble identity, eigenvalues clustered at 1. See what happens.

InteractiveThe spectrum of structureless data
λ₋ = 0.18λ₊ = 2.49λmax = 2.50
  • eigenvalues of S\mat{S}
  • Marchenko–Pastur density
  • eigenvalues above λ+\lambda_+
Scenarios
600
200
γ=p/n\gamma = p/n0.333
MP edges λ∓\lambda_\mp0.179 and 2.488
Smallest and largest eigenvalues0.182 and 2.498
Above λ+\lambda_+1
Kolmogorov distance to MP0.014
Mean eigenvalue1.007
With p=200p = 200 independent variables and n=600n = 600 observations, sample covariance S=1nXX⊤\mat{S} = \frac{1}{n}\mat{X}\mat{X}\T should nearly equal identity, but its eigenvalues occupy an interval whose shape (curve) depends only on γ=p/n\gamma = p/n. Move nn and pp: the interval widens as γ\gamma approaches 1, and if p>np > n a mass at 0 appears. Change the entry distribution (the histogram barely changes) and try tt with ν=3\nu = 3: what breaks and what stays the same? Save a “ghost” to compare samples.

Three features of the figure govern the rest of the lesson.

  1. Eigenvalues of S\mat{S} are not those of Σ\mat{\Sigma}. All of Σ=I\mat{\Sigma}=\mat{I} equal 1, while those of S\mat{S} spread between 0.180.18 and 2.492.49 with γ=1/3\gamma = 1/3. The largest overestimates and the smallest underestimates, turning a matrix with condition number 1 into one with condition number near 14.
  2. A large eigenvalue of S\mat{S} does not prove structure. There is none here and the largest eigenvalue is 2.52.5. Distinguishing signal from noise requires knowing how far noise reaches.
  3. But that noise has a predictable, exact shape. The continuous curve is not fitted to data: it uses only γ\gamma. Knowing where the bulk ends helps identify which eigenvalues are noise and which are not.

This is what random matrices offer a data specialist:

  • Finance. A minimum-variance portfolio uses S−1\mat{S}\inv, amplifying precisely the smallest-eigenvalue directions, most contaminated by noise. With γ=0.5\gamma = 0.5 that portfolio’s actual risk is 41 % above optimum, even with no anomalies in the data.
  • PCA. How many principal components are structure and how many noise? The answer has an exact threshold, the BBP transition.
  • Neural networks. A newly initialized weight matrix is random. If after training its spectrum resembles the one above, training has left no mark; if it differs, the nature of the mark remains to be established. Signal propagation through a deep network depends on singular values of a random-matrix product.

We first cover vocabulary (spectral distribution and proportional regime), then two fundamental results (Wigner’s semicircle and Marchenko–Pastur laws), then the BBP transition specifying when signal survives noise, and finally applications (correlation cleaning and network weights) and a guide to reading the literature without confusing theorem with intuition.

Empirical spectral distribution and the proportional regime

A symmetric matrix A∈Rn×n\mat{A} \in \R^{n\times n} has nn real eigenvalues λ1≤⋯≤λn\lambda_1 \le \dots \le \lambda_n by the spectral theorem. As nn grows there is no single number they converge to, but a cloud condensing into a curve. The tool capturing that curve is the measure placing mass 1/n1/n at each eigenvalue.

Equality of moments and traces bridges two worlds. An eigenvalue is an implicit quantity, a root of a degree-nn polynomial. But tr⁡(Ak)\tr(\mat{A}^k) is a sum of products of entries, which can be averaged over randomness by counting. This is the moment method used for Wigner.

We must specify how the matrix grows. There are two asymptotic regimes; confusing them is the root of most misunderstandings in the area:

  • Classical regime. pp fixed and n→∞n \to \infty. Here S→Σ\mat{S} \to \mat{\Sigma} in any norm and each eigenvalue of S\mat{S} converges to that of Σ\mat{\Sigma}.
  • Proportional regime (or high-dimensional). p,n→∞p, n \to \infty with p/n→γ∈(0,∞)p/n \to \gamma \in (0, \infty). Now S\mat{S} does not converge to Σ\mat{\Sigma} in norm: with Σ=I\mat{\Sigma} = \mat{I} we have ∥S−I∥2→2γ+γ\norm{\mat{S} - \mat{I}}_2 \to 2\sqrt{\gamma} + \gamma (we will see why), which vanishes only if γ→0\gamma \to 0. This is the precise content of the covariance-estimation error bound, of order p/n\sqrt{p/n}: random matrix theory supplies the constant.

What does occur, and is the remarkable feature of this theory, is that a large random matrix’s ESD ceases to be random: it converges to a deterministic measure. The spectrum is said to self-average. One matrix of size 2000 suffices; averaging many realizations is unnecessary, as the second figure shows. The reason is concentration of measure (norm concentration): linear spectral statistics such as 1ntr⁡(Ak)\frac{1}{n}\tr(\mat{A}^k) fluctuate O(1/n)\bigO(1/n), much less than any entry.

Wigner’s semicircle law

The simplest symmetric random matrix is a table of Gaussian numbers, symmetrized.

Normalization 1/n1/\sqrt{n} makes the result exist: a row of Wn\mat{W}_n has nn variance-one entries, so its squared norm is of order nn and the matrix stretches by n\sqrt{n}. Dividing by n\sqrt{n} leaves eigenvalues in a fixed interval. Another normalization makes the histogram escape to infinity or collapse to 0. (Uniformly bounded moments of all orders are the classical proof’s assumption; for iid off-diagonal entries, truncation makes finite variance sufficient for ESD convergence, though not for largest-eigenvalue behavior, as we will see.)

InteractiveA semicircle emerges
10×10 corner of W10\mat{W}_{10}: red positive, blue negative. Entries N(0,1)\Normal(0,1) off diagonal, symmetric, divided by n\sqrt{n} before diagonalization.
edge 2
  • eigenvalues of W/n\mat{W}/\sqrt{n}
  • semicircle 4−x2/(2π)\sqrt{4-x^2}/(2\pi)
n = 10
Kolmogorov distance to the semicircle versus nn (log-log)
slope −1
View
Matrices averaged
Size nn10
Matrices used1
Kolmogorov distance0.1486
Largest eigenvalue2.383
m2m_2 (→ 1)1.537
m4m_4 (→ 2)5.341
Size grows from n=10n = 10 to 20002000 (play the animation or drag the timeline). At n=10n = 10 a histogram is noisy and hardly resembles the semicircle; averaging 10 or 50 matrices reveals the curve. At large nn, one matrix suffices (self-averaging). In “Moments”, compare mk=1n∑λikm_k = \frac1n\sum\lambda_i^k with Catalan numbers and see how each moment’s error falls with nn below. At what rate does Kolmogorov distance converge?

The moment method: where Catalan numbers come from

The previous figure showed m2→1m_2 \to 1, m4→2m_4 \to 2, m6→5m_6 \to 5, m8→14m_8 \to 14 and that odd moments are 0 by symmetry. These are the Catalan numbers Cj=(2jj)/(j+1)C_j = \binom{2j}{j}/(j+1), namely 1,1,2,5,14,42,…1, 1, 2, 5, 14, 42, \dots for j=0,1,2,…j = 0, 1, 2, \dots. This is precisely the proof’s outline.

The semicircle moments are Catalan numbers. With x=2sin⁡φx = 2\sin\varphi,  ⁣dx=2cos⁡φ  ⁣dφ\dd x = 2\cos\varphi\,\dd\varphi and 4−x2=2cos⁡φ\sqrt{4 - x^2} = 2\cos\varphi,

∫x2jρsc(x)  ⁣dx=22j+1π∫−π/2π/2 ⁣(sin⁡2jφ−sin⁡2j+2φ) ⁣dφ=12(4(2jj)−(2j+2j+1))=1j+1(2jj)=Cj.\int x^{2j}\rho_{\mathrm{sc}}(x)\,\dd x = \frac{2^{2j+1}}{\pi}\int_{-\pi/2}^{\pi/2}\!\big(\sin^{2j}\varphi - \sin^{2j+2}\varphi\big)\dd\varphi = \frac{1}{2}\Big(4\binom{2j}{j} - \binom{2j+2}{j+1}\Big) = \frac{1}{j+1}\binom{2j}{j} = C_j .

Use ∫−π/2π/2sin⁡2mφ  ⁣dφ=π(2mm)4−m\int_{-\pi/2}^{\pi/2}\sin^{2m}\varphi\,\dd\varphi = \pi\binom{2m}{m}4^{-m} in the second equality, and (2j+2j+1)=2(2j+1)j+1(2jj)\binom{2j+2}{j+1} = \frac{2(2j+1)}{j+1}\binom{2j}{j} in the third, giving 4(2jj)−(2j+2j+1)=2j+1(2jj)4\binom{2j}{j} - \binom{2j+2}{j+1} = \frac{2}{j+1}\binom{2j}{j}. Odd moments are 0 by symmetry of ρsc\rho_{\mathrm{sc}}.

Now the matrix moments. By the trace definition,

E[1ntr⁡Xnk]=1n1+k/2∑i1,…,ik=1nE[Wi1i2Wi2i3⋯Wiki1].\E\Big[\frac{1}{n}\tr\mat{X}_n^k\Big] = \frac{1}{n^{1+k/2}}\sum_{i_1, \dots, i_k = 1}^n \E\big[W_{i_1 i_2}W_{i_2 i_3}\cdots W_{i_k i_1}\big].

Each summand is a closed walk i1→i2→⋯→ik→i1i_1 \to i_2 \to \dots \to i_k \to i_1 on indices {1,…,n}\{1, \dots, n\}, traversing edges {ij,ij+1}\{i_j, i_{j+1}\}. Since entries are independent and centered, a walk contributes only if every edge is traversed at least twice. Count by the number rr of distinct indices in the walk:

  • If every edge is used at least twice there are at most k/2k/2 distinct edges, and a connected graph with rr vertices has at least r−1r - 1 edges, hence r≤k/2+1r \le k/2 + 1. There are order nrn^r walks with rr distinct indices, with bounded expectation (finite moments), so walks with r<k/2+1r < k/2 + 1 contribute O(nr−1−k/2)→0\bigO(n^{r - 1 - k/2}) \to 0.
  • Only r=k/2+1r = k/2 + 1 survive (requiring kk even): the graph has exactly k/2k/2 edges, is a tree, and each edge is traversed exactly twice, once each way. Each contributes E[Wij2]=1\E[W_{ij}^2] = 1.

It remains to count closed walks of kk steps traversing a tree of k/2k/2 edges, each outward and back. Moving “outward” adds +1+1 and returning subtracts 11: the walk is a path of length kk rising and falling by one, starting and ending at 0 and never going below 0. These Dyck paths are counted by Catalan numbers Ck/2C_{k/2}. Also choosing labels for k/2+1k/2 + 1 vertices gives n(n−1)⋯(n−k/2)∼nk/2+1n(n-1)\cdots(n - k/2) \sim n^{k/2+1}. Therefore

E[1ntr⁡Xnk]⟶{Ck/2k par,0k impar.\E\Big[\frac{1}{n}\tr\mat{X}_n^k\Big] \longrightarrow \begin{cases} C_{k/2} & k \text{ par}, \\ 0 & k \text{ impar}. \end{cases}

Since the semicircle has compact support it is determined by its moments, and moment convergence implies convergence in distribution. To pass from expectation to almost-sure convergence, verify the variance of 1ntr⁡Xnk\frac{1}{n}\tr\mat{X}_n^k is O(n−2)\bigO(n^{-2}), summable, and apply Borel–Cantelli. You will work out small cases k=2k = 2 and k=4k = 4 in the guided proof exercise. For GOE they are exact: E[m2]=1+1/n\E[m_2] = 1 + 1/n and E[m4]=2+5/n+5/n2\E[m_4] = 2 + 5/n + 5/n^2, so at n=40n = 40 the fourth moment averages 2.1282.128 rather than 22 (checked in the first code cell).

Simulating size 2000 in the browser

Diagonalizing an 2000×20002000 \times 2000 matrix costs order n3=8×109n^3 = 8\times 10^9 operations, too much for animation. For n>320n > 320 the figure uses a result by Dumitriu and Edelman (2002): GOE eigenvalues have exactly the same distribution as those of a symmetric tridiagonal matrix with diagonal N(0,2)\Normal(0, 2) and subdiagonal χn−1,χn−2,…,χ1\chi_{n-1}, \chi_{n-2}, \dots, \chi_1 (chi variables with those degrees of freedom), all independent. A tridiagonal matrix has only 2n−12n - 1 numbers and its eigenvalues take O(n2)\bigO(n^2). You implement it with scipy in the library section.

The Marchenko–Pastur law

We move from symmetric matrices to covariance matrices. Let X∈Rp×n\mat{X} \in \R^{p \times n} have independent entries of mean 0 and variance 1, and

Sn=1nXX⊤∈Rp×p\mat{S}_n = \frac{1}{n}\mat{X}\mat{X}\T \in \R^{p\times p}

be its sample covariance when true covariance is Ip\mat{I}_p and the mean is known. A convention warning: here, as in random matrix literature, nn observations are the columns of X\mat{X}, the transpose of the rest of the course’s design matrix. Sn\mat{S}_n is a Gram matrix and thus positive semidefinite; its eigenvalues are squared singular values of X/n\mat{X}/\sqrt{n} (SVD). With Gaussian entries it is called a Wishart matrix.

The motivation figure is exactly this theorem with γ=1/3\gamma = 1/3. Several facts visible there and in the formula:

  • Edges are λ±=σ2(1±γ)2\lambda_\pm = \sigma^2(1 \pm \sqrt{\gamma})^2. For γ=1/3\gamma = 1/3 they are 0.1790.179 and 2.4882.488. For γ=0.25\gamma = 0.25, 0.250.25 and 2.252.25. The largest eigenvalue of S\mat{S} overestimates the true one (1) by 2γ+γ2\sqrt{\gamma} + \gamma and the smallest underestimates it. This gives the promised result: ∥Sn−I∥2=max⁡(λmax⁡−1,1−λmin⁡)→λ+−1=2γ+γ\norm{\mat{S}_n - \mat{I}}_2 = \max(\lambda_{\max} - 1, 1 - \lambda_{\min}) \to \lambda_+ - 1 = 2\sqrt{\gamma} + \gamma (for entries with finite fourth moment; valid for all γ\gamma, because 1−λmin⁡→2γ−γ1 - \lambda_{\min} \to 2\sqrt{\gamma} - \gamma if γ<1\gamma < 1, and if γ>1\gamma > 1 the smallest eigenvalue is 0 and 1<2γ+γ1 < 2\sqrt{\gamma} + \gamma).
  • Conditioning. For γ<1\gamma < 1 the condition number of S\mat{S} tends to ((1+γ)/(1−γ))2\big((1 + \sqrt{\gamma})/(1 - \sqrt{\gamma})\big)^2: 99 for γ=0.25\gamma = 0.25, 3434 for γ=0.5\gamma = 0.5 and over 14001400 for γ=0.9\gamma = 0.9. It diverges as γ→1\gamma \to 1, with identity as truth.
  • Atom. If p>np > n, rank⁡S≤n\rank\mat{S} \le n, so at least p−np - n eigenvalues are 0 and their proportion is (p−n)/p=1−1/γ(p - n)/p = 1 - 1/\gamma. The nn nonzero eigenvalues of XX⊤/n\mat{X}\mat{X}\T/n match those of matrix n×nn \times n X⊤X/n\mat{X}\T\mat{X}/n, with ratio 1/γ1/\gamma: the laws are linked by this duality.
  • Moments. Law mean is 1, its second moment 1+γ1 + \gamma and third 1+3γ+γ21 + 3\gamma + \gamma^2. The second is calculated by hand in the Gaussian case: Etr⁡(S2)/p=1pn2[p(n2+2n)+p(p−1)n]=1+p+1n→1+γ\E\tr(\mat{S}^2)/p = \frac{1}{pn^2}\big[p(n^2 + 2n) + p(p-1)n\big] = 1 + \frac{p+1}{n} \to 1 + \gamma. Spectral variance is therefore γ\gamma: noise grows with the ratio.
  • Scale. With variance σ2\sigma^2 the entire spectrum is multiplied by σ2\sigma^2. Thus noise level can be estimated from the edge, as in the code exercise.

Where the edges come from: the Stieltjes transform

One way to obtain the law and understand its edges is the Stieltjes transform of a measure μ\mu,

m(z)=∫μ( ⁣dx)x−z,z∈C∖supp⁡μ.m(z) = \int \frac{\mu(\dd x)}{x - z}, \qquad z \in \C \setminus \operatorname{supp}\mu.

It is an analytic function containing the whole measure: μ\mu is recovered by inversion formula 1πIm⁡m(x+i0+)=\frac{1}{\pi}\operatorname{Im} m(x + i0^+) = , density of μ\mu at xx. For Marchenko–Pastur with σ2=1\sigma^2 = 1 one proves (removing one observation and applying the Schur complement) that mm satisfies a quadratic equation

γz m(z)2+(z+γ−1) m(z)+1=0.\gamma z\, m(z)^2 + (z + \gamma - 1)\, m(z) + 1 = 0 .

Solving gives m(z)=1−γ−z+(z−1−γ)2−4γ2γzm(z) = \dfrac{1 - \gamma - z + \sqrt{(z - 1 - \gamma)^2 - 4\gamma}}{2\gamma z}. The square root is real for zz outside the interval where (z−1−γ)2<4γ(z - 1 - \gamma)^2 < 4\gamma, and imaginary inside. There the density appears: Im⁡m(x+i0+)=4γ−(x−1−γ)2/(2γx)\operatorname{Im} m(x + i0^+) = \sqrt{4\gamma - (x - 1 - \gamma)^2}/(2\gamma x), and since 4γ−(x−1−γ)2=(λ+−x)(x−λ−)4\gamma - (x - 1 - \gamma)^2 = (\lambda_+ - x)(x - \lambda_-), dividing by π\pi gives exactly the definition’s density. Edges are zeros of the discriminant, (z−1−γ)2=4γ(z - 1 - \gamma)^2 = 4\gamma, namely z=(1±γ)2z = (1 \pm \sqrt{\gamma})^2. The whole result lies in one quadratic equation, which will shortly calculate the BBP transition.

Universality and its limits

The theorem requires only zero mean and finite variance: the law does not depend on entry distribution. This is universality, a kind of central limit theorem for spectra, visible in the motivation figure when switching Gaussian to Rademacher: the histogram is the same. But there is a caveat. The ESD (bulk) is universal with finite variance, whereas the edge is not: a classical Bai, Yin and colleagues result (1988) says λmax⁡(Sn)→λ+\lambda_{\max}(\mat{S}_n) \to \lambda_+ almost surely if and only if E[xij4]<∞\E[x_{ij}^4] < \infty. With Student tt with ν=3\nu = 3 degrees of freedom (finite variance, infinite fourth moment), the histogram remains Marchenko–Pastur, but isolated eigenvalues appear far beyond λ+\lambda_+, as the figure shows. For real heavy-tailed data such as financial returns, an eigenvalue above the MP edge therefore does not prove structure.

The spiked model and BBP transition

Until now there was nothing to find. Add signal. The simplest model with one privileged direction is the spiked covariance model (Johnstone 2001): all variables are variance-one noise except direction v\vb{v} with greater variance.

One true eigenvalue has separated from the others; can we see it? A rank-one perturbation changes ESD by O(1/p)\bigO(1/p), so the bulk remains Marchenko–Pastur. All that can change is one eigenvalue leaving the bulk. Surprisingly, the answer is all or nothing with an exact threshold.

The BBP paper describes fluctuations of the largest eigenvalue around the threshold (with the Tracy–Widom law for complex data); first-order limits stated in the theorem are due to Baik and Silverstein (2006), Paul (2007), and Benaych-Georges and Nadakuditi (2011) in a more general framework. Before the proof, see the theorem in action.

InteractiveWhen does signal appear?
λ₊ = 2.66λ₁ = 2.81
  • eigenvalues of S\mat{S}
  • MP density (bulk without spike)
  • λ1\lambda_1 of this sample
  • theoretical limit of λ1\lambda_1
√γ
  • theory (p→∞p \to \infty)
  • empirical sweep, p=120p = 120 (mean of 3)
  • this sample
Sample eigenvector of the largest eigenvalue: v^i2\hat{v}_i^2 (sum to 1)
variable 1 (spike)
1.20
0.40
pp and nn120 and 300
Threshold γ\sqrt{\gamma}0.632
Bulk edge λ+\lambda_+2.665
λ1\lambda_1 of the sample2.811
λ1\lambda_1 theoretical limit2.933
Second eigenvalue2.554
Overlap cos⁡2\cos^20.616
cos⁡2\cos^2 theoretical limit0.542
Angle to v\vb{v}38.3°
cos⁡2\cos^2 if random0.008
Above the threshold. The largest eigenvalue leaves the bulk and its eigenvector partially points to v\vb{v}, but never completely: overlap is below 1 for finite θ\theta and approaches 1 only if θ\theta is large compared with γ\gamma.
Data with p=120p = 120 variables and one direction (variable 1) with variance 1+θ1 + \theta. Increase θ\theta from 0: while θ<γ\theta < \sqrt{\gamma}, the largest eigenvalue (orange bar) is inside the bulk and sample eigenvector (below) spreads energy randomly among 120 variables. On crossing γ\sqrt{\gamma}, the eigenvalue detaches and eigenvector starts pointing to variable 1. Click “Sweep θ\theta” to plot empirical over theoretical curves, and change γ\gamma: what happens to the threshold and maximum overlap? Why is the empirical curve rounded rather than kinked?

Why that value: the secular equation

Deriving the limit of λ^1\hat\lambda_1 is short using the preceding Stieltjes result. Write S=Σ1/2S0Σ1/2\mat{S} = \mat{\Sigma}^{1/2}\mat{S}_0\mat{\Sigma}^{1/2} with Marchenko–Pastur S0=1nZZ⊤\mat{S}_0 = \frac{1}{n}\mat{Z}\mat{Z}\T. Matrices Σ1/2S0Σ1/2\mat{\Sigma}^{1/2}\mat{S}_0\mat{\Sigma}^{1/2} and S0Σ\mat{S}_0\mat{\Sigma} are similar, so λ\lambda is an eigenvalue of S\mat{S} if and only if det⁡(λI−S0−θS0vv⊤)=0\det(\lambda\mat{I} - \mat{S}_0 - \theta\mat{S}_0\vb{v}\vb{v}\T) = 0. If λ\lambda is not an eigenvalue of S0\mat{S}_0 (it is outside the bulk), the rank-one determinant lemma, det⁡(M−ab⊤)=det⁡(M)(1−b⊤M−1a)\det(\mat{M} - \vb{a}\vb{b}\T) = \det(\mat{M})(1 - \vb{b}\T\mat{M}\inv\vb{a}) with M=λI−S0\mat{M} = \lambda\mat{I} - \mat{S}_0, a=θS0v\vb{a} = \theta\mat{S}_0\vb{v} and b=v\vb{b} = \vb{v}, gives

det⁡(λI−S0)(1−θ v⊤(λI−S0)−1S0v)=0  ⟺  1=θ v⊤[λ(λI−S0)−1−I]v,\det(\lambda\mat{I} - \mat{S}_0)\Big(1 - \theta\,\vb{v}\T(\lambda\mat{I} - \mat{S}_0)\inv\mat{S}_0\vb{v}\Big) = 0 \iff 1 = \theta\,\vb{v}\T\big[\lambda(\lambda\mat{I} - \mat{S}_0)\inv - \mat{I}\big]\vb{v},

where (λI−S0)−1S0=λ(λI−S0)−1−I(\lambda\mat{I} - \mat{S}_0)\inv\mat{S}_0 = \lambda(\lambda\mat{I} - \mat{S}_0)\inv - \mat{I} was used. Randomness enters here: since S0\mat{S}_0 has rotationally invariant distribution, v⊤(λI−S0)−1v\vb{v}\T(\lambda\mat{I} - \mat{S}_0)\inv\vb{v} concentrates at its average over directions, 1ptr⁡(λI−S0)−1→−m(λ)\frac{1}{p}\tr(\lambda\mat{I} - \mat{S}_0)\inv \to -m(\lambda). The equation reduces to 1=θ(−λ m(λ)−1)1 = \theta(-\lambda\,m(\lambda) - 1), namely,

m(λ)=−1+θθλ.m(\lambda) = -\frac{1 + \theta}{\theta\lambda}.

Substituting in γλ m2+(λ+γ−1)m+1=0\gamma\lambda\,m^2 + (\lambda + \gamma - 1)m + 1 = 0 and multiplying by θ2λ\theta^2\lambda gives γ(1+θ)2−θ(1+θ)(λ+γ−1)+θ2λ=0\gamma(1 + \theta)^2 - \theta(1 + \theta)(\lambda + \gamma - 1) + \theta^2\lambda = 0, linear in λ\lambda, with solution

λ=(1+θ)(θ+γ)θ=(1+θ)(1+γθ).\lambda = \frac{(1 + \theta)(\theta + \gamma)}{\theta} = (1 + \theta)\Big(1 + \frac{\gamma}{\theta}\Big).

When is it valid? Function ψ(θ)=(1+θ)(1+γ/θ)=1+θ+γ+γ/θ\psi(\theta) = (1 + \theta)(1 + \gamma/\theta) = 1 + \theta + \gamma + \gamma/\theta has derivative 1−γ/θ21 - \gamma/\theta^2, vanishing at θ=γ\theta = \sqrt{\gamma} with value ψ(γ)=(1+γ)2=λ+\psi(\sqrt{\gamma}) = (1 + \sqrt{\gamma})^2 = \lambda_+. But substitution in the quadratic is insufficient: check that m(λ)m(\lambda) is the correct transform branch. Better inspect equation 1/θ=g(λ)1/\theta = g(\lambda) with g(λ)=−λm(λ)−1=∫xλ−x μ( ⁣dx)g(\lambda) = -\lambda m(\lambda) - 1 = \int \frac{x}{\lambda - x}\,\mu(\dd x). For λ>λ+\lambda > \lambda_+, gg is continuous and strictly decreasing, tends to 0 at ∞\infty and equals g(λ+)=1/γg(\lambda_+) = 1/\sqrt{\gamma} at the edge (zero discriminant, m(λ+)=−1/(γ(1+γ))m(\lambda_+) = -1/\big(\sqrt{\gamma}(1 + \sqrt{\gamma})\big)). Thus a unique solution λ>λ+\lambda > \lambda_+ exists if and only if 1/θ<1/γ1/\theta < 1/\sqrt{\gamma}, namely θ>γ\theta > \sqrt{\gamma}, and then it is ψ(θ)\psi(\theta), increasing on that branch and above λ+\lambda_+. For θ≤γ\theta \le \sqrt{\gamma} no solution lies outside the bulk: no outlier eigenvalue. The threshold is where the secular equation ceases to have a solution outside the bulk. This is a physicist’s derivation: the rigorous version justifies quadratic-form concentration and absence of eigenvalues of S0\mat{S}_0 outside the bulk (Bai and colleagues), and handles the real case carefully. Overlap follows by differentiating the same equation with respect to λ\lambda; we omit it.

Implications for PCA

  1. There is a detection threshold. With p=np = n (γ=1\gamma = 1) a spike is visible only if its added variance exceeds noise variance, θ>1\theta > 1. With p=4np = 4n, if θ>2\theta > 2. Below it the eigenvalue lies in the bulk and cannot be distinguished from noise; one can prove (Onatski, Moreira and Hallin, 2013) that no test in this regime distinguishes “spike” from “no spike” with power tending to 1: the best attains power only somewhat above its level.
  2. The estimator is biased and can be corrected. Since (1+θ)(θ+γ)=λ^1θ(1 + \theta)(\theta + \gamma) = \hat\lambda_1\theta is quadratic in θ\theta, strength is recovered from λ^1>λ+\hat\lambda_1 > \lambda_+ with θ^=12[(λ^1−1−γ)+(λ^1−1−γ)2−4γ ]\hat\theta = \tfrac{1}{2}\big[(\hat\lambda_1 - 1 - \gamma) + \sqrt{(\hat\lambda_1 - 1 - \gamma)^2 - 4\gamma}\,\big]. With γ=0.25\gamma = 0.25 and λ^1=2.5\hat\lambda_1 = 2.5 this gives θ^=1\hat\theta = 1.
  3. The eigenvector is inconsistent. Even above threshold, ⟨v^,v⟩2<1\inner{\hat{\vb{v}}}{\vb{v}}^2 < 1: with γ=0.25\gamma = 0.25 and θ=1\theta = 1 it is 0.60.6, an angle of 39°39°. It tends to 1 only when θ→∞\theta \to \infty or γ→0\gamma \to 0 (for large θ\theta, 1−γ/θ1 - \gamma/\theta). What we call “first principal component” with p∼np \sim n is rotated a finite amount from truth.
  4. With several separated spikes, each has its own γ\sqrt{\gamma} threshold. Counting eigenvalues above λ+\lambda_+ (with estimated σ2\sigma^2) reasonably estimates component count, but has a fuzzy edge: the edge fluctuates O(p−2/3)\bigO(p^{-2/3}), so the figure’s transition is rounded with p=120p = 120.

In low-rank approximation language: Eckart–Young says the best rank-kk approximation retains the kk largest singular values, but not how many are signal. BBP does: those above λ+\lambda_+ and no more (up to fluctuations), replacing numerical rank by statistical rank.

Cleaning correlation matrices

Quantitative finance was where this theory first paid off. The correlation matrix of p=500p = 500 stocks is estimated with T=1000T = 1000 days and used to construct portfolios, so q=p/T=0.5q = p/T = 0.5. The canonical problem is the minimum-variance portfolio: with unit-volatility returns and correlation C\mat{C},

w⋆=C−111⊤C−11,riesgo=w⋆⊤Cw⋆=11⊤C−11.\vb{w}^\star = \frac{\mat{C}\inv\vb{1}}{\vb{1}\T\mat{C}\inv\vb{1}}, \qquad \text{riesgo} = \sqrt{\vb{w}^{\star\T}\mat{C}\vb{w}^\star} = \frac{1}{\sqrt{\vb{1}\T\mat{C}\inv\vb{1}}}.

C\mat{C} is unknown and sample correlation C^\hat{\mat{C}} is used instead. Inverting, C^−1=∑iλ^i−1v^iv^i⊤\hat{\mat{C}}\inv = \sum_i \hat\lambda_i^{-1}\hat{\vb{v}}_i\hat{\vb{v}}_i\T is dominated by smallest eigenvalues, directions that looked quiet in sample, precisely those most contaminated by noise (lower edge λ−=(1−q)2\lambda_- = (1 - \sqrt{q})^2 is much smaller than 1). The optimizer places weight where chance reported little risk. With C=I\mat{C} = \mat{I} and Gaussian data one proves and verifies by simulation that

riesgo realizadoriesgo oˊptimo≈11−q,riesgo prometido en muestrariesgo oˊptimo≈1−q,\frac{\text{riesgo realizado}}{\text{riesgo óptimo}} \approx \frac{1}{\sqrt{1 - q}}, \qquad \frac{\text{riesgo prometido en muestra}}{\text{riesgo óptimo}} \approx \sqrt{1 - q},

so realized risk is 1/(1−q)1/(1 - q) times what the portfolio promises. With q=0.5q = 0.5, twice the promise; with q=0.75q = 0.75, four times. The portfolio optimized on the raw matrix promises more than it can deliver by construction, and the gap grows with qq.

The eigenvalue-clipping cleaning recipe by Laloux, Cizeau, Bouchaud and Potters (1999) uses Marchenko–Pastur to decide which spectrum can be trusted:

  1. Diagonalize C^=∑iλ^iv^iv^i⊤\hat{\mat{C}} = \sum_i\hat\lambda_i\hat{\vb{v}}_i\hat{\vb{v}}_i\T.
  2. Calculate bulk edge λ+=σ2(1+q)2\lambda_+ = \sigma^2(1 + \sqrt{q})^2. Correlations have trace pp and real factors take part of it, so noise has σ2<1\sigma^2 < 1: fit by fixed point, σ2=(p−∑λ^i>λ+λ^i)/#{λ^i≤λ+}\sigma^2 = \big(p - \sum_{\hat\lambda_i > \lambda_+}\hat\lambda_i\big)/\#\{\hat\lambda_i \le \lambda_+\}, iterating with new λ+\lambda_+ until unchanged.
  3. Retain eigenvalues above λ+\lambda_+ and replace all others by their mean, preserving trace.
  4. Reconstruct the matrix and renormalize its diagonal to 1.
InteractiveCleaning a correlation matrix
Sample correlation spectrum (broken axis: market and sectors are on the right)
λ₊ = 2.04
  • sample correlation eigenvalues
  • MP density with fitted σ2\sigma^2
  • retained eigenvalues
  • clipped region (replaced by its mean)
  • true eigenvalues of C\mat{C} (large ones)
Minimum-variance portfolio risk (volatility in units of one asset; lower is better)
Optimal (knowing C\mat{C})
0.434
With cleaned matrix
0.467
With raw matrix
0.622
Raw matrix promise (in sample)
0.304
Realized risk relative to optimal versus q=p/Tq = p/T (mean of several samples)
  • raw matrix
  • cleaned matrix (MP clipping)
  • optimal (1)
  • reference 1/1−q1/\sqrt{1-q} (limit if C=I\mat{C}=\mat{I})
Matrix used
80
0.50
1.0
Assets and observations80 and 160
q=p/Tq = p/T0.500
Retained eigenvalues3
σ2\sigma^2 of noise (fitted)0.701
Edge σ2(1+q)2\sigma^2(1+\sqrt q)^22.042
Realized / optimal risk, raw1.43
Realized / optimal risk, cleaned1.08
Synthetic returns for pp assets with one market factor and three sectors (true correlation C\mat{C} is known, so realized risk is calculated exactly without test noise). Orange spectral bars are eigenvalues surviving clipping; the rest are replaced by their mean. Compare the three matrices (raw, MP clipping, manual threshold): what happens to risk bars? Move p/Tp/T toward 0.9 and click “Sweep TT”: realized raw-portfolio risk shoots up (near asymptotic reference 1/1−q1/\sqrt{1-q} for C=I\mat{C} = \mat{I}) while cleaned risk barely moves. Reduce factor strength: at 0.4 sectors still leave the bulk, at 0.2 they approach the edge and clipping retains only some, and at 0.1 they sink inside. What does that cost in risk, and why so little? Try a manual threshold too high (signal lost) and too low (noise retained).

In the figure true structure has three large eigenvalues (market and two sector contrasts: the three sector indicators span a 3-dimensional space) and the rest of C\mat{C} is white noise with variance 0.70.7. With default strength and q=0.5q = 0.5, clipping retains those three on average (in 100 simulations with p=80p = 80), fits σ2≈0.69\sigma^2 \approx 0.69 (true is 0.700.70), and cleaned portfolio realized risk is 8 % above optimum versus 38 % for raw (slightly below asymptotic 1/0.5−1=41 %1/\sqrt{0.5} - 1 = 41\,\% of C=I\mat{C} = \mat{I}). With q=0.9q = 0.9 raw reaches about 3.53.5 times optimum and cleaned remains 1.111.11. If strength is lowered to 0.10.1, clipping retains only market, but cleaned remains around 1.061.06: a sector too weak to emerge from the bulk added little to the portfolio.

Random matrices inside networks

A neural network is a stack of weight matrices, all initially random. This makes the theory a reading tool for two distinct questions: what happens at initialization (whether signals and gradients survive many layers) and what the weight spectrum says after training.

A newly initialized layer is a Marchenko–Pastur matrix

A linear layer W∈Rdout×din\mat{W} \in \R^{d_{\text{out}}\times d_{\text{in}}} initialized with entries N(0,σw2/din)\Normal(0, \sigma_w^2/d_{\text{in}}) is W=σwG/din\mat{W} = \sigma_w\mat{G}/\sqrt{d_{\text{in}}} with G\mat{G} having entries N(0,1)\Normal(0, 1). Then

WW⊤=σw2 1dinGG⊤\mat{W}\mat{W}\T = \sigma_w^2\,\frac{1}{d_{\text{in}}}\mat{G}\mat{G}\T

is exactly the previous section’s matrix, with p=doutp = d_{\text{out}}, n=dinn = d_{\text{in}} and σ2=σw2\sigma^2 = \sigma_w^2. Its squared singular values follow Marchenko–Pastur with γ=dout/din\gamma = d_{\text{out}}/d_{\text{in}}, and singular values of W\mat{W} fill interval σw [ ∣1−γ∣, 1+γ ]\sigma_w\,[\,\abs{1 - \sqrt{\gamma}},\, 1 + \sqrt{\gamma}\,]. A square layer with σw=1\sigma_w = 1 (γ=1\gamma = 1) preserves length only on average: it doubles some directions and nearly collapses others to 0. One layer is not the issue. A deep network is.

Matrix products and dynamical isometry

Propagating a signal through LL linear layers of NN units gives output–input Jacobian product J=WL⋯W1\mat{J} = \mat{W}_L\cdots\mat{W}_1, traversed transposed by backpropagation gradients. Its singular values govern gradient explosion or vanishing. For square Gaussian matrices the spectrum of J⊤J\mat{J}\T\mat{J} has upper edge (L+1)L+1/LL(L+1)^{L+1}/L^L (the Fuss–Catalan law, giving 4 for L=1L = 1, the Marchenko–Pastur edge with γ=1\gamma = 1), order e Le\,L for large LL. But this describes the few largest singular values. The typical value sinks: median singular value decays exponentially with LL, so nearly all directions vanish while a few explode. The Jacobian is poorly conditioned at moderate depth.

Pennington, Schoenholz and Ganguli (2017) call dynamical isometry the concentration of the entire singular spectrum of J\mat{J} near 1, analyzing it with free random matrices including nonlinearities. For the linear case the remedy is immediate: a product of orthogonal matrices is orthogonal and all singular values equal 1 exactly. Their analysis finds dynamical isometry with tanh⁡\tanh and orthogonal weights (properly scaled), but not with ReLU. The code section measures the linear case.

Trained networks: observations and conclusions

The second question is subtler. Martin and Mahoney (2021) study empirical spectra of weight matrices in trained networks. They observe that, depending on layer training, the spectrum shifts from Marchenko–Pastur-like (as at initialization) to a bulk with outliers and, in well-trained layers of large networks, a heavy tail fitted to power law ρ(λ)∼λ−α\rho(\lambda) \sim \lambda^{-\alpha}. Later work (Martin, Peng and Mahoney, 2021, Nature Communications) proposes metrics based on exponent α\alpha as a quality indicator without test data, used to compare pretrained models. Their results are empirical and interpretation is debated: heavy tails can arise from different mechanisms, and fitting a power law to a few dozen eigenvalues is statistically delicate.

Rather than trust appearances, measure. The next cell (with GPU) trains a small multilayer perceptron on MNIST twice from the same initialization: once with true labels and once with random labels (same images with unrelated labels, which cannot generalize). For each layer it calculates spectrum W\mat{W} and compares it with Marchenko–Pastur using σ2\sigma^2 estimated from its own entry variance.

[ ]Trained network spectrum with true and random labelsLocal GPU
import copy, os, time
import numpy as np
import matplotlib.pyplot as plt
import torch, torch.nn as nn
from torchvision import datasets

t0 = time.time()
torch.manual_seed(0)
dev = "cuda" if torch.cuda.is_available() else "cpu"
root = os.path.join(os.path.expanduser("~"), ".cache", "atlas-data")          # MNIST se descarga la primera vez (unos 11 MB)
tr = datasets.MNIST(root, train=True, download=True)
te = datasets.MNIST(root, train=False, download=True)
prep = lambda d: ((d.data.float() / 255 - 0.1307) / 0.3081).view(-1, 784).to(dev)
Xtr, ytr, Xte, yte = prep(tr), tr.targets.to(dev), prep(te), te.targets.to(dev)

def mlp():
    return nn.Sequential(nn.Linear(784, 512), nn.ReLU(), nn.Linear(512, 512), nn.ReLU(), nn.Linear(512, 10)).to(dev)

def entrenar(modelo, etiquetas, epocas=20, lr=0.05, lote=128):
    opt = torch.optim.SGD(modelo.parameters(), lr=lr, momentum=0.9)
    for _ in range(epocas):
        perm = torch.randperm(len(Xtr), device=dev)
        for i in range(0, len(Xtr), lote):
            idx = perm[i:i + lote]
            perdida = nn.functional.cross_entropy(modelo(Xtr[idx]), etiquetas[idx])
            opt.zero_grad(); perdida.backward(); opt.step()
    with torch.no_grad():
        return (modelo(Xtr).argmax(1) == etiquetas).float().mean().item(), (modelo(Xte).argmax(1) == yte).float().mean().item()

inicial = mlp()
verdaderas, aleatorias = copy.deepcopy(inicial), copy.deepcopy(inicial)
print("etiquetas verdaderas: (acierto en entrenamiento, acierto en test) =", tuple(round(a, 3) for a in entrenar(verdaderas, ytr)))
barajadas = ytr[torch.randperm(len(ytr), device=dev)]                            # las mismas imágenes con etiquetas sin relación
print("etiquetas aleatorias: (acierto en entrenamiento, acierto en test) =", tuple(round(a, 3) for a in entrenar(aleatorias, barajadas)))

def mp_density(x, gamma, sigma2):
    lo, hi = sigma2 * (1 - np.sqrt(gamma)) ** 2, sigma2 * (1 + np.sqrt(gamma)) ** 2
    out = np.zeros_like(x)
    ok = (x > lo) & (x < hi)
    out[ok] = np.sqrt((hi - x[ok]) * (x[ok] - lo)) / (2 * np.pi * gamma * sigma2 * x[ok])
    return out

def espectro(W):
    """Autovalores de la matriz de Gram pequeña de W (los no nulos de W W^T)."""
    W = W.detach().double().cpu().numpy()
    G = W @ W.T if W.shape[0] <= W.shape[1] else W.T @ W
    return np.linalg.eigvalsh(G)

def alfa_hill(ev, xmin):
    """Estimador de máxima verosimilitud (Hill) del exponente de una cola de potencias, con xmin dado."""
    x = ev[ev >= xmin]
    return 1 + len(x) / np.sum(np.log(x / xmin)) if len(x) >= 10 else float("nan")

print(f"\n{'capa':>11} {'modelo':>11} {'|W|/|W0|':>9} {'|W-W0|/|W0|':>12} {'λmax/borde':>11} {'sobre borde':>12} {'α (Hill)':>9}")
fig, ejes = plt.subplots(1, 3, figsize=(11, 3.2), sharey=True)
with torch.no_grad():
    for li in (0, 2):
        W0 = inicial[li].weight
        d_out, d_in = W0.shape
        gam, grande = min(d_out, d_in) / max(d_out, d_in), max(d_out, d_in)
        for j, (nombre, modelo) in enumerate((("inicial", inicial), ("verdaderas", verdaderas), ("aleatorias", aleatorias))):
            W = modelo[li].weight
            ev = espectro(W)
            s2 = float((W.double() ** 2).mean()) * grande                       # varianza de las entradas, escalada: el sigma² de MP
            borde = s2 * (1 + np.sqrt(gam)) ** 2
            n_sobre = int((ev > borde).sum())
            a = alfa_hill(ev, borde)
            print(f"{str(tuple(W.shape)):>11} {nombre:>11} {float(W.norm() / W0.norm()):9.2f} {float((W - W0).norm() / W0.norm()):12.2f} {ev[-1] / borde:11.2f} {n_sobre:12d} {a:9.2f}")
            if li == 2:
                u = np.log10(ev / s2)
                ejes[j].hist(u, bins=40, density=True, alpha=0.7)
                xs = np.linspace(u.min(), max(u.max(), 0.6), 400)
                ejes[j].plot(xs, mp_density(10 ** xs, gam, 1.0) * 10 ** xs * np.log(10), "k")
                ejes[j].axvline(np.log10((1 + np.sqrt(gam)) ** 2), ls="--", c="gray")
                ejes[j].set_title(nombre); ejes[j].set_xlabel("log10(λ / σ²), σ² de las entradas")
ejes[0].set_ylabel("densidad")
plt.tight_layout(); plt.show()
print(f"[{time.time() - t0:.0f} s]")
This cell needs the local lab (PyTorch with your GPU). Start it with npm run lab and open the connection link.

Column λmax/borde divides the largest eigenvalue by the Marchenko–Pastur edge with σ2\sigma^2 from that matrix’s own entries, and sobre borde counts eigenvalues above it. Results from one run (yours will vary somewhat with GPU and system):

LayerModel∥W∥/∥W0∥\norm{\mat{W}}/\norm{\mat{W}_0}∥W−W0∥/∥W0∥\norm{\mat{W}-\mat{W}_0}/\norm{\mat{W}_0}λmax⁡\lambda_{\max}/edgeabove edgeα^\hat\alpha
512×784512\times 784initial1.000.000.990n/a
512×784512\times 784true1.601.215.4302.2
512×784512\times 784random3.533.255.1513.2
512×512512\times 512initial1.000.001.011n/a
512×512512\times 512true1.300.756.1152.1
512×512512\times 512random3.172.8810.3164.4

The true-label network reaches 1.001.00 training accuracy and 0.9850.985 test accuracy; the random-label network reaches 0.470.47 and 0.130.13 (memorizing part of training without generalizing). What the numbers do and do not say:

  • Initialization matches theory. With λmax⁡/borde≈1\lambda_{\max}/\text{borde} \approx 1 and at most one eigenvalue above the edge, the initial spectrum is Marchenko–Pastur with entry variance. This checks theory and cell.
  • Training drives eigenvalues out of the bulk, 5 to 10 times the edge and dozens of them, in both networks. This is a matrix fact: training added structure to W0\mat{W}_0 (low-rank or heavy-tailed) that independent noise with that variance does not explain.
  • But the random-label network moves farther from initialization (3.33.3 times ∥W0∥\norm{\mat{W}_0} versus 1.21.2) and has as many or more outliers. A non-MP spectrum does not prove generalizable learning. It proves weights moved.
  • The Hill exponent does separate the two cases here (2.1 and 2.2 for true labels, 3.2 to 4.4 for random), in the direction predicted by Martin and Mahoney. But with one network per case, one optimizer, 15 to 50 tail points and manually fixed xmin⁡x_{\min}, the estimator’s typical error (α^−1)/k(\hat\alpha - 1)/\sqrt{k} ranges from 0.20.2 to 0.90.9, and a tail fit to a few dozen eigenvalues poorly distinguishes a power law from other tails.

That is the methodological lesson: always check with a control (here, random labels) before reading meaning into spectral shape.

How to read a random matrix paper

The literature mixes four kinds of claim that look similar but guarantee different things. For a first pass, ask which kind each statement is.

TypeExampleWhat to check
Theorem“The ESD of Sn\mat{S}_n converges almost surely to MP”Assumptions (independence, moments, normalization), convergence type (weak, almost sure, in probability)
Asymptotic result used at finite size“λ^1>λ+\hat\lambda_1 > \lambda_+ implies signal”Values of pp and nn, edge fluctuations (O(p−2/3)\bigO(p^{-2/3})), approximation quality at actual size
Heuristic derivationReplicas, cavity method, the secular equation aboveWhich step lacks justification; subsequent numerical or rigorous verification
Empirical evidence“α\alpha correlates with test accuracy”Model count, controls (random labels, other optimizers), whether relation is causal

A checklist for each result:

  1. Which ensemble and normalization? XX⊤/n\mat{X}\mat{X}\T/n is not XX⊤/p\mat{X}\mat{X}\T/p, and W/n\mat{W}/\sqrt{n} is not W\mat{W}. Many apparent contradictions between papers are normalization differences.
  2. Which regime? pp fixed, p/n→γp/n \to \gamma finite, or p≫np \gg n. Results do not transfer automatically.
  3. What converges? Bulk (ESD), extreme eigenvalues, eigenvectors and fluctuations are different results with different assumptions (edge needs a fourth moment, bulk does not).
  4. What is assumed about entries? Independence, equal variance, finite moments. Real data have dependence across variables and time and heavy tails.
  5. How large is “large”? If a paper simulates with p=100p = 100, the edge is fuzzy by 55 or 10 %10\,\%; if it discusses p=104p = 10^4, it is not.
  6. What is proved and what is analogy? Much statistical physics of networks uses random matrices heuristically, sometimes without a theorem.

Implementation from scratch

First simulate the Wigner semicircle, comparing moments against Catalan numbers. In the cell’s second part, averaging many small matrices confirms exact GOE corrections E[m2]=1+1/n\E[m_2] = 1 + 1/n and E[m4]=2+5/n+5/n2\E[m_4] = 2 + 5/n + 5/n^2.

[ ]The semicircle and Catalan numbersBrowser
import numpy as np
from math import comb

rng = np.random.default_rng(0)

def wigner(n, rng):
    """GOE: fuera de la diagonal varianza 1, en la diagonal varianza 2."""
    G = rng.normal(size=(n, n))
    return (G + G.T) / np.sqrt(2)

def semicirculo(x):
    return np.sqrt(np.clip(4 - x**2, 0, None)) / (2 * np.pi)

def catalan(j):
    return comb(2 * j, j) // (j + 1)

n = 200
ev = np.linalg.eigvalsh(wigner(n, rng) / np.sqrt(n))
print(f"n = {n}: λmin = {ev[0]:.3f}, λmax = {ev[-1]:.3f}   (el semicírculo acaba en ±2)")
for k in (2, 4, 6, 8):
    print(f"  m_{k} = {np.mean(ev**k):6.3f}      Catalan C_{k // 2} = {catalan(k // 2)}")

# promedio sobre muchas matrices pequeñas: E[m2] = 1 + 1/n y E[m4] = 2 + 5/n + 5/n²
n_small, reps = 40, 150
m = np.array([[np.mean(np.linalg.eigvalsh(wigner(n_small, rng) / np.sqrt(n_small)) ** k) for k in (2, 4)] for _ in range(reps)])
print(f"\nn = {n_small}, {reps} matrices:  m2 = {m[:, 0].mean():.3f} (1 + 1/n = {1 + 1/n_small:.3f}),  m4 = {m[:, 1].mean():.3f} (2 + 5/n + 5/n² = {2 + 5/n_small + 5/n_small**2:.3f})")

With n=200n = 200 the second and fourth moments match Catalan within tenths of a percent and a few percent (higher moments fluctuate more: order 8 differs by 7 %7\,\% for one matrix), and smallest and largest eigenvalues are within 0.020.02 of ±2\pm 2, as O(n−2/3)\bigO(n^{-2/3}) distance predicts. Now Marchenko–Pastur: density, its distribution function (numerical quadrature), Kolmogorov distance of spectrum to theory for four entry distributions, and the atom at 0 when p>np > n.

[ ]Marchenko–Pastur and universalityBrowser
def mp_edges(gamma, sigma2=1.0):
    return sigma2 * (1 - np.sqrt(gamma)) ** 2, sigma2 * (1 + np.sqrt(gamma)) ** 2

def mp_density(x, gamma, sigma2=1.0):
    lo, hi = mp_edges(gamma, sigma2)
    x = np.asarray(x, dtype=float)
    dentro = (x > lo) & (x < hi)
    out = np.zeros_like(x)
    out[dentro] = np.sqrt((hi - x[dentro]) * (x[dentro] - lo)) / (2 * np.pi * gamma * sigma2 * x[dentro])
    return out

def mp_cdf(x, gamma, sigma2=1.0):
    lo, hi = mp_edges(gamma, sigma2)
    malla = np.linspace(lo, hi, 4001)
    dens = mp_density(malla, gamma, sigma2)
    acum = np.concatenate([[0], np.cumsum((dens[1:] + dens[:-1]) / 2 * np.diff(malla))])
    atomo = max(0.0, 1 - 1 / gamma)
    return atomo + np.interp(x, malla, acum, left=0, right=acum[-1]) * (np.asarray(x) >= 0)

def ks(autovalores, gamma):
    w = np.sort(autovalores)
    F = mp_cdf(w, gamma)
    i = np.arange(1, len(w) + 1) / len(w)
    return max(np.max(np.abs(i - F)), np.max(np.abs(i - 1 / len(w) - F)))

p, n = 200, 600
gamma = p / n
muestras = {
    "gaussiana": lambda s: rng.normal(size=s),
    "Rademacher": lambda s: rng.choice([-1.0, 1.0], size=s),
    "t con ν = 5": lambda s: rng.standard_t(5, size=s) / np.sqrt(5 / 3),     # varianza 1
    "t con ν = 3": lambda s: rng.standard_t(3, size=s) / np.sqrt(3),         # varianza 1, sin cuarto momento
}
lo, hi = mp_edges(gamma)
print(f"γ = {gamma:.3f}: bordes teóricos [{lo:.3f}, {hi:.3f}]\n")
espectros = {}
for nombre, sorteo in muestras.items():
    X = sorteo((p, n))
    w = np.linalg.eigvalsh(X @ X.T / n)
    espectros[nombre] = w
    print(f"{nombre:12s} λmin = {w[0]:.3f}  λmax = {w[-1]:6.3f}  distancia KS = {ks(w, gamma):.3f}")

# más variables que observaciones: el átomo en 0
Xw = rng.normal(size=(300, 150))
w = np.linalg.eigvalsh(Xw @ Xw.T / 150)
print(f"\nγ = 2: fracción de autovalores nulos = {np.mean(w < 1e-9):.3f}   (1 - 1/γ = 0.5)")

Kolmogorov distance is of order 0.010.01 for the first three distributions, and largest eigenvalues of Gaussian and Rademacher lie somewhat below edge 2.492.49 (the edge is a limit and at this size the maximum often stays slightly inside). tt with 5 degrees has finite fourth moment and its λmax⁡\lambda_{\max} (2.532.53) is somewhat above, but converges to λ+\lambda_+ very slowly. tt with 3 degrees retains an MP bulk (distance increases to 0.050.05 due to tails) and its largest eigenvalue is 3.33.3: 34 % above the edge, much more for other seeds.

Now the spiked model. The cell measures λ^1\hat\lambda_1 and overlap ⟨v^,v⟩2\inner{\hat{\vb{v}}}{\vb{v}}^2 and compares with theorem formulas, using p=100p = 100 and n=400n = 400 (γ=0.25\gamma = 0.25, threshold 0.50.5).

[ ]Measuring the BBP transitionBrowser
def con_pico(p, n, theta, rng):
    X = rng.normal(size=(p, n))
    X[0] *= np.sqrt(1 + theta)               # Σ = I + θ e1 e1ᵀ: la variable 1 tiene varianza 1 + θ
    w, V = np.linalg.eigh(X @ X.T / n)
    return w[-1], V[0, -1] ** 2

def limite_lambda(theta, gamma):
    return (1 + theta) * (1 + gamma / theta) if theta > np.sqrt(gamma) else (1 + np.sqrt(gamma)) ** 2

def limite_solape(theta, gamma):
    return (1 - gamma / theta**2) / (1 + gamma / theta) if theta > np.sqrt(gamma) else 0.0

p, n = 100, 400
gamma = p / n
print(f"γ = {gamma}, umbral √γ = {np.sqrt(gamma):.3f}, borde λ+ = {(1 + np.sqrt(gamma))**2:.3f}\n")
print(f"{'θ':>5} {'λ1 medido':>10} {'λ1 teoría':>10} {'cos² medido':>12} {'cos² teoría':>12}")
for theta in (0.3, 0.5, 1.0, 2.0, 4.0):
    r = np.array([con_pico(p, n, theta, rng) for _ in range(6)])
    print(f"{theta:5.1f} {r[:, 0].mean():10.3f} {limite_lambda(theta, gamma):10.3f} {r[:, 1].mean():12.3f} {limite_solape(theta, gamma):12.3f}")

Above threshold (θ≥1\theta \ge 1), λ^1\hat\lambda_1 follows theory within a few percent (2.432.43 versus 2.502.50; 3.353.35 versus 3.3753.375), and overlap differs by up to 0.080.08 (at θ=1\theta = 1, measured 0.520.52 and theoretical 0.600.60), because p=100p = 100 is not infinite. Below, the eigenvalue remains at the edge and overlap is small. At θ=γ\theta = \sqrt{\gamma} finite size blurs the threshold: measured overlap is 0.180.18 rather than 0, as in the figure.

Finally, end-to-end correlation cleaning: a true correlation with three sectors, minimum-variance portfolios built with raw and clipped matrices using fixed-point fit of σ2\sigma^2, and realized risk against optimum, known exactly because C\mat{C} is known.

[ ]Eigenvalue clipping and minimum-variance portfolioBrowser
def correlacion_verdadera(p, intensidad=1.0, sectores=3):
    s = np.arange(p) * sectores // p
    C = 0.12 * intensidad + 0.18 * intensidad * (s[:, None] == s[None, :])
    np.fill_diagonal(C, 1.0)
    return C

def recorte_mp(E, q):
    """Conserva los autovalores sobre el borde de MP y promedia el resto; σ² por punto fijo."""
    w, V = np.linalg.eigh(E)
    p = len(w)
    sigma2 = 1.0
    for _ in range(100):
        ruido = w <= sigma2 * (1 + np.sqrt(q)) ** 2
        nuevo = (p - w[~ruido].sum()) / ruido.sum()          # la traza es p: el ruido se lleva lo que sobra
        if abs(nuevo - sigma2) < 1e-10:
            break
        sigma2 = nuevo
    ruido = w <= sigma2 * (1 + np.sqrt(q)) ** 2
    w_lim = np.where(ruido, w[ruido].mean(), w)
    A = (V * w_lim) @ V.T
    d = np.sqrt(np.diag(A))
    return A / np.outer(d, d), int((~ruido).sum()), sigma2

def cartera_minvar(A):
    y = np.linalg.solve(A, np.ones(len(A)))
    return y / y.sum()

p, T = 50, 100
C = correlacion_verdadera(p)
L = np.linalg.cholesky(C)
w0 = cartera_minvar(C)
optimo = np.sqrt(w0 @ C @ w0)
cruda, limpia, prometido = [], [], []
for _ in range(40):
    R = rng.normal(size=(T, p)) @ L.T                       # T días de rendimientos con correlación C
    E = np.corrcoef(R, rowvar=False)
    w = cartera_minvar(E)
    cruda.append(np.sqrt(w @ C @ w) / optimo)
    prometido.append(np.sqrt(w @ E @ w) / optimo)
    A, k, s2 = recorte_mp(E, p / T)
    wl = cartera_minvar(A)
    limpia.append(np.sqrt(wl @ C @ wl) / optimo)
print(f"p = {p}, T = {T} (q = {p / T}), 40 muestras. Riesgo relativo al óptimo:")
print(f"  prometido por la cruda (en muestra): {np.mean(prometido):.3f}   (√(1-q) = {np.sqrt(1 - p / T):.3f} si C = I)")
print(f"  realizado con la cruda:              {np.mean(cruda):.3f}")
print(f"  realizado con el recorte MP:         {np.mean(limpia):.3f}   (conserva {k} autovalores, σ² = {s2:.3f})")

The raw portfolio promises risk 24 %24\,\% below optimum (impossible!) and ends 38 %38\,\% above it, while clipping retains the three structural eigenvalues, estimates σ2≈0.70\sigma^2 \approx 0.70 (true is 0.70.7) and ends 8 %8\,\% above optimum.

The professional version

For the semicircle, scipy.linalg.eigvalsh_tridiagonal computes tridiagonal matrix eigenvalues in O(n2)\bigO(n^2) instead of O(n3)\bigO(n^3), so Dumitriu–Edelman simulates GOE size 2000 without constructing it.

[ ]Tridiagonal GOE with SciPyBrowser
from scipy.linalg import eigvalsh_tridiagonal

def goe_tridiagonal(n, rng):
    d = rng.normal(size=n) * np.sqrt(2)                          # diagonal N(0, 2)
    e = np.sqrt(rng.chisquare(np.arange(n - 1, 0, -1)))          # subdiagonal chi_{n-1}, ..., chi_1
    return eigvalsh_tridiagonal(d, e) / np.sqrt(n)

ev = goe_tridiagonal(2000, rng)
F = 0.5 + ev * np.sqrt(4 - ev**2) / (4 * np.pi) + np.arcsin(ev / 2) / np.pi      # función de distribución del semicírculo
i = np.arange(1, len(ev) + 1) / len(ev)
ks_sc = max(np.abs(i - F).max(), np.abs(i - 1 / len(ev) - F).max())
print(f"n = 2000 (tridiagonal): λmax = {ev[-1]:.3f}, m2 = {np.mean(ev**2):.3f}, m4 = {np.mean(ev**4):.3f}, KS = {ks_sc:.4f}")

GOE of size 2000 has m2≈1m_2 \approx 1, m4≈2m_4 \approx 2 and Kolmogorov distance order 10−310^{-3}, without forming a matrix of 4 million entries.

For cleaning, the standard alternative always worth comparing with clipping is Ledoit and Wolf’s (2004) linear shrinkage: rather than clipping the spectrum it mixes sample covariance with a scaled identity, (1−δ)S+δμI(1 - \delta)\mat{S} + \delta\mu\mat{I}, with weight δ\delta estimated from the data. The calculation fits in six lines.

[ ]Ledoit–Wolf shrinkage from scratchBrowser
def ledoit_wolf(R):
    """Encogimiento lineal hacia mu*I de Ledoit y Wolf (2004). R: observaciones en filas."""
    n_obs, p_var = R.shape
    X = R - R.mean(axis=0)
    S = X.T @ X / n_obs
    mu = np.trace(S) / p_var
    d2 = np.sum((S - mu * np.eye(p_var)) ** 2) / p_var                          # dispersión de los autovalores
    b2 = (np.sum(np.sum(X**2, axis=1) ** 2) - n_obs * np.sum(S**2)) / (n_obs**2 * p_var)   # ruido de estimar S
    delta = min(b2, d2) / d2
    return (1 - delta) * S + delta * mu * np.eye(p_var), delta

lw_riesgo, deltas = [], []
for _ in range(40):                                          # las mismas 40 muestras (en distribución) que la celda anterior
    R = rng.normal(size=(T, p)) @ L.T
    Cc, delta = ledoit_wolf(R)
    d = np.sqrt(np.diag(Cc))
    w_lw = cartera_minvar(Cc / np.outer(d, d))
    lw_riesgo.append(np.sqrt(w_lw @ C @ w_lw) / optimo)
    deltas.append(delta)
print(f"Ledoit-Wolf, 40 muestras: encogimiento medio = {np.mean(deltas):.3f}, riesgo realizado / óptimo = {np.mean(lw_riesgo):.3f}")

The scikit-learn version performs the same calculation with input checks and returns the same coefficient:

from sklearn.covariance import LedoitWolf

lw = LedoitWolf().fit(R)            # R: matriz (observaciones, variables)
Cc, delta = lw.covariance_, lw.shrinkage_

Linear shrinkage (mean coefficient 0.220.22) moves realized risk from 1.381.38 times optimum to 1.111.11: much better than raw, but not matching clipping (1.081.08) in this example, where a few strong factors match clipping assumptions. Elsewhere the ordering can change, which is why both options should be measured.

Finally, depth’s effect on the spectrum of a matrix product, Gaussian versus orthogonal, with N=100N = 100.

[ ]Matrix products: Gaussian versus orthogonalBrowser
def producto(N, L, rng, ortogonal):
    P = np.eye(N)
    for _ in range(L):
        G = rng.normal(size=(N, N))
        W = np.linalg.qr(G)[0] if ortogonal else G / np.sqrt(N)
        P = W @ P
    return P

N = 100
print(f"{'L':>3} | {'gaussianas: s_max':>18} {'mediana':>9} {'s_min':>9} | {'ortogonales: s_max':>19} {'s_min':>7} | cota (L+1)^(L+1)/L^L para s_max²")
for L_ in (1, 5, 10, 20):
    sg = np.linalg.svd(producto(N, L_, rng, False), compute_uv=False)
    so = np.linalg.svd(producto(N, L_, rng, True), compute_uv=False)
    print(f"{L_:3d} | {sg[0]:18.3f} {np.median(sg):9.2e} {sg[-1]:9.1e} | {so[0]:19.3f} {so[-1]:7.3f} | {(L_ + 1) ** (L_ + 1) / L_ ** L_:.2f} (medido: {sg[0] ** 2:.2f})")

With Gaussian matrices, median singular value goes from 0.80.8 (L=1L = 1) to about 10−310^{-3} at depth 20 and the smallest falls below double-precision resolution (printed 10−1710^{-17} is already rounding error: the true value is smaller), while the largest grows from 1.91.9 to 4.84.8: spread exceeding three orders of magnitude that no optimizer compensates well. With orthogonal matrices, maximum and minimum are 1 at every depth. The Fuss–Catalan edge is the N→∞N \to \infty limit with fixed LL and at N=100N = 100 is reached only slowly (at L=20L = 20 measured smax⁡2s_{\max}^2 is less than half theoretical), another reminder that asymptotic formulas require N≫LN \gg L.

Common mistakes

Exercises

NumericThe bulk edge
For p/n→γ=0.25p/n \to \gamma = 0.25 and variance-one entries, what is the upper edge λ+\lambda_+ of the Marchenko–Pastur bulk?
NumericLargest eigenvalue with a spike
The true covariance is I+θvv⊤\mat{I} + \theta\vb{v}\vb{v}\T with θ=1\theta = 1 and γ=0.25\gamma = 0.25. Since θ>γ\theta > \sqrt{\gamma}, the largest sample eigenvalue tends to (1+θ)(1+γ/θ)(1 + \theta)(1 + \gamma/\theta). What value?
NumericHow similar is the eigenvector
With the same data (γ=0.25\gamma = 0.25, θ=1\theta = 1), what is the limiting squared overlap ⟨v^,v⟩2\inner{\hat{\vb{v}}}{\vb{v}}^2 between sample and true eigenvectors?
NumericA poorly conditioned identity
The data are Gaussian with true covariance Ip\mat{I}_p, and p/n→γ=0.25p/n \to \gamma = 0.25. What is the limiting condition number of sample covariance S\mat{S}?
NumericMore variables than observations
A sample covariance of p=300p = 300 variables with n=100n = 100 Gaussian observations. What fraction of its 300300 eigenvalues is exactly 0?
NumericWhat the raw portfolio promises
Independent Gaussian returns (true correlation I\mat{I}) for pp assets, TT observations and q=p/T=0.75q = p/T = 0.75. Construct the minimum-variance portfolio using sample correlation. Approximately how many times larger is realized risk than promised in-sample risk?
NumericFrom a measured eigenvalue to the spike and angle
With p=500p = 500 assets and n=1000n = 1000 days (γ=0.5\gamma = 0.5, threshold γ=0.707\sqrt{\gamma} = 0.707, edge λ+=2.914\lambda_+ = 2.914) the largest sample eigenvalue is 3.13.1. Assuming the single-spike model, estimate θ^\hat\theta by inverting λ^1=(1+θ)(1+γ/θ)\hat\lambda_1 = (1 + \theta)(1 + \gamma/\theta) (root θ>γ\theta > \sqrt{\gamma}) and use it to calculate limiting overlap ⟨v^,v⟩2\inner{\hat{\vb{v}}}{\vb{v}}^2.
QuizWhat is universal and what is not
Let X∈Rp×n\mat{X} \in \R^{p\times n} with iid entries of mean 0 and variance 1, and Sn=1nXX⊤\mat{S}_n = \frac{1}{n}\mat{X}\mat{X}\T with p/n→γ>0p/n \to \gamma > 0. Which statements are true?

More than one answer may be correct.

QuizWhy σ² is fitted
When cleaning a correlation matrix (diagonal 1, trace pp) with three strong factors, the edge used is not (1+q)2(1 + \sqrt{q})^2 but σ2(1+q)2\sigma^2(1 + \sqrt{q})^2 with σ2<1\sigma^2 < 1. Why?
QuizThree weight spectra
In the MNIST experiment, the 512×512512 \times 512 layer yielded the following. Initial: λmax⁡\lambda_{\max} equals the MP edge calculated with its entry variance. Trained on true labels (test accuracy 0.9850.985): λmax⁡\lambda_{\max} about 6 times the edge, 15 eigenvalues above it and α^≈2.1\hat\alpha \approx 2.1. Trained on random labels (test accuracy 0.130.13): λmax⁡\lambda_{\max} about 10 times the edge, 16 eigenvalues above, α^≈4.4\hat\alpha \approx 4.4 and distance from initialization about 4 times greater than the previous one. Which claims are justified by these data?

More than one answer may be correct.

QuizTheorem, heuristic or evidence?
Which claims are proved under their assumptions rather than heuristic or empirical evidence?

More than one answer may be correct.

ProofThe first Wigner moments
Prove: Let Wn\mat{W}_n be a Wigner matrix with off-diagonal entries of mean 0, variance 1 and finite fourth moment (diagonal mean 0 and finite variance σd2\sigma_d^2), and let Xn=Wn/n\mat{X}_n = \mat{W}_n/\sqrt{n}. Then E[tr⁡(Xn2)]/n→1\E[\tr(\mat{X}_n^2)]/n \to 1 and E[tr⁡(Xn4)]/n→2\E[\tr(\mat{X}_n^4)]/n \to 2.
0
Write Etr⁡(Xn2)=n−1∑i,jE[WijWji]\E\tr(\mat{X}_n^2) = n^{-1}\sum_{i,j}\E[W_{ij}W_{ji}] and Etr⁡(Xn4)=n−2∑i,j,k,lE[WijWjkWklWli]\E\tr(\mat{X}_n^4) = n^{-2}\sum_{i,j,k,l}\E[W_{ij}W_{jk}W_{kl}W_{li}], and recall that Wij=WjiW_{ij} = W_{ji}.

Step 1 of 4. What is E[tr⁡(Xn2)]/n\E[\tr(\mat{X}_n^2)]/n?

CodeMP density and noise level
Implement two functions. mp_density(x, gamma, sigma2=1.0) returns the continuous part of Marchenko–Pastur density with parameters (γ,σ2)(\gamma, \sigma^2) at points of x (a NumPy array), zero outside (λ−,λ+)(\lambda_-, \lambda_+), and also works for γ>1\gamma > 1 (the atom at 0 is excluded). estimar_sigma2(autovalores, gamma) estimates noise level σ2\sigma^2 of a pure-noise sample covariance from the upper bulk edge.
import numpy as np

def mp_density(x, gamma, sigma2=1.0):
  x = np.asarray(x, dtype=float)
  # tu código: bordes, máscara de los puntos dentro del soporte y la fórmula
  return np.zeros_like(x)

def estimar_sigma2(autovalores, gamma):
  # tu código: invierte la fórmula del borde superior
  return 1.0
Shift+Enter to run

Summary

Key idea
When pp and nn are comparable, the spectrum of a structureless data matrix does not concentrate at one value but fills an interval with an exact shape (Wigner, Marchenko–Pastur) depending only on γ=p/n\gamma = p/n; only what protrudes from that bulk can be signal, and BBP specifies how much is needed to protrude.
  • Empirical spectral distribution μA=1n∑δλi\mu_{\mat{A}} = \frac{1}{n}\sum\delta_{\lambda_i} has moments 1ntr⁡Ak\frac{1}{n}\tr\mat{A}^k. In the proportional regime it converges to a deterministic law, although S↛Σ\mat{S} \not\to \mat{\Sigma} in norm.
  • Wigner: the spectrum of Wn/n\mat{W}_n/\sqrt{n} converges to semicircle 12π4−x2\frac{1}{2\pi}\sqrt{4 - x^2} on [−2,2][-2, 2]. Its moments are Catalan numbers: surviving closed walks traverse a tree outward and back.
  • Marchenko–Pastur: that of 1nXX⊤\frac{1}{n}\mat{X}\mat{X}\T converges to a law with edges σ2(1±γ)2\sigma^2(1 \pm \sqrt{\gamma})^2 and, if γ>1\gamma > 1, an atom 1−1/γ1 - 1/\gamma at 0. Edges are discriminant zeros of a quadratic Stieltjes-transform equation. Bulk is universal (finite variance); the edge needs a fourth moment.
  • BBP: with spike θ\theta, the largest eigenvalue leaves the bulk only if θ>γ\theta > \sqrt{\gamma}, toward (1+θ)(1+γ/θ)(1 + \theta)(1 + \gamma/\theta) (always above 1+θ1 + \theta), and its eigenvector has overlap (1−γ/θ2)/(1+γ/θ)<1(1 - \gamma/\theta^2)/(1 + \gamma/\theta) < 1 with truth.
  • Correlation cleaning: inverting raw matrix overpromises (realized risk is 1/1−q1/\sqrt{1-q} times optimum for C=I\mat{C} = \mat{I}). Clipping bulk eigenvalues (with σ2\sigma^2 fitted by trace) recovers nearly all optimum with strong factors. It is not optimal and fails with heavy tails or dependence.
  • Networks: an initialized layer is an MP matrix, a Gaussian product degrades with depth and an orthogonal product does not. Spectrum changes after training, but that does not prove generalization: compare a control (random labels) and distrust tail fits with few points.
  • Reading a paper: ask about ensemble and normalization, regime, what converges, assumptions and whether a claim is theorem, finite-size approximation, heuristic or empirical evidence.