AdaNet: Adaptive Structural Learning of Artificial Neural Networks

Corinna Cortes, Xavi Gonzalvo, Vitaly Kuznetsov, Mehryar Mohri, Scott Yang

Introduction

Deep neural networks form a powerful framework for machine learning and have achieved a remarkable performance in several areas in recent years. Representing the input through increasingly more abstract layers of feature representation has shown to be extremely effective in areas such as natural language processing, image captioning, speech recognition and many others (Krizhevsky et al., 2012; Sutskever et al., 2014). However, despite the compelling arguments for using neural networks as a general template for solving machine learning problems, training these models and designing the right network for a given task has been filled with many theoretical gaps and practical concerns.

To train a neural network, one needs to specify the parameters of a typically large network architecture with several layers and units, and then solve a difficult non-convex optimization problem. From an optimization perspective, there is no guarantee of optimality for a model obtained in this way, and often, one needs to implement ad hoc methods (e.g. gradient clipping or batch normalization (Pascanu et al., 2013; Ioffe & Szegedy, 2015)) to derive a coherent models.

Moreover, if a network architecture is specified a priori and trained using back-propagation, the model will always have as many layers as the one specified because there needs to be at least one path through the network in order for the hypothesis to be non-trivial. While single weights may be pruned (Han et al., 2015), a technique originally termed Optimal Brain Damage (LeCun et al., 1990), the architecture itself is unchanged. This imposes a stringent lower bound on the complexity of the model. Since not all machine learning problems admit the same level of difficulty and different tasks naturally require varying levels of complexity, complex models trained with insufficient data can be prone to overfitting. This places a burden on a practitioner to specify an architecture at the right level of complexity which is often hard and requires significant levels of experience and domain knowledge. For this reason, network architecture is often treated as a hyperparameter which is tuned using a validation set. The search space can quickly become exorbitantly large (Szegedy et al., 2015; He et al., 2015) and large-scale hyperparameter tuning to find an effective network architecture is wasteful of data, time, and resources (e.g. grid search, random search (Bergstra et al., 2011)).

In this paper, we attempt to remedy some of these issues. In particular, we provide a theoretical analysis of a supervised learning scenario in which the network architecture and parameters are learned simultaneously. To the best of our knowledge, our results are the first generalization bounds for the problem of structural learning of neural networks. These general guarantees can guide the design of a variety of different algorithms for learning in this setting. We describe in depth two such algorithms that directly benefit from the theory that we develop.

In contrast to enforcing a pre-specified architecture and a corresponding fixed complexity, our algorithms learn the requisite model complexity for a machine learning problem in an adaptive fashion. Starting from a simple linear model, we add more units and additional layers as needed. The additional units that we add are carefully selected and penalized according to rigorous estimates from the theory of statistical learning. Remarkably, optimization problems for both of our algorithms turn out to be strongly convex and hence are guaranteed to have a unique global solution which is in stark contrast with other methodologies for training neural networks.

The paper is organized as follows. In Appendix A, we give a detailed discussion of previous work related to this topic. Section 2 describes the broad network architecture and therefore hypothesis set that we consider. Section 3 provides a formal description of our learning scenario. In Section 4, we prove strong generalization guarantees for learning in this setting which guide the design of the algorithm described in Section 5 as well as a variant described in Appendix C. We conclude with experimental results in Section 6.

Network architecture

In this section, we describe the general network architecture we consider for feedforward neural networks, thereby also defining our hypothesis set. To simplify the presentation, we restrict our attention to the case of binary classification. However, all our results can be straightforwardly extended to multi-class classification, including the network architecture by augmenting the number of output units, and our generalization guarantees by using existing multi-class counterparts of the binary classification ensemble margin bounds we use.

A common model for feedforward neural networks is the multi-layer architecture where units in each layer are only connected to those in the layer below. We will consider more general architectures where a unit can be connected to units in any of the layers below, as illustrated by Figure 1. In particular, the output unit in our network architectures can be connected to any other unit. These more general architectures include as special cases standard multi-layer networks (by zeroing out appropriate connections) as well as somewhat more exotic ones (He et al., 2015; Huang et al., 2016).

where p≥1p\geq 1 defines an lpl_{p}-norm and Λ1,0≥0\Lambda_{1,0}\geq 0 is a hyperparameter on the weights connecting layer 0 and layer 1. The family of functions hk,jh_{k,j}, j∈[nk]j\in[n_{k}], in a higher layer k>1k>1 is then defined as follows:

where for each unit function hk,sh_{k,s}, us\mathbf{u}_{s} in (2) denotes the vector of weights for connections from that unit to a lower layer s<ks<k. The Λk,s\Lambda_{k,s}s are non-negative hyperparameters and φs∘hs\varphi_{s}\circ\mathbf{h}_{s} abusively denotes a coordinate-wise composition: φs∘hs=(φs∘hs,1,…,φs∘hs,ns)\varphi_{s}\circ\mathbf{h}_{s}=(\varphi_{s}\circ h_{s,1},\ldots,\varphi_{s}\circ h_{s,n_{s}}). The φs\varphi_{s}s are assumed to be 11-Lipschitz activation functions. In particular, they can be chosen to be the Rectified Linear Unit function (ReLU function) x↦max⁡{0,x}x\mapsto\max\{0,x\}, or the sigmoid function x↦11+e−xx\mapsto\frac{1}{1+e^{-x}}. The choice of the parameter p≥1p\geq 1 determines the sparsity of the network and the complexity of the hypothesis sets Hk{\mathscr{H}}_{k}.

