Title: LEARNING DEEP RESNET BLOCKS SEQUENTIALLY USING BOOSTING THEORY

Abstract: We prove a multiclass boosting theory for the ResNet architectures which simultaneously creates a new technique for multiclass boosting and provides a new algorithm for ResNet-style architectures. Our proposed training algorithm, BoostRes-Net, is particularly suitable in non-differentiable architectures. Our method only requires the relatively inexpensive sequential training of T "shallow ResNets". We prove that the training error decays exponentially with the depth T if the weak module classifiers that we train perform slightly better than some weak baseline. In other words, we propose a weak learning condition and prove a boosting theory for ResNet under the weak learning condition. A generalization error bound based on margin theory is proved and suggests that ResNet could be resistant to overfitting using a network with l 1 norm bounded weights.

1. INTRODUCTION:

Why do residual neural networks (ResNets) (He et al., 2016) and the related highway networks (Srivastava et al., 2015) work? And if we study closely why they work, can we come up with new understandings of how to train them and how to define working algorithms?

Deep neural networks have elicited breakthrough successes in machine learning, especially in image classification and object recognition (Krizhevsky et al., 2012; Sermanet et al., 2013; Simonyan & Zisserman, 2014; Zeiler & Fergus, 2014) in recent years. As the number of layers increases, the nonlinear network becomes more powerful, deriving richer features from input data. Empirical studies suggest that challenging tasks in image classification (He et al., 2015; Ioffe & Szegedy, 2015; Simonyan & Zisserman, 2014; Szegedy et al., 2015) and object recognition (Girshick, 2015; Girshick et al., 2014; He et al., 2014; Long et al., 2015; Ren et al., 2015) often require "deep" networks, consisting of tens or hundreds of layers. Theoretical analyses have further justified the power of deep networks (Mhaskar & Poggio, 2016) compared to shallow networks. However, deep neural networks are difficult to train despite their intrinsic representational power. Stochastic gradient descent with back-propagation (BP) (LeCun et al., 1989) and its variants are commonly used to solve the non-convex optimization problems. A major challenge that exists for training both shallow and deep networks is vanishing or exploding gradients (Bengio et al., 1994; Glorot & Bengio, 2010) . Recent works have proposed normalization techniques (Glorot & Bengio, 2010; LeCun et al., 2012; Ioffe & Szegedy, 2015; Saxe et al., 2013) to effectively ease the problem and achieve convergence. In training deep networks, however, a surprising training performance degradation is observed (He & Sun, 2015; Srivastava et al., 2015; He et al., 2016) : the training performance degrades rapidly with increased network depth after some saturation point. This training performance degradation is representationally surprising as one can easily construct a deep network identical to a shallow network by forcing any part of the deep network to be the same as the shallow network with the remaining layers functioning as identity maps. He et al. (He et al., 2016) presented a residual network (ResNet) learning framework to ease the training of networks that are substantially deeper than those used previously. And they explicitly reformulate the layers as learning residual functions with reference to the layer inputs by adding identity loops to the layers. It is shown in (Hardt & Ma, 2016) that identity loops ease the problem of spurious local optima in shallow networks. Srivastava et al. (Srivastava et al., 2015) introduce a novel architecture that enables the optimization of networks with virtually arbitrary depth through the use of a learned gating mechanism for regulating information flow.

Empirical evidence overwhelmingly shows that these deep residual networks are easier to optimize than non-residual ones. Can we develop a theoretical justification for this observation? And does that justification point us towards new algorithms with better characteristics?

1.1. SUMMARY OF RESULTS:

We propose a new framework, multi-channel telescoping sum boosting (defined in Section 4), to characterize a feed forward ResNet in Section 3. We show that the top level (final) output of a ResNet can be thought of as a layer-by-layer boosting method (defined in Section 2). Error bounds for telescoping sum boosting are provided.

We introduce a learning algorithm (BoostResNet) guaranteed to reduce error exponentially as depth increases so long as a weak learning assumption is obeyed. BoostResNet adaptively selects training samples or changes the cost function (Section 4 Theorem 4.2). In Section 4.4, we analyze the generalization error of BoostResNet and provide advice to avoid overfitting. The procedure trains each residual block sequentially, only requiring that each provides a better-than-a-weak-baseline in predicting labels.

BoostResNet requires radically lower computational complexity for training than end-to-end back propagation (e2eBP). Memorywise, BoostResNet requires only individual layers of the network to be in the graphics processing unit (GPU) while e2eBP inevitably keeps all layers in the GPU. For example, in a state-of-the-art deep ResNet, this might reduce the RAM requirements for GPU by a factor of the depth of the network. Similar improvements in computation are observed since each e2eBP step involves back propagating through the entire deep network.

Experimentally, we compare BoostResNet with e2eBP over two types of feed-forward ResNets, multilayer perceptron residual network (MLP-ResNet) and convolutional neural network residual network (CNN-ResNet), on multiple datasets. BoostResNet shows substantial computational performance improvements and accuracy improvement under the MLP-ResNet architecture. Under CNN-ResNet, a faster convergence for BoostResNet is observed.

One of the hallmarks of our approach is to make an explicit distinction between the classes of the multiclass learning problem and channels that are constructed by the learning procedure. A channel here is essentially a scalar value modified by the rounds of boosting so as to implicitly minimize the multiclass error rate. Our multi-channel telescoping sum boosting learning framework is not limited to ResNet and can be extended to other, even non-differentiable, nonlinear hypothesis units, such as decision trees or tensor decompositions. 1.2 RELATED WORKS Training deep neural networks has been an active research area in the past few years. The main optimization challenge lies in the highly non-convex nature of the loss function. There are two main ways to address this optimization problem: one is to select a loss function and network architecture that have better geometric properties (details refer to appendix A.1), and the other is to improve the network's learning procedure (details refer to appendix A.2).

