Implicit regularization of deep residual networks towards neural ODEs

Pierre Marion, Yu-Han Wu, Michael E. Sander, Gérard Biau

Introduction

Residual networks are a successful family of deep learning models popularized by breakthrough results in computer vision (He et al., 2016b). The key idea behind residual networks, namely the presence of skip connections, is now ubiquitous in deep learning, and can be found, for example, in Transformer models (Vaswani et al., 2017). The main advantage of skip connections is to allow successful training with depth of the order of a thousand layers, in contrast to vanilla neural networks, leading to significant performance improvement (e.g., Wang et al., 2022). This has motivated research on the properties of residual networks in the limit where the depth tends to infinity. One of the main explored directions is the neural ordinary differential equation (ODE) limit (Chen et al., 2018).

Before presenting neural ODEs, we first introduce the mathematical formalism of deep residual networks. We consider a single model throughout the paper to simplify the exposition, but most of our results apply to more general models, as will be discussed later. We consider the formulation

where ss is the continuous-depth version of the layer index. It is important to note that this correspondence holds for fixed limiting functions V\mathcal{V} and W\mathcal{W}. This is especially true at initialization, for example by setting the VkV_{k} to zero and the WkW_{k} to Gaussian matrices weight-tied across the depth. The initial residual network is then trivially equal to the neural ODE dHds(s)=0\frac{dH}{ds}(s)=0. Of course, more sophisticated initializations are possible, as shown, e.g., in Marion et al. (2022); Sander et al. (2022b). However, regardless of an ODE structure at initialization, a more challenging question is that of the structure of the network during and after training. Since the weights are updated during training, there is a priori no guarantee that an ODE limit still holds after training, even if it does at initialization.

The question of a potential ODE structure for the trained network is not a mere technical one. In fact, it is important for at least three reasons. First, it gives a precise answer to the question of the connection between (trained) residual networks and neural ODEs, providing more solid ground to a common statement in the community that both can coincide in the large-depth limit (see, e.g., Haber & Ruthotto, 2017; E et al., 2019; Dong et al., 2020; Massaroli et al., 2020; Kidger, 2022). Second, it opens exciting perspectives for understanding residual networks. Indeed, if trained residual networks are discretizations of neural ODEs, then it is possible to apply results from neural ODEs to the large family of residual networks. In particular, from a theoretical point of view, the approximation capabilities of neural ODEs are well understood (Teshima et al., 2020; Zhang et al., 2020) and it is relatively easy to obtain generalization bounds for these models (Hanson & Raginsky, 2022; Marion, 2023). From a practical standpoint, advantages of neural ODEs include memory-efficient training (Chen et al., 2018; Sander et al., 2022b) and weight compression (Queiruga et al., 2021). This is important because in practice memory is a bottleneck for training residual networks (Gomez et al., 2017). Finally, our analysis is a first step towards understanding the implicit regularization (Neyshabur et al., 2014; Vardi, 2023) of gradient descent for deep residual networks, that is, characterizing the properties of the trained network among all minimizers of the empirical risk.

Our first main contribution (Section 4.1) is to show that a neural ODE limit holds after training up to time tt, i.e., there exists a function V(s,t)\mathcal{V}(s,t) such that the residual network converges, as LL tends to infinity, to the ODE

This large-depth limit holds for any finite training time t⩾0t\geqslant 0. However, the convergence of the optimization algorithm as tt tends to infinity, which we refer to as the long-time limit to distinguish it from the large-depth limit L→∞L\to\infty, is not guaranteed without further assumptions, due to the non-convexity of the optimization problem. We attack the question (Section 4.2) when the width is large enough by proving a Polyak-Łojasiewicz (PL) condition, which is now state of the art in analyzing the properties of optimization algorithms for deep neural networks (Liu et al., 2022). The main assumption for our PL condition to hold is that the width mm of the hidden layers should be greater than some constant times the number of data nn. As a second main contribution, we show that the PL condition yields the long-time convergence of the gradient flow for residual networks with linear overparameterization. Finally, we prove the convergence with high probability in the long-time limit, namely the existence of functions V∞\mathcal{V}_{\infty} and W∞\mathcal{W}_{\infty} such that the discrete trajectory defined by the trained residual network (1) converges as both LL and tt tend to infinity to the solution of the neural ODE (2) with V=V∞\mathcal{V}=\mathcal{V}_{\infty} and W=W∞\mathcal{W}=\mathcal{W}_{\infty}. In addition, our approach points out that this limiting ODE interpolates the training data. Finally, our results are illustrated by numerical experiments (Section 5).

Related work

Several works study the large-depth convergence of residual networks to differential equations, but without considering the training dynamics (Thorpe & van Gennip, 2023; Cohen et al., 2021; Marion et al., 2022; Hayou, 2023). Closer to our setting, Cont et al. (2022) and Sander et al. (2022b) analyze the dynamics of gradient descent for deep residual networks, as we do, but with significant differences. Cont et al. (2022) consider a \nicefrac1L\nicefrac{{1}}{{\sqrt{L}}} scaling factor in front of the residual branch, resulting in a limit that is not a neural ODE. In addition, only WW is trained. Furthermore, to obtain convergence in the long-time limit, it is assumed that the data points are nearly orthogonal. Sander et al. (2022b) prove the existence of an ODE limit for trained residual networks, but in the simplified case of a linear activation and under a more restricted setting.

Polyak-Łojasiewicz conditions are a modern tool to prove long-time convergence of overparameterized neural networks (Liu et al., 2022). These conditions are a relaxation of convexity, and mean that the gradients of the loss with respect to the parameters cannot be small when the loss is large. They have been applied to residual networks with both linear (Bartlett et al., 2018; Wu et al., 2019; Zou et al., 2020) and nonlinear activations (Allen-Zhu et al., 2019; Frei et al., 2019; Barboni et al., 2022; Cont et al., 2022; MacDonald et al., 2022). Building on the proof technique of Nguyen & Mondelli (2020) for non-residual networks, we need only a linear overparameterization to prove our PL condition, i.e., we require m=Ω(n)m=\Omega(n). This compares favorably with results requiring polynomial overparameterization (Allen-Zhu et al., 2019; Barboni et al., 2022) or assumptions on the data, either a margin condition (Frei et al., 2019) or a sample size smaller than the dimension of the data space (Cont et al., 2022; MacDonald et al., 2022).

Our paper can be related to a line of work on the implicit regularization of gradient-based algorithms for residual networks (Neyshabur et al., 2014). We show that the optimization algorithm does not just converge to any residual network that minimizes the empirical risk, but rather to the discretization of a neural ODE. Note that most implicit regularization results state that the optimization algorithm converges to an interpolator that minimizes some complexity measure, which can be a margin (Lyu & Li, 2020), a norm (Boursier et al., 2022), or a matrix rank (Li et al., 2021). Thus, an interesting next step is to understand if the neural ODE found by gradient flow actually minimizes some complexity measure, and to characterize its generalization properties.

Definitions and notation

This section is devoted to specifying the setup outlined in Section 1. Proofs are given in the appendix.

Gradient flow is the limit of gradient descent as the learning rate tends to zero. The parameters are set at time t=0t=0 by the initialization, and then evolve according to the ODE

for k∈{1,…,L}k\in\{1,\dots,L\}. In the following, the dependence in tt is made explicit when necessary, e.g., we write hkL(t)h_{k}^{L}(t) instead of hkLh_{k}^{L}, and FL(x;t)F^{L}(x;t) instead of FL(x)F^{L}(x).

It turns out that, without further assumptions, the gradient flow can diverge in finite time. This is because the dynamics are not (globally) Lipschitz continuous, breaking the conditions of the Picard-Lindelöf theorem (see Lemma 16) for existence and uniqueness of ODE solutions. A common practice (Goodfellow et al., 2016, Section 10.11.1) is to consider instead a clipped gradient flow

The (clipped) gradient flow (5) has a unique solution for all t⩾0t\geqslant 0.