For the networks we consider, the output unit can be connected to all intermediate units, which therefore defines a function ff as follows:

We will denote by F{\mathscr{F}} the family of functions ff defined by (3) with the absolute value of the weights summing to one:

Let H~k\widetilde{\mathscr{H}}_{k} denote the union of Hk{\mathscr{H}}_{k} and its reflection, H~k=Hk∪(−Hk)\widetilde{\mathscr{H}}_{k}={\mathscr{H}}_{k}\cup(-{\mathscr{H}}_{k}), and let H{\mathscr{H}} denote the union of the families H~k\widetilde{\mathscr{H}}_{k}: H=⋃k=1lH~k{\mathscr{H}}=\bigcup_{k=1}^{l}\widetilde{\mathscr{H}}_{k}. Then, F{\mathscr{F}} coincides with the convex hull of H{\mathscr{H}}: F=conv⁡(H){\mathscr{F}}=\operatorname{\rm conv}({\mathscr{H}}).

For any k∈[l]k\in[l] we will also consider the family Hk∗{\mathscr{H}}^{*}_{k} derived from Hk{\mathscr{H}}_{k} by setting Λk,s=0\Lambda_{k,s}=0 for s<k−1s<k-1, which corresponds to units connected only to the layer below. We similarly define H~k∗=Hk∗∪(−Hk∗)\widetilde{\mathscr{H}}^{*}_{k}={\mathscr{H}}^{*}_{k}\cup(-{\mathscr{H}}^{*}_{k}) and H∗=∪k=1lHk∗{\mathscr{H}}^{*}=\cup_{k=1}^{l}{\mathscr{H}}^{*}_{k}, and define the F∗{\mathscr{F}}^{*} as the convex hull F∗=conv⁡(H∗){\mathscr{F}}^{*}=\operatorname{\rm conv}({\mathscr{H}}^{*}). Note that the architecture corresponding to the family of functions F∗{\mathscr{F}}^{*} is still more general than standard feedforward neural network architectures since the output unit can be connected to units in different layers.

Learning problem

We consider the standard supervised learning scenario and assume that training and test points are drawn i.i.d. according to some distribution D{\mathscr{D}} over X×{−1,+1}{\mathscr{X}}\times\{-1,+1\} and denote by S=((x1,y1),…,(xm,ym))S=((x_{1},y_{1}),\ldots,(x_{m},y_{m})) a training sample of size mm drawn according to Dm{\mathscr{D}}^{m}.

The learning problem consists of using the training sample SS to determine a function ff defined by (3) with small generalization error R(f)R(f). For an accurate predictor ff, we expect many of the weights to be zero and the corresponding architecture to be quite sparse, with fewer than nkn_{k} units at layer kk and relatively few non-zero connections. In that sense, learning an accurate function ff implies also learning the underlying architecture.

In the next section, we present data-dependent learning bounds for this problem that will help guide the design of our algorithm.

Generalization bounds

Our learning bounds are expressed in terms of the Rademacher complexities of the hypothesis sets Hk{\mathscr{H}}_{k}. The empirical Rademacher complexity of a hypothesis set G{\mathscr{G}} for a sample SS is denoted by R^S(G)\widehat{\mathfrak{R}}_{S}({\mathscr{G}}) and defined as follows:

As pointed out earlier, the family of functions F{\mathscr{F}} is the convex hull of H{\mathscr{H}}. Thus, generalization bounds for ensemble methods can be used to analyze learning with F{\mathscr{F}}. In particular, we can leverage the recent margin-based learning guarantees of Cortes et al. (2014), which are finer than those that can be derived via a standard Rademacher complexity analysis (Koltchinskii & Panchenko, 2002), and which admit an explicit dependency on the mixture weights wk\mathbf{w}_{k} defining the ensemble function ff. That leads to the following learning guarantee.

Fix ρ>0\rho>0. Then, for any δ>0\delta>0, with probability at least 1−δ1-\delta over the draw of a sample SS of size mm from Dm{\mathscr{D}}^{m}, the following inequality holds for all f=∑k=1lwk⋅hk∈Ff=\sum_{k=1}^{l}\mathbf{w}_{k}\cdot\mathbf{h}_{k}\in{\mathscr{F}}:

where C(\rho,l,m,\delta)=\sqrt{\big{\lceil}\frac{4}{\rho^{2}}\log(\frac{\rho^{2}m}{\log l})\big{\rceil}\frac{\log l}{m}+\frac{\log(\frac{2}{\delta})}{2m}}=\widetilde{O}\Big{(}\frac{1}{\rho}\sqrt{\frac{\log l}{m}}\Big{)}.

The proof of this result, as well as that of all other main theorems are given in Appendix B. The bound of the theorem can be generalized to hold uniformly for all ρ∈(0,1]\rho\in(0,1], at the price of an additional term of the form log⁡log⁡2(2/ρ)/m\sqrt{\log\log_{2}(2/\rho)/m} using standard techniques (Koltchinskii & Panchenko, 2002).

