arXiv:2610.29531cs.LGOct 2026

Manuscript Offprint

arXiv:2610.29531

Phase Transitions in Learning Driven by Extremal Data

Ethan Levien, Trevor GrandPre

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Ethan Levien 1,∗^{1,*} and Trevor GrandPre 2,3,†^{2,3,\dagger}

1^{1}Department of Mathematics, Dartmouth College, Hanover, NH 03755, USA

2^{2}Department of Physics, Washington University in St. Louis, St. Louis, MO 63130, USA

3^{3}National Institute for Theory and Mathematics in Biology,

Northwestern University and The University of Chicago, Chicago, IL, USA

(Dated: October 22, 2026)

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 λ\lambda. When the max pooling model is the true data generating process, learning will be successful when λ\lambda 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 α=ln⁡n/d\alpha = \ln n/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.

Introduction.—

Many supervised learning problems in the natural sciences can be formulated as having set valued inputs (sets of images, pieces of text, immune repertoire sequences) where the labels are determined by a small fraction, or even a single element in the set. For example, the strongest binding antibody sequence or image containing an object of interest. These are examples of Multiple Instance Learning (MIL) [1–5]. In the MIL literature, the sets are called bags and the elements of the bags are called instances. A label is assigned at the bag level by pooling over latent instance-level labels or scores [1, 6, 7]. Learning in MIL problems is challenging because the instance level labels are unobserved and the mapping from instance level to bag level labels is typically highly nonlinear.

We consider real valued bags, represented as matrixes Xk∈Rn×dX^k \in \mathbb{R}^{n \times d} whose rows xi∈Rd\boldsymbol{x}_i \in \mathbb{R}^d are the instances, and take the true labels to be generated via

wk=max⁡(yk),yk=Xβtrue.(1)w^{k}=\max(\boldsymbol{y}^{k}),\qquad\boldsymbol{y}^{k}=X\boldsymbol{\beta}_{true}. \tag{1}

Figure 1 depicts an example. We assume that some bags are “positive,” meaning they contain the target direction βtrue\beta_{true} in feature space, while others are sampled from a background distribution. In applications, such instances might correspond to a nondiagnostic tissue patch or a molecular conformation that does not mediate binding. To learn βtrue\beta_{true}, the max is approximated with a softmax whose sharpness, λ\lambda is itself learnable. When does gradient descent actually recover βtrue\beta_{true}?

Using the REM correspondence of [8, 9], we obtain a low-dimensional description of the gradient descent dynamics as n,d→∞n, d \to \infty. This dynamics exhibits two phase transitions: One is a freezing transition inherited from the REM and the other is a retrieval transition arising from competition between the growth of the softmax weight on the planted instance in positive bags and the sum over the other weights.

As a result of these phase transitions the gradient dynamics become insensitive to the angle between the learned direction and βtrue\beta_{true} until the dynamics enters the retrieval phase. Separately, the gradient of λ\lambda vanishes upon reaching the low-temperature branch of the REM transition. We show numerically both that this phase diagram of the limit system accurately predicts key attributes of the finite-size training trajectories and that the finite- (n,d,ℓ)(n, d, \ell) training gradient itself converges to the asymptotic gradient-flow field we derive (Supplemental Material, Sec. S6).

Related work.—MIL was formalized by Dietterich et al. [1] and Maron and Lozano-Pérez presented a general framework built on the notion of a hidden concept point [6, 7]. Early algorithmic approaches include diverse-density/EM-DD [10], MI-SVM [11], and multi-instance kernels [12]. Theoretical results for learnability of classification MIL problems have been studied in [13–15]. We study multiple-instance regression specifically, which was studied beginning with Ray and Page [16] and Wagstaff and Lane [17] and subsequently extended in [18–21]. Softmax-smoothed pooling with a learnable temperature was introduced in [22] and applied to immune repertoire classification in [23]. Softmax pooling is also at the core of self-attention layers in transformers [24] and of modern Hopfield networks [25, 26]. The storage capacity for continuous pattern retrieval in Hopfield networks was analyzed via a random-energy-model (REM) correspondence by Lucibello and Mézard [8], building on the classical REM [9, 27, 28] and its sum-of-exponentials limit the-

