Bayesian Free Energy of Deep ReLU Neural Network in Overparametrized
  Cases
In many research fields in artificial intelligence, it has been shown that
deep neural networks are useful to estimate unknown functions on high
dimensional input spaces. However, their generalization performance is not yet
completely clarified from the theoretical point of view because they are
nonidentifiable and singular learning machines. Moreover, a ReLU function is
not differentiable, to which algebraic or analytic methods in singular learning
theory cannot be applied. In this paper, we study a deep ReLU neural network in
overparametrized cases and prove that the Bayesian free energy, which is equal
to the minus log marginal likelihoodor the Bayesian stochastic complexity, is
bounded even if the number of layers are larger than necessary to estimate an
unknown data-generating function. Since the Bayesian generalization error is
equal to the increase of the free energy as a function of a sample size, our
result also shows that the Bayesian generalization error does not increase even
if a deep ReLU neural network is designed to be sufficiently large or in an
opeverparametrized state.
Shuya Nagayasu, Sumio Watanabe
# Bayesian Free Energy of Deep ReLU Neural Network in Overparametrized Cases

###### Abstract

In many research fields in artificial intelligence, it has been shown that deep neural networks are useful to estimate unknown functions on high dimensional input spaces. However, their generalization performance is not yet completely clarified from the theoretical point of view because they are non-identifiable and singular learning machines. Moreover, a ReLU function is not differentiable, to which algebraic or analytic methods in singular learning theory cannot be applied.

In this paper, we study a deep ReLU neural network in overparametrized cases and prove that the Bayesian free energy, which is equal to the minus log marginal likelihood or the Bayesian stochastic complexity, is bounded even if the number of layers are larger than necessary to estimate an unknown data-generating function. Since the Bayesian generalization error is equal to the increase of the free energy as a function of a sample size, our result also shows that the Bayesian generalization error does not increase even if a deep ReLU neural network is designed to be sufficiently large or in an opeverparametrized state.

## 1 Introduction

Deep neural networks are now being used in many fields, for example, pattern recognition, robotic control, bioinformatics, data science, time series prediction, and so on. Their high performances have been shown in many experiments, however mathematical foundation to study them is not yet completely established.

It is well known that the generalization of machine learning is basically divided into two elements, Bias and Variance. The bias and the variance are determined by approximation ability and the complexity of the model respectively. If a machine leaning model has larger number of parameter, the bias gets smaller and the variance gets larger in general. It is known as Bias-Variance Tradeoff. Nevertheless deep neural network in practical use has huge number of parameters, they are well generalized and the influence of variance is smaller comparing to such a number of parameters. The reason of this phenomena is not clear, because deep neural networks are nonidentifiable and singular[1][2].
A learning machine is called identifiable if a map from a parameter to a probability distribution is one-to-one, and regular if it has a positive-definite Fisher information matrix. If a learning machine is identifiable and regular, then the regular statistical theory holds [3], resulting that asymptotic normality of the maximum likelihood estimator holds and that AIC [4] and BIC [5] can be employed in model selection problems. However, if learning machines contain hierarchical structure or hidden variables, they are nonidentifiable and singular, for example, layered neural networks [6, 7], normal mixtures [8, 7], matrix factorizations [9], reduced rank regressions [10], Poisson mixtures [11], latent Dirichlet allocation [12], and Boltzmann machine [13, 14]. In these learning machines, it was shown that singularities make the Bayesian generalization errors smaller than that of regular models, even in under-parametrized cases [15]. These phenomena are called implicit or intrinsic regularization [9, 16, 17], and researches about quantitative effects caused by singularities have been applied to model selection [18], hyperparameter design [19], and optimization of Markov chain Monte Carlo method for the posterior distribution [20].

Statistical properties of nonidentifiable and singular learning machines are now being clarified by these researches, however, the conventional singular learning theory is based on the condition that a log likelihood is an algebraic or analytic function of a parameter, hence it cannot be applied to non-differentiable ReLU neural networks. In this paper, we study singular learning theory so as to be employed in the non-differentiable cases and derive the upper bound of the free energy of deep ReLU functions in overparametrized cases.

The Bayesian free energy \(F_{n}\) is mathematically equal to the minus log marginal likelihood and Bayesian stochastic complexity, where \(n\) is a sample size. The free energy plays an important role in Bayesian learning theory, because the average generalization error \(\mathbb{E}[G_{n}]\) satisfies a formula for an arbitrary \(n\)[21],

\[\mathbb{E}[G_{n}]=\mathbb{E}[F_{n+1}]-\mathbb{E}[F_{n}]-S,\]

where \(G_{n}\) is the Kullback-Leibler divergence from a data-generating distribution to the Bayesian predictive distribution and \(S\) is the entropy of the data-generating distribution. If a log likelihood function is analytic or algebraic, then by the conventional singular learning theory, it was proved that, if a data-generating distribution is realizable by a learning machine,

\[\mathbb{E}[F_{n}]=nS+\lambda\log n+O(n\log n),\]

where \(\lambda>0\) is the real log canonical threshold (RLCT), resulting that

\[\mathbb{E}[G_{n}]=\frac{\lambda}{n}+o(1/n).\]

In this paper, we prove that the Bayesian free energy of deep ReLU neural network satisfies the following inequality

\[\mathbb{E}[F_{n}]\leq nS+\lambda_{ReLU}\log n+C\]
where the constant \(\lambda_{ReLU}>0\) is bounded even if the number of layers in a learning machine is larger than necessary to estimate the data-generating distribution. Hence, if the generalization error has asymptotic expansion, then it should be

\[\mathbb{E}[G_{n}]\leq\frac{\lambda_{ReLU}}{n}+o(1/n).\]

In practical applications, we do not know the appropriate number of layers of a deep network for unknown data-generating distribution, hence a sufficiently large neural network is often employed. Our result shows that, even if a deep ReLU neural network is designed in an over-parametrized state, the Bayesian generalization error is bounded by a constant defined by the data-generating distribution.

This paper consists of seven sections. In the second section, we prepare mathematical framework of Bayesian learning theory. In the third section, a deep ReLU neural network is explained and the main theorem is introduced. In the fourth and fifth sections, several lemmas and the main theorem are proved respectively. In the sixth and seventh sections, we discuss the main result and conclude this paper.

## 2 Framework of Bayesian Learning theory

In this section, we briefly explain the framework of Bayesian Learning for supervised learning used in this paper.

Let \(X^{n}=(X_{1},\cdots X_{n})andY^{n}=(X_{1},\cdots X_{n})\) be samples independently and identically taken from the true probability distribution \(q(x,y)=q(y|x)q(x)\). Also let \(p(y|x,\theta),\varphi(\theta)\) be the statistical model and prior distribution. The posterior distribution is given by