Observe that the bound of the theorem depends only logarithmically on the depth of the network ll. But, perhaps more remarkably, the complexity term of the bound is a ∥wk∥1\|\mathbf{w}_{k}\|_{1}-weighted average of the complexities of the layer hypothesis sets Hk{\mathscr{H}}_{k}, where the weights are precisely those defining the network, or the function ff. This suggests that a function ff with a small empirical margin error and a deep architecture benefits nevertheless from a strong generalization guarantee, if it allocates more weights to lower layer units and less to higher ones. Of course, when the weights are sparse, that will imply an architecture with relatively fewer units or connections at higher layers than at lower ones. The bound of the theorem further gives a quantitative guide for apportioning the weights depending on the Rademacher complexities of the layer hypothesis sets.

This data-dependent learning guarantee will serve as a foundation for the design of our structural learning algorithms in Section 5 and Appendix C. However, to fully exploit it, the Rademacher complexity measures need to be made explicit. One advantage of these data-dependent measures is that they can be estimated from data, which can lead to more informative bounds. Alternatively, we can derive useful upper bounds for these measures which can be more conveniently used in our algorithms. The next results in this section provide precisely such upper bounds, thereby leading to a more explicit generalization bound.

We will denote by qq the conjugate of pp, that is 1p+1q=1\frac{1}{p}+\frac{1}{q}=1, and define r∞=max⁡i∈[1,m]∥Ψ(xi)∥∞r_{\infty}=\max_{i\in[1,m]}\|\boldsymbol{\Psi}(x_{i})\|_{\infty}.

Our first result gives an upper bound on the Rademacher complexity of Hk{\mathscr{H}}_{k} in terms of the Rademacher complexity of other layer families.

For any k>1k>1, the empirical Rademacher complexity of Hk{\mathscr{H}}_{k} for a sample SS of size mm can be upper-bounded as follows in terms of those of Hs{\mathscr{H}}_{s}s with s<ks<k:

For the family Hk∗{\mathscr{H}}^{*}_{k}, which is directly relevant to many of our experiments, the following more explicit upper bound can be derived, using Lemma 1.

Let Λk ⁣=∏s=1k2Λs,s−1\Lambda_{k}\!=\prod_{s=1}^{k}2\Lambda_{s,s-1} and Nk ⁣=∏s=1kns−1N_{k}\!=\prod_{s=1}^{k}n_{s-1}. Then, for any k≥1k\geq 1, the empirical Rademacher complexity of Hk∗{\mathscr{H}}_{k}^{*} for a sample SS of size mm can be upper bounded as follows:

Note that NkN_{k}, which is the product of the number of units in layers below kk, can be large. This suggests that values of pp closer to one, that is larger values of qq, could be more helpful to control complexity in such cases. More generally, similar explicit upper bounds can be given for the Rademacher complexities of subfamilies of Hk{\mathscr{H}}_{k} with units connected only to layers k,k−1,…,k−dk,k-1,\ldots,k-d, with dd fixed, d<kd<k. Combining Lemma 2 with Theorem 1 helps derive the following explicit learning guarantee for feedforward neural networks with an output unit connected to all the other units.

Fix ρ>0\rho>0. Let Λk=∏s=1k4Λs,s−1\Lambda_{k}=\prod_{s=1}^{k}4\Lambda_{s,s-1} and Nk ⁣=∏s=1kns−1N_{k}\!=\prod_{s=1}^{k}n_{s-1}. Then, for any δ>0\delta>0, with probability at least 1−δ1-\delta over the draw of a sample SS of size mm from Dm{\mathscr{D}}^{m}, the following inequality holds for all f=∑k=1lwk⋅hk∈F∗f=\sum_{k=1}^{l}\mathbf{w}_{k}\cdot\mathbf{h}_{k}\in{\mathscr{F}}^{*}:

The learning bound of Corollary 1 is a finer guarantee than previous ones by (Bartlett, 1998), (Neyshabur et al., 2015), or (Sun et al., 2016). This is because it explicitly differentiates between the weights of different layers while previous bounds treat all weights indiscriminately. This is crucial to the design of algorithmic design since the network complexity no longer needs to grow exponentially as a function of depth. Our bounds are also more general and apply to more other network architectures, such as those introduced in (He et al., 2015; Huang et al., 2016).

Algorithm

This section describes our algorithm, AdaNet, for adaptive learning of neural networks. AdaNet adaptively grows the structure of a neural network, balancing model complexity with empirical risk minimization. We also describe in detail in Appendix C another variant of AdaNet which admits some favorable properties.

Let {h1,…,hN}\{h_{1},\ldots,h_{N}\} be a subset of H∗{\mathscr{H}}^{*}. In the most general case, NN is infinite. However, as discussed later, in practice, the search is limited to a finite set. For any j∈[N]j\in[N], we will denote by rjr_{j} the Rademacher complexity of the family Hkj{\mathscr{H}}_{k_{j}} that contains hjh_{j}: rj=Rm(Hkj)r_{j}=\mathfrak{R}_{m}({\mathscr{H}}_{k_{j}}).

