{'fraction_non_alphanumeric': 0.046592640975397344, 'fraction_numerical': 0.011912537712668347, 'mean_word_length': 4.194184168012924, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
MgNet: A Unified Framework of Multigrid and Convolutional Neural Network

We develop a unified model, known as MgNet, that simultaneously recovers some convolutional neural networks (CNN) for image classification and multigrid (MG) methods for solving discretized partial differential equations (PDEs). This model is based on close connections that we have observed and uncovered between the CNN and MG methodologies. For example, pooling operation and feature extraction in CNN correspond directly to restriction operation and iterative smoothers in MG, respectively. As the solution space is often the dual of the data space in PDEs, the analogous concept of feature space and data space (which are dual to each other) is introduced in CNN. With such connections and new concept in the unified model, the function of various convolution operations and pooling used in CNN can be better understood. As a result, modified CNN models (with fewer weights and hyper parameters) are developed that exhibit competitive and sometimes better performance in comparison with existing CNN models when applied to both CIFAR-10 and CIFAR-100 data sets.


Introduction
This paper is devoted to the study of convolutional neural networks (CNN) Goodfellow et al. [9] in machine learning by exploring their relationship with multigrid methods for numerically solving partial differential equation Xu [38], Xu and Zikatanov [41]. CNN has been successfully applied in many areas, especially computer vision LeCun et al. [25]. Important examples of CNN include the LeNet-5 model of LeCun et al. in 1998 LeCun et al. [24], the AlexNet of Hinton et el in 2012 Krizhevsky et al. [22], Residual Network (ResNet) of K. He et al. in 2015 He et al. [13] and other variants of CNN in Simonyan and Zisserman [36], Szegedy et al. [37], Huang et al. [17]. Given the great success of CNN models, it is of both theoretical and practical interest to understand why and how CNN works.
In 1990s, the mathematical analysis of DNN mainly focus on the approximation properties for DNN and CNN models. The first approximation results for DNN are obtained for a feedforward neural network with a single hidden layer separately in Hornik et al. [15] and Cybenko [4]. From 1989 to 1999, many results about the so called expressive power of single hidden neural networks are derived Barron [1], Ellacott [7], Pinkus [33]. In recent, many new DNN structure with ReLU Nair and Hinton [32] activation function have been studied in connection with: wavelets Shaham et al. [35], finite element He et al. [11], sparse grid Montanelli and Du [31] and polynomial expansion E and Wang [6]. By using a connection of CNN and DNN that a convolution with large enough kernel can recover any linear mapping, Zhou [45] presents an approximate result with convergence rate by deep CNNs for functions in the Sobolev space H r (Ω) with r > 2 + d/2, see also most recent result of Xu and Zheng [40].
These function approximation theory for deep learning, are far from being adequate to explain why deep neural network, especially for CNN, works and to understand the efficiency of some successful models such as ResNet. One goal of this paper is to offer some mathematical insights into CNN by using ideas from multigrid methods and by developing a theoretical framework for these two methodologies from different fields. Furthermore, such insight is used to develop more efficient CNN models.
In the existing deep learning literature, ideas and techniques from multigrid methods have been used for the development of efficient deep neural networks. As a prominent example, the ResNet and iResNet developed in He et al. [13,14], are motivated in part by the hierarchical use of "residuals" in multigrid methods as mentioned by the authors. As another example, in Ronneberger et al. [34], Milletari et al. [30], a CNN model with almost the same structure as the V-cycle multigrid is proposed to deal with volumetric medical-image segmentation and biomedical-image segmentation. More recently, multiresolution images have been used as the input into neural network in Haber et al. [10]. Ke et al. [20] use different net works to deal with multi-resolution images separately with a CNN to glue them together.
A dynamic system viewpoint has also been explored in many papers such as Haber et al. [10], E [5], Lu et al. [29] to understand the iterative structure in ResNet type models such as the iResNet model in He et al. [14]: Such an idea is further explored by Li and Shi [26] to use some flow model to interpret the date flow in ResNet as the solution of transport equation following the characteristic line. Chang et al. [3] proposes a multi-level training algorithm for the ResNet model by training a shallow model first and then prolongating its parameters to train a deeper model. Lu et al. [29] uses the idea of time discretization in dynamic systems to interpret PloyNet Zhang et al. [44], FractalNet Larsson et al. [23] and RevNet Gomez et al. [8] as different time discretization schemes. Then they propose the LM-ResNet based on the idea of linear multi-step schemes in numerical ODEs with a stochastic learning strategy. Long et al. [28,27] construct the PDE-Net models to learn PDE model from data connecting discrete differential operators and convolutions. In a different direction, new multigrid methods for numerical PDEs can be motivated by deep learning. For example, in Katrutsa et al. [19] a Deep Multigrid Method is proposed where the restriction and prolongation matrices with a given sparsity pattern are trained by minimizing the Frobenius norm of a large power of the multigrid error propagation matrix with a sampling technique similar to that used in machine learning. In Hsieh et al. [16], a linear U-net structure is proposed as a solver for linear PDEs on regular mesh.
In this paper, we explore the connection between multigrid and convolutional neural networks, in several directions. First of all, we view the multi-scale of images used in CNN as piecewise (bi-)linear functions as used in multigrid methods, and we relate the pooling operation in CNN with the restriction operation in multigrid.
To examine further connection between CNN and multigrid, we introduce the so-called data and feature space for CNN, which is analogous to the function space and its dual in the theory of multigrid methods Xu and Zikatanov [42]. With this new concept for CNN, we propose the data-feature mapping model in every grid as where f belongs to the data space and u belongs to the feature space. The feature extraction process can then be obtained through an iterative procedure for solving the above system, namely with u ≈ u ν . The above iterative scheme (.) can be interpreted as both the feature extraction step in ResNet and the smoothing step in multigrid method. Using the above observations and new concepts, we develop a unified framework, called MgNet, that simultaneously recovers some convolutional neural networks and multigrid methods. Furthermore, we establish connections between several ResNet type models using the MgNet framework. We provide improvements/generalizations of several ResNet type models that are as competitive as and sometimes more efficient than existing models, as demonstrated by numerically experiments for both CIFAR-10 and CIFAR-100 Krizhevsky and Hinton [21].
The remaining sections are organized as follows. In §2, we introduction some notation and preliminary results in supervised learning especially for image classification problem. In §3, we present the idea that we need to distinguish the data and feature space in CNN models and introduce some related mappings. In §4, we explore the structures and operators when we consider images as (bi-)linear functions in multilevel grids. In §5, we introduce multigrid by splitting it into two phases. In §6, we give an abstract form of MgNet as a framework for multigrid and convolutional neural network with details. In §7, we introduction some classical CNN structures with rigorous mathematical definition. In §8, we construct some relations and connections between MgNet and classic models. In §9, we present some numerical results to show the efficiency of MgNet. In §10 we give concluding remarks.

Supervised learning on image classification
We consider a basic machine learning problem for classifying a collection of images into κ distinctive classes. As an example, we consider a two-dimensional image which is usually represented by a tensor f ∈ D := R m×n×c .
Here c = 1 for black-white image 3 for color image. (.) A typical supervised machine learning problem begins with a data set (training data) and y i ∈ R κ is the label for data f i , with [y i ] j as the probability for f i in classes j.
Roughly speaking, a supervised learning problem can be thought as data fitting problem in a high dimensional space D. Namely, we need to find a mapping H : R m×n×c → R κ such that, for a given f ∈ D, For the general setting above, we use a probatilistic model for understanding the output H(f ) ∈ R κ as a discrete distribution on {1, · · · , κ}, with [H(f )] i as the probability for f in the class i, namely At last, we finish our model with a simple strategy to choose as the label for a test data f , which ideally is close to (.). The remaining key issue is the construction of the classification mapping H. The main step in the construction of H is to construct a nonlinear mapping To be consistent with the notation for CNN which will be described below, here the subscript J refers to the number of coarsening girds in CNN. Roughly speaking, the map H 0 plays two roles. The first role is to make a dimension reduction, namely The second role is to map a complicated set of data into a set of data that are linearly separable. As a result, the simple logistic regression procedure can be applied. The first step in a logistic regression it to introduce a linear mapping: We then use the soft-max function.
to obtain a logistic regression model By combining the nonlinear mapping H in (.) and the logistic regression (.), we obtain the following classifier: Given the model (.), we finish the training phase with solving the next optimization problem: where Here l(H(f j ), y j ) is a loss function that measures the predicted result H(f j ) and the real label y j . In logistic regression, the following cross-entropy loss function is often used

Data space, feature space and relevant mappings
Given a data where m × n is called the spatial dimension and c is the channel dimension.
For the given data f in (.), we look for some feature vector, denoted by u, associated with f : We make an assumption that the data f and feature u are related by a mapping (which can be either linear or nonlinear) The data-feature relationship (.) or (.) is not unique. Different relationships give rise to different features. We can view the data-feature relationship given in (.) as a model that we propose. Here the mapping A, which can be either linear or nonlinear, is unknown and needs to be trained.
We point out that the data space and feature space may have different numbers of channels.

A special linear mapping: convolution
One important class of linear mapping is the so called convolution: where 1 ∈ R m×n is a m × n matrix with all elements being 1, and for g ∈ R m×n The coefficients in (.) constitute a kernel matrix where k is often taken as small integers. Here padding means how choose X i+p,j+q when (i + p, j + q) is out of 1 : m or 1 : n. Those next three choices are often used periodic padding, Here d (mod m) ∈ {1, · · · , m} means the remainder when d is divided by m.
If we formally write We can then write the operation (.) as The operation (.) is also called a convolution with stride 1. More generally, given an integer s ≥ 1, a convolution with stride s for f ∈ R m×n is defined as: Here m s denotes the smallest integer that greater than m s . In CNN, we often take s = 2.

Some linear and nonlinear mappings and extractors
A data-feature map A and feacture extractor B can be either linear or nonlinear. The nonlinearity can be obtained from appropriate application of an activation function In this paper, we mainly consider a special activation function, known as the rectified linear unit (ReLU), which is defined by By applying the function to each component, we can extend this A linear data-feature mapping can simply given by a convolution as in (.): A nonlinear mapping can be given by compositions of convolution and activation functions: Here ξ, η and γ are all appropriate convolution mappings.

An iterative feacture extraction scheme
One key idea in this paper is that we use a simple iterative process to approximately solve (.) using (.). Namely, for i = 1 : for an appropriately chosen u 0 . We refer to [38] for more discussion on iterative scheme in the form of (.).

Piecewise (bi-)linear functions on multilevel grids
An image can be viewed as a function on a grid. Images with different resolutions can then be viewed as functions on grids of different sizes. The use of such multiple-grids is a main technique used in the standard multigrid method for solving discretized partial differential equations Xu [38], Xu and Zikatanov [41], and it can also be interpreted as a main ingredient used in convolutional neural networks (CNN). Without loss of generality, for simplicity, we assume that the initial grid, T , is of size for some integers s, t ≥ 1. Starting from T 1 = T , we consider a sequence of coarse grids (as depicted in Fig. 4 with J = 4): The grid points of these grids can be given by Here h 1, = 2 −s+ −1 a and h 2, = 2 −t+ −1 b, for some a, b > 0. The above geometric coordinates (x i , y i ) are usually not used in image precess literatures, but they are relevant in the context of multigrid method for numerical solution of PDEs. We now consider piecewise linear functions on the sequence of grids (.) and we obtain a nested sequence of linear vector spaces Here each V consists of all piecewise bilinear (or linear) functions with respect to the grid (.) and (.). Each V has a set of basis functions: φ ij ∈ V satisfying: .
We note that v ∈ V thanks to (.) and the nodal values of v on T constitute a tensor v ∈ R m ×n .
Using the property of piecewise (bi-)linear functions, it is easy to see that which is called a prolongation in multigrid terminology. More specifically,

Pooling, restriction and interpolation
The prolongation given by (.) can be used to transfer feature from a coarse grid to a fine grid. On the other hand, we also need a mapping, known as restriction, that transfer data from fine grid to corse grid: In multigrid for solving discretized partial differential equation, the restriction is often taken to be transpose of the prolongation given by (.): Lemma 1. IfP +1 takes the form of prolongation in multigrid methods for linear finite element functions on the above grids, thenR +1 is a convolution with stride 2 and a 3 × 3 kernel as: where, if V is piecewise bilinears, In addition, all these convolutions are applied with zero padding as in (.) , which is consistent with the Neumann boundary condition for applying FEM to numerical PDEs. More details will be discussed in §4.2.
In the deep learning literature, the restriction such as (.) is often known as pooling operation. One popular pooling is a convolution with stride s, with some small integer s > 1. Some other fixed (or untrained) poolings are also often used. One popular pooling is the so called average pooling R avr which can be a convolution with stride 2 or bigger using the kernel K in the form of Nonlinear pooling operator is also used, for the example the (2k + 1) × (2k + 1) max-pooling operator with stride s as follows: Another approach to the construction of restriction of pooling can be obtained by using interpolation. Given v ∈ R m ×n , let v ∈ V be the function whose nodal values are precisely give by v as in (.). Any reasonable linear operator Π : V → V +1 , (.) such as: nodal value interpolation, Scott-Zhang interpolation and L 2 projection Xu [39], would give rise to a mapping As situations permit, we can use these a priori given restrictions to replace unknown pooling operators to reduce the number of parameters.

Multigrid methods for numerical PDEs
Let us first briefly describe a geometric multigrid method used to solve the following boundary value problem We consider a continuous linear finite element discretization of (.) on a nested sequence of grids of sizes n ×n with n = 2 J− +1 +1, as shown in the left part of Fig. 4 and the corresponding sequence of finite element spaces (.).
Based on the grid T = T , the discretized system is Here, A : R n×n → R n×n is a tensor satisfying which holds for 1 ≤ i, j ≤ n with zero padding. Here we notice that, there exists a 3 × 3 kernel as Where * is the stander convolution operation with zero padding like (.). We now briefly describe a simple multigrid method by a mixed use of the terminologies from deep learning Goodfellow et al. [9] and multigrid methods. The first main ingredient in GMG is a smoother. A commonly used smoother is a damped Jacobi with damped coefficient ω with ω ∈ (0, 2), which can be written as S 0 : R n×n → R n×n satisfying for equation (.) with initial guess zero. If we apply the Jacobian iteration twice, then with element-wise form Similarly, we can define S : R n ×n → R n ×n . We use prolongation P +1 : R n +1 ×n +1 → R n ×n as defined in (.) and restriction R +1 = (P +1 ) T . Further more, we use the following relationship to define coarse operation Using the smoother S , prolongation P +1 , restriction R +1 and mapping A as given in (.), we can formulate the following algorithm as a major component of a multigrid algorithm.
end for Form restricted residual and set initial guess:

end for
Using the above algorithm, there are different multigrid algorithms such as: \-cycle, V-cycle and W-cycle. Let us now only give one special form of multigrid algorithm as follows.
Prolongation and restriction from coarse to fine level for = J − 1 : 1 do end for Output u = u 1,ν .

MgNet: a new network structure
In this section, we introduce a new neural network structure, named as MgNet, motivated by the multigrid algorithm, Algorithm 1, as discussed in the previous section. First, given the data-feature equation (.), we consider its restrictions to grid as follows: end for Note: u = u ,ν Interpolation and restriction: end for The first property of MgNet is that it recovers the multigrid methods. Proof. Here we replace u ,i and f byũ ,i andf in MgNet. What we want to prove arẽ with u ,i , f in Algorithm 1 andũ ,i ,f in Algorithm 3 for any choice of Π +1 . We prove this result by induction.
• It is easy to check that = 1 is right by taking θ = id.
• Once the above equation (.) is right for , let us prove the corresponded result for + 1.
-Forf +1 , as the definition in Algorithm 3, we havẽ by induction for i.
Despite of the simplicity look of Algorithm 3, there are rich mathematical structures and variants which we briefly discuss below.

Initialization: feature space channels
Initially for = 1, we take m 1 = m and n 1 = n and we may define the linear mapping to obtain f 1 = θ(f ) with c given in (.) changed to the channel of the initial data space to c 1 . Usually One possibility is that we choose c 1 = c. In this case, we choose θ =identity. But in general, we may need to choose c 1 c. One possible advantage of preprocessing the RGB (c = 3) to different color spaces is that we can better choose what kind of features the CNN can detect, and under what conditions those detections will be invariant.
One possibility of understanding and modifying this step is to decompose the data f into a number of more specialized data We may use some knowledge from image processing or physics to design a procedure to obtain the right decomposition of (.), or we can just train it. Conceivably, we may view f 1 = θ(f ) as a special approximation solution of (.) with the same sparsity pattern to ξ.

Extracted Units: u and channels
The first new feature and the main new ingredient in the proposed neural network is the introduction of feature variables u in (.), which will be known as the extracted units. We emphasize that the extracted-units u and the data f can have different numbers of channels: One possibility is that the number of channels for both u and f remain unchanged in different grids: Both c f and c u are two super-parameters that need to be tuned, and we may even take c u = c f .

Poolings: Π +1 and R +1
The pooling Π +1 in (.) and R +1 in (.) are in general different. They can be trained in general, but they may be a priori chosen. There are many different possibilities to choose Π +1 . The simplest choice of Π +1 is A more sophisticated choice can be obtained by considering an interpolation from fine grid to coarse (that, for example preserves linear function locally). Namely withΠ +1 given by (.).

Data-feature mapping: A
The second new feature of MgNet is that this data-feature mapping only depends on the grid T , and it does not depend on layers within the same grid. This amounts to a significant saving of the number of parameters. In comparison, the existing CNN, such as ResNet, can be interpreted as a network related to the case that A is replaced by A ,i , namely The data-feature mapping: A can be either linear (.), or nonlinear (.). The underlying convolution kernels can be different on different grids and they can all be trained.

Feature extractors: B ,i
There are some freedoms in choosing these feature extrators. One common choice of extractors is given by (.), namely Other than the level dependent extractors, the following different strategies can be used This brief framework gives us the basic principle on designing a CNN models for classification. All models are seen as the special choice of data-feature mapping A , feature extractors B ,i and the pooling operators Π +1 with R +1 .

Some classic CNN models
In this section, we will use the notation introduced above to give a brief description of some classic CNN models.

LeNet-5, AlexNet and VGG
The LeNet-5 LeCun et al. [24], AlexNet Krizhevsky et al. [22] and VGG Simonyan and Zisserman [36] can be written as: where R +1 can be general pooling operators and θ ,i can be convolution with stride 1, or fully connected operators. Then the CNN model will be defined by In these three classic CNN models, they still need some extra fully connected layers in nonlinear mapping H 0 before the logistic regression as it contains a fully connected layer as in (.). These fully connected layers are removed in ResNet to be described below.

ResNet
The ResNet He et al. [13] can be written as H 0 (f ) = R ave (f L,ν ).

(.)
Here Generally, ξ ,i and η ,i takes the form of with zero padding and stride 1, except, η ,0 is taken as convolution with stride 2 with the same output dimension of R +1 .

iResNet
The iResNetHe et al. [14] can be written as: The only difference between ResNet and iResNet can be viewed as putting a σ in different places. The connection of those three models are often shown with next diagrams: Without loss of generality, we extract the key feedforward steps on the same grid in different CNN models as follows.

Variants and generalizations of MgNet
The MgNet model algorithm is one very basic and it can be generalized in many different ways. It can also be used as a guidance to modify and extend many existing CNN models.
The following result show how MgNet is related to he iResNet He et al. [14].
Proof. Because of the linearity of ξ and invariant within the same grid , we can apply ξ on both sides of (.) and minus with f , thus we have This finish the proof with definition in (.).
The above result is very simple but critically important. In view of Theorem 2, it shows how multigrid and CNN are intimately related. Furthermore, it provides a different version of iResNet, which can be viewed as the dual version of the original iResNet. This relation is quit similar with the dual relation of u and f in multigrid method Xu and Zikatanov [42]. Lemma 2. The ResNet He et al. [13] step as in (.) admits the following relation: Proof. First, we apply ξ ,i+1 • σ • η ,i+1 on the both sides of (.) and get Minus by f ,i on the both sides and recall the definition in (.), we havẽ By the definition of f ,i = σ(f ,i ), we finish this proof.
We call the above form (.) as σ-ResNet, similar to the MgNet we replace ξ ,i by ξ and get the next Mg-ResNet form as: If we take these pooling and prolongation operators as discussed in the previous sections and focus on the iterative forms on a certain grid , we may compare them all as: We can have these connections for all iterative scheme in data space: In this sense, these MgNet related models can be understood as models between iResNet and ResNet. And all these models can be understood as iteration in the data space as a dual relationship with feature space as MgNet.
The rationality of replacing ξ ,i by layer independent ξ may be justified by the following theorem. can be written as 2. Any CNN model with can be written as Proof. Let use prove the first case as an example, the second case can be proven with the same process. With similar structure in MgNet, we can take and Here id c : R n ×n ×c → R n ×n ×c , (.) is the identity map andδ for any X, Y ∈ R n ×n ×c and [X, Y ] ∈ R n ×n ×2c . First, we see that η ,i with the above form is a convolution from R n ×n ×c to R n ×n ×2c . Following the identity ReLU δ k = [0, · · · , 0, −δ, · · · 0; 0, · · · , 0, −δ, · · · 0], k = 1 : c , where δ is the identity kernel during one channel. At last, we have Then the modified dual form of MgNet in (.) becomes This covers (.).
Remark 1. Theorems 3 shows that general CNN in the forms of either (.) or (.) can be written recast as (.) or (.) with the data-feature mapping A = ξ that is not only independent of the layers, but is actually given a priori as in (.). In view of Theorems 2 and 2, the classic CNN models can be essentially recovered from MgNet by choosing ξ a priori as in (.). Since the classic CNN models have been extensively tested to be successful, the more general MgNet with more general ξ (to be trained) are expected to be more efficient than the classic CNN models.

Numerical experiments
In this section, we present some numerical results to illustrate the efficiency and potential of MgNet as described in Algorithm 3.

Data sets and model structure
We choose CIFAR-10 and CIFAR-100 Krizhevsky and Hinton [21] as two data sets for numerical tests.
Here, the CIFAR-10 dataset consists of 60000 32x32 colour images in 10 classes, with 6000 images per class. The CIFAR-100 dataset is just like the CIFAR-10, except it has 100 classes containing 600 images each. We split these two data sets with 50000 training images and 10000 test images. We will mainly carry out a comparison with study between MgNet and ResNet He et al. [13] on these two data sets, so we choose some similar process techniques such as there will be a average pooling before linear regression layers: We use the similar ideas in MgNet to take m J = 0, thus to choose This can be true also thanks to our structure that Given an image f , similar to ResNet, we apply our MgNet as follows: where u J (f ) is the output from our MgNet as described in Algorithm 3, S is the soft-max mapping in (.) and θ : R cu → R κ , (.) represents a fully linear layer with κ = 10 for CIFAR-10 and κ = 100 for CIFAR-100. We will make the following choice of hyper parameters for the MgNet: • J: the number of grids. As all images in CIFAR-10 or CIFAR-100 are 32 × 32 × 3, we choose J = 4 to be consistent with ResNet.
• c u and c f : the number of feature and data channels.
• A : the data-feature mapping. We choose the linear case in (.).
• B ,i : the feature extractor. We choose the variable extractors as in (.).
• R +1 : the restriction operator in (.). Here we choose it as a convolution with stride 2 which need to be trained.

Training algorithm
While there are many different choices of training algorithms Bottou et al. [2], in our test, we adopt the popular stochastic gradient descent (SGD) with mith-batch and momentum for cross-entropy loss function.

Algorithm 4 SGD with mini-batch and momentum
Input: learning rate η t , batch size m, parameter Initialization w 0 , number of epochs K.
for Epoch k = 1 : K do Shuffle data and get mini-batch B 1 , · · · , B N m , choose mini-batch as: Compute the gradient on B it : Compute the momentum: v t = αv t−1 − η t g t (v 0 = 0). (.) Update w: end for Here we have h i (w t ) = l(H(f i ; w t ), y i ) as defined in (.), where w t notes all free parameters in MgNet and θ in (.). We use the SGD with momentum of 0.9. The mini-batch size is chosen as m = 128. The learning rate starts from 0.1 and is divided by 10 for every 30 epochs, and the models are trained for up to K = 120 epochs. We adopt batch normalization (BN) after each convolution and before activation, following Ioffe and Szegedy [18]. Initialization strategy is the same with ResNet as in He et al. [12]. We do not use weight decay and dropout. The final Top-1 test accuracy is shown in Table 2. From the above numerical results, we find that the modified CNN models based on MgNet structure have competitive and sometimes better performance in comparison with standard ResNet models when applied to both CIFAR-10 and CIFAR-100 data sets. Generally speaking, the more channels the better performance you can achieve (see WideResNet Zagoruyko and Komodakis [43] for similar observation). Furthermore, Π 1 and Π 2 work better than Π 0 , and Π 2 can even work better than Π 1 with fewer parameters for big enough channel numbers.

Concluding remarks
By carefully studying the connections between the traditional multigrid method and the convolutional neural network (especially the ResNet type) models, the MgNet established in this paper provides a unified framework that connects both multigrid and CNN in a technical level. Comparing with other existing works that discuss the connection between multigrid and CNN, MgNet goes beyond formal or qualitative comparisons and identifies key model components that play the same corresponding roles, from an abstract viewpoint, for these two different methodologies. As a result, how and why CNN models work can be mathematically understood in a similar fashion as for multigrid method which has a much more mature and better developed theory. Motivated from various known techniques from multigrid method, many variants and improvements of CNN can then be naturally obtained. For example, as demonstrated from our preliminary numerical experiments, the resulting modified CNN models quipped with fewer weights and hyper parameters actually exhibit competitive and sometimes better performance than standard ResNet models.
The MgNet framework opens a new door to the mathematical understanding, analysis and improvements of deep learning models. The very preliminary results presented in this paper have demonstrated the great potential of MgNet from both theoretical and practical viewpoints. Obviously many aspects of MgNet should be further explored and expect to be much improved. In fact, only very few techniques from multigrid method have been tried in this paper and many more in-depth techniques from multigrid require further study for deep neural networks, especially CNN. In particular, we believe that the MgNet framework will lead to improved CNN that only has a small fraction of the number of weights that are required by the current CNN. On the other hand, the techniques in CNN can also be used to develop new generation of multigrid and especially algebraic multigrid methods Xu and Zikatanov [42] for solving partial differential equations. Our ongoing works have demonstrated great potentials for research in these directions and many more results will be reported in future papers.