arXiv:2610.25652cs.LGOct 2026

Manuscript Offprint

arXiv:2610.25652

A "feature ODE" describing the learning behavior of shallow MLPs on simple functions

Joseph Turnbull, Berkan Ottlik, Jamie Simon

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

Abstract

We study the gradient flow training dynamics of two-layer multi-layer perceptrons (MLPs) on anisotropic Gaussian data. Even in this simple setting, solving the dynamics in full is notoriously difficult, so we try something different. We propose a “feature ODE” that might be intuitively expected to describe the learning dynamics of a shallow MLP. We find that MLPs trained to learn simple target functions (low-order Hermite polynomials and staircase functions) actually roughly follow the loss trajectories from this feature ODE. This agreement is a surprise because of the size of the simplification and the fact that it does not come from a rigorous chain of approximations. We discuss this surprise and speculate on its reasons and uses.

Figure

Figure 1: We suggest a simple ODE of scalar variables whose solution predicts loss trajectories for shallow MLPs learning simple functions of anisotropic data. These plots treat shallow MLPs with shifted SiLU activation functions ( σ(x)=SiLU(x+0.5)\sigma(x) = \text{SiLU}(x + 0.5)) learning various Hermite polynomial target functions data sampled x∼N(0,Γ)\boldsymbol{x} \sim \mathcal{N}(0, \mathbf{\Gamma}) with Γ=diag(γi)\mathbf{\Gamma} = \text{diag}(\gamma_i), γi∝(i+6)−1.8\gamma_i \propto (i + 6)^{-1.8}. We write zi≡xi/γiz_i \equiv \boldsymbol{x}_i / \sqrt{\gamma_i} for normalized coordinates. Left. MLP loss trajectories closely match the ODE for example linear and quadratic target functions. Right. Effective optimization times η⋅niter\eta \cdot n_{\text{iter}} required for learning to complete are well-predicted by this ODE across many such target functions. For quadratic terms of the form He2(zi)\text{He}_2(z_i), the leading term is indicated in the plots ( zi2z_i^2). See Section A for experimental details.

∗^{*}Joint primary authorship.

Code: https://github.com/berkott/feature-ode

1 Introduction

How do shallow MLPs learn simple functions of anistropic Gaussian data? Many researchers have studied these training dynamics, and we have learned a lot (see Section 2). One definite conclusion has emerged: the problem is hard – surprisingly hard, for what should be a simple toy problem in deep learning theory.

What is the source of the difficulty? Taking a look at the functional form of a shallow MLP,

fMLP(x)=⟨wout,σ(Winx)⟩,(1)f_{\mathrm{M L P}}(\boldsymbol{x})=\langle\boldsymbol{w}_{\mathrm{o u t}},\sigma\left(\boldsymbol{W}_{\mathrm{i n}}\boldsymbol{x}\right)\rangle, \tag{1}

the main annoyance is the elementwise nonlinearity σ(⋅)\sigma(\cdot). Elementwise nonlinearities do not play well with our nicest mathematical tools: try to exactly solve the dynamics of a model parameterized as Equation (1) using e.g. regular matrix ODEs, and the elementwise nonlinearity (which is rather unnatural from a linear-algebraic point of view) gets in the way.

Rather than develop a new tool for treating the exact dynamics of a shallow MLP, we propose something different altogether. We design our system to be a solvable model of the shallow MLP that keeps two of the MLP's key traits. Firstly, there should be two trainable linear transformations with a (fixed) nonlinear operation in between, and secondly, the model class needs to represent any nonlinear function. We get both of these traits in the following “deep polynomial regression” (DPR) model:

fDPR(x)=⟨B,ψc(Ax)⟩,(2)f_{\mathrm{D P R}}(\boldsymbol{x})=\langle\boldsymbol{B},\psi_{c}(\boldsymbol{A}\boldsymbol{x})\rangle, \tag{2}

where A is a square matrix, B is a readout vector, and ψc\psi_{c} is the following polynomial featurization operation:

ψc(h):=vec([c0c1hc22!hh⊤c33!h⊗3⋯]),(3)\psi_{c}(\boldsymbol{h}):=\mathrm{vec}\left(\begin{bmatrix}\sqrt{c_{0}}&\sqrt{c_{1}}\boldsymbol{h}&\frac{\sqrt{c_{2}}}{\sqrt{2!}}\boldsymbol{h}\boldsymbol{h}^{\top}&\frac{\sqrt{c_{3}}}{\sqrt{3!}}\boldsymbol{h}^{\otimes3}&\cdots\end{bmatrix}\right), \tag{3}

with c=(cℓ)c = (c_\ell) a sequence of constants.

Why is this a reasonable proxy for a shallow MLP? The matrix AA serves the role of WinW_{\text{in}}, preconditioning the input to the nonlinear operation. The operation ψc\psi_c generates all monomial functions of the hidden vector h=Axh = Ax, giving the model full expressivity. Finally, the readout vector BB maps these features to a scalar output. See Figure 2 for a visual comparison between the two models.

Note that if one simply fixes A=IA = I, then Equation (2) is polynomial regression: f(x)=⟨b,ψc(x)⟩f(x) = \langle b, \psi_c(x) \rangle. Equivalently, it is a kernel machine with kernel K(x,x′)=∑ℓcℓℓ!⟨x,x′⟩ℓK(x, x') = \sum_{\ell} \frac{c_\ell}{\ell!} \langle x, x' \rangle^\ell. With AA present, fDPRf_{\mathrm{DPR}} is a kernel machine with trainable kernel KA(x,x′)=∑ℓcℓℓ!⟨Ax,Ax′⟩K_A(x, x') = \sum_{\ell} \frac{c_\ell}{\ell!} \langle Ax, Ax' \rangle.

The wonderful thing about DPR is that its gradient flow dynamics on squared loss can in many cases be reduced to a simple ODE of scalar variables and solved exactly. The punchline of this paper is that the resulting ODE is often predictive of the loss trajectories and learning times for MLPs learning low-order polynomials (Figures 1 and 3).

References (66)