AdaNet seeks to find a function f=∑j=1Nwjhj∈F∗f=\sum_{j=1}^{N}w_{j}h_{j}\in{\mathscr{F}}^{*} (or neural network) that directly minimizes the data-dependent generalization bound of Corollary 1. This leads to the following objective function:

The optimization problem consisting of minimizing the objective function FF in (4) is defined over a very large space of base functions hjh_{j}. AdaNet consists of applying coordinate descent to (4). In that sense, our algorithm is similar to the DeepBoost algorithm of Cortes et al. (2014). However, unlike DeepBoost, which combines decision trees, AdaNet learns a deep neural network, which requires new methods for constructing and searching the space of functions hjh_{j}. Both of these aspects differ significantly from the decision tree framework. In particular, the search is particularly challenging. In fact, the main difference between the algorithm presented in this section and the variant described in Appendix C is the way new candidates hjh_{j} are examined at each iteration.

2 Description

We start with an informal description of AdaNet. Let B≥1B\geq 1 be a fixed parameter determining the number of units per layer of a candidate subnetwork. The algorithm proceeds in TT iterations. Let lt−1l_{t-1} denote the depth of the neural network constructed before the start of the tt-th iteration. At iteration tt, the algorithm selects one of the following two options:

1. augmenting the current neural network with a subnetwork with the same depth as that of the current network h∈Hlt−1∗B\mathbf{h}\in{\mathscr{H}}^{*B}_{l_{t-1}}, with BB units per layer. Each unit in layer kk of this subnetwork may have connections to existing units in layer k−1k-1 of AdaNet in addition to connections to units in layer k−1k-1 of the subnetwork.

2. augmenting the current neural network with a deeper subnetwork (depth lt−1+1l_{t-1}+1) h′∈Hlt−1∗B\mathbf{h}^{\prime}\in{\mathscr{H}}^{*B}_{l_{t-1}}. The set of allowed connections is defined the same way as for h\mathbf{h}.

The option selected is the one leading to the best reduction of the current value of the objective function, which depends both on the empirical error and the complexity of the subnetwork added, which is penalized differently in these two options.

Figure 2 illustrates this construction and the two options just described. An important aspect of our algorithm is that the units of a subnetwork learned at a previous iteration (say h1,1\mathbf{h}_{1,1} in Figure 2) can serve as input to deeper subnetwork added later (for example h2,2\mathbf{h}_{2,2} or h2,3\mathbf{h}_{2,3} in the Figure). Thus, the deeper subnetworks added later can take advantage of the embeddings that were learned at the previous iterations. The algorithm terminates after TT rounds or if the AdaNet architecture can no longer be extended to improve the objective (4).

More formally, AdaNet is a boosting-style algorithm that applies (block) coordinate descent to (4). At each iteration of block coordinate descent, descent coordinates h\mathbf{h} (base learners in the boosting literature) are selected from the space of functions H∗{\mathscr{H}}^{*}. These coordinates correspond to the direction of the largest decrease in (4). Once these coordinates are determined, an optimal step size in each of these directions is chosen, which is accomplished by solving an appropriate convex optimization problem.

Note that, in general, the search for the optimal descent coordinate in an infinite-dimensional space or even in finite but large sets such as that of all decision trees of some large depth may be intractable, and it is common to resort to a heuristic search (weak learning algorithm) that returns δ\delta-optimal coordinates. For instance, in the case of boosting with trees one often grows trees according to some particular heuristic (Freund & Schapire, 1997).

where Γu=λru+β\Gamma_{\mathbf{u}}=\lambda r_{\mathbf{u}}+\beta and rur_{\mathbf{u}} is \mathfrak{R}_{m}\big{(}{\mathscr{H}}_{l_{t-1}}\big{)} if u=h\mathbf{u}=\mathbf{h} and \mathfrak{R}_{m}\big{(}{\mathscr{H}}_{l_{t-1}+1}\big{)} otherwise. In other words, if min⁡wFt(w,h)≤min⁡wFt(w,h′)\min_{\mathbf{w}}F_{t}(\mathbf{w},\mathbf{h})\leq\min_{\mathbf{w}}F_{t}(\mathbf{w},\mathbf{h}^{\prime}), then

If F(wt−1+w∗)<F(wt−1)F(\mathbf{w}_{t-1}+\mathbf{w}^{*})<F(\mathbf{w}_{t-1}) then we set ft−1=ft+w∗⋅htf_{t-1}=f_{t}+\mathbf{w}^{*}\cdot\mathbf{h}_{t} and otherwise we terminate the algorithm.

There are many different choices for the WeakLearner algorithm. For instance, one may generate a large number of random networks and select the one that optimizes (5.2). Another option is to directly minimize (5.2) or its regularized version:

over both w\mathbf{w} and h\mathbf{h}. Here R(w,h)\mathcal{R}(\mathbf{w},\mathbf{h}) is a regularization term that, for instance, can be used to enforce that ∥us∥p≤Λk,s\|\mathbf{u}_{s}\|_{p}\leq\Lambda_{k,s} in (2). Note that, in general, (5.2) is a non-convex objective. However, we do not rely on finding a global solution to the corresponding optimization problem. In fact, standard guarantees for regularized boosting only require that each h\mathbf{h} that is added to the model decreases the objective by a constant amount (i.e. it satisfies δ\delta-optimality condition) for a boosting algorithm to converge (Rätsch et al., 2001; Luo & Tseng, 1992).