Many authors have previously looked into neural networks and boosting, each in a different way. Bengio et al. (2006) introduce single hidden layer convex neural networks, and propose a gradient boosting algorithm to learn the weights of the linear classifier. The approach has not been generalized to deep networks with more than one hidden layer. Shalev-Shwartz (2014) proposes a selfieBoost algorithm which boosts the accuracy of an entire network. Our algorithm is different as we instead construct ensembles of classifiers. Veit et al. (2016) interpret residual networks as a collection of many paths of differing length. Their empirical study shows that residual networks avoid the vanishing gradient problem by introducing short paths which can carry gradient throughout the extent of very deep networks. The authors of AdaNet (Cortes et al., 2016) consider ensembles of neural layers with a boosting-style algorithm and provide a method for structural learning of neural networks by optimizing over the generalization bound, which consists of the training error and the complexity of the AdaNet architecture. AdaNet uses the traditional boosting framework where weak classifiers are being boosted. Therefore, to obtain low training error guarantee, AdaNet maps the feature vectors (hidden layer representations) to a classifier space and boosts the weak classifiers. Our BoostResNet, instead, boosts representations (feature vectors) over multiple channels, and therefore produces a less "bushy" architecture. BoostResNet focuses on a ResNet architecture, provides a new training algorithm for ResNet, and proves a training error guarantee for deep ResNet architecture. A ResNet-style architecture is a special case of AdaNet, so AdaNet generalization guarantee applies here and our generalization analysis is built upon their work.

2. PRELIMINARIES:

Linear Classifier

w ⊤ gT +1(x) y gT +1(x) gT -1(x) gT (x) fT -1(gT -1 (x))

fT (gT (x))

. . . A residual neural network (ResNet) is composed of stacked entities referred to as residual blocks. Each residual block consists of a neural network module and an identity loop (shortcut). Commonly used modules include MLP and CNN. Throughout this paper, we consider training and test examples generated i.i.d. from some distribution D over X × Y, where X is the input space and Y is the label space. We denote by S = ((x 1 , y 1 ), (x 2 , y 2 ), . . . , (x m , y m )) a training set of m examples drawn according to D m .

A Residual Block of ResNet ResNet consists of residual blocks. Each residual block contains a module and an identity loop. Let each module map its input x to f t (x) where t denotes the level of the modules. Each module f t is a nonlinear unit with n channels, i.e., f t (•) ∈ R n . In multilayer perceptron residual network (MLP-ResNet), f t is a shallow MLP, for instance,

f t (x) = Ṽ ⊤ t σ( W ⊤ t x)

where Wt ∈ R n×k , Ṽt ∈ R k×n and σ is a nonlinear operator such as sigmoidal function or relu function. Similarly, in convolutional neural network residual network (CNN-ResNet), f t (•) represents the t-th convolutional module. Then the t-th residual block outputs g t+1 (x)

EQUATION

) where x is the input fed to the ResNet. See Figure 1 for an illustration of a ResNet, which consists of stacked residual blocks (each residual block contains a nonlinear module and an identity loop).

Output of ResNet Due to the recursive relation specified in Equation ( 1), the output of the T -th residual block is equal to the summation over lower module outputs, i.e., g

T +1 (x) = f T (g T (x)) + g T (x) = T t=1 f t (g t (x))

, where g 1 (x) = x. For binary classification tasks, the final output of a ResNet given input x is rendered after a linear classifier w ∈ R n on representation g T +1 (x) (In the multiclass setting, let C be the number of classes; the linear classifier W ∈ R n×C is a matrix instead of a vector.):

EQUATION

where 

F (x) = w ⊤ g T +1 (x)

3. RESNET IN TELESCOPING SUM BOOSTING FRAMEWORK:

As we recall from Equation (2), ResNet indeed has a similar form as the strong classifier in boosting.

The key difference is that boosting is an ensemble of estimated hypotheses whereas ResNet is an ensemble of estimated feature representations T t=1 f t (g t (x)). To solve this problem, we introduce an auxiliary linear classifier w t on top of each residual block to construct a hypothesis module. Formally, a hypothesis module is defined as

o t (x) def = w ⊤ t g t (x) ∈ R (3)

in the binary classification setting. Therefore o t+1 (x) = w ⊤ t+1 [f t (g t (x)) + g t (x)] as g t+1 (x) = f t (g t (x)) + g t (x). We emphasize that given g t (x), we only need to train f t and w t+1 to train o t+1 (x). In other words, we feed the output of previous residual block (g t (x)) to the current module and train the weights of current module f t (•) and the auxiliary classifier w t+1 . Now the input, g t+1 (x), of the t + 1-th residual block is the output, f t (g t (x)) + g t (x), of the t-th residual block. As a result,

o t (x) = t-1 t ′ =1 w ⊤ t f t ′ (g t ′ (x)).

In other words, the auxiliary linear classifier is common for all modules underneath. It would not be realistic to assume a common auxiliary linear classifier, as such an assumption prevents us from training the T hypothesis module sequentially. We design a weak module classifier using the idea of telescoping sum as follows. Definition 3.1. A weak module classifier is defined as

EQUATION

)

where o t (x) def = w ⊤ t g t (x

) is a hypothesis module, and α t is a scalar. We call it a "telescoping sum boosting" framework if the weak learners are restricted to the form of the weak module classifier.

ResNet: Ensemble of Weak Module Classifiers Recall that the T -th residual block of a ResNet outputs g T +1 (x), which is fed to the top/final linear classifier for the final classification. We show that an ensemble of the weak module classifiers is equivalent to a ResNet's final output. We state it formally in Lemma 3.2. For purposes of exposition, we will call F (x) the output of ResNet although a σ function is applied on top of F (x), mapping the output to the label space Y. Lemma 3.2. Let the input g t (x) of the t-th module be the output of the previous module, i.e., g t+1 (x) = f t (g t (x)) + g t (x). Then the summation of T weak module classifiers divided by α T +1 is identical to the output, F (x), of the depth-T ResNet,

EQUATION

)

where the weak module classifier h t (x) is defined in Equation (4).