In Section 4.2, we make additional assumptions to prove the long-time convergence of the gradient flow. We then prove that these assumptions ensure that the dynamics of the gradient flow (4) are well defined, eliminating the need for clipping.

The neural ODE corresponding to the residual network (3) is defined by

Clearly, our choices of VkLV_{k}^{L} and WkLW_{k}^{L} at initialization are discretizations of the Lipschitz continuous (in fact, constant) functions V(s)≡0\mathcal{V}(s)\equiv 0 and W(s)≡W∼N(0,1)⊗(m×q)\mathcal{W}(s)\equiv W\sim\mathcal{N}(0,1)^{\otimes(m\times q)}. Thus, Proposition 2 holds at initialization, and the residual network is equivalent to the trivial ODE dHds(s)=0\frac{dH}{ds}(s)=0. The next section shows that after training we obtain non-trivial dynamics, which still discretize neural ODEs.

Large-depth limit of residual networks

We study the large-depth limit of trained residual networks in two settings. In Section 4.1, we consider the case of a finite training time. We move in Section 4.2 to the case where the training time tends to infinity, which is tractable under a Polyak-Łojasiewicz condition. Proofs are given in the appendix.

We first consider the case where the neural network is trained with clipped gradient flow (5) on some training time interval [0,T][0,T], T>0T>0. This allows us to prove large-depth convergence to a neural ODE without further assumptions. We emphasize that stopping training after a finite training time is a common technique in practice, referred to as early stopping (Goodfellow et al., 2016, Section 7.8). It is considered as a form of implicit regularization, and our result sheds light on this intuition by showing that the complexity of the trained networks increases with TT.

The following proposition is a key step in proving the main theorem of this section.

Moreover, with probability at least 1-\exp\big{(}-\frac{3qm}{16}\big{)}, the following expressions hold for MM and KK:

where MπM_{\pi} is the supremum of π\pi in Frobenius norm, and α\alpha and β\beta depend on X\mathcal{X}, Y\mathcal{Y}, MM, and σ\sigma.

This proposition ensures that the size of the weights and the difference between successive weights remain bounded throughout training. We can now state the main result, which states the convergence, for any training time in [0,T][0,T], of the neural network to a neural ODE as L→∞L\to\infty. Recall that a sequence of functions fLf^{L} of some variable uu is said to converge uniformly over u∈Uu\in U to ff if sup⁡u∈U∥fL(u)−f(u)∥→0\sup_{u\in U}\|f^{L}(u)-f(u)\|\to 0.

Consider the residual network (3) with the training dynamics (5). Then the following statements hold as LL tends to infinity:

converges uniformly over s∈s\in and t∈[0,T]t\in[0,T] to Z:=(V,W)\mathcal{Z}:=(\mathcal{V},\mathcal{W}).

Uniformly over s∈s\in, t∈[0,T]t\in[0,T], and x∈Xx\in\mathcal{X}, the hidden layer h⌊Ls⌋L(t)h_{\left\lfloor Ls\right\rfloor}^{L}(t) converges to the solution at time ss of the neural ODE

Uniformly over t∈[0,T]t\in[0,T] and x∈Xx\in\mathcal{X}, the output FL(x;t)F^{L}(x;t) converges to B(t)H(1,t)B(t)H(1,t).

Let us sketch the proof of statement (ii)(ii), which is the cornerstone of the theorem. A first key idea is to introduce in (8) the piecewise-constant continuous-depth interpolation ZL\mathcal{Z}^{L} of the weights, whose ambient space does not depend on LL, in contrast to the discrete weight sequence ZkLZ_{k}^{L}. Since the weights remain bounded during training by Proposition 3, the Arzelà-Ascoli theorem guarantees the existence of an accumulation point for ZL\mathcal{Z}^{L}. We show that the accumulation point is unique because it is the solution of an ODE satisfying the conditions of the Picard-Lindelöf theorem. The uniqueness of the accumulation point then implies the existence of a limit for the weights.

There are two notable byproducts of our proof. The first one is an explicit description of the training dynamics of the limiting weights AA, BB, and Z\mathcal{Z}, as the solution of an ODE system, as presented in Appendix A.5. The second one, which we now describe, consists of norm bounds on the weights. Proposition 3 bounds the discrete weights and the difference between two consecutive weights respectively by some M,K>0M,K>0. The proof of Theorem 4 shows that this bound carries over to the continuous weights, in the sense that A(t)A(t), V(s,t)\mathcal{V}(s,t), W(s,t)\mathcal{W}(s,t), and B(t)B(t) are uniformly bounded by MM, and V(⋅,t)\mathcal{V}(\cdot,t) and W(⋅,t)\mathcal{W}(\cdot,t) are uniformly Lipschitz continuous with Lipschitz constant KK. Formally, this last property means that, for any s,s′∈s,s^{\prime}\in and t∈[0,T]t\in[0,T],

The boundedness and Lipschitz continuity of the weights are important features because they limit the statistical complexity of neural ODEs (Marion, 2023). More generally, norm-based bounds are a common approach in the statistical theory of deep learning (see, e.g., Bartlett et al., 2017, and references therein). Looking at the formula (7) for MM and KK, one can see in particular that the bounds diverge exponentially with TT, providing an argument in favor of early stopping.

Our approach so far characterizes the large-depth limit of the neural network for a finite training time TT, but two questions remain open. A first challenge is to characterize the value of the loss after training. A second one is to provide insight into the convergence of the optimization algorithm in the long-time limit, i.e., as TT tends to infinity. To answer these questions, we move to the setting where the width of the network is large enough, which allows us to prove a Polyak-Łojasiewicz condition and thereby the long-time convergence of the training loss to zero.

2 Convergence in the long-time limit for wide networks

Proving convergence of gradient-based optimization algorithms for neural networks is a major difficulty in deep learning theory. One direction recently explored considers sufficiently wide neural networks, and leverages the Polyak-Łojasiewicz (PL) condition. In our setting, they are written as follows (with the notation ZL=(VkL,WkL)k∈{1,…,L}Z^{L}=(V_{k}^{L},W_{k}^{L})_{k\in\{1,\dots,L\}}):

For M,μ>0M,\mu>0, the residual network (3) is said to satisfy the (M,μ)(M,\mu)-local PL condition around a set of parameters (AˉL,ZˉL,BˉL)(\bar{A}^{L},\bar{Z}^{L},\bar{B}^{L}) if, for every set of parameters (AL,ZL,BL)(A^{L},Z^{L},B^{L}) such that

The next important point is to observe that, under the setup of Section 3 and some additional assumptions, the residual network satisfies the local PL condition of Definition 1.

Assume that the sample points (xi,yi)(x_{i},y_{i}) are i.i.d. such that ∥xi∥2=q\|x_{i}\|_{2}=\sqrt{q}. Then there exist c1,…,c4>0c_{1},\ldots,c_{4}>0 (depending only on σ\sigma) and δ>0\delta>0 such that, if

then, with probability at least 1−δ1-\delta, the residual network (3) satisfies the (M,μ)(M,\mu)-local PL condition around its initialization, with M=c3nq\displaystyle M=\frac{c_{3}}{\sqrt{nq}} and μ=c4nnq\displaystyle\mu=\frac{c_{4}}{n\sqrt{n}q}.

We emphasize that Proposition 5 requires the width mm to scale only linearly with the sample size nn, which improves on the literature (see Section 2). The other assumptions are mild. Note that our proof shows that the parameter δ\delta is small if nn grows at most polynomially with dd (see Appendix B.5).

We are now ready to state convergence in the long-time and large-depth limits to a global minimum of the empirical risk, when the local PL condition holds and the norm of the targets yiy_{i} is small enough.

for some C′>0C^{\prime}>0 depending on σ\sigma. Moreover, the following statements hold as tt and LL tend to infinity:

converges uniformly over s∈s\in to Z∞:=(V∞,W∞)\mathcal{Z}_{\infty}:=(\mathcal{V}_{\infty},\mathcal{W}_{\infty}).

