Normal Approximation of Random Gaussian Neural Networks

Published Online:https://doi.org/10.1287/stsy.2023.0033

Abstract

In this paper, we provide explicit upper bounds on some distances between the (law of the) output of a random Gaussian neural network and (the law of) a random Gaussian vector. Our main results concern deep random Gaussian neural networks with a rather general activation function. The upper bounds show how the widths of the layers, the activation function, and other architecture parameters affect the Gaussian approximation of the output. Our techniques, relying on Stein’s method and integration by parts formulas for the Gaussian law, yield estimates on distances that are indeed integral probability metrics and include the convex distance. This latter metric is defined by testing against indicator functions of measurable convex sets and so allows for accurate estimates of the probability that the output is localized in some region of the space, which is an aspect of a significant interest both from a practitioner’s and a theorist’s perspective. We illustrated our results by some numerical examples.

Funding: This research was supported by the European Union’s Horizon 2020 research project WARIFA under grant agreement no. 101017385, by the PRIN project 2022 “Variational Analysis of Complex Systems in Materials Science, Physics and Biology” (CUP B53D23009290006), and by the INdAM project “Modelli ed Algoritmi per dati ad elevata dimensionalità” (CUP E53C23001670001).

1. Introduction

This work is part of the literature studying random neural networks (NNs for short), that is, NNs whose biases and weights are random variables. In the context of modern deep learning, the interest in these types of networks is twofold; on the one hand, they naturally constitute a prior in a Bayesian approach, and on the other hand they may represent the initialization of gradient flows in empirical risk minimization. See Roberts et al. (2022) for a general reference on the subject.

Within the boundaries of this topic, many contributions in the literature have been handling the asymptotic Gaussianity of random NNs, as the number of neurons in the hidden layers tends to infinity. A seminal paper is Neal (1996), where the output of a shallow (i.e., having a single hidden layer) random NN, viewed as a stochastic process on the sphere, is shown to converge to a Gaussian process, as the number of neurons in the hidden layer grows large. From that point onward, many sophisticated results have been published for deep (i.e., having more than one hidden layer) random NNs at the large width limit. Early contributions in this direction were from Lee et al. (2018), Matthews et al. (2018), Yaida (2019), and Yang (2019). These achievements were extended in Hanin (2023), where it was proved that the output of a deep random NN, with Gaussian biases and weights, viewed as a random element on the space of continuous functions on a compact set, converges to a Gaussian process as the number of neurons in all the hidden layers tends to infinity. Large and moderate deviations of the output of a deep random NN, with Gaussian biases and weights, were studied in Macci et al. (2024).

Recently, the problem of the quantitative Gaussian approximation of the output of a random NN has received a lot of attention. For instance, Eldan et al. (2021), exploiting Wasserstein distances, provided quantitative versions of the results in Neal (1996) when the activation function was polynomial, ReLU, and hyperbolic tangent. We emphasize that the shallow random NN model considered in Neal (1996) and Eldan et al. (2021) has weights on the outer layer given by Rademacher random variables and weights on the inner layer distributed according to the Gaussian law (see Remark 3.4). Slightly different models were investigated in Klukowski (2022) and Cammarota et al. (2024). Indeed, as the number of neurons on the hidden layer grew large, Klukowski (2022) provided a quantitative functional central limit theorem for a shallow random NN model with input variables still on the sphere and weights on the outer layer still given by Rademacher random variables but weights on the inner layer uniformly distributed on the sphere, whereas as the number of neurons on the hidden layer grew large, Cammarota et al. (2024) gave quantitative functional central limit theorems for a shallow random NN model with weights on outer and inner layers distributed according to the Gaussian law and again input variables on the sphere. A quantitative functional central limit theorem for deep random NNs, with input variables on the sphere and Lipschitz continuous activation functions, was proved in Balasubramanian et al. (2024); this paper shares with our work the idea to apply Stein’s method for the Gaussian approximation in the context of deep NNs, albeit in a different mathematical setting.

A significant achievement is provided in Basteri and Trevisan (2024), where, for the first time in the literature, a quantitative proof of the Gaussian behavior of the output of a deep random Gaussian NN (i.e., a random NN whose biases and weights are Gaussian distributed) with a Lipschitz continuous activation function was given; in Basteri and Trevisan (2024), the distance from Gaussianity was measured by means of the 2-Wasserstein metric, which comes from the Monge-Kantorovich problem with quadratic cost. As far as shallow random Gaussian NNs with univariate output is concerned, we mention Bordino et al. (2024), which provided quantitative bounds on the Kolmogorov, the total variation and the 1-Wasserstein distances between the output and a Gaussian random variable, when the activation function was sufficiently smooth and had a sub-polynomial growth. A special mention is deserved for the independently written paper Favaro et al. (2023), where Stein’s method was used to obtain tight probabilistic bounds for various distances between the output (and its derivatives) of a deep random Gaussian NN and a Gaussian random vector. We refer the reader to Remarks 4.2, 6.2, and 6.4 for comparisons between our results and the corresponding achievements in Favaro et al. (2023).

The main contribution of our paper concerns the Gaussian approximation of the output of deep random Gaussian NNs in the convex and 1-Wasserstein distances under mild assumptions on the activation function (which, differently from Basteri and Trevisan (2024), can be non-Lipschitz). A specialization of these results clearly provides approximations for shallow random Gaussian NN with single input and real valued (i.e., univariate) output. However, in this specific case we furnish direct proofs, which (for various technical reasons) give the same rates under more general assumptions on the activation function.

For shallow random Gaussian NNs with univariate output, combining the Stein method for the Gaussian approximation with the integration by parts formula for the Gaussian law, we provide explicit bounds for the Kolmogorov, the total variation and the 1-Wasserstein distances between the output and a Gaussian random variable, under a minimal assumption on the activation function (see Theorem 4.1). Remarkably, we obtain the same rate of convergence as in Bordino et al. (2024) as the number of neurons in the hidden layer grows large, our constants being presumably better than the ones in Bordino et al. (2024) (see Table 1). For deep random Gaussian NNs, the novelty of our results is that we measure the error in the Gaussian approximation of the output in terms of the convex distance (see Theorem 6.1) and of the 1-Wasserstein distance (see Theorem 6.3) for a class of activation functions that strictly includes the family of Lipschitz continuous functions if either the biases are non null or the activation function vanishes at 0 (see Proposition 5.2). Remarkably, for both the convex and the 1-Wasserstein distances the rate of convergence that we obtain is of the same order as the one in Basteri and Trevisan (2024) because the number of neurons in all the hidden layers tend to infinity. The proofs of Theorems 6.1 and 6.3 are based on the Stein method for the multivariate Gaussian approximation and the integration by parts formula for the multivariate Gaussian law. The presence of more than one hidden layer complicates the derivations of the bounds, which rely on a key estimate for the L2-distance between the so-called collective observables and their limiting values (see Theorem 5.1). We emphasize that, when considering the convex distance, an expedient tool is provided by a smoothing lemma that we borrow from Schulte and Yukich (2019).

Table

Table 1. Values of the Constants Given in Theorems 3.1 and 4.1

Table 1. Values of the Constants Given in Theorems 3.1 and 4.1

dTV(z(2),z)dK(z(2),z)dW1(z(2),z)
Theorem 3.15.052.522.01
Theorem 4.11.680.840.67


Note. Here, σ(x)=x3, γ = 3, r2=1,r1=6, L = 1, Cb=CW=1, and x = 1.

It is well known that localizing the output of a random NN, that is, having a control over the probability that the output lies in a region of the space (belonging to a large class of measurable sets), is of valuable interest for practitioners. From a theorist’s point of view, the output distribution of a NN is often analytically untractable, and computing the probability that the output belongs to some measurable set results in performing a “heroic” mathematical integration (see, e.g., Roberts et al. 2022, p. 49). Our Theorems 4.1(ii) and 6.1 offer some insights into the localization problem in a simple and efficient way for both the univariate output of a shallow random Gaussian NN and the output of a deep random Gaussian NN, respectively. We refer the reader to Section 7 for some numerical illustrations of this issue.

The paper is organized as follows. In Section 2, we introduce our toolkit such as the integral probability metrics considered in the paper and some preliminaries on the Stein method. In Section 3, first we introduce all of the NNs considered in this work and then give a brief overview of the main results in Basteri and Trevisan (2024) and Bordino et al. (2024), comparing them with our achievements. In Section 4, we give upper bounds for the Kolmogorov, the total variation and the 1-Wasserstein distances between the (univariate) output of a shallow random Gaussian NN and a Gaussian random variable. In Section 5, we prove the aforementioned key estimate on the L2-distance between the collective observables and their limiting values. In Section 6, we furnish explicit upper bounds on the convex and the 1-Wasserstein distances between the output of a deep random Gaussian NN and a Gaussian random vector. Finally, in Section 7, we present some numerical illustrations concerning the above-mentioned issue of the output localization.