See Appendix B for the proof. Overall, our proposed ensemble of weak module classifiers is a new framework that allows for sequential training of ResNet. Note that traditional boosting algorithm results do not apply here. We now analyze our telescoping sum boosting framework in Section 4. Our analysis applies to both binary and multiclass, but we will focus on the binary class for simplicity in the main text and defer the multiclass analysis to the Appendix F.

4. TELESCOPING SUM BOOSTING FOR BINARY CLASSIFICATION:

Below, we propose a learning algorithm whose training error decays exponentially with the number of weak module classifiers T under a weak learning condition. We restrict to bounded hypothesis modules, i.e., |o t (x)| ≤ 1.

4.1. WEAK LEARNING CONDITION:

The weak module classifier involves the difference between (scaled version of) o t+1 (x) and o t (x).

Let

γt def = E i∼Dt-1 [y i o t (x i )]

> 0 be the edge of the hypothesis module o t (x), where D t-1 is the weight of the examples. As the hypothesis module o t (x) is bounded by 1, we obtain |γ t | ≤ 1. So γt characterizes the performance of the hypothesis module o t (x). A natural requirement would be that o t+1 (x) improves slightly upon o t (x), and thus γt+1 -γt ≥ γ ′ > 0 could serve as a weak learning condition. However this weak learning condition is too strong: even when current hypothesis module is performing almost ideally (γ t is close to 1), we still seek a hypothesis module which performs consistently better than the previous one by γ ′ . Instead, we consider a much weaker learning condition, inspired by training error analysis, as follows.

Definition 4.1 (γ-Weak Learning Condition). A weak module classifier h:

t (x) = α t+1 o t+1 -α t o t satisfies the γ-weak learning condition if γ2 t+1 -γ 2 t 1-γ 2 t

≥ γ 2 > 0 and the covariance between exp(-yo t+1 (x)) and exp(yo t (x)) is non-positive.

The weak learning condition is motivated by the learning theory and it is met in practice (refer to Figure 4 ). Interpretation of weak learning condition For each weak module classifier h

t (x), γ t def = γ2 t+1 -γ 2 t 1-γ 2 t

characterizes the normalized improvement of the correlation between the true labels y and the hypothesis modules o t+1 (x) over the correlation between the true labels y and the hypothesis modules o t (x). The condition specified in Definition 4.1 is mild as it requires the hypothesis module o t+1 (x) to perform only slightly better than the previous hypothesis module o t (x). In residual network, since o t+1 (x) represents a depth-(t + 1) residual network which is a deeper counterpart of the depth-t residual network o t (x), it is natural to assume that the deeper residual network improves slightly upon the shallower residual network. When γt is close to 1, γ2 t+1 only needs to be slightly better than γ2 t as the denominator 1-γ2 t is small. The assumption of the covariance between exp(-yo t+1 (x)) and exp(yo t (x)) being non-positive is suggesting that the weak module classifiers should not be adversarial, which may be a reasonable assumption for ResNet.

4.2. BOOSTRESNET:

We now propose a novel training algorithm for telescoping sum boosting under binary-class classification as in Algorithm 1. In particular, we introduce a training procedure for deep ResNet in Algorithm 1 & 2, BoostResNet, which only requires sequential training of shallow ResNets.

The training algorithm is a module-by-module procedure following a bottom-up fashion as the outputs of the t-th module g t+1 (x) are fed as the training examples to the next t + 1-th module. Each of the shallow ResNet f t (g t (x)) + g t (x) is combined with an auxiliary linear classifier w t+1 to form a hypothesis module o t+1 (x). The weights of the ResNet are trained on these shallow ResNets. The telescoping sum construction is the key for successful interpretation of ResNet as ensembles of weak module classifiers. The innovative introduction of the auxiliary linear classifiers (w t+1 ) is the key solution for successful multi-channel representation boosting with theoretical guarantees. Auxiliary linear classifiers are only used to guide training, and they are not included in the model (proved in Lemma 3.2). This is the fundamental difference between BoostResNet and AdaNet. AdaNet (Cortes et al., 2016) maps the feature vectors (hidden layer representations) to a classifier space and boosts the weak classifiers. Our framework is a multi-channel representation (or information) boosting rather than a traditional classifier boosting. Traditional boosting theory does not apply in our setting.

Algorithm 1 BoostResNet: telescoping sum boosting for binary-class classification Input: m labeled samples [(x i , y i )] m where y i ∈ {-1, +1} and a threshold γ Output:

{f t (•), ∀t} and w T +1 ⊲ Discard w t+1 , ∀t = T 1: Initialize t ← 0, γ0 ← 0, α 0 ← 0, o 0 (x) ← 0 2: Initialize sample weights at round 0: D 0 (i) ← 1/m, ∀i ∈ [m] 3: while γ t > γ do 4: f t (•), α t+1 , w t+1 , o t+1 (x) ← Algorithm 2(g t (x), D t , o t (x), α t ) 5: Compute γ t ← γ2 t+1 -γ 2 t 1-γ 2 t ⊲ where γt+1 ← E i∼Dt [y i o t+1 (x i )] 6: Update D t+1 (i) ← Dt(i) exp(-yiht(xi)) m i=1 Dt(i) exp[-yiht(xi)] ⊲ where h t (x) = α t+1 o t+1 (x) -α t o t (x) 7: t ← t + 1 8: end while 9: T ← t -1 Theorem 4.2. [ Training error bound ]

The training error of a T -module telescoping sum boosting framework using Algorithms 1 and 2 decays exponentially with the number of modules T ,

Pr i∼S σ t h t (x i ) = y i ≤ e -1 2 T γ 2

Algorithm 2 BoostResNet: oracle implementation for training a ResNet module Input: g t (x),D t ,o t (x) and α t Output: f t (•), α t+1 , w t+1 and o t+1 (x)

1: (f t , α t+1 , w t+1 ) ← arg min (f,α,v) m i=1 D t (i) exp -y i αv ⊤ [f (g t (x i )) + g t (x i )] + y i α t o t (x i ) 2: o t+1 (x) ← w ⊤ t+1 [f t (g t (x)) + g t (x)] if ∀t ∈ [T ]