Furthermore, the algorithm that we present in Appendix C uses a weak-learning algorithm that solves a convex sub-problem at each step and that additionally has a closed-form solution. This comes at the cost of a more restricted search space for finding a descent coordinate at each step of the algorithm.

We conclude this section by observing that in our description of AdaNet we have fixed BB for all iterations and only two candidate subnetworks are considered at each step. Our approach easily extends to an arbitrary number of candidate subnetworks (for instance of different depth ll) as well as varying number of units per layer BB. Furthermore, selecting an optimal subnetwork among the candidates is easily parallelizable allowing for efficient and effective search for optimal descent directions.

Experiments

In this section we present the results of our experiments with AdaNet algorithm.

In our first set of experiments, we used the CIFAR-10 dataset (Krizhevsky, 2009). This dataset consists of 60,00060\mathord{,}000 images evenly categorized in 1010 different classes. To reduce the problem to binary classification we considered five pairs of classes: deer-truck, deer-horse, automobile-truck, cat-dog, dog-horse. Raw images have been preprocessed to obtain color histograms and histogram of gradient features. The result is 154154 real valued features with ranges $$.

We compared AdaNet to standard feedforward neural networks (NN) and logistic regression (LR) models. Note that convolutional neural networks are often a more natural choice for image classification problems such as CIFAR-10. However, the goal of these experiments is not to obtain state-of-the-art results for this particular task, but to provide a proof-of-concept illustrating that our structural learning approach can be competitive with traditional approaches for finding efficient architectures and training corresponding networks.

Note that AdaNet algorithm requires the knowledge of complexities rjr_{j}, which in certain cases can be estimated from data. In our experiments, we have used the upper bound in Lemma 2. Our algorithm admits a number of hyperparameters: regularization hyperparameters λ\lambda, β\beta, number of units BB in each layer of new subnetworks that are used to extend the model at each iteration and a bound Λk\Lambda_{k} on weights (u′,u)(\mathbf{u}^{\prime},\mathbf{u}) in each unit. As discussed in Section 5, there are different approaches to finding candidate subnetworks in each iteration. In our experiments, we searched for candidate subnetworks by minimizing (5.2) with R=0\mathcal{R}=0. This also requires a learning rate hyperparameter η\eta. These hyperparamers have been optimized over the following ranges: λ∈{0,10−8,10−7,10−6,10−5,10−4}\lambda\in\{0,10^{-8},10^{-7},10^{-6},10^{-5},10^{-4}\}, B∈{100,150,250}B\in\{100,150,250\}, η∈{10−4,10−3,10−2,10−1}\eta\in\{10^{-4},10^{-3},10^{-2},10^{-1}\}. We have used a single Λk\Lambda_{k} for all k>1k>1 optimized over {1.0,1.005,1.01,1.1,1.2}\{1.0,1.005,1.01,1.1,1.2\}. For simplicity, β=0\beta=0.

Neural network models also admit learning rate η\eta and regularization coefficient λ\lambda as hyperparameters, as well as the number of hidden layers ll and number of units nn in each hidden layer. The range of η\eta was the same as for AdaNet and we varied ll in {1,2,3}\{1,2,3\}, nn in {100,150,512,1024,2048}\{100,150,512,1024,2048\} and λ∈{0,10−5,10−4,10−3,10−2,10−1}\lambda\in\{0,10^{-5},10^{-4},10^{-3},10^{-2},10^{-1}\}. Logistic regression only admits η\eta and λ\lambda as its hyperparameters that were optimized over the same ranges. Note that the total number of hyperparameter settings for AdaNet and standard neural networks is exactly the same. Furthermore, the same holds for the number of hyperparameters that determine resulting architecture of the model: Λ\Lambda and BB for AdaNet and ll and nn for neural network models. Observe that while a particular setting of ll and nn determines a fixed architecture Λ\Lambda and BB parameterize a structural learning procedure that may result in a different architecture depending on the data.

In addition to the grid search procedure, we have conducted a hyperparameter optimization for neural networks using Gaussian process bandits (NN-GP), which is a sophisticated Bayesian non-parametric method for response-surface modeling in conjunction with a bandit algorithm (Snoek et al., 2012). Instead of operating on a pre-specified grid, this allows one to search for hyperparameters in a given range. We used the following ranges: λ∈[10−5,1]\lambda\in[10^{-5},1], η∈[10−5,1]\eta\in[10^{-5},1], l∈l\in and n∈n\in. This algorithm was run for 500 trials which is more than the number of hyperparameter settings considered by AdaNet and NN. Observe that this search procedure can also be applied to our algorithm but we choose not to do it in this set of experiments to further demonstrate competitiveness of the structural learning approach.

In all experiments we use ReLu activations. NN, NN-GP and LR are trained using stochastic gradient method with batch size of 100 and maximum of 10,000 iterations. The same configuration is used for solving (5.2). We use T=30T=30 for AdaNet in all our experiments although in most cases algorithm terminates after 10 rounds.