Standard

supervised learning

Multiple

instance learning

Figure

FIG. 1. Standard supervised learning maps each feature vector xix_i to a label yi=xi⊤βy_i = x_i^\top \beta. In MIL, bags XkX^k of instances are mapped to a single label wkw^k produced by an unobserved selection rule (e.g. the max). The goal is to learn β\beta from (wk,Xk)(w^k, X^k) pairs alone without ever observing which instance determined the label.

orems [29]. Supplemental Material Sec. S4 makes the correspondence between our retrieval transition and pattern retrieval in these models precise. See also [30] for a general mathematical treatment of attention.

Data generating process.—We consider a dataset {wk,Xk}k=1ℓ\{w^k, X^k\}_{k=1}^\ell with Xk∈Rn×dX^k \in \mathbb{R}^{n \times d} and wkw^k given by Eq. (1). The background population is modeled iid Gaussian, xi∼Normal(0,Id)\boldsymbol{x}_i \sim \text{Normal}(0, I_d). For a fraction qq of bags, one instance is of βtrue\beta_{\text{true}} is then planted in the bags. It will be useful to separate the direction of the learned regression vector from its norm; thus, we write βtrue=ρtruebtrue\beta_{\text{true}} = \rho_{\text{true}} \boldsymbol{b}_{\text{true}} and the learned regression vector as β=ρb\boldsymbol{\beta} = \rho \boldsymbol{b} with ∥b∥2=∥btrue∥2=d\|\boldsymbol{b}\|^2 = \|\boldsymbol{b}_{\text{true}}\|^2 = d.

Motivated by real MIL data sets where there can be hundreds of thousands of instances per bag, we will take the large nn limit. The dimension dd is often controlled by the model architecture; specifically, how the raw data such as image patches or sequences are embedded as real vectors. For iid Gaussian instances, this embedding dimension must scale with the bag size for the βtrue\beta_{\text{true}} to be learnable, and the scaling is dictated by the order of the extremes, since this competes with the planted instances. A basic result in the theory of extremal statistics states that for nn iid standard Gaussian xix_i, (ln⁡n)−1/2max⁡ixi→2(\ln n)^{-1/2} \max_i x_i \to \sqrt{2} almost surely [31, Lemma 9.1.1]. In our notation, ⟨xi,b⟩∼Normal(0,d)\langle \boldsymbol{x}_i, \boldsymbol{b} \rangle \sim \text{Normal}(0, d), motivating us to define α=ln⁡n/d\alpha = \ln n/d, so that

⟨xi,b⟩/d→2α.(2)\langle\boldsymbol{x}_{i},\boldsymbol{b}\rangle/d\to\sqrt{2\alpha}. \tag{2}

The positive bags are identifiable (i.e. the planted instance realizes the true maximum) only when α=ln⁡n/d<ρtrue2/2\alpha = \ln n/d < \rho_{\text{true}}^2/2. We work in this identifiable regime

(a)

(b)

Figure

FIG. 2. Training loss against epoch, for gradient descent from a grid of initial overlaps u0u_0 (colorbar) at two bag sizes. (a) d=22d = 22, n=3n = 3 and (b) d=150d = 150, n=1808n = 1808. Parameters are (λ0,ρ0)=(0.2,1.7)(\lambda_0, \rho_0) = (0.2, 1.7), α=0.05\alpha = 0.05, ρtrue=1.2\rho_{\text{true}} = 1.2, q=0.2q = 0.2, ℓ=100\ell = 100, with learning rate 0.1.

throughout thereby isolating questions about what happens during gradient descent.

Training.—The is the central obstruction to fitting β\beta by gradient descent is the max and it is handled in one of two ways in practice. Classical MIL algorithms treat the label-determining instance as a latent variable and estimate it and β\beta jointly with an EM-type procedure, such as EM-DD [10]. However modern attention-based architectures instead use gradient descent and jointly learn the direction and temperature [22, 23]. We therefore find it natural to ask:

How does gradient decent breakdown as the bag size and embedding dimension grow?

We will write the learned parameter as β=ρb\beta = \rho b, with bb constrained to the sphere ∥b∥2=d\|b\|^2 = d, and fit using the smooth approximation