the weak module classifier h t (x) satisfies the γ-weak learning condition defined in Definition 4.1.

The training error of Algorithms 1 and 2 is guaranteed to decay exponentially with the ResNet depth even when each hypothesis module o t+1 (x) performs slightly better than its previous hypothesis module o t (x) (i.e., γ > 0). Refer to Appendix F for the algorithm and theoretical guarantees for multiclass classification.

4.3. ORACLE IMPLEMENTATION FOR RESNET:

In Algorithm 2, the implementation of the oracle at line 1 is equivalent to

EQUATION

The minimization problem over f corresponds to finding the weights of the t-th nonlinear module of the residual network. Auxiliary classifier w t+1 is used to help solve this minimization problem with the guidance of training labels y i . However, the final neural network model includes none of the auxiliary classifiers, and still follows a standard ResNet structure (proved in Lemma 3.2). In practice, there are various ways to implement Equation (6). For instance, Janzamin et. al. (Janzamin et al., 2015) propose a tensor decomposition technique which decomposes a tensor formed by some transformation of the features x combined with labels y and recovers the weights of a one-hidden layer neural network with guarantees. One can also use back-propagation as numerous works have shown that gradient based training are relatively stable on shallow networks with identity loops (Hardt & Ma, 2016; He et al., 2016) .

Computational and Memory Efficiency It is worth noting that BoostResNet training is memory efficient as the training process only requires parameters of two consecutive residual blocks to be in memory. Given that the limited GPU memory being one of the main bottlenecks for computational efficiency, BoostResNet requires significantly less training time than e2eBP in deep networks as a result of reduced communication overhead and the speed-up in shallow gradient forwarding and back-propagation. Let M 1 be the memory required for one module, and M 2 be the memory required for one linear classifier, the memory consumption is M 1 + M 2 by BoostResNet and M 1 T + M 2 by e2eBP. Let the flops needed for gradient update over one module and one linear classifier be C 1 and C 2 respectively, the computation cost is C 1 + C 2 by BoostResNet and C 1 T + C 2 by e2eBP.

4.4. GENERALIZATION ERROR ANALYSIS:

In this section, we analyze the generalization error to understand the possibility of overfitting under Algorithm 1. The strong classifier or the ResNet is F (x) = t ht(x) αT +1 . Now we define the margin for example (x, y) as yF (x). For simplicity, we consider MLP-ResNet with n multiple channels and assume that the weight vector connecting a neuron at layer t with its preceding layer neurons is l 1 norm bounded by Λ t,t-1 . Recall that there exists a linear classifier w on top, and we restrict to l 1 norm bounded classifiers, i.e., w

1 ≤ C 0 < ∞. The expected training examples are l ∞ norm bounded r ∞ def = E S∼D max i∈[m] x i ∞ < ∞.

We introduce Corollary 4.3 which follows directly from Lemma 2 of (Cortes et al., 2016) .

Corollary 4.3. (Cortes et al., 2016) Let D be a distribution over X × Y and S be a sample of m examples chosen independently at random according to D. With probability at least 1 -δ, for θ > 0,

the strong classifier F (x) (ResNet) satisfies that Pr D (yF (x) ≤ 0) ≤ Pr S (yF (x) ≤ θ) + 4C 0 r ∞ θ log(2n) 2m T t=1 Λ t + 2 θ log T m + β(θ, m, T, δ) (7)

where

Λ t def = t t ′ =1 2Λ t ′ ,t ′ -1 and β(θ, m, T, δ) def = 4 θ 2 log θ 2 m log T log T m + log 2 δ 2m .

From Corollary 4.3, we obtain a generalization error bound in terms of margin bound This corollary suggests that stronger weak module classifiers which produce higher accuracy predictions and larger edges, will yield larger margins and suffer less from overfitting. The larger the value of θ, the smaller the term 4C0r∞ θ log(2n) 2m

T t=1 Λ t + 2 θ log T m + β(θ, m, T, δ) is.

With larger edges on the training set and when γT +1 < 1, we are able to choose larger values of θ while keeping the error term zero or close to zero.

5. EXPERIMENTS:

We compare our proposed BoostResNet algorithm with e2eBP training a ResNet on the MNIST (LeCun et al., 1998) , street view house numbers (SVHN) (Netzer et al., 2011) , and CIFAR-10 ( Krizhevsky & Hinton, 2009) benchmark datasets. Two different types of architectures are tested: a ResNet where each module is a fully-connected multi-layer perceptron (MLP-ResNet) and a more common, convolutional neural network residual network (CNN-ResNet). In each experiment the architecture of both algorithms is identical, and they are both initialized with the same random seed. As a baseline, we also experiment with standard boosting (AdaBoost.MM Mukherjee & Schapire (2013)) of convolutional modules in appendix H.2 for SVHN and CIFAR-10 datasets. Our experiments are programmed in the Torch deep learning framework for Lua and executed on NVIDIA Tesla P100 GPUs. All models are trained using the Adam variant of SGD Kingma & Ba (2014) .

MLP-ResNet on MNIST:

The MNIST database (LeCun et al., 1998) of handwritten digits has a training set of 60,000 examples, and a test set of 10,000 examples. The data contains ten classes. We test the performance of BoostResNet on MLP-ResNet using MNIST dataset, and compare it with e2eBP baseline. Each residual block is composed of an MLP with a single, 1024-dimensional hidden layer. The training and test error between BoostResNet and e2eBP is in Figure 2 as a function of depth. Surprisingly, we find that training error degrades for e2eBP, although the ResNet's identity loop is supposed to alleviate this problem. Our proposed sequential training procedure, BoostResNet, relieves gradient instability issues, and continues to perform well as depth increases. and about 20,000 test images. We fit a 50-layer, 25-residual-block CNN-ResNet using both Boost-ResNet and e2eBP (figure 3a ). Each residual block is composed of a CNN using 15 3 × 3 filters. We refine the result of BoostResNet by initializing the weights using the result of BoostResNet and run end-to-end back propagation (e2eBP 

CNN-ResNet on CIFAR-10:

The CIFAR-10 dataset is a benchmark dataset composed of 10 classes of small images, such as animals and vehicles. It consists of 50,000 training images and 10,000 test images. We again fit a 50-layer, 25-residual-block CNN-ResNet using both BoostResNet and e2eBP (figure 3b ). BoostResNet training converges to the optimal solution faster than e2eBP. Unlike in the previous two datasets, the efficiency of BoostResNet comes at a cost when training with CIFAR-10. We find that the test accuracy of the e2eBP refined BoostResNet to be slightly lower than that produced by e2eBP.

Weak Learning Condition Check:

The weak learning condition (Definition 4.1) inspired by learning theory is checked in Figure 4 . The required better than random guessing edge γ t is depicted in Figure 4a , it is always greater than 0 and our weak learning condition is thus non-vacuous. In Figure 4b , the representations we learned using BoostResNet is increasingly better (for this classification task) as the depth increases. 

6. CONCLUSIONS AND FUTURE WORKS:

Our proposed BoostResNet algorithm achieves exponentially decaying (with the depth T ) training error under the weak learning condition. BoostResNet is much more computationally efficient compared to end-to-end back-propagation in deep ResNet. More importantly, the memory required by BoostResNet is trivial compared to end-to-end back-propagation. It is particularly beneficial given the limited GPU memory and large network depth. Our learning framework is natural for nondifferentiable data. For instance, our learning framework is amenable to take weak learning oracles using tensor decomposition techniques. Tensor decomposition, a spectral learning framework with theoretical guarantees, is applied to learning one layer MLP in (Janzamin et al., 2015) . We plan to extend our learning framework to non-differentiable data using general weak learning oracles.

Appendix: Learning Deep ResNet Blocks Sequentially using Boosting Theory:

A RELATED WORKS

A.1 LOSS FUNCTION AND ARCHITECTURE SELECTION:

In neural network optimization, there are many commonly-used loss functions and criteria, e.g., mean squared error, negative log likelihood, margin criterion, etc. There are extensive works (Girshick, 2015; Rubinstein & Kroese, 2013; Tygert et al., 2015) on selecting or modifying loss functions to prevent empirical difficulties such as exploding/vanishing gradients or slow learning (Balduzzi et al., 2017) . However, there are no rigorous principles for selecting a loss function in general. Other works consider variations of the multilayer perceptron (MLP) or convolutional neural network (CNN) by adding identity skip connections (He et al., 2016) , allowing information to bypass particular layers. However, no theoretical guarantees on the training error are provided despite breakthrough empirical successes. Hardt et al. (Hardt & Ma, 2016) have shown the advantage of identity loops in linear neural networks with theoretical justifications; however the linear setting is unrealistic in practice.

A.2 LEARNING ALGORITHM DESIGN:

There have been extensive works on improving BP (LeCun et al., 1989) . For instance, momentum (Qian, 1999), Nesterov accelerated gradient (Nesterov, 1983) , Adagrad (Duchi et al., 2011) and its extension Adadelta (Zeiler, 2012) . Most recently, Adaptive Moment Estimation (Adam) (Kingma & Ba, 2014) , a combination of momentum and Adagrad, has received substantial success in practice. All these methods are modifications of stochastic gradient descent (SGD), but our method only requires an arbitrary oracle, which does not necessarily need to be an SGD solver, that solves a relatively simple shallow neural network.

B PROOF FOR LEMMA 3.2: THE STRONG LEARNER IS A RESNET:

Proof. In our algorithm, the input of the next module is the output of the current module

EQUATION

we thus obtain that each weak learning module is

EQUATION

and similarly

EQUATION

)

Therefore the sum over h t (x) and h t+1 (x) is

EQUATION

And we further see that the weighted summation over all h t (x) is a telescoping sum

EQUATION

C PROOF FOR THEOREM 4.2: BINARY CLASS TELESCOPING SUM BOOSTING THEORY Proof. We will use a 0-1 loss to measure the training error. In our analysis, the 0-1 loss is bounded by exponential loss.

The training error is therefore bounded by

EQUATION

)

where

Z t = m i=1 D t (i) exp (-y i h t (x i )).

We choose α t+1 to minimize Z t .

EQUATION

Furthermore each learning module is bounded as we see in the following analysis. We obtain

EQUATION

EQUATION

EQUATION

Equation ( 24) is due to the non-positive correlation between exp(-yo t+1 (x)) and exp(yo t (x)).

Jensen's inequality in Equation ( 27) holds only when |y i o t+1 (x i )| ≤ 1 which is satisfied by the definition of the weak learning module.

The algorithm chooses α t+1 to minimize Z t . We achieve an upper bound on Z t ,

1-γ 2 t 1-γ 2 t-1

by minimizing the bound in Equation ( 30)

EQUATION

)

Therefore over the T modules, the training error is upper bounded as follows

EQUATION

Overall, Algorithm 1 leads us to consistent learning of ResNet.

D PROOF FOR COROLLARY 4.3: GENERALIZATION BOUND:

Rademacher complexity technique is powerful for measuring the complexity of H any family of functions h : X → R, based on easiness of fitting any dataset using classifiers in H (where X is any space). Let S =< x 1 , . . . , x m > be a sample of m points in X . The empirical Rademacher complexity of H with respect to S is defined to be

EQUATION

)

where σ is the Rademacher variable. The Rademacher complexity on m data points drawn from distribution D is defined by 2014)) Let H be a hypothesis set admitting a decomposition H = ∪ l i=1 H i for some l > 1. H i are distinct hypothesis sets. Let S be a random sequence of m points chosen independently from X according to some distribution D. For θ > 0 and any H = T t=1 h t , with probability at least 1 -δ, 

EQUATION

EQUATION

EQUATION

D.1 RESNET MODULE HYPOTHESIS SPACE:

Let n be the number of channels in ResNet, i.e., the number of input or output neurons in a module f t (g t (x)). We have proved that ResNet is equivalent as

EQUATION

We define the family of functions that each neuron f t,j , ∀j ∈ [n] belong to as