Uniformly over s∈s\in and x∈Xx\in\mathcal{X}, the hidden layer h⌊Ls⌋L(t)h_{\left\lfloor Ls\right\rfloor}^{L}(t) converges to the solution at time ss of the neural ODE

Uniformly over x∈Xx\in\mathcal{X}, the output FL(x;t)F^{L}(x;t) converges to F∞(x)=B∞H(1)F_{\infty}(x)=B_{\infty}H(1). Furthermore, F∞(xi)=yiF_{\infty}(x_{i})=y_{i} for all i∈{1,…,n}i\in\{1,\dots,n\}.

This theorem proves two important results of separate interest. On the one hand, equation (10) shows the long-time convergence of the gradient flow for deep residual networks under the linear overparameterization assumption m⩾c1nm\geqslant c_{1}n of Proposition 5. On the other hand, when both tt and LL tend to infinity, the network converges to a neural ODE that further interpolates the training data. Note that the order in which tt and LL tend to infinity does not matter by uniform convergence properties.

3 Generalizations to other architectures and initialization

To simplify the exposition, we have so far considered a particular residual architecture defined in (3). However, most of our results hold for a more general residual network of the form

It is easy to see that our residual network of interest (3) is a special case of the general model (11) if σ\sigma satisfies the assumptions of Section 3. However, other choices are possible, such as convolutional layers or a Lipschitz continuous version of Transformer (Kim et al., 2021). This latter application is particularly interesting in the light of the literature analyzing the Transformer architecture from a neural ODE point of view (Lu et al., 2019; Sander et al., 2022a; Geshkovski et al., 2023).

Numerical experiments

We now present numerical experiments to validate our theoretical findings, using both synthetic and real-world data. Experimental details are given in Appendix E.

We consider the residual network (3) with the initialization scheme of Section 3. So, the VkLV_{k}^{L} are initialized to zero and the WkLW_{k}^{L} to weight-tied standard Gaussian matrices. To ease the presentation, we consider the case where q=d=d′q=d=d^{\prime}, and we do not train the weights ALA^{L} and BLB^{L}, which therefore stay equal to the identity. The activation function is GELU (Hendrycks & Gimpel, 2016), which is a smooth approximation of ReLU: x↦max⁡(x,0)x\mapsto\max(x,0). The sample points (xi,yi)1⩽i⩽n(x_{i},y_{i})_{1\leqslant i\leqslant n} follow independent standard Gaussian distributions. Note that it does not hurt to take xx and yy independent since, in this subsection, our focus is on optimization results only and not on statistical aspects. The mean-squared error is minimized using full-batch gradient descent. The following experiments exemplify the large-depth (t∈[0,T]t\in[0,T], L→∞L\to\infty) and long-time (t→∞t\to\infty, LL finite) limits.

We now turn to the long-time training setup, training for 80,00080{,}000 iterations with L=64L=64. In Figure 2, we plot a specific (randomly-chosen) coefficient of matrices VkLV_{k}^{L} and WkLW_{k}^{L} across layers, for different training times. This illustrates Theorem 6 in a practical setting since, visually, the weights behave as a Lipschitz continuous function for any training time and converge to a Lipschitz continuous function as t→∞t\to\infty. We also display the loss as a function of the training time, corroborating the convergence of the loss to zero in Theorem 6.

2 Real-world data

Table 1 conveys several important messages. First, in accordance with our theory (Theorem 4), we obtain a neural ODE structure when using a smooth activation function and weight-tied initialization (lines 11 and 33 of Table 1). This is not the case when using the non-smooth ReLU activation and/or i.i.d. initialization. In fact, we prove in Appendix D that the smoothness of the weights is lost when training with ReLU in a simple setting, confirming this experimental observation. Furthermore, the third line of Table 1 shows that it is possible to obtain a reasonable accuracy with a neural ODE structure, which, as emphasized in Section 1, also comes with theoretical and practical advantages. Nevertheless, we obtain an improvement in accuracy in the cases corresponding to non-smooth weights, i.e., to a residual network that does not discretize an ODE. Extending our theory to such cases is left for future work.

Conclusion

We study the convergence of deep residual networks to neural ODEs. When properly scaled and initialized, residual networks trained with fixed-horizon gradient flow converge to neural ODEs as the depth tends to infinity. This result holds for very general architectures. In the case where both training time and depth tend to infinity, convergence holds under a local Polyak-Łojasiewicz condition. We prove such a condition for a family of deep residual networks with linear overparameterization.

The setting of neural ODE-like networks comes with strong guarantees, at the cost of some performance gap when compared with i.i.d. initialization as highlighted by the experimental section. Extending the mathematical large-depth study to the i.i.d. case is an interesting problem for future research. Previous work suggests that the correct limit object is then a stochastic differential equation instead of an ODE (Cohen et al., 2021; Cont et al., 2022; Marion et al., 2022).

P.M. is supported by a grant from Région Île-de-France and by MINES Paris - PSL. P.M. and Y.-H.W. are funded by a Google PhD Fellowship. M.S. is supported by the “Investissements d’avenir” program, reference ANR19-P3IA-0001, and by the European Research Council (ERC project NORIA). This work was granted access to the HPC resources of IDRIS under the allocation 2020-[AD011012073] made by GENCI.

References

In Section A, we give some results on the general residual network (11). In Section B, these results are instantiated in the specific case of the residual network (3), thus proving the results of the paper. Section C contains some lemmas that are useful for the proofs. We present in Section D a counter-example showing that a residual network with the ReLU activation can move away from the neural ODE structure during training. Finally, Section E presents some experimental details.

Appendix A Some results for general residual networks

Let (U,∥⋅∥)(\mathscr{U},\|\cdot\|), (V,∥⋅∥)(\mathscr{V},\|\cdot\|), and (W,∥⋅∥)(\mathscr{W},\|\cdot\|) be generic normed spaces. Then a function of two variables g:U×V→Wg:\mathscr{U}\times\mathscr{V}\to\mathscr{W} is:

(Globally) Lipschitz continuous if there exists K⩾0K\geqslant 0 such that, for (u,v),(u′,v′)∈U×V(u,v),(u^{\prime},v^{\prime})\in\mathscr{U}\times\mathscr{V},

Locally Lipschitz continuous in its first variable if, for any compacts E⊂U,E′⊂VE\subset\mathscr{U},E^{\prime}\subset\mathscr{V}, there exists K⩾0K\geqslant 0 such that, for (u,v),(u′,v)∈E×E′(u,v),(u^{\prime},v)\in E\times E^{\prime},

Equivalent definitions hold for a function of one variable. Moreover, g(⋅,v)g(\cdot,v) is said to be uniformly Lipschitz continuous for vv in V\mathscr{V} if there exists K⩾0K\geqslant 0 such that, for (u,v),(u′,v)∈U×V(u,v),(u^{\prime},v)\in\mathscr{U}\times\mathscr{V},

and uniformly Lipschitz continuous for vv in any compact if, for any compact E′⊂VE^{\prime}\subset\mathscr{V}, there exists K⩾0K\geqslant 0 such that, for (u,v),(u′,v)∈U×E′(u,v),(u^{\prime},v)\in\mathcal{U}\times E^{\prime},

Throughout, we refer to a Lipschitz continuous function with Lipschitz constant K⩾0K\geqslant 0 as KK-Lipschitz.

As explained in Section 4.3, most of our results are proven for the general residual network

For a vector xx, ∥x∥\left\|x\right\| denotes the Euclidean norm. For a matrix AA, the operator norm induced by the Euclidean norm is denoted by ∥A∥2\left\|A\right\|_{2}, and the Frobenius norm is denoted by ∥A∥F\left\|A\right\|_{F}. Finally, we use the notation ALA^{L} (resp. ZkLZ_{k}^{L}, BLB^{L}) to denote the function t↦AL(t)t\mapsto A^{L}(t) (resp. t↦ZkL(t)t\mapsto Z_{k}^{L}(t), t↦BL(t)t\mapsto B^{L}(t)), since the parameters are considered as functions of the training time throughout this appendix.