In each of the experiments, we used standard 10-fold cross-validation for performance evaluation and model selection. In particular, the dataset was randomly partitioned into 10 folds, and each algorithm was run 10 times, with a different assignment of folds to the training set, validation set and test set for each run. Specifically, for each i∈{0,…,9}i\in\{0,\ldots,9\}, fold ii was used for testing, fold i+1 (mod 10)i+1~{}(\text{mod}~{}10) was used for validation, and the remaining folds were used for training. For each setting of the parameters, we computed the average validation error across the 10 folds, and selected the parameter setting with maximum average accuracy across validation folds. We report average accuracy (and standard deviations) of the selected hyperparameter setting across test folds in Table 1.

Our results show that AdaNet outperforms other methods on each of the datasets. The average architectures for all label pairs are provided in Table 2. Note that NN and NN-GP always selects one layer architecture. The architectures selected by AdaNet typically also have just one layer and fewer nodes than those selected by NN and NN-GP. However, on a more challenging problem cat-dog AdaNet opts for a more complex model with two layers which results in a better performance. This further illustrates that our approach allows to learn network architectures in adaptive fashion depending on the complexity of the given problem.

As discussed in Section 5, various different heuristics can be used to generate candidate subnetworks on each iteration of AdaNet. In the second set of experiments we have varied objective function (5.2), as well as the domain over which it is optimized. This allows us to study sensitivity of AdaNet to the choice of heuristic that is used to generate candidate subnetworks. In particular, we have considered the following variants of AdaNet. AdaNet.R uses R(w,h)=Γh∥w∥1\mathcal{R}(\mathbf{w},\mathbf{h})=\Gamma_{\mathbf{h}}\|w\|_{1} as a regularization term in (5.2). As AdaNet architecture grows, each new subnetwork is connected to all the previous subnetworks which significantly increases the number of connections in the network and overall complexity of the model. AdaNet.P and AdaNet.D are restricting connections to existing subnetworks in different ways. AdaNet.P connects each new subnetwork only to subnetwork that was added on the previous iteration. AdaNet.D uses dropout on the connections to previously added subnetworks.

Finally, AdaNet uses an upper bound on Rademacher complexity from Lemma 2. AdaNet.SD uses standard deviations of the outputs of the last hidden layer on the training data as surrogate for Rademacher complexities. The advantage of using this data-dependent measure of complexity is that it eliminates hyperparameter Λ\Lambda reducing the hyperparameter search space. We report average accuracies across test folds for deer-truck pair in Table 3.

2 Criteo Click Rate Prediction

We also compared AdaNet to NN on Criteo Click Rate Prediction dataset https://www.kaggle.com/c/criteo-display-ad-challenge. This dataset consists of 7 days of data where each instance is an impression and a binary label (clicked or not clicked). Each impression has 13 count features and 26 categorical features. Count features have been transformed by taking the natural logarithm. The values of categorical features appearing less than 100 times are replaced by zeros. The rest of the values are then converted to integers which are then used as keys to look up embeddings (that are trained together with each model). If the number of possible values for a feature xx is d(x)d(x), then embedding dimension is set to 6d(f)1/46d(f)^{1/4} for d(f)>25d(f)>25. Otherwise, embedding dimension is d(f)d(f). Missing feature values are set to zero.

We have split training set provided in the link above into training, validation and test set.Note that test set provided in this link does not have ground truth labels and can not be used in our experiments. Our training set received the first 5 days of data (32,743,299 instances) and validation and test sets consist of 1 day of data (6,548,659 instances).

Gaussian processes bandits were used to find the best hyperparameter settings on validation set both for AdaNet and NN. For AdaNet we have optimized over the following hyperparameter ranges: B∈125,256,512B\in{125,256,512}, Λ∈[1,1.5]\Lambda\in[1,1.5], η∈[10−4,10−1]\eta\in[10^{-4},10^{-1}], λ∈[10−12,10−4]\lambda\in[10^{-12},10^{-4}]. For NN the ranges were as follows: l∈l\in, n∈n\in, η∈[10−5,10−1]\eta\in[10^{-5},10^{-1}], λ∈[10−6,10−1]\lambda\in[10^{-6},10^{-1}]. We train NNs for 100,000 iterations using mini-batch stochastic gradient method with batch size of 512. Same configuration is used at each iteration of AdaNet to solve (5.2). The maximum number of hyperparameter trials is 2,000 for both methods. Results are presented in Table 4. In this experiment, NN chooses architecture with four hidden layer and 512 units in each hidden layer. Remarkbly, AdaNet achieves a better accuracy with an architecture consisting of single layer with just 512 nodes. While the difference in performance appears small it is statistically significant on this challenging task.

Conclusion

We presented a new framework and algorithms for adaptively learning artificial neural networks. Our algorithm, AdaNet, benefits from strong theoretical guarantees. It simultaneously learns a neural network architecture and its parameters by balancing a trade-off between model complexity and empirical risk minimization. The data-dependent generalization bounds that we presented can help guide the design of alternative algorithms for this problem. We reported favorable experimental results demonstrating that our algorithm is able to learn network architectures that perform better than the ones found via grid search. Our techniques are general and can be applied to other neural network architectures such as CNNs and RNNs.

References

Appendix A Related work