EQUATION

where u t-1,j denotes the vector of weights for connections from unit j to a lower layer t -1, σ • f t-1 denotes element-wise nonlinear transformation on f t-1 . The output layer of each module is connected to the output layer of previous module. We consider 1-layer modules for convenience of analysis.

Therefore in ResNet with probability at least 1 -δ,

EQUATION

for all f t ∈ F t .

Define the maximum infinity norm over samples as r 

∞ def = E S∼D max i∈[m] x i

EQUATION

Overall, with probability at least 1 -δ,

EQUATION

for all f t ∈ F t .

E PROOF FOR THEOREM E: MARGIN AND GENERALIZATION BOUND -1 ) θ 2 exp(-1 2 γ 2 T ). And the generalization error

EQUATION

with probability at least 1 -δ for β(θ, m, T, δ)

def = 4 θ 2 log θ 2 m log T log T m + log 2 δ 2m .

Now the proof for Theorem E is the following.

Proof. The fraction of examples in sample set S being smaller than θ is bounded

EQUATION

To bound exp(θα T +1 ) = ( 1+γT +1 1-γT +1 ) θ , we first bound γT +1 : We know that

EQUATION

Therefore Pr S

F TELESCOPING SUM BOOSTING FOR MULTI-CALSS CLASSIFICATION:

Recall that the weak module classifier is defined as

EQUATION

where o t (x) ∈ ∆ C-1 .

The weak learning condition for multi-class classification is different from the binary classification stated in the previous section, although minimal demands placed on the weak module classifier require prediction better than random on any distribution over the training set intuitively.

We now define the weak learning condition. It is again inspired by the slightly better than random idea, but requires a more sophisticated analysis in the multi-class setting.

F.1 COST MATRIX:

In order to characterize the training error, we introduce the cost matrix C ∈ R m×C where each row denote the cost incurred by classifying that example into one of the C categories. We will bound the training error using exponential loss, and under the exponential loss function defined as in Definition G.1, the optimal cost function used for best possible training error is therefore determined.

Lemma F.1. The optimal cost function under the exponential loss is

EQUATION

)

where s t (x) = Ct-1(i,l)

. A multi-class weak module classifier h t (x) = α t+1 o t+1 (x) -α t o t (x) satisfies the γ-weak learning condition if

γ2 t+1 -γ 2 t 1-γ 2 t ≥ γ 2 > 0, and Cov(< C t (i, :), o t+1 (x i ) >, < C t (i, :), o t+1 (x i ) >) ≥ 0.

We propose a novel learning algorithm using the optimal edge-over-random cost function for training ResNet under multi-class classification task as in Algorithm 3.

Theorem F.3. The training error of a T -module ResNet using Algorithm 3and 4 decays exponentially with the depth of the ResNet T , 

EQUATION

⊲ Discard w t+1 , ∀t = T 1: Initialize t ← 0, γ0 ← 1, α 0 ← 0, o 0 ← 0 ∈ R C , s 0 (x i , l) = 0, ∀i ∈ [m], l ∈ Y 2: Initialize cost function C 0 (i, l) ← 1 if l = y i 1 -C if l = y i 3: while γ t > γ do 4: f t (•), α t+1 , W t+1 , o t+1 (x) ← Algorithm 4(g t (x), C t , o t (x), α t ) 5: Compute γ t ← γ2 t+1 -γ 2 t 1-γ 2 t ⊲ where γt+1 ← - m i=1 Ct(i,:)•ot+1(xi) m i=1 l =y i Ct(i,l) 6: Update s t+1 (x i , l) ← s t (x i , l) + h t (x i , l) ⊲ where h t (x i , l) = α t+1 o t+1 (x i , l) -α t o t (x i , l) 7: Update cost function C t+1 (i, l) ← e st+1(xi,l)-st+1(xi,yi) if l = y i - l ′ =yi e st+1(xi,l ′ )-st+1(xi,yi) if l = y i 8: t ← t +

Output: f t (•), α t+1 , W t+1 and o t+1 (x) 1: (f t , α t+1 , W t+1 ) ← arg min (f,α,V ) m i=1 l =yi e αV ⊤ [f (gt(xi),l)-f (gt(xi),yi)+gt(xi,l)-gt(xi,yi)] 2: o t+1 (x) ← W ⊤ t+1 [f t (g t (x)) + g t (x)] F.3 ORACLE IMPLEMENTATION

We implement an oracle to minimize Z t def = m i=1 l =yi e st(xi,l)-st(xi,yi) e ht(xi,l)-ht(xi,yi) given current state s t and hypothesis module o t (x). Therefore minimizing Z t is equivalent to the following.

min (f,α,V ) m i=1 l =yi

e st(xi,l)-st(xi,yi) e -αt(ot(xi,l)-ot(xi,yi)) e αV ⊤ [f (gt(xi),l)-f (gt(xi),yi)+gt(xi,l)-gt(xi,yi)]

(63)

EQUATION

G PROOF FOR THEOREM F.3 MULTICLASS BOOSTING THEORY Proof. To characterize the training error, we use the exponential loss function Definition G.1. Define loss function for a multiclass hypothesis H(x i ) on a sample (x i , y i ) as

EQUATION

Define the accumulated weak learner s

EQUATION

Note that Z 0 = 1 m as the initial accumulated weak learners s 0 (x i , l) = 0. The loss fraction between module t and t e st-1(xi,l)-st-1(xi,yi) e αt + e -αt 2 (73) Besides e2eBP, we also experiment with standard boosting (AdaBoost. MM Mukherjee & Schapire (2013) ), as another baseline, of convolutional modules. In this experiment, each weak learner is a residual block of the ResNet, paired with a classification layer. We do 25 rounds of AdaBoost.MM and train each weak learner to convergence. after searching over candidate hyperparamters, we choose learning rate to be 0.004 with a 9 × 10 -5 learning rate decay. The gamma threshold is set to be 0.001 and the initial gamma value on SVHN is 0.75.

EQUATION

EQUATION