\[p(\theta|X^{n},Y_{n})=\frac{1}{Z(Y^{n}|X^{n})}\varphi(\theta)\prod_{i=1}^{n}p (Y_{i}|X_{i},\theta). \tag{1}\]

where \(Z_{n}\) is normalizing constant denoted as marginal likelihood:

\[Z_{n}=\int\varphi(\theta)\prod_{i=1}^{n}p(Y_{i}|X_{i},\theta)\mathrm{d}\theta. \tag{2}\]

Hence \(Z_{n}\) is the probability distribution for \(Y^{n}\) conditioned by \(X^{n}\) estimated from samples, \(Z_{n}\) is denoted by \(p(Y^{n}|X^{n})\) as probability distribution. The posterior predictive distribution is defined by the average of statistical model over posterior distribution: 1

\[p(y|x,X^{n},Y_{n})=\int p(y|x,\theta)p(\theta|X^{n},Y^{n})\mathrm{d}\theta. \tag{3}\]

In Bayesian Learning the true distribution \(q(x)\) is inferred by predictive distribution \(p(x|X^{n})\). For comparing \(q(x)\) with \(p(x|X^{n})\), the free energy\(F_{n}\) and the generalization loss \(G_{n}\) are used.
The free energy is negative log value of marginal likelihood

\[F_{n}=-\log Z_{n}. \tag{4}\]

The free energy is also called evidence, stochastic complexity and used for model selection[5][22][23][18], We introduce the following variables to explain why the free energy is used for comparing true and predictive distributions.

\[S =-\int q(y|x)q(x)\log q(y|x)\mathrm{d}x\mathrm{d}y, \tag{5}\] \[S_{n} =\frac{1}{n}\sum_{i=1}^{n}\log q(Y_{i}|X_{i}). \tag{6}\]

The entropy\(S\) is the average negative log likelihood of the true distribution and empirical entropy\(S_{n}\) is average of log loss. From definition, the following equation holds

\[F_{n}=nS_{n}+\log\frac{q(Y^{n}|X^{n})}{p(Y^{n}|X^{n})} \tag{7}\]

where \(q(Y^{n}|X^{n})=\prod_{i=1}^{n}q(Y_{i}|X_{i})\). The average of \(F_{n}\) over the sample generating \((X^{n},Y^{n})\) is

\[\mathbb{E}[F_{n}] =nS+\int q(y^{n}|x^{n})q(x^{n})\log\frac{q(y^{n}|x^{n})q(x^{n})}{ p(y^{n}|x^{n})q(x^{n})}\mathrm{d}x^{n}\mathrm{d}y^{n} \tag{8}\] \[=nS+D_{\mathrm{KL}}(q(x^{n},y^{n})|p(y^{n}|x^{n})q(x^{n})) \tag{9}\]

The entropy is not depends on statistical model and prior distribution, therefore the expected value of free energy over sample generating is equivalent to the Kullback Leibler divergence between true distribution for sample size and evidence except for the constant.

The generalization error is the Kullback Leibler divergence between true distribution and predictive distribution.

\[G_{n}=D_{\mathrm{KL}}(q(y|x)q(x)|p(y|x,X^{n},Y^{n})q(x)) \tag{10}\]

The generalization error is also used for model selection[4][24]. For \(p(y|x,X^{n},Y^{n})=p(Y_{n+1}|X_{n+1},X^{n},Y_{n})\), the following equation holds

\[p(y|x,X^{n},Y^{n}) =\frac{1}{Z_{n}}\int p(Y_{n+1}|X_{n+1},\theta)\varphi(\theta) \prod_{i=1}^{n}p(Y_{i}|X_{i},\theta)\mathrm{d}\theta \tag{11}\] \[=\frac{Z_{n+1}}{Z_{n}}. \tag{12}\]

The average of a sample of negative log of equation (12) is following

\[\mathbb{E}[G_{n}]-S=\mathbb{E}[F_{n+1}]-\mathbb{E}[F_{n}]. \tag{13}\]
This equation show that the average generalization error is equal to the increase of the average free energy. If the log likelihood is an algebraic or analytic function, by using algebraic geometric foundation [25][26], it was proved that asymptotic behaviors of \(\mathbb{E}[F_{n}]\) and \(\mathbb{E}[G_{n}]\) are given by the real log canonical threshold [21]. However, since a ReLU function is neither algebraic nor analytic, conventional singular learning theory cannot be employed.

Table 1 show the definitions and notations used in this paper.

## 3 Deep Neural Network

### Deep Neural Network as statistical model

In this section we describe the function of \(N\)-layer neural network. We define \(H_{k}(1\leq k\leq N)\) as the width of each layer. Let \(x\in\mathbb{R}^{H_{1}}\) be input vector. \(\sigma(t)=\{\sigma_{i}(t)\}\) is vector of activation function. The function from \(k-1\)-th layer to \(k\)-th layer \(f^{(k)}\in\mathbb{R}^{H_{k}}\) is defined by

\[f^{(1)}(w,b,x) =x \tag{14}\] \[f^{(k)}(w,b,x) =\sigma(w^{(k)}f^{(k-1)}(w,b,x)+b^{(k)})\ \ \ (2\leq i\leq N-1) \tag{15}\]

where \(w^{(k)}\in\mathbb{R}^{H}_{k+1}\times R^{H}_{k}\) is weight matrix, \(b^{(k)}\in\mathbb{R}^{H_{k}}\) is bias. We collectively denote weight and bias as \(w,b\)

\[w=(w^{(2)},\cdots,w^{(N)}),b=(b^{(2)},\cdots,b^{(N)}), \tag{16}\]

There exists various activation functions for neural network such that ReLU, Sigmoid, Swish and so on. In this paper we analyze the case using ReLU active function which is defined by

\[\sigma_{i}(t)=\begin{cases}t_{i}&(t_{i}\leq 0)\\ 0&(t_{i}<0)\end{cases} \tag{17}\]

For using Neural Network in Bayesian Learning, the relationship between input vector and output vector is stochastically modeled with the function \(f^{(N)}(w,b,x)\)

\begin{table}
\begin{tabular}{c l l} \hline Notation & Definition & Name \\ \hline \hline \(\mathbb{E}[\cdots]\) & \(\int\cdots\prod_{i=1}^{n}q(Y_{i}|X_{i})q(X_{i})\mathrm{d}X^{n}\mathrm{d}Y^{n}\) & average of generating of samples \\ \(\mathbb{E}_{\theta}[\cdots]\) & \(\int\cdots p(\theta|X^{n})\mathrm{d}w\) & average of posterior \\ \(\mathbb{E}_{x,y}[\cdots]\) & \(\int\cdots q(y|x)q(x)\mathrm{d}x\) & average of true distribution \\ \(S\) & \(-\mathbb{E}_{x,y}[\log q(y|x)q(x)]\) & entropy \\ \(S_{n}\) & \(-\frac{1}{n}\sum_{i=1}^{n}\log q(X_{i})\) & the empirical entropy \\ \(F_{n}\) & \(-\log Z_{n}\) & the free energy \\ \(G_{n}\) & \(\mathbb{E}_{x,y}[\log q(y|x)/p(y|x,X^{n},Y^{n})]\) & the generalization error \\ \hline \end{tabular}
\end{table}
Table 1: Notation
Let \(y\in R^{H_{N}}\) be output vector. This paper concern the following statistical model:

\[y=f^{(N)}(w,b,x)+N(0,I_{H_{N}}), \tag{18}\]

where \(N(0,I_{H_{N}})\) is \(H_{N}\) dimensional Gaussian noise which covariance is the identity matrix. This model is represented as probability density function as follows:

\[p(y|w,b,x)=\frac{1}{\sqrt{2\pi}^{H_{N}}}-\exp\frac{1}{2}||y-f^{(N)}(w,b,x)||^{ 2}. \tag{19}\]

### How the model realize the true

In data analysis using neural network, the case that the model is larger than the data generating process is common. Such situation is called overparametrize. For analyzing such a overparameterized situation, we assume that the statistical model include the data generating process.

We assume that the true probability distribution is \(N^{*}\)-layer ReLU neural network which has \(H_{k}^{*}\) width with parameters\((w^{*},b^{*})\). In this situation, the true distribution is

\[q(y|x)=\frac{1}{\sqrt{2\pi}^{H_{N}^{*}}}-\exp\frac{1}{2}||y-f^{(N^{*})}(w^{*}, b^{*},x)||^{2}. \tag{20}\]

We show that if statistical model is a \(N\)-layer ReLU neural network that satisfies

\[N^{*}\leq N,\quad H_{1}^{*}=H_{1},\quad H_{N^{*}}^{*}=H_{N}, \tag{21}\]

and

\[H_{k}^{*} \leq H_{k} (2\leq k\leq N^{*}-1), \tag{22}\] \[H_{N^{*}-1}^{*} \leq H_{k} (N^{*}\leq k\leq N-1). \tag{23}\]

there exists a parameter \(\hat{w},\hat{b}\) which satisfies

\[q(y|x)=p(y|\hat{w},\hat{b},x). \tag{24}\]

Such parameters are called optimal parameter.

To describe optimal parameter, we define the following notation. **Notation**. Note that the dimension of the vector \(f^{(k)}(w,b,x)\) is different from \(f^{(k)}(w^{*},b^{*},x)\) in general. A vector \(v^{(k)}\in\mathbb{R}^{H_{k}}\), which has the same dimension as the output vector of the \(k\)th layer of the learning machine, is represented by

\[v^{(k)}=\left(\begin{array}{c}v^{(k)}_{A}\\ v^{(k)}_{B}\end{array}\right),\]

where, for \(1\leq k\leq N^{*}-1\),

\[v^{(k)}_{A}\in\mathbb{R}^{H_{k}^{*}},\quad v^{(k)}_{B}\in\mathbb{R}^{H_{k}-H_ {k}^{*}},\]
or, for \(N^{*}\leq k\leq N-1\),

\[v_{A}^{(k)}\in\mathbb{R}^{H_{N^{*}-1}^{*}},\ \ v_{B}^{(k)}\in\mathbb{R}^{H_{k}-H_{N^{*}-1 }^{*}}.\]

For example, the output of the \(k\)th layer is represented by

\[f^{(k)}(w,b,x)=\left(\begin{array}{c}f_{A}^{(k)}(w,b,x)\\ f_{B}^{(k)}(w,b,x)\end{array}\right),\]

and the bias of the \(k\)th layer is represented by

\[b^{(k)}=\left(\begin{array}{c}b_{A}^{(k)}\\ b_{B}^{(k)}\end{array}\right).\]

A matrix \(L^{(k)}\in\mathbb{R}^{H_{k}\times H_{k-1}}\) whose size is equal to the weight parameter from the \((k-1)\)th layer to the \(k\)th layer is represented by

\[L^{(k)}=\left(\begin{array}{cc}L_{AA}^{(k)}&L_{AB}^{(k)}\\ L_{BA}^{(k)}&L_{AB}^{(k)}\end{array}\right),\]

where, for \(2\leq k\leq N^{*}-1\),

\[L_{AA}^{(k)}\in\mathbb{R}^{H_{k}^{*}\times H_{k-1}^{*}}, L_{AB}^{(k)}\in\mathbb{R}^{H_{k}^{*}\times(H_{k-1}-H_{k-1}^{*})},\] \[L_{BA}^{(k)}\in\mathbb{R}^{(H_{k}-H_{k}^{*})\times H_{k-1}^{*}}, L_{BB}^{(k)}\in\mathbb{R}^{(H_{k}-H_{k}^{*})\times(H_{k-1}-H_{k-1}^{*})},\]

for \(N^{*}\leq k\leq N-1\),

\[L_{AA}^{(k)}\in\mathbb{R}^{H_{N^{*}-1}^{*}\times H_{N^{*}-1}^{*}}, L_{AB}^{(k)}\in\mathbb{R}^{H_{N^{*}-1}^{*}\times(H_{k-1}-H_{N^{*}-1}^{*})},\] \[L_{BA}^{(k)}\in\mathbb{R}^{(H_{k}-H_{N^{*}-1}^{*})\times H_{N^{* }-1}^{*}}, L_{BB}^{(k)}\in\mathbb{R}^{(H_{k}-H_{N^{*}-1}^{*})\times(H_{k-1}-H_{ N^{*}-1}^{*})},\]

or, for \(k=N\),

\[L_{AA}^{(N)}\in\mathbb{R}^{H_{N^{*}}^{*}\times H_{N^{*}-1}^{*}}, L_{AB}^{(N)}\in\mathbb{R}^{H_{N^{*}}^{*}\times(H_{N-1}-H_{N^{*}-1}^{*})}.\]

For example, a weight parameter is represented by

\[w^{(k)}=\left(\begin{array}{cc}w_{AA}^{(k)}&w_{AB}^{(k)}\\ w_{BA}^{(k)}&w_{BB}^{(k)}\end{array}\right).\]

Note that, \(L_{AA}^{(2)}\), \(L_{BB}^{(2)}\), \(L_{BA}^{(N)}\), and \(L_{BB}^{(N)}\) are the empty matrices, because \(H_{1}^{*}=H_{1}\) and \(N_{N^{*}}^{*}=H_{N}\).

We divide the layers of the model into \(1\leq k\leq N^{*}-1\) and \(N^{*}\leq k\leq N\). In \(k=2\), the optimal parameter \(\hat{w},\hat{b}\) are