w^λ(Xb)=σ(λXb)⋅(ρXb)=∑i=1nρyi(eλyi∑jeλyj),(3)\hat{w}_{\lambda}(X\boldsymbol{b})=\sigma(\lambda X\boldsymbol{b})\cdot(\rho X\boldsymbol{b})=\sum_{i=1}^{n}\rho y_{i}\left(\frac{e^{\lambda y_{i}}}{\sum_{j}e^{\lambda y_{j}}}\right), \tag{3}

with σ\sigma the row-wise softmax, yi=⟨xi,b⟩y_i = \langle \boldsymbol{x}_i, \boldsymbol{b} \rangle, and λ\lambda a learnable inverse temperature. This interpolates between the hard max and a unweighted average as λ\lambda tends towards ∞\infty and 0 respectively. Gradient descent is then performed jointly in b\boldsymbol{b}, ρ\rho, and λ\lambda, on the loss

L=⟨(wk−w^λ(Xkb))2⟩ℓ,(4)L=\langle(w^{k}-\hat{w}_{\lambda}(X^{k}\boldsymbol{b}))^{2}\rangle_{\ell}, \tag{4}

where ⟨⋅⟩ℓ\langle\cdot\rangle_{\ell} is the average over ℓ\ell bags. Evaluating the softmax on the normalized scores XbXb ensures that λ\lambda measures the softmax sharpness independently of the learned scale ρ\rho. We define u=⟨b,btrue⟩/du = \langle b, b_{\text{true}} \rangle / d as the normalized overlap between the learned and true directions.

Figure 2 illustrates that, as expected, the loss stalls as d is increased with fixed α\alpha. Moreover, depending on the initial overlap u, the trajectories have a qualitatively different convergence pattern, the signature of which is seen at smaller dd and nn.

Loss asymptotics.—We now derive the d→∞d \to \infty limit of the normalized loss Lˉ:=L/d2\bar{L} := L/d^2 with fixed α\alpha. The d2d^2 normalization is motivated by the fact that all asymptotic of w^λ\hat{w}_{\lambda} scale with dd, thus L=O(d2)L = O(d^2), as will be made clear from the calculations below. Our asymptotic are based on a replacement of w^λ\hat{w}_{\lambda} and wkw_k with their almost sure limits. This approach allows us to explain some of the key phenomena exhibited by the trajectories in spite of the fact that (1) the convergences breaks down at both phase transitions and (2) the convergence rate of 1/d1/d makes it difficult to realize the limit numerically. We discuss this limitations and the precise nature of the convergence in the SI.

Since Lˉ\bar{L} depends on β\beta only through (u,ρ)(u, \rho), we write it as Lˉ(λ,u,ρ)\bar{L}(\lambda, u, \rho), and split it according to whether the bag contains the planted instance,

Lˉ(λ,u,ρ)=qLˉ+(λ,u,ρ)+(1−q)Lˉ−(λ,u,ρ).(5)\bar{L}(\lambda,u,\rho)=q\bar{L}_{+}(\lambda,u,\rho)+(1-q)\bar{L}_{-}(\lambda,u,\rho). \tag{5}

To evaluate Lˉ+\bar{L}_{+} we need the large-dd limit of w^λ(Xβ)\hat{w}_{\lambda}(X\beta) on a positive bag, at overlap uu with the planted pattern. Without loss of generality, let the first instance be the planted one, x1=βtrue\boldsymbol{x}_{1} = \beta_{\mathrm{true}}. The softmax weight of the planted instance is

σ1(b)=eλuρtruedeλuρtrued+Zn,Zn=∑i=2neλ⟨xi,b⟩,(6)\sigma_{1}(\boldsymbol{b})=\frac{e^{\lambda u\rho_{\mathrm{true}}d}}{e^{\lambda u\rho_{\mathrm{true}}d}+Z_{n}},\qquad Z_{n}=\sum_{i=2}^{n}e^{\lambda\langle\boldsymbol{x}_{i},\boldsymbol{b}\rangle}, \tag{6}