2. Preliminaries

In the present section, we introduce some notation, and we recall some results that will be of use throughout the paper.

2.1. Distances Between Probability Measures

In this paper, we consider various distances between probability measures on Rd,dN{1,2,}: the total variation distance, the convex distance, the Komogorov distance, and the p-Wasserstein distances. Hereon, the symbol ·d denotes the Euclidean norm on Rd.

Definition 2.1.

The total variation distance between the laws of two Rd-valued random vectors X and Y, written dTV(X,Y), is given by

dTV(X,Y)supBB(Rd)|P(XB)P(YB)|,
where B(Rd) denotes the Borel σ-field on Rd.

Definition 2.2.

The convex distance between the laws of two Rd-valued random vectors X and Y, written dc(X,Y), is given by

dc(X,Y)supCCd|P(XC)P(YC)|,
where Cd denotes the collection of all Borel convex sets in Rd.

Definition 2.3.

The Kolmogorov distance between the laws of two Rd-valued random vectors X=(X1,,Xd) and Y=(Y1,,Yd), written dK(X,Y), is given by

dK(X,Y)supy=(y1,,yd)Rd|P(X1y1,,Xdyd)P(Y1y1,,Ydyd)|.

Definition 2.4.

For p[1,+), the p-Wasserstein distance between the laws of two Rd-valued random vectors X and Y, written dWp(X,Y), is given by

dWp(X,Y)inf(U,V)C(X,Y)E[UVdp]1/p,
where C(X,Y) is the family of all the couplings of X and Y, that is, the family of all random vectors (U,V) such that U is distributed as X and V is distributed as Y.

Clearly, by Jensen’s inequality, dW1dW2, and it follows directly by the definitions that dKdcdTV. Furthermore, for all s=TV,c,K,Wp, if ds(Yn,Y)0, as n+, where Yn,nN, and Y are random vectors with values in Rd, then Yn converges in law to Y, as n+ (see, e.g., Villani 2009 and Nourdin and Peccati 2012).

In view of the Kantorovich-Rubinstein duality (see theorem 5.10 and equation (5.11) in Villani 2009), the 1-Wasserstein distance between the laws of two Rd-valued random vectors X and Y such that max{EXd,EYd}< satisfies the relation

dW1(X,Y)=supgLd(1)|E[g(X)]E[g(Y)]|,(1)
where Ld(1) is the collection of Lipschitz continuous functions with Lipschitz constant less than or equal to 1.

Because dc is defined by testing against indicator functions of Borel convex sets rather than arbitrary Borel sets, the convex distance can be expected to be estimated more easily than the total variation distance; moreover, the convex distance looks more flexible than the Kolmogorov distance; for example, it enjoys a number of invariance properties not satisfied by dK (see Benktus 2003).

As for the relation between the convex distance and the optimal transport metric dW1, it turns out that the convex distance to a fixed centered Gaussian law is bounded from above by a multiple of the square root of the 1-Wasserstein distance. More precisely, one has the following Proposition 2.5, which is proved in Nourdin et al. (2022).

Here and henceforth, we denote by NΣ=((NΣ)1,,(NΣ)d),dN, a centered Gaussian vector with invertible covariance matrix Σ=(Σij)1i,jd.

Proposition 2.5.

For any d-dimensional random vector Y, we have

dc(Y,NΣ)22Γ(Σ)1/2dW1(Y,NΣ)1/2,
where Γ(Σ) is the constant defined by
Γ(Σ)supQ,ϵ>0P(NΣQϵ)P(NΣQ)ϵ,(2)
where Q ranges over all the Borel measurable convex subsets of Rd, and Qϵ denotes the set of all elements of Rd whose Euclidean distance from Q does not exceed ϵ.

We note that Γ(Σ) is an isoperimetric constant that satisfies the following relation (see Nazarov 2004):

e54d1/4Γ(Σ)(2π)14d1/4.(3)

2.2. The One-Dimensional Stein Equation

Throughout this paper, we denote by N(μ,η) the one-dimensional Gaussian law with mean μR and variance η>0 and let ZN(0,1).

The celebrated Stein equation for the one-dimensional Normal approximation Stein (1972) is given by

g(w)Eg(Z)=fg(w)wfg(w),(4)
where g:RR is a measurable function such that E|g(Z)|<, and fg:RR is unknown. The following lemma holds; see, for example, proposition 3.2.2, theorem 3.3.1, theorem 3.4.2, and proposition 3.5.1 in Nourdin and Peccati (2012). See Chen et al. (2011) for an introduction on the Stein method.

Hereon, for a Lipschitz continuous function g:RdR, we denote by Lip(g) the Lipschitz constant of g, and for a function f:RdR we denote by f the supremum norm of f.

Lemma 2.6.

The following claims hold:

  1. For any yR, the Stein Equation (4) with g(w)1(,y](w) has a unique solution fg and fg1.

  2. Let g:R[0,1] be a measurable function. Then, there exists a unique solution fg of the Stein Equation (4) and fg2.

  3. Let g:RR be a Lipschitz continuous function. Then, there exists a unique solution fg of the Stein Equation (4) and fgLip(g)2/π.

2.3. The Multidimensional Stein Equation

Throughout this paper, given a sufficiently smooth function f:RdR, we define

i1i1innf(x1,,xd)nfxi1xin(x1,,xd).

Let Md×d(R),dN, be the set of d × d real matrices. For a function fC2(Rd), we denote by Hessf(y)Md×d(R) the Hessian matrix of f at yRd and by ·op the operator norm on Md×d(R), that is, for any ΓMd×d(R),Γopsupy:yd=1Γyd. We consider the Hilbert-Schmidt inner product and the Hilbert-Schmidt norm on Md×d(R), which are defined, respectively, by

Γ,ΨH.S.Tr(ΓΨ)=i,j=1dΓijΨijandΓH.S.=Γ,ΓH.S.
for every pair of matrices Γ=(Γij)1i,jj and Ψ=(Ψij)1i,jd, where the symbols Tr(Γ) and Γ denote, respectively, the trace and the transpose of the matrix Γ.

The Stein equation for multivariate Normal approximation is defined as

g(y)E[g(NΣ)]=y,fg(y)dΣ,Hessfg(y)H.S.,yRd(5)
where g:RdR is given, fg is unknown, Σ is the (invertible) covariance matrix of the centered Gaussian vector NΣ, and the symbol ·,·d denotes the inner product in Rd.

The following lemmas provide solutions to Stein’s Equation (5) under different assumptions on g.

Lemma 2.7.

Let gLd(1). Then, the function

fg(y)0E[g(NΣ)g(ety+1e2tNΣ)]dt,yRd
is such that fgC2(Rd), fg solves (5), fg satisfies
ifg1,for any i=1,,d,(6)
and
supyRdHess fg(y)H.S.dΣ1opΣop1/2.

Lemma 2.8.

For g:RdR measurable and bounded, define the smoothed function

gt(y)E[g(tNΣ+1ty)],yRd,(7)
where t(0,1) is a smoothing parameter. Then:
  1. For any t(0,1), the function

    ft,g(y)12t111sE[g(sNΣ+1sy)g(NΣ)]ds,yRd

    is such that ft,gC2(Rd),ft,g solves (5) with gt in place of g, and

    ift,gg1ttj=1d(Σ1/2)jiΣjj,for any i=1,,d.(8)

  2. For any d-dimensional random vector Y, it holds

    supgIdEHess(ft,g(Y))H.S.2Σ1op2(d2(logt)2dc(Y,NΣ)+530d17/6),for any t(0,1).

See proposition 4.3.2 in Nourdin and Peccati (2012) for Lemma 2.7; in particular, in Nourdin and Peccati (2012) it is noticed that

ifg(y)=0etE[ig(ety+1e2tNΣ)]dt,i=1,,d
which, combined with the fact that gLd(1), gives the bound (6); see Schulte and Yukich (2019) p. 12, and proposition 2.3 for lemma 2.8 and lemma 3.6(ii) in Torrisi (2023) for the bound (8).

2.4. The Smoothing Lemma and the Integration by Parts Formula for Gaussian Random Vectors

We state a remarkable smoothing lemma for the convex distance proved in Schulte and Yukich (2019); see lemma 2.2 therein. It plays a crucial role in the proof of the Normal approximation of the output of a deep random Gaussian NN in the metric dc; see Theorem 6.1.

Lemma 2.9.