\[\hat{w}^{(2)} =\left(\begin{array}{c}w^{*(2)}\\ \mathcal{M}_{BA}^{*(2)}\end{array}\right) \tag{25}\] \[\hat{b}^{(2)} =\left(\begin{array}{c}b^{*(2)}\\ -\mathcal{M}_{B0}^{*(2)}\end{array}\right), \tag{26}\]
where \(\mathcal{M}_{BA}^{*(2)}\)is arbitrary matrix which components are positive and \(-\mathcal{M}_{B0}^{*(2)}\)is arbitrary vector which components are negative.

In \(3\leq k\leq N^{*}-1\), the optimal parameter \(\hat{w},\hat{b}\) are

\[\hat{w}^{(k)} =\left(\begin{array}{cc}w^{*(k)}&\mathcal{M}_{AB}^{*(k)}\\ -\mathcal{M}_{BA}^{*(k)}&\mathcal{M}_{BB}^{*(k)}\end{array}\right) \tag{27}\] \[\hat{b}^{(k)} =\left(\begin{array}{c}b^{*(k)}\\ -\mathcal{M}_{B0}^{*(k)}\end{array}\right), \tag{28}\]

where \(\mathcal{M}_{AB}^{*(k)},\mathcal{M}_{BB}^{*(k)}\) are arbitrary matrices, \(-\mathcal{M}_{BA}^{*(k)}\) are arbitrary matrices which components are negative and \(-\mathcal{M}_{B0}^{*(k)}\) are arbitrary vector which components are negative. For \(k=3\), \(\mathcal{M}_{AB}^{*(k)}=0\). In each layer(\(k\geq 2\)) the output \(f^{(k)}(\hat{w},\hat{b},x)\) are positive. From this positivity, the following equation holds in \(3\leq k\leq N^{*}-1\)

\[f^{(k)}_{A}(\hat{w},\hat{b},x) =f^{(k)}(w^{*},w^{*},x), \tag{29}\] \[f^{(k)}_{B}(\hat{w},\hat{b},x) =0. \tag{30}\]

Figure1 shows the relationships between units in this optimal parameter in \(3\leq k\leq N^{*}-1\).

In \(N^{*}\leq k\leq N-1\), the optimal parameters \(\hat{w},\hat{b}\) are

\[\hat{w}^{(k)} =\left(\begin{array}{cc}I_{N^{*}-1}&\mathcal{M}_{AB}^{*(k)}\\ -\mathcal{M}_{BA}^{*(k)}&-\mathcal{M}_{BB}^{*(k)}\end{array}\right), \tag{31}\] \[\hat{b}^{(k)} =\left(\begin{array}{c}\mathcal{M}_{A0}^{*(k)}\\ -\mathcal{M}_{B0}^{*(k)}\end{array}\right), \tag{32}\]

where \(I_{N^{*}-1}\) is \(H_{N^{*}-1}^{*}\) dimensional identity matrices, \(\mathcal{M}_{AB}^{*(k)}\) are arbitrary matrices, \(-\mathcal{M}_{BA}^{*(k)},-\mathcal{M}_{BB}^{*(k)}\) are arbitrary matrices which components are negative,\(\mathcal{M}_{A0}^{*(k)}\) are arbitrary vectors which components are positive and \(-\mathcal{M}_{B0}^{*(k)}\) are arbitrary vectors which components are negative. \(\hat{w}^{(k)}\) satisfy that \(\text{Rank}(\hat{w}^{(k)})\geq\frac{1}{2}\).

Figure 1: The relationship between true distribution and optimal parameter in the model
\(H^{*}_{N^{*}-1}\) In \(k=N\), the optimal parameters \(\hat{w},\hat{b}\) are

\[\hat{w}^{(N)} =\left(w^{*(N^{*})},\mathcal{M}^{*(N)}_{AB}\right), \tag{33}\] \[\hat{b}^{(N)} =b^{*(N^{*})}-w^{*(N^{*})}\sum_{k=N^{*}}^{N-1}\mathcal{M}^{*(k)}_{ A0}, \tag{34}\]

where \(\mathcal{M}^{*(N)}_{AB}\) is an arbitrary matrix. From the positivity of output in each layer, the following equation holds in \(N^{*}\leq k\leq N-1\),

\[f^{(k)}_{A}(\hat{w},\hat{b},x) =f^{(k-1)}_{A}(\hat{w},\hat{b},x)+\mathcal{M}^{*(k)}_{A0} \tag{35}\] \[f^{(k)}_{B}(\hat{w},\hat{b},x) =0. \tag{36}\]

Therefore, the following equation holds

\[f^{(N)}(\hat{w},\hat{b},x)=f^{(N^{*})}(w^{*},b^{*},x). \tag{37}\]

This equation is equivalent to

\[q(y|x)=p(y|\hat{w},\hat{b},x). \tag{38}\]

Figure2 shows the outline of the optimal parameter introduced here. Other than this optimal parameter, there exists various optimal parameters.

### Main Theorem

In this subsection the main result of this paper is introduced.

**Theorem 3.1**.: _(Main Theorem) Assume that the learning machine and the data generating distribution are given by \(p(y|x,w,b)\) and \(q(y|x)=p(y|x,w^{*},b^{*})\) which satisfy the conditions eq.(21), eq.(22), and eq.(23), and that a sample \(\{(X_{i},Y_{i})\;\;i=1,2,...,n\}\) is independently subject to \(q(x)q(y|x)\). Then the average free energy satisfies the inequality,_

\[\mathbb{E}[F_{n}]\leq nS+\lambda_{ReLU}\log n+C.\]

Figure 2: Outline of optimal parameter
_For general cases,_

\[\lambda_{ReLU}=\frac{1}{2}\left(H_{3}^{*}(H_{2}-H_{2}^{*})+\sum_{k=2}^{N^{*}}H_{k }^{*}(H_{k-1}^{*}+1)\right). \tag{39}\]

_If the support of the input distribution is bounded or continued in nonnegative region,_

\[\lambda_{ReLU}=\frac{1}{2}\left(\sum_{k=2}^{N^{*}}H_{k}^{*}(H_{k-1}^{*}+1) \right). \tag{40}\]

_These results show that the average free energy is bounded, even if the number of layers are larger than necessary to estimate the data-generation network. In particular eq.(39) is equal to the half the number of parameters in the data-generating network._

## 4 Lemmas

In this section, we prepare several lemmas which are necessary to prove the main theorem.

Let the Kullback-Leibler divergence of a data-generating network \(q(y|x)=p(y|x,w^{*},b^{*})\) and a learning machine \(p(y|x)\) be

\[K(w,b)=\int q(x)q(y|x)\log\frac{q(y|x)}{p(y|x,w,b)}\mathrm{d}x \mathrm{d}y.\]

It is well-known that \(K(w,b)\geq 0\) for an arbitrary \((w,b)\) and \(K(w,b)=0\) if and only if \(q(y|x)=p(y|x,w,b)\).

**Lemma 4.1**.: _Assume that a set \(W\) is contained in the set determined by the prior distribution \(\{(w,b);\varphi(w,b)>0\}\). Then for an arbitrary postive integer \(n\),_