First, in Section A.1, we study the case of the (clipped) gradient flow (5). We show that the weights and the difference between successive weights are bounded during the entire training. Section A.2 shows a similar result for the standard gradient flow (4) under a PL condition. In Section A.3, we show a generalized version of the Arzelà-Ascoli theorem, which allows us to prove the existence of a converging subsequence of the weights in the large-depth limit. Section A.4 is devoted to the convergence of the Euler scheme for parameterized ODEs. We then proceed to prove in Section A.5 our main result, i.e., the large-depth convergence of the gradient flow. The key step is to establish the uniqueness of the adherence point of the weights. Finally, in Section A.6, we prove the existence of a double limit for the weights and the hidden states when both the depth and the training time tend to infinity.

A.1 The trained weights are bounded in the finite training-time setup

Consider the residual network (12) initialized as explained in Appendix A and trained with the gradient flow (5) on [0,T][0,T], for some T∈(0,∞)T\in(0,\infty). Let

Moreover, there exist α,β>0\alpha,\beta>0 such that, for t∈[0,T]t\in[0,T] and k∈{1,…,L−1}k\in\{1,\dots,L-1\},

The following expressions for α\alpha and β\beta hold:

defining the gradient flow (5) are locally Lipschitz continuous, hence the gradient flow is defined on a maximal interval [0,Tmax⁡)[0,T_{\max}) by the Picard-Lindelöf theorem (see Lemma 16). Let us show by contradiction that Tmax⁡=TT_{\max}=T. Assume that Tmax⁡<TT_{\max}<T. If this is true, again by the Picard-Lindelöf theorem, we know that the parameters diverge to infinity at Tmax⁡T_{\max}. However, for any t∈[0,Tmax⁡)t\in[0,T_{\max}), we have

Bounds on BLB^{L} and ZkLZ_{k}^{L} by MM can be shown similarly. This contradicts the divergence of the parameters at t=Tmax⁡t=T_{\max}. We conclude that the gradient flow is well defined on [0,T][0,T] and that the bounds (17) hold.

It remains to bound the difference ∥Zk+1L(t)−ZkL(t)∥\|Z_{k+1}^{L}(t)-Z_{k}^{L}(t)\|. We have, for t∈[0,T]t\in[0,T] and k∈{1,…,L−1}k\in\{1,\dots,L-1\},

Furthermore, for t∈[0,T]t\in[0,T], k∈{0,…,L−1}k\in\{0,\dots,L-1\}, and i∈{1,…,n}i\in\{1,\dots,n\},

since f(⋅,Zk+1L(t))f(\cdot,Z_{k+1}^{L}(t)) is K1K_{1}-Lipschitz, where K1K_{1} is defined by (18), and f(0,Zk+1L(t))=0f(0,Z_{k+1}^{L}(t))=0. Therefore, for any k∈{1,…,L}k\in\{1,\dots,L\},

This bound shows that the pair (hk,iL(t),Zk+1L(t))(h_{k,i}^{L}(t),Z_{k+1}^{L}(t)) belongs to the compact EE defined in (19) for every t∈[0,T]t\in[0,T], k∈{1,…,L}k\in\{1,\dots,L\}, and i∈{1,…,n}i\in\{1,\dots,n\}. In particular, ∥∂2f(hk−1,iL(t),ZkL(t))∥2⩽K\|\partial_{2}f(h_{k-1,i}^{L}(t),Z_{k}^{L}(t))\|_{2}\leqslant K, and

For k∈{1,…,L}k\in\{1,\dots,L\} and i∈{1,…,n}i\in\{1,\dots,n\},

Moreover, for k∈{0,…,L}k\in\{0,\dots,L\} and i∈{1,…,n}i\in\{1,\dots,n\},

where we use (17) and (21) for the last inequality. Putting all the pieces together, we obtain

Applying Grönwall’s inequality (see, e.g., Dragomir, 2003), we conclude that ∥Zk+1L(t)−ZkL(t)∥⩽(∥Zk+1L(0)−ZkL(0)∥+βTL)eαT\|Z_{k+1}^{L}(t)-Z_{k}^{L}(t)\|\leqslant(\|Z_{k+1}^{L}(0)-Z_{k}^{L}(0)\|+\frac{\beta T}{L})e^{\alpha T}, as desired. ∎

A.2 The trained weights are bounded under the local PL condition

Moreover, the following expression for μ\mu hold:

defining the gradient flow (5) are locally Lipschitz continuous, hence the gradient flow is defined on a maximal interval [0,Tmax⁡)[0,T_{\max}) by the Picard-Lindelöf theorem (see Lemma 16). Let us show by contradiction that Tmax⁡=∞T_{\max}=\infty. Assume that Tmax⁡<∞T_{\max}<\infty. If this is true, again by the Picard-Lindelöf theorem, we know that the parameters diverge to infinity at Tmax⁡T_{\max}. In particular, there exist t∈(0,Tmax⁡)t\in(0,T_{\max}) and k∈{1,…,L}k\in\{1,\dots,L\} such that

Let t∗∈(0,Tmax⁡)t^{*}\in(0,T_{\max}) be the infimum of such times tt. Then, for t<t∗t<t^{*} and k∈{1,…,L}k\in\{1,\dots,L\},

and, by continuity of ALA^{L}, BLB^{L}, and ZkLZ_{k}^{L}, these inequalities also hold for t=t∗t=t^{*}. By definition, this means that the (M,μ)(M,\mu)-local PL condition is satisfied for t⩽t∗t\leqslant t^{*}, and ensures that

Therefore, by definition of the gradient flow (4),

Thus, by Grönwall’s inequality, for t⩽t∗t\leqslant t^{*},

Furthermore, by (23) and the definition of MAM_{A}, MBM_{B}, MZM_{Z}, we have, for t⩽t∗t\leqslant t^{*} and k∈{1,…,L}k\in\{1,\dots,L\},

A quick scan through the proof of Proposition 7 reveals that by similar arguments, we have, for t⩽t∗t\leqslant t^{*}, k∈{1,…,L}k\in\{1,\dots,L\}, and i∈{1,…,n}i\in\{1,\dots,n\},

where the second inequality is a consequence of the Cauchy-Schwartz inequality. Let us now bound ∥ZkL(t∗)−ZkL(0)∥\|Z_{k}^{L}(t^{*})-Z_{k}^{L}(0)\|. We have, for k∈{1,…,L}k\in\{1,\dots,L\},

since (hk−1,iL(t),ZkL(t))∈E(h_{k-1,i}^{L}(t),Z_{k}^{L}(t))\in E and ∥∂2f(h,z)∥⩽K\|\partial_{2}f(h,z)\|\leqslant K for (h,z)∈E(h,z)\in E. Therefore, by (25),

where the last inequality is a consequence of the definition of μ\mu. Similarly, by (14) and (25),

This proves statement (i)(i) of the proposition. Moreover, the analysis above show that the derivatives of ALA^{L}, ZkLZ_{k}^{L}, and BLB^{L} are bounded by a bounded integrable function independent of LL and kk. This shows (iii)(iii), together with the fact that the functions AL(t)A^{L}(t), ZkL(t)Z_{k}^{L}(t), and BL(t)B^{L}(t) admit limits as t→∞t\to\infty. Furthermore, the convergence towards their limit is uniform over LL and kk, as we show for example for AL(t)A^{L}(t). If we denote by A∞LA_{\infty}^{L} its limit, and apply the same steps as for bounding ∥AL(t∗)−AL(0)∥F\|A^{L}(t^{*})-A^{L}(0)\|_{F}, we obtain, for any t⩾0t\geqslant 0,

where the last inequality comes from the definition of μ\mu. The bound is independent of LL, proving statement (iv)(iv). Statement (v)(v) readily follows from (24).