Let Y be a d-dimensional random vector. Then, for any t(0,1),

dc(Y,NΣ)43supCCd|P(tNΣ+1tYC)P(tNΣ+1tNΣC)|+20d2t1t,
where Cd is given in Definition 2.2.

We recall the Gaussian integration by parts formula (we refer the reader to exercise 3.1.4 in Nourdin and Peccati (2012) for the Part (i) of Lemma 2.10 and to exercise 3.1.5 in Nourdin and Peccati (2012) for the Part (ii) of Lemma 2.10).

Lemma 2.10.

The following claims hold:

  1. NN(μ,η),η>0, if and only if, for any differentiable function g:RR such that E|g(N)|<, we have E(Nμ)g(N)=ηEg(N).

  2. Let gC1(Rd) with bounded first partial derivatives. Then,

    E[(NΣ)ig(NΣ)]=j=1dΣijE[jg(NΣ)],for any i=1,,d.

This relation holds true even if Σ is not positive definite.

3. Random Neural Networks

We let LN, we take L + 2 positive integers n0,,nL+1N, and we fix a function σ:RR. A fully connected NN of depth L with input dimension n0, output dimension nL+1, hidden layer widths n1,,nL, and nonlinearity σ is a mapping

x(x1,,xn0)Rn0z(L+1)(x)=(z1(L+1)(x),,znL+1(L+1)(x)))RnL+1
that is defined by a recursive relation of the form
zi(1)(x)=bi(1)+j=1n0Wij(1)xj,i=1,,n1zi()(x)=bi()+j=1n1Wij()σ(zj(1)(x)),i=1,,n,=2,,L+1
where the parameters bi()R and Wij()R are called network biases and weights, respectively. The quantities L and n0,,nL+1 constitute the so-called network architecture. The function σ is usually called activation function. NNs of this kind will be denoted by
NN(L,n0,nL+1,nL,σ,x,b,W),
where nL(n1,,nL), b(bi()) and W(Wij()).

We say that the neural network NN(L,n0,nL+1,nL,σ,x,b,W) is a (fully connected and) deep random Gaussian neural network denoted by

GNN(L,n0,nL+1,nL,σ,x,b,W),
if σ:RR is measurable and bi(),Wij(),i=1,,n,j=1,,n1,=1,,L+1, are independent random variables with
bi()N(0,Cb) and Wij()N(0,CW/n1),=1,,L+1
for constants Cb0 and CW>0.

NNs of depth L = 1 are called shallow NNs. We will denote shallow NNs (respectively, shallow random Gaussian NNs) by NN(1,n0,n2,n1,σ,x,b,W) (respectively, by GNN(1,n0,n2,n1,σ,x,b,W)).

Throughout this paper, we will also consider NNs with univariate output, that is, NNs with nL+1=1.

Consider a deep random Gaussian neural network GNN(L,n0,nL+1,nL,σ,x,b,W). It turns out that the random variables zi(1)=zi(1)(x),i=1,,n1, are independent and identically distributed with

zi(1)N(0,Cb+CWn0j=1n0xj2).

For =1,,L, let F be the σ-field generated by the random variables

{bi(h),Wij(h),i=1,,nh,j=1,,nh1,h=1,,}.

By construction, for any fixed {2,,L+1}, given F1, the random variables zi()=zi()(x),i=1,,n, are independent and Gaussian (as linear combination of independent Gaussian random variables). A straightforward computation yields

E[zi()|F1]=0,i=1,,n
and
E[|zi()|2|F1]=Cb+CWn1j=1n1|σ(zj(1))|2,i=1,,n.(9)

Setting n=(n1,,n),=1,,L, we define the quantities

On()1nj=1nσ(zj())2,=1,,L
and
O()Eσ(s1Z)2,s12Cb+CWO(1),=1,,L(10)
where
O(0)1n0j=1n0xj2 and ZN(0,1).(11)

The random variable On() is often referred to as collective observable at layer ; see, for example, Roberts et al. (2022) and Hanin (2023).

3.1. Some Related Literature

Consider the output z(L+1)(z1(L+1),,znL+1(L+1)) of a deep random Gaussian neural network GNN(L,n0,nL+1,nL,σ;x;b,W), and let

z(z1,,znL+1)
be a centered nL+1-dimensional Gaussian random vector with covariance matrix
ΣnL+1sL2IdnL+1,sL2Cb+CWO(L),(12)
where IdnL+1 is the identity matrix of MnL+1×nL+1(R). Here and henceforth, we suppose that the quantities Cb,x,σ(0), where x is the input of the network, are not all simultaneously equal to zero. This causes no loss of generality, because otherwise z(L+1)=z=0 almost surely.

It follows from theorem 1.2 in Hanin (2023) (which indeed, more generally, establishes a functional weak convergence) that, if σ is continuous and polynomially bounded, then,

z(L+1)z in law, as min{n1,,nL}+.(13)

The following result for shallow random Gaussian NNs was proved in Bordino et al. (2024); see theorem 3.2 therein.

Theorem 3.1.

Let GNN(1,n0,1,n1,σ,x,b,W) be a shallow random Gaussian NN with univariate output. If

σC2(R) and max{|σ(x)|,|σ(x)|,|σ(x)|}r1+r2|x|γ,xR(14)
for some r1,r2,γ0, then
ds(z(2),z)csr1+r2|s0Z|γL42s02+s04(2+3(1+2s02+3s04))×1n1,
where s=TV,K,W1 and
cTV4s12,cK;=2s12,cW11s18/π.

In Section 4, we will give bounds on the quantities ds(z(2),z),s=TV,K,W1, of order 1/n1, as n1, under a minimal assumption on the activation function (note that Condition (14) excludes the important case of the ReLU function, that is, σ(x)x1{x0}); see Theorem 4.1. In Section 6, we will give two general bounds on dc(z(L+1),z) and dW1(z(L+1),z) for deep random Gaussian NNs; see Theorems 6.1 and 6.3. When specialized to shallow random Gaussian neural networks GNN(1,n0,n2,n1,σ,x,b,W), they provide computable bounds, respectively, on dc(z(2),z) and dW1(z(2),z) of order 1/n1, as n1, see theorem 3.3 in Bordino et al. (2024) for a related result.

The first result in the literature that quantifies the convergence in distribution (13) with L2 is given in Basteri and Trevisan (2024), where the following theorem has been proven.

Theorem 3.2.

Let GNN(L,n0,nL+1,nL,σ,x,b,W) be a deep random Gaussian NN, and suppose that the activation function σ is Lipschitz continuous. Then,

dW2(z(L+1),z)nL+1i=1LC(i+1)[Lip(σ)CW]Lini,(15)
where, for any i=1,,L,C(i+1) are explicitly known positive constants, depending upon σ, x, Cb and CW.

The next corollary is an immediate consequence of Theorem 3.2, the fact that dW1dW2, Proposition 2.5, and (3).

Corollary 3.3.

Let the assumptions and notation of Theorem 3.2 prevail. Then,

dW1(z(L+1),z)nL+1i=1LC(i+1)[Lip(σ)CW]Lini(16)
and
dc(z(L+1),z)2118π18nL+138(i=1LC(i+1)[Lip(σ)CW]Lini)1/2.(17)

Theorems 6.1 and 6.3 will provide, under alternate assumptions on σ (see by Proposition 5.2(ii)), explicit bounds, respectively, on dc(z(L+1),z) and dW1(z(L+1),z) that are of the same order of the bound in (16), as n1,,nL. In particular, the bound on the convex distance of Theorem 6.1 considerably improves the one in (17). We emphasize that to compare the results in Basteri and Trevisan (2024) with our achievements, we specialized those results to the case of a single input xRn0. In fact, the bound (15) was proven in Basteri and Trevisan (2024) for multiple inputs, and consequently the bound (17) can be stated for multiple inputs too.

Remark 3.4.

Although not strictly related to our results, the pioneering papers Eldan et al. (2021) and Neal (1996) deserve a special mention. In Neal (1996) the author considered a random shallow NN(1,n0,1,n1,σ,x,0,W) with univariate output, bi(1)0, for all i=1,,n1,b1(2)0, Wij(1),i=1,,n1,j=1,,n0, independent with law N(0,1) and W1j(2),j=1,,n1, independent, identically distributed with law P(W1j(2)=±1/n1)=1/2 and independent of the random variables Wij(1). It was proven in Neal (1996) that there exists a Gaussian process G on Sn01 (the unit sphere in Rn0) such that the process {z(2)(x)}xSn01 converges in distribution to G, as n1. Quantitative versions of this result (for various Wasserstein metrics and some specific choices of σ) are provided in Eldan et al. (2021).