\[\mathbb{E}[F_{n}]\leq nS-\log\int_{W}\exp(-nK(w,b))\varphi(w,b) \mathrm{d}w\mathrm{d}b.\]

Proof.: An empirical Kullback-Leibler divergence is defined by

\[K_{n}(w,b)=\frac{1}{n}\sum_{i=1}^{n}\log\frac{p(Y_{i}|X_{i},w^{*},b^{*})}{p(Y_ {i}|X_{i},w,b)},\]

which satisfies \(\mathbb{E}[K_{n}](w,b)]=K(w,b)\).

\[\frac{q(y^{n}|x^{n})}{p(y^{n}|x^{n})} =\exp(-\sum_{i=1}^{n}\log\frac{q(Y_{i}|X_{i})}{p(Y_{i}|X_{i},w,b)}) \tag{41}\] \[=\exp(-nK_{n}(w,b)). \tag{42}\]
By using eq.(7),

\[\mathbb{E}[F_{n}] =-\mathbb{E}[\log\frac{q(y^{n}|x^{n})}{p(y^{n}|x^{n})}]+nS \tag{43}\] \[=-\mathbb{E}[\log\int\varphi(w,b)\exp(-nK_{n}(w,b))dwdb]+nS. \tag{44}\]

By applying Lemma.1 in [1],

\[\mathbb{E}[F_{n}] \leq-\log\int\varphi(w,b)\exp(-\mathbb{E}[nK_{n}(w,b)])\mathrm{d} w\mathrm{d}b+nS \tag{45}\] \[\leq-\log\int\varphi(w,b)\exp(-nK(w,b))\mathrm{d}w\mathrm{d}b+nS\] (46) \[\leq-\log\int_{W}\varphi(w,b)\exp(-nK(w,b))\mathrm{d}w\mathrm{d}b +nS, \tag{47}\]

where the last inequality is derived the fact that the restriction of integrated region makes the integration not larger. 

**Lemma 4.2**.: _For arbitrary vectors \(s,t\),_

\[\|\sigma(s)-\sigma(t)\|\leq\|s-t\|.\]

Proof.: If \(s_{i},t_{i}\geq 0\) or \(s_{i},t_{i}\leq 0\), then \(|\sigma_{i}(s)-\sigma_{i}(t)|=|s_{i}-t_{i}|\). If \(s_{i}\geq 0,t_{i}<0\), then \(|\sigma_{i}(s)-\sigma_{i}(t)|=|s_{i}|\leq|s_{i}-t_{i}|\). If \(s_{i}<0,t_{i}\geq 0\), then \(|\sigma_{i}(s)-\sigma_{i}(t)|=|t_{i}|\leq|s_{i}-t_{i}|\). Hence

\[\|\sigma(s)-\sigma(t)\|^{2}=\sum_{i}|\sigma_{i}(s)-\sigma_{i}(t)|^{2}\leq\sum _{i}|s_{i}-t_{i}|^{2}=\|s-t\|^{2}.\]

**Lemma 4.3**.: _For arbitrary \(w\),\(w^{\prime}\), \(b\), \(b^{\prime}\), the following inequality holds,_

\[\|f^{(k)}(w,b,x)-f^{(k)}(w^{\prime},b^{\prime},x)\|\] \[\leq\|w^{(k)}-w^{\prime(k)}\|\|f^{(k-1)}(w,b,x)\|+\|b^{(k)}-b^{ \prime(k)}\|\] \[+\|w^{(k)}\|\|f^{(k-1)}(w,b,x)-f^{(k-1)}(w^{\prime},b^{\prime},x )\|, \tag{48}\]

_where \(\|w^{(k)}\|\) is the operator norm of a matrix \(w^{(k)}\)._

Proof.: \[f^{(k)}(w,b,x)-f^{(k)}(w^{\prime},b^{\prime},x)\] \[=\sigma(w^{(k)}f^{(k-1)}(w,b,x)+b^{(k)})-\sigma(w^{\prime(k)}f^{ (k-1)}(w,b,x)+b^{\prime(k)})\] \[+\sigma(w^{\prime(k)}f^{(k-1)}(w,b,x)+b^{\prime(k)})-\sigma(w^{ \prime(k)}f^{(k-1)}(w^{\prime},b^{\prime},x)+b^{\prime(k)}).\] (49)
Hence by using Lemma 4.2,

\[\|f^{(k)}(w,b,x)-f^{(k)}(w^{\prime},b^{\prime},x)\|\] \[\leq\|\sigma(w^{(k)}f^{(k-1)}(w,b,x)+b^{(k)})-\sigma(w^{\prime(k)}f ^{(k-1)}(w,b,x)+b^{\prime(k)})\|\] \[+\|\sigma(w^{\prime(k)}f^{(k-1)}(w,b,x)+b^{\prime k}))-\sigma(w^{ \prime(k)}f^{(k-1)}(w^{\prime},b^{\prime},x)+b^{\prime(k)})\|\] \[\leq\|w^{(k)}-w^{\prime(k)}\|\|f^{(k-1)}(w,b,x)\|+\|b^{(k)}-b^{ \prime(k)}\|\] \[+\|w^{\prime(k)}\|\|f^{(k-1)}(w,b,x)-f^{(k-1)}(w^{\prime},b^{ \prime},x)\|. \tag{50}\]

Hence lemma is proved. 

**Lemma 4.4**.: _For arbitrary \(w,b,x\),_

\[\|f^{(k)}(w,b,x)\| \leq\|w^{(k)}\|\|w^{(k-1)}\|\cdots\|w^{(2)}\|\|x\| \tag{51}\] \[+\|b^{(k)}\|+\sum_{j=1}^{k-2}\|w^{(k)}\|\|w^{(k-1)}\|\cdots\|w^{ (k-j)}\|\|b^{(k-j)}\|. \tag{52}\]

Proof.: By substituting \(w^{\prime}:=0\) and \(b^{\prime}=0\), in Lemma 4.3, it follows that

\[\|f^{(k)}(w,b,x)\|\leq\|w^{(k)}\|\|f^{(k-1)}(w,b,x)\|+\|b^{(k)}\|. \tag{53}\]

Then mathematical induction gives the Lemma. 

In order to prove the main theorem, we need several notations. The convergent matrix \(\mathcal{E}^{(k)}\) and vector \(\mathcal{E}^{(k)}_{0}\) defined by the condition that the absolute values of all entries are smaller than \(1/\sqrt{n}\), which is denoted by

\[\mathcal{E}^{(k)}=\left(\begin{array}{cc}\mathcal{E}^{(k)}_{AA}&\mathcal{E }^{(k)}_{AB}\\ \mathcal{E}^{(k)}_{BA}&\mathcal{E}^{(k)}_{BB}\end{array}\right),\ \ \ \mathcal{E}^{(k)}_{0}=\left(\begin{array}{c}\mathcal{E}^{(k)}_{A0}\\ \mathcal{E}^{(k)}_{B0}\end{array}\right). \tag{54}\]