On CIFAR-10 dataset, the main advantage of BoostResNet over e2eBP is the speed of training. BoostResNet refined with e2eBP obtains comparable results with e2eBP. This is because we are using a suboptimal architecture of ResNet which overfits the CIFAR-10 dataset. AdaBoost, on the other hand, is known to be resistant to overfitting. Therefore, AdaBoost achieves the highest test accuracy on CIFAR-10. To list the hyperparameters we use in our BoostResNet training after searching over candidate hyperparamters, we choose learning rate to be 0.014 with a 3.46 × 10 -5 learning rate decay. The gamma threshold is set to be 0.007 and the initial gamma value on CIFAR-10 is 0.93. 

:



Figures and Tables:

Figure 1: The architecture of a residual network (ResNet).

(θ, m, T, δ). Larger margin bound (larger θ) contributes positively to generalization accuracy, and l 1 norm bounded weights (smaller T t=1 Λ t ) are beneficial to control network complexity and to avoid overfitting. The dominant term in the network complexity is 4C0r∞ θ log(2n) 2mT t=1 Λ t which scales as least linearly with the depth T . See appendix D for the proof.

Figure 2: Comparison of BoostResNet (ours, blue) and e2eBP (baseline, red) on multilayer perceptron residual network on MNIST dataset.

Figure 3: Convergence performance comparison between e2eBP and BoostResNet on the SVHN and CIFAR-10 dataset. The vertical dotted line shows when BoostResNet training stopped, and we began refining the network with standard e2eBP training.

Figure 4: Visualization of required larger than 0 edge γ t and edge for each residual block γt . The x-axis represents depth, and the y-axis represents γ t or γt values. The plots are for a convolutional network composed of 50 residual blocks and trained on the SVHN dataset.

) Proposition D.1. (Theorem 1 Cortes et al. (

[ Generalization error bound ] Given algorithm 1, the fraction of training examples with margin at most θ is at most (

e st(xi,l)-st(xi,yi) e αt+1ot+1(xi,l)-αt+1ot+1(xi,yi) m i=1 l =yi e e -αtot(xi,l)+αtot(xi,yi)   e st(xi,l)-st(xi,yi) e -αt+1 + e αt+1 2 + e -αt+1 -e αt+1 2 (o t+1 (x i , y i ) -o t+1 (x i , l))m i=1 l =yi

Figure 5: Convergence of e2eBP (baseline) on multilayer perceptron residual network (of various depths) on MNIST dataset.

). From figure3a, our BoostResNet converges much faster (requires much fewer gradient updates) than e2eBP. The test accuracy of BoostResNet is comparable with e2eBP.

Table content: <table><tr><td/><td>1.0</td><td/><td/><td/><td>1.0</td><td/></tr><tr><td/><td>0.9</td><td/><td/><td/><td>0.9</td><td/></tr><tr><td/><td>0.8</td><td/><td/><td/><td>0.8</td><td/></tr><tr><td>Accuracy</td><td>0.5 0.6 0.7</td><td/><td>BoostResNet Training</td><td>Accuracy</td><td>0.5 0.6 0.7</td><td/><td>BoostResNet Training</td></tr><tr><td/><td>0.4</td><td/><td>BoostResNet Test</td><td/><td>0.4</td><td/><td>BoostResNet Test</td></tr><tr><td/><td>0.3</td><td/><td>e2eBP Training e2eBP Test</td><td/><td>0.3</td><td/><td>e2eBP Training e2eBP Test</td></tr><tr><td/><td>0.2</td><td/><td/><td/><td>0.2</td><td/></tr><tr><td/><td>10 7</td><td>10 8</td><td>10 9</td><td/><td>10 7</td><td>10 8</td><td>10 9</td><td>10 10</td></tr><tr><td/><td/><td colspan="2">Number of Gradient Updates</td><td/><td/><td colspan="2">Number of Gradient Updates</td></tr><tr><td/><td/><td>(a) SVHN</td><td/><td/><td/><td colspan="2">(b) CIFAR-10</td></tr></table>

36)for all h t ∈ H kt . Let h = w⊤f , where w ∈ R n , f ∈ R n .Let H and F be two hypothesis sets, and h ∈ H , fj ∈ F , ∀j ∈ [n]. The Rademacher complexity of H and F with respect to m points from D are related as follows R m

Table content: <table><tr><td>Lemma D.2.</td></tr></table>

∞ and the product of l 1 norm bound on weights as Λ t =1 2Λ t ′ ,t ′ -1 . According to lemma 2 ofCortes et al. (2016), the empirical Rademacher complexity is bounded as a function of r ∞ , Λ t and n:

Table content: <table><tr><td>def = t ′ R m t</td></tr></table>

Algorithm 3 BoostResNet: telescoping sum boosting for multi-class classification Input: Given (x 1 , y 1 ), . . . (x m , y m ) where y i ∈ Y = {1, . . . , C} and a threshold γ Output: {f t (•),∀t} and W T +1

Table content: <table/>

Algorithm 4 BoostResNet: oracle implementation for training a ResNet module (multi-class) Input: g t (x),s t ,o t (x) and α t

Table content: <table><tr><td>1</td></tr><tr><td>9: end while</td></tr><tr><td>10: T ← t -1</td></tr></table>

Therefore over the T modules, the training error is upper bounded as followsPr i∼D (p(α T +1 w ⊤ T +1 g T +1 (x i ))) = y i ) ≤TRAINING ERROR DEGRADATION OF E2EBP ON RESNET We investigate e2eBP training performance on various depth ResNet. Surprisingly, we observe a training error degradation for e2eBP although the ResNet's identity loop is supposed to alleviate this problem. Despite the presence of identity loops, the e2eBP eventually is susceptible to spurious local optima. This phenomenon is explored further in Figures 5a and 5b, which respectively show how training and test accuracies vary throughout the fitting process. Our proposed sequential training procedure, BoostResNet, relieves gradient instability issues, and continues to perform well as depth increases.