4. Normal Approximation of Shallow Random Gaussian NNs with Univariate Output

The following theorem holds.

Theorem 4.1.

Let GNN(1,n0,1,n1,σ,x,b,W) be a shallow random Gaussian NN with univariate output, and assume that the activation function σ is such that

0<Var(σ(s0Z)2)<.(18)

Then:

  1. dK(z(2),z)CWVar(σ(s0Z)2)Cb+CWEσ(s0Z)21n1.

  2. dTV(z(2),z)2CWVar(σ(s0Z)2)Cb+CWEσ(s0Z)21n1.

  3. dW1(z(2),z)2/πCWVar(σ(s0Z)2)Cb+CWEσ(s0Z)21n1.

    Note that the bound on the Kolmogorov distance is better than the one that can be obtained using the relation dKdTV.

Remark 4.2.

Remarkably, theorem 3.3 in Favaro et al. (2023) shows that if GNN(1,n0,1,n1,σ,x,b,W) is a shallow random Gaussian NN with univariate output and the activation function σ is polynomially bounded to order r1 (see definition 2.1 in Favaro et al. (2023)), then there exist two constants C,C0>0 such that

C0n1max{dW1(z(2),z),dTV(z(2),z)}Cn1.

Although this inequality shows the optimality of the rate 1/n1, because the constants are not provided in closed form, it cannot be directly used for the purpose of output localization (see Section 7). Moreover, the assumption (18) on σ does not require any regularity of the activation function.

Proof.

We prove the three bounds (i), (ii), and (iii) separately by the Stein method.

Proof of Part (i).

Consider the Stein Equation (4) with

g(w)1(,y](s1w).

Let fg be the unique solution of the Stein equation (see Lemma 2.6(i)). Then, for any yR,

1{z(2)y}P(zy)=fg(z(2)/s1)(z(2)/s1)fg(z(2)/s1).

Taking the expectation, we have

P(z(2)y)P(zy)=E[fg(z(2)/s1)(z(2)/s1)fg(z(2)/s1)].

By Lemma 2.10(i), we have

E[(z(2)/s1)fg(z(2)/s1)|F1]=s12(Cb+CWOn1(1))E[fg(z(2)/s1)|F1]=E[s12(Cb+CWOn1(1))fg(z(2)/s1)|F1],(19)
where the latter equality follows by the F1-measurability of On1(1). Then,
P(z(2)y)P(zy)=E[fg(z(2)/s1)(1s12(Cb+CWOn1(1)))],yR.

Setting

φ(n1)s12CWVar(On1(1))=s12CWVar(σ(z1(1))2)/n1,(20)
we have
P(z(2)y)P(zy)φ(n1)=E[fg(z(2)/ν)Vn1],(21)
where
Vn11s12(Cb+CWOn1(1)))φ(n1)=On1(1)O(1)Var(On1(1))=j=1n1σ(zj(1))2n1Eσ(z1(1))2n1Var(σ(z1(1))2).

Taking the modulus in (21) and then using that fg1 uniformly in yR (see Lemma 2.6(i)) and that EVn12=1, we have

dK(z(2),z)φ(n1)E[|Vn1|]φ(n1),
which, combined with (20), proves the statement.

Proof of Part (ii).

Consider the Stein Equation (4) with g(w)1B(s1w), where BRd is a Borel set. Let fg be the unique solution of the Stein equation (see Lemma 2.6(ii)). Then,

1B(z(2))E1B(z)=fg(z(2)/s1)(z(2)/s1)fg(z(2)/s1).

Taking the expectation and arguing as in (19), we have

P(z(2)B)P(zB)=E[fg(z(2)/s1)(1s12(Cb+CWOn1(1)))].

Along similar computations as for (21), we have

P(z(2)B)P(zB)φ(n1)=E[fg(z(2)/s1)Vn1].

Taking the modulus on this relation and then using that fg2 (see Lemma 2.6(ii)) and that EVn12=1, we have

dTV(z(2),z)2φ(n1)E[|Vn1|]2φ(n1),
which, combined with (20), proves the statement.

Proof of Part (iii).

Consider the Stein Equation (4) with g(y)h(s1y), where h:RR is Lipschitz continuous with Lip(h)1. Let fg be the unique solution of the Stein equation (see Lemma 2.6(iii)). Then,

h(z(2))Eh(z)=fg(z(2)/s1)(z(2)/s1)fg(z(2)/s1).

Taking the expectation and arguing as in (19), we have

Eh(z(2))Eh(z)=E[fg(z(2)/s1)(1s12(Cb+CWOn1(1)))].

Along similar computations as for (21), we have

Eh(z(2))Eh(z)φ(n1)=E[fg(z(2)/s1)Vn1].

Taking the modulus on this relation and then using that fgs12/π (see Lemma 2.6(iii)) and that EVn12=1, we have

dW1(z(2),z)s12/πφ(n1)E[|Vn1|]s12/πφ(n1),
which, combined with (20), proves the statement. □

Note that both Theorem 3.1 and Theorem 4.1 provide bounds on ds(z(2),z),s=TV,K,W1, with a common rate 1/n1, but different constants. In Table 1, we compare those constants in a special case. We observe that the constants given by Theorem 4.1 are more effective than those in Bordino et al. (2024). We also note that Condition (18) is satisfied by the ReLU activation function, whereas the assumptions of Theorem 3.1 do not hold for the ReLU.

5. A Key Estimate for the Collective Observables

The next theorem provides an estimate for the L2-norm of the random variable On()O(),=1,,L. In Section 6, such an estimate will play a crucial role in the proofs of the results on the Normal approximation of the output of a deep random Gaussian NN both in the convex and in the 1-Wasserstein distances (see Theorems 6.1 and 6.3).

Hereon, we denote by YL2(E[|Y|2])1/2 the L2-norm of a real-valued random variable Y.

Theorem 5.1.

Let GNN(L,n0,nL+1,nL,σ,x,b,W) be a deep random Gaussian NN. Suppose that the activation function σ is such that:

  1. For any a1,a20, there exists a polynomial

    P(x)k=0mdkxk,

    with nonnegative coefficients dk=dk(σ(·),Cb,CW)0 dependent only on σ(·),Cb,CW and degree m0 independent of σ(·),a1,a2,Cb,CW, such that

    |σ(xCb+CWa2)2σ(xCb+CWa1)2|P(|x|)|a2a1|,for all xR.(22)

  2. For any κR,Eσ(κZ)4<.

Then, for any =1,,L, we have

On()O()L2k=1(42P(|Z|)2)kcknk,
where
ck=ck(n0,σ,x,Cb,CW)2Eσ(sk1Z)4<,k=1,,L.(23)

The proof of the theorem is given later on in this section. We proceed stating a proposition and a remark, which clarify the generality of our assumptions on the activation function σ.

Proposition 5.2.

The following statements hold:

  1. If σ is the perceptron function, that is, σ(x)1{x0},xR, then it satisfies Conditions (i) and (ii) of Theorem 5.1.

  2. If σ is Lipschitz continuous and Cb>0, then σ satisfies Conditions (i) and (ii) of Theorem 5.1. In particular, Condition (i) holds with

    P(x)2|σ(0)|CWLip(σ)2Cbx+CWLip(σ)2x2.(24)

  3. If σ is Lipschitz continuous and σ(0)=0, then σ satisfies Conditions (i) and (ii) of Theorem 5.1. In particular, Condition (i) holds with

    P(x)CWLip(σ)2x2.(25)

  4. If σ is such that σ(·)2 is Lipschitz continuous and Cb>0, then σ satisfies Conditions (i) and (ii) of Theorem 5.1. In particular, Condition (i) holds with

    P(x)=Lip(σ2)CW2Cbx.(26)

The proof of the proposition is given later on in this section.

Remark 5.3.