To complete the proof, it remains to prove statement (ii)(ii) by bounding the differences ∥Zk+1L(t)−ZkL(t)∥\|Z_{k+1}^{L}(t)-Z_{k}^{L}(t)\|. Now that we know that the weights are bounded, we can follow the same steps as in the proof of Proposition 7 and show the existence of C1C_{1}, C2>0C_{2}>0 such that

where the second inequality uses the definition of μ\mu. By Grönwall’s inequality,

A.3 Generalized Arzelà–Ascoli theorem

For k∈{1,…,L−1}k\in\{1,\dots,L-1\}, ∥Zk+1L(t)−ZkL(t)∥⩽CL\|Z_{k+1}^{L}(t)-Z_{k}^{L}(t)\|\leqslant\frac{C}{L},

For k∈{1,…,L}k\in\{1,\dots,L\}, ∥ZkL(t)∥⩽C\|Z_{k}^{L}(t)\|\leqslant C and ∥dZkLdt(t)∥⩽b(t)\|\frac{dZ_{k}^{L}}{dt}(t)\|\leqslant b(t).

Note that if II is a compact interval, then the existence of a (uniformly) convergent subsequence is guaranteed by the standard Arzelà–Ascoli theorem. Indeed, the uniform equicontinuity is a consequence of assumptions (i)(i) and (ii)(ii), while (ii)(ii) provides a uniform bound. However, if II is not compact, more involved arguments are needed.

Assume, without loss of generality, that bb is also bounded by CC. According to assumption (i)(i), for t∈It\in I and i,j∈{1,…,L}i,j\in\{1,\dots,L\},

Also, according to (ii)(ii), for t,t′∈It,t^{\prime}\in I and k∈{1,…,L}k\in\{1,\dots,L\},

It follows that, for s,s′∈s,s^{\prime}\in and t,t′∈It,t^{\prime}\in I,

Therefore, with some simple algebra, we obtain

The statement of the proposition is then a consequence of the next three steps.

By considering (26) for the subsequence ϕ(L)\phi(L) and letting L→∞L\to\infty, we have that, for any s,s′∈s,s^{\prime}\in and t,t′∈It,t^{\prime}\in I,

Let ε>0\varepsilon>0, s∈s\in, and t∈It\in I. Then, by (26) and (27), it is possible to find δ>0\delta>0 such that, for any s′,s′′∈s^{\prime},s^{\prime\prime}\in and t′,t′′∈It^{\prime},t^{\prime\prime}\in I satisfying ∣s′−s′′∣⩽δ|s^{\prime}-s^{\prime\prime}|\leqslant\delta and ∣t′−t′′∣⩽δ|t^{\prime}-t^{\prime\prime}|\leqslant\delta,

Furthermore, there exists a finite set {s1,…,sS}⊂\{s_{1},\dots,s_{S}\}\subset such that

In the sequel, we denote by s∗s^{*} an element of {s1,…,sS}\{s_{1},\dots,s_{S}\} that is at distance at most δ\delta from ss.

If II is unbounded, then, by assumption (ii)(ii) and since bb is integrable, there exists some t0>0t_{0}>0 such that, for t⩾t0t\geqslant t_{0},

The same inequality holds for Zϕ\mathcal{Z}^{\phi} by letting LL tend to infinity. If II is bounded, we simply let t0=sup⁡It_{0}=\sup I.

We may then pick a finite set {t1,…,tT}⊂[0,t0]\{t_{1},\dots,t_{T}\}\subset[0,t_{0}] such that

Two cases may arise depending on the value of tt. If t∈[0,t0]t\in[0,t_{0}], then there exists an element of the set {t1,…,tT}\{t_{1},\dots,t_{T}\} at distance at most δ\delta from tt, and we denote it by t∗t^{*}. If t>t0t>t_{0}, we let t∗=t0t^{*}=t_{0}. According to (29) and (30), we then have in both cases that

To conclude, we have to bound the term ∥Zϕ(L)(s,t)−Zϕ(s,t)∥\|\mathcal{Z}^{\phi(L)}(s,t)-\mathcal{Z}^{\phi}(s,t)\| uniformly over ss and tt. We first have

where the last inequality is a consequence of (31). The last term can be bounded as follows:

by using (28) and the fact that s∗∈{s1,…,sS}s^{*}\in\{s_{1},\dots,s_{S}\}. Putting all the pieces together, we finally obtain

By taking LL large enough, independent of ss and tt, the sum of the last two terms can be made less than ε\varepsilon. Since ε\varepsilon is arbitrary, this concludes the proof. ∎

A consequence of this result is a simplified version for sequences of functions only indexed by LL and not kk, as follows.

A.4 Consistency of the Euler scheme for parameterized ODEs

Then u⌊Ls⌋Lu_{\left\lfloor Ls\right\rfloor}^{L} tends to U(s)U(s) uniformly over s∈s\in, where UU is the unique solution of the ODE

Denote by CC the uniform Lipschitz constant of g(⋅,θ)g(\cdot,\theta) for ∥θ∥⩽M\|\theta\|\leqslant M. Since g(0,⋅)≡0g(0,\cdot)\equiv 0 and g(⋅,Θ(s))g(\cdot,\Theta(s)) is CC-Lipschitz, one has

where DE=sup⁡x∈E∥x∥<∞D_{E}=\sup_{x\in E}\|x\|<\infty. A similar reasoning applies to the discrete scheme (32), using the discrete version of Grönwall’s inequality. More precisely, for any k∈{0,…,L−1}k\in\{0,\dots,L-1\},

Overall, we can consider a restriction of gg to a compact set depending only on MM, CC, and EE, which we will still denote by gg with a slight abuse of notation.Since gg is C1\mathcal{C}^{1}, it is therefore bounded and Lipschitz continuous, and we still let CC be its Lipschitz constant.

The next step is to recursively bound the size of this gap, first observing that Δ0L=∥aL−a∥\Delta_{0}^{L}=\|a^{L}-a\|. We have that

In the last inequality, we used the fact that gg is CC-Lipschitz. Since,by definition, θk+1L\theta_{k+1}^{L} = ΘL(kL−1)\Theta^{L}(\frac{k}{L-1}), we obtain, for k∈{0,…,L−1}k\in\{0,\dots,L-1\},

where CΘC_{\Theta} is the Lipschitz constant of Θ\Theta. By the discrete Grönwall’s inequality, we deduce that, for k∈{0,…,L−1}k\in\{0,\dots,L-1\},

This shows that the gaps ΔkL\Delta_{k}^{L} converge to zero uniformly over k∈{0,…,L}k\in\{0,\dots,L\} as LL tends to infinity.

We conclude by observing that, for any s∈s\in,

The results of Proposition 11 can be extended without much effort to two other related cases. First, the parameters θkL\theta_{k}^{L} may depend on some other variable tt, as long as all assumptions are verified uniformly over tt. Second, these parameters may converge to some limit parameters as both LL and tt go to infinity. This is encapsulated in the following two corollaries.

Then u⌊Ls⌋L(t)u_{\left\lfloor Ls\right\rfloor}^{L}(t) tends to U(s,t)U(s,t) uniformly over s∈s\in and t∈It\in I, where U(⋅,t)U(\cdot,t) is the unique solution of the ODE

Then u⌊Ls⌋L(t)u_{\left\lfloor Ls\right\rfloor}^{L}(t) tends to U(s)U(s) uniformly over s∈s\in as L,t→∞L,t\to\infty, where UU is the unique solution of the ODE

A.5 Large-depth convergence of the gradient flow

converges uniformly over s∈s\in and t∈It\in I to Z(s,t)\mathcal{Z}(s,t).

Uniformly over s∈s\in, t∈It\in I, and x∈Xx\in\mathcal{X}, the hidden layer h⌊Ls⌋L(t)h_{\left\lfloor Ls\right\rfloor}^{L}(t) converges to the solution at time ss of the neural ODE

Uniformly over t∈It\in I and x∈Xx\in\mathcal{X}, the output FL(x;t)F^{L}(x;t) converges to B(t)H(1,t)B(t)H(1,t).