Table content: <table><tr><td colspan="7">by minimizing the bound in Equation (77)</td><td/><td/></tr><tr><td>Z t ≤</td><td colspan="4">e -αt+1 + e αt+1 2</td><td>+</td><td colspan="3">e -αt+1 -e αt+1 2</td><td>γt</td><td>e αt + e -αt 2</td><td>αt+1= 1 2 ln(</td><td>1+γ t 1-γ t )</td><td>(78)</td></tr><tr><td>=</td><td colspan="3">1 -γ2 t 1 -γ2 t-1</td><td colspan="3">= 1 -γ 2 t</td><td/><td/><td>(79)</td></tr><tr><td/><td/><td/><td/><td/><td/><td/><td>T t=1</td><td colspan="2">1 -γ 2 t ≤</td><td>T t=1</td><td>1 -γ 2 = exp -</td><td>1 2</td><td>T γ 2</td><td>(80)</td></tr><tr><td colspan="10">Overall, Algorithm 3 and 4 leads us to consistent learning of ResNet.</td></tr><tr><td colspan="3">H EXPERIMENTS</td><td/><td/><td/><td/><td/><td/></tr><tr><td>H.1</td><td/><td/><td/><td/><td/><td/><td/><td/></tr><tr><td/><td/><td/><td/><td/><td/><td/><td/><td colspan="2">(-γ t )Z t-1 )</td><td>e αt + e -αt 2</td><td>(76)</td></tr><tr><td>Therefore</td><td/><td/><td/><td/><td/><td/><td/><td/></tr><tr><td/><td>Z t Z t-1</td><td>≤</td><td colspan="4">e -αt+1 + e αt+1 2</td><td>+</td><td colspan="2">e -αt+1 -e αt+1 2</td><td>γt</td><td>e αt + e -αt 2</td><td>(77)</td></tr><tr><td/><td/><td/><td/><td/><td/><td/><td/><td/><td>1-γ 2 t</td></tr><tr><td/><td/><td/><td/><td/><td/><td/><td/><td/><td>1-γ t-1 2</td></tr></table>

and table 2 exhibit a comparison of BoostResNet, e2eBP and AdaBoost performance on SVHN and CIFAR-10 dataset respectively. On SVHN dataset, the advantage of BoostResNet over e2eBP is obvious. Using 3 × 10 8 number of gradient updates, BoostResNet achieves 93.8% test accuracy whereas e2eBP obtains a test accuracy of 83%. The training and test accuracies of SVHN are listed in Table 1. BoostResNet training allows the model to train much faster than end-to-end training, and still achieves the same test accuracy when refined with e2eBP. To list the hyperparameters we use in our BoostResNet training

Table content: <table/>

Accuracies of SVHN task. NGU is the number of gradient updates taken by the algorithm in training.

Table content: <table><tr><td colspan="3">TRAINING: BOOSTRESNET E2EBP</td><td>BOOSTRESNET+E2EBP</td><td>E2EBP</td><td>ADABOOST</td></tr><tr><td>NGU</td><td>3 × 10 8</td><td>3 × 10 8</td><td>2 × 10 10</td><td>2 × 10 10</td><td>1.5 × 10 9</td></tr><tr><td>TRAIN</td><td>96.9%</td><td>85%</td><td>98.8%</td><td>98.8%</td><td>95.6%</td></tr><tr><td>TEST</td><td>93.8%</td><td>83%</td><td>96.8%</td><td>96.8%</td><td>92.3%</td></tr><tr><td colspan="3">TRAINING: BOOSTRESNET E2EBP</td><td>BOOSTRESNET+E2EBP</td><td>E2EBP</td><td>ADABOOST</td></tr><tr><td>NGU</td><td>3 × 10 9</td><td>3 × 10 9</td><td>1 × 10 11</td><td>1 × 10 11</td><td>1.5 × 10 10</td></tr><tr><td>TRAIN</td><td>92.1%</td><td>82%</td><td>99.6%</td><td>99.7%</td><td>95.6%</td></tr><tr><td>TEST</td><td>82.1%</td><td>80%</td><td>88.1%</td><td>90.0%</td><td>92.3%</td></tr></table>

Accuracies of CIFAR-10 task. NGU is the number of gradient updates taken by the algorithm in training.

Table content: <table/>

Peer review (iclr2018):
 This paper formulates the deep ResNet as a boosting algorithm. Based on this formulation, the authors prove that the generalization error bound decays exponentially with respect to the number of residual blocks. Further, a greedy block-wise training procedure is proposed to optimized ResNet-like neural networks. The authors claim that this algorithm is more efficient than standard end-to-end backpropagation (e2eBP) algorithm in terms of time and memory consumption. Overall, the paper is well organized and easy to follow. I find that using the boosting theory to analyze the ResNet architecture quite interesting. My concerns are mainly on the proposed BoostResNet algorithm. 1. I don’t quite understand why the sequentially training procedure is more time efficient than e2eBP. It is true that BoostResNet trains each block quite efficiently. However, there are T blocks need to be trained sequentially. In comparison, e2eBP updates *all* the blocks at each training iteration. 2. The claim that BoostResNet is memory efficient may not hold in practice. I agree that the GPU memory consumption is much lower than in e2eBP. However, this only holds *under the assumption that the intermediate outputs of a previous block are stored to disk*. Unfortunately, this assumption is not practical for real problems: the intermediate outputs usually requires much more space of the original datasets. What makes thing worse, the widely used data augmentation techniques (horizontal flip, shift, etc.) would further make the space requirement hundreds of or even thousands of times larger. 3. The results in Figure 2 seem quite surprising to me, as the ResNet architectures is supposed to be quite robust when the network goes deeper. Have you tried the convolutional ResNet structure used in their original paper? 4. In Figure 3, how did you measure the number of gradient updates? In the original ResNet paper, the number of iterations required to train a model is 164(epochs)*50000(training samples)/128(batch-size)=6.4x10^5, which is far less than that showing in this figure. 5. In Figure 3, it seems that the algorithms are not fully converged, and on CIFAR-10 the e2eBP outperforms BoostResNet eventually. Is there any explanations?