The positive-small-constant matrix \(\mathcal{D}^{(k)}\) and vector \(\mathcal{D}^{(k)}_{0}\) are defined by the condition that all entries are positive and smaller than \(\delta>0\) where \(\delta\) does not depend on \(n\), which is denoted by

\[\mathcal{D}^{(k)}=\left(\begin{array}{cc}\mathcal{D}^{(k)}_{AA}&\mathcal{D }^{(k)}_{AB}\\ \mathcal{D}^{(k)}_{BA}&\mathcal{D}^{(k)}_{BB}\end{array}\right),\ \ \mathcal{D}^{(k)}_{0}=\left(\begin{array}{c} \mathcal{D}^{(k)}_{A0}\\ \mathcal{D}^{(k)}_{B0}\end{array}\right). \tag{55}\]

The positive constant matrix \(\mathcal{M}^{(k)}\) and vector \(\mathcal{M}^{(k)}_{0}\) are defined by the condition that all entries are in the inveral \([A,B]\),

\[\mathcal{M}^{(k)}=\left(\begin{array}{cc}\mathcal{M}^{(k)}_{AA}&\mathcal{M }^{(k)}_{AB}\\ \mathcal{M}^{(k)}_{BA}&\mathcal{M}^{(k)}_{BB}\end{array}\right),\ \ \mathcal{M}^{(k)}_{0}=\left(\begin{array}{c} \mathcal{M}^{(k)}_{A0}\\ \mathcal{M}^{(k)}_{B0}\end{array}\right). \tag{56}\]

To prove Theorem 3.1, we show an upper bound of \(\mathbb{E}[F_{n}]\) is given by choosing a set \(W_{E}\) which consists of essential weight and bias parameters.

**Definition**. (Essential parameter set \(W_{E}\)). A parameter \((w,b)\) is said to be in an essential parameter set \(W_{E}\) if it satisfies the following conditions, (1), (2), and
(3).

(1) For \(2\leq k\leq N^{*}-1\), there exist convergent matrices \(\mathcal{E}^{(k)}\) and positive constant matrices \(\mathcal{M}^{(k)}\) such that

\[w^{(k)} =\left(\begin{array}{cc}(w^{*})^{(k)}+\mathcal{E}^{(k)}_{AA}& \mathcal{Z}^{(k)}_{AB}\\ -\mathcal{M}^{(k)}_{BA}&-\mathcal{M}^{(k)}_{BB}\end{array}\right), \tag{57}\] \[b^{(k)} =\left(\begin{array}{cc}(b^{*})^{(k)}+\mathcal{E}^{(k)}_{A0}\\ -\mathcal{M}^{(k)}_{B0}\end{array}\right), \tag{58}\]

where