There have been several major lines of research on the theoretical understanding of neural networks. The first one deals with understanding the properties of the objective function used when training neural networks (Choromanska et al., 2014; Sagun et al., 2014; Zhang et al., 2015; Livni et al., 2014; Kawaguchi, 2016). The second involves studying the black-box optimization algorithms that are often used for training these networks (Hardt et al., 2015; Lian et al., 2015). The third analyzes the statistical and generalization properties of the neural networks (Bartlett, 1998; Zhang et al., 2016; Neyshabur et al., 2015; Sun et al., 2016). The fourth takes the generative point of view (Arora et al., 2014, 2015), assuming that the data actually comes from a particular network and then show how to recover it. The fifth investigates the expressive ability of neural networks and analyzing what types of mappings they can learn (Cohen et al., 2015; Eldan & Shamir, 2015; Telgarsky, 2016; Daniely et al., 2016). This paper is most closely related to the work on statistical and generalization properties of neural networks. However, instead of analyzing the problem of learning with a fixed architecture we study a more general task of learning both architecture and model parameters simultaneously. On the other hand, the insights that we gain by studying this more general setting can also be directly applied to the setting with a fixed architecture.

There has also been extensive work involving structure learning for neural networks (Kwok & Yeung, 1997; Leung et al., 2003; Islam et al., 2003; Lehtokangas, 1999; Islam et al., 2009; Ma & Khorasani, 2003; Narasimha et al., 2008; Han & Qiao, 2013; Kotani et al., 1997; Alvarez & Salzmann, 2016). All these publications seek to grow and prune the neural network architecture using some heuristic. More recently, search-based approaches have been an area of active research (Ha et al., 2016; Chen et al., 2015; Zoph & Le, 2016; Baker et al., 2016). In this line of work, a learning meta-algorithm is used to search for an efficient architecture. Once better architecture is found previously trained networks are discarded. This search requires a significant amount of computational resources. To the best of our knowledge, none of these methods come with a theoretical guarantee on their performance. Furthermore, optimization problems associated with these methods are intractable. In contrast, the structure learning algorithms introduced in this paper are directly based on data-dependent generalization bounds and aim to solve a convex optimization problem by adaptively growing network and preserving previously trained components.

Finally, (Janzamin et al., 2015) is another paper that analyzes the generalization and training of two-layer neural networks through tensor methods. Our work uses different methods, applies to arbitrary networks, and also learns a network structure from a single input layer.

Appendix B Proofs

We will use the following structural learning guarantee for ensembles of hypotheses.

where, for each ht∈Hh_{t}\in\mathcal{H}, ktk_{t} denotes the smallest k∈[l]k\in[l] such that ht∈Hkth_{t}\in\mathcal{H}_{k_{t}}.

Fix ρ>0\rho>0. Then, for any δ>0\delta>0, with probability at least 1−δ1-\delta over the draw of a sample SS of size mm from Dm{\mathscr{D}}^{m}, the following inequality holds for all f=∑k=1lwk⋅hk∈Ff=\sum_{k=1}^{l}\mathbf{w}_{k}\cdot\mathbf{h}_{k}\in{\mathscr{F}}:

where C(\rho,l,m,\delta)=\sqrt{\big{\lceil}\frac{4}{\rho^{2}}\log(\frac{\rho^{2}m}{\log l})\big{\rceil}\frac{\log l}{m}+\frac{\log(\frac{2}{\delta})}{2m}}=\widetilde{O}\Big{(}\frac{1}{\rho}\sqrt{\frac{\log l}{m}}\Big{)}.

This result follows directly from Theorem 2. ∎

Theorem 1 can be straightforwardly generalized to the multi-class classification setting by using the ensemble margin bounds of Kuznetsov et al. (2014).

For any k>1k>1, the empirical Rademacher complexity of Hk{\mathscr{H}}_{k} for a sample SS of size mm can be upper-bounded as follows in terms of those of Hs{\mathscr{H}}_{s}s with s<ks<k:

By definition, R^S(Hk)\widehat{\mathfrak{R}}_{S}({\mathscr{H}}_{k}) can be expressed as follows:

By the sub-additivity of the supremum, it can be upper-bounded as follows:

We now bound each term of this sum, starting with the following chain of equalities:

where the second equality holds by definition of the dual norm and the third equality by the following equality:

The following chain of inequalities concludes the proof:

where the second inequality holds by Talagrand’s contraction lemma. ∎

Let Λk ⁣=∏s=1k2Λs,s−1\Lambda_{k}\!=\prod_{s=1}^{k}2\Lambda_{s,s-1} and Nk ⁣=∏s=1kns−1N_{k}\!=\prod_{s=1}^{k}n_{s-1}. Then, for any k≥1k\geq 1, the empirical Rademacher complexity of Hk∗{\mathscr{H}}_{k}^{*} for a sample SS of size mm can be upper bounded as follows:

The empirical Rademacher complexity of H1{\mathscr{H}}_{1} can be bounded as follows:

The result then follows by application of Lemma 1. ∎

Fix ρ>0\rho>0. Let Λk=∏s=1k4Λs,s−1\Lambda_{k}=\prod_{s=1}^{k}4\Lambda_{s,s-1} and Nk ⁣=∏s=1kns−1N_{k}\!=\prod_{s=1}^{k}n_{s-1}. Then, for any δ>0\delta>0, with probability at least 1−δ1-\delta over the draw of a sample SS of size mm from Dm{\mathscr{D}}^{m}, the following inequality holds for all f=∑k=1lwk⋅hk∈F∗f=\sum_{k=1}^{l}\mathbf{w}_{k}\cdot\mathbf{h}_{k}\in{\mathscr{F}}^{*}:

