Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

16. Shallow Learning

CNRS & DMA, École Normale Supérieure

Chapter PDF · Complete book

Networks with one hidden layer provide a setting in which to ask which functions neural models can represent and how their size controls approximation error. These questions distinguish expressive power from the difficulty of fitting a model to data. We derive the training gradients, prove universal approximation, and develop quantitative bounds through Barron’s theorem, a representation by measures, and the Frank–Wolfe algorithm.

16.1 Multilayer Perceptrons

A multilayer perceptron (MLP) with one hidden layer has two trainable layers: a hidden layer and an output layer. Models with no hidden layer recover the linear predictors studied earlier. Deeper MLPs compose several layers; their derivatives are efficiently computed by the automatic differentiation methods of the multilayer-perceptron discussion.

16.1.1 Networks of Arbitrary Depth

We first define a network of arbitrary depth representing a map fθ:RdRdf_\theta : \mathbb{R}^d \to \mathbb{R}^{d'}.

Starting from x0=xRd0=Rdx_0=x\in\mathbb{R}^{d_0}=\mathbb{R}^d, the network computes, for s=0,,S1s=0,\ldots,S-1

xs+1=σ(Wsxs+bs)x_{s+1}=\sigma( W_s x_s + b_s )

where WsRds+1×dsW_s \in \mathbb{R}^{d_{s+1} \times d_s} and bsRds+1b_s \in \mathbb{R}^{d_{s+1}}. The output is fθ(x)=xSf_\theta(x)=x_S, with dS=dd_S=d' and parameters θ=((Ws,bs))s=0S1\theta=((W_s,b_s))_{s=0}^{S-1}. The final activation can be omitted to obtain a linear output layer.

The activation σ\sigma is a nonlinear, nonpolynomial function applied componentwise: σ(z)=(σ(zi))i\sigma(z) = (\sigma(z_i))_i.

Common activations include the sigmoid functions

σ(r)=er1+erandσ(r)=1πatan(r)+12\sigma(r) = \frac{e^r}{1+e^r} \quad \text{and} \quad \sigma(r) = \frac{1}{\pi} \text{atan}(r) + \frac{1}{2}

and the rectified linear unit (ReLU), σ(r)=max(r,0)\sigma(r)=\max(r,0). Sigmoids are bounded, whereas ReLU is unbounded and does not saturate on the positive half-line: its derivative is one there and zero on the negative half-line. The positive 1-homogeneity of ReLU allows weights to be rescaled, which is useful in proofs that restrict their directions to a unit sphere. At zero, ReLU is not differentiable. Implementations choose a derivative convention, while mathematical arguments must account for the kink.

For increasing width to yield universal approximation at fixed depth, the activation σ\sigma must be nonpolynomial. Otherwise, fθf_\theta has degree at most mSm^S for an activation of degree mm and fixed depth SS, so increasing the width cannot produce a dense class of continuous functions.

The choice σ=Id\sigma=\mathrm{Id} remains useful for matrix factorization and supervised learning, but its input-output map is affine (linear when the biases vanish).

16.1.2 Two-layer MLPs

We now specialize to networks with one hidden layer and a linear output layer:

fθ(x):=k=1nukσ(vk,x+bk),xRd,(16.1)f_\theta(x) := \sum_{k=1}^n u_k \sigma(\langle v_k, x \rangle + b_k), \quad \forall x \in \mathbb{R}^d, \tag{16.1}

Here σ\sigma is the activation, and the neuron parameters are θk=(ukRd,vkRd,bkR)\theta_k = (u_k \in \mathbb{R}^{d'}, v_k \in \mathbb{R}^d, b_k \in \mathbb{R}) for k=1,,nk = 1, \dots, n. We usually take d=1d'=1 for simplicity, so the output is scalar.

In practice, neural networks are trained by gradient methods. For example, consider a quadratic loss

minθE(θ):=12fθ(x)y2dρ(x,y)(16.2)\min_\theta E(\theta) := \frac12\int\|f_\theta(x)-y\|^2\mathrm{d}\rho(x,y) \tag{16.2}

where ρ\rho is the joint distribution of the inputs and outputs. Taking ρ\rho to be the empirical distribution gives the training loss. Gradient descent, or its stochastic counterpart, updates the parameters by

θt+1=θtτtE(θt).\theta_{t+1} = \theta_t - \tau_t \nabla E(\theta_t).

Gradient computation

Omitting the biases bkb_k, the network has the matrix form fθ(x)=Uσ(Vx)f_\theta(x) = U \sigma(V^\top x), where URd×nU \in \mathbb{R}^{d' \times n} and VRd×nV \in \mathbb{R}^{d \times n}. For a training set with NN observations, collect the inputs as the columns of X=(xi)i=1NRd×NX = (x_i)_{i=1}^N \in \mathbb{R}^{d \times N} and the outputs as the columns of Y=(yi)i=1NRd×NY=(y_i)_{i=1}^N\in\mathbb{R}^{d'\times N}. Here NN counts observations and nn counts hidden neurons. All matrix norms and inner products in this computation are Frobenius norms and inner products. Omitting the constant factor 1/N1/N, training with squared loss gives

minU,VE(U,V):=12Uσ(VX)Y2.\min_{U,V} E(U,V) := \frac{1}{2}\| U \sigma(V^\top X) - Y \|^2.

Set Z:=σ(VX)Z := \sigma(V^\top X), the matrix obtained by applying the feature map xσ(Vx)x \to \sigma(V^\top x) to the data. With these features fixed, training UU is the least-squares problem 12UZY2\frac{1}{2}\|U Z - Y\|^2, whose gradient is

UE(U,V)=(UZY)Z.\nabla_U E(U,V) = (UZ-Y)Z^\top.

Assume σ\sigma is differentiable at the entries of VXV^\top X. To differentiate with respect to VV, expand the objective in a perturbation DD and set R:=Uσ(VX)YR := U \sigma(V^\top X) - Y and S:=σ(VX)S := \sigma'(V^\top X):

E(U,V+εD)=12R+εU[S(DX)]+o(ε)2=E(U,V)+εR,H+o(ε)E(U,V + \varepsilon D) =\frac12\|R+\varepsilon U[S\odot(D^\top X)]+o(\varepsilon)\|^2 = E(U,V) +\varepsilon\langle R,\,H\rangle+o(\varepsilon)

where H=U[S(DX)]H=U[S\odot(D^\top X)], the product AB=(Ai,jBi,j)A \odot B = (A_{i,j} B_{i,j}) is coordinatewise, and

R,H=R,U[S(DX)]=DX,(UR)S=XD,(RU)S\langle R,\,H\rangle = \langle R,\, U [S \odot (D^\top X)] \rangle = \langle D^\top X,\, (U^\top R) \odot S\rangle = \langle X^\top D,\, (R^\top U) \odot S^\top\rangle

which leads to

VE(U,V)=X[(RU)S].\nabla_V E(U,V) = X [ (R^\top U) \odot S^\top ].

For deeper networks, writing a fully expanded derivative becomes cumbersome and can duplicate computations. Backpropagation organizes the same chain rule into an efficient reverse pass.

16.2 LL^\infty Nonquantitative Universal Approximation

If σ\sigma is a sigmoid function, George Cybenko’s theorem, later refined by Kurt Hornik, Maxwell Stinchcombe, and Halbert White, demonstrates that the functions fθf_\theta can approximate any continuous function uniformly on a compact domain. Uniform approximation is stronger than the mean-square approximation used in the training loss (16.2).

The theorem establishes universal approximation by two-layer networks. It gives no quantitative bound on the number of neurons nn needed for accuracy ε\varepsilon, nor an efficient procedure for finding the parameters of fθf_\theta.

Cybenko [15] proved the result by duality. We present the more constructive argument of Hornik and collaborators, based on Stone–Weierstrass approximation by trigonometric functions. This density argument avoids relying on uniform convergence of Fourier partial sums, which need not hold for an arbitrary continuous function.

16.3 L2L^2 Quantitative Approximation (Barron’s Theorem)

We now study L2L^2 approximation, as measured by the loss (16.2). To isolate approximation error, assume noiseless observations y=f(x)y=f(x) for a target ff, with inputs xx distributed according to ρ(x)\rho(x). We also assume that ρ\rho is supported in a ball of radius RR.

Without additional regularity, no uniform approximation rate follows: the error can decay arbitrarily slowly. Barron introduced a function class for which the approximation rate has an exponent independent of the ambient dimension.

16.3.1 Barron Space

For an integrable function ff, this section uses the following normalization of the Fourier transform at ξRd\xi \in \mathbb{R}^d:

f^(ξ)(2π)dRdf(x)eiξ,xdx.\hat f(\xi)\triangleq(2\pi)^{-d}\int_{\mathbb{R}^d}f(x)e^{-\mathrm{i}\langle \xi,\,x\rangle}\mathrm{d}x.

The Barron space [1] is the class of functions for which the Fourier seminorm

 ⁣f ⁣BRd ⁣ξ ⁣f^(ξ)dξ|\!| f |\!|_B \triangleq \int_{\mathbb{R}^d}|\!| \xi |\!| | \hat{f}(\xi) | \mathrm{d}\xi

is finite. Throughout this section, ff denotes its continuous Fourier-inversion representative, with the convention f(x)=f^(ξ)eiξ,xdξf(x)=\int\hat f(\xi)e^{\mathrm{i}\langle \xi,\,x\rangle}\mathrm{d}\xi. For integrable ff, finiteness of the displayed seminorm ensures that f^\hat f is integrable: it is bounded near the origin, and its first moment controls the tail. This representative matters when the sampling measure has atoms. Constants can be handled separately; f(0)+ ⁣f ⁣B|f(0)|+|\!| f |\!|_B removes the ambiguity due to constants in the corresponding Fourier-measure space. This Fourier-defined class should be distinguished from activation-dependent Barron spaces. One has

 ⁣f ⁣B=Rd ⁣f^(ξ) ⁣dξ,|\!| f |\!|_B = \int_{\mathbb{R}^d} |\!| \widehat{\nabla f}(\xi) |\!| \mathrm{d}\xi,

which relates the Fourier seminorm to first-order regularity.

The following examples illustrate the seminorm and its dependence on the function class.

16.3.2 Barron’s Theorem

The main result is as follows.

The exponent 1/21/2 in the approximation rate does not depend on the dimension. The constant  ⁣f ⁣B|\!| f |\!|_B can still depend on it: the Gaussian example gives growth of order d\sqrt d, whereas the bound for a fixed ridge profile depends on the ridge direction and profile.

16.3.3 Mean field representation.

Absorb a factor nn into the outer coefficients uku_k to express the same network as an average:

fθ(x):=1nk=1nφ(x,ωk),f_\theta(x) := \frac{1}{n} \sum_{k=1}^n \varphi(x, \omega_k),

where θ=(ωk)k=1n\theta = (\omega_k)_{k=1}^n, ωk=(uk,vk,bk)Rd×Rd+1\omega_k = (u_k, v_k, b_k) \in \mathbb{R}^{d'} \times \mathbb{R}^{d+1} and φ(x,ω):=uσ(v,x+b)\varphi(x,\omega) := u \sigma(\langle v, x \rangle + b). Introducing the empirical measure:

μ^:=1nk=1nδωk,\hat{\mu} := \frac{1}{n} \sum_{k=1}^n \delta_{\omega_k},

this neural network can be expressed as an integral:

fθ(x):=Ωφ(x,ω)dμ^(ω)f_\theta(x) := \int_\Omega \varphi(x, \omega) \, \mathrm{d}\hat{\mu}(\omega)

where ΩRd×Rd+1\Omega \subset \mathbb{R}^{d'} \times \mathbb{R}^{d+1} is the admissible parameter set. A uniform bound on uu will be essential for the approximation estimate.

The representation is linear in the measure μ\mu. It therefore extends naturally from empirical measures to general probability measures μ\mu.

We now restrict to scalar outputs, d=1d'=1.

The Fourier condition yields a bounded dictionary representation in a closure sense. This distinction matters: the assumptions do not automatically provide an exact probability measure on finite sigmoid parameters.

For the next argument, write g=ff(0)g=f-f(0). First suppose g=Φ(μ)g=\Phi(\mu) exactly for a probability measure over this bounded dictionary. The same bound extends to gg in its closed convex hull by approximating gg arbitrarily closely before sampling.

16.3.4 Probabilistic proof

Draw independent parameters ω1,,ωn\omega_1,\ldots,\omega_n with law μ\mu and set gn=n1iφωig_n=n^{-1}\sum_i\varphi_{\omega_i}. In the Hilbert space L2(ρ)L^2(\rho), independence yields

Egn=g,E ⁣gng ⁣2=1n(E ⁣φω ⁣2 ⁣g ⁣2)M2n.\mathbb{E}g_n=g,\qquad \mathbb{E}|\!| g_n-g |\!|^2=\frac1n\left(\mathbb{E}|\!| \varphi_\omega |\!|^2-|\!| g |\!|^2\right)\leqslant\frac{M^2}{n}.

Consequently at least one realization has squared error at most M2/nM^2/n. For a target in the closed convex hull, choose an average gεg_\varepsilon with  ⁣ggε ⁣ε|\!| g-g_\varepsilon |\!|\leqslant\varepsilon and apply the same argument. The resulting network has error at most M/n+εM/\sqrt n+\varepsilon. Each outer coefficient has magnitude at most M/nM/n, so their absolute sum is at most MM. This proves the approximation theorem, including its coefficient bound.

16.3.5 Proof by optimization

A deterministic argument uses nn Frank–Wolfe steps and its O(1/n)O(1/n) objective convergence rate.

For the centered target g=ff(0)g=f-f(0), minimize over probability measures P(Ω)\mathcal{P}(\Omega):

infμP(Ω)E(μ):=12K(Φ(μ)(x)g(x))2dρ(x),(16.4)\inf_{\mu \in \mathcal{P}(\Omega)} E(\mu) := \frac{1}{2} \int_K \left( \Phi(\mu)(x) - g(x) \right)^2 \, \mathrm{d}\rho(x), \tag{16.4}

where ρ\rho is the probability measure supported on KK. This optimization problem is infinite-dimensional.

Ordinary network training instead restricts μ\mu to an empirical measure and descends in the neuron parameters. This parameterization is nonconvex. Chizat and Bach relate suitable mean-field limits to Wasserstein gradient flows and prove global convergence under additional structural and initialization assumptions. Such results do not imply that every sufficiently wide finite network, initialized from an arbitrary density, avoids all nonglobal stationary points.

The deterministic approximation argument below uses convex optimization over measures. Its linear minimization oracle is a global optimization problem over a single neuron’s parameters and may itself be computationally difficult in high dimensions. Since the parameter domain need not be compact, exact oracle minimizers may fail to exist; approximate oracles or closure arguments then replace exact minimization.

First order variations.

We derive the algorithm by linearizing the objective on measures equipped with the total variation norm. The same construction applies to differentiable convex objectives on a Banach space.

We write integration as a pairing between a function and a measure:

f,μ:=f(x)dμ(x).\langle f,\,\mu\rangle := \int f(x) \mathrm{d} \mu(x).

Let μ+εη\mu+\varepsilon\eta be a small perturbation of μ\mu, where η\eta is a finite signed measure.

The first variation E(μ)\nabla E(\mu) represents the derivative through the expansion

E(μ+εη)=E(μ)+εE(μ),η+o(ε),E(\mu+\varepsilon\eta) = E(\mu) + \varepsilon\langle \nabla E(\mu),\,\eta\rangle + o(\varepsilon),

Thus E(μ)\nabla E(\mu) represents the Fréchet derivative of EE. For the present quadratic objective,

E(μ+εη)=12K(Φ(μ)(x)g(x)+εΦ(η)(x))2dρ(x),E(\mu+\varepsilon\eta) = \frac{1}{2} \int_K \left( \Phi(\mu)(x) - g(x) + \varepsilon\Phi(\eta)(x) \right)^2 \, \mathrm{d}\rho(x),

which expands to:

E(μ+εη)=E(μ)+εKΦ(η)(x)(Φ(μ)(x)g(x))dρ(x)+O(ε2).E(\mu+\varepsilon\eta) = E(\mu) + \varepsilon\int_K \Phi(\eta)(x) \left( \Phi(\mu)(x) - g(x) \right) \, \mathrm{d}\rho(x) + O(\varepsilon^2).

Rewriting this in terms of φ\varphi, we find:

E(μ)(ω)=Kφ(x,ω)(Φ(μ)(x)g(x))dρ(x).\nabla E(\mu)(\omega) = \int_K \varphi(x, \omega) \left( \Phi(\mu)(x) - g(x) \right) \, \mathrm{d}\rho(x).

It is a bounded function of ω\omega; continuity follows when the activation and parameterization are continuous.

Frank-Wolfe algorithm.

Frank–Wolfe minimizes a differentiable convex function over a convex subset of a Banach space:

minμCE(μ).\min_{\mu \in \mathcal{C}} E(\mu).

Each step linearizes the objective E(μ)E(\mu).

Choose an initial measure μ0\mu_0, for example a Dirac mass. At iteration kk, update with step size τk\tau_k:

μk+1=(1τk)μk+τkνk,\mu_{k+1} = (1 - \tau_k) \mu_k + \tau_k \nu_k^*,

where νk\nu_k^* minimizes the linearized objective:

νkargminνP(Ω)E(μk),ν\nu_k^* \in \arg\min_{\nu \in \mathcal{P}(\Omega)} \langle \nabla E(\mu_k),\,\nu\rangle

This linear minimization step is called an oracle. On a finite parameter grid it amounts to comparing finitely many values. Over a continuous neuron parameter space Ω\Omega, it is generally a nonconvex optimization problem.

Here C=P(Ω)\mathcal{C} = \mathcal{P}(\Omega) carries the total variation norm μTV=μ(Ω)\|\mu\|_{\mathrm{TV}} = |\mu|(\Omega), the measure analogue of the L1L^1 norm.

In this special case, a key property of the algorithm is that the solution νk\nu_k^* can be taken as a Dirac measure when the minimum over Ω\Omega is attained since, denoting gk:=E(μk)g_k := \nabla E(\mu_k),

νk=δωk,where ωkargminωΩgk(ω).\nu_k^* = \delta_{\omega_k^*}, \quad \text{where } \omega_k^* \in \arg\min_{\omega \in \Omega} g_k(\omega).

This holds because for any νP(Ω)\nu \in \mathcal{P}(\Omega):

gk(ω)dν(ω)min(gk),\int g_k(\omega) \, \mathrm{d}\nu(\omega) \geqslant\min(g_k),

and equality is achieved when ν=δωk\nu = \delta_{\omega_k^*}. Therefore, if μ0\mu_0 is initialized as a Dirac measure, each iteration of the algorithm ensures that μk\mu_k remains a sum of at most k+1k+1 Dirac masses.

Convergence Rate

The next theorem gives the Frank–Wolfe convergence rate.

In our case, =TV\|\cdot\|=\|\cdot\|_{\mathrm{TV}} is the total variation norm of measures. Bounded functions paired with these measures carry the supremum norm \|\cdot\|_{\infty}. Throughout this argument, LL^\infty denotes the pointwise supremum norm, so values at atoms are retained.

We first establish the quadratic upper bound implied by a Lipschitz gradient.

For the objective EE in (16.4), the proposition below gives LM2L\leqslant M^2 with M=2RfBM=2R\|f\|_B. The total variation diameter of probability measures is D=2D=2, and fB\|f\|_B denotes the Barron seminorm of the target ff.

For the centered target g=ff(0)g=f-f(0), Proposition 16.3 gives infE=0\inf E=0, even if the infimum is not attained by a measure on finite sigmoid parameters. The rate therefore concerns approximation of gg.

When the linear oracle attains its minimum, Frank–Wolfe constructs a measure μk\mu_k supported on at most k+1k+1 points, with objective error

E(μk)=O(1k).E(\mu_k) = O\left(\frac{1}{k}\right).

Thus each iteration adds at most one neuron and gives an O(k1/2)O(k^{-1/2}) bound on the L2L^2 error. If the oracle is not attained, choosing an O(1/k)O(1/k)-accurate linear oracle adds an O(1/k2)O(1/k^2) term to the descent recurrence and preserves this order of approximation.