In the remainder, we prove the uniqueness of the accumulation point (Zϕ,Aϕ,Bϕ)(Z^{\phi},A^{\phi},B^{\phi}) by showing that it is the solution of an ODE that satisfies the assumptions of the Picard-Lindelöf theorem. The statements (i)(i) to (iv)(iv) then follow easily.

Consider a general input (x,y)∈X×Y(x,y)\in\mathcal{X}\times\mathcal{Y}, and let HL(s,t)=h⌊Ls⌋L(t)H^{L}(s,t)=h_{\left\lfloor Ls\right\rfloor}^{L}(t) (recall that hkL(t)h_{k}^{L}(t) is defined by the forward propagation (12)). Corollary 12, with θkL=Zkϕ(L)\theta_{k}^{L}=Z_{k}^{\phi(L)}, Θ=Zϕ\Theta=\mathcal{Z}^{\phi}, aL=Aϕ(L)xa^{L}=A^{\phi(L)}x, g=fg=f, ensures that Hϕ(L)(s,t)H^{\phi(L)}(s,t) converges uniformly (over ss and tt) to Hϕ(s,t)H^{\phi}(s,t) that is the solution at time ss of the ODE

We now turn our attention to the backpropagation recurrence (13), which defines the backward state pkL(t)p_{k}^{L}(t). First observe that the convergence of Hϕ(L)H^{\phi(L)} implies that

The function Hϕ(⋅,t)H^{\phi}(\cdot,t) is uniformly Lipschitz continuous for t∈It\in I, as noted previously, and the same is true for Zϕ(⋅,t)Z^{\phi}(\cdot,t) since ZϕZ^{\phi} is Lipschitz continuous.

The function h⌊(ϕ(L)−1)s⌋+1ϕ(L)(t)h_{\left\lfloor(\phi(L)-1)s\right\rfloor+1}^{\phi(L)}(t) tends to Hϕ(s,t)H^{\phi}(s,t) uniformly over ss and tt, as seen in the beginning of the proof. More precisely, we know that Hϕ(L)(s,t)=h⌊ϕ(L)s⌋ϕ(L)(t)H^{\phi(L)}(s,t)=h_{\left\lfloor\phi(L)s\right\rfloor}^{\phi(L)}(t) tends to Hϕ(s,t)H^{\phi}(s,t). Simple algebra and the fact that two successive iterates of (12) are separated by a distance proportional to 1/L1/L show that both statements are equivalent. Furthermore, Zϕ(L)(s,t)\mathcal{Z}^{\phi(L)}(s,t) tends to Zϕ(s,t)\mathcal{Z}^{\phi}(s,t) uniformly over ss and tt as noted above.

The function gg is C1\mathcal{C}^{1} since ff is C2\mathcal{C}^{2}. We clearly have g(0,⋅)≡0g(0,\cdot)\equiv 0. Finally, g(⋅,(h,Z))g(\cdot,(h,Z)) is uniformly Lipschitz continuous for (h,Z)(h,Z) in any compact since ∂1f\partial_{1}f is continuous.

Overall, we obtain that Pϕ(L)(s,t)P^{\phi(L)}(s,t) converges uniformly (over ss and tt) to Pϕ(s,t)P^{\phi}(s,t), the solution at time ss of the backward ODE

The term inside π\pi can be rewritten as

Since ff is C2\mathcal{C}^{2}, ∂2f\partial_{2}f is locally Lipschitz continuous. Applying the first part of the proof to the specific case of xix_{i}, we know that Hiϕ(L)H_{i}^{\phi(L)} and Piϕ(L)P_{i}^{\phi(L)} uniformly bounded, and that Hiϕ(L)(s,t)H_{i}^{\phi(L)}(s,t) and Piϕ(L)(s,t)P_{i}^{\phi(L)}(s,t) converge uniformly to Hiϕ(s,t)H_{i}^{\phi}(s,t) and Piϕ(s,t)P_{i}^{\phi}(s,t). Therefore, the right-hand side of (37) converges uniformly over ss and tt to

A similar approach reveals that Aϕ(t)A^{\phi}(t) and Bϕ(t)B^{\phi}(t) are differentiable and that they verify the equations

which makes it a Banach space. We have to show that the mapping

is locally Lipschitz continuous with respect to this norm, where we recall that Hi(s)H_{i}(s) in (42) is the solution at time ss of the initial value problem

and Pi(s)P_{i}(s) is the solution at time ss of the initial value problem

To prove that the mapping (42) is locally Lipschitz continuous, we first check that it is well defined. Since Z\mathcal{Z} is assumed to be only bounded (and not continuous), the solutions of the initial value problems (43) and (44) are well defined in the sense of the Caratheodory conditions, which are given in Lemma 17.

The norm inside the integral can be bounded by

Using Grönwall’s inequality, we obtain, for any s∈s\in,

This shows that the function (Z,A,B)↦Hi(\mathcal{Z},A,B)\mapsto H_{i} is locally Lipschitz continuous. One proves by similar arguments that the function (Z,A,B)↦Pi(\mathcal{Z},A,B)\mapsto P_{i} is locally Lipschitz continuous. Thus, overall, the mapping (42) is locally Lipschitz continuous as a composition of locally Lipschitz continuous functions.

The uniform convergence of (ZL,AL,BL)(\mathcal{Z}^{L},A^{L},B^{L}) to (Z,A,B)(\mathcal{Z},A,B) is then easily shown by contradiction. Suppose that uniform convergence does not hold. If this is true, then there exists a subsequence that stays at distance ε>0\varepsilon>0 from (Z,A,B)(\mathcal{Z},A,B) (in the sense of the uniform norm). Then arguments similar to the beginning of the proof show the existence of a second accumulation point, which is a contradiction. This shows the uniform convergence, yielding statements (i)(i) and (ii)(ii) of the theorem.

Finally, reapplying Corollary 12 with θkL=ZkL\theta_{k}^{L}=Z_{k}^{L}, Θ=Z\Theta=\mathcal{Z}, aL=ALxa^{L}=A^{L}x, g=fg=f, completes the proof by proving statements (iii)(iii) and (iv)(iv). ∎

Interestingly, the proof of Theorem 14 provides us with an explicit description of the evolution of the continuous-depth limiting weights during training. With the notation of the proof, the continuous weights satisfy the training dynamics:

where we recall that Hi(s,t)H_{i}(s,t) is the solution at time ss of the initial value problem

and Pi(s,t)P_{i}(s,t) is the solution at time ss of the problem

These equations can be thought of as the continuous-depth equivalent of the backpropagation equations.

A.6 Existence of the double limit when L,t𝐿𝑡L,t tend to infinity

Consider the residual network (12), and assume that:

Then the following four statements hold as tt and LL tend to infinity:

Uniformly over s∈s\in and x∈Xx\in\mathcal{X}, the hidden layer h⌊Ls⌋L(t)h_{\left\lfloor Ls\right\rfloor}^{L}(t) converges to the solution at time ss of the ODE

Uniformly over x∈Xx\in\mathcal{X}, the output FL(x;t)F^{L}(x;t) converges to F∞(x)=B∞H(1)F_{\infty}(x)=B_{\infty}H(1). Furthermore, F∞(xi)=yiF_{\infty}(x_{i})=y_{i} for i∈{1,…,n}i\in\{1,\dots,n\}.