Since F∗{\mathscr{F}}^{*} is the convex hull of H∗{\mathscr{H}}^{*}, we can apply Theorem 1 with Rm(H~k∗)\mathfrak{R}_{m}(\widetilde{\mathscr{H}}^{*}_{k}) instead of Rm(H~k)\mathfrak{R}_{m}(\widetilde{\mathscr{H}}_{k}). Observe that, since for any k∈[l]k\in[l], H~k∗\widetilde{\mathscr{H}}^{*}_{k} is the union of Hk∗{\mathscr{H}}^{*}_{k} and its reflection, to derive a bound on Rm(H~k∗)\mathfrak{R}_{m}(\widetilde{\mathscr{H}}^{*}_{k}) from a bound on Rm(H~k)\mathfrak{R}_{m}(\widetilde{\mathscr{H}}_{k}) it suffices to double each Λs,s−1\Lambda_{s,s-1}. Combining this observation with the bound of Lemma 2 completes the proof. ∎

Appendix C Alternative Algorithm

In this section, we present an alternative algorithm, AdaNet.CVX, that generates candidate subnetworks in closed-form using Banach space duality.

As in Section 5, let ft−1f_{t-1} denote the AdaNet model after t−1t-1 rounds, and let lt−1l_{t-1} be the depth of the architecture. AdaNet.CVX will consider lt−1+1l_{t-1}+1 candidate subnetworks, one for each layer in the model plus an additional one for extending the model.

Let h(s)h^{(s)} denote the candidate subnetwork associated to layer s∈[lt−1+1]s\in[l_{t-1}+1]. We define h(s)h^{(s)} to be a single unit in layer ss that is connected to units of ft−1f_{t-1} in layer s−1s-1:

See Figure 4 for an illustration of the type of neural network designed using these candidate subnetworks.

For convenience, we denote this space of subnetworks by Hs′{\mathscr{H}}_{s}^{\prime}:

used in Section 5. As in AdaNet, the candidate subnetwork chosen by AdaNet.CVX is given by the following optimization problem:

Remarkably, the subnetwork that solves this infinite dimensional optimization problem can be obtained directly in closed-form:

Let (w∗,h∗)(w^{*},h^{*}) be the solution to the following optimization problem:

where (w(s∗),h(s∗))(w^{(s^{*})},h^{(s^{*})}) are defined by:

Notice that the minimizer over ∪s=1lt−1+1Hs′\cup_{s=1}^{l_{t-1}+1}{\mathscr{H}}_{s}^{\prime} can be determined by comparing the minimizers over each Hs′{\mathscr{H}}_{s}^{\prime}.

Moreover, since the penalty term Γh∣w∣\Gamma_{h}|w| has the same contribution for every h∈Hs′h\in{\mathscr{H}}_{s}^{\prime}, it has no impact on the optimal choice of hh over Hs′{\mathscr{H}}_{s}^{\prime}. Thus, to find the minimizer over each Hs′{\mathscr{H}}_{s}^{\prime}, we can compute the derivative of Ft−Γh∣w∣F_{t}-\Gamma_{h}|w| with respect to ww:

Thus, it follows that for any s∈[lt−1+1]s\in[l_{t-1}+1],

Note that we still need to search for the optimal descent coordinate over an infinite dimensional space. However, we can write

Now, if we denote by u(s)u^{(s)} the connection weights associated to h(s)h^{(s)}, then we claim that

which is a consequence of Banach space duality.

At the same time, our choice of u(s)\mathbf{u}^{(s)} also attains this upper bound:

Thus, u(s)\mathbf{u}^{(s)} and the associated network h(s)h^{(s)} is the coordinate that maximizes the derivative of FtF_{t} with respect to ww among all subnetworks in Hs′{\mathscr{H}}_{s}^{\prime}. Moreover, h(s)h^{(s)} also achieves the value: Λs,s−1∥ϵt,hs−1,t−1∥q\Lambda_{s,s-1}\|\boldsymbol{\epsilon}_{t,\mathbf{h}_{s-1,t-1}}\|_{q}.

This implies that by computing Λs,s−1∥ϵt,hs−1,t−1∥q\Lambda_{s,s-1}\|\boldsymbol{\epsilon}_{t,\mathbf{h}_{s-1,t-1}}\|_{q} for every s∈[lt−1+1]s\in[l_{t-1}+1], we can find the descent coordinate across all s∈[lt−1+1]s\in[l_{t-1}+1] that improves the objective by the largest amount. Moreover, we can then solve for the optimal step size in this direction to compute the weight update.

The theorem above defines the choice of descent coordinate at each round and motivates the following algorithm, AdaNet.CVX. At each round, AdaNet.CVX can design the optimal candidate subnetwork within its searched space in closed form, leading to an extremely efficient update. However, this comes at the cost of a more restrictive search space than the one used in AdaNet. The pseudocode of AdaNet.CVX is provided in Figure 5.