As a consequence of Proposition 5.2, we have that the most common activation functions satisfy the assumptions of Theorem 5.1. Indeed, one can easily prove that the ReLU function σ(x)x1{x0}, the hyperbolic tangent function σ(x)(e2x1)/(e2x+1), the sin function σ(x)sin(x), and the SWISH function σ(x)x/(1+ex) are Lipschitz continuous and equal to zero in zero. Moreover, if Cb>0, then also the sigmoid function σ(x)(1+ex)1 and the softplus function σ(x)log(1+ex) satisfy the assumptions of Theorem 5.1, and indeed they are Lipschitz continuous. We emphasize that, if either the biases are nonnull or the activation function vanishes at 0, then the conditions on the activation function of Theorem 5.1 are more general than the one required in Basteri and Trevisan (2024), where σ(·) is assumed Lipschitz continuous (see Theorem 3.2 and Proposition 5.2 parts (ii) and (iii)). We also emphasize that the conditions on the activation function of Theorem 5.1 are satisfied by the perceptron function that is noncontinuous and therefore non-Lipschitz (see Proposition 5.2(i). Another non-Lipschitz function that satisfies the conditions of Theorem 5.1 when the biases are nonnull I, for example, σ(x)x1{x0}. Indeed, σ2 is the ReLU function and therefore Lipschitz continuous (see Proposition 5.2(iv)).

Proof of Theorem 5.1.

We consider separately the cases of the first hidden layer and that of the following ones.

  • Case =1.

Because the random variables zi(1),i=1,,n1, are independent and identically distributed with law N(0,s02), we have

On1(1)O(1)L2=E(1n1j=1n1σ(zj(1))2Eσ(s0Z)2)2=E(1n1j=1n1(σ(zj(1))2Eσ(z1(1))2))2=1n1Var(σ(z1(1))2)1n1Eσ(s0Z)4(27)
c1n1.(28)

Note that this latter term is finite because of the assumption (ii).

  • Case =2,,L.

Take {2,,L}. We have already noticed that, given F1, the random variables {zi()}i=1,,n are independent with Gaussian law with mean zero and variance

s1,n12Cb+CWOn1(1).

Therefore, letting Z1 denote a standard Gaussian random variable, independent of F1, we have

zi()=ds1,n1Z1,i=1,,n
where the symbold =d denotes the equality in law (this relation immediately follows computing, for example, the characteristic function of both random variables). Therefore, letting p(·) denote the standard Gaussian density, we have
E[σ(zi())r|F1]=dRσ(s1,n1z)rp(z)dz,r{2,4},i=1,,n(29)
and
EOn()=Eσ(s1,n1Z1)2.

By assumption (i) and the fact that Z1 is independent of F1, we have

|EOn()O()|=|E[σ(s1,n1Z1)2]E[σ(s1Z1)2]|EP(|Z1|)|On1(1)O(1)|EP(|Z|)On1(1)O(1)L2.

Therefore,

On()O()L2On()EOn()L2+|EOn()O()|=Var(On())+|EOn()O()|Var(On())+EP(|Z|)On1(1)O(1)L2.(30)

Note that

Var(On())=1n2(E(j=1nσ(zj())2)2n2(Eσ(z1())2)2)=1n2(nEσ(z1())4+n(n1)Eσ(z1())2σ(z2())2n2(Eσ(z1())2)2)=1n2(nEσ(z1())4nEσ(z1())2σ(z2())2+n2Cov(σ(z1())2,σ(z2())2))=1n2(nVar(σ(z1())2)+(n2n)Cov(σ(z1())2,σ(z2())2))=1nVar(σ(z1())2)+(11n)Cov(σ(z1())2,σ(z2())2).(31)

By (29), we have

E[σ(z1())4]=Eσ(s1,n1Z1)4.

By assumption (i), we have

σ(s1,n1Z1)2P(|Z1|)|On1(1)O(1)|+σ(s1Z1)2,P-a.s.
and so (using that Z1 is independent of F1 and the inequality (a+b)22a2+2b2,a,bR),
Var(σ(z1())2)E[σ(z1())4]2EP(|Z|)2On1(1)O(1)22+2Eσ(s1Z)4=AOn1(1)O(1)L22+c2,(32)
where A2EP(|Z|)2<. Note that the quantities O(),=2,,L, are all finite because of the assumption (ii). Then, again by assumption (ii), we have
Eσ(s1Z)4<,for any =2,,L
and therefore, c<, for any =2,,L. By the conditional independence of the random variables z1() and z2(), given F1, we have
Cov(σ(z1())2,σ(z2())2)=Cov(E[σ(z1())2|F1],E[σ(z2())2|F1])=E[(E[σ(z1())2|F1]Eσ(z1())2)(E[σ(z2())2|F1]Eσ(z2())2)],
and so, by the Cauchy-Schwarz inequality and (29) we have
|Cov(σ(z1())2,σ(z2())2)|E[(E[σ(z1())2|F1]Eσ(z1())2)2].(33)

Letting PX denote the law of a random variable X and again using (29), we have that the random variable E[σ(z1())2|F1]Eσ(z1())2 has the same law as the random variable

R(σ(s1,n1z)2[0,)σ(zCb+CWy)2POn1(1)(dy))p(z)dz=[0,)×R(σ(s1,n1z)2σ(zCb+CWy)2)POn1(1)(dy)p(z)dz.

Therefore, by (33) and Jensen’s inequality, we have

|Cov(σ(z1())2,σ(z2())2)|E[0,)×R(σ(s1,n1z)2σ(zCb+CWy)2)2POn1(1)(dy)p(z)dz

By assumption (i), it then follows that

|Cov(σ(z1())2,σ(z2())2)|(EP(|Z|))2[0,)E|On1(1)y|2POn1(1)(dy)AVar(On1(1)),(34)
where the latter relation follows by the definition of the constant A. Combining (31), (32), and (34), we have
Var(On())A(Var(On1(1))+On1(1)Oσ2(1)L22)+c2n.

Iterating this inequality, we have

Var(On())A(A(Var(On2(2))+On2(2)O(2)L22)+c12n1)+AOn1(1)O(1)L22+c2n=A2Var(On2(2))+A2On2(2)O(2)L22+AOn1(1)O(1)L22+Ac12n1+c2nA3Var(On3(3))+A3On3(3)O(3)L22+A2On2(2)O(2)L22+AOn1(1)O(1)L22+A2c22n2+Ac12n1+c2nA1Var(On1(1))+k=11AkOnk(k)O(k)L22+k=2Akck2nk=2A1Var(On1(1))+k=21AkOnk(k)O(k)L22+k=2Akck2nk,
for any =2,,L, where the latter equality follows noticing that EOn1(1)=O(1). Here, we adopt the usual convention k=k1k2=0 if k1>k2. Note that by (27), we have
Var(On1(1))1n1Eσ(s0Z)4,
and so,
2Var(On1(1))c12n1.

Consequently,

Var(On())k=21AkOnk(k)O(k)L22+k=1Akck2nk.

Combining this inequality with (30) and using the elementary relation a1+a2a1+a2,a1,a20, for any =2,,L, we have

On()O()L2k=21A(k)/2Onk(k)O(k)L2+k=1A(k)/2cknk+EP(|Z|)On1(1)O(1)L2k=21B(k)/2Onk(k)O(k)L2+k=1B(k)/2cknk,(35)
where we used that EP(|Z|)A1/2, and we set B4A. Recalling that A=2P(|Z|)2 and the definition of B, one easily realizes that the claim reads as
On2()O()L2j=1(2B)jcjnj,=2,,L.(36)

Now, we use the relation (35) to prove (36) by induction on =2,,L. Taking =2 in (35), we have

On2(2)O(2)L2B1/2c1n1+c2n22B1/2c1n1+c2n2,
for example, (36) with =2. Now, suppose that
Onk(k)O(k)L2j=1k(2B)kjcjnj,for any k=2,,1.

Then, by (35), we have

On()O()L2k=21B(k)/2j=1k2kjB(kj)/2cjnj+k=1B(k)/2cknkk=21j=1k2kjB(j)/2cjnj+k=1B(k)/2cknkj=11k=j12kjB(j)/2cjnj+k=1B(k)/2cknk=j=11(k=j12kj+1)B(j)/2cjnj+cn=j=11(2B)jcjnj+cn=j=1(2B)jcjnj,
where we used that
k=j12kj+1=s=0j12s+1=2j,for any j=1,,1
because {2s}s0 is a geometric progression. The proof is completed. □

Proof of Proposition 5.2.

Proof of (i).

The claim immediately follows noticing that, because of the nonnegativity of the quantities Cb+CWa2 and Cb+CWa1, we have |σ(xCb+CWa2)2σ(xCb+CWa1)2|=0, for any xR.

Proof of (ii).

Because σ is Lipschitz continuous, we have

|σ(xCb+CWa2)2σ(xCb+CWa1)2|=|σ(xCb+CWa2)σ(xCb+CWa1)σ(xCb+CWa2)+σ(xCb+CWa1)|Lip(σ)|xCb+CWa2Cb+CWa1|(|σ(xCb+CWa2)|+|σ(xCb+CWa1)|)Lip(σ)|xCb+CWa2Cb+CWa1|[2|σ(0)|+Lip(σ)|x|(Cb+CWa2+Cb+CWa1)],(37)
where the latter inequality follows noticing that (again by the Lipschitz continuity of σ) for any x,κR,
|σ(κx)||σ(0)|+Lip(σ(·))|κx|.(38)

Multiplying and dividing the term in (37) by Cb+CWa2+Cb+CWa1, we easily have that

|σ(xCb+CWa2)2σ(xCb+CWa1)2|CWLip(σ)|x|(2|σ(0)|Cb+CWa2+Cb+CWa1+Lip(σ)|x|)|a2a1|P(|x|)|a2a1|,
where P(x) is defined by (24). As far as Condition (ii) of Theorem 5.1 is concerned, we note that by (38)
σ(κZ)4(|σ(0)|+Lip(σ)|κZ|)4, almost surely 
and so the claim is an immediate consequence of the fact that the absolute moments of Z are finite.

Proof of (iii).

The proof is similar to the proof of (ii) and therefore is omitted.

Proof of (iv).

If σ(·)2 is Lipschitz continuous, then

|σ(xCb+CWa2)2σ(xCb+CWa1)2|Lip(σ2)|xCb+CWa2Cb+CWa1|=Lip(σ2)|xCb+CWa2Cb+CWa1|Cb+CWa2+Cb+CWa1Cb+CWa2+Cb+CWa1=Lip(σ2)|x(Cb+CWa2)(Cb+CWa1)|1Cb+CWa2+Cb+CWa1Lip(σ2)CW2Cb|xa2a1|,
which shows that Condition (i) of Theorem 5.1 holds with P(x) given by (26). Furthermore, using (38) with σ(·)2 in place of σ(·), for any κR,
σ(κZ)4(|σ(0)|2+Lip(σ(·)2)|κZ|)2,almostsurely.

Therefore, Condition (ii) of Theorem 5.1 is an immediate consequence of this latter relation and the fact that the absolute moments of Z are finite. □

6. Normal Approximation of Deep Random Gaussian NNs

6.1. Normal Approximation of Deep Random Gaussian NNs in the Convex Distance

The following theorem holds.

Theorem 6.1.

Let GNN(L,n0,nL+1,nL,σ;x;b,W) be a deep random Gaussian NN, and let the notation and assumptions of Theorem 5.1 prevail. Then,

dc(z(L+1),z)C1(k=1L[42P(|Z|)L2]Lkcknk)Ci(k=1L[42P(|Z|)L2]Lkcknk),i=2,3
where the constants ck, k=1,,L, are defined by (23),
C1=C1(n0,nL+1,x,σ,Cb,CW)CW(80sL+13+48sL+12+202)nL+159/24,C2=C2(nL+1,Cb,CW)CW(80Cb3/2+48Cb+202)nL+159/24(39)
and
C3=C3(n0,nL+1,x,σ,CW)CW(80(CWO(L+1))3/2+48CWO(L+1)+202)nL+159/24.

Here, sL+1Cb+CWO(L+1), and clearly the upper bound with constant C2 holds under the additional assumption that the biases are nonnull.

Remark 6.2.

Let GNN(L,n0,nL+1,nL,σ;x;b,W) be a deep random Gaussian NN. Theorem 3.5 in Favaro et al. (2023) shows that if

c2nn1,,nLc1n,for some constants c1c2>0 and some n1(40)
and σ is polynomially bounded to order r1, then there exists a constant C0 such that
dc(z(L+1),z)C0n1/2.

We stress that the bounds in Theorem 6.1 provide (under different assumptions on σ and without any condition on the widths of the hidden layers) a detailed description of the analytical dependence of the upper estimate on the parameters of the model.

Proof.

Throughout this proof, for ease of notation, we put

κdc(z(L+1),z) and γCWOnL(L)O(L)L2.

We preliminarily note that it suffices to prove that

κ(80ΣnL+11op3/2+48ΣnL+11op+202)nL+159/24γ.(41)

Indeed, the claim then follows by Theorem 5.1, noticing that

ΣnL+11op=1sL(42)
and that C1Ci, i = 2, 3.

If γ>1/e, then the inequality (41) holds because κ1 (which follows by the definition of the convex distance) and

202nL+159/24γ>202γ>202/3>1.

From now on, we assume γ1/e. Let h(·)1C(·), where C is an arbitrarily fixed measurable convex set in RnL+1, and let

ht(y)Eh(tz+1ty),t(0,1),yRnL+1.

For any t(0,1), by Lemma 2.8(i),

ft,h(y)12t111s(Eh(tz+1ty)Eh(z))ds,yRnL+1
solves the Stein Equation (5) with nL+1, ht, ΣnL+1 defined by (12), and z, in place of d, g, Σ and NΣ, respectively, that is,
ht(y)E[ht(z)]=y,ft,h(y)nL+1ΣnL+1,Hessft,h(y)H.S.,yRnL+1.(43)

By Lemma 2.9, it follows that

κ43suphInL+1|Eht(z(L+1))Eht(z)|+20nL+12t1t,t(0,1).(44)

Without loss of generality, hereafter we assume that z is independent of FL. Therefore, by (43), we have

E[ht(z(L+1))ht(z)|FL]=i=1nL+1E[zi(L+1)ift,h(z(L+1))|FL]i,j=1nL+1ΣnL+1(i,j)E[ij2ft,h(z(L+1))|FL].(45)

By Lemma 2.8(i), for any t(0,1), the mapping yift,h(y) is in C1(RnL+1) and has bounded first-order derivatives. Then, because z(L+1)|FL is a centered Gaussian random vector with covariance matrix

ΣnL+1(Cb+CWOnL(L))IdnL+1,(46)
by Lemma 2.10(ii), we have
E[zi(L+1)ift,h(z(L+1))|FL]=j=1nL+1ΣnL+1(i,j)E[ij2ft,h(z(L+1))|FL].

On combining this relation with (45) and taking the expectation, we have

E[ht(z(L+1))ht(z)]=i,j=1nL+1E[(ΣnL+1(i,j)ΣnL+1(i,j))E[ij2ft,h(z(L+1))|FL]]=i,j=1nL+1E[E[(ΣnL+1(i,j)ΣnL+1(i,j))ij2ft,h(z(L+1))|FL]]=EΣnL+1ΣnL+1,Hess(ft,h(z(L+1)))H.S.(47)
where in the second equality we used the FL-measurability of OnL(L). Taking the modulus on the relation (47) and applying the Cauchy-Schwarz inequality, we have
|E[ht(z(L+1))ht(z)]|EΣnL+1ΣnL+1H.S.2EHess(ft,h(z(L+1)))H.S.2.(48)

By Lemma 2.8(ii), for any hInL+1, we have

EHess(ft,h(z(L+1)))H.S.2ΣnL+11op2(nL+12(logt)2κ+530nL+117/6),t(0,1).

Moreover,

EΣnL+1ΣnL+1H.S.2=nL+1CW2OnL(L)O(L)L22.(49)

On combining these relations and using the elementary inequality a1+a2a1+a2,a1,a20, we have

supCCnL+1|P(tz+1tz(L+1)C)P(tz+1tzC)|CWΣnL+11op(nL+13/2|logt|κ+24nL+123/12)OnL(L)O(L)L2.

On combining this latter inequality with (44), we have

κ43ΣnL+11op(nL+13/2|logt|κ+24nL+123/12)γ+20nL+12t1t,t(0,1).(50)

Because κ1, by this relation, we have

κ43ΣnL+11op(nL+13/2|logt|+24nL+123/12)γ+20nL+12t1t,t(0,1).

Setting t=γ2 in this latter inequality (note that this choice of the parameter t is admissible because γ1/e<1), we have

κ43ΣnL+11op(2nL+13/2|logγ|+24nL+123/12)γ+20nL+12γ1γ243ΣnL+11op(2nL+13/2|logγ|+24nL+123/12)γ+202nL+1γ,(51)
where in the latter inequality we used the relation
12γ1γ22γ,(52)
which holds because γ1/e<1/2. We rewrite the inequality (51) as
κ83ΣnL+11opnL+13/2γ|logγ|+(32nL+123/12ΣnL+11op+202nL+1)γ.

Taking the square root and multiplying by |logγ|, we have

|logγ|κ83ΣnL+11op1/2nL+13/4γ1/2|logγ|3/2+(32nL+123/12ΣnL+11op+202nL+1)1/2γ1/2|logγ|.

Because max{supy(0,1/e]y1/2|logy|3/2,supy(0,1/e]y1/2|logy|1/2}4, we have

|logγ|κ483ΣnL+11op1/2nL+13/4+4(32nL+123/12ΣnL+11op+202nL+1)1/2=863ΣnL+11op1/2nL+13/4+4(32nL+123/12ΣnL+11op+202nL+1)1/2863ΣnL+11op1/2nL+13/4+162nL+123/24ΣnL+11op1/2+202nL+11/2[(863+162)ΣnL+11op1/2+202]nL+123/24(30ΣnL+11op1/2+6)nL+123/24.(53)

By (50) with t=γ2, (52), and (53), we finally have (41); indeed,

κ43ΣnL+11op(2nL+13/2|logγ|κ+24nL+123/12)γ+202nL+1γ43ΣnL+11op[(60ΣnL+11op1/2+12)nL+159/24+24nL+123/12]γ+202nL+1γ(80ΣnL+11op3/2+48ΣnL+11op+202)nL+159/24γ.

The proof is completed. □

6.2. Normal Approximation of Deep Random Gaussian NNs in the 1-Wasserstein Distance

The following theorem holds.

Theorem 6.3.

Let GNN(L,n0,nL+1,nL,σ,x,b,W) be a deep random Gaussian NN, and let the notation and assumptions of Theorem 5.1 prevail. Then,

dW1(z(L+1),z)K1(k=1L[42P(|Z|)L2]Lkcknk)Ki(k=1L[42P(|Z|)L2]Lkcknk),i=2,3
where the constants ck, k=1,,L, are defined by (23),
K1=K1(n0,nL+1,x,σ,Cb,CW)nL+1CWsL,K2=K2(nL+1,Cb,CW)nL+1CWCb
and
K3=K3(n0,nL+1,x,σ,CW)nL+1CWO(L).

Here again, the upper estimate with the constant K2 holds if Cb>0.

Remark 6.4.

Let GNN(L,n0,1,nL,σ,x,b,W) be a deep random Gassian NN with univariate output, widths of the hidden layers satisfying (40), and a polynomially bounded to order r1 activation function σ. Then, by theorem 3.3 in Favaro et al. (2023), we have that there exist two constants C,C0>0 such that

C0ndW1(z(L+1),z)Cn.

Clearly, this inequality shows the optimality of the rate 1/n. Here again, we note that the corresponding bound provided by Theorem 6.3 gives (under different assumptions on σ and without any condition on the widths of the hidden layers) a detailed description of the analytical dependence of the upper estimate on the parameters of the model.

Proof.

Let gLnL+1(1) be arbitrarily fixed. Without loss of generality, we assume that z is independent of FL. By Lemma 2.7, we then have

E[g(z(L+1))g(z)|FL]=i=1nL+1E[zi(L+1)ifg(z(L+1))|FL]i,j=1nL+1ΣnL+1(i,j)E[ij2fg(z(L+1))|FL],(54)
where
fg(y)0E[g(z)g(ety+1e2tz)]dt,yRnL+1.

Again, by Lemma 2.7, we have that the mapping yifg(y) is in C1(RnL+1) and has bounded first-order derivatives. Applying Lemma 2.10(ii) exactly as in the proof of Theorem 6.1 (see a few lines before Equation (47)), we have

E[g(z(L+1))g(z)]=EΣnL+1ΣnL+1,Hess(fg(z(L+1)))H.S.,
where the matrix ΣnL+1 is defined by (46). Therefore, applying the Cauchy-Schwarz inequality as in (48), we have
|E[g(z(L+1))g(z)]|EΣnL+1ΣnL+1H.S.2EHess(fg(z(L+1)))H.S.2(55)

By Lemma 2.7, we have

EHess(fg(z(L+1)))H.S.2supyRnL+1Hessfg(y)H.S.nL+1ΣnL+11opΣnL+1op1/2,

On combining these relations with (49), we have

|E[g(z(L+1))g(z)]|nL+1CWΣnL+11opΣnL+1op1/2OnL(L)O(L)L2.

The claim follows taking the supremum over g on this inequality and then using Theorem 5.1, relation (42), and the fact that ΣnL+1op=sL2. □

7. Localization of the Output

In this section, we want to show the potentiality of the obtained results for practical applications. Indeed, both Theorem 4.1(ii) and Theorem 6.1 allow one to explicitly estimate the probability that the output of a random Gaussian NN evaluated at the input x belongs to a suitable set without resorting to computationally expensive Monte Carlo simulations. This is what we call output localization, which can suggest a suitable architecture design to estimate a target function f. Indeed, in statistical learning, given a training set

{(xi,f(xi)}iIRn0×RnL+1,
the goal is to estimate the unknown function f by a NN with a certain fixed architecture. This is performed by minimizing an empirical risk function over the space of NN’s parameters, that is, the biases and the weights. Such kinds of minimization problems are nonconvex and are usually addressed by a gradient descent procedure; the latter stabilizes toward a solution that depends on the initialization point. Because in practical applications the initialization point is given by a realization of a random Gaussian NN, it can be convenient to choose L, nL, σ, Cb, and CW by exploiting output localization, that is, in such a way to have a good estimate of the probability P(z(L+1)(xi)Vi),iI, where Vi is an appropriate neighborhood of f(xi).

Hence, in the following we want to show how to use the upper bound on the total variation distance provided in Theorem 4.1(ii), for a shallow random Gaussian NN with univariate output, and the upper bound on the convex distance provided by Theorem 6.1, for a deep random Gaussian NN, to localize the output. Indeed, given a measurable convex set VRnL+1, by the definitions of both the total variation and the convex distances, we have

P(zV)CboundP(z(L+1)V)P(zV)+Cbound,
where L = 1, n2=1, and
Cbound2CWVar(σ(s0Z)2)Cb+CWEσ(s0Z)21n1,(56)
for the case of a shallow NN, whereas
CboundC1(k=1L[42P(|Z|)L2]Lkcknk),(57)
for the case of a deep NN, where C1 is given by (39) and the constants ck, k=1,,L, are defined by (23).

Let Vi=1nL+1[ri,si] be a rectangle of RnL+1. Because z is an nL+1-dimensional centered Gaussian random vector with covariance matrix (12), we have

P(zV)=i=1nL+1(P(ZsisL)P(ZrisL)).

Now, we furnish numerical values of the constant Cbound in (56) and (57); in both cases, we take σ(x)x1{x0}, that is, a ReLU activation function. Because the ReLU function is Lipschitz continuous with Lipschitz constant equal to 1, EZ2=1 and EZ4=3, by Proposition 5.2(ii), we have

P(|Z|)L2=CWEZ41{Z0}=CW3/2.

By the expression of the constants c in Theorem 5.1, we have

c=s122EZ41{Z0}=s123,=1,,L.

By the definition of the quantities O(),=1,,L, (see (10)), we have

O()=s12EZ21{Z0}=s12/2,=1,,L
with O(0) given by (11). Therefore,
O()=Cb2k=01CWk2k+CW2O(0).

Table 2 gives the values of Cbound in (56) in the case of a shallow random Gaussian NN with architecture L = 1, n0=4,n1=n, and n2=1 for different values of n{1,10,102,103,104,105}. Table 3 gives the values of Cbound in (57) in the case of a deep random Gaussian NN with architecture L = 3, n0=4,n1=n2=n3=n, and n4=1, for different values of n{104,105,106,107,108,109}. In both tables, we consider four different inputs,

x{(0,0,0,0),(0.1,0.1,0.1,0.1),(0.5,0.5,0.5,0.5),(10,10,10,10)},

Table

Table 2. Values of Cbound in (56) for Different Inputs x for a Shallow Random Gaussian NN with Architecture L = 1, n0=4,n1=n,n2=1, and ReLU Activation Function

Table 2. Values of Cbound in (56) for Different Inputs x for a Shallow Random Gaussian NN with Architecture L = 1, n0=4,n1=n,n2=1, and ReLU Activation Function

x=(0,0,0,0)
n110102103104105
  CW0.010.110.010.110.010.110.010.110.010.110.010.11
Cb
10.020.211.490.010.070.470.000.020.150.000.010.050.000.000.010.000.000.00
100.010.070.470.000.020.150.000.010.050.000.000.010.000.000.000.000.000.00
x=(0.1,0.1,0.1,0.1)
n110102103104105
  CW0.010.110.010.110.010.110.010.110.010.110.010.11
Cb
10.020.211.490.010.070.470.000.020.150.000.010.050.000.000.010.000.000.00
100.010.070.470.000.020.150.000.010.050.000.000.010.000.000.000.000.000.00
x=(0.5,0.5,0.5,0.5)
n110102103104105
  CW0.010.110.010.110.010.110.010.110.010.110.010.11
Cb
10.020.221.540.010.070.490.000.020.150.000.010.050.000.000.020.000.000.00
100.010.070.470.000.020.150.000.010.050.000.000.010.000.000.000.000.000.00
x=(10,10,10,10)
n110102103104105
  CW0.010.110.010.110.010.110.010.110.010.110.010.11
Cb
10.030.480.440.010.150.140.000.050.040.000.020.010.000.000.000.000.000.00
100.010.090.360.000.030.110.000.010.040.000.000.010.000.000.000.000.000.00
Table

Table 3. Values of Cbound in (57) for Different Inputs x for a Deep Random Gaussian NN with Architecture L = 3, n0=4,n1=n2=n3=n,n4=1, and ReLU Activation Function

Table 3. Values of Cbound in (57) for Different Inputs x for a Deep Random Gaussian NN with Architecture L = 3, n0=4,n1=n2=n3=n,n4=1, and ReLU Activation Function

x=(0,0,0,0)
n104105106107108109
  CW0.010.110.010.110.010.110.010.110.010.110.010.11
Cb
10.030.5888.590.010.1828.010.000.068.860.000.022.800.000.010.890.000.000.28
100.071.38331.570.020.44104.850.010.1433.160.000.0410.490.000.013.320.000.001.05
x=(0.1,0.1,0.1,0.1)
n104105106107108109
  CW0.010.110.010.110.010.110.010.110.010.110.010.11
Cb
10.030.5889.300.010.1828.240.000.068.930.000.022.820.000.010.890.000.000.28
100.071.38331.850.020.44104.940.010.1433.180.000.0410.490.000.013.320.000.001.05
x=(0.5,0.5,0.5,0.5)
n104105106107108109
  CW0.010.110.010.110.010.110.010.110.010.110.010.11
Cb
10.030.58106.140.010.1833.560.000.0610.610.000.023.360.000.011.060.000.000.34
100.071.38338.620.020.44107.080.010.1433.860.000.0410.710.000.013.390.000.001.07
x=(10,10,10,10)
n104105106107108109
  CW0.010.110.010.110.010.110.010.110.010.110.010.11
Cb
10.031.902,998.500.010.60948.210.000.19299.850.000.0694.820.000.0229.990.000.019.48
100.071.693,027.470.020.54957.370.010.17302.750.000.0595.740.000.0230.270.000.019.57

whose Euclidean norm is, respectively, 0, strictly less than 1, 1 and strictly larger than 1, and

Cb{1,10} and CW{0.01,0.1,1}.

It is clear from Table 2 that for a shallow random Gaussian NN, the Gaussian approximation of the output is very good for any of the choices of the parameters n, Cb, and CW and of the input x. It is also clear from Table 3 that for a deep random Gaussian NN, such as the considered NN with three hidden layers, the Gaussian approximation of the output is very good for some choices of the parameters Cb, CW, and n and of the input x (also when the number n of neurons in the hidden layers is not excessively large), but it is very poor for other choices of these quantities. In order to analyze the influence of the parameters Cb and CW and of the input x on the value of Cbound in (57), in Table 4 we reported the value of the constant C1 that appears in (57), and it is explicitly given in (39). As it can be seen from this table, the value of Cbound strongly depends on the value of C1, which, in turn, is closely related to the choice of the parameters Cb and CW and does not depend much on the norm of the input vector x.

Table

Table 4. Values of C1 in (39) for Different Inputs x for a Deep Random Gaussian NN with Architecture L = 3, n0=4,n1=n2=n3=n,n4=1, and ReLU Activation Function

Table 4. Values of C1 in (39) for Different Inputs x for a Deep Random Gaussian NN with Architecture L = 3, n0=4,n1=n2=n3=n,n4=1, and ReLU Activation Function

x=(0,0,0,0)x=(0.1,0.1,0.1,0.1)x=(0.5,0.5,0.5,0.5)x=(10,10,10,10)
  CW0.010.110.010.110.010.110.010.11
Cb
11.5514.8085.041.5514.8085.001.5514.8083.861.5514.7833.09
100.363.5231.830.363.5231.830.363.5231.820.363.5230.28

References

  • Balasubramanian K, Goldstein L, Ross N, Salim A (2024) Gaussian random field approximation via Stein’s method with applications to wide random neural networks. Appl. Comput. Harmon. Anal. 72:1–38.Google Scholar
  • Basteri A, Trevisan D (2024) Quantitative Gaussian approximation of randomly initialized deep neural networks. Machine Learning 113:6373–6393.Google Scholar
  • Benktus V (2003) On the dependence of the Berry-Esseen bound on dimension. J. Statist. Planning Inference 113:385–402.Google Scholar
  • Bordino A, Favaro S, Fortini S (2024) Non-asymptotic approximations of Gaussian neural networks via second-order Poincaré inequalities. Proc. 6th Sympos. Adv. Approximate Bayesian Inference, 45–78.Google Scholar
  • Cammarota V, Marinucci D, Salvi M, Vigogna S (2024) A quantitative functional central limit theorem for shallow neural networks. Modern Stochastics Theory Appl. 11:1–24.Google Scholar
  • Chen LHY, Goldstein L, Shao QM (2011) Normal Approximation by Stein’s Method (Springer, Heidelberg, Germany).Google Scholar
  • Eldan R, Mikulincer D, Schramm T (2021) Non-asymptotic approximations of neural networks by Gaussian processes. Conf. Learn. Theory, 1754–1775.Google Scholar
  • Favaro S, Hanin B, Marinucci D, Nourdin I, Peccati G (2023) Quantitative CLTs in deep networks networks. Preprint, submitted July 12, https://arxiv.org/pdf/2307.06092.Google Scholar
  • Hanin B (2023) Random neural networks in the infinite width limit as Gaussian processes. Ann. Appl. Probab. 33:4798–4819.Google Scholar
  • Klukowski A (2022) Rate of convergence of polynomial networks to Gaussian processes. Conf. Learn. Theory, 701–722.Google Scholar
  • Lee J, Bahri Y, Novak R, Schoenholz SS, Pennington J, Sohl-Dickstein J (2018) Deep neural networks as Gaussian processes. Internat. Conf. Learn. Representations (ICLR, Appleton, WI).Google Scholar
  • Macci C, Pacchiarotti B, Torrisi GL (2024) Large and moderate deviations for Gaussian neural networks. Preprint, submitted June 25, https://arxiv.org/pdf/2401.01611.Google Scholar
  • Matthews AGG, Rowland M, Hron J, Turner RE, Ghahramani Z (2018) Gaussian process behaviour in wide deep neural networks. Internat. Conf. Learn. Representations (ICLR, Appleton, WI), 4:77–86.Google Scholar
  • Nazarov F (2004) On the maximal perimeter of a convex set in Rn with respect to a Gaussian measure. Morel J-M, Teissier B, eds. Geometric Aspects of Functional Analysis, Lecture Notes in Mathematics (Springer, Berlin), 169–187.Google Scholar
  • Neal RM (1996) Priors for infinite networks. Bickel P, Diggle P, Fienberg S, Krickeberg K, Olkin I, Wermuth N, Zeger S, eds. Bayesian Learning for Neural Networks, Lecture Notes in Statistics, vol. 118 (Springer, New York), 29–53.Google Scholar
  • Nourdin I, Peccati G (2012) Normal Approximations with Malliavin Calculus (Cambridge University Press, Cambridge, UK).Google Scholar
  • Nourdin I, Peccati G, Yang X (2022) Multivariate normal approximations on the Wiener space: New bounds in the convex distance. J. Theoret. Probab. 35:2020–2037.Google Scholar
  • Roberts DA, Yaida S, Hanin B (2022) The Principles of Deep Learning Theory. An Effective Theory Approach to Understanding Neural Networks (Cambridge University Press, Cambridge, MA).Google Scholar
  • Schulte M, Yukich JE (2019) Multivariate second order Poincaré inequalities for Poisson functionals. Electron. J. Probab. 24:1–42.Google Scholar
  • Stein C (1972) A bound for the error in the normal approximation to the distribution of a sum of dependent random variables. Berkeley Symp. Math. Statist. Prob. 6.2:583–602.Google Scholar
  • Torrisi GL (2023) Quantitative multidimensional central limit theorems for means of the Dirichlet-Ferguson measure. ALEA - Latin Amer. J. Prob. Math. Statist. 20:825–860.Google Scholar
  • Villani C (2009) Optimal Transport: Old and New (Springer, New York).Google Scholar
  • Yaida S (2019) Non-Gaussian processes and neural networks at finite widths. Preprint, submitted September 30, https://arxiv.org/abs/1910.00019.Google Scholar
  • Yang G (2019) Wide feedforward or recurrent neural networks of any architecture are Gaussian processes. Wallach H, Larochelle H, Beygelzimer A, d’Alché-Buc F, Fox E, Garnett R, eds. Adv. Neural Inform. Processing Systems, vol. 32 (Curran Associates, Red Hook, NY).Google Scholar