Phase Transitions in Learning Driven by Extremal Data
Authors: Ethan Levien, Trevor GrandPre
Organizations: Department of Mathematics, Dartmouth College, Hanover, NH 03755, USA · Department of Physics, Washington University in St. Louis, St. Louis, MO 63130, USA · National Institute for Theory and Mathematics in Biology, Northwestern University and The University of Chicago, Chicago, IL, USA
We study an extremal regression problem, an example of multiple instance learning (MIL), where the predictors are given as multisets, called bags. The bag elements (called instances) possess hidden labels which are pooled to produce an observed bag-level label. Max pooling is common in MIL applications, but gives rise to vanishing gradients. To handle this, modern MIL pipelines approximate the max with a softmax, treating the sharpness as a learnable parameter, denoted λ. When the max pooling model is the true data generating process, learning will be successful when λ is increased during gradient descent, thereby driving the dynamics into regions of parameter space with vanishing gradients. To understand the conditions under which gradient descent breaks down, we study a minimal model and derive a low dimensional projection of the gradient flow in the joint limit of large bags n and high dimension d with α=lnn/d fixed. The flow has two distinct phase transitions: an intrinsic freezing transition related to the random energy model of disordered systems, and a retrieval transition occurring in modern Hopfield networks. Numerical simulation confirms both the phase diagram and the convergence of the finite-size training gradient to its predicted asymptotic form.
Figures & tables
Figure 1: Standard supervised learning maps each feature vector xi to a label yi=xi⊤β . In MIL, bags Xk of instances are mapped to a single label wk produced by an unobserved selection rule (e.g. the max). The goal is to learn β from (wk,Xk) pairs alone without ever observing which instance determined the label.
Figure 2: Training loss against epoch, for gradient descent from a grid of initial overlaps u0 (colorbar) at two bag sizes. (a) d=22 , n=3 and (b) d=150 , n=1808 . Parameters are (λ0,ρ0)=(0.2,1.7) , α=0.05 , ρtrue=1.2 , q=0.2 , ℓ=100 , with learning rate 0.1 .
Phase
wˉ+
wˉ−
Δ+
Δ−
HR
ρρtrueu
λρ
ρtrue2−ρρtrueu
2αρtrue−λρ
LR
ρρtrueu
2αρ
ρtrue2−ρρtrueu
2α(ρtrue−ρ)
HN
λρ
λρ
ρtrue2−λρ
2αρtrue−λρ
LN
2αρ
2αρ
ρtrue2−2αρ
2α(ρtrue−ρ)
Exact
ρtrue2
2αρtrue
Table 1: Asymptotic normalized bag output w^λ(X±β)/d in each of the four phases (H/L × R/N), the corresponding large- d limit of the target wk/d , which is set by the true generative process alone and so is identical across all four phases, and the resulting per-bag-type residuals Δ± . The color of the cells is used to highlight which quantities are the same.
Figure 3: Gradient-descent trajectories with different u0 (colorbar). The top row shows the dynamics in (u,λ) space with the H/L and R/N phase boundaries shown. The bottom panels show trajectories in (ρ,λ) space, with the H/L boundary shows. the dashed lines denote the invariant manifold defined by Eqs. 15 and 19 . Parameters are (λ0,ρ0)=(0.2,1.7) , α=0.05 , ρtrue=1.2 , q=0.2 , ℓ=100 , run to flow time t=15000 (learning rate 0.1 ).
Figure 4: Convergence of the finite-size training gradient to the asymptotic gradient-flow field. Empirical (λ˙,u˙,ρ˙) compared to the d→∞ theory (dashed line). Parameters are (λ0,ρ0)=(0.2,1.7) , α=0.05 , ρtrue=1.2 , q=0.2 , ℓ=100 . The vertical line marks u⋆ .
REM
MIL Model
System size
N
αd/ln2
Number of terms
2N
n
Exponents
−βNxi
λxik⋅b
Inverse temperature
β
λln2/α
Freezing transition
βc=2ln2
λ⋆=2α
CLT transition
βc/2
λ⋆/2
Table S1: Correspondence between the REM of Sec. S1.2 and the off-target partition function Zn . The sign of the exponents is immaterial because their distribution is symmetric.
Figure S1: Empirical (λ˙,u˙,ρ˙) (solid) and the asymptotic prediction (dashed, same color) against the overlap u , at ρ0=1.7 , ρtrue=1.2 , q=0.2 , ℓ=100 and n=1808 throughout. (a) Three values of α at λ0=0.2 , with d=300 , 150 and 75 . (b) Three initial temperatures at α=0.05 and d=150 . Dotted vertical lines mark u⋆ .
Figure S2: λ˙ against λ0 at fixed overlap, for increasing d (with n=eαd ), and the asymptotic prediction (dashed). Parameters are α=0.05 , ρ0=1.7 , ρtrue=1.2 , q=0.2 , ℓ=100 . Left: u=0.1 , in N throughout. Right: u=0.7 , in R throughout. The vertical line is λ⋆=0.316 .
Figure S3: Error in the initial λ˙ vs. lnd/d , for u=0.1 and u=0.7 , at λ0=0.1 , ρ0=1.7 , α=0.05 , ρtrue=1.2 , q=0.2 , ℓ=100 . d runs from 22 to 270 ( n=3 to 7.3×105 ), marked on the top axis. Grey points are individual datasets, black their mean with the standard error: eight datasets per d up to d=225 , four above. Dashed line: lnd/d through the origin and the smallest- d point.
Neural network grokking -- the abrupt memorization-to-generalization transition -- challenges our understanding of learning dynamics. Through finite-size scaling of gradient avalanche dynamics across eight model scales, we find that grokking is a dimensional phase transition: effective dimensionality~D crosses from sub-diffusive (subcritical, D<1) to super-diffusive (supercritical, D>1) at generalization onset, exhibiting self-organized criticality (SOC). Crucially, D reflects gradient field geometry, not network architecture: synthetic i.i.d.\ Gaussian gradients maintain D≈1 regardless of graph topology, while real training exhibits dimensional excess from backpropagation correlations. The grokking-localized D(t) crossing -- robust across topologies -- offers new insight into the trainability of overparameterized networks.
Ping Wang
Institute of High Energy Physics, Chinese Academy of Science, 100049 Beijing, China
We develop a general mathematical framework to analyze scaling regimes and derive explicit analytic solutions for gradient flow (GF) in large learning problems. Our key innovation is a formal power series expansion of the loss evolution, with coefficients encoded by diagrams akin to Feynman diagrams. We show that this expansion has a well-defined large-size limit that can be used to reveal different learning phases and, in some cases, to obtain explicit solutions of the nonlinear GF. We focus on learning Canonical Polyadic (CP) decompositions of high-order tensors, and show that this model has several distinct extreme lazy and rich GF regimes such as free evolution, NTK and under- and over-parameterized mean-field. We show that these regimes depend on the parameter scaling, tensor order, and symmetry of the model in a specific and subtle way. Moreover, we propose a general approach to summing the formal loss expansion by reducing it to a PDE; in a wide range of scenarios, it turns out to be first-order and solvable by the method of characteristics. We observe a very good agreement of our theoretical predictions with experimental results.
Dmitry Yarotsky, Eugene Golikov, Yaroslav Gusev
Applied AI Institute, Moscow, Russia · Steklov Mathematical Institute of Russian Academy of Sciences, Moscow, Russia.
A scientific theory of deep learning, comprising learning dynamics and statistical properties of learned models, is rapidly gaining attention. One of the corner stones of this development are analytically solvable toy models, allowing for the fully tractable analysis of the learning dynamics. Here we analytically investigate such a toy model using the regularization strength as a tunable external parameter - akin to external fields in statistical physics. In previous studies, (i) an onset of learning transition was predicted analytically and (ii) it was phenomenologically/numerically established that tuning the regularization strength can result in a cascade of phase transitions. The number of those transitions was linked to the geometry of the loss landscape determined by the model complexity. Setting up a rigorous framework underpinning the previous numerical observations, our investigation reveals a precise connection between those cascades of phase transitions, learnable features and the underlying geometry. We provide analytic predictions of these phase transitions as well as tractable order parameters related to learned features. At the level of the minimal model, we connect this macroscopic perspective (that can be condensed into an effective description) to the microscopic perspective in terms of the geometry of the loss landscape characterized by the Hessian spectrum. Thus, the presented model provides a platform to explore and sharpen advances made in the scientific theory of deep learning rooted in statistical physics concepts.
Björn Ladewig, Ibrahim Talha Ersoy, Karoline Wiesner
Institute of Physics and Astronomy, University of Potsdam