The existence of limits A∞A_{\infty} and B∞B_{\infty} to AL(t)A^{L}(t) and BL(t)B^{L}(t) as LL and tt tend to infinity is given by Lemma 19. The same argument applies to Z⌊sL⌋L(t)Z_{\left\lfloor sL\right\rfloor}^{L}(t), which provides a limit Z∞(s)\mathcal{Z}_{\infty}(s) to the sequence. Furthermore, following the proof of the lemma, we see that the convergence of Z⌊sL⌋L(t)Z_{\left\lfloor sL\right\rfloor}^{L}(t) to Z∞(s)\mathcal{Z}_{\infty}(s) is uniform over s∈s\in. Corollary 13, applied with θkL=ZkL\theta_{k}^{L}=Z_{k}^{L}, Θ∞=Z∞\Theta_{\infty}=\mathcal{Z}_{\infty}, aL=ALxa^{L}=A^{L}x, g=fg=f, then ensures that h⌊Ls⌋L(t)h_{\left\lfloor Ls\right\rfloor}^{L}(t) converges uniformly (over s∈s\in and x∈Xx\in\mathcal{X}) to H(s)H(s) that is the solution at time ss of (45), as LL and tt tend to infinity. As a consequence, FL(x;t)F^{L}(x;t) converges uniformly over xx to F∞(x)F_{\infty}(x) as L,t→∞L,t\to\infty. Furthermore, recall that

The left-hand side converges as L,t→∞L,t\to\infty to by assumption of the proposition, while the right-hand side converges to

Therefore, F∞(xi)=yiF_{\infty}(x_{i})=y_{i} for i∈{1,…,n}i\in\{1,\dots,n\}, and the proof is complete. ∎

Appendix B Proofs of the results of the main paper

In this section, we prove the results of the main paper. Most of these results follow from those presented in Section A. The only substantial proof is that of Proposition 5, which shows the local PL condition. It uses a result of Nguyen & Mondelli (2020) involving the Hermite transform and the sub-Gaussian variance proxy, which we define briefly. We refer to Debnath & Bhatta (2014, Chapter 17) and Vershynin (2018, Sections 2.5.2 and 3.4.1), respectively, for more detailed explanations.

The rr-th normalized probabilist’s Hermite polynomial is given by

This family of polynomials forms an orthonormal basis of square-integrable functions for the inner product

Therefore, any function σ\sigma such that 12π∫−∞∞σ2(x)e−x2/2dx<∞\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}\sigma^{2}(x)e^{-x^{2}/2}dx<\infty can be decomposed on this basis. The rr-th coefficient of this decomposition is denoted by ηr(σ)\eta_{r}(\sigma).

For a matrix AA, we let smin⁡s_{\min} and smax⁡s_{\max} its minimum and maximum singular values, and similarly, λmin⁡\lambda_{\min} and λmax⁡\lambda_{\max} its minimum and maximum eigenvalues (whenever they exist).

Before delving into the proofs, we briefly describe the parts of this section that make use of the specific model (3). The most important one is the proof of Proposition 5, i.e., the proof that the residual network satisfies the (M,μ)(M,\mu)-local PL condition. Additionally, in the proof of Proposition 3, the expressions for MM and KK are valid only for the specific model (3). Finally, in the proof of Theorem 6, the beginning of the proof reveals that condition (22) of Proposition 8 on μ\mu can be expressed as a condition on the norm of the labels yiy_{i}. This applies only to the specific model (3). Observe that, if one assumes that the general residual network of Section A satisfies the (M,μ)(M,\mu)-local PL condition with μ\mu given by (22), then the rest of the proof of Theorem 6 unfolds, and the conclusions of the theorem hold for the general model.

B.1 Proof of Proposition 1

Proposition 1 is a consequence of Proposition 7 with f(h,(V,W))=1mVσ(1qWh)f(h,(V,W))=\frac{1}{\sqrt{m}}V\sigma(\frac{1}{\sqrt{q}}Wh).

B.2 Proof of Proposition 2

Proposition 11, with θkL=(VkL,WkL)\theta_{k}^{L}=(V_{k}^{L},W_{k}^{L}), Θ=(V,W)\Theta=(\mathcal{V},\mathcal{W}), aL=Axa^{L}=Ax, g(h,(V,W))=1mVσ(1qWh)g(h,(V,W))=\frac{1}{\sqrt{m}}V\sigma(\frac{1}{\sqrt{q}}Wh), gives the existence and uniqueness of the solution of the neural ODE (6). Moreover, inspecting the proof of Proposition 11, equations (35) gives that, for any input x∈Xx\in\mathcal{X}, the difference between the last hidden layer hLLh_{L}^{L} of the discrete residual network (3) and its continuous counterpart H(1)H(1) in the neural ODE (6) is bounded by

where C′>0C^{\prime}>0 is independent of LL and x∈Xx\in\mathcal{X}, and ΘL(s)=θ⌊(L−1)s⌋+1L\Theta^{L}(s)=\theta_{\left\lfloor(L-1)s\right\rfloor+1}^{L}. The function ΘL\Theta^{L} is a piecewise-constant interpolation of Θ\Theta with pieces of length 1L−1\frac{1}{L-1}. Since Θ\Theta is Lipschitz continuous, the distance between Θ\Theta and ΘL\Theta^{L} decreases as \nicefracC′′L\nicefrac{{C^{\prime\prime}}}{{L}} for some C′′>0C^{\prime\prime}>0 depending on Θ\Theta but not on LL. This yields ∥hLL−H(1)∥⩽C′(1++C′′)L\|h_{L}^{L}-H(1)\|\leqslant\frac{C^{\prime}(1++C^{\prime\prime})}{L}, where C′C^{\prime} and C′′C^{\prime\prime} are independent of LL and x∈Xx\in\mathcal{X}. Since FL(x)=BhLLF^{L}(x)=Bh_{L}^{L} and F(x)=BH(1)F(x)=BH(1), the result is proven.

B.3 Proof of Proposition 3

Furthermore, due to our initialization scheme described in Section 3,

B.4 Proof of Theorem 4

B.5 Proof of Proposition 5

Now that we have introduced the necessary notation, we can proceed to prove some preliminary estimates. Since M⩽12⩽2qmM\leqslant\frac{1}{2}\leqslant\sqrt{2qm}, we have, for k∈{1,…,n}k\in\{1,\dots,n\},

By Lemma 20, with probability at least 1-\exp\big{(}-\frac{qm}{16}\big{)}, one has ∥Wˉ∥F⩽2qm\|\bar{W}\|_{F}\leqslant\sqrt{2qm}. Together with the previous inequalities, this implies

where the second inequality is a consequence of Lemma 18, as follows:

Let us now bound ∥hk∥F\|\mathbf{h}_{k}\|_{F} and ∥pk∥F\|\mathbf{p}_{k}\|_{F}. We have

Moreover, by (46), for any k∈{0,…,L−1}k\in\{0,\dots,L-1\},

where the second inequality is a consequence of (48). Therefore, by (49),

Moving on to ∥pk∥F\|\mathbf{p}_{k}\|_{F}, the chain rule leads to

where ⊙\odot denotes the element-wise product. Noting that ∣σ′∣⩽Kσ|\sigma^{\prime}|\leqslant K_{\sigma} and using (48), we obtain

It follows that ∥pk∥F⩾exp⁡(−22Kσ)∥pL∥F\|\mathbf{p}_{k}\|_{F}\geqslant\exp(-2\sqrt{2}K_{\sigma})\|\mathbf{p}_{L}\|_{F}. In addition,

Therefore, by Lemma 18, since d′⩽qd^{\prime}\leqslant q,

Collecting bounds, we conclude that, for k∈{0,…,L}k\in\{0,\dots,L\},

A similar proof reveals that, for k∈{0,…,L}k\in\{0,\dots,L\},

As a consequence, when m⩾nm\geqslant n, by Lemma 18,

by (47) and by definition of MM. Putting together the two bounds above as well as (47), (48), and (50), we obtain

where C1=Kσexp⁡(22Kσ)C_{1}=K_{\sigma}\exp(2\sqrt{2}K_{\sigma}) and C2=128C1KσC_{2}=128C_{1}K_{\sigma}. Thus, when C1n⩽132mηr(σ)C_{1}\sqrt{n}\leqslant\frac{1}{32}\sqrt{m}\eta_{r}(\sigma), we have

for k⩽Lηr(σ)C2nqk\leqslant\frac{L\eta_{r}(\sigma)}{C_{2}\sqrt{nq}}. As a consequence, for k⩽Lηr(σ)C2nqk\leqslant\frac{L\eta_{r}(\sigma)}{C_{2}\sqrt{nq}}, returning to (52),

