Spectral filters, and where a scaling exponent comes from
Regularization and early stopping keep strong directions and kill weak ones (A). Count how many directions survive at sample size n, and the slope of the learning curve is set by the spectrum (B).
A. Ridge and stopped gradient flow as filters on the eigenvalues
WB2 §4. Loss (1/2n)‖Xβ−y‖², eigen-decomposition XᵀX = V diag(sk²) Vᵀ, fit β̂ = Σk φk β̂OLSk vk. Both curves are exact formulas.
B. Test loss vs n for ridge on a power-law spectrum
WB5 §1. Gaussian features with covariance eigenvalues λk = k−α; target y = Σ βkxk + ε, with per-mode signal power ck² = λkβk² ∝ k−α′ (normalized Σck² = 1), so the unresolved tail Σk>K ck² ≈ K−(α′−1)/((α′−1)ζ(α′)); noise variance σ². Infinite number of features.
Formulas and checks
A. Ridge minimizes (1/2n)‖Xβ−y‖² + (λ/2)‖β‖², so β̂ = (XᵀX+nλI)⁻¹Xᵀy. Gradient flow dβ/dt = −(1/n)Xᵀ(Xβ−y) from β(0)=0 gives φk(t) = 1−e−sk²t/n. Half-points: ridge at s²/n = λ, flow at s²/n = ln2/t. df = Σkφk is summed over k = 1…∞ with sk²/n = k−α.
B. Ridge with the same nλ convention, population features. Effective regularization κ solves κ(1 − df₁/n) = λ, with df₁ = Σλk/(λk+κ) and df₂ = Σλk²/(λk+κ)². Excess test loss E = (κ²Σck²/(λk+κ)² + σ²)/(1 − df₂/n) − σ² (Hastie–Montanari–Rosset–Tibshirani; Bach 2023; Simon et al. “eigenlearning”). λ is optimized numerically over λ ≥ 0. Heuristic: Eheur = minK≤n[Σk>Kck² + σ²K/n]. Predicted exponent: s = min(α′−1, 2α) without noise, and s/(s+1) with noise.
Checks (checks/spectral_filters_check.py): the filter formulas match direct linear algebra and small-step GD to within 1e-6. The DE matches Monte Carlo ridge to within 1–7% for n = 16…800 at several settings. The DE’s slopes over n ∈ [10⁴,10⁵] match the predicted exponents (1.000, 2.000, 0.500, and 3.000 in the saturated case α=1.5, α′=5, where the heuristic says 4). This page recomputes reference values on load and logs the comparison to the console.