{'fraction_non_alphanumeric': 0.03915911998595188, 'fraction_numerical': 0.01439931766299576, 'mean_word_length': 4.092488502810424, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 11, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Stochastic Neural Networks with Infinite Width are Deterministic

This work theoretically studies stochastic neural networks, a main type of neural network in use. We prove that as the width of an optimized stochastic neural network tends to infinity, its predictive variance on the training set decreases to zero. Our theory justifies the common intuition that adding stochasticity to the model can help regularize the model by introducing an averaging effect. Two common examples that our theory can be relevant to are neural networks with dropout and Bayesian latent variable models in a special limit. Our result thus helps better understand how stochasticity affects the learning of neural networks and potentially design better architectures for practical problems.


Introduction
Applications of neural networks have achieved great success in various fields. A major extension of the standard neural networks is to make them stochastic, namely, to make the output a random function of the input. In a broad sense, stochastic neural networks include neural networks trained with dropout (Srivastava et al., 2014;Gal and Ghahramani, 2016), Bayesian networks (Mackay, 1992), variational autoencoders (VAE) (Kingma and Welling, 2013), and generative adversarial networks (Goodfellow et al., 2014). In this work, we formulate a rather broad definition of a stochastic neural network in Section 3. There are many reasons why one wants to make a neural network stochastic. Two main reasons are (1) regularization and (2) distribution modeling. Since neural networks with stochastic latent layers are more difficult to train, stochasticity is believed to help regularize the model and prevent memorization of samples (Srivastava et al., 2014). The second reason is easier to understand from the perspective of latent variable models. By making the network stochastic, one implicitly assumes that there exist latent random variables that generate the data through some unknown function. Therefore, by sampling these latent variables, we are performing a Monte Carlo sampling from the underlying data distribution, which allows us to model the underlying data distribution by a neural network. This type of logic is often invoked to motivate the VAE and GAN. Therefore, stochastic networks are of both practical and theoretical importance to study. However, most existing works on stochastic nets are empirical in nature, and almost no theory exists to explain how stochastic nets work from a unified perspective.
In this work, we theoretically study the stochastic neural networks. We prove that as the width of an optimized stochastic net increases to infinity, its predictive variance decreases to zero on the training set, a result we believe to have both important practical and theoretical implications. Two common examples that our theory can apply to are dropout and VAEs. See Figure 1 for an illustration of this effect. Along with this proof, we propose a novel theoretical framework and lay out a potential path for future theoretical research on stochastic nets. This framework allows us to abstract away the specific definitions of contemporary architectures of neural networks and makes our result applicable to a family of functions that includes many common neural networks as a strict subset.

Related Works
For most tasks, the quantity we would like to model is the conditional probability of the target y for a given input x, p w (y x). This implies that good Bayesian inference can only be made if the statistics of y are correctly modeled. For example, stochastic neural networks are expected to have well-calibrated uncertainty estimates, a trait that is highly desirable for practical safe and reliable applications (Wilson and Izmailov, 2020;Gawlikowski et al., 2021;Izmailov et al., 2021). This expectation means that a well-trained stochastic network should have a predictive variance that matches the actual level of randomness in the labeling. However, despite the extensive exploration of empirical techniques, almost no work theoretically studies the capability of a neural network to model the statistics of data distribution correctly, and our work fills in an important gap in this field of research. Two applications we consider in this work are dropout (Srivastava et al., 2014), which can be interpreted a stochastic technique for approximate Bayesian inference, and VAE (Kingma and Welling, 2013), which is among the main Bayesian deep learning methods in use.
Theoretically, while a unified approach is lacking, some previous works exist to separately study different stochastic techniques in deep learning. A series of recent works approaches the VAE loss theoretically (Dai and Wipf, 2019). Another line of recent works analyzes linear models trained with VAE to study the commonly encountered mode collapse problem of VAE (Lucas et al., 2019;Koehler et al., 2021). In the case of dropout, Gal and Ghahramani (2016) establishes the connection between the dropout technique and Bayesian learning. Another series of work extensively studied the dropout technique with a linear network (Cavazza et al., 2018;Mianjy and Arora, 2019;Arora et al., 2020) and showed that dropout effectively controls the rank of the learned solution and approximates a data-dependent L 2 regularization.
The investigation of neural network behaviour in the extreme width limit is also relevant to our work (Neal, 1996;Lee et al., 2018;Jacot et al., 2018;Matthews et al., 2018;Lee et al., 2019;Matthews et al., 2018;Novak et al., 2018;Garriga-Alonso et al., 2018;Allen-Zhu et al., 2018;Khan et al., 2019;Agrawal et al., 2020), which establishes some equivalence between neural networks and Gaussian processes (GPs) (Rasmussen, 2003). Meanwhile, several theoretical studies (Jacot et al., 2018;Lee et al., 2018;Chizat et al., 2018) demonstrated that for infinite-width networks, the distribution of functions induced by gradient descent during training could also be described as a GP with the neural tangent kernel (NTK) kernel (Jacot et al., 2018), which facilitates the study of deep neural networks using theoretical tools from kernel methods. Our work studies the property of the global minimum of an infinite-width network and does not rely on the NNGP or NTK formalism. Also, both lines of research are not directly relevant for studying trained stochastic networks at the global minimum.

Main Result
In this section, we present and discuss our main result. Notation-wise, let W denote a matrix, W j∶ denote its j-th row viewed as a vector. Let v be any vector, and v j denote its j-th element; however, when v involves a complicated expression, we denote its j-th element as [v] j for clarity.

Problem Setting
We first introduce two basic assumptions of the network structure.
Assumption 1. (Neural networks can be decomposed into Lipshitz-continuous blocks.) Let f be a neural network. We assume that there exist functions g 1 and g 2 such that f = g 2 ○ g 1 , where ○ denotes functional composition. Additionally, both g 1 and g 2 are Lipshitz-continuous.
Throughout this work, the component functions g 1 , g 2 of a network f are called a block, which can be seen as a generalization of a layer. It is appropriate to call g 1 the input block and g 2 the output block. Because the Lipshitz constant of a neural network can be upper bounded by the product of the largest eigenvalue of each weight matrix times the Lipshitz constant of the non-linearity, the assumption that every block is Lipshitz-continuous applies to all existing networks with fixed weights and with Lipshitz-continuous activation functions (such as ReLU, tanh, Swish (Ramachandran et al., 2017), Snake (Ziyin et al., 2020) etc.).
If we restrict ourselves to feedforward architectures, we can discuss the meaning of an "increasing width" without much ambiguity. However, in our work, since the definition of blocks (layers) is abstract, it is not immediately clear what it means to "increase the width of a block." The following definition makes it clear that one needs to specify a sequence of blocks to define an increasing width. 1 Definition 1. (Models with an increasing width.) Each block of a neural network f is labeled with two indices d 1 , d 2 ∈ Z + . Let f = g 2 ○ g 1 ; we write g i = d2,d1 g i if for all x, d2,d1 g i (x) ∈ R d2 and x ∈ R d1 . Moreover, to every block g, there corresponds a countable set of blocks { i,j g} i,j∈Z + . For a block g, its corresponding block set is denoted as S(g) = { i,j g} i,j∈Z + . Also, to every sequence of blocks g 1 , g 2 , ..., there also corresponds a sequence of parameter sets w 1 , w 2 , ... such that g i = g i w i is parametrized by w i . The corresponding parameter set of block g is denoted as w(g).
Note that if f = g 2 ○ g 1 , g 1 = d2,d1 g 1 and g 2 = d4,d3 g 2 , d 2 must be equal to d 3 ; namely, specifying g 1 constrains the input dimension of the next block. It is appropriate to call d 2 the width of the block d2,d1 g. Since each block is parametrized by its own parameter set, the union of all parameter sets is the parameter set of the neural network f : f = f w . Since every block comes with the respective indices and equipped with its own parameter set, we omit specifying the indices and the parameter set when unnecessary. The next assumption specifies what it means to have a larger width.
Assumption 2. (A model with larger width can express a model with smaller width.) Let g be a block and S(g) its block set. Each block g = g w in S(g) is associated with a set of parameters w such that for any pair of functions d1,d2 g, d ′ 1 ,d2 g ′ ∈ S(g), any fixed w, and any mappings m from {1, ..., d ′ 1 } → {1, ..., d 1 }, there exists parameters w ′ such that [ d1,d2 g w (x)] m(l) = [ d ′ 1 ,d2 g w ′ (x)] l for all x and l.
This assumption can be seen as a constraint on the types of block sets S(w) we can choose. As a concrete example, the following proposition shows that the block set induced by a linear layer with arbitrary input and output dimensions followed by an element-wise non-linearity satisfies our assumption.
For a matrix M , we use M j∶ to denote the j-th row of M . By definition, this condition is equivalent to which is achieved by setting b ′ = b and W ′ l∶ = W m(l)∶ , where W m(l)∶ is the m(l)-th row of W . ◻ Now, we are ready to define a stochastic neural network.

Definition 2. (Stochastic Neural Networks)
A neural network f = g 2 ○ g 1 is said to be a stochastic neural network with stochastic block g 1 if g 1 = g 1 (x, ) is a function of x and a random vector , and the corresponding deterministic function f ′ ∶= g 2 ○ h 1 satisfies Assumption 2, where h 1 = E ○ g 1 .
Namely, a stochastic network becomes a proper neural network when averaged over the noise of the stochastic block. To proceed, we make the following assumption about the randomness in the stochastic layer.
This assumption applies to standard stochastic techniques in deep learning, such as dropout or the reparametrization trick used in approximate Bayesian deep learning. Lastly, we assume the following condition for the architecture.
Assumption 4. (Stochastic block is followed by linear transformation.) Let f = g 2 ○ g 1 be the stochastic neural network under consideration, and let g 1 be the stochastic layer. We assume that for all i,j g ∈ S(g 2 ), where W ∈ R d×j and bias b ∈ R d for a fixed integer d. In our main result, we further assume that b = 0 for notational conciseness.
In other words, we assume that the second block g 2 can always be decomposed as g ′ ○ M , such that M is an optimizable linear transformation. This is the only architectural assumption we make. In principle, this can be replaced by weaker assumptions. However, we leave this as an important future work because Assumption 4 is sufficient for the purpose of this work and is general enough for the applications we consider (such as dropout and VAE). We also stress that the condition that g 2 starts with a linear transformation does not mean that the first actual layer of g 2 is linear. Instead, M can be followed by an arbitrary Lipshitz activation function as is usual in practice; in our definition, if it exists, this following activation is assumed into the definition of g ′ .
The actual rather restrictive assumption in Assumption 4 is that the function g ′ has a fixed input dimension (like a "bottleneck"). In practice, when one scales up the model, it is often the case that one wants to scale up the width of all other layers simultaneously. For the first block, this is allowed by assumption 2. 2 We note that this bottleneck assumption is mainly for notational concision. In the appendix A.3, we show that one can also extend the result to the case when the input dimension (and the intermediate dimensions) of g ′ also increases as one increases the width of the stochastic layer.
Notation Summary. To summarize, we require a network f to be decomposed into two blocks: f = g 2 ○g 1 and g 1 is a stochastic block. Each block is associated with its indices, which specify its input and output dimensions, and a parameter set that we optimize over. For example, we can write a block g as g = d2,d1 g i w to specify that g is the i-th block in a neural network, is a mapping from R d1 to R d2 , and that its parameters are w. However, for notational conciseness and better readability, we omit some of the specifications when the context is clear. For the parameter w, we abuse the notation a little. Sometimes, we view w as a set and discuss its unions and subsets; for example, let f w = g 2 w 2 ○ g 1 w 1 ; then, we say that the parameter set w of f is the union of the parameter set of g 1 and g 2 : w = w 1 ∪ w 2 . Alternatively, we also view w as a vector in a subset of the real space, so that we can look for the minimizer w in such a space (in expressions such as min w L(w)).

Convergence without Prior
In this work, we restrict our theoretical result to the MSE loss. Consider an arbitrary training set {(x i , y i )} N i=1 , when training the deterministic network, we want to find (2) An overparametrized network can be defined as a network that can achieve zero training loss on such a dataset.

Definition 3.
A neural network f w is said to be overparametrized for a non-negative differentiable loss Namely, for a stochastic network, we say that it is overparametrized if its deterministic part is overparametrized. When there is no degeneracy in the data (if x i = x j , then y i = y j ), zero training loss can be achieved for a wide enough neural network, and this definition is essentially equivalent to assuming that there is no data degeneracy and is thus not a strong limitation of our result.
With a stochastic block, the training loss becomes (due to the sampling of the hidden representation) Note that this loss function can still be reduced to 0 if f w (x i ) = y i for all i with probability 1.
With these definitions at hand, we are ready to state our main result.
Theorem 1. Let the neural network under consideration satisfy Assumptions 1 ,2, 4 and 3, and assume that the loss function is given by Eq. (3).
be a global minimum of the loss function. Then, for all x in the training set, Proof Sketch. The full proof is given in Appendix Section A.1. In the proof, we denote the term . Then, for any w, by definition of the global minimum, By bias-variance decomposition of the MSE, this, in turn, implies that Var[ d1 f w * (x j )] = 0 for all j. Therefore, it is sufficient to construct a sequence of w such that lim d1→∞ E ∑ N j L d1 j (w) = 0. The rest of the proof shows that, with the architecture assumptions we made, such a network can indeed be constructed. In particular, the architectural assumptions allow us to make independent copies of the output of the stochastic block and the linear transformation after it allows us to average over such independent copies to recover the mean with a vanishing variance, which can then be shown to be able to achieve zero loss. ◻ Remark. Note that the parameter set w that we optimize is different for different d1 f ; we do not attach an index d 1 to w in the proof for notational conciseness. In plain words, our main result states that for all x in the training set, an overparametrized stochastic neural network at its global minimum has zero predictive variance in the limit d 1 → ∞. The condition that the width is a multiple of d * is not essential and is only used for making the proof concise. One can prove the same result without requiring d 1 = kd * . Also, one might find the restriction to the MSE loss restrictive. However, it is worth noting that our result is quite strong because it applies to an arbitrary latent noise distribution whose second moment exists. It is possible to prove a similar result for a broader class of loss functions if we place more restrictions on the distribution of the latent noise (such as the existence of higher moments).
At a high level, one might wonder why the optimized model achieves zero variance. Our results suggest that the form of the loss function may be crucial. The MSE loss can be decomposed into a bias term and a variance term: Minimizing the MSE loss involves both minimizing the bias term and the variance term, and the key step of our proof involves showing that a neural network with a sufficient width can reduce the variance to zero. We thus conjecture that convergence to a zero-variance model can be generally true for a broad class of loss functions. For example, one possible candidate for this function class is the set of convex loss functions, which favor a mean solution more than a solution with variance (by Jensen's inequality), and a neural network is then encouraged to converge to such solutions so as to minimize the variance. However, identifying this class of loss functions is beyond the scope of the present work, and we leave it as an important future step. Lastly, we also stress that the main results are not a trivial consequence of the MSE being convex. When the model is linear, it is rather straightforward to show that the variance reduces to zero in the large-width limit because taking the expectation of the model output is equivalent to taking the expectation of the latent noise. However, this is not trivial to prove for a genuine neural network because the net f is, in general, a nonlinear and nonconvex function of the latent noise .

Application to Dropout
is a deterministic block, and j are independent random variables such that j = 1 p with probability p and j = 0 with probability 1 − p.
Since the noise of dropout is independent, one can immediately apply the main theorem and obtain the following corollary.
Corollary 1. For any 0 < p < 1, an optimized stochastic network with an infinite width p-dropout layer has zero variance on the training set.
Our result thus formally proves the intuitive hypothesis in the original dropout paper (Srivastava et al., 2014) that applying dropout to training has the effect of encouraging an averaging effect in the latent space.

Convergence with a Prior
We now extend our result to the case where a soft prior constraint exists in the loss function. The model setting of this section is equivalent to a special type of Bayesian latent variable model (e.g., a VAE) whose prior strength decreases towards zero as the width of the model is increased. 4 The result in this section is more general and involved than Theorem 1 because the soft prior constraint matches the latent variable to the prior distribution in addition to the MSE loss. The existence of the prior term regularizes the model and prevents a perfect fitting of the original MSE loss, and the main message of this section is to show that even in the presence of such a (weak) regularization term, a vanishing variance can still emerge, but relatively slowly.
While it is natural that a latent variable model f = g 2 ○ g 1 can be decomposed into two blocks, where g 2 is the decoder, and g 1 is an encoder, we require one additional condition. Namely, the stochastic block ends with a linear transformation layer (which is satisfied by a standard VAE encoder (Kingma and Welling, 2013), for example).
Definition 5. A stochastic block g(x) is said to be a encoder block if g( where ⊙ is the Hadamard product, W 1 , W 2 are linear transformations and b is the bias of W 2 , h(x) is a deterministic block, and j are uncorrelated random variables with zero mean and unit variance.
Note that we explicitly require the weight matrix W 2 to come with a bias. For the other linear transformations, we have omitted the bias term for notational simplicity. One can check that this definition is consistent with Definition 2. Namely, a net with an encoder block is indeed a type of stochastic net. When the training loss only consists of the MSE, it should follow as an immediate corollary of Theorem 1 that the variance converges to zero. However, the prior term complicates the problem. The following definition specifies the type of the prior loss under our consideration.
is a encoder block. A loss function is said to be a prior-regularized loss function if = ∑ i L i + prior , where ∑ i L i is given by Eq. (3) and prior = 1 We have abstracted away the actual details of the definitions of the prior loss. For our purpose, it is sufficient to say that the equation [W 1 h(x i )] j = 0 means that the loss function encourages the posterior to have a zero mean and [W 2 h(x) + b] j = 1 encourages a unit variance. As an example, one can check that the standard ELBO loss for VAE satisfies this definition. With this architecture, we prove a similar result. The proof is given in Section A.2.
Theorem 2. Assuming that the neural networks under consideration satisfy Assumptions 1 ,2, 4, and the stochastic block is a encoder block and satisfies Assumption 3, and that the loss function is a prior-regularized loss with parameter α > 0, let d 2 , d 0 be fixed integers, d1 f = d2,d1 g 2 ○ d1,d0 g 1 and { d1 f } d1∈Z + be a sequence of stochastic networks with stochastic block d1,d0 g 1 w(g1) ∈ S(g 1 ). Let d1 f be overparameterized for all Var kd * f w * (x, ) = 0.
Remark. One should also be careful when interpreting this result. Strictly speaking, this result shows that, conditioning on a fixed input to the encoder, an optimized latent variable model (such as a VAE) outputs a deterministic prediction, independent of the sampling of the hidden representation. Strictly speaking, this does not mean that the generation will be deterministic because it is also often assumed that the outputs of the decoder obey another independent, say, Gaussian distribution with a predetermined variance. However, it is hardly the case for practitioners to separately inject a Gaussian noise to the generated data (Doersch, 2021), and so our result is relevant for practical situations. Also, the condition α > 0 implies that prior cannot increase too fast with the hidden width.
One might wonder whether a vanishing prior strength makes this setting trivial. The proof shows that it is far from trivial and that even a prior with vanishing strength can have a very strong influence on how fast the variance decays towards zero. The proof suggests that if the prior strength decays as 1 d α 1 , the variance should decay roughly as d . Namely, the smaller the α, the slower the rate of convergence towards 0. Additionally, the fastest exponent at which the variance can decay is −0.5, significantly smaller than the case for Theorem 1, where the proof suggests an exponent of −1. This means that even a vanishing regularization strength can have a strong impact on the prediction variance of the model. Quantitatively, as α approaches zero, the variance can decay arbitrarily slowly. Qualitatively, our result implies that having a regularization term or not qualitatively changes the nature of the global minima of the stochastic model. Also, we note that our problem setting is formally equivalent to a generalized 5 β-VAE (Higgins et al., 2016) with β ∼ 1 width α . While it is rarely the case for practitioners to scale β towards zero, we stress that the main value of Theorem 2 is the theoretical insight it offers on the qualitative distinction between having a prior term and having not.

Numerical Simulations
We perform experiments with nonlinear neural networks to demonstrate the studied effect of vanishing variance. The first part describes the illustrative experiment presented at the beginning of the paper. The  second part experimentally demonstrates that a dropout network and VAE have a vanishing prediction variance on the training set as the width tends to infinity. Additional experiments performed with weight decay and SGD are presented in the appendix.

Illustration
In this experiment, we let the target function be y = sin(x) + η for x uniformly sampled from the domain

Dropout
We now systematically explore the prediction variance of a model trained with dropout. As an extension of the previous experiment, we let both the input and the target be vectors such that x, y ∈ R d . The target function is y i = x 3 i + η i for i ∈ {1, ..., d}, where x i , η i ∼ N (0, 1) and the noise η ∈ R d is also a vector. We let d = 20 and sample 1000 data point pairs for training. The model is a three-layer MLP with ReLU activation functions, with the number of neurons 20 → d h → 20, where d h is the width of the hidden layer. Dropout is applied to the post-activation values of the hidden layer. In the experiments, we set the dropout probability p to be 0.1, and we independently sample outputs 3000 times to estimate the prediction variance. Training proceeds with Adam for 4500 steps, with an initial learning rate of 0.01, and the learning rate is decreased by a factor of 10 every 1500 step. See Figure 2(a) for a log-log plot of width vs. prediction variance. We see that the prediction variance of the model on the training set decreases towards zero as the width increases, as our theory predicts. For completeness, we also plot the prediction variance for an independently sampled test set for completeness. We see that, for this task, the prediction variance of the test points agree well with that of the training set. A linear regression on the slope of the tail of the width-variance curve shows that the variances decrease roughly as d −0.7 , close to what our proof suggests (d −1 ); we hypothesize that the exponent is slightly smaller than 1 because the training is stopped at a finite time and the model has not fully reached the global minimum. 6 .

Variational Autoencoder
In this section, we conduct experiment on a β−VAE with latent Gaussian noise. The input data x ∈ R d is sampled from a standard Gaussian distribution with d = 20. We generate 100 data points for training. The VAE employs a standard encoder-decoder architecture with ReLU nonlinearity. The encoder is a two-layer feedforward network with neurons 20 → 32 → 2 × d h . The decoder is also a two-layer feedforward network with architecture d h → 32 → 20. Note that our theory requires the prior term vae not to increase with the width; we, therefore, choose β = 0.1 d h . The training objective is the minus standard Evidence Lower Bound (ELBO) composed of reconstruction error and the KL divergence between the parameterized variable and standard Gaussian. We independently sample outputs 100 times to estimate the prediction variance for estimating the variance. The results in Fig. 2(b) show that the variances of both training and test set decrease as the width increases and follow the same pattern.

Experiments with Weight Decay
Weight decay often has the Bayesian interpretation of imposing a normal distribution prior over the variables, and sometimes it is believed to prevent the model from making a deterministic prediction (Gal and Ghahramani, 2016). We, therefore, also perform the same experiments as in the previous two subsections, with a weight decay strength of λ = 5e − 4. See Appendix Sec. B.1 for the results. We notice that the experimental result is similar and that applying weight decay is not sufficient to prevent the model from reaching a vanishing variance. Conventionally, we expect the prediction of a dropout net to be of order λ and not directly dependent on the width (Gal and Ghahramani, 2016); however, this experiment suggests that width may wield a stronger influence on the prediction variance than the weight decay strength. Since a model cannot reach the actual global minimum when weight decay is applied, this experiment is beyond the applicability of our theory; therefore, this result suggests a conjecture that even in a local minimum, it can still be highly likely for stochastic models to reach a solution with vanishing variance, and proving or disproving this conjecture can be an important future task.

Discussion
In this work, we theoretically studied the prediction variance of stochastic neural networks. We showed that when the loss function satisfies certain conditions and under mild architectural conditions, the prediction variance of a stochastic net on the training set tends to zero as the width of the stochastic layer tends to infinity. Our theory offers a precise mathematical explanation to a frequently quoted anecdotal problem of a stochastic network, that the neural networks can be too expressive such that adding noise to the latent layers is not sufficient to make a network capable of modeling a distribution well (Higgins et al., 2016;Burgess et al., 2018;Dai and Wipf, 2019). Our result also offers a formal justification of the original intuition behind the dropout technique. From a practical point of view, our result suggests that it is generally nontrivial to train a model whose prediction variance matches the true variance of the data. One potential fix is to design a loss function that encourages a nonvanishing prediction variance, which is an interesting future problem. There are two major limitations of the present approach. First of all, our result can only be applied to data points in the training set, and it is unclear what we can say about the test set. Even though experiments on non-linear neural networks suggest that the test variance may also decrease towards zero, it is unclear under what condition this is the case, and it is an important topic to investigate in the future. The second limitation is that we have only studied the global minimum, and it is important to study whether or under what condition the variance also vanishes for a local minimum.

A Proofs and Theoretical Concerns
A.1 Proof of Theorem 1 Proof. In the proof, we denote the term L( d1 f w (x, ), y i ) as L d1 i (w). Let w * be the global minimizer of ∑ N j E L d1 j (w) . Then, for any w, we have by definition j (w * ) = 0, which implies that lim d→∞ E L d1 j (w * ) = 0 for all j. By the bias-variance decomposition of the MSE, this, in turn, implies that Var[ d1 f w * (x j )] = 0 for all j. Therefore, it is sufficient to construct a sequence of w such that lim d1→∞ ∑ N j E L d1 j (w) = 0. Now, we construct such a w. Let d1 f ′ denote the deterministic counterpart of d1 f . By definition and by Assumption 1, we have By the architecture assumption (assumption 4), there exists a function h v parametered by a parameter set v and a linear transformation M such that we can further decompose the two neural networks as where M ∈ R d×d1 for a fixed integer d and is a linear transformation belonging to the parameter set of g 2 . Note that, by definition, the parameter set of the g 2 block is w 2 = v ∪ M . Let u * be a global minimum of d1 f ′ : and, by the assumption of overparametrization, we also have d1 f ′ u * (x j ) = y j for all j. We now specify the parameters for f w for k > 1. By assumption 2, we can find parameters w ′ 1 such that E[ kd * ,d0 g 1 .., kd * . Namely, we choose the parameters such that the expected output of the stochastic block are k identical copies of the output of the overparametrized deterministic model with width d * .
Since M is a linear transformation, one can factorize it as a product of two matrices such that M = AG, where A ∈ R d×d * and G ∈ R d * ×d1 : Now, note that by definition, the function h v ○ A for any kd * f coincides with the g 2 block of d * f ′ . Namely, h v ○ A = d2,d * g 2 w 2 such that w 2 = v ∪ A, and we let v = v * and A = M * . Now, the last step is to specify G. We let G * ij = 1 k δ i,j mod d , where δ i,j = 1 if i = j and 0 otherwise. Namely, G * is nothing but an averaging matrix that sums and rescales the deterministic layer by a factor of 1 k.
To summarize, our specification defines the following stochastic neural network: where → L 2 denotes convergence in mean square. Because h v ○ A is a Lipshitz continuous function by Assumption 1, lim This implies that the expectation of the constructed model with increasing width converge to that of the overparametrized determinstic model (convergence in mean square implies convergence in mean). Therefore, defining our model as Therefore, we have, by the bias-variance decomposition for MSE: Both terms converges to 0 for all i, and so the sum of two terms converge to 0. This finishes the proof. ◻

A.2 Proof of Theorem 2
Before the proof, we first comment that the proof is quite similar to the previous case. The difference lies in how we construct the model so as to reduce the training loss to zero as Proof. In the proof, we denote the term L( d1 f w (x, ), y i ) as L d1 i (w). Let w * be the global minimizer of ∑ N j E L d1 j (w) . Then, for any w, we have by definition If lim d1→∞ ∑ N j E L d1 j (w) = 0, we have lim d1→∞ ∑ N j E L d1 j (w * ) = 0, which implies that lim d→∞ E L d1 j (w * ) = 0 for all j. This, in turn, implies that Var[ d1 f w * (x j )] = 0 for all j because both the reconstruction loss and the prior are non-negative. Therefore, it is sufficient to construct a sequence of w such that lim d1→∞ E ∑ N j L d1 j (w) = 0. Let d1 f ′ denote the deterministic counterpart of di f , and let u * be a global minimum of d1 f ′ . By the definition of a neural network, we can write By the assumption of overparametrization, d1 f ′ u * (x j ) = y j for all j. By the architecture assumption, there exists a function h v parametrized by a parameter set v such that we can further decompose the two neural networks as (24) where M ∈ R d1×d for a fixed integer d and is a linear transformation belonging to the parameter set of g 2 , and Z(x) = T 1 x + ⊙ (T 2 x + b) is the linear stochastic layer. Now, the parameter set of the network f is By definition, the loss takes the form We first let T 2 = 0 and b = 1, which immediately minimizes the variance part of of the loss: (j) var = 0 for all j. By assumption, for d 1 ≥ d * , f ′ (x) is overparametrized, and one can find (v * , M * ′ , w 1 1 ] j∶ = a[T * 1 ] j mod d for a positive scalar a. Namely, we copy the rows of the matrix W * 1 so that the expected output of the stochastic block are k identical copies of the output of the overparametrized deterministic model with width d * , rescaled by a factor a. 7 Since M is a linear transformation, one can factorize it as a product of two matrices such that M = AG where A ∈ R d×d * and G ∈ R d * ×d1 : Now, by definition, the function h v ○ A = d2,d * g 2 w 2 such that w 2 = v ∪ A, and we let v = v * and A = M * a. Again, notice that we have rescaled the matrix by a factor of 1 a. Now, the last step is specify G. We let G * ij = 1 k δ i,j mod d where δ i,j = 1 if i = j and 0 otherwise. Namely, G * sums and rescales the deterministic layer by a factor of 1 k. This transformation has an averaging effect.
To summarize, our specification defines the following stochastic neural network: A.3 Removing the Bottleneck Constraint for g 2 In this section, we prove a version of Theorem 1 to demonstrate how one can remove the Bottleneck constraint of g 2 . A similarly generalized version of Theorem 2 can also be proved using following the same steps, and so we leave that as an exercise to the readers. To begin, we first need an extended version of Assumption 5.
Assumption 5. (A model with larger width can express a model with smaller width II.) Additionally, let x ′ denote a subset of x (namely, dim(x ′ ) ≤ dim(x) and for all i ∈ [1, dim(x ′ )], there exists j such that x j = x ′ i ). Let g be a block and S(g) its block set. Each block g = g w in S(g) is associated with a set of parameters w such that for any pair of functions d1,dim(x) g, d1,dim(x ′ ) g ′ ∈ S(g), any fixed w ′ , and any mappings m from The original Assumption 2 only specifies what it means to have a larger output dimension. This extended version, in addition, says what it means to have a larger input dimension for a block. We note that this additional condition is quite general and is satisfied by the usual structures, such as a fully connected layer. As the original Assumption 2, this assumption also agrees with the standard intuitive understanding of what it means to have a larger width.
With this additional assumption, we can remove the bottleneck requirement in the original Assumption 4. Formally, we now require the following weak condition for the architecture.
Assumption 6. (g 2 can be further decomposed into two blocks) Let f = g 2 ○ g 1 be the stochastic neural network under consideration, and let g 1 be the stochastic layer. We assume that for all i,j g ∈ S(g 2 ), i,j g w = g ′ w ′ (W x) for a block g ′ with its block set S(g ′ ). W is a linear transformation with the standard block set (see Proposition 1).
This generalized assumption effectively means that the model can be decomposed into three blocks: With these extended assumptions, we can prove a more general version of Theorem 1. In comparison to the original Theorem 1, this theorem effectively allows one to increase the width of all the layers that g 1 and g 2 implicitly contain simultaneously.
Let d1 f be overparameterized for all d 1 ≥ d * for some d * > 0. Let w * = arg min w ∑ Proof. In the proof, we denote the term L( d1 f w (x, ), y i ) as L d1 i (w). Let w * be the global minimizer of ∑ N j E L d1 j (w) . Then, for any w, we have by definition If lim d1→∞ ∑ N j E L d1 j (w) = 0, we have lim d1→∞ ∑ N j E L d1 j (w * ) = 0, which implies that lim d→∞ E L d1 j (w * ) = 0 for all j. By the bias-variance decomposition of the MSE, this, in turn, implies that Var[ d1 f w * (x j )] = 0 for all j. Therefore, it is sufficient to construct a sequence of w such that lim d1→∞ ∑ N j E L d1 j (w) = 0.
This implies that the expectation of the constructed model with increasing width converge to that of the overparametrized determinstic model (convergence in mean square implies convergence in mean). Therefore, defining our model as d1 f * = h v * ○ M * ○ G * ○ kd * ,d0 g 1 w ′

1
, we obtain Therefore, we have, by the bias-variance decomposition for MSE: Both terms converges to 0 for all i, and so the sum of two terms converge to 0. This finishes the proof. ◻  This part of experiment has been described in the main text. See Figure 3. We see that even with weight decay, the prediction variance drops towards zero unhindered.

B.2 Training with SGD
Since our result only depends on the global minimum of the loss function, one expects to also find that the prediction variance to decrease with a different optimization procedure. In this section, we perform the same experiment with SGD. See Figure 4. We see that, for dropout, the result is similar to the case with Adam. For VAE, the result is a little more subtle in the tail, where the decrease in variance slows down. We hypothesize that it is because the SGD algorithm increase in fluctuation and reduce in stability as the width of the hidden layer increases (Liu et al., 2021;Ziyin et al., 2021b), which causes the prediction variance to increase and partially offsets the effect due to averaging of the parameters.