using ⟨x1,b⟩=uρtrued\langle \boldsymbol{x}_1, \boldsymbol{b} \rangle = u\rho_{\mathrm{true}}d. Eq. (6) shows that the behavior is governed by the competition between the growth of ZnZ_n and the planted instance's weight, eλuρtruede^{\lambda u\rho_{\mathrm{true}}d}. To this end, we define

ϕα(λ):=lim⁡d→∞1λdlog⁡Zn.(7)\phi_{\alpha}(\lambda):=\lim_{d\to\infty}\frac{1}{\lambda d}\log Z_{n}. \tag{7}

Following [8], ϕα\phi_{\alpha} can be computed exactly based on a mapping to the Random Energy Model (REM), a model of an equilibrium system so disordered that the energies can be treated as independent random variables. The energies are modeled as iid Gaussian random variables, giving rise to a sum over log-normal random variables, exactly as in ZnZ_n (since the planted term has been removed). ϕα(λ)\phi_{\alpha}(\lambda) is thus the scaled free energy of the REM. This free energy is known to exhibit a freezing transition between a regime where Zn≈E[eλ⟨xi,b⟩]Z_n \approx \mathbb{E}[e^{\lambda \langle \boldsymbol{x}_i, \boldsymbol{b} \rangle}] and one where the sum is dominated by the extremal terms.

Specifically, it can be shown that (see Supplemental Material Sec. S2)

