Machine Learning from a Continuous Viewpoint
Weinan E, Chao Ma, Lei Wu
Introduction
We present a continuous formulation of machine learning. As usual this continuous formulation consists of three components: a representation of functions, a loss functional and a training dynamics. For representations of functions, we will discuss the integral transform-based models and the more advanced flow-based models. For the loss functional, we give examples that arise in supervised and unsupervised learning, as well as examples from calculus of variations and partial differential equations (PDEs). For training dynamics, we divide the unknown parameters into two classes: conserved and non-conserved. For non-conserved parameters, we use what is known in the physics literature as the model A dynamics , namely gradient flow in the usual metric. For conserved parameters, we use what is known as the model B dynamics , namely the gradient flow in the Wasserstein metric .
In this framework, machine learning becomes a calculus of variations or PDE-like problem, and different numerical algorithms can be used to discretize these continuous models. In particular, two-layer neural network and deep residual neural network (ResNet) models can be recovered, in a scaled form, when the particle method is applied to particular versions of the integral transform-based and flow-based models respectively. New machine learning models and algorithms can also be constructed using this continuous framework. As examples we will discuss a new flow-based random feature model, a new class of transform-based model, smoothed particle methods and spectral methods.
In addition to recovering existing machine learning models and constructing new ones, this continuous framework is also useful for the theoretical understanding of machine learning. We conjecture that the at least for standard supervised learning, the variational problems that arise from minimizing the population and empirical risks are nice variational problems in this continuous formulation, though the precise meaning of this remains to be clarified. Thus, the training models are some versions of the gradient flow of a reasonably nice functional. Hence it is not surprising that stable numerical discretizations of these continuous models perform well. In particular, this continuous viewpoint suggests that over-parametrized models should behave better since they give rise to more accurate discretizations of the continuous gradient flow. The behavior of the training algorithm should follow more closely the behavior of the continuous gradient flow. This viewpoint also suggests that one should expect trouble for very deep fully connected neural network models (which are not ResNets) since they do not have continuum limits. In fact, they suffer from numerical instabilities in the form of exploding gradients .
This work builds upon previous work. In particular, various components of this continuous framework have already appeared in the following set of works.
Continuous differential equation formulation of machine learning .
The work on the integral representations of shallow neural networks .
Mean field analysis of (stochastic) gradient descent for two-layer neural networks and multi-layer fully connected networks .
Also related are the work in . The work presented here is a natural extension of these ideas. However, the present paper is the first that systematically explores the continuous viewpoint.
Philosophically the approach advocated here bears a lot of similarity to that of the PDE-type models in image processing, such as the Mumford-Shah model or the Rudin-Osher-Fatemi model . There the idea is to first formulate a continuous variational problem that presumably represents the “first principle” for the particular image processing task such as image denoising, and then discretize that continuous problem to obtain a specific algorithm. This is in contrast to the more traditional approach in image processing in which different types of filters or algorithms are applied directly to the image, without the need to formulate the underlying mathematical problem first. This latter approach resembles the current practice in machine learning in which different algorithms are applied directly to the given dataset.
Despite its unprecedented successes across a wide spectrum of applications, machine learning still remains to be unsatisfactory as a scientific discipline. The main problem is the lack of fundamental guiding principles for designing machine learning models and algorithms and understanding their performance. Many of the techniques used in practice are still quite ad hoc, and require heavy parameter tuning. Often times the performance of these models is quite fragile and sensitive to the choice of the hyper-parameters.
The situation is reminiscent of what happened during the 1950’s when finite difference and finite element methods were just invented and used to solve PDEs. The performance of the algorithms were found to be sensitive to the particular discretization schemes and particular finite element meshes used. Some seemingly reasonable schemes simply did not run, since they quickly led to overflow on the computer. Some schemes performed reasonably well on coarse grids but blowed up upon refining grids.
Efforts for building a theoretical foundation for these finite difference and finite element methods did not go smoothly either. For example, to explain the overflow phenomenon often encountered in practice, different stability concepts and criteria were proposed . Some were easy to use in practice, but were not robust under perturbations. One such example was the concept of weak stability . Some were more robust but difficult to use in practice. It took a while for the numerical analysis community to finally settle down on the right concepts and criteria . But after all the dusts were settled, what emerged was a solid and reasonably simple picture about the basic concepts and principles behind the designing and understanding of these algorithms .
Our current work is very much motivated by the same objective, namely to develop a reasonably simple and transparent framework for machine learning. However, there is a key difference between machine learning and classical numerical analysis: While classical numerical analysis is mainly concerned with problems in low dimension, machine learning has to face problems in very high dimensions. In fact, our interest is really on machine learning models and algorithms that can overcome “the curse of dimensionality”. While the exact meaning of this terminology requires qualification, the dimensionality issue is certainly among the most important considerations in developing machine learning models and machine learning theory today. In fact, one can roughly divide all machine learning models into two categories: The ones that do suffer from the curse of dimensionality and the ones that do not. We refer to for a discussion on this.
One important class of algorithms that do not suffer from the curse of dimensionality problem are the Monte Carlo algorithms for numerical integration. In this case, one can establish simple dimension-independent error rates. In contrast, grid-based numerical integration methods such as Simpson’s rule do not share this property. Indeed, their performance deteriorates rapidly as the dimensionality goes up.
This example has some important consequences on the formulation that we will present:
We will focus on ways of representing functions as expectations, since there are algorithms for computing expectations with dimension-independent error rates.
For the same reason, particle methods stand out for the training dynamics since they are the analog of Monte Carlo methods for dynamic problems.
There are important aspects of machine learning that cannot be easily formulated at the continuous level. One example is the stochastic gradient descent algorithm.
Representations of functions
We are mainly interested in representations that are potentially effective in high dimensions. Therefore we will focus on the ones that can be expressed as expectations. As an example, instead of the Fourier representation:
where the sum is performed on a regular grid in the Fourier space. It is well-known that this kind of grid-based approximations satisfies
where and are fixed quantities depending on . The appearance of in the exponent of signals the curse of dimensionality. In contrast, for (2), by independently sample from , we obtain an approximation to with a dimension-independent error rate:
where .
From an algorithmic viewpoint, (1) is typically associated with non-adaptive discretizations such as the spectral method or the ridglets and curvelets used in signal processing . We will see later that the forms (2) and (5) are closely associated with the random feature model and the two-layer neural network model. In fact one can write
where is defined by . This is a two-layer neural network with activation function .
The original ridgelet transform representation is as follows
This representation is better suited for high dimensional situations. More generally, one can also use:
High co-dimensional representation
Ridgelet transforms express function in terms of superpositions of ridge-like structures which are co-dimension one objects. One can also refine this representation, using structures of high co-dimension. For example, the following representation uses co-dimension 2 objects:
where , and are two nonlinear scalar functions.
More generally, we can consider functions of the form
where and . Note that (6) and (2.1) are both special cases of the representation above.
Compositional structure
The representations discussed above correspond to neural network models with one hidden layer. It can be straightforwardly extended to include more hidden layers using a compositional structure. An example with two hidden layers is given by:
Another way to construct compositional structures is as follows:
2 Flow-based representation
In the flow-based representation, the trial functions are generated by the flow map of a (continuous) dynamical system:
The flow-map at time is defined as the map: . More generally, one can allow a change of dimension between and :
The set of functions that can be generated this way depend on how we choose . One natural way is to use the representation discussed above, e.g.
Here is a family of probability distributions parametrized by . This gives us the flow:
If we compare the models in (14) and (15) with the model proposed originally in :
we see that (17) is the special case of (15) with .
However, as we learn from the work of , the more general representation in (14) and (15) is needed in order to capture the continuum limit of residual neural networks.
The optimization problem
The next step is to formulate the loss function that will be used in order to turn the problem into an optimization problem. In the continuous setting, these optimization problems are calculus of variations problems. Here we will discuss four examples of machine learning tasks.
In the following we will use to denote generically the set of parameters that occur in the representation. For example, for (6), we have .
In supervised learning, our objective is to find the best approximation of some target function that minimizes the so-called population risk:
Here is a probability distribution. (18) is the loss function. Obviously one can also define other loss functions by replacing the square function by some other convex functions with the global minimum at the origin. The general form of loss function is given by:
In reality, we are only given partial information about and through a finite sample: where is the label for . Therefore in practice we have to work instead with the “empirical risk”:
2 Dimension reduction
This is the analog of the population risk. Again in practice, one has to work with the empirical risk, defined by:
3 Calculus of variations
where is the complex conjugate of . This energy can also be rewritten as
where is the probability distribution defined by:
serves as the analog of the population risk.
In these problems, one typically attempts to compute accurately by producing sufficient number of samples from the distribution . This means that one attempts to work directly with the population risk in these problems. In practice, however, there is an issue that the errors in the approximation of may interact with the errors in the sampling. This issue has not been systematically investigated yet.
4 Nonlinear parabolic PDEs
An important application of machine learning is the numerical solution of high dimensional PDEs . Formulating these PDEs as variational problems is an important step in formulating machine learning based algorithms. In principle, one can always use the “least square” approach, as was done in . But better performance can be achieved if more sophisticated formulations are used.
with the terminal condition . Among other things, this kinds of PDEs arise in option pricing with default risk or other nonlinear effects taken into account.
It can be shown that this PDE problem is equivalent to the following variational problem
The constraints are backward stochastic differential equations (BSDE) . This was the starting point of the “Deep BSDE method” proposed in .
Analyzing these variational problems is a major task in the mathematical theory of machine learning.
From now on we will focus on the supervised learning problem.
Gradient flows
The third component in machine learning is an algorithm for solving the optimization problem. In this section, we will discuss various gradient flow dynamics for the population or empirical risk. For simplicity we focus on the following loss functional
We first discuss gradient flows using a physics language . The loss functions or functionals defined above serve as the “free energy” of the problem.
To begin with, we need to distinguish conserved and non-conserved “order parameters”. The coefficient in (6) is non-conserved. The probability distributions or are obviously conserved.
First, let us examine the situation with the representation (6). Let be the loss functional. Denote by and the formal variational derivative of with respect to and respectively, under the standard metric. The gradient flow for is simply given by
In the physics literature, this is known as the “model A” dynamics .
The gradient flow for is given by a continuity equation:
where the current is given by:
This is known as the “model B” dynamics and is known as the “chemical potential”.
It is well-known that the model B dynamics is also the gradient flow under the 2-Wasserstein metric .
For flow-based models, the parameters and are themselves one-parameter families of coefficients or probability distributions respectively: . Given a functional , a natural extension of the gradient flow to is given by:
Note that the varitional derivatives and appeared above are not well-defined, since is the integral of the influences of and from to . So strictly speaking, these derivatives are infinitesimal quantities. In section 4.3 and 4.4, we will provide rigorous forms of these equations.
The chemical potential for this functional is given by
The model B gradient flow in this case is given by
This is nothing but the “mean field” limit of the gradient descent dynamics for two-layer neural networks .
Example 2: An example of non-conserved parameter
with being fixed. The variational derivative of (28) with respect to is given by
This is the continuous version of the gradient flow for random feature models.
2 Pontryagin’s maximum principle for flow-based models
Consider a general flow-based model with given by the following ODE,
Minimizing the risk subject to the dynamics defined by (32) is a control problem where are the states and the parameters serve as the control. Naturally we will borrow concepts from control theory. To simplify the statement of the results, we define the following quantity:
Following the convention in control theory, we call the state, co-state and the Hamiltonian, respectively.
The Pontryagin’s maximum principle (PMP). This is a necessary condition for the optimal solutions of control problem . In the current case, let be a global minimum of the risk functional. Then it must satisfy
where for each , is given by the Hamiltonian dynamics:
Note that the dynamics of the state is forward in time from to , whereas the dynamics of the co-state is backward in time from to . We refer the reader to for the proof and more discussions.
3 Flow-based random feature model
First a remark about notation. We will use to denote the time for the gradient flow, and to denote the “time” used to define the flow-based models.
In this case, the Hamiltonian is given by
where satisfies the following Hamiltonian dynamics,
The variational derivative of the loss functional is given by
Obviously, the co-state satisfies the following backward ODE,
Using the definition of , it is easy to verify that and satisfy the dynamic equations stated above. ∎
The gradient flow of the flow-based random feature model (37) is given by
where and are the state and co-state at time generated by through Eqn. (39).
Note that for each value of , there is a gradient flow equation for . The coupling between different values of ’s is through the Eqn. (39).
Assume that is continuous with respect to , and there is a constant such that . Moreover, assume that the family has the universal approximation property, namely any continuous function can be uniformly approximated by functions of the form .
By definition, the following holds for any
Therefore, for any we have
From the universal approximation property, we obtain
The assumption implies that and . By the Picard-Lindelof theorem, the solution of ODE (51) is unique. Since , the mapping is non-degenerate. Therefore, can represent any continuous function of . Hence, the following holds for any continuous function
The proposition above is concerned with the stationary points of the loss functional. We now turn to the stationary points of the gradient flow.
Assume that and is absolute continuous with respect to the Lebesgue measure on . Moreover, assume that has a continuous, positive density on .
The dissipation of the gradient flow (50) is given by
We first show that is continuous with respect to . Let be the solution of (39). By definition, we have for any ,
This implies that is uniformly bounded. Therefore, we have
Since is continuous with respect to and has full support, we have for all .
4 Gradient flow for the flow-based neural networks
To derive the gradient flow for (28), we first need to define the parameter space appropriately. Denote by , the space of all feasible parameters. For any , consider the following metric:
where is the 2-Wasserstein distance. In this case, the Hamiltonian is given by
The gradient flow in the metric space for the objective function (28) is given by
and for each , satisfies
For this gradient flow, the energy dissipation relation is given by
Moreover, from the definition of , it is easy to see that
Plugging the above equation into Eqn. (4.4) leads to
Now we turn to the derivation of the gradient flow, defined as the limit of the generalized minimizing movements (GMM) scheme :
The limit of the above is exactly the 2-Wasserstein gradient flow for minimizing . This gives us
Lastly, taking expectation with respect to , we complete the proof. ∎
To make this argument rigorous, we need to establish the existence and uniqueness of the limit of GMM (72). This is a lengthy but straightforward argument. We will leave the details to interested reader.
Similar results have also been independently obtained in .
Discretizations
There are two kinds of discretization: discretization in the real space for the probability distribution and discretization in the parameter space for the variational problem and the flow. The discretization in the real space is relatively straightforward for a typical supervised or unsupervised learning problem. For problems in reinforcement learning or solving PDEs, this can be more tricky. However, we will skip this issue here and leave it for future work. Instead, we will focus on the discretization in the parameter space.
There are also two levels of discretization: One can either discretize the variational problem for the loss function and use one’s favorite optimization algorithm on the discretized problem, or one can discretize the continuous integral-differential equation for the training dynamics. We will focus on the latter.
Consider the functions admitting the following expectation representation,
The corresponding gradient flow is given by
where is the velocity field given by
Let us consider the simplest particle method discretization of the model (73) and the gradient flow (74). We approximate by
Here is the number of particles, and are the particles. In this approximation, the evolution of will be completely determined by the particles.
First, the function represented by is given by
where is a test function. Plugging (76) into the above equation, we get
Therefore, the dynamics of the particles follows
If we taking with , the particle method discretization is given by
This is the the (continuous time) gradient descent dynamics for the scaled (i.e. with the factor in front of the expression for ) two layer neural network model.
It can be shown that the dynamics described above is exactly the same as that of the GD for scaled two-layer neural networks. In fact, we have:
Given a set of initial data . The solution of (74) with initial data is given by
where solves the following systems of ODEs:
In particular, this lemma says that the continuous flow equation (74) also holds for the discrete case with a finite set of neurons.
2 A smoothed particle method
A popular modification of the particle method is the smoothed particle method. Here we illustrate how one can formulate the smoothed particle method for the integral transform-based model (73) and the gradient flow (74). We will consider the special case when . Here and is the ReLU activation function.
Consider a smoothed particle approximation to This also coincides with the Gaussian mixture approximation suggested by Jianfeng Lu.
where is the probability density function of . The smoothed particle discretization of the flow-based model and the gradient flow is given by
where . The right hand side of the last equality is the smoothed velocity.
For this to be a practical numerical algorithm, we need a way to evaluate the terms in (5.2) and (83). We will defer this to a future publication. To get some insight about the nature of this smooth particle method, we consider the special case when the data lies on the sphere, i.e. .
where in the last equation we have used the assumption that . Define a new activation function
where are the probability density and cumulative density functions of the standard normal distribution, respectively. Then the discretized model can be rewritten as
From Eqn. (75) and (83), we see that the evolution of particles follows
This is exactly the gradient descent dynamics for the two-layer smoothed ReLU network (86).
It should be noted that the dominate term in (5.2) is exactly the activation function Gaussian Error Linear Unit (GELU) , which has become quite popular recently .
3 A new algorithm for integral transform-based models
We now view both and as parameters.
It is tricky to design a particle method for the combined model A and model B dynamics for this problem (29) and (30). Therefore we consider instead the modified ”gradient flow”:
Let . For each particle , define two quantities:
Denote by . Then the function represented by and is given by
It is now straightforward to derive the dynamics for the particle method:
where are randomly drawn from .
The results for this experiment are reported in Figure 2. Figure 2 shows that for both target functions, the testing errors decrease nicely in the rate during the training process.
The generalization error
Let denote the spaces of functions represented by the continuous and discretized model, respectively. Here denotes the number of grid points or particles in the discretization. Let denote the training set and . Denote by the solution generated by the gradient descent dynamics at time , and let
One way to address the generalization problem is to look for an estimate of the following type
where is some norm of the target function.
There are two ways to obtain estimates of the type in (100). One is through the a priori estimates of the discretized gradient descent dynamics. The other is through the a priori estimates of the gradient flow, i.e. the PDEs. In the following, we illustrate both approaches using the random feature model. We recover results proved in with simpler arguments.
Assume that the target function is given by
where is a fixed probability distribution. Assume that . The RKHS norm of is given by
The particle method discretization is given by
The subtlety of the problem can be appreciated from the work of which shows that the generalization error of this model can be very large in the regime where .
1 Analyzing the discretized model
We decompose the generalization error into two terms:
Here are the optimization (training) error and generalization gap, respectively.
The general philosophy is that the generalization gap is bounded by a term of the form . Here is some norm determined by the model. For example, for random feature models, this is the RKHS norm. For two-layer neural network models, this is the Barron norm . Therefore to estimate the generalization gap, one needs to derive a priori bounds on these norms.
Since is convex, we have . So , i.e.
The first inequality gives a bound on the training error. The second inequality provides a bound for the norm of the parameters.
Using (103) and the Rademacher complexity bound for the generalization gap (see Eqn. (93-95) in ), we have the following i estimates.
For any , with probability over the training examples, we have
Let and . By Cauchy-Schwarz inequality, and . Hence, is -Lipschitz continuous. Then by the contraction property of Rademacher complexity, we have
where the last inequality follows from the fact that . Hence, with probability we have for any satisfying ,
The following proposition provides a bound on the approximation error on finite training samples.
In addition, by Hoeffding’s inequality and , we have
Combing Proposition 6 and Proposition 7, we have the following a priori estimates of the generalization error of GD solutions.
For any , assume that . With probability , we have
Taking be the solution constructed in Proposition 7 and plugging into Eqn. (105), we then have
where . Plugging the above estimates into Eqn. (106), we obtain
where in the second inequality we used the fact that . Using the definition of and gives us that
Moreover, it follows from that . This completes the proof. ∎
2 Analyzing the continuous model
The approach presented above is the standard approach in machine learning theory. It works since the loss functional is convex in this case. It is difficult to generalize this to more complicated situations due to the lack of convexity. Here we explore an alternative approach by studying the continuous problem. Our hope is that some of the PDE techniques can be leveraged to help our understanding. One such example is found in , which proves a global convergence result for the gradient flow for two-layer neural networks by analyzing the PDE.
We decompose the generalization error as follows,
where is the solution given by the gradient flow of the continuous model. The three terms are respectively the discretization error, the generalization gap and the training error (for the continuous problem). The latter two terms require a priori estimates of the gradient flow.
Consider the random feature model, the gradient flow is given by
where the second inequality follows from the convexity of with respect to . It follows that
Since and , we get
Let . Then the function must lie in , with . Let . By the contraction property of Rademacher complexity, we have
Moreover, for any .
Following Eqn. (116) (117) and using the Rademacher complexity-based bound, we have
The treatment of the discretization error in (115) is more complex. This requires substantial machinery in numerical analysis. We will postpone this to future publications.
An example
In this section, we study a simple -dimensional case of the integral transform-based model proposed in Section 2.1. Specifically, we consider the following conservative gradient flow,
where , is a fixed probability distribution that determines the target function:
obeys the periodic boundary condition. is given by
It is easy to see that can be written as . Hence (125) can be written in a convolutional form,
In the following analysis we consider the case where is positive definite, i.e.,
holds for any measure . This condition is easily satisfied in practice. In addition, we assume that is three-times differentiable and its derivatives are bounded.
First, we study the situation when is uniform. In this case, one can prove global convergence of the gradient flow (125). (or free energy of (125)).
Assume is the uniform distribution. Let be the solution of (126) initialized from . Assume that has differentiable density function, then we have .
By an abuse of notation, we let and be the density function of and , respectively. First, we assume exists and has differentiable density function. For any probability distribution , consider the relative entropy of and ,
Let , , be the coefficients of the Fourier series of , and , respectively. The Fourier expansions exist due to the differentiability assumptions on and . By (129) we have
Therefore, is a Lyapunov function for the dynamics (126). Since the set of probability distributions on is compact in the space , any sublevel set of is compact in . Hence, the trajectory converges to the set where . By (130), this set contains only . This proves the statements in the theorem.
We next prove the existence and boundedness of . The existence and uniqueness of the solution of (126) can be proved in the same way as in . Therefore we only provide the main ideas here.
Taking the partial derivative with respect to on both sides of (126), and noting that , we get
Hence, is the solution of the following linear hyperbolic PDE for :
By the conditions on , the coefficients of the PDE above are uniformly bounded. Now it follows from standard PDE argument that is bounded for any finite interval of time . ∎
2 Local convergence for the general case
The previous global convergence result only holds for the case when is uniform. The next result shows that as long as is initialized close to , the gradient flow converges to the global minimum with an rate.
Assume the conditions of Theorem 9 hold. Furthermore assume that there are constants , and such that
hold for any . Let and be two constants that satisfy
Let . By the conditions we imposed, , and
for any . From equation (126), the dynamics of is
Writing (139) in the Fourier space, we get
and show that this is an invariant set for the dynamics, i.e. trajectories initialized inside of will not escape from . To prove this, assume that is at the boundary of , which means there exists a non-empty set such that for any we have
Then, for any , by (140) we have
For the second term on the right hand side of (143), we have
where the second inequality holds as a consequence of the condition (135), which implies
Use again condition (135) together with (145), we have
Since (147) holds for any , the vector field at points inside . Therefore, the trajectory stays in for any , which completes the proof. ∎
The theorem above shows local convergence of the gradient descent dynamics with rate. For simplicity of the proof we assumed that the Fourier coefficients of decays with an rate. This condition is inessential and can be relaxed, at the expense of a faster decay rate imposed on and .
3 Numerical results
A pseudo-spectrum method is implemented to numerically solve the equation (126). Specifically, we consider a -D model
with the feature given by
where is the standard deviation, and . It is easy to see that the summation in (149) is finite for any and , and is -periodic for both and . A direct calculation gives:
In the experiments, we take , and to be
The target function is displayed in the left panel of Figure 3. We see that this simple function contains three components: a mean value, a low frequency part (generated by in ), and a high frequency part (generated by in ). We take to be the uniform distribution on , and solve (126) for time units. The error between and along the path is shown in the right panel of Figure 3. We see that the dynamics proceeds in three different regimes: a nearly flat regime initially, followed by two faster regimes. This is related to the so-called frequency principle discussed next.
It is interesting to study the analog of the empirical risk, defined using the kernel:
where is a set of data samples. We take and sample the ’s from the uniform distribution on . The results, presented in Figure 4, suggest that the empirical loss converges to , and the norm of the density function stays bounded. As was argued in the previous section, under this circumstance, the generalization error is bounded by .
4 The frequency principle
The frequency principle was suggested by Xu et al in . The idea was that if one uses the gradient descent to train neural network models, then the low frequency part of the target function is recovered before the high frequency component. Here we examine this issue in some detail.
For this purpose it is useful to consider the dynamics in real space, i.e. we study the evolution of the function in (148). Let be the function generated by , we have
Therefore, the dynamics of is governed by an integral equation. This fact has important implications. To see this more clearly, let us linearize the kernel in the above equation around , then we get
Figure 5 displays the function at different times along the gradient flow path, compared to the target function . One can see that the low frequency components converge faster than the high frequency components. The is consistent with the frequency principle.
However, one should not expect this simple picture to literally hold in the general case. In Figure 6, we show the results for an example with and
In this case, for , the eigenvalue increases with . Thus, we see that the high-frequency part () converges faster than the low frequency part (). This is the consequence of the interplay between the frequency components in the target function and the spectrum of . When there is a concentration of energy in the intermediate range of the spectrum for the target function, one should expect the scenario shown in Figure 6 to happen.
Discussions
The continuous viewpoint presented here offers a more abstract way of thinking about machine learning. Instead of thinking about features and neurons, one focuses on the representation of functions, the calculus of variation problem, and the continuous gradient flow. Features and neurons arise as objects used in special discretizations of these continuous problems.
We learn at least two things from this thought process. On one hand we can discuss machine learning without appealing to the idea of neurons, and indeed there are plenty of algorithms and models besides the neural network models. On the other hand, we also see why neural networks, both shallow and deep (ResNet), are inevitable choices: They are the simplest particle method discretization of the simplest continuous gradient flow models (for the integral transform-based and flow-based representations respectively).
One main theme in classical numerical analysis is to come up with design principles for better models and better algorithms. In that spirit, one can suggest the following set of principles for the continuous approach:
The target functions should be represented as expectations in various forms.
The risk functionals should be nice functionals. Even if not convex, they should share many features of convex functionals. A good thing is that if we start from as continuous mode, it is likely that the discretized model will not be plagued by local minima that results of discrete effects.
The different gradient flows are nice flows in the sense that the relevant norms should behave well under the flow. Here the “relevant norm” means the norm associated with the particular representation (e.g. Barron norm for the integral transform-based representation).
The numerical discretization of the flow should be stable over long time intervals.
We suspect that if one follows this set of design principles, the resulting models and algorithms will behave in a rather robust fashion, in contrast to current machine learning models which tend to depend sensitively on the choice of hyper-parameters.
Some of the subtleties in current machine learning algorithms can already be appreciated just by looking at things from a continuous viewpoint. For example, very deep fully connected networks should cause problems since they do not have nice continuum limits .
The work presented here is supported in part by a gift to Princeton University from iFlytek and the ONR grant N00014-13-1-0338. We are grateful to Jianfeng Lu, Stephan Wojtowytsch, Lexing Ying and Shuhai Zhao for helpful discussions.