\[\mathcal{Z}^{(k)}_{AB}=\left\{\begin{array}{cc}\mathcal{E}^{(3)}_{AB}&(k=3) \\ \mathcal{M}^{(k)}_{AB}&(k\neq 3)\end{array}\right.. \tag{59}\]

Note that, for \(k=2\), \(\mathcal{Z}^{(k)}_{AB}\), \(\mathcal{M}^{(k)}_{BB}\), and \(\mathcal{M}^{(k)}_{B0}\) are the empty matrix.

(2) For \(N^{*}\leq k\leq N-1\), there exist positive-small-constant matrix \(\mathcal{D}^{(k)}\) and positive constant matrix \(\mathcal{M}^{(k)}\)

\[w^{(k)} =\left(\begin{array}{cc}I_{N^{*}-1}+\mathcal{D}^{(k)}_{AA}& \mathcal{M}^{(k)}_{AB}\\ -\mathcal{M}^{(k)}_{BA}&-\mathcal{M}^{(k)}_{BB}\end{array}\right), \tag{60}\] \[b^{(k)} =\left(\begin{array}{c}\mathcal{M}^{(k)}_{A0}\\ -\mathcal{M}^{(k)}_{B0}\end{array}\right), \tag{61}\]

where \(I_{N^{*}-1}\) is \(H^{*}_{N^{*}-1}\) dimensional identity matrix.

(3) For \(k=N\), there exist convergent matrix \(\mathcal{E}^{(N)}\) and vector \(\mathcal{E}^{(N)}_{0}\) such that

\[w^{(N)} =\left(\begin{array}{cc}(w^{*})^{(N^{*})}P^{-1}+\mathcal{E}^{( N)}_{AA},&\mathcal{M}^{(N)}_{AB}\end{array}\right) \tag{62}\] \[b^{(N)} =(b^{*})^{(N^{*})}-\sum_{k=N^{*}}^{N}w^{(N)}w^{(N-1)}\cdots w^{( k)}b^{(k-1)}+\mathcal{E}^{(N)}_{A0}, \tag{63}\]

where \(P\in\mathbb{R}^{(H^{*}_{N^{*}-1})\times(H^{*}_{N^{*}-1})}\) is defined by matrices in eq.(60)

\[P=w^{(N-1)}_{AA}w^{(N-2)}_{AA}\cdots w^{(N^{*})}_{AA}.\]

Note that a positive constant \(\delta>0\) is taken sufficiently small such that arbitrary \(w^{(k)}_{AA}\) (\(N^{*}\leq k\leq N-1\)) is invertible.

**Lemma 4.5**.: _Assume that the weight and bias parameters are in the essential set \(W_{E}\). Then there exist constants \(c_{1},c_{2}>0\) such that_

\[\|f^{(N^{*}-1)}_{A}(w,b,x)-f^{(N^{*}-1)}(w^{*},b^{*},x)\| \leq\frac{c_{1}}{\sqrt{n}}(\|x\|+1), \tag{64}\] \[\|f^{(N^{*}-1)}_{A}(w,b,x)\| \leq c_{2}(\|x\|+1). \tag{65}\]
Proof.: Eq.(65) is derived from Lemma 4.4. By the definitions (57), (58), for \(4\leq k\leq N^{*}-1\)

\[f_{A}^{(2)}(w,b,x) =\sigma(((w^{*})^{(2)}+\mathcal{E}_{AA}^{(2)})f_{A}^{(1)}(w,b,x)+(b ^{*})^{(2)}+\mathcal{E}_{A0}^{(2)}), \tag{66}\] \[f_{A}^{(3)}(w,b,x) =\sigma(((w^{*})^{(3)}+\mathcal{E}_{AA}^{(3)})f_{A}^{(2)}(w,b,x)\] \[+\mathcal{E}_{AB}^{(3)}f_{B}^{(2)}(w,b,x)+(b^{*})^{(3)}+\mathcal{ E}_{A0}^{(3)}),\] (67) \[f_{A}^{(k)}(w,b,x) =\sigma(((w^{*})^{(k)}+\mathcal{E}_{AA}^{(k)})f_{A}^{(k-1)}(w,b,x)\] \[+\mathcal{M}_{AB}^{(k)}f_{B}^{(k-1)}(w,b,x)+(b^{*})^{(k)}+ \mathcal{E}_{A0}^{(k)}). \tag{68}\]

Here, for \(4\leq k\leq N^{*}-1\), \(f_{B}^{(k-1)}(w,b,x)=0\), since all entries of \(w_{BA}^{(k-1)}\), \(w_{BB}^{(k-1)}\), and \(w_{B0}^{(k-1)}\) are negative and the output of ReLU function \(f^{(k-2)}(w,b,x)\) is non-negative. On the other hand,

\[f^{(k)}(w^{*},b^{*},x)=\sigma((w^{*})^{(k)}f^{(k-1)}(w^{*},b^{*},x)+(b^{*})^{( k)}). \tag{69}\]

Hence by Lemma 4.3, \(2\leq k\leq N^{*}-1\),

\[\|f_{A}^{(k)}(w,b,x)-f^{(k)}(w^{*},b^{*},x)\| \tag{70}\] \[\leq\|\mathcal{E}_{AA}^{(k-1)}f_{A}^{(k-1)}(w,b,x)+\mathcal{E}_{ A0}^{(k)}\|+\delta_{k,3}\|\mathcal{E}_{AB}^{(3)}f_{B}^{(2)}(w,b,x)\|\] (71) \[+\|(w^{*})^{(k)}(f_{A}^{(k-1)}(w,b,x)-f^{(k-1)}(w^{*},b^{*},x))\|\] (72) \[\leq\|\mathcal{E}_{AA}^{(k-1)}\|\|f_{A}^{(k-1)}(w,b,x)\|+\| \mathcal{E}_{A0}^{(k)}\|+\delta_{k,3}\|\mathcal{E}_{AB}^{(3)}\|\|f_{B}^{(2)}( w,b,x)\|\] (73) \[+\|(w^{*})^{(k)}\|\|f_{A}^{(k-1)}(w,b,x)-f^{(k-1)}(w^{*},b^{*},x)\|, \tag{74}\]

where \(\delta_{k,3}=1\) if \(k=1\) or \(0\) otherwise. The entries of matrices in \(\mathcal{E}_{AA}^{(k-1)}\), \(\mathcal{E}_{AB}^{(3)}\), and \(\mathcal{E}_{A0}^{(k)}\) are bounded by \(1/\sqrt{n}\) order term and the operator norm is bounded by the Frobenius norm, hence \(\|\mathcal{E}_{AA}^{(k-1)}\|\), \(\|\mathcal{E}_{AB}^{(3)}\|\), and \(\|\mathcal{E}_{A0}^{(k)}\|\) are bounded by \(1/\sqrt{n}\) order term. Moreover \(\|(w^{*})^{(k)}\|\) is a constant term. For \(k=2\), \(f_{A}^{(k-1)}(w,b,x)-f^{(k-1)}(w^{*},b^{*},x)=x-x=0\). Then by using mathematical induction we obtain the Lemma. 

**Lemma 4.6**.: _Assume that the weight and bias parameters are in the set \(W_{E}\). Then there exists a constant \(c_{3}>0\) such that_

\[\|f^{(N)}(w,b,x)-f^{(N^{*})}(w^{*},b^{*},x)\|\leq\frac{c_{3}}{\sqrt{n}}(\|x\|+1). \tag{75}\]

Proof.: Let \(h\in\mathbb{R}^{H_{N}}\) and \(h^{*}\in\mathbb{R}^{H_{N^{*}}^{*}}\) (\(H_{N}=H_{N^{*}}^{*}\)) be input vectors into the output layers of the learning and data-generating machines respectively. In other words, \(h\) and \(h^{*}\) is defined such that \(f^{(N)}(w,b,x)=\sigma(h)\) and \(f^{(N^{*})}(w^{*},b^{*},x)=\sigma(h^{*})\). By the definition of the essential parameter set (2), for \(N^{*}-1\leq k\leq N-1\), all entries of \(w_{BA}^{(k)}\), \(w_{BB}^{(k)}\) and \(b_{B0}^{(k)}\) are negative. Hence, for \(N^{*}\leq k\leq N-1\), \(f_{2}^{(k)}(w,b,x)=0\). For \(N^{*}\leq k\leq N-1\), all entries of \(w_{AA}^{(k)}\), \(w_{AB}^{(k)}\) and \(b_{A0}^{(k)}\) are
positive. Hence by using \(\sigma(t)=t\) for \(t\geq 0\),

\[h =w^{(N)}_{AA}w^{(N-1)}_{AA}\cdots w^{(N^{*})}_{AA}f^{(N^{*}-1)}_{A}( w,b,x) \tag{76}\] \[+b^{(N)}+\sum_{k=N^{*}}^{N}w^{(N)}_{AA}\cdots w^{(k)}_{AA}b^{(k-1 )}_{A0}. \tag{77}\]

On the other hand,

\[h^{*}=(w^{*})^{(N^{*})}f^{(N^{*}-1)}(w^{*},b^{*},x)+(b^{*})^{(N)}. \tag{78}\]

If \(w\) is in the essential set of parameters,

\[w^{(N)}_{AA}w^{(N-1)}_{AA}\cdots w^{(N^{*})}_{AA}=((w^{*})^{(N^{ *})}P^{-1}+\mathcal{E}^{(N)}_{AA})w^{(N-1)}_{AA}\cdots w^{(N^{*})}_{AA} \tag{79}\] \[=(w^{*})^{(N^{*})}+\mathcal{E}^{(N)}_{AA}w^{(N-1)}_{AA}\cdots w^{ (N^{*})}_{AA}. \tag{80}\]

It follows that

\[\|w^{(N)}w^{(N-1)}\cdots w^{(N^{*})}f^{(N^{*}-1)}(w,b,x)-w^{(N*)} f^{(N^{*}-1)}(w^{*},b^{*},x)\| \tag{81}\] \[\leq\|w^{(N)}_{AA}w^{(N-1)}_{AA}\cdots w^{(N^{*})}_{AA}f^{(N^{*} -1)}_{A}(w,b,x)-w^{(N*)}f^{(N^{*}-1)}(w^{*},b^{*},x)\|\] (82) \[\leq\|(w^{*})^{(N^{*})}(f^{(N^{*}-1)}_{A}(w,b,x)-f^{(N^{*}-1)}(w^ {*},b^{*},x))\|\] (83) \[+\|\mathcal{E}^{(N)}_{AB}\|\|w^{(N-1)}_{AA}\|\cdots\|w^{(N^{*})}_ {AA}\|\|f^{(N^{*}-1)}_{A}(w^{*},b^{*},x)\|\] (84) \[\leq\frac{c_{4}}{\sqrt{n}}(\|x\|+1), \tag{85}\]

where the last inequality is derived by Lemma 4.5. Also by the definition,

\[\|b^{(N)}+\sum_{k=N^{*}}^{N}w^{(N)}\cdots w^{(k)}b^{(k-1)}-(b^{*})^{(N^{*})}\| \leq\frac{c_{4}}{\sqrt{n}}, \tag{86}\]

it follows that

\[\|h-h^{*}\|\leq\frac{c_{5}}{\sqrt{n}}(\|x\|+1).\]

Then applying Lemma 4.2 completes the lemma. 

**Lemma 4.7**.: _(1) If the support of \(q(x)\) is contained in a positive region, the same conclusion as Lemma 4.5 holds by replacing \(\mathcal{Z}^{(3)}_{AB}\) in (59) with \(\mathcal{M}^{(3)}_{AB}\). (2) If the support of \(q(x)\) is contained in a bounded region, the same conclusion as Lemma 4.5 holds by replacing \(\mathcal{Z}^{(3)}_{AB}\) in (59) with \(\mathcal{M}^{(3)}_{AB}\) and by replacing \(-\mathcal{M}^{(3)}_{B0}\) in (58) with a matrix in a sufficiently small region._

Proof.: In both cases, \(f^{(2)}_{B}(w,b,x)=0\) in eq.(67) holds. hence the same conclusion of Lemma 4.5 holds.
Proof of Main Theorem

In this section we prove the main theorem.

Proof.: (Main theorem). By Lemma 4.1, it is sufficient to prove that there exists a constant \(C>0\) such that

\[\int_{W_{E}}\exp(-nK(w,b))\varphi(w,b)\mathrm{d}w\mathrm{d}b\geq\frac{C}{n^{ \lambda}}\]

where

\[K(w,b)=\frac{1}{2}\int\|f^{(N)}(w,b,x)-f^{(N^{*})}(w^{*},b^{*},x)\|^{2}q(x) \mathrm{d}x.\]

By using Lemma 4.6, if \((w,b)\in W_{E}\),

\[K(w,b)\leq\frac{c_{3}^{2}}{2n}\int(\|x\|+1)^{2}q(x)\mathrm{d}x=\frac{c_{4}}{n}<\infty.\]

It follows that

\[\int_{W_{E}}\exp(-nK(w,b))\varphi(w,b)\mathrm{d}w\mathrm{d}b \tag{87}\] \[\geq\exp(-c_{4})\left(\min_{(w,b)\in W_{E}}\varphi(w,b)\right) \mathrm{Vol}(W_{E}). \tag{88}\]

where \(c_{4}>0\), \(\min_{(w,b)\in W_{E}}\varphi(w,b)>0\), and \(\mathrm{Vol}(W_{E})\) is the volume of the set \(W_{E}\) by the Lebesgue measure. By the definition of the essential parameter set \(W_{E}\), its volume is determined by the dimension of the convergent matrices and vectors. Let \(2\lambda\) be the number of parameters in convergent matrices and vectors. Then

\[\mathrm{Vol}(W_{E})\geq\frac{C_{1}}{n^{\lambda}},\]

where in general cases,

\[\lambda=\frac{1}{2}\left(+H_{3}^{*}(H_{2}-H_{2}^{*})+\sum_{k=2}^{N^{*}}H_{k}^{ *}(H_{k-1}^{*}+1)\right).\]

If the support of the input distribution is contained in a positive region or a bounded region,

\[\lambda=\frac{1}{2}\left(\sum_{k=2}^{N^{*}}H_{k}^{*}(H_{k-1}^{*}+1)\right),\]

which completes the main theorem. 

## 6 Discussion

In this section, we discuss the three points in this paper.
### Property of Free Energy

Firstly we study a monotone property of the free energy as a function of the integrated region. As we have shown in the proof, the average free energy satisfies

\[\mathbb{E}[F_{n}]\leq-\log\int\exp(-nK(w,b))\varphi(w,b)dwdb+nS.\]

We define a function \(G(U)\) of an integrated region \(U\),

\[G(U)=-\log\int_{U}\exp(-nK(w,b))\varphi(w,b)dwdb,\]

where \(U\) is a measurable subset in \(\{(w,b)\}\). Then an inequality holds,

\[U_{1}\supset U_{2}\Longrightarrow G(U_{1})\leq G(U_{2}).\]

Hence, an set \(U\) satisfies a condition that, for \((w,b)\in U\), \(K(w,b)\leq 1/n\), it follows that

\[\mathbb{E}[F_{n}]\leq G(U)+nS,\]

and

\[G(U)\leq-\log\operatorname{Vol}(U)+nS+const.,\]

where \(\operatorname{Vol}(U)\) is the volume of the set \(U\). In this paper, we chose the essential parameter set \(W_{E}\) for such a subset, and showed the volume of this set is determined the number of the convergent parameters.

### Sepcial Property of ReLU Function

Secondly, a special property of the ReLU function is discussed. The output of the ReLU function is nonnegative and equal to zero for a negative input. Hence, if all parameters and biases from the \((k-1)\)th layer to \(k\)th layer are negative, then the output of \(k\)th layer is equal to zero. This property is used to evaluate the effect by the redundant parameters in each layer.

Moreover, if all parameters and biases from the \((k-1)\)th layer to \(k\)th layer are positive, then the output of the \(k\)th layer is a linear function of the \((k-1)\)th output. This property is used to evaluate the effect by the redundant layers.

These two points were employed in the mathematical proof of the main theorem, which might also be useful to design design a deep ReLU neural network for the smaller generalization error.

### Unrealizable Cases

Thirdly we discuss a case when the data-generating distribution is not realizable by a ReLU function. In this paper, we assumed in the theorem that a sample is subject to the data-generating function represented by a parameter \((w^{*},b^{*})\). In real world problems, such an assumption is not satisfied in general. However, if a learning machine is sufficiently large such that there exists \((w^{*},b^{*})\) such that the Kullback-Leibler distance satisfies

\[K(q(y|x)||p(y|x,w^{*},b^{*}))=o(1/n),\]
then the same inequality as the main theorem holds. In other words. a deep ReLU neural network in an overparametrized state makes the generalization error caused by bias small enough with the bounded error caused by variance. This is a good property of a deep ReLU neural network, when Bayesian inference is employed in learning.

## 7 Conclusion

In this paper, we studied a deep ReLU neural network in an overparametrized case, and derived the upper bound of Bayesian free energy. Since the generalization error is equal to the increase of the free energy, the result of this paper shows that the generalization error of the deep ReLU neural network is bounded even if the number of layers are larger then necessary to approximate the data-generating distribution.

## Acknowledgement

This work was partially supported by JSPS KAKENHI Grant-in-Aid for Scientific Research (C) 21K12025.