ϕα(λ)={α/λ+λ/2,λ<λ⋆2α,λ≥λ⋆\phi_{\alpha}(\lambda)=\begin{cases}\alpha/\lambda+\lambda/2,&\lambda<\lambda^{\star}\\ \sqrt{2\alpha},&\lambda\geq\lambda^{\star}\end{cases}

(H),

(L),

(8)

where λ⋆=2α\lambda^{\star} = \sqrt{2\alpha} is the critical inverse temperature and HH and LL refer respectively to the high and low temperature phases.

Phasewˉ+\bar{w}^{+}wˉ−\bar{w}^{-}Δ+\Delta_{+}Δ−\Delta_{-}
HRρρtrueu\rho\rho_{\text{true}}uλρ\lambda\rhoρtrue2−ρρtrueu\rho_{\text{true}}^{2} - \rho\rho_{\text{true}}u2αρtrue−λρ\sqrt{2\alpha}\rho_{\text{true}} - \lambda\rho
LRρρtrueu\rho\rho_{\text{true}}u2αρ\sqrt{2\alpha}\rhoρtrue2−ρρtrueu\rho_{\text{true}}^{2} - \rho\rho_{\text{true}}u2α(ρtrue−ρ)\sqrt{2\alpha}(\rho_{\text{true}} - \rho)
HNλρ\lambda\rhoλρ\lambda\rhoρtrue2−λρ\rho_{\text{true}}^{2} - \lambda\rho2αρtrue−λρ\sqrt{2\alpha}\rho_{\text{true}} - \lambda\rho
LN2αρ\sqrt{2\alpha}\rho2αρ\sqrt{2\alpha}\rhoρtrue2−2αρ\rho_{\text{true}}^{2} - \sqrt{2\alpha}\rho2α(ρtrue−ρ)\sqrt{2\alpha}(\rho_{\text{true}} - \rho)
Exactρtrue2\rho_{\text{true}}^{2}2αρtrue\sqrt{2\alpha}\rho_{\text{true}}

TABLE I. Asymptotic normalized bag output w^λ(X±β)/d\hat{w}_{\lambda}(X^{\pm}\beta)/d in each of the four phases (H/L × R/N), the corresponding large-dd limit of the target wk/dw^{k}/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 Δ±\Delta_{\pm}. The color of the cells is used to highlight which quantities are the same.

Comparing Eq. (7) to uρtrueu\rho_{\mathrm{true}} (the exponent of the planted instance) yields two phases for the limiting softmax weight corresponded to the retrieval and non-retrieval phase in [8]

lim⁡d→∞σ1(b)={1,ρtrueu>ϕα(λ)0,ρtrueu<ϕα(λ)(9)\lim _ {d \to \infty} \sigma_ {1} (\boldsymbol {b}) = \left\{ \begin{array}{l l} 1, & \rho_ {\text {true}} u > \phi_ {\alpha} (\lambda) \\ 0, & \rho_ {\text {true}} u < \phi_ {\alpha} (\lambda) \end{array} \right. \tag {9}

(R),

(N),

where R and N denote the retrieval and non-retrieval phases. In the retrieval phase, all the softmax weight is on the planted instance, so w^λ/d→⟨β,βtrue⟩/d=ρρtrueu\hat{w}_{\lambda} / d \to \langle \boldsymbol{\beta}, \boldsymbol{\beta}_{\mathrm{true}} \rangle / d = \rho \rho_{\mathrm{true}} u. In the non-retrieval phase, the high-temperature branch instead behaves like an ordinary Gaussian average; using standard Gaussian integrals, we have

1dw^λ→E[⟨xi,β⟩eλ⟨xi,β⟩]E[eλ⟨xi,β⟩]=λρ.(10)\frac {1}{d} \hat {w} _ {\lambda} \rightarrow \frac {\mathbb {E} [ \langle x _ {i}, \boldsymbol {\beta} \rangle e ^ {\lambda \langle x _ {i}, \boldsymbol {\beta} \rangle} ]}{\mathbb {E} [ e ^ {\lambda \langle x _ {i}, \boldsymbol {\beta} \rangle} ]} = \lambda \rho . \tag {10}

The low-temperature branch is instead dominated by the single largest ⟨xi,β⟩\langle x_i, \beta \rangle term, which we have already argued grows as ρ2αd\rho \sqrt{2\alpha} d, giving w^λ/d→2αρ\hat{w}_{\lambda} / d \to \sqrt{2\alpha} \rho. Negative bags contain no planted instance and therefore admit only the two non-retrieval forms. Writing wˉ±:=lim⁡d→∞w^λ(X±β)/d\bar{w}^{\pm} := \lim_{d \to \infty} \hat{w}_{\lambda}(X^{\pm}\beta) / d for the resulting positive/negative-bag output, the H/L and R/N transitions are independent and combine into the four phases of Table I. In each phase, the conditional loss can be written as the square of a corresponding residual, Δ\Delta.

Gradient flow ODEs.—The continuous gradient flow is

λ˙=−∂λLˉ,ρ˙=−∂ρLˉ,b˙=−Pb∇bLˉ,(11)\dot {\lambda} = - \partial_ {\lambda} \bar {L}, \qquad \dot {\rho} = - \partial_ {\rho} \bar {L}, \qquad \dot {\boldsymbol {b}} = - P _ {\boldsymbol {b}} \nabla_ {\boldsymbol {b}} \bar {L}, \tag {11}

where Pbv:=v−⟨v,b⟩b/dP_{\mathbf{b}}v := v - \langle v, \mathbf{b} \rangle \mathbf{b} / d projects onto the tangent space of the sphere dSd−1\sqrt{d} S^{d-1} at b\mathbf{b}. Using that PbP_{\mathbf{b}} is self-adjoint,

u˙=1d⟨b˙,btrue⟩=−1d⟨∇bLˉ,Pbbtrue⟩.(12)\dot {u} = \frac {1}{d} \langle \dot {\boldsymbol {b}}, \boldsymbol {b} _ {\text {true}} \rangle = - \frac {1}{d} \langle \nabla_ {\boldsymbol {b}} \bar {L}, P _ {\boldsymbol {b}} \boldsymbol {b} _ {\text {true}} \rangle . \tag {12}

Lˉ\bar{L} depends on b\pmb{b} only through uu, so ∇bLˉ=btrue∂uLˉ\nabla_{\pmb{b}}\bar{L} = \pmb{b}_{\mathrm{true}}\partial_u\bar{L}. Using ⟨btrue,Pbbtrue⟩=d(1−u2)\langle \pmb{b}_{\mathrm{true}}, P_{\pmb{b}}\pmb{b}_{\mathrm{true}} \rangle = d(1 - u^2) then gives u˙=−(1−u2)∂uLˉ\dot{u} = -(1 - u^2)\partial_u\bar{L}.

For c∈{λ,u,ρ}c \in \{\lambda, u, \rho\} the partial derivatives of Lˉ\bar{L} are approximated as

−∂cLˉ≈2[qΔ∂cwˉ++(1−q)Δ∂cwˉ−],(13)- \partial_ {c} \bar {L} \approx 2 \left[ q \Delta \partial_ {c} \bar {w} ^ {+} + (1 - q) \Delta \partial_ {c} \bar {w} ^ {-} \right], \tag {13}

with Δ\Delta the residual from Table I relevant to that phase and bag type, resulting in a system of piecewise smooth ODEs. The complete set of equations are given in Supplemental Material Sec. S2.

We now consider the fate of a trajectory beginning in the H phase. For a trajectory initially in the HN phase, u˙=0\dot{u}=0, resulting in a two-dimensional system for λ\lambda and ρ\rho:

λ˙=2ρ[qρtrue2+(1−q)2αρtrue−λρ](14)\dot{\lambda}=2\rho\big[q\rho_{\mathrm{t r u e}}^{2}+(1-q)\sqrt{2\alpha}\rho_{\mathrm{t r u e}}-\lambda\rho\big] \tag{14}

and ρ˙=(λ/ρ)λ˙\dot{\rho} = (\lambda/\rho)\dot{\lambda}. Note that since d(ρ2)/dt=2λλ˙d(\rho^{2})/dt = 2\lambda\dot{\lambda}, C=λ02−ρ02C = \lambda_{0}^{2} - \rho_{0}^{2} is conserved along trajectories. The positive fixed points are the hyperbola

λρ=qρtrue2+(1−q)2αρtrue,(15)\lambda\rho=q\rho_{\mathrm{t r u e}}^{2}+(1-q)\sqrt{2\alpha}\rho_{\mathrm{t r u e}}, \tag{15}

restricted to the HN region. If λfp<2α\lambda_{\mathrm{fp}} < \sqrt{2\alpha}, the trajectory equilibrates in HN with uu still fixed at its initial value. If λfp>2α\lambda_{\mathrm{fp}} > \sqrt{2\alpha}, it reaches the temperature boundary first and enters LN, where λ˙=u˙=0\dot{\lambda} = \dot{u} = 0.

If the trajectory starts in HR instead, all three variables evolve:

λ˙=2(1−q)ρ(2αρtrue−λρ),(16)\dot{\lambda}=2(1-q)\rho(\sqrt{2\alpha}\rho_{\mathrm{t r u e}}-\lambda\rho), \tag{16} u˙=2qρρtrue2(ρtrue−ρu)(1−u2),(17)\dot{u}=2q\rho\rho_{\mathrm{t r u e}}^{2}(\rho_{\mathrm{t r u e}}-\rho u)(1-u^{2}), \tag{17} ρ˙=2quρtrue2(ρtrue−ρu)\dot{\rho}=2q u\rho_{\mathrm{t r u e}}^{2}(\rho_{\mathrm{t r u e}}-\rho u) +2(1−q)λ(2αρtrue−λρ).(18)+2(1-q)\lambda(\sqrt{2\alpha}\rho_{\mathrm{t r u e}}-\lambda\rho). \tag{18}

For an interior fixed point, the two residuals must vanish:

ρu=ρtrue,λρ=2αρtrue.(19)\rho u=\rho_{true},\qquad\lambda\rho=\sqrt{2\alpha}\rho_{true}. \tag{19}

Thus the HR fixed set is the curve λ=2αu\lambda = \sqrt{2\alpha}u, ρ=ρtrue/u\rho = \rho_{\text{true}}/u, restricted to the part lying inside HR.

Numerical results.— This analysis suggests that as d→∞d \to \infty the gradient flow exhibits two qualitatively distinct failure modes depending on whether they begin in the R vs N phase. Figure 2 illustrates that this behavior by plotting the loss as a function of time (the epoch) gradient descent for different u0u_0. In this numerical experiments, we are able to see the phase transition is present even at moderate size. In particular, in panel (a) where d=22d = 22, it is see that trajectories exhibit qualitatively distinct dynamics depending on whether they begin in R or N phase. In panel (b) dd is increased and our simulations also show that for fixed α\alpha the loss plateaus for all initial uu, consistent with the theory.

To further illustrate that the limit ODEs indeed capture the dynamics of gradient descent for a trajectory beginning in H, we show the trajectories themselves in Figure 3 in the λ\lambda-u and λ\lambda- ρ\rho planes. The invariant manifolds from Eqs. 15 and 19 are shown as dashed lines. As predicted by our theory, as d grows, we can clearly see the transition between the HN and HR initial conditions. Surprisingly, even though the limit ODEs are a

Figure

FIG. 3. Gradient-descent trajectories with different u0u_0 (colorbar). The top row shows the dynamics in (u,λ)(u, \lambda) space with the H/L and R/N phase boundaries shown. The bottom panels show trajectories in (ρ,λ)(\rho, \lambda) 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)(\lambda_0, \rho_0) = (0.2, 1.7), α=0.05\alpha = 0.05, ρtrue=1.2\rho_{\text{true}} = 1.2, q=0.2q = 0.2, ℓ=100\ell = 100, run to flow time t=15000t = 15000 (learning rate 0.1).

crude approximation, the fixed lines appear to explain much of the variation in the long-time behavior for the trajectories beginning in HN.

In the SI, we show that away from the phase transition, the error in the ODEs scales as O(ln⁡d/d)O(\ln d/d); however, the pre-factor diverges as we approach the phase transition. As more direct comparisons of the asymptotic theory to the gradient itself, we have shown the initial gradient as a function u in Figure 4. In this figure, we can see that the limit ODEs predict the gradients with respect to ρ\rho and u (away from the phase boundary). The gradient with respect to λ\lambda is qualitatively similar, being a step function (away from the phase boundary).

Discussion.—We have studied learning dynamics in a minimal model of multiple instance learning, where there is an extremal selection rule for a planted instance. This problem is meant to exemplify the challenges of applying gradient descent to models where the strength of the nonlinearity (the temperature) is learned, and learning naturally happens into regimes of vanishing gradients. Using tools from disordered systems – namely the random energy model – and applying previous results on Hopfield networks, we have derived limiting ODEs for the low dimensional dynamics of the temperature and

Figure

FIG. 4. Convergence of the finite-size training gradient to the asymptotic gradient-flow field. Empirical (λ˙,u˙,ρ˙)(\dot{\lambda}, \dot{u}, \dot{\rho}) compared to the d→∞d \to \infty theory (dashed line). Parameters are (λ0,ρ0)=(0.2,1.7)(\lambda_0, \rho_0) = (0.2, 1.7), α=0.05\alpha = 0.05, ρtrue=1.2\rho_{\text{true}} = 1.2, q=0.2q = 0.2, ℓ=100\ell = 100. The vertical line marks u∗u^*.

regression coefficients. Our analysis, which accurately predicts numerical experiments with Gaussian data, suggests that one expects to find abrupt transitions in the speed of learning for this system depending on the misalignment of the initial regression coefficients. This suggests it would be worthwhile exploring other methods besides gradient descent for more efficiently tuning the regression coefficients during the early stages of learning. For example, coupling gradient descent with EM-based approaches [21].

Code availability.— The code is available at https://github.com/elevien/extremal-mil.

E.L. and T.G. acknowledge support from the National Institute for Theory and Mathematics in Biology through the National Science Foundation (grant number DMS-2235451) and the Simons Foundation (grant number MP-TMPS-00005320). E.L. acknowledges support from the National Science Foundation (grant number DMS-2527337) and a Dartmouth College Burke Research Initiation Award.

† trevorg@wustl.edu

[1] T. G. Dietterich, R. H. Lathrop, and T. Lozano-Pérez, Artificial Intelligence 89, 31 (1997).

[2] M.-A. Carbonneau, V. Cheplygina, E. Granger, and G. Gagnon, Pattern Recognition 77, 329 (2018).

[3] A. N. Jain, K. Koile, and D. Chapman, Journal of Medicinal Chemistry 37, 2315 (1994).

[4] G. Sliwoski, S. Kothiwale, J. Meiler, and E. W. Lowe Jr, Pharmacological Reviews 66, 334 (2014).

[5] D. Zankov, T. Madzhidov, A. Varnek, and P. Polishchuk, Wiley Interdisciplinary Reviews: Computational Molecular Science 14, e1698 (2024).

[6] O. Maron and T. Lozano-Pérez, in Advances in Neural Information Processing Systems, Vol. 10 (MIT Press,

1998).

[7] O. Maron, in Advances in Neural Information Processing Systems, Vol. 11 (1998).

[8] C. Lucibello and M. Mézard, Physical Review Letters 132, 077301 (2024).

[9] M. Mezard and A. Montanari, Information, Physics, and Computation (Oxford University Press, 2009).

[10] Q. Zhang and S. A. Goldman, in Advances in Neural Information Processing Systems, Vol. 15 (MIT Press, 2002).

[11] S. Andrews, I. Tsochantaridis, and T. Hofmann, in Advances in Neural Information Processing Systems, Vol. 15 (2002) pp. 561–568.

[12] T. Gärtner, P. A. Flach, A. Kowalczyk, and A. J. Smola, in Proceedings of the Nineteenth International Conference on Machine Learning (2002) pp. 179–186.

[13] D. I. Diochnos, R. H. Sloan, and G. Turán, Information Processing Letters 112, 933 (2012).

[14] G. Doran and S. Ray, Journal of Machine Learning Research 17, 1 (2016).

[15] Z. Szabó, A. Gretton, B. Póczos, and B. Sriperumbudur, in Artificial Intelligence and Statistics (PMLR, 2015) pp. 948–957.

[16] S. Ray and D. Page, in Proceedings of the International Conference on Machine Learning (ICML) (2001) pp. 425–432.

[17] K. L. Wagstaff and T. Lane, Proc. of International Conference on Machine Learning (ICML) Workshop (2007).

[18] D. R. Dooly, Q. Zhang, S. A. Goldman, and R. A. Amar, Journal of Machine Learning Research 3, 651 (2002).

[19] D. R. Dooly, S. A. Goldman, and S. S. Kwek, Journal of Computer and System Sciences 72, 1 (2006).

[20] K. Chauhan, R. Saket, L. Applebaum, A. Badanidiyuru, C. Giri, and A. Raghuveer, in Proceedings of Uncertainty in Artificial Intelligence (UAI) (2024).

[21] E. Levien, arXiv preprint arXiv:2607.17404 (2026).

[22] M. Ilse, J. M. Tomczak, and M. Welling, in Proceedings of the 35th International Conference on Machine Learning (PMLR, 2018) pp. 2127–2136.

[23] M. Widrich, B. Schäfl, M. Pavlović, H. Ramsauer, L. Gruber, M. Holzleitner, J. Brandstetter, G. K. Sandve, V. Greiff, S. Hochreiter, and G. Klambauer, in Advances in Neural Information Processing Systems, Vol. 33 (2020) pp. 18832–18845.

[24] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin, in Advances in Neural Information Processing Systems, Vol. 30 (Curran Associates, Inc., 2017).

[25] H. Ramsauer, B. Schäfl, J. Lehner, P. Seidl, M. Widrich, T. Adler, L. Gruber, M. Holzleitner, M. Pavlović, G. K. Sandve, et al., arXiv preprint arXiv:2008.02217 (2020).

[26] J. J. Hopfield, Proceedings of the National Academy of Sciences 79, 2554 (1982).

[27] B. Derrida, Physical Review Letters 45, 79 (1980).

[28] B. Derrida, Physical Review B 24, 2613 (1981).

[29] G. Ben Arous, L. V. Bogachev, and S. A. Molchanov, Probability Theory and Related Fields 132, 579 (2005).

[30] J. Vuckovic, A. Baratin, and R. Tachet des Combes, arXiv preprint arXiv:2007.02876 (2020).

[31] A. Bovier, Statistical mechanics of disordered systems: a mathematical perspective, Vol. 18 (Cambridge University Press, 2006).

[32] M. R. Leadbetter, G. Lindgren, and H. Rootzén, Extremes and Related Properties of Random Sequences and Processes (Springer, New York, 1983).

[33] D. Soudry, E. Hoffer, M. S. Nacson, S. Gunasekar, and N. Srebro, Journal of Machine Learning Research 19, 1 (2018), arXiv:1710.10345.

Supplemental Material