letting C3=exp⁡(−22Kσ)8C_{3}=\frac{\exp(-2\sqrt{2}K_{\sigma})}{8}. Therefore,

where we used the inequality ⌊x⌋⩾x/2\lfloor x\rfloor\geqslant x/2 for x⩾1x\geqslant 1. This proves the result, with

With appropriate values of rr and mm, the probability of failure δ\delta can be made as small as

for any ε>0\varepsilon>0. This is possible first by choosing rr such that 2/r⩾ε2/r\geqslant\varepsilon, then by choosing mm such that the first two terms are less than ε\varepsilon. Moreover, we refer the interested reader to Goel et al. (2020, Lemmas A.2 and A.9) for quantitative estimates of ηr(σ)\eta_{r}(\sigma) for ReLU and sigmoid activations. Finally, the expression (53) is essentially the same as the one appearing in Nguyen & Mondelli (2020, Theorem 3.3). As in this paper, we note that this expression is small if nn grows at most polynomially with dd, in which case the exponential term in dd dominates the polynomial term in nn.

B.6 Proof of Theorem 6

By Proposition 5, there exists δ>0\delta>0 such that, with probability at least 1−δ1-\delta, the residual network (3) satisfies the (M,μ)(M,\mu)-local PL condition around its initialization, with

A close examination of the quantities involved in the definition of CC reveals that it depends only on X\mathcal{X}, σ\sigma, nn, and qq. In particular, it does not depend on the dimension mm.

Appendix C Some technical lemmas

We start by recalling the Picard-Lindelöf theorem (see, e.g., Luk, 2017, for a self-contained presentation, and Arnold, 1992, for a textbook).

The next lemma gives conditions for the existence and uniqueness of the global solution of the initial value problem (54) when the assumption of continuity of gg in its second variable is removed, thereby generalizing the Picard-Lindelöf theorem.

Hence, by Grönwall’s inequality, for s⩽s∗s\leqslant s^{*},

Thus, ∥U∗∥⩽∥U0∥exp⁡(C)\|U^{*}\|\leqslant\|U_{0}\|\exp(C), which is impossible. Hence the maximal solution of the restricted problem is defined on $.Furthermore,themaximalsolutionoftheoriginalproblemcoincideswiththerestrictedonewhenever. Furthermore, the maximal solution of the original problem coincides with the restricted one wheneverU(s)\in D,whichisthecaseforevery, which is the case for everys\in,hencethemaximalsolutionisdefinedon, hence the maximal solution is defined on$. ∎

The next three lemmas recall well-known results from linear algebra, analysis, and random matrix theory. Recall that smin⁡s_{\min} and λmin⁡\lambda_{\min} denote respectively the minimum singular value and eigenvalue of a matrix.

If m⩾rm\geqslant r, then ∥AB∥F⩾smin⁡(A)∥B∥F\|AB\|_{F}\geqslant s_{\min}(A)\|B\|_{F}. Furthermore, if n⩾rn\geqslant r, then ∥AB∥F⩾∥A∥Fsmin⁡(B)\|AB\|_{F}\geqslant\|A\|_{F}s_{\min}(B).

The first statement is a consequence of, e.g., Loyka (2015), which establishes that smin⁡(A+A′)⩾smin⁡(A)−smax⁡(A′)s_{\min}(A+A^{\prime})\geqslant s_{\min}(A)-s_{\max}(A^{\prime}), yielding the first inequality since smax⁡(A′)=∥A∥2⩽∥A∥Fs_{\max}(A^{\prime})=\|A\|_{2}\leqslant\|A\|_{F}. As for the second one, we have

Since m⩾rm\geqslant r, the rightmost quantity is equal to smin⁡(A)∥B∥Fs_{\min}(A)\|B\|_{F}, proving the second statement of the lemma. The third statement is similar. ∎

Hence, for x1,x2>x0x_{1},x_{2}>x_{0} and y1,y2>y0y_{1},y_{2}>y_{0},

The quantity ∥W∥F2\|W\|_{F}^{2} follows a chi-squared distribution with qmqm degrees of freedom. Hence, according to Laurent & Massart (2000, Lemma 1), for x⩾0x\geqslant 0,

Taking x=(MW2−1)qm16x=\frac{(M_{W}^{2}-1)qm}{16}, we see that

where the bound follows from MW⩾2M_{W}\geqslant\sqrt{2}. Since furthermore 2x⩽12(MW2−1)qm2x\leqslant\frac{1}{2}(M_{W}^{2}-1)qm, we obtain

Finally, the last lemma of the section gives a lower bound on the smallest singular value of a matrix of the form σ(A)\sigma(A), where σ\sigma is a bounded function applied element-wise and AA belongs to a family of random matrix. The lower bound involves the Hermite transform of σ\sigma, which is defined in Section B.

where CC is the sub-Gaussian variance proxy of the columns of dX\sqrt{d}X.

Denoting by wiw_{i} the ii-th row of WW and letting

our goal is to lower bound the smallest eigenvalue value λmin⁡(M)\lambda_{\min}(M) of M=∑i=1mMiM=\sum_{i=1}^{m}M_{i}. Observe that

Appendix D Counter-example for the ReLU case.

This section gives a proof sketch to illustrate that, with the ReLU activation σ:x↦max⁡(0,x)\sigma:x\mapsto\max(0,x), the smoothness of the weights can be lost during training. More precisely, we show a case where successive weights are at distance O(1L)\mathcal{O}(\frac{1}{L}) at initialization and at distance Ω(1)\Omega(1) after training.

As a consequence, the gradient flow equation for the even layers is, for k∈{1,…,L}k\in\{1,\dots,L\},

Due to the symmetry of these equations for k∈{1,…,L}k\in\{1,\dots,L\} and the fact that all the w2k(0)w_{2k}(0) are equal, the parameters on each even layer coincide at all times and are equal to w(t)w(t) such that

An analysis of this ODE reveals that w(t)w(t) tends as t→∞t\to\infty to w⋆>0w^{\star}>0 satisfying that

This can be seen by letting y(t)=C−(1+w(t)2L)Ly(t)=C-(1+\frac{w(t)}{2L})^{L}, and applying Grönwall’s inequality to yy. Therefore, as t→∞t\to\infty, one has w2k+1(t)→−12Lw_{2k+1}(t)\to-\frac{1}{2L} and w2k(t)→w⋆w_{2k}(t)\to w^{\star}, where (56) implies that w⋆⩾2log⁡(C)w^{\star}\geqslant 2\log(C). This shows that the final weights are not smooth in the sense that the distance between two successive weights is Ω(1)\Omega(1).

This result contrasts sharply with Proposition 7, which shows that successive weights remain at a distance O(1L)\mathcal{O}(\frac{1}{L}) throughout training, when initialized as a discretization of a Lipschitz continuous function, and with a smooth activation function. In fact, Proposition 7 can be generalized to any initialization such that successive weights are at distance O(1L)\mathcal{O}(\frac{1}{L}) at initialization, which is the case in the counter-example. This means that the only broken assumption in our counter-example is the non-smoothness of the activation function. This non-smoothness causes the gradient flow dynamics for two successive weights to deviate, even though the weights are initially close to each other, because they are separated by the kink of ReLU at zero.

Appendix E Experimental details

We take n=100n=100, d=16d=16, m=32m=32. We train for 500500 iterations, and set the learning rate to L×10−2L\times 10^{-2}. The scaling of the learning rate with LL is the equivalent of the LL factor in the gradient flow (4).

We take n=50n=50, d=16d=16, m=64m=64, L=64L=64, and train for 80,00080{,}000 iterations with a learning rate of 5L×10−35L\times 10^{-3}.

We take L=256L=256. The first layer is a trainable convolutional layer with a kernel size of 5×55\times 5, a stride of 22, a padding of 11, and 1616 out channels. We then iterate the residual layers