index int64 0 20.3k | text stringlengths 0 1.3M | year stringdate 1987-01-01 00:00:00 2024-01-01 00:00:00 | No stringlengths 1 4 |
|---|---|---|---|
6,700 | Deep Hyperspherical Learning Weiyang Liu1, Yan-Ming Zhang2, Xingguo Li3,1, Zhiding Yu4, Bo Dai1, Tuo Zhao1, Le Song1 1Georgia Institute of Technology 2Institute of Automation, Chinese Academy of Sciences 3University of Minnesota 4Carnegie Mellon University {wyliu,tourzhao}@gatech.edu, ymzhang@nlpr.ia.ac.cn, lsong@cc.gatech.edu Abstract Convolution as inner product has been the founding basis of convolutional neural networks (CNNs) and the key to end-to-end visual representation learning. Benefiting from deeper architectures, recent CNNs have demonstrated increasingly strong representation abilities. Despite such improvement, the increased depth and larger parameter space have also led to challenges in properly training a network. In light of such challenges, we propose hyperspherical convolution (SphereConv), a novel learning framework that gives angular representations on hyperspheres. We introduce SphereNet, deep hyperspherical convolution networks that are distinct from conventional inner product based convolutional networks. In particular, SphereNet adopts SphereConv as its basic convolution operator and is supervised by generalized angular softmax loss - a natural loss formulation under SphereConv. We show that SphereNet can effectively encode discriminative representation and alleviate training difficulty, leading to easier optimization, faster convergence and comparable (even better) classification accuracy over convolutional counterparts. We also provide some theoretical insights for the advantages of learning on hyperspheres. In addition, we introduce the learnable SphereConv, i.e., a natural improvement over prefixed SphereConv, and SphereNorm, i.e., hyperspherical learning as a normalization method. Experiments have verified our conclusions. 1 Introduction Recently, deep convolutional neural networks have led to significant breakthroughs on many vision problems such as image classification [9, 18, 19, 6], segmentation [3, 13, 1], object detection [3, 16], etc. While showing stronger representation power over many conventional hand-crafted features, CNNs often require a large amount of training data and face certain training difficulties such as overfitting, vanishing/exploding gradient, covariate shift, etc. The increasing depth of recently proposed CNN architectures have further aggravated the problems. To address the challenges, regularization techniques such as dropout [9] and orthogonality parameter constraints [21] have been proposed. Batch normalization [8] can also be viewed as an implicit regularization to the network, by normalizing each layer’s output distribution. Recently, deep residual learning [6] emerged as a promising way to overcome vanishing gradients in deep networks. However, [20] pointed out that residual networks (ResNets) are essentially an exponential ensembles of shallow networks where they avoid the vanishing/exploding gradient problem but do not provide direct solutions. As a result, training an ultra-deep network still remains an open problem. Besides vanishing/exploding gradient, network optimization is also very sensitive to initialization. Finding better initializations is thus widely studied [5, 14, 4]. In general, having a large parameter space is double-edged considering the benefit of representation power and the associated training difficulties. Therefore, proposing better learning frameworks to overcome such challenges remains important. In this paper, we introduce a novel convolutional learning framework that can effectively alleviate training difficulties, while giving better performance over dot product based convolution. Our idea 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. x w4 w3 w2 SphereConv Operator g( ) θ(w,x) θ(w,x) w x w1 x x x x SphereConv Operator ... ... ... ... Softmax Cross-entropy ... ... Hyperspherical Convolutions Generalized Angular Softmax Loss x x x x SphereConv Operator SphereConv Operator Figure 1: Deep hyperspherical convolutional network architecture. is to project parameter learning onto unit hyperspheres, where layer activations only depend on the geodesic distance between kernels and input signals1 instead of their inner products. To this end, we propose the SphereConv operator as the basic module for our network layers. We also propose softmax losses accordingly under such representation framework. Specifically, the proposed softmax losses supervise network learning by also taking the SphereConv activations from the last layer instead of inner products. Note that the geodesic distances on a unit hypersphere is the angles between inputs and kernels. Therefore, the learning objective is essentially a function of the input angles and we call it generalized angular softmax loss in this paper. The resulting architecture is the hyperspherical convolutional network (SphereNet), which is shown in Fig. 1. Our key motivation to propose SphereNet is that angular information matters in convolutional representation learning. We argue this motivation from several aspects: training stability, training efficiency, and generalization power. SphereNet can also be viewed as an implicit regularization to the network by normalizing the activation distributions. The weight norm is no longer important since the entire network operates only on angles. And as a result, the ℓ2 weight decay is also no longer needed in SphereNet. SphereConv to some extent also alleviates the covariate shift problem [8]. The output of SphereConv operators are bounded from −1 to 1 (0 to 1 if considering ReLU), which makes the variance of each output also bounded. Our second intuition is that angles preserve the most abundant discriminative information in convolutional learning. We gain such intuition from 2D Fourier transform, where an image is decomposed by the combination of a set of templates with magnitude and phase information in 2D frequency domain. If one reconstructs an image with original magnitudes and random phases, the resulting images are generally not recognizable. However, if one reconstructs the image with random magnitudes and original phases. The resulting images are still recognizable. It shows that the most important structural information in an image for visual recognition is encoded by phases. This fact inspires us to project the network learning into angular space. In terms of low-level information, SphereConv is able to preserve the shape, edge, texture and relative color. SphereConv can learn to selectively drop the color depth but preserve the RGB ratio. Thus the semantic information of an image is preserved. SphereNet can also be viewed as a non-trivial generalization of [12, 11]. By proposing a loss that discriminatively supervises the network on a hypersphere, [11] achieves state-of-the-art performance on face recognition. However, the rest of the network remains a conventional convolution network. In contrast, SphereNet not only generalizes the hyperspherical constraint to every layer, but also to different nonlinearity functions of input angles. Specifically, we propose three instances of SphereConv operators: linear, cosine and sigmoid. The sigmoid SphereConv is the most flexible one with a parameter controlling the shape of the angular function. As a simple extension to the sigmoid SphereConv, we also present a learnable SphereConv operator. Moreover, the proposed generalized angular softmax (GA-Softmax) loss naturaly generalizes the angular supervision in [11] using the SphereConv operators. Additionally, the SphereConv can serve as a normalization method that is comparable to batch normalization, leading to an extension to spherical normalization (SphereNorm). SphereNet can be easily applied to other network architectures such as GoogLeNet [19], VGG [18] and ResNet [6]. One simply needs to replace the convolutional operators and the loss functions with the proposed SphereConv operators and hyperspherical loss functions. In summary, SphereConv can be viewed as an alternative to the original convolution operators, and serves as a new measure of correlation. SphereNet may open up an interesting direction to explore the neural networks. We ask the question whether inner product based convolution operator is an optimal correlation measure for all tasks? Our answer to this question is likely to be “no”. 1Without loss of generality, we study CNNs here, but our method is generalizable to any other neural nets. 2 2 Hyperspherical Convolutional Operator 2.1 Definition The convolutional operator in CNNs is simply a linear matrix multiplication, written as F(w, x) = w⊤x + bF where w is a convolutional filter, x denotes a local patch from the bottom feature map and bF is the bias. The matrix multiplication here essentially computes the similarity between the local patch and the filter. Thus the standard convolution layer can be viewed as patch-wise matrix multiplication. Different from the standard convolutional operator, the hyperspherical convolutional (SphereConv) operator computes the similarity on a hypersphere and is defined as: Fs(w, x) = g(θ(w,x)) + bFs, (1) where θ(w,x) is the angle between the kernel parameter w and the local patch x. g(θ(w,x)) indicates a function of θ(w,x) (usually a monotonically decreasing function), and bFs is the bias. To simplify analysis and discussion, the bias terms are usually left out. The angle θ(w,x) can be interpreted as the geodesic distance (arc length) between w and x on a unit hypersphere. In contrast to the convolutional operator that works in the entire space, SphereConv only focuses on the angles between local patches and the filters, and therefore operates on the hypersphere space. In this paper, we present three specific instances of the SphereConv Operator. To facilitate the computation, we constrain the output of SphereConv operators to [−1, 1] (although it is not a necessary requirement). Linear SphereConv. In linear SphereConv operator, g is a linear function of θ(w,x), with the form: g(θ(w,x)) = aθ(w,x) + b, (2) where a and b are parameters for the linear SphereConv operator. In order to constrain the output range to [0, 1] while θ(w,x) ∈[0, π], we use a = −2 π and b = 1 (not necessarily optimal design). 0 0.5 1 1.5 2 2.5 3 -1 -0.5 0 0.5 1 Cosine Linear Sigmoid (k=0.1) Sigmoid (k=0.3) Sigmoid (k=0.7) Figure 2: SphereConv operators. Cosine SphereConv. The cosine SphereConv operator is a nonlinear function of θ(w,x), with its g being the form of g(θ(w,x)) = cos(θ(w,x)), (3) which can be reformulated as wT x ∥w∥2∥x∥2 . Therefore, it can be viewed as a doubly normalized convolutional operator, which bridges the SphereConv operator and convolutional operator. Sigmoid SphereConv. The Sigmoid SphereConv operator is derived from the Sigmoid function and its g can be written as g(θ(w,x)) = 1 + exp(−π 2k) 1 −exp(−π 2k) · 1 −exp θ(w,x) k − π 2k 1 + exp θ(w,x) k − π 2k , (4) where k > 0 is the parameter that controls the curvature of the function. While k is close to 0, g(θ(w,x)) will approximate the step function. While k becomes larger, g(θ(w,x)) is more like a linear function, i.e., the linear SphereConv operator. Sigmoid SphereConv is one instance of the parametric SphereConv family. With more parameters being introduced, the parametric SphereConv can have richer representation power. To increase the flexibility of the parametric SphereConv, we will discuss the case where these parameters can be jointly learned via back-prop later in the paper. 2.2 Optimization The optimization of the SphereConv operators is nearly the same as the convolutional operator and also follows the standard back-propagation. Using the chain rule, we have the gradient of the SphereConv with respect to the weights and the feature input: ∂g(θ(w,x)) ∂w = ∂g(θ(w,x)) ∂θ(w,x) · ∂θ(w,x) ∂w , ∂g(θ(w,x)) ∂x = ∂g(θ(w,x)) ∂θ(w,x) · ∂θ(w,x) ∂x . (5) For different SphereConv operators, both ∂θ(w,x) ∂w and ∂θ(w,x) ∂x are the same, so the only difference lies in the ∂g(θ(w,x)) ∂θ(w,x) part. For ∂θ(w,x) ∂w , we have ∂θ(w,x) ∂w = ∂arccos wT x ∥w∥2∥x∥2 ∂w , ∂θ(w,x) ∂x = ∂arccos wT x ∥w∥2∥x∥2 ∂x , (6) which are straightforward to compute and therefore neglected here. Because ∂g(θ(w,x)) ∂θ(w,x) for the linear SphereConv, the cosine SphereConv and the Sigmoid SphereConv are a, −sin(θ(w,x)) and −2 exp(θ(w,x)/k−π/2k) k(1+exp(θ(w,x)/k−π/2k))2 respectively, all these partial gradients can be easily computed. 3 2.3 Theoretical Insights We provide a fundamental analysis for the cosine SphereConv operator in the case of linear neural network to justify that the SphereConv operator can improve the conditioning of the problem. In specific, we consider one layer of linear neural network, where the observation is F = U ∗V ∗⊤ (ignore the bias), U ∗∈Rn×k is the weight, and V ∗∈Rm×k is the input that embeds weights from previous layers. Without loss of generality, we assume the columns satisfying ∥Ui,:∥2 = ∥Vj,:∥2 = 1 for all i = 1, . . . , n and j = 1, . . . , m, and consider min U∈Rn×k,V ∈Rm×k G(U, V ) = 1 2∥F −UV ⊤∥2 F. (7) This is closely related with the matrix factorization and (7) can be also viewed as the expected version for the matrix sensing problem [10]. The following lemma demonstrates a critical scaling issue of (7) for U and V that significantly deteriorate the conditioning without changing the objective of (7). Lemma 1. Consider a pair of global optimal points U, V satisfying F = UV ⊤and Tr(V ⊤V ⊗ In) ≤Tr(U ⊤U ⊗Im). For any real c > 1, let eU = cU and eV = V /c, then we have κ(∇2G( eU, eV )) = Ω(c2κ(∇2G(U, V ))), where κ = λmax λmin is the restricted condition number with λmax being the largest eigenvalue and λmin being the smallest nonzero eigenvalue. Lemma 1 implies that the conditioning of the problem (7) at a unbalanced global optimum scaled by a constant c is Ω(c2) times larger than the conditioning of the problem at a balanced global optimum. Note that λmin = 0 may happen, thus we consider the restricted condition here. Similar results hold beyond global optima. This is an undesired geometric structure, which further leads to slow and unstable optimization procedures, e.g., using stochastic gradient descent (SGD). This motivates us to consider the SphereConv operator discussed above, which is equivalent to projecting data onto the hypersphere and leads to a better conditioned problem. Next, we consider our proposed cosine SphereConv operator for one-layer of the linear neural network. Based on our previous discussion on SphereConv, we consider an equivalent problem: min U∈Rn×k,V ∈Rm×k GS(U, V ) = 1 2∥F −DUUV ⊤DV ∥2 F, (8) where DU = diag 1 ∥U1,:∥2 , . . . , 1 ∥Un,:∥2 ∈Rn×n and DV = diag 1 ∥V1,:∥2 , . . . , 1 ∥Vm,:∥2 ∈ Rm×m are diagonal matrices. We provide an analogous result to Lemma 1 for (8) . Lemma 2. For any real c > 1, let eU = cU and eV = V /c, then we have λi(∇2GS( eU, eV )) = λi(∇2GS(U, V )) for all i ∈[(n + m)k] = {1, 2, . . . , (n + m)k} and κ(∇2G( eU, eV )) = κ(∇2G(U, V )), where κ is defined as in Lemma 1. We have from Lemma 2 that the issue of increasing condition caused by the scaling is eliminated by the SphereConv operator in the entire parameter space. This enhances the geometric structure over (7), which further results in improved convergence of optimization procedures. If we extend the result from one layer to multiple layers, the scaling issue propagates. Roughly speaking, when we train N layers, in the worst case, the conditioning of the problem can be cN times worse with a scaling factor c > 1. The analysis is similar to the one layer case, but the computation of the Hessian matrix and associated eigenvalues are much more complicated. Though our analysis is elementary, we provide an important insight and a straightforward illustration of the advantage for using the SphereConv operator. The extension to more general cases, e..g, using nonlinear activation function (e.g., ReLU), requires much more sophisticated analysis to bound the eigenvalues of Hessian for objectives, which is deferred to future investigation. 2.4 Discussion Comparison to convolutional operators. Convolutional operators compute the inner product between the kernels and the local patches, while the SphereConv operators compute a function of the angle between the kernels and local patches. If we normalize the convolutional operator in terms of both w and x, then the normalized convolutional operator is equivalent to the cosine SphereConv operator. Essentially, they use different metric spaces. Interestingly, SphereConv operators can also be interpreted as a function of the Geodesic distance on a unit hypersphere. Extension to fully connected layers. Because the fully connected layers can be viewed as a special convolution layer with the kernel size equal to the input feature map, the SphereConv operators could be easily generalized to the fully connected layers. It also indicates that SphereConv operators could be used not only to deep CNNs, but also to linear models like logistic regression, SVM, etc. 4 Network Regularization. Because the norm of weights is no longer crucial, we stop using the ℓ2 weight decay to regularize the network. SphereNets are learned on hyperspheres, so we regularize the network based on angles instead of norms. To avoid redundant kernels, we want the kernels uniformly spaced around the hypersphere, but it is difficult to formulate such constraints. As a tradeoff, we encourage the orthogonality. Given a set of kernels W where the i-th column Wi is the weights of the i-th kernel, the network will also minimize ∥W ⊤W −I∥2 F where I is an identity matrix. Determining the optimal SphereConv. In practice, we could treat different types of SphereConv as a hyperparameter and use the cross validation to determine which SphereConv is the most suitable one. For sigmoid SphereConv, we could also use the cross validation to determine its hyperparameter k. In general, we need to specify a SphereConv operator before using it, but prefixing a SphereConv may not be an optimal choice (even using cross validation). What if we treat the hyperparameter k in sigmoid SphereConv as a learnable parameter and use the back-prop to learn it? Following this idea, we further extend sigmoid SphereConv to a learnable SphereConv in the next subsection. SphereConv as normalization. Because SphereConv could partially address the covariate shift, it could also serve as a normalization method similar to batch normalization. Differently, SphereConv normalizes the network in terms of feature map and kernel weights, while batch normalization is for the mini-batches. Thus they do not contradict with each other and can be used simultaneously. 2.5 Extension: Learnable SphereConv and SphereNorm Learnable SphereConv. It is a natrual idea to replace the current prefixed SphereConv with a learnable one. There will be plenty of parametrization choices for the SphereConv to be learnable, and we present a very simple learnable SphereConv operator based on the sigmoid SphereConv. Because the sigmoid SphereConv has a hyperparameter k, we could treat it as a learnable parameter that can be updated by back-prop. In back-prop, k is updated using kt+1 = kt +η ∂L ∂k where t denotes the current iteration index and ∂L ∂k can be easily computed by the chain rule. Usually, we also require k to be positive. The learning of k is in fact similar to the parameter learning in PReLU [5]. SphereNorm: hyperspherical learning as a normalization method. Similar to batch normalization (BatchNorm), we note that the hyperspherical learning can also be viewed as a way of normalization, because SphereConv constrain the output value in [−1, 1] ([0, 1] after ReLU). Different from BatchNorm, SphereNorm normalizes the network based on spatial information and the weights, so it has nothing to do with the mini-batch statistic. Because SphereNorm normalize both the input and weights, it could avoid covariate shift due to large weights and large inputs while BatchNorm could only prevent covariate shift caused by the inputs. In such sense, it will work better than BatchNorm when the batch size is small. Besides, SphereConv is more flexible in terms of design choices (e.g. linear, cosine, and sigmoid) and each may lead to different advantages. Similar to BatchNorm, we could use a rescaling strategy for the SphereNorm. Specifically, we rescale the output of SphereConv via βFs(w, x) + γ where β and γ are learned by back-prop (similar to BatchNorm, the rescaling parameters can be either learned or prefixed). In fact, SphereNorm does not contradict with the BatchNorm at all and can be used simultaneously with BatchNorm. Interestingly, we find using both is empirically better than using either one alone. 3 Learning Objective on Hyperspheres For learning on hyperspheres, we can either use the conventional loss function such as softmax loss, or use some loss functions that are tailored for the SphereConv operators. We present some possible choices for these tailored loss functions. Weight-normalized Softmax Loss. The input feature and its label are denoted as xi and yi, respectively. The original softmax loss can be written as L = 1 N P i Li = 1 N P i −log efyi P j efj where N is the number of training samples and fj is the score of the j-th class (j ∈[1, K], K is the number of classes). The class score vector f is usually the output of a fully connected layer W , so we have fj =W ⊤ j xi +bj and fyi =W ⊤ yi xi +byi in which xi, Wj, and Wyi are the i-th training sample, the j-th and yi-th column of W respectively. We can rewrite Li as Li = −log eW ⊤ yi xi+byi P j eW ⊤ j xi+bj = −log e∥Wyi ∥∥xi∥cos(θyi,i)+byi P j e∥Wj∥∥xi∥cos(θj,i)+bj , (9) where θj,i(0≤θj,i ≤π) is the angle between vector Wj and xi. The decision boundary of the original softmax loss is determined by the vector f. Specifically in the binary-class case, the 5 decision boundary of the softmax loss is W ⊤ 1 x+b1 =W ⊤ 2 x+b2. Considering the intuition of the SphereConv operators, we want to make the decision boundary only depend on the angles. To this end, we normalize the weights (∥Wj∥=1) and zero out the biases (bj =0), following the intuition in [11] (sometimes we could keep the biases while data is imbalanced). The decision boundary becomes ∥x∥cos(θ1)=∥x∥cos(θ2). Similar to SphereConv, we could generalize the decision boundary to ∥x∥g(θ1)=∥x∥g(θ2), so the weight-normalized softmax (W-Softmax) loss can be written as Li = −log e∥xi∥g(θyi,i) P j e∥xi∥g(θj,i) , (10) where g(·) can take the form of linear SphereConv, cosine SphereConv, or sigmoid SphereConv. Thus we also term these three difference weight-normalized loss functions as linear W-Softmax loss, cosine W-Softmax loss, and sigmoid W-Softmax loss, respectively. Generalized Angular Softmax Loss. Inspired by [11], we use a multiplicative parameter m to impose margins on hyperspheres. We propose a generalized angular softmax (GA-Softmax) loss which extends the W-Softmax loss to a loss function that favors large angular margin feature distribution. In general, the GA-Softmax loss is formulated as Li = −log e∥xi∥g(mθyi,i) e∥xi∥g(mθyi,i) + P j̸=yi e∥xi∥g(θj,i) , (11) where g(·) could also have the linear, cosine and sigmoid form, similar to the W-Softmax loss. We can see A-Softmax loss [11] is exactly the cosine GA-Softmax loss and W-Softmax loss is the special case (m = 1) of GA-Sofmtax loss. Note that we usually require θj,i ∈[0, π m], because cos(θj,i) is only monotonically decreasing in [0, π]. To address this, [12, 11] construct a monotonically decreasing function recursively using the [0, π m] part of cos(mθj,i). Although it indeed partially addressed the issue, it may introduce a number of saddle points (w.r.t. W ) in the loss surfaces. Originally, ∂g ∂θ will be close to 0 only when θ is close to 0 and π. However, in L-Softmax [12] or A-Softmax (cosine GA-Softmax), it is not the case. ∂g ∂θ will be 0 when θ = kθ m , k = 0, · · · , m. It will possibly cause instability in training. The sigmoid GA-Softmax loss also has similar issues. However, if we use the linear GA-Softmax loss, this problem will be automatically solved and the training will possibly become more stable in practice. There will also be a lot of choices of g(·) to design a specific GA-Sofmtax loss, and each one has different optimization dynamics. The optimal one may depend on the task itself (e.g. cosine GA-Softmax has been shown effective in deep face recognition [11]). Discussion of Sphere-normalized Softmax Loss. We have also considered the sphere-normalized softmax loss (S-Softmax), which simultaneously normalizes the weights (Wj) and the feature x. It seems to be a more natural choice than W-Softmax for the proposed SphereConv and makes the entire framework more unified. In fact, we have tried this and the empirical results are not that good, because the optimization seems to become very difficult. If we use the S-Softmax loss to train a network from scratch, we can not get reasonable results without using extra tricks, which is the reason we do not use it in this paper. For completeness, we give some discussions here. Normally, it is very difficult to make the S-Softmax loss value to be small enough, because we normalize the features to unit hypersphere. To make this loss work, we need to either normalize the feature to a value much larger than 1 (hypersphere with large radius) and then tune the learning rate or first train the network with the softmax loss from scratch and then use the S-Softmax loss for finetuning. 4 Experiments and Results 4.1 Experimental Settings We will first perform comprehensive ablation study and exploratory experiments for the proposed SphereNets, and then evaluate the SphereNets on image classification. For the image classification task, we perform experiments on CIFAR10 (only with random left-right flipping), CIFAR10+ (with full data augmentation), CIFAR100 and large-scale Imagenet 2012 datasets [17]. General Settings. For CIFAR10, CIFAR10+ and CIFAR100, we follow the same settings from [7, 12]. For Imagenet 2012 dataset, we mostly follow the settings in [9]. We attach more details in Appendix B. For fairness, batch normalization and ReLU are used in all methods if not specified. All the comparisons are made to be fair. Compared CNNs have the same architecture with SphereNets. Training. Appendix A gives the network details. For CIFAR-10 and CIFAR-100, we use the ADAM, starting with the learning rate 0.001. The batch size is 128 if not specified. The learning rate is divided by 10 at 34K, 54K iterations and the training stops at 64K. For both A-Softmax and GA-Softmax loss, 6 we use m=4. For Imagenet-2012, we use the SGD with momentum 0.9. The learning rate starts with 0.1, and is divided by 10 at 200K and 375K iterations. The training stops at 550K iteration. 4.2 Ablation Study and Exploratory Experiments We perform comprehensive Ablation and exploratory study on the SphereNet and evaluate every component individually in order to analyze its advantages. We use the 9-layer CNN as default (if not specified) and perform the image classification on CIFAR-10 without any data augmentation. SphereConv Operator / Loss Original Softmax Sigmoid (0.1) W-Softmax Sigmoid (0.3) W-Softmax Sigmoid (0.7) W-Softmax Linear W-Softmax Cosine W-Softmax A-Softmax (m=4) GA-Softmax (m=4) Sigmoid (0.1) 90.97 90.91 90.89 90.88 91.07 91.13 91.87 91.99 Sigmoid (0.3) 91.08 91.44 91.37 91.21 91.34 91.28 92.13 92.38 Sigmoid (0.7) 91.05 91.16 91.47 91.07 90.99 91.18 92.22 92.36 Linear 91.10 90.93 91.42 90.96 90.95 91.24 92.21 92.32 Cosine 90.89 90.88 91.08 91.22 91.17 90.99 91.94 92.19 Original Conv 90.58 90.58 90.73 90.78 91.08 90.68 91.78 91.80 Table 1: Classification accuracy (%) with different loss functions. Comparison of different loss functions. We first evaluate all the SphereConv operators with different loss functions. All the compared SphereConv operators use the 9-layer CNN architecture in the experiment. From the results in Table 1, one can observe that the SphereConv operators consistently outperforms the original convolutional operator. For the compared loss functions except A-Softmax and GA-Softmax, the effect on accuracy seems to less crucial than the SphereConv operators, but sigmoid W-Softmax is more flexible and thus works slightly better than the others. The sigmoid SphereConv operators with a suitably chosen parameter also works better than the others. Note that, W-Softmax loss is in fact comparable to the original softmax loss, because our SphereNet optimizes angles and the W-Softmax is derived from the original softmax loss. Therefore, it is fair to compare the SphereNet with W-Softmax and CNN with softmax loss. From Table 1, we can see SphereConv operators are consistently better than the covolutional operators. While we use a large-margin loss function like the A-Softmax [11] and the proposed GA-Softmax, the accuracy can be further boosted. One may notice that A-Softmax is actually cosine GA-Softmax. The superior performance of A-Softmax with SphereNet shows that our architecture is more suitable for the learning of angular loss. Moreover, our proposed large-margin loss (linear GA-Softmax) performs the best among all these compared loss functions. Comparison of different network architectures. We are also interested in how our SphereConv operators work in different architectures. We evaluate all the proposed SphereConv operators with the same architecture of different layers and a totally different architecture (ResNet). Our baseline CNN architecture follows the design of VGG network [18] only with different convolutional layers. For fair comparison, we use cosine W-Softmax for all SphereConv operators and original softmax for original convolution operators. From the results in Table 2, one can see that SphereNets greatly outperforms the CNN baselines, usually with more than 1% improvement. While applied to ResNet, our SphereConv operators also work better than the baseline. Note that, we use the similar ResNet architecture from the CIFAR-10 experiment in [6]. We do not use data augmentation for CIFAR-10 in this experiment, so the ResNet accuracy is much lower than the reported one in [6]. Our results on different network architectures show consistent and significant improvement over CNNs. SphereConv Operator CNN-3 CNN-9 CNN-18 CNN-45 CNN-60 ResNet-32 Sigmoid (0.1) 82.08 91.13 91.43 89.34 87.67 90.94 Sigmoid (0.3) 81.92 91.28 91.55 89.73 87.85 91.7 Sigmoid (0.7) 82.4 91.18 91.69 89.85 88.42 91.19 Linear 82.31 91.15 91.24 90.15 89.91 91.25 Cosine 82.23 90.99 91.23 90.05 89.28 91.38 Original Conv 81.19 90.68 90.62 88.23 88.15 90.40 Table 2: Classification accuracy (%) with different network architectures. SphereConv Operator Acc. (%) Sigmoid (0.1) 86.29 Sigmoid (0.3) 85.67 Sigmoid (0.7) 85.51 Linear 85.34 Cosine 85.25 CNN w/o ReLU 80.73 Table 3: Acc. w/o ReLU. Comparison of different width (number of filters). We evaluate the SphereNet with different number of filters. Fig. 3(c) shows the convergence of different width of SphereNets. 16/32/48 means conv1.x, conv2.x and conv3.x have 16, 32 and 48 filters, respectively. One could observe that while the number of filters are small, SphereNet performs similarly to CNNs (slightly worse). However, while we increase the number of filters, the final accuracy will surpass the CNN baseline even faster and more stable convergence performance. With large width, we find that SphereNets perform consistently better than CNN baselines, showing that SphereNets can make better use of the width. Learning without ReLU. We notice that SphereConv operators are no longer a matrix multiplication, so it is essentially a non-linear function. Because the SphereConv operators already introduce certain 7 Iteration Testing Accuracy 0 1 2 3 4 5 6 7 x104 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 ResNet baseline on CIFAR10 ResNet baseline on CIFAR10+ SphereResNet (Sigmoid 0.3) on CIFAR10 SphereResNet (Sigmoid 0.3) on CIFAR10+ 0 1 2 3 4 5 6 7 x104 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 CNN Baseline SphereNet (cosine) w/o orth. SphereNet (cosine) w/ orth. SphereNet (linear) w/ orth. SphereNet (Sigmoid 0.3) w/ orth. Iteration Testing Accuracy 0 0.5 1 1.5 2 2.5 3 3.5 4 x104 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 69-layer CNN 69-layer SphereNet Iteration Testing Accuracy 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 CNN 16/32/48 SphereNet 16/32/48 CNN 64/96/128 SphereNet 64/96/128 CNN 128/192/256 SphereNet 128/192/256 CNN 256/384/512 SphereNet 256/384/512 x104 Iteration 0 1 2 3 4 5 6 5.5 6 6.5 0.9 0.905 0.91 0.915 x104 Testing Accuracy (a) ResNet vs. SphereResNet on CIFAR-10/10+ (b) CNN vs. SphereNet (orth.) on CIFAR-10 (c) Different width of SphereNet on CIFAR-10 (d) Deep CNN vs. SphereNet on CIFAR-10 Figure 3: Testing accuracy over iterations. (a) ResNet vs. SphereResNet. (b) Plain CNN vs. plain SphereNet. (c) Different width of SphereNet. (d) Ultra-deep plain CNN vs. ultra-deep plain SphereNet. non-linearity to the network, we evaluate how much gain will such non-linearity bring. Therefore, we remove the ReLU activation and compare our SphereNet with the CNNs without ReLU. The results are given in Table 3. All the compared methods use 18-layer CNNs (with BatchNorm). Although removing ReLU greatly reduces the classification accuracy, our SphereNet still outperforms the CNN without ReLU by a significant margin, showing its rich non-linearity and representation power. Convergence. One of the most significant advantages of SphereNet is its training stability and convergence speed. We evaluate the convergence with two different architectures: CNN-9 and ResNet-32. For fair comparison, we use the original softmax loss for all compared methods (including SphereNets). ADAM is used for the stochastic optimization and the learning rate is the same for all networks. From Fig. 3(a), the SphereResNet converges significantly faster than the original ResNet baseline in both CIFAR-10 and CIFAR-10+ and the final accuracy are also higher than the baselines. In Fig. 3(b), we evaluate the SphereNet with and without orthogonality constraints on kernel weights. With the same network architecture, SphereNet also converges much faster and performs better than the baselines. The orthogonality constraints also can bring performance gains in some cases. Generally from Fig. 3, one could also observe that the SphereNet converges fast and very stably in every case while the CNN baseline fluctuates in a relative wide range. Optimizing ultra-deep networks. Partially because of the alleviation of the covariate shift problem and the improvement of conditioning, our SphereNet is able to optimize ultra-deep neural networks without using residual units or any form of shortcuts. For SphereNets, we use the cosine SphereConv operator with the cosine W-Softmax loss. We directly optimize a very deep plain network with 69 stacked convolutional layers. From Fig. 3(d), one can see that the convergence of SphereNet is much easier than the CNN baseline and the SphereNet is able to achieve nearly 90% final accuracy. 4.3 Preliminary Study towards Learnable SphereConv 0 0.2 0.4 0.6 0.8 1 The value of k 0 0.1 0.2 0.3 Frequency conv1.1 conv2.1 conv3.1 Figure 4: Frequency histogram of k. Although the learnable SphereConv is not a main theme of this paper, we still run some preliminary evaluations on it. For the proposed learnable sigmoid SphereConv, we learn the parameter k independently for each filter. It is also trivial to learn it in a layer-shared or network-shared fashsion. With the same 9-layer architecture used in Section 4.2, the learnable SphereConv (with cosine W-Softmax loss) achieves 91.64% on CIFAR-10 (without full data augmentation), while the best sigmoid SphereConv (with cosine W-Softmax loss) achieves 91.22%. In Fig. 4, we also plot the frequency histogram of k in Conv1.1 (64 filters), Conv2.1 (96 filters) and Conv3.1 (128 filters) of the final learned SphereNet. From Fig. 4, we observe that each layer learns different distribution of k. The first convolutional layer (Conv1.1) tends to uniformly distribute k into a large range of values from 0 to 1, potentially extracting information from all levels of angular similarity. The fourth convolutional layer (Conv2.1) tends to learn more concentrated distribution of k than Conv1.1, while the seventh convolutional layer (Conv3.1) learns highly concentrated distribution of k which is centered around 0.8. Note that, we initialize all k with a constant 0.5 and learn them with the back-prop. 4.4 Evaluation of SphereNorm From Section 4.2, we could clearly see the convergence advantage of SphereNets. In general, we can view the SphereConv as a normalization method (comparable to batch normalization) that can be applied to all kinds of networks. This section evaluates the challenging scenarios where the minibatch size is small (results under 128 batch size could be found in Section 4.2) and we use the same 8 0 1 2 3 4 5 6 Iteration x104 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Testing Accuracy BatchNorm SphereNorm SphereNorm+BatchNorm 0 1 2 3 4 5 6 Iteration x104 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Testing Accuracy 0 1 2 3 4 5 6 Iteration 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Testing Accuracy BatchNorm SphereNorm Rescaled SphereNorm SphereNorm w/ Orth. SphereNorm+BatchNorm 0 1 2 3 4 5 6 Iteration 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Testing Accuracy BatchNorm SphereNorm Rescaled SphereNorm SphereNorm w/ Orth. SphereNorm+BatchNorm x104 x104 (a) Mini-Batch Size = 4 (b) Mini-Batch Size = 8 (c) Mini-Batch Size = 16 (d) Mini-Batch Size = 32 BatchNorm SphereNorm Rescaled SphereNorm SphereNorm w/ Orth. SphereNorm+BatchNorm Figure 5: Convergence under different mini-batch size on CIFAR-10 dataset (Same setting as Section 4.2). 9-layer CNN as in Section 4.2. To be simple, we use the cosine SphereConv as SphereNorm. The softmax loss is used in both CNNs and SphereNets. From Fig. 5, we could observe that SphereNorm achieves the final accuracy similar to BatchNorm, but SphereNorm converges faster and more stably. SphereNorm plus the orthogonal constraint helps convergence a little bit and rescaled SphereNorm does not seem to work well. While BatchNorm and SphereNorm are used together, we obtain the fastest convergence and the highest final accuracy, showing excellent compatibility of SphereNorm. 4.5 Image Classification on CIFAR-10+ and CIFAR-100 Method CIFAR-10+ CIFAR-100 ELU [2] 94.16 72.34 FitResNet (LSUV) [14] 93.45 65.72 ResNet-1001 [7] 95.38 77.29 Baseline ResNet-32 (softmax) 93.26 72.85 SphereResNet-32 (S-SW) 94.47 76.02 SphereResNet-32 (L-LW) 94.33 75.62 SphereResNet-32 (C-CW) 94.64 74.92 SphereResNet-32 (S-G) 95.01 76.39 Table 4: Acc. (%) on CIFAR-10+ & CIFAR-100. We first evaluate the SphereNet in a classic image classification task. We use the CIFAR-10+ and CIFAR100 datasets and perform random flip (both horizontal and vertical) and random crop as data augmentation (CIFAR-10 with full data augmentation is denoted as CIFAR-10+). We use the ResNet-32 as a baseline architecture. For the SphereNet of the same architecture, we evaluate sigmoid SphereConv operator (k = 0.3) with sigmoid W-Softmax (k = 0.3) loss (S-SW), linear SphereConv operator with linear W-Softmax loss (L-LW), cosine SphereConv operator with cosine W-Softmax loss (C-CW) and sigmoid SphereConv operator (k = 0.3) with GA-Softmax loss (S-G). In Table 4, we could see the SphereNet outperforms a lot of current state-of-the-art methods and is even comparable to the ResNet-1001 which is far deeper than ours. This experiment further validates our idea that learning on a hyperspheres constrains the parameter space to a more semantic and label-related one. 4.6 Large-scale Image Classification on Imagenet-2012 0 1 2 3 4 5 Iteration x105 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Top1 Error Rate ResNet-18 SphereResNet-18-v1 SphereResNet-18-v2 0 1 2 3 4 5 Iteration x105 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Top5 Error Rate ResNet-18 SphereResNet-18-v1 SphereResNet-18-v2 Figure 6: Validation error (%) on ImageNet. We evaluate SphereNets on large-scale Imagenet2012 dataset. We only use the minimum data augmentation strategy in the experiment (details are in Appendix B). For the ResNet-18 baseline and SphereResNet-18, we use the same filter numbers in each layer. We develop two types of SphereResNet-18, termed as v1 and v2 respectively. In SphereResNet-18-v2, we do not use SphereConv in the 1×1 shortcut convolutions which are used to match the number of channels. In SphereResNet-18-v1, we use SphereConv in the 1×1 shortcut convolutions. Fig. 6 shows the single crop validation error over iterations. One could observe that both SphereResNets converge much faster than the ResNet baseline, while SphereResNet18-v1 converges the fastest but yields a slightly worse yet comparable accuracy. SphereResNet-18-v2 not only converges faster than ResNet-18, but it also shows slightly better accuracy. 5 Limitations and Future Work Our work still has some limitations: (1) SphereNets have large performance gain while the network is wide enough. If the network is not wide enough, SphereNets still converge much faster but yield slightly worse (still comparable) recognition accuracy. (2) The computation complexity of each neuron is slightly higher than the CNNs. (3) SphereConvs are still mostly prefixed. Possible future work includes designing/learning a better SphereConv, efficiently computing the angles to reduce computation complexity, applications to the tasks that require fast convergence (e.g. reinforcement learning and recurrent neural networks), better angular regularization to replace orthogonality, etc. 9 Acknowledgements We thank Zhen Liu (Georgia Tech) for helping with the experiments and providing suggestions. This project was supported in part by NSF IIS-1218749, NIH BIGDATA 1R01GM108341, NSF CAREER IIS-1350983, NSF IIS-1639792 EAGER, NSF CNS-1704701, ONR N00014-15-1-2340, Intel ISTC, NVIDIA and Amazon AWS. Xingguo Li is supported by doctoral dissertation fellowship from University of Minnesota. Yan-Ming Zhang is supported by the National Natural Science Foundation of China under Grant 61773376. References [1] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Semantic image segmentation with deep convolutional nets and fully connected crfs. In ICLR, 2015. [2] Djork-Arné Clevert, Thomas Unterthiner, and Sepp Hochreiter. Fast and accurate deep network learning by exponential linear units (elus). arXiv:1511.07289, 2015. [3] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In CVPR, 2014. [4] Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Aistats, 2010. [5] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In ICCV, 2015. [6] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. [7] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. arXiv:1603.05027, 2016. [8] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. [9] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [10] Xingguo Li, Zhaoran Wang, Junwei Lu, Raman Arora, Jarvis Haupt, Han Liu, and Tuo Zhao. Symmetry, saddle points, and global geometry of nonconvex matrix factorization. arXiv:1612.09296, 2016. [11] Weiyang Liu, Yandong Wen, Zhiding Yu, Ming Li, Bhiksha Raj, and Le Song. Sphereface: Deep hypersphere embedding for face recognition. In CVPR, 2017. [12] Weiyang Liu, Yandong Wen, Zhiding Yu, and Meng Yang. Large-margin softmax loss for convolutional neural networks. In ICML, 2016. [13] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015. [14] Dmytro Mishkin and Jiri Matas. All you need is a good init. arXiv:1511.06422, 2015. [15] Yuji Nakatsukasa. Eigenvalue perturbation bounds for hermitian block tridiagonal matrices. Applied Numerical Mathematics, 62(1):67–78, 2012. [16] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pages 91–99, 2015. [17] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. IJCV, pages 1–42, 2014. [18] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv:1409.1556, 2014. [19] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In CVPR, 2015. 10 [20] Andreas Veit, Michael J Wilber, and Serge Belongie. Residual networks behave like ensembles of relatively shallow networks. In NIPS, 2016. [21] Di Xie, Jiang Xiong, and Shiliang Pu. All you need is beyond a good init: Exploring better solution for training extremely deep convolutional neural networks with orthonormality and modulation. arXiv:1703.01827, 2017. 11 | 2017 | 223 |
6,701 | Interpretable and Globally Optimal Prediction for Textual Grounding using Image Concepts Raymond A. Yeh, Jinjun Xiong†, Wen-mei W. Hwu, Minh N. Do, Alexander G. Schwing Department of Electrical Engineering, University of Illinois at Urbana-Champaign †IBM Thomas J. Watson Research Center yeh17@illinois.edu, jinjun@us.ibm.com, w-hwu@illinois.edu, minhdo@illinois.edu, aschwing@illinois.edu Abstract Textual grounding is an important but challenging task for human-computer interaction, robotics and knowledge mining. Existing algorithms generally formulate the task as selection from a set of bounding box proposals obtained from deep net based systems. In this work, we demonstrate that we can cast the problem of textual grounding into a unified framework that permits efficient search over all possible bounding boxes. Hence, the method is able to consider significantly more proposals and doesn’t rely on a successful first stage hypothesizing bounding box proposals. Beyond, we demonstrate that the trained parameters of our model can be used as word-embeddings which capture spatial-image relationships and provide interpretability. Lastly, at the time of submission, our approach outperformed the current state-of-the-art methods on the Flickr 30k Entities and the ReferItGame dataset by 3.08% and 7.77% respectively. 1 Introduction Grounding of textual phrases, i.e., finding bounding boxes in images which relate to textual phrases, is an important problem for human-computer interaction, robotics and mining of knowledge bases, three applications that are of increasing importance when considering autonomous systems, augmented and virtual reality environments. For example, we may want to guide an autonomous system by using phrases such as ‘the bottle on your left,’ or ‘the plate in the top shelf.’ While those phrases are easy to interpret for a human, they pose significant challenges for present day textual grounding algorithms, as interpretation of those phrases requires an understanding of objects and their relations. Existing approaches for textual grounding, such as [38, 15] take advantage of the cognitive performance improvements obtained from deep net features. More specifically, deep net models are designed to extract features from given bounding boxes and textual data, which are then compared to measure their fitness. To obtain suitable bounding boxes, many of the textual grounding frameworks, such as [38, 15], make use of region proposals. While being easy to obtain, automatic extraction of region proposals is limiting, because the performance of the visual grounding is inherently constrained by the quality of the proposal generation procedure. In this work we describe an interpretable mechanism which additionally alleviates any issues arising due to a limited number of region proposals. Our approach is based on a number of ‘image concepts’ such as semantic segmentations, detections and priors for any number of objects of interest. Based on those ‘image concepts’ which are represented as score maps, we formulate textual grounding as a search over all possible bounding boxes. We find the bounding box with highest accumulated score contained in its interior. The search for this box can be solved via an efficient branch and bound 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. A woman in a green shirt is getting ready to throw her bowling ball down the lane... Two women wearing hats covered in flowers are posing. Young man wearing a hooded jacket sitting on snow in front of mountain area. second bike from right in front painting next to the two on the left person all the way to the right Figure 1: Results on the test set for grounding of textual phrases using our branch and bound based algorithm. Top Row: Flickr 30k Entities Dataset. Bottom Row: ReferItGame Dataset (Groundtruth box in green and predicted box in red). scheme akin to the seminal efficient subwindow search of Lampert et al. [25]. The learned weights can additionally be used as word embeddings. We are not aware of any method that solves textual grounding in a manner similar to our approach and hope to inspire future research into the direction of deep nets combined with powerful inference algorithms. We evaluate our proposed approach on the challenging ReferItGame [20] and the Flickr 30k Entities dataset [35], obtaining results like the ones visualized in Fig. 1. At the time of submission, our approach outperformed state-of-the-art techniques on the ReferItGame and Flickr 30k Entities dataset by 7.77% and 3.08% respectively using the IoU metric. We also demonstrate that the trained parameters of our model can be used as a word-embedding which captures spatial-image relationships and provides interpretability. 2 Related Work Textual grounding: Related to textual grounding is work on image retrieval. Classical approaches learn a ranking function using recurrent neural nets [30, 6], or metric learning [13], correlation analysis [22], and neural net embeddings [9, 21]. Beyond work in image retrieval, a variety of techniques have been considered to explicitly ground natural language in images and video. One of the first models in this area was presented in [31, 24]. The authors describe an approach that jointly learns visual classifiers and semantic parsers. Gong et al. [10] propose a canonical correlation analysis technique to associate images with descriptive sentences using a latent embedding space. In spirit similar is work by Wang et al. [42], which learns a structure-preserving embedding for image-sentence retrieval. It can be applied to phrase localization using a ranking framework. In [11], text is generated for a set of candidate object regions which is subsequently compared to a query. The reverse operation, i.e., generating visual features from query text which is subsequently matched to image regions is discussed in [1]. In [23], 3D cuboids are aligned to a set of 21 nouns relevant to indoor scenes using a Markov random field based technique. A method for grounding of scene graph queries in images is presented in [17]. Grounding of dependency tree relations is discussed in [19] and reformulated using recurrent nets in [18]. Subject-Verb-Object phrases are considered in [39] to develop a visual knowledge extraction system. Their algorithm reasons about the spatial consistency of the configurations of the involved entities. In [15, 29] caption generation techniques are used to score a set of proposal boxes and returning the highest ranking one. To avoid application of a text generation pipeline on bounding box proposals, [38] improve the phrase encoding using a long short-term memory (LSTM) [12] based deep net. Additional modeling of object context relationship were explored in [32, 14]. Video 2 9/5/2017 bbest_redraw 1/1 Features Word Prior Detection Segmentation Input "The left guy" Image : Query : a guy left the youth Energy Output : ˆ Figure 2: Overview of our proposed approach: We obtain word priors from the input query, take into account geometric features, as well as semantic segmentation features computed from the provided input image. We compute the three image cues to predict the four variables of the bounding box y = (y1, . . . , y4). datasets, although not directly related to our work in this paper, were used for spatiotemporal language grounding in [27, 45]. Common datasets for visual grounding are the ReferItGame dataset [20] and a newly introduced Flickr 30k Entities dataset [35], which provides bounding box annotations for noun phrases of the original Flickr 30k dataset [44]. In contrast to all of the aforementioned methods, which are largely based on region proposals, we suggest usage of efficient subwindow search as a suitable inference engine. Efficient subwindow search: Efficient subwindow search was proposed by Lampert et al. [25] for object localization. It is based on an extremely effective branch and bound scheme that can be applied to a large class of energy functions. The approach has been applied to very efficient deformable part models [43], for object class detection [26], for weakly supervised localization [5], indoor scene understanding [40], diverse object proposals [41] and also for spatio-temporal object detection proposals [33]. 3 Exact Inference for Grounding We outline our approach for textual grounding in Fig. 2. In contrast to the aforementioned techniques for textual grounding, which typically use a small set of bounding box proposals, we formulate our language grounding approach as an energy minimization over a large number of bounding boxes. The search over a large number of bounding boxes allows us to retrieve an accurate bounding-box prediction for a given phrase and an image. Importantly, by leveraging efficient branch-and-bound techniques, we are able to find the global minimizer for a given energy function very effectively. Our energy is based on a set of ‘image concepts’ like semantic segmentations, detections or image priors. All those concepts come in the form of score maps which we combine linearly before searching for the bounding box containing the highest accumulated score over the combined score map. It is trivial to add additional information to our approach by adding additional score maps. Moreover, linear combination of score maps reveals importance of score maps for specific queries as well as similarity between queries such as ‘skier’ and ‘snowboarder.’ Hence the framework that we discuss in the following is easy to interpret and extend to other settings. General problem formulation: For simplicity we use x to refer to both given input data modalities, i.e., x = (Q, I), with query text, Q, and image, I. We will differentiate them in the narrative. In addition, we define a bounding box y via its top left corner (y1, y2) and its bottom right corner (y3, y4) and subsume the four variables of interest in the tuple y = (y1, . . . , y4) ∈Y = Q4 i=1{0, . . . , yi,max}. Every integral coordinate yi, i ∈{1, . . . , 4} lies within the set {0, . . . , yi,max}, and Y denotes the 3 ‘left’ ‘center’ ‘right’ ‘floor’ Algorithm 1 Branch and bound inference for grounding 1: put pair ( ¯E(x, Y, w), Y) into queue, set ˆY = Y 2: repeat 3: split ˆY = ˆY1 · ˆY2 with ˆY1 ∩ˆY2 = ∅ 4: put pair ( ¯E(x, Y1, w), Y1) into queue 5: put pair ( ¯E(x, Y2, w), Y2) into queue 6: retrieve ˆY having smallest ¯E 7: until | ˆY| = 1 (a) (b) Figure 3: Word priors in (a) and the employed inference algorithm in (b). product space of all four coordinates. For notational simplicity only, we assume all images to be scaled to identical dimensions, i.e., yi,max is not dependent on the input data x. We obtain a bounding box prediction ˆy given our data x, by solving the energy minimization ˆy = arg min y∈Y E(x, y, w), (1) to global optimality. Note that w refers to the parameters of our model. Despite the fact that we are ‘only’ interested in a single bounding box, the product space Y is generally too large for exhaustive minimization of the energy specified in Eq. (1). Therefore, we pursue a branch-and-bound technique in the following. To apply branch and bound, we assume that the energy function E(x, y, w) depends on two sets of parameters w = [wT t , wT r ]T , i.e., the top layer parameters wt of a neural net, and the remaining parameters wr. In light of this decomposition, our approach requires the energy function to be of the following form: E(x, y, w) = wT t φ(x, y, wr). Note that the features φ(x, y, wr) may still depend non-linearly on all but the top-layer parameters. This assumption does not pose a severe restriction since almost all of the present-day deep net models typically obtain the logits E(x, y, w) using a fully-connected layer or a convolutional layer with kernel size 1 × 1 as the last computation. Energy Function Details: Our energy function E(x, y, w) is based on a set of ‘image concepts,’ such as semantic segmentation of object categories, detections, or word priors, all of which we subsume in the set C. Importantly, all image concepts c ∈C are attached a parametric score map ˆφc(x, wr) ∈RW ×H following the image width W and height H. Note that those parametric score maps may depend nonlinearly on some parameters wr. Given a bounding box y, we use the scalar φc(x, y, wr) ∈R to refer to the score accumulated within the bounding box y of score map ˆφc(x, wr). To define the energy function we also introduce a set of words of interest, i.e., S. Note that this set contains a special symbol denoting all other words not of interest for the considered task. We use the given query Q, which is part of the data x, to construct indicators, ιs = δ(s ∈Q) ∈{0, 1}, denoting for every token s ∈S its existence in the query Q, where δ denotes the indicator function. Based on this definition, we formulate the energy function as follows: E(x, y, w) = X s∈S:ιs=1 X c∈C ws,cφc(x, y, wr), (2) where ws,c is a parameter connecting a word s ∈S to an image concept c ∈C. In other words, wt = (ws,c : ∀s ∈S, c ∈C). This energy function results in a sparse wt, which increases the speed of inference. Score maps: The energy is given by a linear combination of accumulated score maps φc(x, y, wr). In our case, we use |C| = k1 + k2 + k3 of those maps, which capture three kinds of information: (i) k1 word-priors; (ii) k2 geometric information cues; and (iii) k3 image based segmentations and detections. We discuss each of those maps in the following. 4 Approach Accuracy (%) SCRC (2016) [15] 27.80 DSPE (2016) [42] 43.89 GroundeR (2016) [38] 47.81 CCA (2017) [36] 50.89 Ours (Prior + Geo + Seg + Det) 51.63 Ours (Prior + Geo + Seg + bDet) 53.97 Table 1: Phrase localization performance on Flickr 30k Entities. Approach Accuracy (%) SCRC (2016) [15] 17.93 GroundeR (2016) [38] 23.44 GroundeR (2016) [38] +SPAT 26.93 Ours (Prior + Geo) 25.56 Ours (Prior + Geo + Seg) 33.36 Ours (Prior + Geo + Seg + Det) 34.70 Table 2: Phrase localization performance on ReferItGame. people clothing body parts animals vehicles instruments scene other # Instances 5,656 2,306 523 518 400 162 1,619 3,374 GroundeR(2016) [38] 61.00 38.12 10.33 62.55 68.75 36.42 58.18 29.08 CCA(2017) [36] 64.73 46.88 17.21 65.83 68.75 37.65 51.39 31.77 Ours 68.71 46.83 19.50 70.07 73.75 39.50 60.38 32.45 Table 3: Phrase localization performance over types on Flickr 30k Entities (accuracy in %). For the top k1 words in the training set we construct word prior maps like the ones shown in Fig. 3 (a). To obtain the prior for a particular word, we search a given training set for each occurrence of the word. With the corresponding subset of image-text pairs and respective bounding box annotations at hand, we compute the average number of times a pixel is covered by a bounding box. To facilitate this operation, we scale each image to a predetermined size. Investigating the obtained word priors given in Fig. 3 (a) more carefully, it is immediately apparent that they provide accurate location information for many of the words. The k2 = 2 geometric cues provide the aspect ratio and the area of the hypothesized bounding box y. Note that the word priors and geometry features contain no information about the image specifics. To encode measurements dedicated to the image at hand, we take advantage of semantic segmentation and object detection techniques. The k3 image based features are computed using deep neural nets as proposed by [4, 37, 2]. We obtain probability maps for a set of class categories, i.e., a subset of the nouns of interest. The feature φ accumulates the scores within the hypothesized bounding box y. Inference: The algorithm to find the bounding box ˆy with lowest energy as specified in Eq. (1) is based on an iterative decomposition of the output space Y [25], summarized in Fig. 3 (b). To this end we search across subsets of the product space Y and we define for every coordinate yi, i ∈{1, . . . , 4} a corresponding lower and upper bound, yi,low and yi,high respectively. More specifically, considering the initial set of all possible bounding boxes Y, we divide it into two disjoint subsets ˆY1 and ˆY2. For example, by constraining y1 to {0, . . . , y1,max/2} and {y1,max/2 + 1, . . . , y1,max} for ˆY1 and ˆY2 respectively, while keeping all the other intervals unchanged. It is easy to see that we can repeat this decomposition by choosing the largest among the four intervals and recursively dividing it into two parts. Given such a repetitive decomposition strategy for the output space, and since the energy E(x, y, w) for a bounding box y is obtained using a linear combination of word priors and accumulated segmentation masks, we can design an efficient branch and bound based search algorithm to exactly solve the inference problem specified in Eq. (1). The algorithm proceeds by iteratively decomposing a product space ˆY into two subspaces ˆY1 and ˆY2. For each subspace, the algorithm computes a lower bound ¯E(x, Yj, w) for the energy of all possible bounding boxes within the respective subspace. Intuitively, we then know, that any bounding box within the subspace ˆYj has a larger energy than the lower bound. The algorithm proceeds by choosing the subspace with lowest lower-bound until this subspace consists of a single element, i.e., until | ˆY| = 1. We summarize this algorithm in Alg. 1 (Fig. 3 (b)). To this end, it remains to show how to compute a lower bound ¯E(x, Yj, w) on the energy for an output space, and to illustrate the conditions which guarantee convergence to the global minimum of the energy function. For the latter, we note that two conditions are required to ensure convergence to the optimum: (i) the bound of the considered product space has to lower-bound the true energy for each of its bounding 5 The lady in the red car is crossing the bridge. A dog and a cow play together inside the fence. A woman wearig the black sunglasses and blue jean jacket is smiling. person on the left black bottle front floor on the bottom Figure 4: Results on the test set for grounding of textual phrases using our branch and bound based algorithm. Top Row: Flickr 30k Entities Dataset. Bottom Row: ReferItGame Dataset (Groundtruth box in green and predicted box in red). box hypothesis ˆy ∈ˆY, i.e., ∀ˆy ∈ˆY, ¯E(x, ˆY, w) ≤E(x, ˆy, w); (ii) the bound has to be exact for all possible bounding boxes y ∈Y, i.e., ¯E(x, y, w) = E(x, y, w). Given those two conditions, global convergence of the algorithm summarized in Alg. 1 is apparent: upon termination we obtain an ‘interval’ containing a single bounding box, and its energy is at least as low as the one for any other interval. For the former, we note that bounds on score maps for bounding box intervals can be computed by considering either the largest or the smallest possible bounding box in the bounding box hypothesis, ˆY, depending on whether the corresponding weight in wt is positive or negative and whether the feature maps contain only positive or negative values. Intuitively, if the weight is positive and the feature mask contains only positive values, we obtain the smallest lower bound ¯E(x, ˆY, w) by considering the content within the smallest possible bounding box. Note that the score maps do not necessarily contain only positive or negative numbers. However we can split the given score maps into two separate score maps (i.e., one with only positive values, and another with only negative values) while applying the same weight. It is important to note that computation of the bound ¯E(x, ˆY, w) has to be extremely effective for the algorithm to run at a reasonable speed. However, computing the feature mask content for a bounding box is trivially possible using integral images. This results in a constant time evaluation of the bound, which is a necessity for the success of the branch and bound procedure. Learning the Parameters: With the branch and bound based inference procedure at hand, we now describe how to formulate the learning task. Support-vector machine intuition can be applied. Formally, we are given a training set D = {(x, y)} containing pairs of input data x and groundtruth bounding boxes y. We want to find the parameters w of the energy function E(x, y, w) such that the energy of the groundtruth is smaller than the energy of any other configuration. Negating this statement results in the following desiderata when including an additional margin term L(y, ˆy), also known as task-loss, which measures the loss between the groundtruth y and another configuration ˆy: −E(x, y, w) ≥−E(x, ˆy, w) + L(ˆy, y) ∀ˆy ∈Y. Since we want to enforce this inequality for all configurations ˆy ∈Y, we can reduce the number of constraints by enforcing it for the highest scoring right hand side. We then design a cost function which penalizes violation of this requirement linearly. We obtain the following structured support vector machine based surrogate loss minimization: min w C 2 ∥w∥2 2 + X (x,y)∈D max ˆy∈Y (−E(x, ˆy, w) + L(ˆy, y)) + E(x, y, w) (3) where C is a hyperparameter adjusting the squared norm regularization to the data term. For the task loss L(ˆy, y) we use intersection over union (IoU). 6 her shoes a red shirt a dirt bike Figure 5: Flickr 30k Failure Cases. (Green box: ground-truth, Red box:predicted) By fixing the parameters wr and only learning the top layer parameters wt, Eq. (3) is equivalent to the problem of training a structured SVM. We found the cutting-plane algorithm [16] to work well in our context. The cutting-plane algorithm involves solving the maximization task. This maximization over the output space Y is commonly referred to as loss-augmented inference. Loss augmented inference is structurally similar to the inference task given in Eq. (1). Since maximization is identical to negated minimization, the computation of the bounds for the energy E(x, ˆy, w) remains identical. To bound the IoU loss, we note that a quotient can be bounded by bounding nominator and denominator independently. To lower bound the intersection of the groundtruth box with the hypothesis space we use the smallest hypothesized bounding box. To upper bound the union of the groundtruth box with the hypothesis space we use the largest bounding box. Further, even though not employed to obtain the results in this paper, we mention that it is possible to backpropagate through the neural net parameters wr that influence the energy non-linearly. This underlines that our initial assumption is merely a construct to design an effective inference procedure. 4 Experimental Evaluation In the following we first provide additional details of our implementation before discussing the results of our approach. Language processing: In order to process free-form textual phrases efficiently, we restricted the vocabulary size to the top 200 most frequent words in the training set for the ReferItGame, and to the top 1000 most frequent training set words for Flickr 30k Entities; both choices cover about 90% of all phrases in the training set. We map all the remaining words into an additional token. We don’t differentiate between uppercase and lower case characters and we also ignore punctuation. Segmentation and detection maps: We employ semantic segmentation, object detection, and poseestimation. For segmentation, we use the DeepLab system [4], trained on PASCAL VOC-2012 [8] semantic image segmentation task, to extract the probability maps for 21 categories. For detection, we use the YOLO object detection system [37], to extract 101 categories, 21 trained on PASCAL VOC-2012, and 80 trained on MSCOCO [28]. For pose estimation, we use the system from [2] to extract the body part location, then post-process to get the head, upper body, lower body, and hand regions. For the ReferItGame, we further fine-tuned the last layer of the DeepLab system to include the categories of ‘sky,’ ‘ground,’ ‘building,’ ‘water,’ ‘tree,’ and ‘grass.’ For the Flickr 30k Entities, we also fine-tuned the last layer of the DeepLab system using the eight coarse-grained types and eleven colors from [36]. Preprocessing and post-processing: For word prior feature maps and the semantic segmentation maps, we take an element-wise logarithm to convert the normalized feature counts into logprobabilities. The summation over a bounding box region then retains the notion of a joint logprobability. We also centered the feature maps to be zero-mean, which corresponds to choosing an initial decision threshold. The feature maps are resized to dimension of 64 × 64 for efficient computation, and the predicted box is scaled back to the original image dimension during evaluation. We re-center the prediction box by a constant amount determined using the validation set, as resizing truncate box coordinates to an integer. Efficient sub-window search implementation: In order for the efficient subwindow search to run at a reasonable speed, the lower bound on E needs to be computed as fast as possible. Observe that, E(x, y, w), is a weighted sum of the feature maps over the region specified by a hypothesized bounding box. To make this computation efficient, we pre-compute integral images. Given an integral 7 aeroplane bicycle bird boat bottle bus car cat chair Concept, c plane bike bird ship bottle bus car cat chair Query word, s 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 bicycle bike camera cellphone coffee cup drink man skier snowboarder woman Query word, s′ bicycle bike camera cellphone coffee cup drink man skier snowboarder woman Query word, s 0.00 0.15 0.30 0.45 0.60 0.75 0.90 (a) (b) Figure 6: (a) Trained weight, ws,c, visualization on words, s and segmentation concepts, c, on Flicker 30k. (b) Cosine similairty visualization between words vector, ws and w′ s on Flicker 30k. image, the computation for each of the bounding box is simply a look-up operation. This trick can similarly be applied for the geometric features. Since we know the range of the ratio and areas of the bounding boxes ahead of time, we cache the results in a look up table as well. The ReferItGame dataset consists of more than 99,000 regions from 20,000 images. Bounding boxes are assigned to natural language expressions. We use the same bounding boxes as [38] and the same training test set split, i.e., 10,000 images for testing, 9,000 images for training and 1,000 images for validation. The Flickr 30k Entities dataset consists of more than 275k bounding boxes from 31k image, where each bounding box is annotated with the corresponding natural language phrase. We us the same training, validation and testing split as in [35]. Quantitative evaluation: In Tab. 1 and Tab. 2 we quantitatively compare the results of our approach to recent state-of-the-art baselines, where Prior = word priors, Geo = geometric information, Seg = Segmentation maps, Det = Detection maps, bDet = Detection maps + body parts detection. An example is considered as correct, if the predicted box overlaps with the ground-truth box by more than 0.5 IoU. We observe our approach to outperform competing methods by around 3% on the Flickr 30k Entities dataset and by around 7% on the ReferItGame dataset. We also provide an ablation study of the word and image information as shown in Tab. 1 and Tab. 2. In Tab. 3 we analyze the results for each “phrase type” provided by Flicker30k Entities dataset. As can be seen, our system outperforms the state-of-the-art in all phrase types except for clothing. We note that our results have been surpassed by [3, 7, 34], where they fine-tuned the entire network including the feature extractions or trained more feature detectors; CCA, GroundeR and our approach uses a fixed pre-trained network for extracting image features. Qualitative evaluation: Next we evaluate our approach qualitatively. In Fig. 1 and Fig. 4 we show success cases. We observe that our method successfully captures a variety of objects and scenes. In Fig. 5 we illustrate failure cases. We observe that for a few cases word prior may hurt the prediction (e.g., shoes are typically on the bottom half of the image.) Also our system may fail when the energy is not a linear combination of the feature scores. For example, the score of “dirt bike” should not be the score of “dirt” + the score of “bike.” We provide additional results in the supplementary material. Learned parameters + word embedding: Recall, in Eq. (2), our model learns a parameter per phrase word and concept pair, ws,c. We visualize its magnitude in Fig. 6 (a) for a subset of words and concepts. As can be seen, ws,c is large, when the phrase word and the concept are related, (e.g. s = ship and c = boat). This demonstrates that our model successfully learns the relationship between phrase words and image concepts. This also means that the “word vector,” ws = [ws,1, ws,2, ...ws,|C|], can be interpreted as a word embedding. Therefore, in Fig. 6 (b), we visualize the cosine similarity between pairs of word vectors. Expected groups of words form, for example (bicycle, bike), (camera, cellphone), (coffee, cup, drink), (man woman), (snowboarder, skier). The word vectors capture 8 image-spatial relationship of the words, meaning items that can be “replaced” in an image are similar; (e.g., a “snowboarder” can be replaced with a “skier” and the overall image would still be reasonable). Computational Efficiency: Overall, our method’s inference speed is comparable to CCA and much faster than GroundeR. The inference speed can be divided into three main parts, (1) extracting image features, (2) extracting language features, and (3) computing scores. For extracting image features, GroundeR requires a forward pass on VGG16 for each image region, where CCA and our approach requires a single forward pass which can be done in 142.85 ms. For extracting language features, our method requires index lookups, which takes negligible amount of time (less than 1e-6 ms). CCA, uses Word2vec for processing the text, which takes 0.070 ms. GroundeR uses a Long-Short-Term Memory net, which takes 0.7457 ms. Computing the scores with our C++ implementation takes 1.05ms on a CPU. CCA needs to compare projections of the text and image features, which takes 13.41ms on a GPU and 609ms on a CPU. GroundeR uses a single fully connected layer, which takes 0.31 ms on a GPU. 5 Conclusion We demonstrated a mechanism for grounding of textual phrases which provides interpretability, is easy to extend, and permits globally optimal inference. In contrast to existing approaches which are generally based on a small set of bounding box proposals, we efficiently search over all possible bounding boxes. We think interpretability, i.e., linking of word and image concepts, is an important concept, particularly for textual grounding, which deserves more attention. Acknowledgments: This material is based upon work supported in part by the National Science Foundation under Grant No. 1718221. This work is supported by NVIDIA Corporation with the donation of a GPU. This work is supported in part by IBM-ILLINOIS Center for Cognitive Computing Systems Research (C3SR) - a research collaboration as part of the IBM Cognitive Horizons Network. 9 References [1] R. Arandjelovic and A. Zisserman. Multiple queries for large scale specific object retrieval. In Proc. BMVC, 2012. [2] Z. Cao, T. Simon, S.-E. Wei, and Y. Sheikh. Realtime multi-person 2d pose estimation using part affinity fields. In Proc. CVPR, 2017. [3] K. Chen∗, R. Kovvuri∗, and R. Nevatia. Query-guided regression network with context policy for phrase grounding. In Proc. ICCV, 2017. ∗equal contribution. [4] L.-C. Chen∗, G. Papandreou∗, I. Kokkinos, K. Murphy, and A. L. Yuille. Semantic Image Segmentation with Deep Convolutional Nets and Fully Connected CRFs. In Proc. ICLR, 2015. (∗equal contribution). [5] T. Deselaers, B. Alexe, and V. Ferrari. Weakly supervised localization and learning with generic knowledge. IJCV, 2012. [6] J. Donahue, L. A. Hendricks, S. Guadarrama, M. Rohrbach, S. Venugopalan, K. Saenko, and T. Darrell. Long-term recurrent convolutional networks for visual recognition and description. In Proc. CVPR, 2015. [7] K. Endo, M. Aono, E. Nichols, and K. Funakoshi. An attention-based regression model for grounding textual phrases in images. In Proc. IJCAI, 2017. [8] M. Everingham, L. Van Gool, C. K. Williams, J. Winn, and A. Zisserman. The pascal visual object classes (voc) challenge. IJCV, 2010. [9] A. Frome, G. S. Corrado, J. Shlens, S. Bengio, J. Dean, and T. Mikolov. Devise: A deep visual-semantic embed- ding model. In Proc. NIPS, 2013. [10] Y. Gong, L. Wang, M. Hodosh, J. Hockenmaier, and S. Lazebnik. Improving image-sentence embeddings using large weakly annotated photo collections. In Proc. ECCV, 2014. [11] S. Guadarrama, E. Rodner, K. Saenko, N. Zhang, R. Farrell, J. Donahue, and T. Darrell. Open-vocabulary object retrieval. In Proc. RSS, 2014. [12] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Computation, 1997. [13] S. C. Hoi, W. Liu, M. R. Lyu, and W.-Y. Ma. Learning distance metrics with contextual constraints for image retrieval. In Proc. CVPR, 2006. [14] R. Hu, M. Rohrbach, J. Andreas, T. Darrell, and K. Saenko. Modeling relationships in referential expressions with compositional modular networks. In Proc. CVPR, 2017. [15] R. Hu, H. Xu, M. Rohrbach, J. Feng, K. Saenko, and T. Darrell. Natural language object retrieval. In Proc. CVPR, 2016. [16] T. Joachims, T. Finley, and C.-N. J. Yu. Cutting-plane training of structural svms. Machine Learning, 2009. [17] J. Johnson, R. Krishna, M. Stark, L. J. Li, D. Shamma, M. Bernstein, and L. Fei-Fei. Image retrieval using scene graphs. In Proc. CVPR, 2015. [18] A. Karpathy and L. Fei-Fei. Deep visual-semantic alignments for generating image descriptions. In Proc. CVPR, 2015. [19] A. Karpathy, A. Joulin, and L. Fei-Fei. Deep fragment embeddings for bidirectional image sentence mapping. In Proc. NIPS, 2014. [20] S. Kazemzadeh, V. Ordonez, M. Matten, and T. L. Berg. ReferItGame: Referring to objects in photographs of natural scenes. In Proc. EMNLP, 2014. [21] R. Kiros, R. Salakhutdinov, and R. S. Zemel. Unifying visual-semantic embeddings with multimodal neural language models. In TACL, 2015. [22] B. Klein, G. Lev, G. Sadeh, and L. Wolf. Fisher vectors derived from hybrid gaussian-laplacian mixture models for image annotation. In arXiv preprint arXiv:1411.7399, 2014. [23] C. Kong, D. Lin, M. Bansal, R. Urtasun, and S. Fidler. What are you talking about? text-to-image coreference. In Proc. CVPR, 2014. [24] J. Krishnamurthy and T. Kollar. Jointly learning to parse and perceive: connecting natural language to the physical world. In Proc. TACL, 2013. [25] C. H. Lampert, M. B. Blaschko, and T. Hofmann. Efficient Subwindow Search: A Branch and Bound Framework for Object Localization. PAMI, 2009. [26] A. Lehmann, B. Leibe, and L. V. Gool. Fast PRISM: Branch and Bound Hough Transform for Object Class Detection. IJCV, 2011. [27] D. Lin, S. Fidler, C. Kong, and R. Urtasun. Visual semantic search: Retrieving videos via complex textual queries. In Proc. CVPR, 2014. [28] T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollár, and C. L. Zitnick. Microsoft coco: Common objects in context. In Proc. ECCV, 2014. [29] J. Mao, J. Huang, A. Toshev, O. Camburu, A. Yuille, and K. Murphy. Generation and comprehension of unambiguous object descriptions. In Proc. CVPR, 2016. [30] J. Mao, W. Xu, Y. Yang, J. Wang, Z. Huang, and A. Yuille. Deep captioning with multimodal recurrent neural networks (m-rnn). In Proc. ICLR, 2015. [31] C. Matuszek, N. Fitzgerald, L. Zettlemoyer, L. Bo, and D. Fox. A joint model of language and perception for grounded attribute learning. In Proc. ICML, 2012. [32] V. K. Nagaraja, V. I. Morariu, and L. S. Davis. Modeling context between objects for referring expression understanding. In Proc. ECCV, 2016. [33] D. Oneata, J. Revaud, J. Verbeek, and C. Schmid. Spatio-temporal object detection proposals. In Proc. ECCV, 2014. [34] B. A. Plummer, A. Mallya, C. M. Cervantes, J. Hockenmaier, and S. Lazebnik. Phrase localization and visual relationship detection with comprehensive image-language cues. In Proc. ICCV, 2017. [35] B. A. Plummer, L. Wang, C. M. Cervantes, J. C. Caicedo, J. Hockenmaier, and S. Lazebnik. Collecting region-to-phrase correspondences for richer image-to- sentence models. In Proc. ICCV, 2015. 10 [36] B. A. Plummer, L. Wang, C. M. Cervantes, J. C. Caicedo, J. Hockenmaier, and S. Lazebnik. Flickr30k entities: Collecting region-to-phrase correspondences for richer image-to-sentence models. IJCV, 2017. [37] J. Redmon and A. Farhadi. Yolo9000: Better, faster, stronger. In CVPR, 2017. [38] A. Rohrbach, M. Rohrbach, R. Hu, T. Darrell, and B. Schiele. Grounding of Textual Phrases in Images by Reconstruction. In Proc. ECCV, 2016. [39] F. Sadeghi, S. K. Divvala, and A. Farhadi. Viske: Visual knowledge extraction and question answering by visual verification of relation phrases. In Proc. CVPR, 2015. [40] A. G. Schwing and R. Urtasun. Efficient Exact Inference for 3D Indoor Scene Understanding. In Proc. ECCV, 2012. [41] Q. Sun and D. Batra. Submodboxes: Near-optimal search for a set of diverse object proposals. In Proc. NIPS, 2015. [42] L. Wang, Y. Li, and S. Lazebnik. Learning deep structure-preserving image-text em- beddings. In Proc. CVPR, 2016. [43] J. Yan, Z. Lei, L. Wen, and S. Z. Li. The Fastest Deformable Part Model for Object Detection. In Proc. CVPR, 2014. [44] P. Young, A. Lai, M. Hodosh, and J. Hockenmaier. From image descriptions to visual denotations: New similarity metrics for semantic inference over event descriptions. In Proc. TACL, 2014. [45] H. Yu and J. M. Siskind. Grounded language learning from video described with sen- tences. In Proc. ACL, 2013. 11 | 2017 | 224 |
6,702 | Off-policy evaluation for slate recommendation Adith Swaminathan Microsoft Research, Redmond adswamin@microsoft.com Akshay Krishnamurthy University of Massachusetts, Amherst akshay@cs.umass.edu Alekh Agarwal Microsoft Research, New York alekha@microsoft.com Miroslav Dudík Microsoft Research, New York mdudik@microsoft.com John Langford Microsoft Research, New York jcl@microsoft.com Damien Jose Microsoft, Redmond dajose@microsoft.com Imed Zitouni Microsoft, Redmond izitouni@microsoft.com Abstract This paper studies the evaluation of policies that recommend an ordered set of items (e.g., a ranking) based on some context—a common scenario in web search, ads, and recommendation. We build on techniques from combinatorial bandits to introduce a new practical estimator that uses logged data to estimate a policy’s performance. A thorough empirical evaluation on real-world data reveals that our estimator is accurate in a variety of settings, including as a subroutine in a learningto-rank task, where it achieves competitive performance. We derive conditions under which our estimator is unbiased—these conditions are weaker than prior heuristics for slate evaluation—and experimentally demonstrate a smaller bias than parametric approaches, even when these conditions are violated. Finally, our theory and experiments also show exponential savings in the amount of required data compared with general unbiased estimators. 1 Introduction In recommendation systems for e-commerce, search, or news, we would like to use the data collected during operation to test new content-serving algorithms (called policies) along metrics such as revenue and number of clicks [4, 25]. This task is called off-policy evaluation. General approaches, namely inverse propensity scores (IPS) [13, 18], require unrealistically large amounts of logged data to evaluate whole-page metrics that depend on multiple recommended items, which happens when showing ranked lists. The key challenge is that the number of possible lists (called slates) is combinatorially large. As a result, the policy being evaluated is likely to choose different slates from those recorded in the logs most of the time, unless it is very similar to the data-collection policy. This challenge is fundamental [34], so any off-policy evaluation method that works with large slates needs to make some structural assumptions about the whole-page metric or the user behavior. Previous work on off-policy evaluation and whole-page optimization improves the probability of match between logging and evaluation by restricting attention to small slate spaces [35, 26], introducing assumptions that allow for partial matches between the proposed and observed slates [27], or assuming that the policies used for logging and evaluation are similar [4, 32]. Another line of work constructs parametric models of slate quality [8, 16, 14] (see also Sec. 4.3 of [17]). While these approaches require less data, they can have large bias, and their use in practice requires an expensive trial-and-error cycle involving weeks-long A/B tests to develop new policies [20]. In this paper we 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 0.0 0.2 0.4 0.6 0.8 1.0 Number of logged samples (n) 0.0 0.2 0.4 0.6 0.8 1.0 RMSE 103 104 10−1 100 101 Reward: Negative Time-to-success 103 104 10−0.5 100 Reward: Utility Rate OnPolicy IPS DM: tree PI Figure 1: Off-policy evaluation of two whole-page user-satisfaction metrics on proprietary search engine data. Average RMSE of different estimators over 50 runs on a log-log scale. Our method (PI) achieves the best performance with moderate data sizes. The unbiased IPS method suffers high variance, and direct modeling (DM) of the metrics suffers high bias. ONPOLICY is the expensive choice of deploying the policy, for instance, in an A/B test. design a method more robust to problems with bias and with only modest data requirements, with the goal of substantially shortening this cycle and accelerating the policy development process. We frame the slate recommendation problem as a combinatorial generalization of contextual bandits [3, 23, 13]. In combinatorial contextual bandits, for each context, a policy selects a slate consisting of component actions, after which a reward for the entire slate is observed. In web search, the context is the search query augmented with a user profile, the slate is the search results page consisting of a list of retrieved documents (actions), and example reward metrics are page-level measures such as time-to-success, NDCG (position-weighted relevance), or other measures of user satisfaction. As input we receive contextual bandit data obtained by some logging policy, and our goal is to estimate the reward of a new target policy. This off-policy setup differs from online learning in contextual bandits, where the goal is to adaptively maximize the reward in the presence of an explore-exploit trade-off [5]. Inspired by work in combinatorial and linear bandits [7, 31, 11], we propose an estimator that makes only a weak assumption about the evaluated metric, while exponentially reducing the data requirements in comparison with IPS. Specifically, we posit a linearity assumption, stating that the slate-level reward (e.g., time to success in web search) decomposes additively across actions, but the action-level rewards are not observed. Crucially, the action-level rewards are allowed to depend on the context, and we do not require that they be easily modeled from the features describing the context. In fact, our method is completely agnostic to the representation of contexts. We make the following contributions: 1. The pseudoinverse estimator (PI) for off-policy evaluation: a general-purpose estimator from the combinatorial bandit literature, adapted for off-policy evaluation. When ranking ℓout of m items under the linearity assumption, PI typically requires O(ℓm/ε2) samples to achieve error at most ε—an exponential gain over the mΩ(ℓ) sample complexity of IPS. We provide distribution-dependent bounds based on the overlap between logging and target policies. 2. Experiments on real-world search ranking datasets: The strong performance of the PI estimator provides, to our knowledge, the first demonstration of high-quality off-policy evaluation of whole-page metrics, comprehensively outperforming prior baselines (see Fig. 1). 3. Off-policy optimization: We provide a simple procedure for learning to rank (L2R) using the PI estimator to impute action-level rewards for each context. This allows direct optimization of whole-page metrics via pointwise L2R approaches, without requiring pointwise feedback. Related work Large state spaces have typically been studied in the online, or on-policy, setting. Some works assume specific parametric (e.g., linear) models relating the metrics to the features describing a slate [2, 31, 15, 10, 29]; this can lead to bias if the model is inaccurate (e.g., we might not have access to sufficiently predictive features). Others posit the same linearity assumption as we do, but further assume a semi-bandit feedback model where the rewards of all actions on the slate 2 are revealed [19, 22, 21]. While much of the research focuses on on-policy setting, the off-policy paradigm studied in this paper is often preferred in practice since it might not be possible to implement low-latency updates needed for online learning, or we might be interested in many different metrics and require a manual review of their trade-offs before deploying new policies. At a technical level, the PI estimator has been used in online learning [7, 31, 11], but the analysis there is tailored to the specific data collection policies used by the learner. In contrast, we provide distribution-dependent bounds without any assumptions on the logging or target policy. 2 Setting and notation In combinatorial contextual bandits, a decision maker repeatedly interacts as follows: 1. the decision maker observes a context x drawn from a distribution D(x) over some space X; 2. based on the context, the decision maker chooses a slate s = (s1, . . . , sℓ) consisting of actions sj, where a position j is called a slot, the number of slots is ℓ, actions at position j come from some space Aj(x), and the slate s is chosen from a set of allowed slates S(x) ⊆A1(x) × · · · × Aℓ(x); 3. given the context and slate, a reward r ∈[−1, 1] is drawn from a distribution D(r | x, s); rewards in different rounds are independent, conditioned on contexts and slates. The context space X can be infinite, but the set of actions is finite. We assume |Aj(x)| = mj for all contexts x ∈X and define m := maxj mj as the maximum number of actions per slot. The goal of the decision maker is to maximize the reward. The decision maker is modeled as a stochastic policy π that specifies a conditional distribution π(s | x) (a deterministic policy is a special case). The value of a policy π, denoted V (π), is defined as the expected reward when following π: V (π) := Ex∼DEs∼π(·|x)Er∼D(·|x,s) r . (1) To simplify derivations, we extend the conditional distribution π into a distribution over triples (x, s, r) as π(x, s, r) := D(r | x, s)π(s | x)D(x). With this shorthand, we have V (π) = Eπ[r]. To finish this section, we introduce notation for the expected reward for a given context and slate, which we call the slate value, and denote as: V (x, s) := Er∼D(·|x,s)[r] . (2) Example 1 (Cartesian product). Consider the optimization of a news portal where the reward is the whole-page advertising revenue. Context x is the user profile, slate is the news-portal page with slots corresponding to news sections,1 and actions are the articles. The set of valid slates is the Cartesian product S(x) = Q j≤ℓAj(x). The number of valid slates is exponential in ℓ: |S(x)| = Q j≤ℓmj. Example 2 (Ranking). Consider web search and ranking. Context x is the query along with user profile. Actions correspond to search items (such as webpages). The policy chooses ℓof m items, where the set A(x) of m items for a context x is chosen from a corpus by a filtering step (e.g., a database query). We have Aj(x) = A(x) for all j ≤ℓ, but the allowed slates S(x) have no repetitions. The number of valid slates is exponential in ℓ: |S(x)| = m!/(m −ℓ)! = mΩ(ℓ). A reward could be the negative time-to-success, i.e., negative of the time taken by the user to find a relevant item. 2.1 Off-policy evaluation and optimization In the off-policy setting, we have access to the logged data (x1, s1, r1), . . . , (xn, sn, rn) collected using a past policy µ, called the logging policy. Off-policy evaluation is the task of estimating the value of a new policy π, called the target policy, using the logged data. Off-policy optimization is the harder task of finding a policy ˆπ that achieves maximal reward. There are two standard approaches for off-policy evaluation. The direct method (DM) uses the logged data to train a (parametric) model ˆr(x, s) for predicting the expected reward for a given context and slate. V (π) is then estimated as ˆVDM(π) = 1 n Pn i=1 P s∈S(x) ˆr(xi, s)π(s | xi) . (3) 1For simplicity, we do not discuss the more general setting of showing multiple articles in each news section. 3 The direct method is often biased due to mismatch between model assumptions and ground truth. The second approach, which is provably unbiased (under modest assumptions), is the inverse propensity score (IPS) estimator [18]. The IPS estimator re-weights the logged data according to ratios of slate probabilities under the target and logging policy. It has two common variants: ˆVIPS(π) = 1 n Pn i=1 ri · π(si|xi) µ(si|xi) , ˆVwIPS(π) = Pn i=1 ri · π(si|xi) µ(si|xi) Pn i=1 π(si|xi) µ(si|xi) . (4) wIPS generally has better variance with an asymptotically zero bias. The variance of both estimators grows linearly with π(s|x) µ(s|x), which can be Ω(|S(x)|). This is prohibitive when |S(x)| = mΩ(ℓ). 3 Our approach The IPS estimator is minimax optimal [34], so its exponential variance is unavoidable in the worst case. We circumvent this hardness by positing an assumption on the structure of rewards. Specifically, we assume that the slate-level reward is a sum of unobserved action-level rewards that depend on the context, the action, and the position on the slate, but not on the other actions on the slate. Formally, we consider slate indicator vectors in Rℓm whose components are indexed by pairs (j, a) of slots and possible actions in them. A slate is described by an indicator vector 1s ∈Rℓm whose entry at position (j, a) is equal to 1 if the slate s has action a in slot j, i.e., if sj = a. The above assumption is formalized as follows: Assumption 1 (Linearity Assumption). For each context x ∈X there exists an (unknown) intrinsic reward vector φx ∈Rℓm such that the slate value satisfies V (x, s) = 1T s φx = Pℓ j=1 φx(j, sj). The slate indicator vector can be viewed as a feature vector, representing the slate, and φx can be viewed as a context-specific weight vector. The assumption refers to the fact that the value of a slate is a linear function of its feature representation. However, note that this linear dependence is allowed to be completely different across contexts, because we make no assumptions on how φx depends on x, and in fact our method does not even attempt to accurately estimate φx. Being agnostic to the form of φx is the key departure from the direct method and parametric bandits. While Assumption 1 rules out interactions among different actions on a slate,2 its ability to vary intrinsic rewards arbitrarily across contexts captures many common metrics in information retrieval, such as the normalized discounted cumulative gain (NDCG) [6], a common metric in web ranking: Example 3 (NDCG). For a slate s, we first define DCG(x, s) := Pℓ j=1 2rel(x,sj )−1 log2(j+1) where rel(x, a) is the relevance of document a on query x. Then NDCG(x, s) := DCG(x, s)/DCG⋆(x) where DCG⋆(x) = maxs∈S(x) DCG(x, s), so NDCG takes values in [0, 1]. Thus, NDCG satisfies Assumption 1 with φx(j, a) = 2rel(x,a) −1 log2(j + 1)DCG⋆(x). In addition to Assumption 1, we also make the standard assumption that the logging policy puts non-zero probability on all slates that can be potentially chosen by the target policy. This assumption is also required for IPS, otherwise unbiased off-policy evaluation is impossible [24]. Assumption 2 (Absolute Continuity). The off-policy evaluation problem satisfies the absolute continuity assumption if µ(s | x) > 0 whenever π(s | x) > 0 with probability one over x ∼D. 3.1 The pseudoinverse estimator Using Assumption 1, we can now apply the techniques from the combinatorial bandit literature to our problem. In particular, our estimator closely follows the recipe of Cesa-Bianchi and Lugosi [7], albeit with some differences to account for the off-policy and contextual nature of our setup. Under Assumption 1, we can view the recovery of φx for a given context x as a linear regression problem. The covariates 1s are drawn according to µ(· | x), and the reward follows a linear model, conditional on s and x, with φx as the “weight vector”. Thus, we can write the MSE of an estimate w as Es∼µ(·|x)Er∼D(·|s,x)[(1T s w −r)2], or more compactly as Eµ[(1T s w −r)2 | x], using our definition of µ as a distribution over triples (x, s, r). We estimate φx by the MSE minimizer with the smallest 2We discuss limitations of Assumption 1 and directions to overcome them in Sec. 5. 4 norm, which can be written in closed form as ¯φx = Eµ[1s1T s | x] † Eµ[r1s | x] , (5) where M† is the Moore-Penrose pseudoinverse of a matrix M. Note that this idealized “estimator” ¯φx uses conditional expectations over s ∼µ(· | x) and r ∼D(· | s, x). To simplify the notation, we write Γµ,x := Eµ[1s1T s | x] ∈Rℓm×ℓm to denote the (uncentered) covariance matrix for our regression problem, appearing on the right-hand side of Eq. (5). We also introduce notation for the second term in Eq. (5) and its empirical estimate: θµ,x := Eµ[r1s | x], and ˆθi := ri1si. Thus, our regression estimator (5) is simply ¯φx = Γ† µ,xθµ,x. Under Assumptions 1 and 2, it is easy to show that V (x, s) = 1T s ¯φx = 1T s Γ† µ,xθµ,x. Replacing θµ,x with ˆθi motivates the following estimator for V (π), which we call the pseudoinverse estimator or PI: ˆVPI(π) = 1 n n X i=1 X s∈S π(s | xi)1T s Γ† µ,xi ˆθi = 1 n n X i=1 ri · qT π,xiΓ† µ,xi1si . (6) In Eq. (6) we have expanded the definition of ˆθi and introduced the notation qπ,x for the expected slate indicator under π conditional on x, qπ,x := Eπ[1s | x]. The summation over s required to obtain qπ,xi in Eq. (6) can be replaced by a small sample. We can also derive a weighted variant of PI: ˆVwPI(π) = Pn i=1 ri · qT π,xiΓ† µ,xi1si Pn i=1 qTπ,xiΓ† µ,xi1si . (7) We prove the following unbiasedness property in Appendix A. Proposition 1. If Assumptions 1 and 2 hold, then the estimator ˆVPI is unbiased, i.e., Eµn[ ˆVPI] = V (π), where the expectation is over the n logged examples sampled i.i.d. from µ. As special cases, PI reduces to IPS when ℓ= 1, and simplifies to Pn i=1 ri/n when π = µ (see Appendix C). To build further intuition, we consider the settings of Examples 1 and 2, and simplify the PI estimator to highlight the improvement over IPS. Example 4 (PI for a Cartesian product when µ is a product distribution). The PI estimator for the Cartesian product slate space, when µ factorizes across slots as µ(s | x) = Q j µ(sj | x), simplifies to ˆVPI(π) = 1 n Pn i=1 ri · Pℓ j=1 π(sij|xi) µ(sij|xi) −ℓ+ 1 , by Prop. 2 in Appendix D. Note that unlike IPS, which divides by probabilities of whole slates, the PI estimator only divides by probabilities of actions appearing in individual slots. Thus, the magnitude of each term of the outer summation is only O(ℓm), whereas the IPS terms are mΩ(ℓ). Example 5 (PI for rankings with ℓ= m and uniform logging). In this case, ˆVPI(π) = 1 n Pn i=1 ri · Pℓ j=1 π(sij|xi) 1/(m−1) −m + 2 , by Prop. 4 in Appendix E.1. The summands are again O(ℓm) = O(m2). 3.2 Deviation analysis So far, we have shown that PI is unbiased under our assumptions and overcomes the deficiencies of IPS in specific examples. We now derive a finite-sample error bound, based on the overlap between π and µ. We use Bernstein’s inequality, for which we define the variance and range terms: σ2 := Ex∼D qT π,xΓ† µ,xqπ,x , ρ := sup x sup s:µ(s|x)>0 qT π,xΓ† µ,x1s . (8) The quantity σ2 bounds the variance whereas ρ bounds the range. They capture the “average” and “worst-case” mismatch between µ and π. They equal one when π = µ (see Appendix C), and yield the following deviation bound: 5 Theorem 1. Under Assumptions 1 and 2, let σ2 and ρ be defined as in Eq. (8). Then, for any δ ∈(0, 1), with probability at least 1 −δ, ˆVPI(π) −V (π) ≤ r 2σ2 ln(2/δ) n + 2(ρ + 1) ln(2/δ) 3n . We observe that this finite sample bound is structurally different from the regret bounds studied in the prior works on combinatorial bandits. The bound incorporates the extent of overlap between π and µ so that we have higher confidence in our estimates when the logging and evaluation policies are similar—an important consideration in off-policy evaluation. While the bound might look complicated, it simplifies if we consider the class of ε-uniform logging policies. Formally, for any policy µ, define µε(s | x) = (1 −ε)µ(s | x) + εν(s | x), with ν being the uniform distribution over the set S(x). For suitably small ε, such logging policies are widely used in practice. We have the following corollary for these policies, proved in Appendix E: Corollary 1. In the settings of Example 1 or Example 2, if the logging is done with µε for some ε > 0, we have | ˆVPI(π) −V (π)| ≤O p ε−1ℓm/n . Again, this turns the Ω(mℓ) data dependence of IPS into O(mℓ). The key step in the proof is the bound on a certain norm of Γ† ν, similar to the bounds of Cesa-Bianchi and Lugosi [7], but our results are a bit sharper. 4 Experiments We empirically evaluate the performance of the pseudoinverse estimator for ranking problems. We first show that PI outperforms prior works in a comprehensive semi-synthetic study using a public dataset. We then use our estimator for off-policy optimization, i.e., to learn ranking policies, competitively with supervised learning that uses more information. Finally, we demonstrate substantial improvements on proprietary data from search engine logs for two user-satisfaction metrics used in practice: timeto-success and utility rate, which do not satisfy the linearity assumption. More detailed results are deferred to Appendices F and G. All of our code is available online.3 4.1 Semi-synthetic evaluation Our semi-synthetic evaluation uses labeled data from the Microsoft Learning to Rank Challenge dataset [30] (MSLR-WEB30K) to create a contextual bandit instance. Queries form the contexts x and actions a are the available documents. The dataset contains over 31K queries, each with up to 1251 judged documents, where the query-document pairs are judged on a 5-point scale, rel(x, a) ∈{0, . . . , 4}. Each pair (x, a) has a feature vector f(x, a), which can be partitioned into title and body features (ftitle and fbody). We consider two slate rewards: NDCG from Example 3, and the expected reciprocal rank, ERR [9], which does not satisfy linearity, and is defined as ERR(x, s) := Pℓ r=1 1 r Qr−1 i=1 (1 −R(si))R(sr) , where R(a) = 2rel(x,a)−1 2maxrel with maxrel = 4. To derive several distinct logging and target policies, we first train two lasso regression models, called lassotitle and lassobody, and two regression tree models, called treetitle and treebody, to predict relevances from ftitle and fbody, respectively. To create the logs, queries x are sampled uniformly, and the set A(x) consists of the top m documents according to treetitle. The logging policy is parametrized by a model, either treetitle or lassotitle, and a scalar α ≥0. It samples from a multinomial distribution over documents pα(a|x) ∝2−α⌊log2 rank(x,a)⌋where rank(x, a) is the rank of document a for query x according to the corresponding model. Slates are constructed slot-by-slot, sampling without replacement according to pα. Varying α interpolates between uniformly random and deterministic logging. Thus, all logging policies are based on the models derived from ftitle. We consider two deterministic target policies based on the two models derived from fbody, i.e., treebody and lassobody, which select the top ℓdocuments according to the corresponding model. The four base models are fairly distinct: on average fewer than 2.75 documents overlap among top 10 (see Appendix H). 3https://github.com/adith387/slates_semisynth_expts 6 0.0 0.2 0.4 0.6 0.8 1.0 # of samples (n) 0.0 0.2 0.4 0.6 0.8 1.0 log10(RMSE) 103 104 105 106 -4 -3 -2 -1 0 NDCG, m=100, l=10 logging: uniform, target: tree OnPolicy wIPS DM: lasso DM: tree wPI 103 104 105 106 NDCG, m=100, l=10,α=1.0 logging: tree, target: tree 103 104 105 106 ERR, m=100, l=10 logging: uniform, target: lasso 103 104 105 106 ERR, m=10, l=5 logging: uniform, target: tree 0.0 0.2 0.4 0.6 0.8 1.0 Normalized RMSE @ 600k samples 0 2 4 6 8 10 # of conditions 10−3 10−2 10−1 100 0 2 4 6 8 10 NDCG, m=10, l=5 10−3 10−2 10−1 100 ERR, m=10, l=5 10−3 10−2 10−1 100 NDCG, m=100, l=10 10−3 10−2 10−1 100 ERR, m=100, l=10 0.0 0.2 0.4 0.6 0.8 1.0 Normalized RMSE @ 60k samples 0 2 4 6 8 10 # of conditions 10−3 10−2 10−1 100 0 2 4 6 8 10 NDCG, m=10, l=5 10−3 10−2 10−1 100 ERR, m=10, l=5 10−3 10−2 10−1 100 NDCG, m=100, l=10 10−3 10−2 10−1 100 ERR, m=100, l=10 Figure 2: Top: RMSE of various estimators under four experimental conditions (see Appendix F for all 40 conditions). Middle: CDF of normalized RMSE at 600k samples; each plot aggregates over 10 logging-target combinations; closer to top-left is better. Bottom: Same as middle but at 60k samples. We compare the weighted estimator wPI with the direct method (DM) and weighted IPS (wIPS). (Weighted variants outperformed the unweighted ones.) We implement two variants of DM: regression trees and lasso, each trained on the first n/2 examples and using the remaining n/2 examples for evaluation according to Eq. (3). We also include an aspirational baseline, ONPOLICY, which corresponds to deploying the target policy as in an A/B test and returning the average of observed rewards. This is the expensive alternative we wish to avoid. We evaluate the estimators by recording the root mean square error (RMSE) as a function of the number of samples, averaged over at least 25 independent runs. We do this for 40 different experimental conditions, considering two reward metrics, two slate-space sizes, and 10 combinations of target and logging policies (including the choice of α). The top row of Fig. 2 shows results for four representative conditions (see Appendix F for all results), while the middle and bottom rows aggregate across conditions. To produce the aggregates, we shift and rescale the RMSE of all methods, at 600k (middle row) or 60k (bottom row) samples, so the best performance is at 0.001 and the worst is at 1.0 (excluding ONPOLICY). (We use 0.001 instead of 0.0 to allow plotting on a log scale.) The aggregate plots display the cumulative distribution function of these normalized RMSE values across 10 target-logging combinations, keeping the metric and the slate-space size fixed. The pseudoinverse estimator wPI easily dominates wIPS across all experimental conditions, as can be seen in Fig. 2 (top) and in Appendix F. While wIPS and IPS are (asymptotically) unbiased even without linearity assumption, they both suffer from a large variance caused by the slate size. The variance and hence the mean square error of wIPS and IPS grows exponentially with the slate size, so they perform poorly beyond the smallest slate sizes. DM performs well in some cases, especially with few samples, but often plateaus or degrades eventually as it overfits on the logging distribution, which is different from the target. While wPI does not always outperform DM methods (e.g., Fig. 2, top row, second from right), it is the only method that works robustly across all conditions, as can be seen in the aggregate plots. In general, choosing between DM and wPI is largely a matter of bias-variance tradeoff. DM can be particularly good with very small data sizes, because of its low variance, and in those settings it is often the best choice. However, PI performs comprehensively better given enough data (see Fig. 2, middle row). 7 In the top row of Fig. 2, we see that, as expected, wPI is biased for the ERR metric since ERR does not satisfy linearity. The right two panels also demonstrate the effect of varying m and ℓ. While wPI deteriorates somewhat for the larger slate space, it still gives a meaningful estimate. In contrast, wIPS fails to produce any meaningful estimate in the larger slate space and its RMSE barely improves with more data. Finally, the left two plots in the top row show that wPI is fairly insensitive to the amount of stochasticity in logging, whereas DM improves with more overlap between logging and target. 4.2 Semi-synthetic policy optimization We now show how to use the pseudoinverse estimator for off-policy optimization. We leverage pointwise learning to rank (L2R) algorithms, which learn a scoring function for query-document pairs by fitting to relevance labels. We call this the supervised approach, as it requires relevance labels. Instead of requiring relevance labels, we use the pseudoinverse estimator to convert page-level reward into per-slot reward components—the estimates of φx(j, a)—and these become targets for regression. Thus, the pseudoinverse estimator enables pointwise L2R to optimize whole-page metrics even without relevance labels. Given a contextual bandit dataset {(xi, si, ri)}i≤n collected by the logging policy µ, we begin by creating the estimates of φxi: ˆφi = Γ† µ,xi ˆθi, turning the i-th contextual bandit example into ℓm regression examples. The trained regression model is used to create a slate, starting with the highest scoring slot-action pair, and continuing greedily (excluding the pairs with the already chosen slots or actions). This procedure is detailed in Appendix G. Note that without the linearity assumptions, our imputed regression targets might not lead to the best possible learned policy, but we still expect to adapt somewhat to the slate-level metric. We use the MSLR-WEB10K dataset [30] to compare our approach with benchmarked results [33] for NDCG@3 (i.e., ℓ= 3).4 This dataset contains 10k queries, over 1.2M relevance judgments, and up to 908 judged documents per query. The state-of-the-art listwise L2R method on this dataset is a highly tuned variant of LambdaMART [1] (with an ensemble of 1000 trees, each with up to 70 leaves). We use the provided 5-fold split and always train on bandit data collected by uniform logging from four folds, while evaluating with supervised data on the fifth. We compare our approach, titled PI-OPT, against the supervised approach (SUP), trained to predict the gains, equal to 2rel(x,a) −1, computed using annotated relevance judgements in the training folds (predicting raw relevances was inferior). Both PI-OPT and SUP train gradient boosted regression trees (with 1000 trees, each with up to 70 leaves). Additionally, we also experimented with the ERR metric. The average test-set performance (computed using ground-truth relevance judgments for each test set) across the 5-folds is reported in Table 1. Our method, PI-OPT is competitive with the supervised baseline SUP for NDCG, and is substantially superior for ERR. A different transformation instead of gains might yield a stronger supervised baseline for ERR, but this only illustrates the key benefit of PI-OPT: the right pointwise targets are automatically inferred for any whole-page metric. Both PI-OPT and SUP are slightly worse than LambdaMART for NDCG@3, but they are arguably not as highly tuned, and PI-OPT only uses the slate-level metric. Table 1: Comparison of L2R approaches optimizing NDCG@3 and ERR@3. LambdaMART is a tuned list-wise approach. SUP and PI-OPT use the same pointwise L2R learner; SUP uses 8 × 105 relevance judgments, PI-OPT uses 107 samples (under uniform logging) with page-level rewards. Metric LambdaMART uniformly random SUP PI-OPT NDCG@3 0.457 0.152 0.438 0.421 ERR@3 — 0.096 0.311 0.321 4.3 Real-world experiments We finally evaluate all methods using logs collected from a popular search engine. The dataset consists of search queries, for which the logging policy randomly (non-uniformly) chooses a slate of 4Our dataset here differs from the dataset MSLR-WEB30K used in Sec. 4.1. There our goal was to study realistic problem dimensions, e.g., constructing length-10 rankings out of 100 candidates. Here, we use MSLRWEB10K, because it is the largest dataset with public benchmark numbers by state-of-the-art approaches (specifically LambdaMART). 8 size ℓ= 5 from a small pre-filtered set of documents of size m ≤8. After preprocessing, there are 77 unique queries and 22K total examples, meaning that for each query, we have logged impressions for many of the available slates. As before, we create the logs by sampling queries uniformly at random, and using a logging policy that samples uniformly from the slates shown for this query. We consider two page-level metrics: time-to-success (TTS) and UTILITYRATE. TTS measures the number of seconds between presenting the results and the first satisfied click from the user, defined as any click for which the user stays on the linked page for sufficiently long. TTS value is capped and scaled to [0, 1]. UTILITYRATE is a more complex page-level metric of user satisfaction. It captures the interaction of a user with the page as a timeline of events (such as clicks) and their durations. The events are classified as revealing a positive or negative utility to the user and their contribution is proportional to their duration. UTILITYRATE takes values in [−1, 1]. We evaluate a target policy based on a logistic regression classifier trained to predict clicks and using the predicted probabilities to score slates. We restrict the target policy to pick among the slates in our logs, so we know the ground truth slate-level reward. Since we know the query distribution, we can calculate the target policy’s value exactly, and measure RMSE relative to this true value. We compare our estimator (PI) with three baselines similar to those from Sec. 4.1: DM, IPS and ONPOLICY. DM uses regression trees over roughly 20,000 slate-level features. Fig. 1 from the introduction shows that PI provides a consistent multiplicative improvement in RMSE over IPS, which suffers due to high variance. Starting at moderate sample sizes, PI also outperforms DM, which suffers due to substantial bias. 5 Discussion In this paper we have introduced a new estimator (PI) for off-policy evaluation in combinatorial contextual bandits under a linearity assumption on the slate-level rewards. Our theoretical and empirical analysis demonstrates the merits of the approach. The empirical results show a favorable bias-variance tradeoff. Even in datasets and metrics where our assumptions are violated, the PI estimator typically outperforms all baselines. Its performance, especially at smaller sample sizes, could be further improved by designing doubly-robust variants [12] and possibly also incorporating weight clipping [34]. One promising approach to relax Assumption 1 is to posit a decomposition over pairs (or tuples) of slots to capture higher-order interactions such as diversity. More generally, one could replace slate spaces by arbitrary compact convex sets, as done in linear bandits. In these settings, the pseudoinverse estimator could still be applied, but tight sample-complexity analysis is open for future research. References [1] Nima Asadi and Jimmy Lin. Training efficient tree-based models for document ranking. In European Conference on Advances in Information Retrieval, 2013. [2] Peter Auer. Using confidence bounds for exploitation-exploration trade-offs. Journal of Machine Learning Research, 2002. [3] Peter Auer, Nicolò Cesa-Bianchi, Yoav Freund, and Robert E Schapire. The nonstochastic multiarmed bandit problem. SIAM Journal on Computing, 2002. [4] Léon Bottou, Jonas Peters, Joaquin Quiñonero-Candela, Denis Charles, Max Chickering, Elon Portugaly, Dipankar Ray, Patrice Simard, and Ed Snelson. Counterfactual reasoning and learning systems: The example of computational advertising. Journal of Machine Learning Research, 2013. [5] Sébastien Bubeck and Nicolò Cesa-Bianchi. Regret analysis of stochastic and nonstochastic multi-armed bandit problems. Foundations and Trends R⃝in Machine Learning, 2012. [6] Chris Burges, Tal Shaked, Erin Renshaw, Ari Lazier, Matt Deeds, Nicole Hamilton, and Greg Hullender. Learning to rank using gradient descent. In International Conference on Machine Learning, 2005. [7] Nicolo Cesa-Bianchi and Gábor Lugosi. Combinatorial bandits. Journal of Computer and System Sciences, 2012. 9 [8] Olivier Chapelle and Ya Zhang. A dynamic Bayesian network click model for web search ranking. In International Conference on World Wide Web, 2009. [9] Olivier Chapelle, Donald Metlzer, Ya Zhang, and Pierre Grinspan. Expected reciprocal rank for graded relevance. In Conference on Information and Knowledge Management, 2009. [10] Wei Chu, Lihong Li, Lev Reyzin, and Robert E Schapire. Contextual bandits with linear payoff functions. In Artificial Intelligence and Statistics, 2011. [11] Varsha Dani, Thomas P. Hayes, and Sham M. Kakade. The price of bandit information for online optimization. In Advances in Neural Information Processing Systems, 2008. [12] Miroslav Dudík, John Langford, and Lihong Li. Doubly robust policy evaluation and learning. In International Conference on Machine Learning, 2011. [13] Miroslav Dudík, Dumitru Erhan, John Langford, and Lihong Li. Doubly robust policy evaluation and optimization. Statistical Science, 2014. [14] Georges E. Dupret and Benjamin Piwowarski. A user browsing model to predict search engine click data from past observations. In SIGIR Conference on Research and Development in Information Retrieval, 2008. [15] Sarah Filippi, Olivier Cappe, Aurélien Garivier, and Csaba Szepesvári. Parametric bandits: The generalized linear case. In Advances in Neural Information Processing Systems, 2010. [16] Fan Guo, Chao Liu, Anitha Kannan, Tom Minka, Michael Taylor, Yi-Min Wang, and Christos Faloutsos. Click chain model in web search. In International Conference on World Wide Web, 2009. [17] Katja Hofmann, Lihong Li, Filip Radlinski, et al. Online evaluation for information retrieval. Foundations and Trends in Information Retrieval, 2016. [18] Daniel G Horvitz and Donovan J Thompson. A generalization of sampling without replacement from a finite universe. Journal of the American Statistical Association, 1952. [19] Satyen Kale, Lev Reyzin, and Robert E Schapire. Non-stochastic bandit slate problems. In Advances in Neural Information Processing Systems, 2010. [20] Ron Kohavi, Roger Longbotham, Dan Sommerfield, and Randal M Henne. Controlled experiments on the web: survey and practical guide. Knowledge Discovery and Data Mining, 2009. [21] Akshay Krishnamurthy, Alekh Agarwal, and Miroslav Dudík. Efficient contextual semi-bandit learning. Advances in Neural Information Processing Systems, 2016. [22] Branislav Kveton, Zheng Wen, Azin Ashkan, and Csaba Szepesvári. Tight regret bounds for stochastic combinatorial semi-bandits. In Artificial Intelligence and Statistics, 2015. [23] John Langford and Tong Zhang. The epoch-greedy algorithm for multi-armed bandits with side information. In Advances in Neural Information Processing Systems, 2008. [24] John Langford, Alexander Strehl, and Jennifer Wortman. Exploration scavenging. In International Conference on Machine Learning, 2008. [25] Lihong Li, Wei Chu, John Langford, and Robert E Schapire. A contextual-bandit approach to personalized news article recommendation. In International Conference on World Wide Web, 2010. [26] Lihong Li, Wei Chu, John Langford, and Xuanhui Wang. Unbiased offline evaluation of contextual-banditbased news article recommendation algorithms. In International Conference on Web Search and Data Mining, 2011. [27] Lihong Li, Imed Zitouni, and Jin Young Kim. Toward predicting the outcome of an a/b experiment for search relevance. In International Conference on Web Search and Data Mining, 2015. [28] Kaare Brandt Petersen, Michael Syskind Pedersen, et al. The matrix cookbook. Technical University of Denmark, 2008. [29] Lijing Qin, Shouyuan Chen, and Xiaoyan Zhu. Contextual combinatorial bandit and its application on diversified online recommendation. In International Conference on Data Mining, 2014. [30] Tao Qin and Tie-Yan Liu. Introducing LETOR 4.0 datasets. arXiv:1306.2597, 2013. 10 [31] Paat Rusmevichientong and John N Tsitsiklis. Linearly parameterized bandits. Mathematics of Operations Research, 2010. [32] Adith Swaminathan and Thorsten Joachims. Counterfactual risk minimization: Learning from logged bandit feedback. In International Conference on Machine Learning, 2015. [33] Niek Tax, Sander Bockting, and Djoerd Hiemstra. A cross-benchmark comparison of 87 learning to rank methods. Information Processing and Management, 2015. [34] Yu-Xiang Wang, Alekh Agarwal, and Miroslav Dudik. Optimal and adaptive off-policy evaluation in contextual bandits. In International Conference on Machine Learning, 2017. [35] Yue Wang, Dawei Yin, Luo Jie, Pengyuan Wang, Makoto Yamada, Yi Chang, and Qiaozhu Mei. Beyond ranking: Optimizing whole-page presentation. In International Conference on Web Search and Data Mining, pages 103–112, 2016. 11 | 2017 | 225 |
6,703 | Unbiased estimates for linear regression via volume sampling Michał Derezi´nski Department of Computer Science University of California Santa Cruz mderezin@ucsc.edu Manfred K. Warmuth Department of Computer Science University of California Santa Cruz manfred@ucsc.edu Abstract Given a full rank matrix X with more columns than rows, consider the task of estimating the pseudo inverse X+ based on the pseudo inverse of a sampled subset of columns (of size at least the number of rows). We show that this is possible if the subset of columns is chosen proportional to the squared volume spanned by the rows of the chosen submatrix (ie, volume sampling). The resulting estimator is unbiased and surprisingly the covariance of the estimator also has a closed form: It equals a specific factor times X+⊤X+. Pseudo inverse plays an important part in solving the linear least squares problem, where we try to predict a label for each column of X. We assume labels are expensive and we are only given the labels for the small subset of columns we sample from X. Using our methods we show that the weight vector of the solution for the sub problem is an unbiased estimator of the optimal solution for the whole problem based on all column labels. We believe that these new formulas establish a fundamental connection between linear least squares and volume sampling. We use our methods to obtain an algorithm for volume sampling that is faster than state-of-the-art and for obtaining bounds for the total loss of the estimated least-squares solution on all labeled columns. 1 Introduction X xi IS S XIS XS X+⊤ (XIS)+⊤ (XS)+⊤ Figure 1: Set S may not be consecutive. Let X be a wide full rank matrix with d rows and n columns where n ≥d. Our goal is to estimate the pseudo inverse X+ of X based on the pseudo inverse of a subset of columns. More precisely, we sample a subset S ⊆{1..n} of s column indices (where s ≥d). We let XS be the sub-matrix of the s columns indexed by S (See Figure 1). Consider a version of X in which all but the columns of S are zero. This matrix equals XIS where IS is an n-dimensional diagonal matrix with (IS)ii = 1 if i ∈S and 0 otherwise. We assume that the set of s column indices of X is selected proportional to the squared volume spanned by the rows of submatrix XS, i.e. proportional to det(XSX⊤ S ) and prove a number of new surprising expectation formulas for this type of volume sampling, such as E[(XIS)+] = X+ and E[ (XSX⊤ S )−1 | {z } (XIS)+⊤(XIS)+ ] = n −d + 1 s −d + 1 X+⊤X+. Note that (XIS)+ has the n × d shape of X+ where the s rows indexed by S contain (XS)+ and the remaining n −s rows are zero. The expectation of this matrix is X+ even though (XS)+ is 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. clearly not a sub-matrix of X+. In addition to the expectation formulas, our new techniques lead to an efficient volume sampling procedure which beats the state-of-the-art by a factor of n2 in time complexity. Volume sampling is useful in numerous applications, from clustering to matrix approximation, but we focus on the task of solving linear least squares problems: For an n−dimensional label vector y, let w∗= argminw ||X⊤w −y||2 = X+y. Assume the entire design matrix X is known to the learner but labels are expensive and you want to observe as few of them as possible. Let w∗(S) = (XS)+yS be the solution to the sub-problem based on labels yS. What is the smallest number of labels s necessary, for which there is a sampling procedure on sets S of size s st the expected loss of w∗(S) is at most a constant factor larger than the loss of w∗that uses all n labels (where the constant is independent of n)? More precisely, using the short hand L(w) = ||X⊤w −y||2 for the loss on all n labels, what is the smallest size s such that E[L(w∗(S))] ≤const L(w∗). This question is a version of the “minimal coresets” open problem posed in [3]. The size has to be at least d and one can show that randomization is necessary in that any deterministic algorithm for choosing a set of d columns can suffer loss larger by a factor of n. Also any iid sampling of S (such as the commonly used leverage scores [8]) requires at least Ω(d log d) examples to achieve a finite factor. In this paper however we show that with a size d volume sample, E[L(w∗(S))] = (d + 1)L(w∗) if X is in general position. Note again that we have equality and not just an upper bound. Also we can show that the multiplicative factor d + 1 is optimal. We further improve this factor to 1 + ϵ via repeated volume sampling. Moreover, our expectation formulas imply that when S is size s ≥d volume sampled, then w∗(S) is an unbiased estimator for w∗, ie E[w∗(S)] = w∗. 2 Related work Volume sampling is an extension of a determinantal point process [15], which has been given a lot of attention in the literature with many applications to machine learning, including recommendation systems [10] and clustering [13]. Many exact and approximate methods for efficiently generating samples from this distribution have been proposed [6, 14], making it a useful tool in the design of randomized algorithms. Most of those methods focus on sampling s ≤d elements. In this paper, we study volume sampling sets of size s ≥d, which has been proposed in [1] and motivated with applications in graph theory, linear regression, matrix approximation and more. The only known polynomial time algorithm for size s > d volume sampling was recently proposed in [16] with time complexity O(n4s). We offer a new algorithm with runtime O((n −s + d)nd), which is faster by a factor of at least n2. The problem of selecting a subset of input vectors for solving a linear regression task has been extensively studied in statistics literature under the terms optimal design [9] and pool-based active learning [19]. Various criteria for subset selection have been proposed, like A-optimality and Doptimality. For example, A-optimality seeks to minimize tr((XSX⊤ S )−1), which is combinatorially hard to optimize exactly. We show that for size s volume sampling (for s ≥d), E[(XSX⊤ S )−1] = n−d+1 s−d+1 X+⊤X+ which provides an approximate randomized solution for this task. A related task has been explored in the field of computational geometry, where efficient algorithms are sought for approximately solving linear regression and matrix approximation [17, 5, 3]. Here, multiplicative bounds on the loss of the approximate solution can be achieved via two approaches: Subsampling the vectors of the design matrix, and sketching the design matrix X and the label vector y by multiplying both by the same suitably chosen random matrix. Algorithms which use sketching to generate a smaller design matrix for a given linear regression problem are computationally efficient [18, 5], but unlike vector subsampling, they require all of the labels from the original problem to generate the sketch, so they do not apply directly to our setting of using as few labels as possible. The main competitor to volume sampling for linear regression is iid sampling using the statistical leverage scores [8]. However we show in this paper that any iid sampling method requires sample size Ω(d log d) to achieve multiplicative loss bounds. On the other hand, the input vectors obtained from volume sampling are selected jointly and this makes the chosen subset more informative. We show that just d volume sampled columns are sufficient to achieve a multiplicative bound. Volume sampling size s ≤d has also been used in this line of work by [7, 11] for matrix approximation. 2 3 Unbiased estimators Let n be an integer dimension. For each subset S ⊆{1..n} of size s we are given a matrix formula F(S). Our goal is to sample set S of size s using some sampling process and then develop concise expressions for ES:|S|=s[F(S)]. Examples of formula classes F(S) will be given below. We represent the sampling by a directed acyclic graph (dag), with a single root node corresponding to the full set {1..n}, Starting from the root, we proceed along the edges of the graph, iteratively removing elements from the set S. Concretely, consider a dag with levels s = n, n −1, ..., d. Level s contains n s nodes for sets S ⊆{1..n} of size s. Every node S at level s > d has s directed edges to the nodes S −{i} at the next lower level. These edges are labeled with a conditional probability vector P(S−i|S). The probability of a (directed) path is the product of the probabilities along its edges. The outflow of probability from each node on all but the bottom level is 1. We let the probability P(S) of node S be the probability of all paths from the top node {1..n} to S and set the probability P({1..n}) of the top node to 1. We associate a formula F(S) with each set node S in the dag. The following key equality lets us compute expectations. Lemma 1 If for all S ⊆{1..n} of size greater than d we have F(S) = X i∈S P(S−i|S)F(S−i), then for any s ∈{d..n}: ES:|S|=s[F(S)] = P S:|S|=s P(S)F(S) = F({1..n}). Proof Suffices to show that expectations at successive layers are equal: X S:|S|=s P(S) F(S) = X S:|S|=s P(S) X i∈S P(S−i|S) F(S−i) = X T :|T |=s−1 X j /∈T P(T+j)P(T|T+j) | {z } P (T ) F(T). 3.1 Volume sampling Given a wide full-rank matrix X ∈Rd×n and a sample size s ∈{d..n}, volume sampling chooses subset S ⊆{1..n} of size s with probability proportional to volume spanned by the rows of submatrix XS, ie proportional to det(XSX⊤ S ). The following corollary uses the above dag setup to compute the normalization constant for this distribution. When s = d, the corollary provides a novel minimalist proof for the Cauchy-Binet formula: P S:|S|=s det(XSX⊤ S ) = det(XX⊤). Corollary 2 Let X ∈Rd×n and S ⊆{1..n} of size n ≥s ≥d st det(XSX⊤ S ) > 0. Then for any set S of size larger than d and i ∈S, define the probability of the edge from S to S−i as: P(S−i|S):= det(XS−iX⊤ S−i) (s−d) det(XSX⊤ S ) = 1−x⊤ i (XSX⊤ S )−1xi s−d , (reverse iterative volume sampling) where xi is the ith column of X and XS is the sub matrix of columns indexed by S. Then P(S−i|S) is a proper probability distribution and thus P S:|S|=s P(S) = 1 for all s ∈{d..n}. Furthermore P(S) = det(XSX⊤ S ) n−d s−d det(XX⊤) . (volume sampling) Proof First, for any node S st s > d and det(XSX⊤ S ) > 0, the probabilities out of S sum to 1: X i∈S P(S−i|S) = X i∈S 1 −tr((XSX⊤ S )−1xix⊤ i ) s −d = s −tr((XSX⊤ S )−1XSX⊤ S ) s −d = s −d s −d = 1. It remains to show the formula for the probability P(S) of all paths ending at node S. Consider any path from the root {1..n} to S. There are (n −s)! such paths. The fractions of determinants in 3 probabilities along each path telescope1 and the additional factors accumulate to the same product. So the probability of all paths from the root to S is the same and the total probability into S is (n −s)! (n −d)(n −d −1) . . . (n −s + 1) det(XSX⊤ S ) det(XX⊤) = 1 n−d s−d det(XSX⊤ S ) det(XX⊤) . 3.2 Expectation formulas for volume sampling All expectations in the remainder of the paper are wrt volume sampling. We use the short hand E[F(S)] for expectation with volume sampling where the size of the sampled set is fixed to s. The expectation formulas for two choices of F(S) are proven in the next two theorems. By Lemma 1 it suffices to show F(S) = P i∈S P(S−i|S)F(S−i) for volume sampling. We introduce a bit more notation first. Recall that XS is the sub matrix of columns indexed by S ⊆{1..n} (See Figure 1). Consider a version of X in which all but the columns of S are zero. This matrix equals XIS where IS is an n-dimensional diagonal matrix with (IS)ii = 1 if i ∈S and 0 otherwise. Theorem 3 Let X ∈Rd×n be a wide full rank matrix (ie n ≥d). For s ∈{d..n}, let S ⊆1..n be a size s volume sampled set over X. Then E[(XIS)+] = X+. We believe that this fundamental formula lies at the core of why volume sampling is important in many applications. In this work, we focus on its application to linear regression. However, [1] discuss many problems where controlling the pseudo-inverse of a submatrix is essential. For those applications, it is important to establish variance bounds for the estimator offered by Theorem 3. In this case, volume sampling once again offers very concrete guarantees. We obtain them by showing the following formula, which can be viewed as a second moment for this estimator. Theorem 4 Let X ∈Rd×n be a full-rank matrix and s ∈{d..n}. If size s volume sampling over X has full support, then E[ (XSX⊤ S )−1 | {z } (XIS)+⊤(XIS)+ ] = n −d + 1 s −d + 1 (XX⊤)−1 | {z } X+⊤X+ . If volume sampling does not have full support then the matrix equality “=” is replaced by the positive-definite inequality “⪯”. The condition that size s volume sampling over X has full support is equivalent to det(XSX⊤ S ) > 0 for all S ⊆1..n of size s. Note that if size s volume sampling has full support, then size t > s also has full support. So full support for the smallest size d (often phrased as X being in general position) implies that volume sampling wrt any size s ≥d has full support. Surprisingly by combining theorems 3 and 4, we can obtain a “covariance type formula” for the pseudo-inverse matrix estimator: E[((XIS)+ −E[(XIS)+])⊤((XIS)+ −E[(XIS)+])] = E[(XIS)+⊤(XIS)+] −E[(XIS)+]⊤E[(XIS)+] = n −d + 1 s −d + 1 X+⊤X+ −X+⊤X+ = n −s s −d + 1 X+⊤X+. (1) Theorem 4 can also be used to obtain an expectation formula for the Frobenius norm ∥(XIS)+∥F of the estimator: E∥(XIS)+∥2 F = E[tr((XIS)+⊤(XIS)+)] = n −d + 1 s −d + 1 ∥X+∥2 F . (2) This norm formula has been shown in [1], with numerous applications. Theorem 4 can be viewed as a much stronger pre trace version of the norm formula. Also our proof techniques are quite different 1Note that 0 0 determinant ratios are avoided along the path because paths with such ratios always lead to sets of probability 0 and in the corollary we only consider paths to nodes S for which det(XSXS) > 0. 4 and much simpler. Note that if size s volume sampling for X does not have full support then (1) becomes a semi-definite inequality ⪯between matrices and (2) an inequality between numbers. Proof of Theorem 3 We apply Lemma 1 with F(S) = (XIS)+. It suffices to show F(S) = P i∈S P(S−i|S)F(S−i) for P(S−i|S) := 1−x⊤ i (XSX⊤ S )−1xi s−d , ie: (XIS)+ = X i∈S 1 −x⊤ i (XSX⊤ S )−1xi s −d (XIS−i)+ | {z } (XIS−i)⊤(XS−iX⊤ S−i)−1 . Proven by applying Sherman Morrison to (XS−iX⊤ S−i)−1 = (XSX⊤ S −xix⊤ i )−1 on the rhs: X i 1 −x⊤ i (XSX⊤ S )−1xi s −d ((XIS)⊤−eix⊤ i ) (XSX⊤ S )−1 + (XSX⊤ S )−1xix⊤ i (XSX⊤ S )−1 1 −x⊤ i (XSX⊤ S )−1xi . We now expand the last two factors into 4 terms. The expectation of the first (XIS)⊤(XSX⊤ S )−1 is (XIS)+ (which is the lhs) and the expectations of the remaining three terms times s −d sum to 0: − X i∈S (1 −x⊤ i (XSX⊤ S )−1xi) eix⊤ i (XSX⊤ S )−1 + (XIS)⊤ (XSX⊤ S )−1 X i∈S xix⊤ i (XSX⊤ S )−1 − X i∈S ei(x⊤ i (XSX⊤ S )−1xi) x⊤ i (XSX⊤ S )−1 = 0. Proof of Theorem 4 Choose F(S) = s−d+1 n−d+1(XSX⊤ S )−1. By Lemma 1 it suffices to show F(S) = P i∈S P(S−i|S)F(S−i) for volume sampling: s −d + 1 ((((( n −d + 1(XSX⊤ S )−1 = X i∈S 1 −x⊤ i (XSX⊤ S )−1xi s −d s −d ((((( n −d + 1(XS−iX⊤ S−i)−1 To show this we apply Sherman Morrison to (XS−iX⊤ S−i)−1 on the rhs: X i∈S (1 −x⊤ i (XSX⊤ S )−1xi) (XSX⊤ S )−1 + (XSX⊤ S )−1xix⊤ i (XSX⊤ S )−1 1 −x⊤ i (XSX⊤ S )−1xi = (s −d)(XSX⊤ S )−1 + (XSX⊤ S )−1 X i∈S xix⊤ i (XSX⊤ S )−1 = (s −d + 1) (XSX⊤ S )−1. If some denominators 1−x⊤ i (XSX⊤ S )−1xi are zero, then only sum over i for which the denominators are positive. In this case the above matrix equality becomes a positive-definite inequality ⪯. 4 Linear regression with few labels L(·) L(w∗) E[L(w∗(S))] L(w∗(Si)) L(w∗(Sj)) w∗(Si) w∗(Sj) w∗= E(w∗(S)) d L(w∗) Figure 2: Unbiased estimator w∗(S) in expectation suffers loss (d + 1) L(w∗). Our main motivation for studying volume sampling came from asking the following simple question. Suppose we want to solve a d-dimensional linear regression problem with a matrix X ∈Rd×n of input column vectors and a label vector y ∈Rn, ie find w ∈Rd that minimizes the least squares loss L(w) = ∥X⊤w −y∥2: w∗def= argmin w∈Rd L(w) = X+⊤y, but the access to label vector y is restricted. We are allowed to pick a subset S ⊆{1..n} for which the labels yi (where i ∈S) are revealed to us, and then solve the subproblem (XS, yS), obtaining w∗(S). What is the smallest number of labels such that for any X, we can find w∗(S) for which L(w∗(S)) is only a multiplicative factor away from L(w∗) (independent of the number of input vectors n)? This question was posed as an open problem by [3]. It is easy to show that we need at least d labels (when X is full-rank), so as to guarantee the uniqueness of solution w∗(S). We use volume sampling to show that d labels are in fact sufficient (proof in Section 4.1). 5 Theorem 5 If the input matrix X ∈Rd×n is in general position, then for any label vector y ∈Rn, the expected square loss (on all n labeled vectors) of the optimal solution w∗(S) for the subproblem (XS, yS), with the d-element set S obtained from volume sampling, is given by E[L(w∗(S))] = (d + 1) L(w∗). If X is not in general position, then the expected loss is upper-bounded by (d + 1) L(w∗). The factor d + 1 cannot be improved when selecting only d labels (we omit the proof): Proposition 6 For any d, there exists a least squares problem (X, y) with d + 1 vectors in Rd such that for every d-element index set S ⊆{1, ..., d + 1}, we have L(w∗(S)) = (d + 1) L(w∗). Note that the multiplicative factor in Theorem 5 does not depend on n. It is easy to see that this cannot be achieved by any deterministic algorithm (without the access to labels). Namely, suppose that d = 1 and X is a vector of all ones, whereas the label vector y is a vector of all ones except for a single zero. No matter which column index we choose deterministically, if that index corresponds to the label 0, the solution to the subproblem will incur loss L(w∗(S)) = n L(w∗). The fact that volume sampling is a joint distribution also plays an essential role in proving Theorem 5. Consider a matrix X with exactly d unique linearly independent columns (and an arbitrary number of duplicates). Any iid column sampling distribution (like for example leverage score sampling) will require Ω(d log d) samples to retrieve all d unique columns (ie coupon collector problem), which is necessary to get any multiplicative loss bound. The exact expectation formula for the least squares loss under volume sampling suggests a deep connection between linear regression and this distribution. We can use Theorem 3 to further strengthen that connection. Note, that the least squares estimator obtained through volume sampling can be written as w∗(S) = (XIS)+⊤y. Applying formula for the expectation of pseudo-inverse, we conclude that w∗(S) is an unbiased estimator of w∗. Proposition 7 Let X ∈Rd×n be a full-rank matrix and n ≥s ≥d. Let S ⊆1..n be a size s volume sampled set over X. Then, for arbitrary label vector y ∈Rn, we have E[w∗(S)] = E[(XIS)+⊤y] = X+⊤y = w∗. For size s = d volume sampling, the fact that E[w∗(S)] equals w∗can be found in an early paper [2]. They give a direct proof based on Cramer’s rule. For us the above proposition is a direct consequence of the matrix expectation formula given in Theorem 3 that holds for volume sampling of any size s ≥d. In contrast, the loss expectation formula of Theorem 5 is limited to sampling of size s = d. Bounding the loss expectation for s > d remains an open problem. However, we consider a different strategy for extending volume sampling in linear regression. Combining Proposition 7 with Theorem 5 we can compute the variance of predictions generated by volume sampling, and obtain tighter multiplicative loss bounds by sampling multiple d-element subsets S1, ..., St independently. Theorem 8 Let (X, y) be as in Theorem 5. For k independent size d volume samples S1, ..., Sk, E L 1 k k X j=1 w∗(Sj) = 1 + d k L(w∗). Proof Denote by def= X⊤w∗and by(S) def= X⊤w∗(S) as the predictions generated by w∗and w∗(S) respectively. We perform bias-variance decomposition of the loss of w∗(S) (for size d volume sampling): E[L(w∗(S))] = E[∥by(S) −y∥2] = E[∥by(S) −by + by −y∥2] = E[∥by(S) −by∥2] + E[2(by(S) −by)⊤(by −y)] + ∥by −y∥2 (∗) = n X i=1 E (by(S)i −E[by(S)i])2 + L(w∗) = n X i=1 Var[by(S)i] + L(w∗), 6 where (∗) follows from Theorem 3. Now, we use Theorem 5 to obtain the total variance of predictions: n X i=1 Var[by(S)i] = E[L(w∗(S))] −L(w∗) = d L(w∗). Now the expected loss of the average weight vector wrt sampling k independent sets S1, ..., Sk is: E L 1 k k X j=1 w∗(Sj) = n X i=1 Var 1 k k X j=1 by(Sj)i + L(w∗) = 1 k2 k X j=1 d L(w∗) + L(w∗) = 1 + d k L(w∗). It is worth noting that the average weight vector used in Theorem 8 is not expected to perform better than taking the solution to the joint subproblem, w∗(S1:k), where S1:k = S1 ∪... ∪Sk. However, theoretical guarantees for that case are not yet available. 4.1 Proof of Theorem 5 We use the following lemma regarding the leave-one-out loss for linear regression [4]: Lemma 9 Let w∗(−i) denote the least squares solution for problem (X−i, y−i). Then, we have L(w∗) = L(w∗(−i)) −x⊤ i (XX⊤)−1xi ℓi(w∗(−i)), where ℓi(w) def= (x⊤ i w −yi)2. When X has d + 1 columns and X−i is a full-rank d × d matrix, then L(w∗(−i)) = ℓi(w∗(−i)) and Lemma 9 leads to the following: det( eX eX⊤) (1) = det(XX⊤) L(w∗) z }| { ∥by −y∥2 where eX = X y⊤ (2) = det(XX⊤)(1 −x⊤ i (XX⊤)−1xi)ℓi(w∗(−i)) (3) = det(X−iX⊤ −i)ℓi(w∗(−i)), (3) where (1) is the “base × height” formula for volume, (2) follows from Lemma 9 and (3) follows from a standard determinant formula. Returning to the proof, our goal is to find the expected loss E[L(w∗(S))], where S is a size d volume sampled set. First, we rewrite the expectation as follows: E[L(w∗(S))] = X S,|S|=d P(S)L(w∗(S)) = X S,|S|=d P(S) n X j=1 ℓj(w∗(S)) = X S,|S|=d X j /∈S P(S) ℓj(w∗(S)) = X T,|T |=d+1 X j∈T P(T−j) ℓj(w∗(T−j)). (4) We now use (3) on the matrix XT and test instance xj (assuming rank(XT−j) = d): P(T−j) ℓj(w∗(T−j)) = det(XT−jX⊤ T−j) det(XX⊤) ℓj(w∗(T−j)) = det( eXT eX⊤ T ) det(XX⊤) . (5) Since the summand does not depend on the index j ∈T, the inner summation in (4) becomes a multiplication by d + 1. This lets us write the expected loss as: E[L(w∗(S))] = d + 1 det(XX⊤) X T,|T |=d+1 det( eXT eX⊤ T ) (1) = (d + 1)det( eX eX⊤) det(XX⊤) (2) = (d + 1) L(w∗), (6) where (1) follows from the Cauchy-Binet formula and (2) is an application of the “base × height” formula. If X is not in general position, then for some summands in (5), rank(XT−j) < d and P(T−j) = 0. Thus the left-hand side of (5) is 0, while the right-hand side is non-negative, so (6) becomes an inequality, completing the proof of Theorem 5. 7 5 Efficient algorithm for volume sampling In this section we propose an algorithm for efficiently performing exact volume sampling for any s ≥d. This addresses the question posed by [1], asking for a polynomial-time algorithm for the case when s > d. [6, 11] gave an algorithm for the case when s = d, which runs in time O(nd3). Recently, [16] offered an algorithm for arbitrary s, which has complexity O(n4s). We propose a new method, which uses our techniques to achieve the time complexity O((n −s + d)nd), a direct improvement over [16] by a factor of at least n2. Our algorithm also offers an improvement for s = d in certain regimes. Namely, when n = o(d2), then our algorithm runs in time O(n2d) = o(nd3), faster than the method proposed by [6]. Our algorithm implements reverse iterative sampling from Corollary 2. After removing q columns, we are left with an index set of size n −q that is distributed according to volume sampling for column set size n −q. Theorem 10 The sampling algorithm runs in time O((n −s + d)nd), using O(d2 + n) additional memory, and returns set S which is distributed according to size s volume sampling over X. Proof For correctness we show the following invariants that hold at the beginning of the while loop: pi = 1 −x⊤ i (XSX⊤ S )−1xi = (|S| −d) P(S−i|S) and Z = (XSX⊤ S )−1. At the first iteration the invariants trivially hold. When updating the pj we use Z and the pi from the previous iteration, so we can rewrite the update as Reverse iterative volume sampling Input: X∈Rd×n, s∈{d..n} Z ←(XX⊤)−1 ∀i∈{1..n} pi ←1 −x⊤ i Zxi S ←{1, .., n} while |S| > s Sample i ∝pi out of S S ←S −{i} v ←Zxi/√pi ∀j∈S pj ←pj −(x⊤ j v)2 Z ←Z + vv⊤ end return S pj ←pj −(x⊤ j v)2 = 1 −x⊤ j (XSX⊤ S )−1xj − (x⊤ j Zxi)2 1 −x⊤ i (XSX⊤ S )−1xi = 1 −x⊤ j (XSX⊤ S )−1xj −x⊤ j (XSX⊤ S )−1xix⊤ i (XSX⊤ S )−1xj 1 −x⊤ i (XSX⊤ S )−1xi = 1 −x⊤ j (XSX⊤ S )−1 + (XSX⊤ S )−1xix⊤ i (XSX⊤ S )−1 1 −x⊤ i (XSX⊤ S )−1xi xj (∗) = 1 −x⊤ j (XS−iX⊤ S−i)−1xj = (|S| −1 −d) P(S−i,j|S−i), where (∗) follows from the Sherman-Morrison formula. The update of Z is also an application of Sherman-Morrison and this concludes the proof of correctness. Runtime: Computing the initial Z = (XX⊤)−1 takes O(nd2), as does computing the initial values of pj’s. Inside the while loop, updating pj’s takes O(|S|d) = O(nd) and updating Z takes O(d2). The overall runtime becomes O(nd2 + (n −s)nd) = O((n −s + d)nd). The space usage (in addition to the input data) is dominated by the pi values and matrix Z. 6 Conclusions We developed exact formulas for E[(XIS)+)] and E[(XIS)+)2] when the subset S of s column indices is sampled proportionally to the volume det(XSX⊤ S ). The formulas hold for any fixed size s ∈{d..n}. These new expectation formulas imply that the solution w∗(S) for a volume sampled subproblem of a linear regression problem is unbiased. We also gave a formula relating the loss of the subproblem to the optimal loss (ie E(L(w∗(S))) = (d + 1)L(w∗)). However, this result only holds for sample size s = d. It is an open problem to obtain such an exact expectation formula for s > d. A natural algorithm is to draw k samples Si of size d and return w∗(S1:k), where S1:k = S i Si. We were able to get exact expressions for the loss L( 1 k P i w∗(Si)) of the average predictor but it is an open problem to get nontrivial bounds for the loss of the best predictor w∗(S1:k). 8 We were able to show that for small sample sizes, volume sampling a set jointly has the advantage: It achieves a multiplicative bound for the smallest sample size d, whereas any independent sampling routine requires sample size at least Ω(d log d). We believe that our results demonstrate a fundamental connection between volume sampling and linear regression, which demands further exploration. Our loss expectation formula has already been applied by [12] to the task of linear regression without correspondence. Acknowledgements Thanks to Daniel Hsu and Wojciech Kotłowski for many valuable discussions. This research was supported by NSF grant IIS-1619271. References [1] Haim Avron and Christos Boutsidis. Faster subset selection for matrices and applications. SIAM Journal on Matrix Analysis and Applications, 34(4):1464–1499, 2013. [2] Aharon Ben-Tal and Marc Teboulle. A geometric property of the least squares solution of linear equations. Linear Algebra and its Applications, 139:165 – 170, 1990. [3] Christos Boutsidis, Petros Drineas, and Malik Magdon-Ismail. Rich coresets for constrained linear regression. CoRR, abs/1202.3505, 2012. [4] Nicolo Cesa-Bianchi and Gabor Lugosi. Prediction, Learning, and Games. Cambridge University Press, New York, NY, USA, 2006. [5] Kenneth L. Clarkson and David P. Woodruff. Low rank approximation and regression in input sparsity time. In Proceedings of the Forty-fifth Annual ACM Symposium on Theory of Computing, STOC ’13, pages 81–90, New York, NY, USA, 2013. ACM. [6] Amit Deshpande and Luis Rademacher. Efficient volume sampling for row/column subset selection. In Proceedings of the 2010 IEEE 51st Annual Symposium on Foundations of Computer Science, FOCS ’10, pages 329–338, Washington, DC, USA, 2010. IEEE Computer Society. [7] Amit Deshpande, Luis Rademacher, Santosh Vempala, and Grant Wang. Matrix approximation and projective clustering via volume sampling. In Proceedings of the Seventeenth Annual ACM-SIAM Symposium on Discrete Algorithm, SODA ’06, pages 1117–1126, Philadelphia, PA, USA, 2006. Society for Industrial and Applied Mathematics. [8] Petros Drineas, Malik Magdon-Ismail, Michael W. Mahoney, and David P. Woodruff. Fast approximation of matrix coherence and statistical leverage. J. Mach. Learn. Res., 13(1):3475– 3506, December 2012. [9] Valeri Vadimovich Fedorov, W.J. Studden, and E.M. Klimko, editors. Theory of optimal experiments. Probability and mathematical statistics. Academic Press, New York, 1972. [10] Mike Gartrell, Ulrich Paquet, and Noam Koenigstein. Bayesian low-rank determinantal point processes. In Proceedings of the 10th ACM Conference on Recommender Systems, RecSys ’16, pages 349–356, New York, NY, USA, 2016. ACM. [11] Venkatesan Guruswami and Ali Kemal Sinop. Optimal column-based low-rank matrix reconstruction. In Proceedings of the Twenty-third Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’12, pages 1207–1214, Philadelphia, PA, USA, 2012. Society for Industrial and Applied Mathematics. [12] Daniel Hsu, Kevin Shi, and Xiaorui Sun. Linear regression without correspondence. CoRR, abs/1705.07048, 2017. [13] Byungkon Kang. Fast determinantal point process sampling with application to clustering. In Proceedings of the 26th International Conference on Neural Information Processing Systems, NIPS’13, pages 2319–2327, USA, 2013. Curran Associates Inc. [14] Alex Kulesza and Ben Taskar. k-DPPs: Fixed-Size Determinantal Point Processes. In Proceedings of the 28th International Conference on Machine Learning, pages 1193–1200. Omnipress, 2011. 9 [15] Alex Kulesza and Ben Taskar. Determinantal Point Processes for Machine Learning. Now Publishers Inc., Hanover, MA, USA, 2012. [16] C. Li, S. Jegelka, and S. Sra. Column Subset Selection via Polynomial Time Dual Volume Sampling. ArXiv e-prints, March 2017. [17] Michael W. Mahoney. Randomized algorithms for matrices and data. Found. Trends Mach. Learn., 3(2):123–224, February 2011. [18] Tamas Sarlos. Improved approximation algorithms for large matrices via random projections. In Proceedings of the 47th Annual IEEE Symposium on Foundations of Computer Science, FOCS ’06, pages 143–152, Washington, DC, USA, 2006. IEEE Computer Society. [19] Masashi Sugiyama and Shinichi Nakajima. Pool-based active learning in approximate linear regression. Mach. Learn., 75(3):249–274, June 2009. 10 | 2017 | 226 |
6,704 | Revisiting Perceptron: Efficient and Label-Optimal Learning of Halfspaces Songbai Yan UC San Diego La Jolla, CA yansongbai@ucsd.edu Chicheng Zhang∗ Microsoft Research New York, NY chicheng.zhang@microsoft.com Abstract It has been a long-standing problem to efficiently learn a halfspace using as few labels as possible in the presence of noise. In this work, we propose an efficient Perceptron-based algorithm for actively learning homogeneous halfspaces under the uniform distribution over the unit sphere. Under the bounded noise condition [49], where each label is flipped with probability at most η < 1 2, our algorithm achieves a near-optimal label complexity of ˜O d (1−2η)2 ln 1 2 in time ˜O d2 (1−2η)3 . Under the adversarial noise condition [6, 45, 42], where at most a ˜Ω() fraction of labels can be flipped, our algorithm achieves a near-optimal label complexity of ˜O d ln 1 in time ˜O d2 . Furthermore, we show that our active learning algorithm can be converted to an efficient passive learning algorithm that has near-optimal sample complexities with respect to and d. 1 Introduction We study the problem of designing efficient noise-tolerant algorithms for actively learning homogeneous halfspaces in the streaming setting. We are given access to a data distribution from which we can draw unlabeled examples, and a noisy labeling oracle O that we can query for labels. The goal is to find a computationally efficient algorithm to learn a halfspace that best classifies the data while making as few queries to the labeling oracle as possible. Active learning arises naturally in many machine learning applications where unlabeled examples are abundant and cheap, but labeling requires human effort and is expensive. For those applications, one natural question is whether we can learn an accurate classifier using as few labels as possible. Active learning addresses this question by allowing the learning algorithm to sequentially select examples to query for labels, and avoid requesting labels which are less informative, or can be inferred from previously-observed examples. There has been a large body of work on the theory of active learning, showing sharp distributiondependent label complexity bounds [21, 11, 34, 27, 35, 46, 60, 41]. However, most of these general active learning algorithms rely on solving empirical risk minimization problems, which are computationally hard in the presence of noise [5]. On the other hand, existing computationally efficient algorithms for learning halfspaces [17, 29, 42, 45, 6, 23, 7, 8] are not optimal in terms of label requirements. These algorithms have different degrees of noise tolerance (e.g. adversarial noise [6], malicious noise [43], random classification noise [3], ∗Work done while at UC San Diego. 2We use ˜O(f(·)) := O(f(·) ln f(·)), and ˜Ω(f(·)) := Ω(f(·)/ ln f(·)). We say f(·) = ˜Θ(g(·)) if f(·) = ˜O(g(·)) and f(·) = ˜Ω g(·) 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. bounded noise [49], etc), and run in time polynomial in 1 and d. Some of them naturally exploit the utility of active learning [6, 7, 8], but they do not achieve the sharpest label complexity bounds in contrast to those computationally-inefficient active learning algorithms [10, 9, 60]. Therefore, a natural question is: is there any active learning halfspace algorithm that is computationally efficient, and has a minimum label requirement? This has been posed as an open problem in [50]. In the realizable setting, [26, 10, 9, 56] give efficient algorithms that have optimal label complexity of ˜O(d ln 1 ) under some distributional assumptions. However, the challenge still remains open in the nonrealizable setting. It has been shown that learning halfspaces with agnostic noise even under Gaussian unlabeled distribution is hard [44]. Nonetheless, we give an affirmative answer to this question under two moderate noise settings: bounded noise and adversarial noise. 1.1 Our Results We propose a Perceptron-based algorithm, ACTIVE-PERCEPTRON, for actively learning homogeneous halfspaces under the uniform distribution over the unit sphere. It works under two noise settings: bounded noise and adversarial noise. Our work answers an open question by [26] on whether Perceptron-based active learning algorithms can be modified to tolerate label noise. In the η-bounded noise setting (also known as the Massart noise model [49]), the label of an example x ∈Rd is generated by sign(u · x) for some underlying halfspace u, and flipped with probability η(x) ≤η < 1 2. Our algorithm runs in time ˜O d2 (1−2η)3 , and requires ˜O d (1−2η)2 · ln 1 labels. We show that this label complexity is nearly optimal by providing an almost matching information-theoretic lower bound of Ω d (1−2η)2 · ln 1 . Our time and label complexities substantially improve over the state of the art result of [8], which runs in time ˜O(d O( 1 (1−2η)4 ) 1 ) and requires ˜O(d O( 1 (1−2η)4 ) ln 1 ) labels. Our main theorem on learning under bounded noise is as follows: Theorem 2 (Informal). Suppose the labeling oracle O satisfies the η-bounded noise condition with respect to u, then for ACTIVE-PERCEPTRON, with probability at least 1−δ: (1) The output halfspace v is such that P[sign(v · X) = sign(u · X)] ≤; (2) The number of label queries to oracle O is at most ˜O d (1−2η)2 · ln 1 ; (3) The number of unlabeled examples drawn is at most ˜O d (1−2η)3 ; (4) The algorithm runs in time ˜O d2 (1−2η)3 . In addition, we show that our algorithm also works in a more challenging setting, the ν-adversarial noise setting [6, 42, 45].3 In this setting, the examples still come iid from a distribution, but the assumption on the labels is just that P[sign(u · X) = Y ] ≤ν for some halfspace u. Under this assumption, the Bayes classifier may not be a halfspace. We show that our algorithm achieves an error of while tolerating a noise level of ν = Ω ln d δ +ln ln 1 . It runs in time ˜O d2 , and requires only ˜O d · ln 1 labels which is near-optimal. ACTIVE-PERCEPTRON has a label complexity bound that matches the state of the art result of [39]4, while having a lower running time. Our main theorem on learning under adversarial noise is as follows: Theorem 3 (Informal). Suppose the labeling oracle O satisfies the ν-adversarial noise condition with respect to u, where ν < Θ( ln d δ +ln ln 1 ). Then for ACTIVE-PERCEPTRON, with probability at least 1−δ: (1) The output halfspace v is such that P[sign(v ·X) = sign(u·X)] ≤; (2) The number of label queries to oracle O is at most ˜O d · ln 1 ; (3) The number of unlabeled examples drawn is at most ˜O d ; (4) The algorithm runs in time ˜O d2 . 3Note that the adversarial noise model is not the same as that in online learning [18], where each example can be chosen adversarially. 4The label complexity bound is implicit in [39] by a refined analysis of the algorithm of [6] (See their Lemma 8 for details). 2 Table 1: A comparison of algorithms for active learning of halfspaces under the uniform distribution, in the η-bounded noise model. Algorithm Label Complexity Time Complexity [10, 9, 60] ˜O( d (1−2η)2 ln 1 ) superpoly(d, 1 ) 5 [8] ˜O(d O( 1 (1−2η)4 ) · ln 1 ) ˜O(d O( 1 (1−2η)4 ) · 1 ) Our Work ˜O( d (1−2η)2 ln 1 ) ˜O d2 (1−2η)3 1 Table 2: A comparison of algorithms for active learning of halfspaces under the uniform distribution, in the ν-adversarial noise model. Algorithm Noise Tolerance Label Complexity Time Complexity [60] ν = Ω() ˜O(d ln 1 ) superpoly(d, 1 ) [39] ν = Ω() ˜O(d ln 1 ) poly(d, 1 ) Our Work ν = Ω( ln d+ln ln 1 ) ˜O(d ln 1 ) ˜O d2 · 1 Throughout the paper, ACTIVE-PERCEPTRON is shown to work if the unlabeled examples are drawn uniformly from the unit sphere. The algorithm and analysis can be easily generalized to any spherical symmetrical distributions, for example, isotropic Gaussian distributions. They can also be generalized to distributions whose densities with respect to uniform distribution are bounded away from 0. In addition, we show in Section 6 that ACTIVE-PERCEPTRON can be converted to a passive learning algorithm, PASSIVE-PERCEPTRON, that has near optimal sample complexities with respect to and d under the two noise settings. We defer the discussion to the end of the paper. 2 Related Work Active Learning. The recent decades have seen much success in both theory and practice of active learning; see the excellent surveys by [54, 37, 25]. On the theory side, many label-efficient active learning algorithms have been proposed and analyzed. An incomplete list includes [21, 11, 34, 27, 35, 46, 60, 41]. Most algorithms relies on solving empirical risk minimization problems, which are computationally hard in the presence of noise [5]. Computational Hardness of Learning Halfspaces. Efficient learning of halfspaces is one of the central problems in machine learning [22]. In the realizable case, it is well known that linear programming will find a consistent hypothesis over data efficiently. In the nonrealizable setting, however, the problem is much more challenging. A series of papers have shown the hardness of learning halfspaces with agnostic noise [5, 30, 33, 44, 23]. The state of the art result [23] shows that under standard complexity-theoretic assumptions, there exists a data distribution, such that the best linear classifier has error o(1), but no polynomial time algorithms can achieve an error at most 1 2 −1 dc for every c > 0, even with improper learning. [44] shows that under standard assumptions, even if the unlabeled distribution is Gaussian, any agnostic halfspace learning algorithm must run in time ( 1 )Ω(ln d) to achieve an excess error of . These results indicate that, to have nontrivial guarantees on learning halfspaces with noise in polynomial time, one has to make additional assumptions on the data distribution over instances and labels. Efficient Active Learning of Halfspaces. Despite considerable efforts, there are only a few halfspace learning algorithms that are both computationally-efficient and label-efficient even under the uniform distribution. In the realizable setting, [26, 10, 9] propose computationally efficient active learning algorithms which have an optimal label complexity of ˜O(d ln 1 ). Since it is believed to be hard for learning halfspaces in the general agnostic setting, it is natural to consider algorithms that work under more moderate noise conditions. Under the bounded noise 5The algorithm needs to minimize 0-1 loss, the best known method for which requires superpolynomial time. 3 setting [49], the only known algorithms that are both label-efficient and computationally-efficient are [7, 8]. [7] uses a margin-based framework which queries the labels of examples near the decision boundary. To achieve computational efficiency, it adaptively chooses a sequence of hinge loss minimization problems to optimize as opposed to directly optimizing the 0-1 loss. It works only when the label flipping probability upper bound η is small (η ≤1.8 × 10−6). [8] improves over [7] by adapting a polynomial regression procedure into the margin-based framework. It works for any η < 1/2, but its label complexity is O(d O( 1 (1−2η)4 ) ln 1 ), which is far worse than the informationtheoretic lower bound Ω( d (1−2η)2 ln 1 ). Recently [20] gives an efficient algorithm with a near-optimal label complexity under the membership query model where the learner can query on synthesized points. In contrast, in our stream-based model, the learner can only query on points drawn from the data distribution. We note that learning in the stream-based model is harder than in the membership query model, and it is unclear how to transform the DC algorithm in [20] into a computationally efficient stream-based active learning algorithm. Under the more challenging ν-adversarial noise setting, [6] proposes a margin-based algorithm that reduces the problem to a sequence of hinge loss minimization problems. Their algorithm achieves an error of in polynomial time when ν = Ω(), but requires ˜O(d2 ln 1 ) labels. Later, [39] performs a refined analysis to achieve a near-optimal label complexity of ˜O(d ln 1 ), but the time complexity of the algorithm is still an unspecified high order polynomial. Tables 1 and 2 present comparisons between our results and results most closely related to ours in the literature. Due to space limitations, discussions of additional related work are deferred to Appendix A. 3 Definitions and Settings We consider learning homogeneous halfspaces under uniform distribution. The instance space X is the unit sphere in Rd, which we denote by Sd−1 := x ∈Rd : x = 1 . We assume d ≥3 throughout this paper. The label space Y = {+1, −1}. We assume all data points (x, y) are drawn i.i.d. from an underlying distribution D over X × Y. We denote by DX the marginal of D over X (which is uniform over Sd−1), and DY |X the conditional distribution of Y given X. Our algorithm is allowed to draw unlabeled examples x ∈X from DX , and to make queries to a labeling oracle O for labels. Upon query x, O returns a label y drawn from DY |X=x. The hypothesis class of interest is the set of homogeneous halfspaces H := hw(x) = sign(w · x) | w ∈Sd−1 . For any hypothesis h ∈H, we define its error rate err(h) := PD[h(X) = Y ]. We will drop the subscript D in PD when it is clear from the context. Given a dataset S = (X1, Y1), . . . , (Xm, Ym) , we define the empirical error rate of h over S as errS(h) := 1 m m i=1 1 h(xi) = yi . Definition 1 (Bounded Noise [49]). We say that the labeling oracle O satisfies the η-bounded noise condition for some η ∈[0, 1/2) with respect to u, if for any x, P[Y = sign(u · x) | X = x] ≤η. It can be seen that under η-bounded noise condition, hu is the Bayes classifier. Definition 2 (Adversarial Noise [6]). We say that the labeling oracle O satisfies the ν-adversarial noise condition for some ν ∈[0, 1] with respect to u, if P[Y = sign(u · X)] ≤ν. For two unit vectors v1, v2, denote by θ(v1, v2) = arccos(v1 · v2) the angle between them. The following lemma gives relationships between errors and angles (see also Lemma 1 in [8]). Lemma 1. For any v1, v2 ∈Sd−1, err(hv1) −err(hv2) ≤P hv1(X) = hv2(X) = θ(v1,v2) π . Additionally, if the labeling oracle satisfies the η-bounded noise condition with respect to u, then for any vector v, err(hv) −err(hu) ≥(1 −2η)P hv(X) = hu(X) = 1−2η π θ(v, u). Given access to unlabeled examples drawn from DX and a labeling oracle O, our goal is to find a polynomial time algorithm A such that with probability at least 1 −δ, A outputs a halfspace hv ∈H with P[sign(v · X) = sign(u · X)] ≤ for some target accuracy and confidence δ. (By Lemma 1, this guarantees that the excess error of hv is at most , namely, err(hv) −err(hu) ≤.) The desired algorithm should make as few queries to the labeling oracle O as possible. 4 We say an algorithm A achieves a label complexity of Λ(, δ), if for any target halfspace hu ∈H, with probability at least 1 −δ, A outputs a halfspace hv ∈H such that err(hv) ≤err(hu) + , and requests at most Λ(, δ) labels from oracle O. 4 Main Algorithm Our main algorithm, ACTIVE-PERCEPTRON (Algorithm 1), works in epochs. It works under the bounded and the adversarial noise models, if its sample schedule {mk} and band width {bk} are set appropriately with respect to each noise model. At the beginning of each epoch k, it assumes an upper bound of π 2k on θ(vk−1, u), the angle between current iterate vk−1 and the underlying halfspace u. As we will see, this can be shown to hold with high probability inductively. Then, it calls procedure MODIFIED-PERCEPTRON (Algorithm 2) to find an new iterate vk, which can be shown to have an angle with u at most π 2k+1 with high probability. The algorithm ends when a total of k0 = log2 1 epochs have passed. For simplicity, we assume for the rest of the paper that the angle between the initial halfspace v0 and the underlying halfspace u is acute, that is, θ(v0, u) ≤π 2 ; Appendix F shows that this assumption can be removed with a constant overhead in terms of label and time complexities. Algorithm 1 ACTIVE-PERCEPTRON Input: Labeling oracle O, initial halfspace v0, target error , confidence δ, sample schedule {mk}, band width {bk}. Output: learned halfspace v. 1: Let k0 = log2 1 . 2: for k = 1, 2, . . . , k0 do 3: vk ←MODIFIED-PERCEPTRON(O, vk−1, π 2k , δ k(k+1), mk, bk). 4: end for 5: return vk0. Procedure MODIFIED-PERCEPTRON (Algorithm 2) is the core component of ACTIVE-PERCEPTRON. It sequentially performs a modified Perceptron update rule on the selected new examples (xt, yt) [51, 17, 26]: wt+1 ←wt −21 {ytwt · xt < 0} (wt · xt) · xt (1) Define θt := θ(wt, u). Update rule (1) implies the following relationship between θt+1 and θt (See Lemma 8 in Appendix E for its proof): cos θt+1 −cos θt = −21 {ytwt · xt < 0} (wt · xt) · (u · xt) (2) This motivates us to take cos θt as our measure of progress; we would like to drive cos θt up to 1(so that θt goes down to 0) as fast as possible. To this end, MODIFIED-PERCEPTRON samples new points xt under time-varying distributions DX |Rt and query for their labels, where Rt =
x ∈Sd−1 : b 2 ≤wt · x ≤b is a band inside the unit sphere. The rationale behind the choice of Rt is twofold: 1. We set Rt to have a probability mass of ˜Ω(), so that the time complexity of rejection sampling is at most ˜O( 1 ) per example. Moreover, in the adversarial noise setting, we set Rt large enough to dominate the noise of magnitude ν = ˜Ω(). 2. Unlike the active Perceptron algorithm in [26] or other margin-based approaches (for example [55, 10]) where examples with small margin are queried, we query the label of the examples with a range of margin [ b 2, b]. From a technical perspective, this ensures that θt decreases by a decent amount in expectation (see Lemmas 9 and 10 for details). Following the insight of [32], we remark that the modified Perceptron update (1) on distribution DX |Rt can be alternatively viewed as performing stochastic gradient descent on a special non-convex loss function (w, (x, y)) = min(1, max(0, −1−2 byw·x)). It is an interesting open question whether optimizing this new loss function can lead to improved empirical results for learning halfspaces. 5 Algorithm 2 MODIFIED-PERCEPTRON Input: Labeling oracle O, initial halfspace w0, angle upper bound θ, confidence δ, number of iterations m, band width b. Output: Improved halfspace wm. 1: for t = 0, 1, 2, . . . , m −1 do 2: Define region Rt =
x ∈Sd−1 : b 2 ≤wt · x ≤b . 3: Rejection sample xt ∼DX |Rt. In other words, draw xt from DX until xt is in Rt. Query O for its label yt. 4: wt+1 ←wt −21 {ytwt · xt < 0} · (wt · xt) · xt. 5: end for 6: return wm. 5 Performance Guarantees We show that ACTIVE-PERCEPTRON works in the bounded and the adversarial noise models, achieving computational efficiency and near-optimal label complexities. To this end, we first give a lower bound on the label complexity under bounded noise, and then give computational and label complexity upper bounds under the two noise conditions respectively. We defer all proofs to the Appendix. 5.1 A Lower Bound under Bounded Noise We first present an information-theoretic lower bound on the label complexity in the bounded noise setting under uniform distribution. This extends the distribution-free lower bounds of [53, 37], and generalizes the realizable-case lower bound of [47] to the bounded noise setting. Our lower bound can also be viewed as an extension of [59]’s Theorem 3; specifically it addresses the hardness under the α-Tsybakov noise condition where α = 0 (while [59]’s Theorem 3 provides lower boundes when α ∈(0, 1)). Theorem 1. For any d > 4, 0 ≤η < 1 2, 0 < ≤ 1 4π, 0 < δ ≤1 4, for any active learning algorithm A, there is a u ∈Sd−1, and a labeling oracle O that satisfies η-bounded noise condition with respect to u, such that if with probability at least 1 −δ, A makes at most n queries of labels to O and outputs v ∈Sd−1 such that P[sign(v · X) = sign(u · X)] ≤, then n ≥Ω d log 1 (1−2η)2 + η log 1 δ (1−2η)2 . 5.2 Bounded Noise We establish Theorem 2 in the bounded noise setting. The theorem implies that, with appropriate settings of input parameters, ACTIVE-PERCEPTRON efficiently learns a halfspace of excess error at most with probability at least 1 −δ, under the assumption that DX is uniform over the unit sphere and O has bounded noise. In addition, it queries at most ˜O( d (1−2η)2 ln 1 ) labels. This matches the lower bound of Theorem 1, and improves over the state of the art result of [8], where a label complexity of ˜O(d O( 1 (1−2η)4 ) ln 1 ) is shown using a different algorithm. The proof and the precise setting of parameters (mk and bk) are given in Appendix C. Theorem 2 (ACTIVE-PERCEPTRON under Bounded Noise). Suppose Algorithm 1 has inputs labeling oracle O that satisfies η-bounded noise condition with respect to halfspace u, initial halfspace v0 such that θ(v0, u) ∈[0, π 2 ], target error , confidence δ, sample schedule {mk} where mk = Θ d (1−2η)2 (ln d (1−2η)2 + ln k δ ) , band width {bk} where bk = Θ 2−k(1−2η) √ d ln(kmk/δ) . Then with probability at least 1 −δ: 1. The output halfspace v is such that P[sign(v · X) = sign(u · X)] ≤. 2. The number of label queries is O d (1−2η)2 · ln 1 · ln d (1−2η)2 + ln 1 δ + ln ln 1 . 6 3. The number of unlabeled examples drawn is O d (1−2η)3 · ln d (1−2η)2 + ln 1 δ + ln ln 1 2 · 1 ln 1 . 4. The algorithm runs in time O d2 (1−2η)3 · ln d (1−2η)2 + ln 1 δ + ln ln 1 2 · 1 ln 1 . The theorem follows from Lemma 2 below. The key ingredient of the lemma is a delicate analysis of the dynamics of the angles {θt}m t=0, where θt = θ(wt, u) is the angle between the iterate wt and the halfspace u. Since xt is randomly sampled and yt is noisy, we are only able to show that θt decreases by a decent amount in expectation. To remedy the stochastic fluctuations, we apply martingale concentration inequalities to carefully control the upper envelope of sequence {θt}m t=0. Lemma 2 (MODIFIED-PERCEPTRON under Bounded Noise). Suppose Algorithm 2 has inputs labeling oracle O that satisfies η-bounded noise condition with respect to halfspace u, initial halfspace w0 and angle upper bound θ ∈(0, π 2 ] such that θ(w0, u) ≤θ, confidence δ, number of iterations m = Θ( d (1−2η)2 (ln d (1−2η)2 + ln 1 δ )), band width b = Θ θ(1−2η) √ d ln(m/δ) . Then with probability at least 1 −δ: 1. The output halfspace wm is such that θ(wm, u) ≤θ 2. 2. The number of label queries is O d (1−2η)2 ln d (1−2η)2 + ln 1 δ . 3. The number of unlabeled examples drawn is O d (1−2η)3 · ln d (1−2η)2 + ln 1 δ 2 · 1 θ . 4. The algorithm runs in time O d2 (1−2η)3 · ln d (1−2η)2 + ln 1 δ 2 · 1 θ . 5.3 Adversarial Noise We establish Theorem 3 in the adversarial noise setting. The theorem implies that, with appropriate settings of input parameters, ACTIVE-PERCEPTRON efficiently learns a halfspace of excess error at most with probability at least 1 −δ, under the assumption that DX is uniform over the unit sphere and O has an adversarial noise of magnitude ν = Ω( ln d+ln ln 1 ). In addition, it queries at most ˜O(d ln 1 ) labels. Our label complexity bound is information-theoretically optimal [47], and matches the state of the art result of [39]. The benefit of our approach is computational: it has a running time of ˜O( d2 ), while [39] needs to solve a convex optimization problem whose running time is some polynomial over d and 1 with an unspecified degree. The proof and the precise setting of parameters (mk and bk) are given in Appendix C. Theorem 3 (ACTIVE-PERCEPTRON under Adversarial Noise). Suppose Algorithm 1 has inputs labeling oracle O that satisfies ν-adversarial noise condition with respect to halfspace u, initial halfspace v0 such that θ(v0, u) ≤π 2 , target error , confidence δ, sample schedule {mk} where mk = Θ(d(ln d + ln k δ )), band width {bk} where bk = Θ 2−k √ d ln(kmk/δ) . Additionally ν ≤ Ω( ln d δ +ln ln 1 ). Then with probability at least 1 −δ: 1. The output halfspace v is such that P[sign(v · X) = sign(u · X)] ≤. 2. The number of label queries is O d · ln 1 · ln d + ln 1 δ + ln ln 1 . 3. The number of unlabeled examples drawn is O d · ln d + ln 1 δ + ln ln 1 2 · 1 ln 1 . 4. The algorithm runs in time O d2 · ln d + ln 1 δ + ln ln 1 2 · 1 ln 1 . 7 The theorem follows from Lemma 3 below, whose proof is similar to Lemma 2. Lemma 3 (MODIFIED-PERCEPTRON under Adversarial Noise). Suppose Algorithm 2 has inputs labeling oracle O that satisfies ν-adversarial noise condition with respect to halfspace u, initial halfspace w0 and angle upper bound θ ∈(0, π 2 ] such that θ(w0, u) ≤θ, confidence δ, number of iterations m = Θ(d(ln d + ln 1 δ )), band width b = Θ θ √ d ln(m/δ) . Additionally ν ≤Ω( θ ln(m/δ))). Then with probability at least 1 −δ: 1. The output halfspace wm is such that θ(wm, u) ≤θ 2. 2. The number of label queries is O d · ln d + ln 1 δ . 3. The number of unlabeled examples drawn is O d · ln d + ln 1 δ 2 · 1 θ 4. The algorithm runs in time O d2 · ln d + ln 1 δ 2 · 1 θ . 6 Implications to Passive Learning ACTIVE-PERCEPTRON can be converted to a passive learning algorithm, PASSIVE-PERCEPTRON, for learning homogeneous halfspaces under the uniform distribution over the unit sphere. PASSIVE-PERCEPTRON has PAC sample complexities close to the lower bounds under the two noise models. We give a formal description of PASSIVE-PERCEPTRON in Appendix B. We give its formal guarantees in the corollaries below, which are immediate consequences of Theorems 2 and 3. In the η-bounded noise model, the sample complexity of PASSIVE-PERCEPTRON improves over the state of the art result of [8], where a sample complexity of ˜O( d O( 1 (1−2η)4 ) ) is obtained. The bound has the same dependency on and d as the minimax upper bound of ˜Θ( d (1−2η)) by [49], which is achieved by a computationally inefficient ERM algorithm. Corollary 1 (PASSIVE-PERCEPTRON under Bounded Noise). Suppose PASSIVE-PERCEPTRON has inputs distribution D that satisfies η-bounded noise condition with respect to u, initial halfspace v0, target error , confidence δ, sample schedule {mk} where mk = Θ d (1−2η)2 (ln d (1−2η)2 + ln k δ ) , band width {bk} where bk = Θ 2−k(1−2η) √ d ln(kmk/δ) . Then with probability at least 1 −δ: (1) The output halfspace v is such that err(hv) ≤err(hu) + ; (2) The number of labeled examples drawn is ˜O d (1−2η)3 . (3) The algorithm runs in time ˜O d2 (1−2η)3 . In the ν-adversarial noise model, the sample complexity of PASSIVE-PERCEPTRON matches the minimax optimal sample complexity upper bound of ˜Θ( d ) obtained in [39]. Same as in active learning, our algorithm has a faster running time than [39]. Corollary 2 (PASSIVE-PERCEPTRON under Adversarial Noise). Suppose PASSIVE-PERCEPTRON has inputs distribution D that satisfies ν-adversarial noise condition with respect to u, initial halfspace v0, target error , confidence δ, sample schedule {mk} where mk = Θ d(ln d + ln k δ ) , band width {bk} where bk = Θ 2−k √ d ln(kmk/δ) . Furthermore ν = Ω( ln ln 1 +ln d δ ). Then with probability at least 1 −δ: (1) The output halfspace v is such that err(hv) ≤err(hu) + ; (2) The number of labeled examples drawn is ˜O d . (3) The algorithm runs in time ˜O d2 . Tables 3 and 4 present comparisons between our results and results most closely related to ours. Acknowledgments. The authors thank Kamalika Chaudhuri for help and support, Hongyang Zhang for thought-provoking initial conversations, Jiapeng Zhang for helpful discussions, and the anonymous reviewers for their insightful feedback. Much of this work is supported by NSF IIS-1167157 and 1162581. 8 Table 3: A comparison of algorithms for PAC learning halfspaces under the uniform distribution, in the η-bounded noise model. Algorithm Sample Complexity Time Complexity [8] ˜O( d O( 1 (1−2η)4 ) ) ˜O( d O( 1 (1−2η)4 ) ) ERM [49] ˜O( d (1−2η)) superpoly(d, 1 ) Our Work ˜O( d (1−2η)3) ˜O( d2 (1−2η)3 · 1 ) Table 4: A comparison of algorithms for PAC learning halfspaces under the uniform distribution, in the ν-adversarial noise model where ν = Ω( ln ln 1 +ln d). Algorithm Sample Complexity Time Complexity [39] ˜O( d ) poly(d, 1 ) ERM [57] ˜O( d ) superpoly(d, 1 ) Our Work ˜O( d ) ˜O( d2 ) References [1] Alekh Agarwal. Selective sampling algorithms for cost-sensitive multiclass prediction. ICML (3), 28: 1220–1228, 2013. [2] Nir Ailon, Ron Begleiter, and Esther Ezra. Active learning using smooth relative regret approximations with applications. Journal of Machine Learning Research, 15(1):885–920, 2014. [3] Dana Angluin and Philip Laird. Learning from noisy examples. Machine Learning, 2(4):343–370, Apr 1988. ISSN 1573-0565. doi: 10.1023/A:1022873112823. URL https://doi.org/10.1023/A: 1022873112823. [4] Martin Anthony and Peter L Bartlett. Neural network learning: Theoretical foundations. Cambridge University Press, 2009. [5] Sanjeev Arora, László Babai, Jacques Stern, and Z Sweedyk. The hardness of approximate optima in lattices, codes, and systems of linear equations. In Foundations of Computer Science, 1993. Proceedings., 34th Annual Symposium on, pages 724–733. IEEE, 1993. [6] Pranjal Awasthi, Maria Florina Balcan, and Philip M Long. The power of localization for efficiently learning linear separators with noise. In Proceedings of the 46th Annual ACM Symposium on Theory of Computing, pages 449–458. ACM, 2014. [7] Pranjal Awasthi, Maria-Florina Balcan, Nika Haghtalab, and Ruth Urner. Efficient learning of linear separators under bounded noise. In COLT, pages 167–190, 2015. [8] Pranjal Awasthi, Maria-Florina Balcan, Nika Haghtalab, and Hongyang Zhang. Learning and 1-bit compressed sensing under asymmetric noise. In Proceedings of The 28th Conference on Learning Theory, COLT 2016, 2016. [9] M.-F. Balcan and P. M. Long. Active and passive learning of linear separators under log-concave distributions. In COLT, 2013. [10] M.-F. Balcan, A. Z. Broder, and T. Zhang. Margin based active learning. In COLT, 2007. [11] M.-F. Balcan, A. Beygelzimer, and J. Langford. Agnostic active learning. J. Comput. Syst. Sci., 75(1): 78–89, 2009. [12] Maria-Florina Balcan and Vitaly Feldman. Statistical active learning algorithms. In NIPS, pages 1295–1303, 2013. [13] Maria-Florina Balcan and Hongyang Zhang. S-concave distributions: Towards broader distributions for noise-tolerant and sample-efficient learning algorithms. arXiv preprint arXiv:1703.07758, 2017. [14] Maria-Florina Balcan, Steve Hanneke, and Jennifer Wortman Vaughan. The true sample complexity of active learning. Machine learning, 80(2-3):111–139, 2010. 9 [15] A. Beygelzimer, D. Hsu, J. Langford, and T. Zhang. Agnostic active learning without constraints. In NIPS, 2010. [16] Alina Beygelzimer, Sanjoy Dasgupta, and John Langford. Importance weighted active learning. In Twenty-Sixth International Conference on Machine Learning, 2009. [17] Avrim Blum, Alan M. Frieze, Ravi Kannan, and Santosh Vempala. A polynomial-time algorithm for learning noisy linear threshold functions. Algorithmica, 22(1/2):35–52, 1998. [18] Nicolo Cesa-Bianchi and Gábor Lugosi. Prediction, learning, and games. Cambridge university press, 2006. [19] Nicolò Cesa-Bianchi, Claudio Gentile, and erancesco Orabona. Robust bounds for classification via selective sampling. In Proceedings of the 26th Annual International Conference on Machine Learning, ICML 2009, Montreal, Quebec, Canada, June 14-18, 2009, pages 121–128, 2009. [20] Lin Chen, Hamed Hassani, and Amin Karbasi. Near-optimal active learning of halfspaces via query synthesis in the noisy setting. In Thirty-First AAAI Conference on Artificial Intelligence, 2017. [21] David A. Cohn, Les E. Atlas, and Richard E. Ladner. Improving generalization with active learning. Machine Learning, 15(2):201–221, 1994. [22] Nello Cristianini and John Shawe-Taylor. An introduction to support vector machines and other kernelbased learning methods. 2000. [23] Amit Daniely. Complexity theoretic limitations on learning halfspaces. arXiv preprint arXiv:1505.05800, 2015. [24] S. Dasgupta. Coarse sample complexity bounds for active learning. In NIPS, 2005. [25] Sanjoy Dasgupta. Two faces of active learning. Theoretical computer science, 412(19):1767–1781, 2011. [26] Sanjoy Dasgupta, Adam Tauman Kalai, and Claire Monteleoni. Analysis of perceptron-based active learning. In Learning Theory, 18th Annual Conference on Learning Theory, COLT 2005, Bertinoro, Italy, June 27-30, 2005, Proceedings, pages 249–263, 2005. [27] Sanjoy Dasgupta, Daniel Hsu, and Claire Monteleoni. A general agnostic active learning algorithm. In Advances in Neural Information Processing Systems 20, 2007. [28] Ofer Dekel, Claudio Gentile, and Karthik Sridharan. Selective sampling and active learning from single and multiple teachers. Journal of Machine Learning Research, 13(Sep):2655–2697, 2012. [29] John Dunagan and Santosh Vempala. A simple polynomial-time rescaling algorithm for solving linear programs. In Proceedings of the thirty-sixth annual ACM symposium on Theory of computing, pages 315–320. ACM, 2004. [30] Vitaly Feldman, Parikshit Gopalan, Subhash Khot, and Ashok Kumar Ponnuswami. New results for learning noisy parities and halfspaces. In Foundations of Computer Science, 2006. FOCS’06. 47th Annual IEEE Symposium on, pages 563–574. IEEE, 2006. [31] Y. Freund, H. S. Seung, E. Shamir, and N. Tishby. Selective sampling using the query by committee algorithm. Machine Learning, 28(2-3):133–168, 1997. [32] Andrew Guillory, Erick Chastain, and Jeff Bilmes. Active learning as non-convex optimization. In International Conference on Artificial Intelligence and Statistics, pages 201–208, 2009. [33] Venkatesan Guruswami and Prasad Raghavendra. Hardness of learning halfspaces with noise. SIAM Journal on Computing, 39(2):742–765, 2009. [34] S. Hanneke. A bound on the label complexity of agnostic active learning. In ICML, 2007. [35] S. Hanneke. Theoretical Foundations of Active Learning. PhD thesis, Carnegie Mellon University, 2009. [36] Steve Hanneke. Rates of convergence in active learning. The Annals of Statistics, 39(1):333–361, 2011. [37] Steve Hanneke. Theory of disagreement-based active learning. Foundations and Trends R in Machine Learning, 7(2-3):131–309, 2014. [38] Steve Hanneke and Liu Yang. Surrogate losses in passive and active learning. arXiv preprint arXiv:1207.3772, 2012. 10 [39] Steve Hanneke, Varun Kanade, and Liu Yang. Learning with a drifting target concept. In International Conference on Algorithmic Learning Theory, pages 149–164. Springer, 2015. [40] D. Hsu. Algorithms for Active Learning. PhD thesis, UC San Diego, 2010. [41] Tzu-Kuo Huang, Alekh Agarwal, Daniel Hsu, John Langford, and Robert E. Schapire. Efficient and parsimonious agnostic active learning. CoRR, abs/1506.08669, 2015. [42] Adam Tauman Kalai, Adam R Klivans, Yishay Mansour, and Rocco A Servedio. Agnostically learning halfspaces. SIAM Journal on Computing, 37(6):1777–1805, 2008. [43] Michael Kearns and Ming Li. Learning in the presence of malicious errors. SIAM Journal on Computing, 22(4):807–837, 1993. [44] Adam Klivans and Pravesh Kothari. Embedding Hard Learning Problems Into Gaussian Space. In APPROX/RANDOM 2014, pages 793–809, 2014. [45] Adam R Klivans, Philip M Long, and Rocco A Servedio. Learning halfspaces with malicious noise. Journal of Machine Learning Research, 10(Dec):2715–2740, 2009. [46] V. Koltchinskii. Rademacher complexities and bounding the excess risk in active learning. JMLR, 2010. [47] Sanjeev R Kulkarni, Sanjoy K Mitter, and John N Tsitsiklis. Active learning using arbitrary binary valued queries. Machine Learning, 11(1):23–35, 1993. [48] Philip M Long. On the sample complexity of pac learning half-spaces against the uniform distribution. IEEE Transactions on Neural Networks, 6(6):1556–1559, 1995. [49] Pascal Massart and Élodie Nédélec. Risk bounds for statistical learning. The Annals of Statistics, pages 2326–2366, 2006. [50] Claire Monteleoni. Efficient algorithms for general active learning. In International Conference on Computational Learning Theory, pages 650–652. Springer, 2006. [51] TS Motzkin and IJ Schoenberg. The relaxation method for linear inequalities. Canadian Journal of Mathematics, 6(3):393–404, 1954. [52] Francesco Orabona and Nicolo Cesa-Bianchi. Better algorithms for selective sampling. In Proceedings of the 28th international conference on Machine learning (ICML-11), pages 433–440, 2011. [53] Maxim Raginsky and Alexander Rakhlin. Lower bounds for passive and active learning. In Advances in Neural Information Processing Systems, pages 1026–1034, 2011. [54] Burr Settles. Active learning literature survey. University of Wisconsin, Madison, 52(55-66):11, 2010. [55] Simon Tong and Daphne Koller. Support vector machine active learning with applications to text classification. Journal of machine learning research, 2(Nov):45–66, 2001. [56] Christopher Tosh and Sanjoy Dasgupta. Diameter-based active learning. In ICML, pages 3444–3452, 2017. [57] Vladimir N. Vapnik and Alexey Ya. Chervonenkis. On the uniform convergence of relative frequencies of events to their probabilities. Theory of Probability and Its Applications, 16(2):264–280, 1971. [58] Liwei Wang. Smoothness, disagreement coefficient, and the label complexity of agnostic active learning. Journal of Machine Learning Research, 12(Jul):2269–2292, 2011. [59] Yining Wang and Aarti Singh. Noise-adaptive margin-based active learning and lower bounds under tsybakov noise condition. In AAAI, 2016. [60] Chicheng Zhang and Kamalika Chaudhuri. Beyond disagreement-based agnostic active learning. In Advances in Neural Information Processing Systems 27: Annual Conference on Neural Information Processing Systems 2014, December 8-13 2014, Montreal, Quebec, Canada, pages 442–450, 2014. [61] Yuchen Zhang, Percy Liang, and Moses Charikar. A hitting time analysis of stochastic gradient langevin dynamics. In COLT, pages 1980–2022, 2017. 11 | 2017 | 227 |
6,705 | Rényi Differential Privacy Mechanisms for Posterior Sampling Joseph Geumlek University of California, San Diego jgeumlek@cs.ucsd.edu Shuang Song University of California, San Diego shs037@eng.ucsd.edu Kamalika Chaudhuri University of California, San Diego kamalika@cs.ucsd.edu Abstract With the newly proposed privacy definition of Rényi Differential Privacy (RDP) in [14], we re-examine the inherent privacy of releasing a single sample from a posterior distribution. We exploit the impact of the prior distribution in mitigating the influence of individual data points. In particular, we focus on sampling from an exponential family and specific generalized linear models, such as logistic regression. We propose novel RDP mechanisms as well as offering a new RDP analysis for an existing method in order to add value to the RDP framework. Each method is capable of achieving arbitrary RDP privacy guarantees, and we offer experimental results of their efficacy. 1 Introduction As data analysis continues to expand and permeate ever more facets of life, the concerns over the privacy of one’s data grow too. Many results have arrived in recent years to tackle the inherent conflict of extracting usable knowledge from a data set without over-extracting or leaking the private data of individuals. Before one can strike a balance between these competing goals, one needs a framework by which to quantify what it means to preserve an individual’s privacy. Since 2006, Differential Privacy (DP) has reigned as the privacy framework of choice [6]. It quantifies privacy by measuring how indistinguishability of the mechanism output across whether or not any one individual is in or out of the data set. This gave not just privacy semantics, but also robust mathematical guarantees. However, the requirements have been cumbersome for utility, leading to many proposed relaxations. One common relaxation is approximate DP, which allows arbitrarily bad events to occur with probability at most δ. A more recent relaxation is Rényi Differential Privacy (RDP) proposed in [14], which uses the measure of Rényi divergences to smoothly vary between bounding the average and maximum privacy loss. However, RDP has very few mechanisms compared to the more established approximate DP. We expand the RDP repertoire with novel mechanisms inspired by Rényi divergences, as well as re-analyzing an existing method in this new light. Inherent to DP and RDP is that there must be some uncertainty in the mechanism; they cannot be deterministic. Many privacy methods have been motivated by exploiting pre-existing sources of randomness in machine learning algorithms. One promising area has been Bayesian data analysis, which focuses on maintaining and tracking the uncertainty within probabilistic models. Posterior sampling is prevalent in many Bayesian methods, serving to introduce randomness that matches the currently held uncertainty. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. We analyze the privacy arising from posterior sampling as applied to two domains: sampling from exponential families and Bayesian logistic regression. Along with these analyses, we offer tunable mechanisms that can achieve stronger privacy guarantees than directly sampling from the posterior. These mechanisms work via controlling the relative strength of the prior in determining the posterior, building off the common intuition that concentrated prior distributions can prevent overfitting in Bayesian data analysis. We experimentally validate our new methods on synthetic and real data. 2 Background Privacy Model. We say two data sets X and X′ are neighboring if they differ in the private record of a single individual or person. We use n to refer to the number of records in the data set. Definition 1. Differential Privacy (DP) [6]. A randomized mechanism A(X) is said to be (ϵ, δ)differentially private if for any subset U of the output range of A and any neighboring data sets X and X′, we have p(A(X) ∈U) ≤exp (ϵ) p(A(X′) ∈U) + δ. DP is concerned with the difference the participation of an individual might have on the output distribution of the mechanism. When δ > 0, it is known as approximate DP while the δ = 0 case is known as pure DP. The requirements for DP can be phrased in terms of a privacy loss variable, a random variable that captures the effective privacy loss of the mechanism output. Definition 2. Privacy Loss Variable [2]. We can define a random variable Z that measures the privacy loss of a given output of a mechanism across two neighboring data sets X and X′. Z = log p(A(X) = o) p(A(X′) = o) o∼A(X) (1) (ϵ, δ)-DP is the requirement that for any two neighboring data sets Z ≤ϵ with probability at least 1 −δ. The exact nature of the trade-off and semantics between ϵ and δ is subtle, and choosing them appropriately is difficult. For example, setting δ = 1/n permits (ϵ, δ)-DP mechanisms that always violate the privacy of a random individual [12]. However, there are other ways to specify that a random variable is mostly small. One such way is to bound the Rényi divergence of A(X) and A(X′). Definition 3. Rényi Divergence [2]. The Rényi divergence of order λ between the two distributions P and Q is defined as Dλ(P||Q) = 1 λ −1 log Z P(o)λQ(o)1−λdo. (2) As λ →∞, Rényi divergence becomes the max divergence; moreover, setting P = A(X) and Q = A(X′) ensures that Dλ(P||Q) = 1 λ−1 log EZ[e(λ−1)Z], where Z is the privacy loss variable. Thus, a bound on the Rényi divergence over all orders λ ∈(0, ∞) is equivalent to (ϵ, 0)-DP, and as λ →1, this approaches the expected value of Z equal to KL(A(X)||A(X′)). This leads us to Rényi Differential Privacy, a flexible privacy notion that covers this intermediate behavior. Definition 4. Rényi Differential Privacy (RDP) [14]. A randomized mechanism A(X) is said to be (λ, ϵ)-Rényi differentially private if for any neighboring data sets X and X′ we have Dλ(A(X)||A(X′)) ≤ϵ. The choice of λ in RDP is used to tune how much concern is placed on unlikely large values of Z versus the average value of Z. One can consider a mechanism’s privacy as being quantified by the entire curve of ϵ values associated with each order λ, but the results of [14] show that almost identical results can be achieved when this curve is known at only a finite collection of possible λ values. Posterior Sampling. In Bayesian inference, we have a model class Θ, and are given observations x1, . . . , xn assumed to be drawn from a θ ∈Θ. Our goal is to maintain our beliefs about θ given the observational data in the form of the posterior distribution p(θ|x1, . . . , xn). This is often done in the form of drawing samples from the posterior. Our goal in this paper is to develop privacy preserving mechanisms for two popular and simple posterior sampling methods. The first is sampling from the exponential family posterior, which we address in Section 3; the second is sampling from posteriors induced by a subset of Generalized Linear Models, which we address in Section 4. 2 Related Work. Differential privacy has emerged as the gold standard for privacy in a number of data analysis applications – see [8, 15] for surveys. Since enforcing pure DP sometimes requires the addition of high noise, a number of relaxations have been proposed in the literature. The most popular relaxation is approximate DP [6], and a number of uniquely approximate DP mechanisms have been designed by [7, 16, 3, 1] among others. However, while this relaxation has some nice properties, recent work [14, 12] has argued that it can also lead privacy pitfalls in some cases. Approximate differential privacy is also related to, but is weaker than, the closely related δ-probabilistic privacy [11] and (1, ϵ, δ)-indistinguishability [4]. Our privacy definition of choice is Rényi differential privacy [14], which is motivated by two recent relaxations – concentrated DP [9] and z-CDP [2]. Concentrated DP has two parameters, µ and τ, controlling the mean and concentration of the privacy loss variable. Given a privacy parameter α, z-CDP essentially requires (λ, αλ)-RDP for all λ. While [2, 9, 14] establish tighter bounds on the privacy of existing differentially private and approximate DP mechanisms, we provide mechanisms based on posterior sampling from exponential families that are uniquely RDP. RDP is also a generalization of the notion of KL-privacy [19], which has been shown to be related to generalization in machine learning. There has also been some recent work on privacy properties of Bayesian posterior sampling; however most of the work has focused on establishing pure or approximate DP. [5] establishes conditions under which some popular Bayesian posterior sampling procedures directly satisfy pure or approximate DP. [18] provides a pure DP way to sample from a posterior that satisfies certain mild conditions by raising the temperature. [10, 20] provide a simple statistically efficient algorithm for sampling from exponential family posteriors. [13] shows that directly sampling from the posterior of certain GLMs, such as logistic regression, with the right parameters provides approximate differential privacy. While our work draws inspiration from all [5, 18, 13], the main difference between their and our work is that we provide RDP guarantees. 3 RDP Mechanisms based on Exponential Family Posterior Sampling In this section, we analyze the Rényi divergences between distributions from the same exponential family, which will lead to our RDP mechanisms for sampling from exponential family posteriors. An exponential family is a family of probability distributions over x ∈X indexed by the parameter θ ∈Θ ⊆Rd that can be written in this canonical form for some choice of functions h : X →R, S : X →Rd, and A : Θ →R: p(x1, . . . , xn|θ) = n Y i=1 h(xi) ! exp ( n X i=1 S(xi)) · θ −n · A(θ) ! . (3) Of particular importance is S, the sufficient statistics function, and A, the log-partition function of this family. Our analysis will be restricted to the families that satisfy the following three properties. Definition 5. The natural parameterization of an exponential family is the one that indexes the distributions of the family by the vector θ that appears in the inner product of equation (3). Definition 6. An exponential family is minimal if the coordinates of the function S are not linearly dependent for all x ∈X. Definition 7. For any ∆∈R, an exponential family is ∆-bounded if ∆≥supx,y∈X ||S(x) −S(y)||. This constraint can be relaxed with some caveats explored in the appendix. A minimal exponential family will always have a minimal conjugate prior family. This conjugate prior family is also an exponential family, and it satisfies the property that the posterior distribution formed after observing data is also within the same family. It has the following form: p(θ|η) = exp (T(θ) · η −C(η)) . (4) The sufficient statistics of θ can be written as T(θ) = (θ, −A(θ)) and p(θ|η0, x1, . . . , xn) = p(θ|η′) where η′ = η0 + Pn i=1(S(xi), 1). 3 Beta-Bernoulli System. A specific example of an exponential family that we will be interested in is the Beta-Bernoulli system, where an individual’s data is a single i.i.d. bit modeled as a Bernoulli variable with parameter ρ, along with a Beta conjugate prior. p(x|ρ) = ρx(1 −ρ)1−x. The Bernoulli distribution can be written in the form of equation (3) by letting h(x) = 1, S(x) = x, θ = log( ρ 1−ρ), and A(θ) = log(1 + exp (θ)) = −log(1 −ρ). The Beta distribution with the usual parameters α0, β0 will be parameterized by η0 = (η(1) 0 , η(2) 0 ) = (α0, α0+β0) in accordance equation (4). This system satisfies the properties we require, as this natural parameterization is minimal and ∆-bounded for ∆= 1. In this system, C(η) = Γ(η(1)) + Γ(η(2) −η(1)) −Γ(η(2)). Closed Form Rényi Divergence. The Rényi divergences of two distributions within the same family can be written in terms of the log-partition function. Dλ(P||Q) = 1 λ −1 log Z Θ P(θ)λQ(θ)1−λdθ ! = C(ληP + (1 −λ)ηQ) −λC(ηP ) λ −1 + C(ηQ). (5) To help analyze the implication of equation (5) for Rényi Differential Privacy, we define some sets of prior/posterior parameters η that arise in our analysis. Definition 8. Normalizable Set E. We say a posterior parameter η is normalizable if C(η) = log R Θ exp (T(θ) · η)) dθ is finite. Let E contain all normalizable η for the conjugate prior family. Definition 9. Let pset(η0, n) be the convex hull of all parameters η of the form η0 + n(S(x), 1) for x ∈X. When n is an integer this represents the hull of possible posterior parameters after observing n data points starting with the prior η0. Definition 10. Let Diff be the difference set for the family, where Diff is the convex hull of all vectors of the form (S(x) −S(y), 0) for x, y ∈X. Definition 11. Two posterior parameters η1 and η2 are neighboring iff η1 −η2 ∈Diff. They are r-neighboring iff η1 −η2 ∈r · Diff. 3.1 Mechanisms and Privacy Guarantees We begin with our simplest mechanism, Direct Sampling, which samples according to the true posterior. This mechanism is presented as Algorithm 1. Algorithm 1 Direct Posterior Require: η0, {x1, . . . , xn} 1: Sample θ ∼p(θ|η′) where η′ = η0 + Pn i=1(S(xi), 1) Even though Algorithm 1 is generally not differentially private [5], Theorem 12 suggests that it offers RDP for ∆-bounded exponential families and certain orders λ. Theorem 12. For a ∆-bounded minimal exponential family of distributions p(x|θ) with continuous log-partition function A(θ), there exists λ∗∈(1, ∞] such Algorithm 1 achieves (λ, ϵ(η0, n, λ))-RDP for λ < λ∗. λ∗is the supremum over all λ such that all η in the set η0 + (λ −1)Diff are normalizable. Corollary 1. For the Beta-Bernoulli system with a prior Beta(α0, β0), Algorithm 1 achieves (λ, ϵ)RDP iff λ > 1 and λ < 1 + min(α0, β0). Notice the implication of Corollary 1: for any η0 and n > 0, there exists finite λ such that direct posterior sampling does not guarantee (λ, ϵ)-RDP for any finite ϵ. This also prevents (ϵ, 0)-DP as an achievable goal. Algorithm 1 is inflexible; it offers us no way to change the privacy guarantee. This motivates us to propose two different modifications to Algorithm 1 that are capable of achieving arbitrary privacy parameters. Algorithm 2 modifies the contribution of the data X to the posterior by introducing a coefficient r, while Algorithm 3 modifies the contribution of the prior η0 by introducing a coefficient m. These simple ideas have shown up before in variations: [18] introduces a temperature 4 Algorithm 2 Diffused Posterior Require: η0, {x1, . . . , xn}, ϵ, λ 1: Find r ∈(0, 1] such that ∀r-neighboring ηP , ηQ ∈pset(η0, rn), Dλ(p(θ|ηP )||p(θ|ηQ)) ≤ϵ 2: Sample θ ∼p(θ|η′) where η′ = η0 + r Pn i=1(S(xi), 1) scaling that acts similarly to r, while [13, 5] analyze concentration constraints for prior distributions much like our coefficient m. Theorem 13. For any ∆-bounded minimal exponential family with prior η0 in the interior of E, any λ > 1, and any ϵ > 0, there exists r∗∈(0, 1] such that using r ∈(0, r∗] in Algorithm 2 will achieve (λ, ϵ)-RDP. Algorithm 3 Concentrated Posterior Require: η0, {x1, . . . , xn}, ϵ, λ 1: Find m ∈(0, 1] such that ∀neighboring ηP , ηQ ∈pset(η0/m, n), Dλ(p(θ|ηP )||p(θ|ηQ)) ≤ϵ 2: Sample θ ∼p(θ|η′) where η′ = η0/m + Pn i=1(S(xi), 1) Theorem 14. For any ∆-bounded minimal exponential family with prior η0 in the interior of E, any λ > 1, and any ϵ > 0, there exists m∗∈(0, 1] such that using m ∈(0, m∗] in Algorithm 3 will achieve (λ, ϵ)-RDP. Theorems 13 and 14 can be interpreted as demonstrating that any RDP privacy level can be achieved by setting r or m arbitrarily close to zero. A small r implies a weak contribution from the data, while a small m implies a strong prior that outweighs the contribution from the data. Setting r = 1 and m = 1 reduces to Algorithm 1, in which a sample is released from the true posterior without any modifications for privacy. We have not yet specified how to find the appropriate values of r or m, and the condition requires checking the supremum of divergences across the possible pset range of parameters arising as posteriors. However, with an additional assumption this supremum of divergences can be efficiently computed. Theorem 15. Let e(ηP , ηQ, λ) = Dλ (p(θ|ηP )||p(θ|ηQ)). For a fixed λ and fixed ηP , the function e is a convex function over ηQ. If for any direction v ∈Diff, the function gv(η) = v⊺∇2C(η)v is convex over η, then for a fixed λ, the function fλ(ηP ) = supηQr−neighboring ηP e(ηP , ηQ, λ) is convex over ηP in the directions spanned by Diff. Corollary 2. The Beta-Bernoulli system satisfies the conditions of Theorem 15 since the functions gv(η) have the form (v(1))2(ψ1(η(1)) + ψ1(η(2) −η(1))), and ψ1 is the digamma function. Both pset and Diff are defined as convex sets. The expression supr−neighboring ηP ,ηQ∈pset(η0,n) Dλ(p(θ|ηP )||p(θ|ηQ)) is therefore equivalent to the maximum of Dλ(p(θ|ηP )||p(θ|ηQ)) where ηP ∈η0 + {(0, n), (n, n)} and ηQ ∈ηP ± (r, 0). The higher dimensional Dirichlet-Categorical system also satsifies the conditions of Theorem 15. This result is located in the appendix. We can do a binary search over (0, 1] to find an appropriate value of r or m. At each candidate value, we only need to consider the boundary situations to evaluate whether this value achieves the desired RDP privacy level. These boundary situations depend on the choice of model, and not the data size n. For example, in the Beta-Bernoulli system, evaluating the supremum involves calculating the Rényi diverengence across at most 4 pairs of distributions, as in Corollary 2. In the d dimensional Dirichlet-Categorical setting, there are O(d3) distribution pairs to evaluate. Eventually, the search process is guaranteed to find a non-zero choice for r or m that achieves the desired privacy level, although the utility optimality of this choice is not guaranteed. If stopped early and none of the tested candidate values satisfy the privacy constraint, the analyst can either continue to iterate or decide not to release anything. 5 Extensions. These methods have convenient privacy implications to the settings where some data is public, such as after a data breach, and for releasing a statistical query. They can also be applied to non-∆-bounded exponential families with some caveats. These additional results are located in the appendix. 4 RDP for Generalized Linear Models with Gaussian Prior In this section, we reinterpret some existing algorithms in [13] in the light of RDP, and use ideas from [13] to provide new RDP algorithms for posterior sampling for a subset of generalized linear models with Gaussian priors. 4.1 Background: Generalized Linear Models (GLMs) The goal of generalized linear models (GLMs) is to predict an outcome y given an input vector x; y is assumed to be generated from a distribution in the exponential family whose mean depends on x through E [y|x] = g−1(w⊤x), where w represents the weight of linear combination of x, and g is called the link function. For example, in logistic regression, the link function g is logit and g−1 is the sigmoid function; and in linear regression, the link functions is the identity function. Learning in GLMs means learning the actual linear combination w. Specifically, the likelihood of y given x can be written as p(y|w, x) = h(y)exp yw⊤x −A(w⊤x) , where x ∈X, y ∈Y, A is the log-partition function, and h(y) the scaling constant. Given a dataset D = {(x1, y1), . . . , (xn, yn)} of n examples with xi ∈X and yi ∈Y, our goal is to learn the parameter w. Let p(D|w) denote p({y1, . . . , yn}|w, {x1, . . . , xn}) = Qn i=1 p(yi|w, xi). We set the prior p(w) as a multivariate Gaussian distribution with covariance Σ = (nβ)−1I, i.e., p(w) ∼N(0, (nβ)−1I). The posterior distribution of w given D can be written as p(w|D) = p(D|w)p(w) R Rd p(D|w′)p(w′)dw′ ∝exp −nβ∥w∥2 2 n Y i=1 p(yi|w, xi). (6) 4.2 Mechanisms and Privacy Guarantees First, we introduce some assumptions that characterize the subset of GLMs and the corresponding training data on which RDP can be guaranteed. Assumption 1. (1). X is a bounded domain such that ∥x∥2 ≤c for all x ∈X, and xi ∈X for all (xi, yi) ∈D. (2). Y is a bounded domain such that Y ⊆[ymin, ymax], and yi ∈Y for all (xi, yi) ∈D.. (3). g−1 has bounded range such that g−1 ∈[γmin, γmax]. Then, let B = max{|ymin −γmax|, |ymax −γmin|}. Example: Binary Regression with Bounded X Binary regression is used in the case where y takes value Y = {0, 1}. There are three common types of binary regression, logistic regression with g−1(w⊤x) = 1/(1 + exp −w⊤x ), probit regression with g−1(w⊤x) = Φ(w⊤x) where Φ is the Gaussian cdf, and complementary log-log regression with g−1(w⊤x) = 1 −exp −exp w⊤x . In these three cases, Y = {0, 1}, g−1 has range (0, 1) and thus B = 1. Moreover, it is often assumed for binary regression that any example lies in a bounded domain, i.e., ∥x∥2 ≤c for x ∈X. Now we establish the privacy guarantee for sampling directly from the posterior in (6) in Theorem 17. We also show that this privacy bound is tight for logistic regression; a detailed analysis is in Appendix. Theorem 16. Suppose we are given a GLM and a dataset D of size n that satisfies Assumption 1, and a Gaussian prior with covariance Σ = (nβ)−1I, then sampling with posterior in (6) satisfies (λ, 2c2B2 nβ λ)-RDP for all λ ≥1. Notice that direct posterior sampling cannot achieve (λ, ϵ)-RDP for arbitrary λ and ϵ. We next present Algorithm 4 and 5, as analogous to Algorithm 3 and 2 for exponential family respectively, that guarantee any given RDP requirement. Algorithm 4 achieves a given RDP level by setting a stronger prior, while Algorithm 5 by raising the temperature of the likelihood. 6 Algorithm 4 Concentrated Posterior Require: Dataset D of size n; Gaussian prior with covariance (nβ0)−1I; (λ, ϵ). 1: Set β = max{ 2c2B2λ nϵ , β0} in (6). 2: Sample w ∼p(w|D) in (6). Algorithm 5 Diffuse Posterior Require: Dataset D of size n; Gaussian prior with covariance (nβ)−1I; (λ, ϵ). 1: Replace p(yi|w, xi) with p(yi|w, xi)ρ in (6) where ρ = min{1, q ϵnβ 2c2B2λ}. 2: Sample w ∼p(w|D) in (6). It follows directly from Theorem 17 that under Assumption 1, Algorithm 4 satisfies (λ, ϵ)-RDP. Theorem 17. Suppose we are given a GLM and a dataset D of size n that satisfies Assumption 1, and a Gaussian prior with covariance Σ = (nβ)−1I, then Algorithm 5 guarantees (λ, ϵ)-RDP. In fact, it guarantees (˜λ, ϵ λ ˜λ)-RDP for any ˜λ ≥1. 5 Experiments In this section, we present the experimental results for our proposed algorithms for both exponential family and GLMs. Our experimental design focuses on two goals – first, analyzing the relationship between λ and ϵ in our privacy guarantees and second, exploring the privacy-utility trade-off of our proposed methods in relation to existing methods. 5.1 Synthetic Data: Beta-Bernoulli Sampling Experiments In this section, we consider posterior sampling in the Beta-Bernoulli system. We compare three algorithms. As a baseline, we select a modified version of the algorithm in [10], which privatizes the sufficient statistic of the data to create a privatized posterior. Instead of Laplace noise that is used by[10], we use Gaussian noise to do the privatization; [14] shows that if Gaussian noise with variance σ2 is added, then this offers an RDP guarantee of (λ, λ ∆2 σ2 ) for ∆-bounded exponential families. We also consider the two algorithms presented in Section 3.1 – Algorithm 2 and 3; observe that Algorithm 1 is a special case of both. 500 iterations of binary search were used to select r and m when needed. Achievable Privacy Levels. We plot the (λ, ϵ)-RDP parameters achieved by Algorithms 2 and 3 for a few values of r and m. These parameters are plotted for a prior η0 = (6, 18) and the data size n = 100 which are selected arbitrarily for illustrative purposes. We plot over six values {0.1, 0.3, 0.5, 0.7, 0.9, 1} of the scaling constants r and m. The results are presented in Figure 1. Our primary observation is the presence of the vertical asymptotes for our proposed methods. Recall that any privacy level is achievable with our algorithms given small enough r or m; these plots demonstrate the interaction of λ and ϵ. As r and m decrease, the ϵ guarantees improve at each λ and even become finite at larger orders λ, but a vertical asymptote still exists. The results for the baseline are not plotted: it achieves RDP along any line of positive slope passing through the origin. Privacy-Utility Tradeoff. We next evaluate the privacy-utility tradeoff of the algorithms by plotting KL(P||A) as a function of ϵ with λ fixed, where P is the true posterior and A is the output distribution of a mechanism. For Algorithms 2 and 3, the KL divergence can be evaluated in closed form. For the Gaussian mechanism, numerical integration was used to evaluate the KL divergence integral. We have arbitrarily chosen η0 = (6, 18) and data set X with 100 total trials and 38 successful trials. We have plotted the resulting divergences over a range of ϵ for λ = 2 in (a) and for λ = 15 in (b) of Figure 2. When λ = 2 < λ∗, both Algorithms 2 and 3 reach zero KL divergence once direct sampling is possible. The Gaussian mechanism must always add nonzero noise. As ϵ →0, Algorithm 3 approaches a point mass distribution heavily penalized by the KL divergence. Due to its projection step, the Gaussian Mechanism follows a bimodal distribution as ϵ →0. Algorithm 2 degrades to the prior, with modest KL divergence. When λ = 15 > λ∗, the divergences for Algorithms 2 and 3 are bounded away from 0, while the Gaussian mechanism still approaches the truth as ϵ →∞. In a non-private setting, the KL divergence would be zero. Finally, we plot log p(XH|θ) as a function of ϵ, where θ comes from one of the mechanisms applied to X. Both X and XH consist of 100 Bernoulli trials with proportion parameter ρ = 0.5. This 7 0 5 10 15 20 0 0.5 1 1.5 2 r = 0.1 r = 0.3 r = 0.5 r = 0.7 r = 0.9 direct posterior (a) Algorithm 2 0 5 10 15 20 0 0.5 1 1.5 2 m = 0.1 m = 0.3 m = 0.5 m = 0.7 m = 0.9 direct posterior (b) Algorithm 3 Figure 1: Illustration of Potential (λ, ϵ)-RDP Curves for Exponential Family Sampling. -10 -5 0 KL divergence 0 0.2 0.4 0.6 Alg. 2 Alg. 3 Gauss.Mech. (a) KL: λ = 2 < λ∗ -10 -5 0 KL divergence 0 0.2 0.4 0.6 Alg. 2 Alg. 3 Gauss.Mech. (b) KL: λ = 15 > λ∗ -15 -10 -5 0 - log-likelihood 0 10 20 30 40 50 60 70 Alg. 2 Alg. 3 Gauss.Mech. True Post. (c) −log p(XH): λ = 2 -15 -10 -5 0 - log-likelihood 0 10 20 30 40 50 60 70 Alg. 2 Alg. 3 Gauss.Mech. True Post. (d) −log p(XH): λ = 15 Figure 2: Exponential Family Synthetic Data Experiments. experiment was run 10000 times, and we report the mean and standard deviation. Similar to the previous section, we have a fixed prior of η0 = (6, 18). The results are shown for λ = 2 in (c) and for λ = 15 in (d) of 2. These results agree with the limit behaviors in the KL test. This experiment is more favorable for Algorithm 3, as it degrades only to the log likelihood under the mode of the prior. In this plot, we have included sampling from the true posterior as a non-private baseline. 5.2 Real Data: Bayesian Logistic Regression Experiments We now experiment with Bayesian logistic regression with Gaussian prior on three real datasets. We consider three algorithms – Algorithm 4 and 5, as well as the OPS algorithm proposed in [18] as a sanity check. OPS achieves pure differential privacy when the posterior has bounded support; for this algorithm, we thus truncate the Gaussian prior to make its support the L2 ball of radius c/β, which is the smallest data-independent ball guaranteed to contain the MAP classifier. Achievable Privacy Levels. We consider the achievable RDP guarantees for our algorithms and OPS under the same set of parameters β, c, ρ and B = 1. [18] shows that with the truncated prior, OPS guarantees 4c2ρ β -differential privacy, which implies (λ, 4c2ρ β )-RDP for all λ ∈[1, ∞]; whereas our algorithm guarantees (λ, 2c2ρ2 nβ λ)-RDP for all λ ≥1. Therefore our algorithm achieves better RDP guarantees at λ ≤2n ρ , which is quite high in practice as n is the dataset size. Privacy-Utility: Test Log-Likelihood and Error. We conduct Bayesian logistic regression on three real datasets: Abalone, Adult and MNIST. We perform binary classification tasks: abalones with less than 10 rings vs. the rest for Abalone, digit 3 vs. digit 8 for MNIST, and income ≤50K vs. > 50K for Adult. We encode all categorical features with one-hot encoding, resulting in 9 dimensions for Abalone, 100 dimensions for Adult and 784 dimensions in MNIST. We then scale each feature to range from [−0.5, 0.5], and normalize each example to norm 1. 1/3 of the each dataset is used for testing, and the rest for training. Abalone has 2784 training and 1393 test samples, Adult has 32561 and 16281, and MNIST has 7988 and 3994 respectively. For all algorithms, we use an original Gaussian prior with β = 10−3. The posterior sampling is done using slice sampling with 1000 burn-in samples. Notice that slice sampling does not give samples from the exact posterior. However, a number of MCMC methods are known to converge in total variational distance in time polynomial in the data dimension for log-concave posteriors (which is the case here) [17]. Thus, provided that the burn-in period is long enough, we expect the induced 8 -4 -2 0 2 0.3 0.4 0.5 0.6 Test error Concentrated Diffuse OPS True Posterior -4 -2 0 2 0.2 0.3 0.4 0.5 Test error Concentrated Diffuse OPS True Posterior -4 -2 0 2 0.1 0.2 0.3 0.4 0.5 Test error Concentrated Diffuse OPS True Posterior -4 -2 0 2 0.3 0.4 0.5 0.6 Test error Concentrated Diffuse OPS True Posterior -4 -2 0 2 0.2 0.3 0.4 0.5 Test error Concentrated Diffuse OPS True Posterior -4 -2 0 2 0.1 0.2 0.3 0.4 0.5 Test error Concentrated Diffuse OPS True Posterior -4 -2 0 2 0.3 0.4 0.5 0.6 Test error Concentrated Diffuse OPS True Posterior (a) Abalone. -4 -2 0 2 0.2 0.3 0.4 0.5 Test error Concentrated Diffuse OPS True Posterior (b) Adult. -4 -2 0 2 0.1 0.2 0.3 0.4 0.5 Test error Concentrated Diffuse OPS True Posterior (c) MNIST 3vs8. Figure 3: Test error vs. privacy parameter ϵ. λ = 1, 10, 100 from top to bottom. distribution to be quite close, and we leave an exact RDP analysis of the MCMC sampling as future work. For privacy parameters, we set λ = 1, 10, 100 and ϵ ∈{e−5, e−4, . . . , e3}. Figure 3 shows the test error averaged over 50 repeated runs. More experiments for test log-likelihood presented in the Appendix. We see that both Algorithm 4 and 5 achieve lower test error than OPS at all privacy levels and across all datasets. This is to be expected, since OPS guarantees pure differential privacy which is stronger than RDP. Comparing Algorithm 4 and 5, we can see that the latter always achieves better utility. 6 Conclusion The inherent randomness of posterior sampling and the mitigating influence of a prior can be made to offer a wide range of privacy guarantees. Our proposed methods outperform existing methods in specific situations. The privacy analyses of the mechanisms fit nicely into the recently introduced RDP framework, which continues to present itself as a relaxation of DP worthy of further investigation. Acknowledgements This work was partially supported by NSF under IIS 1253942, ONR under N00014-16-1-2616, and a Google Faculty Research Award. References [1] M. Bun, K. Nissim, U. Stemmer, and S. Vadhan. Differentially private release and learning of threshold functions. In Foundations of Computer Science (FOCS), 2015 IEEE 56th Annual Symposium on, pages 634–649. IEEE, 2015. [2] M. Bun and T. Steinke. Concentrated differential privacy: Simplifications, extensions, and lower bounds. In Theory of Cryptography Conference, pages 635–658. Springer, 2016. 9 [3] K. Chaudhuri, D. Hsu, and S. Song. The large margin mechanism for differentially private maximization. In Neural Inf. Processing Systems, 2014. [4] K. Chaudhuri and N. Mishra. When random sampling preserves privacy. In Annual International Cryptology Conference, pages 198–213. Springer, 2006. [5] C. Dimitrakakis, B. Nelson, A. Mitrokotsa, and B. I. Rubinstein. Robust and private Bayesian inference. In International Conference on Algorithmic Learning Theory, pages 291–305. Springer, 2014. [6] C. Dwork, K. Kenthapadi, F. McSherry, I. Mironov, and M. Naor. Our data, ourselves: Privacy via distributed noise generation. In Annual International Conference on the Theory and Applications of Cryptographic Techniques, pages 486–503. Springer, 2006. [7] C. Dwork and J. Lei. Differential privacy and robust statistics. In Proceedings of the forty-first annual ACM symposium on Theory of computing, pages 371–380. ACM, 2009. [8] C. Dwork, A. Roth, et al. The algorithmic foundations of differential privacy, volume 9. Now Publishers, Inc., 2014. [9] C. Dwork and G. N. Rothblum. Concentrated differential privacy. arXiv preprint arXiv:1603.01887, 2016. [10] J. Foulds, J. Geumlek, M. Welling, and K. Chaudhuri. On the theory and practice of privacy-preserving Bayesian data analysis. In Proceedings of the 32nd Conference on Uncertainty in Artificial Intelligence (UAI), 2016. [11] A. Machanavajjhala, D. Kifer, J. Abowd, J. Gehrke, and L. Vilhuber. Privacy: Theory meets practice on the map. In Data Engineering, 2008. ICDE 2008. IEEE 24th International Conference on, pages 277–286. IEEE, 2008. [12] F. McSherry. How many secrets do you have? https://github.com/frankmcsherry/blog/blob/ master/posts/2017-02-08.md, 2017. [13] K. Minami, H. Arai, I. Sato, and H. Nakagawa. Differential privacy without sensitivity. In Advances in Neural Information Processing Systems, pages 956–964, 2016. [14] I. Mironov. Rényi differential privacy. In Proceedings of IEEE 30th Computer Security Foundations Symposium CSF 2017, pages 263–275. IEEE, 2017. [15] A. D. Sarwate and K. Chaudhuri. Signal processing and machine learning with differential privacy: Algorithms and challenges for continuous data. IEEE signal processing magazine, 30(5):86–94, 2013. [16] A. G. Thakurta and A. Smith. Differentially private feature selection via stability arguments, and the robustness of the lasso. In Conference on Learning Theory, pages 819–850, 2013. [17] S. Vempala. Geometric random walks: a survey. Combinatorial and computational geometry, 52(573612):2, 2005. [18] Y.-X. Wang, S. E. Fienberg, and A. Smola. Privacy for free: Posterior sampling and stochastic gradient Monte Carlo. Proceedings of The 32nd International Conference on Machine Learning (ICML), pages 2493––2502, 2015. [19] Y.-X. Wang, J. Lei, and S. E. Fienberg. On-average kl-privacy and its equivalence to generalization for max-entropy mechanisms. In International Conference on Privacy in Statistical Databases, pages 121–134. Springer, 2016. [20] Z. Zhang, B. Rubinstein, and C. Dimitrakakis. On the differential privacy of Bayesian inference. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence (AAAI), 2016. 10 | 2017 | 228 |
6,706 | Variable Importance using Decision Trees S. Jalil Kazemitabar UCLA sjalilk@ucla.edu Arash A. Amini UCLA aaamini@ucla.edu Adam Bloniarz UC Berkeley∗ adam@stat.berkeley.edu Ameet Talwalkar CMU talwalkar@cmu.edu Abstract Decision trees and random forests are well established models that not only offer good predictive performance, but also provide rich feature importance information. While practitioners often employ variable importance methods that rely on this impurity-based information, these methods remain poorly characterized from a theoretical perspective. We provide novel insights into the performance of these methods by deriving finite sample performance guarantees in a high-dimensional setting under various modeling assumptions. We further demonstrate the effectiveness of these impurity-based methods via an extensive set of simulations. 1 Introduction Known for their accuracy and robustness, decision trees and random forests have long been a workhorse in machine learning [1]. In addition to their strong predictive accuracy, they are equipped with measures of variable importance that are widely used in applications where model interpretability is paramount. Importance scores are used for model selection: predictors with high-ranking scores may be chosen for further investigation, or for building a more parsimonious model. One common approach naturally couples the model training process with feature selection [2, 5]. This approach, which we call TREEWEIGHT, calculates the feature importance score for a variable by summing the impurity reductions over all nodes in the tree where a split was made on that variable, with impurity reductions weighted to account for the size of the node. For ensembles, these quantities are averaged over constituent trees. TREEWEIGHT is particularly attractive because it can be calculated without any additional computational expense above the standard training procedure. However, as the training procedure in random forests combines several complex ingredients—bagging, random selection of predictor subsets at nodes, line search for optimal impurity reduction, recursive partitioning—theoretical investigation into TREEWEIGHT is extremely challenging. We propose a new method called DSTUMP that is inspired by TREEWEIGHT but is more amenable to analysis. DSTUMP assigns variable importance as the impurity reduction at the root node of a single tree. In this work we characterize the finite sample performance of DSTUMP under an additive regression model, which also yields novel results for variable selection under a linear model, both with correlated and uncorrelated design. We corroborate our theoretical analyses with extensive simulations in which we evaluate DSTUMP and TREEWEIGHT on the task of feature selection under various modeling assumptions. We also compare the performance of these techniques against established methods whose behaviors have been theoretically characterized, including Lasso, SIS, and SpAM [12, 3, 9]. ∗Now at Google 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Our work provides the first finite-sample high-dimensional analyses of tree-based variable selection techniques, which are commonly used in practice but lacking in theoretical grounding. Although we focus on DSTUMP, which is a relatively simple tree-based variable selection approach, our novel proof techniques are highly non-trivial and suggest a path forward for studying more general multi-level tree-based techniques such as TREEWEIGHT. Moreover, our simulations demonstrate that such algorithmic generalizations exhibit impressive performance relative to competing methods under more realistic models, e.g., non-linear models with interaction terms and correlated design. 2 Related Work Our analysis is distinct from existing work in analyzing variable importance measures of trees and forests in several ways. To our knowledge, ours is the first analysis to consider the high-dimensional setting, where the number of variables, p, and the size of the active set s, grow with the sample size n, and potentially p ≫n. The closest related work is the analysis of [8], which considers a fixed set of variables, in the limit of infinite data (n = ∞). Unlike DSTUMP’s use of the root node only, [8] does consider importance scores derived from the full set of splits in a tree as in TREEWEIGHT. However, they make crucial simplifying (and unrealistic) assumptions that are distinct from those of our analysis: (1) each variable is split on only once in any given path from the root to a leaf of the tree; (2) at each node a variable is picked uniformly at random among those not yet used at the parent nodes, i.e., the splits themselves are not driven by impurity reduction; and (3) all predictors are categorical, with splits being made on all possible levels of a variable, i.e., the number of child nodes equals the cardinality of the variable being split. Our analysis instead considers continuous-valued predictors, the split is based on actual impurity reduction, and our results are nonasymptotic, i.e. they give high-probability bounds on impurity measures for active and inactive variables that hold in finite samples. A second line of related work is motivated by a permutation-based importance method [1] for feature selection. In practice, this method is computationally expensive as it determines variable importance by comparing the predictive accuracy of a forest before and after random permutation of a predictor. Additionally, due to the algorithmic complexity of the procedure, it is not immediately amenable to theoretical analysis, though the asymptotic properties of a simplified variant of the procedure have been studied in [6]. While our work is the first investigation of finite-sample model selection performance of tree-based regression methods, alternative methods performing both linear and nonparametric regression in high dimensions have been studied in the literature. Considering model selection consistency results, most of the attention has been focused on the linear setting, whereas the nonparametric (nonlinear) setup has been mostly studied in terms of the prediction consistency. Under a high-dimensional linear regression model, LASSO has be extensively studied and is shown to be minimax optimal for variable selection under appropriate regularity conditions, including the uncorrelated design with a moderate βmin condition. Remarkably, while not tailored to the linear setting, we show that DSTUMP is nearly minimax optimal for variable selection in the same uncorrelated design setting (cf. Corollary 1). In fact, DSTUMP can be considered a nonlinear version of SIS [4], itself a simplified form of the LASSO when one ignores correlation among features (cf. Section 3 for more details). The Rodeo framework [7] performs automatic bandwidth selection and variable selection for local linear smoothers, and is tailored to a more general nonparametric model with arbitrary interactions. It was shown to possess model selection consistency in high dimensions; however, the results are asymptotic and focus on achieving optimal prediction rate. In particular, there is no clear βmin threshold as a function of n, s, and p. RODEO is also computationally burdensome for even modestsized problems (we thus omit it our experimental results in Section 4). Among the nonlinear methods, SPAM is perhaps the most well-understood in terms of model selection properties. Under a general high-dimensional sparse additive model, SPAM possesses the sparsistency property (a term for model selection consistency); the analysis is reduced to a linear setting by considering expansions in basis functions, and selection consistency is proved under an irrepresentible condition on the coefficients in those bases. We show that DSTUMP is model selection consistent in the sparse additive model with uncorrelated design. Compared to SPAM results, our conditions are stated directly in terms of underlying functions and are not tied to a particular basis; 2 hence our proof technique is quite different. There is no implicit reduction to a linear setting via basis expansions. Empirically, we show that DSTUMP indeed succeeds in the settings our theory predicts. 3 Selection consistency The general model selection problem for non-parametric regression can be stated as follows: we observe noisy samples yi = f(xi1, . . . , xip) + wi, i = 1, . . . , n where {wi} is an i.i.d. noise sequence. Here, p is the total number of features (or covariates) and n is the total number of observations (or the sample size). In general, f belongs to a class F of functions from Rp →R. One further assumes that the functions in F depend on at most s of the features, usually with s ≪p. That is, for every f ∈F, there is some f0 : Rs →R and a subset S ⊂[p] with |S| ≤s such that f(z1, . . . , zp) = f0(zS) where zS = (zi, i ∈S). The subset S, i.e., the set of active features, is unknown in advance and the goal of model selection is to recover it given {(yi, xi)}n i=1. The problem is especially challenging in the high-dimensional setting where p ≫n. We will consider various special cases of this general model when we analyze DSTUMP. For theoretical analysis it is common to assume s to be known and we will make this assumption throughout. In practice, one often considers s to be a tunable parameter that can be selected, e.g., via cross-validation or greedy forward selection. We characterize the model selection performance of DSTUMP by establishing its sample complexity: that is, the scaling of n, p, and s that is sufficient to guarantee that DSTUMP identifies the active set of features with probability converging to 1. Our general results, proved in the technical report, allow for a correlated design matrix and additive nonlinearities in the true regression function. Our results for the linear case, derived as a special case of the general theory, allow us to compare the performance of DSTUMP to the information theoretic limits for sample complexity established in [11], and to the performance of existing methods more tailored to this setting, such as the Lasso [12]. Given a generative model and the restriction of DSTUMP to using root-level impurity reduction, the general thrust of our result is straightforward: impurity reduction due to active variables concentrates at a significantly higher level than that of inactive variables. However, there are significant technical challenges in establishing this result, mainly deriving from the fact that the splitting procedure renders the data in the child nodes non-i.i.d., and hence standard concentration inequalities do not immediately apply. We leverage the fact that the DSTUMP procedure considers splits at the median of a predictor. Given this median point, the data in each child node is i.i.d., and hence we can apply standard concentration inequalities in this conditional distribution. Removing this conditioning presents an additional technical subtlety. For ease of exposition, we first present our results for the linear setting in Section 3.1, and subsequently summarize our general results in Section 3.2. We provide a proof of our result in the linear setting in Section 3.3, and defer the proof of our general result to the supplementary material. Algorithm 1 DSTUMP input {xk ∈Rn}k=p k=1, y ∈Rn, # top features s m = n 2 for k = 1, . . . , p do I(xk) = SortFeatureValues(xk) yk = SortLabelByFeature(y, I(xk)) yk [m], yk [n]\[m] = SplitAtMidpoint(yk) ik = ComputeImpurity(yk [m], yk [n]\[m]) end for S = FindTopImpurityReductions({ik}, s) output top s features sorted by impurity reduction The DSTUMP algorithm. In order to describe DSTUMP more precisely, let us introduce some notation. We write [n] := {1, . . . , n}. Throughout, y = (yi, i ∈[n]) ∈Rn will be the response vector observed for a sample of size n. For an ordered index set I = (i1, i2, . . . , ir), we set yI = (yi1, yi2 . . . , yir). A similar notation is used for unordered index sets. We write xj = (x1j, x2j, . . . , xnj) ∈Rn for the vector collecting values of the jth feature; xj forms the jth column of the design matrix X ∈Rn×p. Let I(xj) := (i1, i2 . . . , in) be an ordering of [n] such that xi1j ≤xi2j ≤· · · ≤xinj and let sor(y, xj) := yI(xj) ∈Rn; this is an operator that sorts y relative to xj. DSTUMP proceeds as follows: Evaluate yk := sor(y, xk) = sor P j∈S βjxj + w, xk , for k = 1, . . . , p. Let m := n/2. For each k, consider the midpoint split of yk into yk [m] and yk [n]\[m] and evaluate the impurity of the 3 left-half, using empirical variance as impurity: imp(yk [m]) := 1 m 2 X 1≤i<j≤m 1 2(yk i −yk j )2. (1) Let imp(yk [m]) be the score of feature k, and output the s features with the smallest scores (corresponding to maximal reduction in impurity). If the generative model is linear, the choice of the midpoint is justified by our assumption of the uniform distribution for the features (Zi), and we further show that this simple choice is effective even under a nonlinear model. The choice of the left-half in our analysis is for convenience; a similar analysis applies if we take the impurity to be that of the sum of both halves (or their maximum). DSTUMP is summarized in Algorithm 1. Impurity reduction imp(y[m]) −imp(yk [m]) can be considered a form of nonlinear correlation between y and feature xk. The SIS algorithm is equivalent to replacing this nonlinear correlation with the (absolute) linear correlation | 1 nxT k y|. That is, both procedures assign a score to each feature by considering it against the response separately, ignoring other features. In the uncorrelated (i.e. orthogonal design) setting, this is more or less optimal, and as is the case with SIS, we show that DSTUMP also retains some model selection performance even under correlated designs. In contrast to SIS, we show that DSTUMP also enjoys performance guarantees in non-linear settings. The models. We present our consistency results for models of various complexity. We start with the well-known and extensively studied setting of a linear model with IID design. This basic setup serves as the benchmark for comparison of model selection procedures. As will become clear in the course of the proof, analyzing DSTUMP (or impurity-based feature selection in general) is challenging even in this case, in contrast to linear model based approaches such as SIS or Lasso. Once we have a good understanding of DSTUMP under the baseline model, we extend the analysis to correlated design and nonlinear additive models. The structure of our proof is also most clearly seen in this simple case, as outlined in Section 3.3. We now introduce our general models: Model 1 (Sparse linear model with ICA-type design). A linear regression model y = Xβ + w with ICA-type (random) design X ∈Rn×p has the following properties: (i) X = e XM where e X ∈Rn×p and each row of e X is an independent draw from a (column) vector Z = (Z1, . . . , Zp) with IID entries drawn uniformly from [0, 1]. (ii) The noise vector w = (w1, . . . , wn) has IID sub-Gaussian entries with variance with variance var(wi) = v2 w and sub-Gaussian norm ∥wi∥ψ2 ≤σw, . (iii) The β ∈Rp is s-sparse, namely, βj ̸= 0 for j ∈S = {1, . . . , s} and zero otherwise. Model 1 serves both the correlated and uncorrelated design cases. Each row of the design matrix X is a draw from the vector M T Z, which has covariance c M T M for some constant c. Thus, the choice of M = I leads to an uncorrelated design. The choice of the interval [0, 1] for covariates is for convenience; it can be replaced with any other compact interval, in the linear setting, since variance impurity is invariant to a shift. Similarly the choice of the (active) support indices, S, is for convenience. For simplicity, we often assume v2 w = σ2 and σw ≤Cσ (only σw would affect the results as examining of our proofs shows). Model 2 (Sparse additive model with uncorrelated design). An additive regression model yi = Pp j=1 fj(xij) + wi, is one with random design X = (xij) and the noise (wi) as in Model 1, with M = I (uncorrelated design). We assume (fk) to be s-sparse, namely, fj ̸= 0 for j ∈S = {1, . . . , s} and zero otherwise. 3.1 Linear Setting Uncorrelated design. Our baseline result is the following feature selection consistency guarantee for DSTUMP, for the case M = I of Model 1. Throughout, we let ˇp := p−s, and C, C1, . . . , c, c1, . . . are absolute positive constants which can be different in each occurrence. For any vector x, let |x|min := mini |xi|, the minimum absolute value of its entries. The quantity |βS|2 min = mink ∈S β2 k appearing in Theorem 1 is a well-known parameter controlling hardness of subset recovery. All our results are stated in terms of constants δ, α and ξ that are related as: δ ∈(0, 1/8), α = log(1/(8δ)), ξ = 1 −(1 −δ)2. (2) 4 Theorem 1. Assume Model 1 with M = I, and (2). The DSTUMP algorithm, which selects the “s” least impure features at the root, succeeds in feature selection, with probability at least 1 −ˇp−c −2e−αn/2 if log ˇp/n ≤C1 and |βS|2 min ≥C ξ (∥β∥2 2 + σ2) r log ˇp n (3) The result can be read by setting, e.g., δ = 1/16 leading to numerical constants for α and ξ. The current form allows the flexibility to trade-off the constant (α) in the probability bound with the constant (ξ) in the gap condition (3). Although Theorem 1 applies to a general β, it is worthwhile to see its consequence in a special regime of interest where |βS|2 min ≍1/s, corresponding to ∥β∥2 ≍1. We get the following immediate corollary: Corollary 1. Assume |βS|2 min ≍1/s, σ2 ≍1 and log ˇp/n = O(1). Then DSTUMP succeeds with high probability if n ≳s2 log ˇp. The minimax optimal threshold for support recovery in the regime of Corollary 1 is known to be n ≍s log ˇp [11], and achieved by LASSO [12]. Although this result is obtained for Gaussian design, the same argument goes through for our uniform ensemble. Compared to the optimal threshold, using DSTUMP we pay a small factor of s in the sample complexity. However, DSTUMP is not tied to the linear model and as we discuss in Section 3.2, we can generalize the performance of DSTUMP to nonlinear settings. Correlated design. We take the following approach to generalize our result to the correlated case: (1) We show a version of Theorem 1, which holds for an “approximately sparse” parameter eβ with uncorrelated design. (2) We derive conditions on M such that the correlated case can be turned into the uncorrelated case with approximate sparsity. The following theorem details Step 1: Theorem 2. Assume Model 1(i)-(ii) with M = I, but instead of (iii) let β = eβ, a general vector in Rp. Let S be any subset of [p] of cardinality s. The DSTUMP algorithm, which selects the “s” least impure features at the root, recovers S, with probability at least 1 −ˇp−c −2e−αn/2 if log ˇp/n ≤C1 and ξ|eβS|2 min −∥eβSc∥2 ∞> C(∥eβ∥2 2 + σ2) p (log ˇp)/n. The theorem holds for any eβ and S, but the gap condition required is likely to be violated unless eβ is approximately sparse w.r.t. S. Going back to Model 1, we see that setting eβ = Mβ transforms the model with correlated design X, and exact sparsity on β, to the model with uncorrelated design e X, and approximate sparsity on eβ. The following corollary gives sufficient conditions on M, so that Theorem 2 is applicable. Recall the usual (vector) ℓ∞norm, ∥x∥∞= maxi |xi|, the matrix ℓ∞→ℓ∞operator norm |||A|||∞= maxi P j |Aij| , and the ℓ2 →ℓ2 operator norm |||A|||2. Corollary 2. Consider a general ICA-type Model 1 with β and M satisfying ∥βS∥∞≤γ|βS|min, |||MSS −I|||∞≤1 −ρ γ , |||MScS|||∞≤ρ γ p ξ(1 −κ) (4) for some ρ, κ ∈(0, 1] and γ ≥1. Then, the conclusion of Theorem 1 holds, for DSTUMP applied to input (y, e X), under the gap condition (3) with C/ξ replaced with C|||MSS|||2 2/(κ ξ ρ2). Access to decorrelated features, e X, is reasonable in cases where one can perform consistent ICA. This assumption is practically plausible, especially in the low-dimensional regimes, though it would be desirable if this assumption can be removed theoretically. Moreover, we note that the response y is based on the correlated features. In this result, C|||MSS|||2 2/(κ ξ ρ2) plays the role of a new constant. There is a hard bound on how big ξ can be, which via (4) controls how much correlation between off-support and on-support features are tolerated. For example, taking δ = 1/9, we have α = log(9/8) ≈0.1, ξ = 17/81 ≈0.2 and √ξ ≈0.45 and this is about as big as it can get (the maximum we can allow is ≈0.48). κ can be arbitrarily close to 0, relaxing the assumption (4), at the expense of increasing the constant in the threshold. γ controls deviation of |βj|, j ∈S from uniform: in case of equal weights on the support, i.e., |βj| = 1/√s for j ∈S, we have γ = 1. Theorem 1 for the uncorrelated design is recovered, by taking ρ = κ = 1. 5 3.2 General Additive Model Setting To prove results in this more general setting, we need some further regularity conditions on (fk): Fix some δ ∈(0, 1), let U ∼unif(0, 1) and assume the following about the underlying functions (fk): (F1) ∥fk(αU)∥2 ψ2 ≤σ2 f,k, ∀α ∈[0, 1]. (F2) var[fk(αU)] ≤var[fk((1 −δ)U)], ∀α ≤1 −δ. Next, we define σ2 f,∗:= Pp k=1 σ2 f,k = P k∈S σ2 f,k along with the following key gap quantities: gf,k(δ) := var[fk(U))] −var[fk((1 −δ)U)]. Theorem 3. Assume additive Model 2 with (F1) and (F2). Let α = log 1 8δ for δ ∈(0, 1/8). The DSTUMP algorithm, which selects the “s” least impure features at the root, succeeds in model selection, with probability at least 1 −ˇp−c −2e−αn/2 if log ˇp/n ≤C1 and min k ∈S gf,k(δ) ≥C(σ2 f,∗+ σ2) r log ˇp n (5) In the supplementary material, we explore in detail the class of functions that satisfy conditions (F1) and (F2), as well as the gap condition in (5). (F1) is relatively mild and satisfied if f is Lipschitz or bounded. (F2) is more stringent and we show that it is satisfied for convex nondecreasing and concave nonincreasing functions.2 The gap condition is less restrictive than (F2) and is related to the slope of the function near the endpoint, i.e., x = 1. Notably, we study one such function that satisfies all of these conditions, i.e., exp(·) on [−1, 1], in our simulations in Section 4. 3.3 Proof of Theorem 1 We provide the high-level proof of Theorem 1. For brevity, the proofs of the lemmas have been omitted and can be found in the supplement, where we in fact prove them for the more general setup of Theorem 3. The analysis boils down to understanding the behavior of yk = sor(y, xk) as defined earlier. Let eyk be obtained from yk by random reshuffling of its left half yk [m] (i.e., rearranging the entries according to a random permutation). This reshuffling has no effect on the impurity, that is, imp(eyk [m]) = imp(yk [m]), and the reason for it becomes clear when we analyze the case k ∈S. Understanding the distribution of yk. If k /∈S, the ordering according to which we sort y is independent of y (since xk is independent of y), hence the sorted version, before and after reshuffling has the same distribution as y. Thus, each entry of eyk is an IID draw from the same distribution as the pre-sort version: eyk i iid ∼W0 := X j∈S βjZj + w1, i = 1, . . . , n. (6) On the other hand, if k ∈S, then for i = 1, . . . , n yk i = βkx(i)k + rk i , where rk i iid ∼Wk := X j∈S\{k} βjZj + w1. Here x(i)k is the ith order statistic of xk, that is, x(1)k ≤x(2)k ≤· · · ≤x(n)k. Note that the residual terms are still IID since they gather the covariates (and the noise) that are independent of the kth one and hence its ordering. Note also that rk i is independent of the first term βkx(i)k. Recall that we split at the midpoint and focus on the left split, i.e., we look at yk [n/2] = (yk 1, yk 2, . . . , yk n/2), and its reshuffled version eyk [n/2] = (eyk 1, eyk 2, . . . , eyk n/2). Intuitively, we would like to claim that the “signal part” of the eyk [n/2] are approximately IID draws from βkUnif(0, 1/2). Unfortunately this is not true, in the sense that the distribution cannot be accurately approximated by Unif(0, 1 −δ) for any δ (Lemma 1). However, we show that the distribution can be approximated by an infinite mixture of IID uniforms of reduced range (Lemma 2). Let U(1) ≤U(2) ≤· · · ≤U(n) be the order statistics obtained by ordering an IID sample Ui ∼ Unif(0, 1), i = 1, . . . , n. Recall that m := n/2 and let eU := (eU1, eU2 . . . , eUm) be obtained from 2We also observe that this condition holds for functions beyond these two categories. 6 (U(1), . . . , U(m)) by random permutation. Then, eU has an exchangeable distribution. We can write for k ∈S, eyk i = βk euk i + erk i , euk ∼eU, and erk i iid ∼Wk, i ∈[m] where the m-vectors euk = (euk i , i ∈[m]) and erk = (erk i , i ∈[m]) are also independent. We have the following result regarding the distribution of eU: Lemma 1. The distribution of eU is a mixture of IID unif(0, γ) m-vectors with mixing variable γ ∼Beta(m, m + 1). Note that Beta(m, m + 1) has mean = m/(2m + 1) = (1 + o(1))/2 as m →∞, and variance = O(m−1). Thus, Lemma 1 makes our intuition precise in the sense that the distribution of eU is a “range mixture” of IID uniform distributions, with the range concentrating around 1/2. We now provide a reduced range, finite sample approximation in terms of the total variation distance dTV(eU, bU) between the distributions of random vectors eU and bU. Lemma 2. Let bU be distributed according to a mixture of IID Unif(0, bγ) m-vectors with bγ distributed as a Beta(m, m + 1) truncated to (0, 1 −δ) for δ = e−α/8 and α > 0. With eU as in Lemma 1, we have dTV(eU, bU) ≤2 exp(−αm). The approximation of the distribution of the eU by a truncated version, bU, is an essential technique in our proof. As will become clear in the proof of Lemma 3, we will need to condition on the mixing variable eU, or its truncated approximation eU, to allow for the use of concentration inequalities for independent variables. The resulting bounds should be devoid of randomness so that by taking expectation, we can get similar bounds for the exchangeable case. The truncation allows us to maintain a positive gap in impurities (between on and off support features) throughout this process. We expect the loss due to truncation to be minimal, only impacting the constants. For k ∈S, let buk = (buk i , i ∈[m]) be drawn from the distribution of bU described in Lemma 2, independently of anything else in the model, and let bγk be its corresponding mixing variable, which has a Beta distribution truncated to (0, 1 −δ). Let us define byk i = βk buk i + erk i , i ∈[m] where erk = (erk i ) is as before. This construction provides a simple coupling between eyk [m] and byk [m] giving the same bound on the their total variation distance. Hence, we can safely work with byk [m] instead of eyk [m], and pay a price of at most 2 exp(−αm) in probability bounds. To simplify discussion, let byk i = eyk i for k /∈S. Concentration of empirical impurity. We will focus on byk [m] due the discussion above. We would like to control imp(byk [m]), the empirical variance impurity of byk [m] which is defined as in (1) with yk [m] replaced with byk [m]. The idea is to analyze E[imp(byk [m])], or proper bounds on it, and then show that imp(byk [m]) concentrates around its mean. Let us consider the concentration first. (1) is a U-statistic of order 2 with kernel h(u, v) = 1 2(u−v)2. The classical Hoeffding inequality guarantees concentration if h is uniformly bounded and the underlying variables are IID. Instead, we use a version of Hanson– Wright concentration inequality derived in [10], which allows us to derive a concentration bound for the empirical variance, for general sub-Gaussian vectors, avoiding the boundedness assumption: Corollary 3. Let w = (w1, . . . , wm) ∈Rm be a random vector with independent components wi which satisfy Ewi = µ and ∥wi −µ∥ψ2 ≤K. Let imp(w) := m 2 −1 P 1≤i<j≤m(wi −wj)2 be the empirical variance of w. Then, for u ≥0, P imp(w) −E imp(w) > K2u ≤2 exp −c (m −1) min(u, u2) . (7) We can immediately apply this result when k /∈S. However, for k ∈S, a more careful application is needed since we can only guarantee an exchangeable distribution for byk [m] in this case. The following lemma summarizes the conclusions: 7 Lemma 3. Let bIm,k = imp(byk [m]) and recall that δ was introduced in the definition of byk i . Let κ2 1 := 1 12 be the variance of Unif(0, 1). Recall that ˇp := p −s. Let L = ∥β∥2. There exist absolute constants C1, C2, c such that if log ˇp/m ≤C1, then with probability at least 1 −ˇp−c, bIm,k ≤I1 k + εm, ∀k ∈S, and, bIm,k ≥I0 −εm, ∀k /∈S where, letting ξ := 1 −(1 −δ)2, I1 k := κ2 1(−ξβ2 k + L2) + σ2, I0 := κ2 1L2 + σ2, and εm := C2(L2 + σ2) p log ˇp/m. The key outcome of Lemma 3 is that, on average, there is a positive gap I0 −I1 k = κ2 1ξβ2 k in impurities between a feature on the support and those off of it, and that due to concentration, the fluctuations in impurities will be less than this gap for large m. Combined with Lemma 2, we can transfer the results to eIm,k := imp(eyk [m]). Corollary 4. The conclusion of Lemma 3 holds for eIm,k in place of bIm,k, with probability at least 1 −ˇp−c −2e−αm for α = log 1 8δ. Note that for δ < 1/8, the bound holds with high probability. Thus, as long as I0 −I1 k > 2εm, the selection algorithm correctly favors the kth feature in S, over the inactive ones (recall that lower impurity is better). We have our main result after substituting n/2 for m. 4 Simulations (a) (b) (c) (d) (e) (f) Figure 1: Support recovery performance in a linear regression model augmented with possible nonlinearities for n = 1024. (a) Linear case with uncorrelated design. (b) Linear case with correlated design. (c) Nonlinear additive model with exponentials of covariates and uncorrelated design. (d) Nonlinear model with interaction terms and uncorrelated design. (e) Nonlinear additive model with exponentials of covariates, interaction terms, and uncorrelated design. (f) Nonlinear additive model with exponentials of covariates, interaction terms, and correlated design. In order to corroborate the theoretical analysis, we next present various simulation results. We consider the following model: y = Xβ + f(XS) + w, where f(XS) is a potential nonlinearity, and S is the true support of β. We generate the training data as X = e XM where e X ∈Rn×p is a random matrix with IID Unif(−1, 1) entries, and M ∈Rp×p is an upper-triangular matrix that determines whether the design is IID or correlated. In the IID case we set M = I. To achieve a correlated design 8 we randomly assign values from {0, −ρ, +ρ} to the upper triangular cells of M, with probabilities (1 −2α, α, α). We observed qualitatively similar results for various values of ρ and α and here we present results with α = 0.04, and ρ = 0.1. The noise is generated as w ∼N(0, σ2In). We fix p = 200, σ = 0.1, and let βi = ±1/√s over its support i ∈S, where |S| = s. That is, only s of the p = 200 variables are predictive of the response. The nonlinearity, f, optionally contains additive terms in the form of exponentials of on-support covariates. It can also contain interaction terms across on-support covariates, i.e., terms of the form 2 √sxixj for some randomly selected pairs of i, j ∈S. Notably, the choice of f is unknown to the variable selection methods. We vary s ∈[5, 100] and note that ∥β∥2 = 1 remains fixed. The plots in Figure 1 show the fraction of the true support recovered3 as a function of s, for various methods under different modeling setups: f = 0 (linear), f = 2 exp(·) (additive), f = interaction (interactions), and f = interaction + 2 exp(·) (interactions+additive) with IID or correlated designs. Each data point is an average over 100 trials (see supplementary material for results with 95% confidence intervals). In addition to DSTUMP, we evaluate TREEWEIGHT, SPAM, LASSO, SIS and random guessing for comparison. SIS refers to picking the indices of the top s largest values of XT y in absolute value. When X is orthogonal and the generative model is linear, this approach is optimal, and we use it as a surrogate for the optimal approach in our nearly orthogonal setup (i.e., the IID linear case), due to its lack of any tuning parameters. Random guessing is used as a benchmark, and as expected, on average recovers the fraction s/p = s/200 of the support. The plots show that, in the linear setting, the performance of DSTUMP is comparable to, and only slightly worse than, that of SIS or Lasso which are considered optimal in this case. Figure 1(b) shows that under mildly correlated design the gap between DSTUMP and LASSO widens. In this case, SIS loses its optimality and performs at the same level as DSTUMP. This matches our intuition as both SIS and DSTUMP are both greedy methods that consider covariates independently. DSTUMP is more robust to nonlinearities, as characterized theoretically in Theorem 3 and evidenced in Figure 1(c). In contrast, in the presence of exponential nonlinearities, SIS and Lasso are effective in the very sparse regime of s ≪p, but quickly approach random guessing as s grows. In the presence of interaction terms, TREEWEIGHT and to a lesser extent SPAM outperform all other methods, as shown in Figure 1(d), 1(e), and 1(f). We also note that the permutation-based importance method [1], denoted by TREEWEIGHTPERMUTATION in the plots in Figure 1, performs substantially worse than TREEWEIGHT across the various modelling settings. Overall, these simulations illustrate the promise of multi-level tree-based methods like TREEWEIGHT under more challenging and realistic modeling settings. Future work involves generalizing our theoretical analyses to extend to these more complex multi-level tree-based approaches. 5 Discussion We presented a simple model selection algorithm for decision trees, which we called DSTUMP, and analyzed its finite-sample performance in a variety of settings, including the high-dimensional, nonlinear additive model setting. Our theoretical and experimental results show that even a simple tree-based algorithm that selects at the root can achieve high dimensional selection consistency. We hope these results pave the way for the finite-sample analysis of more refined tree-based model selection procedures. Inspired by the empirical success of TREEWEIGHT in nonlinear settings, we are actively looking at extensions of DSTUMP to a multi-stage algorithm capable of handling interactions with high-dimensional guarantees. Moreover, while we mainly focused on the regression problem, our proof technique based on concentration of impurity reductions is quite general. We expect analogous results to hold, for example for classification. However, aspects of the proof would be different, since impurity measures used for classification are different than those of regression. One major hurdle involves deriving concentration inequalities for the empirical versions of these measures, which are currently unavailable, and would be of independent interest. 3In the supplementary material we report analogous results using a more stringent performance metric, namely the probability of exact support recovery. The results are qualitatively similar. 9 References [1] L. Breiman. Random forests. Machine learning, 45(1):5–32, 2001. [2] L. Breiman, J. Friedman, C. J. Stone, and R. A. Olshen. Classification and regression trees. CRC press, 1984. [3] J. Fan and J. Lv. Sure independence screening for ultrahigh dimensional feature space. Journal of the Royal Statistical Society: Series B, 70(5), 2008. [4] J. Fan and J. Lv. Sure independence screening for ultrahigh dimensional feature space. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 70(5):849–911, 2008. [5] J. H. Friedman. Greedy function approximation: A gradient boosting machine. The Annals of Statistics, 29(5):1189–1232, 2001. [6] H. Ishwaran. Variable importance in binary regression trees and forests. Electronic Journal of Statistics, 1:519–537, 2007. [7] J. Lafferty and L. Wasserman. Rodeo: Sparse, Greedy Nonparametric Regression. Annals of Statistics, 36(1):28–63, 2008. [8] G. Louppe, L. Wehenkel, A. Sutera, and P. Geurts. Understanding variable importances in forests of randomized trees. In Advances in Neural Information Processing Systems 26. 2013. [9] P. Ravikumar, J. Lafferty, H. Liu, and L. Wasserman. Sparse additive models. Journal of the Royal Statistical Society: Series B, 71(5):1009–1030, 2009. [10] M. Rudelson and R. Vershynin. Hanson-Wright inequality and sub-gaussian concentration. Electron. Commun. Probab, pages 1–10, 2013. [11] M. J. Wainwright. Information-theoretic limits on sparsity recovery in the high-dimensional and noisy setting. IEEE Transactions on Information Theory, 55(12):5728–5741, 2009. [12] M. J. Wainwright. Sharp thresholds for high-dimensional and noisy sparsity Recovery ℓ1constrained quadratic programming (Lasso). IEEE Transactions on Information Theory, 55(5):2183–2202, 2009. 10 | 2017 | 229 |
6,707 | Minimax Estimation of Bandable Precision Matrices Addison J. Hu∗ Department of Statistics and Data Science Yale University New Haven, CT 06520 addison.hu@yale.edu Sahand N. Negahban Department of Statistics and Data Science Yale University New Haven, CT 06520 sahand.negahban@yale.edu Abstract The inverse covariance matrix provides considerable insight for understanding statistical models in the multivariate setting. In particular, when the distribution over variables is assumed to be multivariate normal, the sparsity pattern in the inverse covariance matrix, commonly referred to as the precision matrix, corresponds to the adjacency matrix representation of the Gauss-Markov graph, which encodes conditional independence statements between variables. Minimax results under the spectral norm have previously been established for covariance matrices, both sparse and banded, and for sparse precision matrices. We establish minimax estimation bounds for estimating banded precision matrices under the spectral norm. Our results greatly improve upon the existing bounds; in particular, we find that the minimax rate for estimating banded precision matrices matches that of estimating banded covariance matrices. The key insight in our analysis is that we are able to obtain barely-noisy estimates of k×k subblocks of the precision matrix by inverting slightly wider blocks of the empirical covariance matrix along the diagonal. Our theoretical results are complemented by experiments demonstrating the sharpness of our bounds. 1 Introduction Imposing structure is crucial to performing statistical estimation in the high-dimensional regime where the number of observations can be much smaller than the number of parameters. In estimating graphical models, a long line of work has focused on understanding how to impose sparsity on the underlying graph structure. Sparse edge recovery is generally not easy for an arbitrary distribution. However, for Gaussian graphical models, it is well-known that the graphical structure is encoded in the inverse of the covariance matrix Σ−1 = Ω, commonly referred to as the precision matrix [12, 14, 3]. Therefore, accurate recovery of the precision matrix is paramount to understanding the structure of the graphical model. As a consequence, a great deal of work has focused on sparse recovery of precision matrices under the multivariate normal assumption [8, 4, 5, 17, 16]. Beyond revealing the graph structure, the precision matrix also turns out to be highly useful in a variety of applications, including portfolio optimization, speech recognition, and genomics [12, 23, 18]. Although there has been a rich literature exploring the sparse precision matrix setting for Gaussian graphical models, less work has emphasized understanding the estimation of precision matrices under additional structural assumptions, with some exceptions for block structured sparsity [10] or bandability [1]. One would hope that extra structure should allow us to obtain more statistically efficient solutions. In this work, we focus on the case of bandable precision matrices, which capture ∗Addison graduated from Yale in May 2017. Up-to-date contact information may be found at http: //huisaddison.com/. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. a sense of locality between variables. Bandable matrices arise in a number of time-series contexts and have applications in climatology, spectroscopy, fMRI analysis, and astronomy [9, 20, 15]. For example, in the time-series setting, we may assume that edges between variables Xi, Xj are more likely when i is temporally close to j, as is the case in an auto-regressive process. The precision and covariance matrices corresponding to distributions with this property are referred to as bandable, or tapering. We will discuss the details of this model in the sequel. Past work: Previous work has explored the estimation of both bandable covariance and precision matrices [6, 15]. Closely related work includes the estimation of sparse precision and covariance matrices [3, 17, 4]. Asymptotically-normal entrywise precision estimates as well as minimax rates for operator norm recovery of sparse precision matrices have also been established [16]. A line of work developed concurrently to our own establishes a matching minimax lower bound [13]. When considering an estimation technique, a powerful criterion for evaluating whether the technique performs optimally in terms of convergence rate is minimaxity. Past work has established minimax rates of convergence for sparse covariance matrices, bandable covariance matrices, and sparse precision matrices [7, 6, 4, 17]. The technique for estimating bandable covariance matrices proposed in [6] is shown to achieve the optimal rate of convergence. However, no such theoretical guarantees have been shown for the bandable precision estimator proposed in recent work for estimating sparse and smooth precision matrices that arise from cosmological data [15]. Of note is the fact that the minimax rate of convergence for estimating sparse covariance matrices matches the minimax rate of convergence of estimating sparse precision matrices. In this paper, we introduce an adaptive estimator and show that it achieves the optimal rate of convergence when estimating bandable precision matrices from the banded parameter space (3). We find, satisfyingly, that analogous to the sparse case, in which the minimax rate of convergence enjoys the same rate for both precision and covariance matrices, the minimax rate of convergence for estimating bandable precision matrices matches the minimax rate of convergence for estimating bandable covariance matrices that has been established in the literature [6]. Our contributions: Our goal is to estimate a banded precision matrix based on n i.i.d. observations. We consider a parameter space of precision matrices Ωwith a power law decay structure nearly identical to the bandable covariance matrices considered for covariance matrix estimation [6]. We present a simple-to-implement algorithm for estimating the precision matrix. Furthermore, we show that the algorithm is minimax optimal with respect to the spectral norm. The upper and lower bounds given in Section 3 together imply the following optimal rate of convergence for estimating bandable precision matrices under the spectral norm. Informally, our results show the following bound for recovering a banded precision matrix with bandwidth k. Theorem 1.1 (Informal). The minimax risk for estimating the precision matrix Ωover the class Pα given in (3) satisfies: inf ˆΩ sup Pα E
ˆΩ−Ω
2 ≈k + log p n (1) where this bound is achieved by the tapering estimator ˆΩk as defined in Equation (7). An important point to note, which is shown more precisely in the sequel, is that the rate of convergence as compared to sparse precision matrix recovery is improved by a factor of min(k log(p), k2). We establish a minimax upper bound by detailing an algorithm for obtaining an estimator given observations x1, . . . , xn and a pre-specified bandwidth k, and studying the resultant estimator’s risk properties under the spectral norm. We show that an estimator using our algorithm with the optimal choice of bandwidth attains the minimax rate of convergence with high probability. To establish the optimality of our estimation routine, we derive a minimax lower bound to show that the rate of convergence cannot be improved beyond that of our estimator. The lower bound is established by constructing subparameter spaces of (3) and applying testing arguments through Le Cam’s method and Assouad’s lemma [22, 6]. To supplement our analysis, we conduct numerical experiments to explore the performance of our estimator in the finite sample setting. The numerical experiments confirm that even in the finite sample case, our proposed estimator exhibits the minimax rate of convergence. 2 The remainder of the paper is organized as follows. In Section 2, we detail the exact model setting and introduce a blockwise inversion technique for precision matrix estimation. In Section 3, theorems establishing the minimaxity of our estimator under the spectral norm are presented. An upper bound on the estimator’s risk is given in high probability with the help of a result from set packing. The minimax lower bound is derived by way of a testing argument. Both bounds are accompanied by their proofs. Finally, in Section 4, our estimator is subjected to numerical experiments. Formal proofs of the theorems may be found in the longer version of the paper [11]. Notation: We will now collect notation that will be used throughout the remaining sections. Vectors will be denoted as lower-case x while matrices are upper-case A. The spectral or operator norm of a matrix is defined to be ∥A∥= supx̸=0,y̸=0⟨Ax, y⟩while the matrix ℓ1 norm of a symmetric matrix A ∈Rm×m is defined to be ∥A∥1 = maxj Pm i=1 |Aij|. 2 Background and problem set-up In this section we present details of our model and the estimation procedure. If one considers observations of the form x1, . . . , xn ∈Rp drawn from a distribution with precision matrix Ωp×p and zero mean, the goal then is to estimate the unknown matrix Ωp×p based on the observations {xi}n i=1. Given a random sample of p-variate observations x1, . . . , xn drawn from a multivariate distribution with population covariance Σ = Σp×p, our procedure is based on a tapering estimator derived from blockwise estimates for estimating the precision matrix Ωp×p = Σ−1. The maximum likelihood estimator of Σ is ˆΣ = (ˆσij)1≤i,j≤p = 1 n n X l=1 (xl −¯x)(xl −¯x)⊤ (2) where ¯x is the empirical mean of the vectors xi. We will construct estimators of the precision matrix Ω= Σ−1 by inverting blocks of ˆΣ along the diagonal, and averaging over the resultant subblocks. Throughout this paper we adhere to the convention that ωij refers to the ijth element in a matrix Ω. Consider the parameter space Fα, with associated probability measure Pα, given by: Fα = Fα(M0, M) = ( Ω: max j X i {|ωij| : |i −j| ≥k} ≤Mk−α for all k, λi(Ω) ∈[M −1 0 , M0] ) (3) where λi(Ω) denotes the ith eigenvalue of Ω, with λi ≥λj for all i ≤j. We also constrain α > 0, M > 0, M0 > 0. Observe that this parameter space is nearly identical to that given in Equation (3) of [6]. We take on an additional assumption on the minimum eigenvalue of Ω∈Fα, which is used in the technical arguments where the risk of estimating Ωunder the spectral norm is bounded in terms of the error of estimating Σ = Ω−1. Observe that the parameter space intuitively dictates that the magnitude of the entries of Ωdecays in power law as we move away from the diagonal. As with the parameter space for bandable covariance matrices given in [6], we may understand α in (3) as a rate of decay for the precision entries ωij as they move away from the diagonal; it can also be understood in terms of the smoothness parameter in nonparametric estimation [19]. As will be discussed in Section 3, the optimal choice of k depends on both n and the decay rate α. 2.1 Estimation procedure We now detail the algorithm for obtaining minimax estimates for bandable Ω, which is also given as pseudo-code2 in Algorithm 1. The algorithm is inspired by the tapering procedure introduced by Cai, Zhang, and Zhou [6] in the case of covariance matrices, with modifications in order to estimate the precision matrix. Estimating 2 In the pseudo-code, we adhere to the NumPy convention (1) that arrays are zero-indexed, (2) that slicing an array arr with the operation arr[a:b] includes the element indexed at a and excludes the element indexed at b, and (3) that if b is greater than the length of the array, only elements up to the terminal element are included, with no errors. 3 the precision matrix introduces new difficulties as we do not have direct access to the estimates of elements of the precision matrix. For a given integer k, 1 ≤k ≤p, we construct a tapering estimator as follows. First, we calculate the maximum likelihood estimator for the covariance, as given in Equation (2). Then, for all integers 1 −m ≤l ≤p and m ≥1, we define the matrices with square blocks of size at most 3m along the diagonal: ˆΣ(3m) l−m = (ˆσij1{l −m ≤i < l + 2m, l −m ≤j < l + 2m})p×p (4) For each ˆΣ(3m) l−m , we replace the nonzero block with its inverse to obtain ˘Ω(3m) l−m . For a given l, we refer to the individual entries of this intermediate matrix as follows: ˘Ω(3m) l−m = (˘ωl ij1{l −m ≤i < l + 2m, l −m ≤j < l + 2m})p×p (5) For each l, we then keep only the central m × m subblock of ˘Ω(3m) l−m to obtain the blockwise estimate ˆΩ(m) l : ˆΩ(m) l = (˘ωl ij1{l ≤i < l + m, l ≤j < l + m})p×p (6) Note that this notation allows for l < 0 and l + m > p; in each case, this out-of-bounds indexing allows us to cleanly handle corner cases where the subblocks are smaller than m × m. For a given bandwidth k (assume k is divisible by 2), we calculate these blockwise estimates for both m = k and m = k 2. Finally, we construct our estimator by averaging over the block matrices: ˆΩk = 2 k · p X l=1−k ˆΩ(k) l − p X l=1−k/2 ˆΩ(k/2) l (7) We note that within k 2 entries of the diagonal, each entry is effectively the sum of k 2 estimates, and as we move from k 2 to k from the diagonal, each entry is progressively the sum of one fewer entry. Therefore, within k 2 of the diagonal, the entries are not tapered; and from k 2 to k of the diagonal, the entries are linearly tapered to zero. The analysis of this estimator makes careful use of this tapering schedule and the fact that our estimator is constructed through the average of block matrices of size at most k × k. 2.2 Implementation details The naive algorithm performs O(p + k) inversions of square matrices with size at most 3k. This method can be sped up considerably through an application of the Woodbury matrix identity and the Schur complement relation [21, 2]. Doing so reduces the computational complexity of the algorithm from O(pk3) to O(pk2). We discuss the details of modified algorithm and its computational complexity below. Suppose we have ˘Ω(3m) l−m and are interested in obtaining ˘Ω(3m) l−m+1. We observe that the nonzero block of ˘Ω(3m) l−m+1 corresponds to the inverse of the nonzero block of ˆΣ(3m) l−m+1, which only differs by one row and one column from ˆΣ(3m) l−m , the matrix for which the inverse of the nonzero block corresponds to ˘Ω(3m) l−m , which we have already computed. We may understand the movement from ˆΣ(3m) l−m , ˘Ω(3m) l−m to ˆΣ(3m) l−m+1 (to which we already have direct access) and ˘Ω(3m) l−m+1 as two rank-1 updates. Let us view the nonzero blocks of ˆΣ(3m) l−m , ˘Ω(3m) l−m as the block matrices: NonZero(ˆΣ(3m) l−m ) = A ∈R1×1 B ∈R1×(3m−1) B⊤∈R(3m−1)×1 C ∈R(3m−1)×(3m−1) NonZero(˘Ω(3m) l−m ) = ˜A ∈R1×1 ˜B ∈R1×(3m−1) ˜B⊤∈R(3m−1)×1 ˜C ∈R(3m−1)×(3m−1) The Schur complement relation tells us that given ˆΣ3m l−m, ˘Ω(3m) l−m , we may trivially compute C−1 as follows: C−1 = ˜C−1 + B⊤A−1B −1 = ˜C − ˜CB⊤B ˜C A + B ˜CB⊤ (8) 4 Algorithm 1 Blockwise Inversion Technique function FITBLOCKWISE(ˆΣ, k) ˆΩ←0p×p for l ∈[1 −k, p) do ˆΩ←ˆΩ+ BLOCKINVERSE(ˆΣ, k, l) end for for l ∈[1 −⌊k/2⌋, p) do ˆΩ←ˆΩ−BLOCKINVERSE(ˆΣ, ⌊k/2⌋, l) end for return ˆΩ end function function BLOCKINVERSE(ˆΣ, m, l) ▷Obtain 3m × 3m block inverse. s ←max{l −m, 0} f ←min{p, l + 2m} M ← ˆΣ[s:f, s:f] −1 ▷Preserve central m × m block of inverse. s ←m + min{l −m, 0} N ←M[s:s+m, s:s+m] ▷Restore block inverse to appropriate indices. P ←0p×p s ←max{l, 0} f ←min{l + m, p} P[s:f, s:f] = N return P end function by the Woodbury matrix identity, which gives an efficient algorithm for computing the inverse of a matrix subject to a low-rank (in this case, rank-1) perturbation. This allows us to move from the inverse of a matrix in R3m×3m to the inverse of a matrix in R(3m−1)×(3m−1) where a row and column have been removed. A nearly identical argument allows us to move from the R(3m−1)×(3m−1) matrix to an R3m×3m matrix where a row and column have been appended, which gives us the desired block of ˘Ω(3m) l−m+1. With this modification to the algorithm, we need only compute the inverse of a square matrix of width 2m at the beginning of the routine; thereafter, every subsequent block inverse may be computed through simple rank one matrix updates. 2.3 Complexity details We now detail the factor of k improvement in computational complexity provided through the application of the Woodbury matrix identity and the Schur complement relation introduced in Section 2.2. Recall that the naive implementation of Algorithm 1 involves O(p + k) inversions of square matrices of size at most 3k, each of which cost O(k3). Therefore, the overall complexity of the naive algorithm is O(pk3), as k < p. Now, consider the Woodbury-Schur-improved algorithm. The initial single inversion of a 2k × 2k matrix costs O(k3). Thereafter, we perform O(p + k) updates of the form given in Equation (8). These updates simply require vector matrix operations. Therefore, the update complexity on each iteration is O(k2). It follows that the overall complexity of the amended algorithm is O(pk2). 3 Rate optimality under the spectral norm Here we present the results that establish the rate optimality of the above estimator under the spectral norm. For symmetric matrices A, the spectral norm, which corresponds to the largest singular value 5 of A, coincides with the ℓ2-operator norm. We establish optimality by first deriving an upper bound in high probability using the blockwise inversion estimator defined in Section 2.1. We then give a matching lower bound in expectation by carefully constructing two sets of multivariate normal distributions and then applying Assouad’s lemma and Le Cam’s method. 3.1 Upper bound under the spectral norm In this section we derive a risk upper bound for the tapering estimator defined in (7) under the operator norm. We assume the distribution of the xi’s is subgaussian; that is, there exists ρ > 0 such that: P |v⊤(xi −E xi)| > t ≤e−t2ρ 2 (9) for all t > 0 and ∥v∥2 = 1. Let Pα = Pα(M0, M, ρ) denote the set of distributions of xi that satisfy (3) and (9). Theorem 3.1. The tapering estimator ˆΩk, defined in (7), of the precision matrix Ωp×p with p > n 1 2α+1 satisfies: sup Pα P
ˆΩk −Ω
2 ≥C k + log p n + Ck−2α = O p−15 (10) with k = o(n), log p = o(n), and a universal constant C > 0. In particular, the estimator ˆΩ= ˆΩk with k = n 1 2α+1 satisfies: sup Pα P
ˆΩk −Ω
2 ≥Cn− 2α 2α+1 + C log p n = O p−15 (11) Given the result in Equation (10), it is easy to show that setting k = n 1 2α+1 yields the optimal rate by balancing the size of the inside-taper and outside-taper terms, which gives Equation (11). The proof of this theorem, which is given in the supplementary material, relies on the fact that when we invert a 3k × 3k block, the difference between the central k × k block and the corresponding k × k block which would have been obtained by inverting the full matrix has a negligible contribution to the risk. As a result, we are able to take concentration bounds on the operator norm of subgaussian matrices, customarily used for bounding the norm of the difference of covariance matrices, and apply them instead to differences of precision matrices to obtain our result. The key insight is that we can relate the spectral norm of a k × k subblock produced by our estimator to the spectral norm of the corresponding k × k subblock of the covariance matrix, which allows us to apply concentration bounds from classical random matrix theory. Moreover, it turns out that if we apply the tapering schedule induced by the construction of our estimator to the population parameter Ω∈Fα, we may express the tapered population Ωas a sum of block matrices in exactly the same way that our estimator is expressed as a sum of block matrices. In particular, the tapering schedule is presented next. Suppose a population precision matrix Ω∈Fα. Then, we denote the tapered version of Ωby ΩA, and construct: ΩA = (ωij · vij)p×p ΩB = (ωij · (1 −vij))p×p where the tapering coefficients are given by: vij = 1 for |i −j| < k 2 |i−j| k/2 for k 2 ≤|i −j| < k 0 for |i −j| ≥k We then handle the risk of estimating the inside-taper ΩA and the risk of estimating the outside-taper ΩB separately. Because our estimator and the population parameter are both averages over k × k block matrices along the diagonal, we may then take a union bound over the high probability bounds on the spectral norm deviation for the k × k subblocks to obtain a high probability bound on the risk of our estimator. We refer the reader to the longer version of the paper for further details [11]. 6 3.2 Lower bound under the spectral norm In Section 3.1, we established Theorem 3.1, which states that our estimator achieves the rate of convergence n− 2α 2α+1 under the spectral norm by using the optimal choice of k = n 1 2α+1 . Next we demonstrate a matching lower bound, which implies that the upper bound established in Equation (11) is tight up to constant factors. Specifically, for the estimation of precision matrices in the parameter space given by Equation (3), the following minimax lower bound holds. Theorem 3.2. The minimax risk for estimating the precision matrix Ωover Pα under the operator norm satisfies: inf ˆΩ sup Pα E
ˆΩ−Ω
2 ≥cn− 2α 2α+1 + clog p n (12) As in many information theoretic lower bounds, we first identify a subset of our parameter space that captures most of the complexity of the full space. We then establish an information theoretic limit on estimating parameters from this subspace, which yields a valid minimax lower bound over the original set. Specifically, for our particular parameter space Fα, we identify two subparameter spaces, F11, F12. The first, F11, is a collection of 2k matrices with varying levels of density. To this collection, we apply Assouad’s lemma obtain a lower bound with rate n− 2α 2α+1 . The second, F12, is a collection of diagonal matrices, to which we apply Le Cam’s method to derive a lower bound with rate log p n . The rate given in Theorem 3.2 is therefore a lower bound on minimax rate for estimating the union (F11 ∪F12) = F1 ⊂Fα. The full details of the subparameter space construction and derivation of lower bounds may be found in the full-length version of the paper [11]. 4 Experimental results We implemented the blockwise inversion technique in NumPy and ran simulations on synthetic datasets. Our experiments confirm that even in the finite sample case, the blockwise inversion technique achieves the theoretical rates. In the experiments, we draw observations from a multivariate normal distribution with precision parameter Ω∈Fα, as defined in (3). Following [6], for given constants ρ, α, p, we consider precision matrices Ω= (ωij)1≤i,j≤p of the form: ωij = 1 for 1 ≤i = j ≤p ρ|i −j|−α−1 for 1 ≤i ̸= j ≤p (13) Though the precision matrices considered in our experiments are Toeplitz, our estimator does not take advantage of this knowledge. We choose ρ = 0.6 to ensure that the matrices generated are non-negative definite. In applying the tapering estimator as defined in (7), we choose the bandwidth to be k = ⌊n 1 2α+1 ⌋, which gives the optimal rate of convergence, as established in Theorem 3.1. In our experiments, we varied α, n, and p. For our first set of experiments, we allowed α to take on values in {0.2, 0.3, 0.4, 0.5}, n to take values in {250, 500, 750, 1000}, and p to take values in {100, 200, 300, 400}. Each setting was run for five trials, and the averages are plotted with error bars to show variability between experiments. We observe in Figure 1a that the spectral norm error increases linearly as log p increases, confirming the log p n term in the rate of convergence. Building upon the experimental results from the first set of simulations, we provide an additional sets of trials for the α = 0.2, p = 400 case, with n ∈{11000, 3162, 1670}. These sample sizes were chosen so that in Figure 1b, there is overlap between the error plots for α = 0.2 and the other α regimes3. As with Figure 1a, Figure 1b confirms the minimax rate of convergence given in Theorem 3.1. Namely, we see that plotting the error with respect to n− 2α 2α+1 results in linear plots with almost 3 For the α = 0.2, p = 400 case, we omit the settings where n ∈{250, 500, 750} from Figure 1b to improve the clarity of the plot. 7 4.6 4.8 5.0 5.2 5.4 5.6 5.8 6.0 log(p) 0 1 2 3 4 5 6 7 8 Spectral Norm Error Setting: n = 1000 α = 0. 2 α = 0. 3 α = 0. 4 α = 0. 5 (a) Spectral norm error as log p changes. 0.02 0.04 0.06 0.08 0.10 0.12 0.14 n−2α 2α + 1 0.000 0.005 0.010 0.015 0.020 0.025 Mean Spectral Norm Setting: p = 400 α = 0. 2 α = 0. 3 α = 0. 4 α = 0. 5 (b) Mean spectral norm error as n− 2α 2α+1 changes. Figure 1: Experimental results. Note that the plotted error grows linearly as a function of log p and n− 2α 2α+1 , respectively, matching the theoretical results; however, the linear relationship is less clear in the α = 0.2 case, due to the subtle interplay of the error terms. identical slopes. We note that in both plots, there is a small difference in the behavior for the case α = 0.2. This observation can be attributed to the fact that for such a slow decay of the precision matrix bandwidth, we have a more subtle interplay between the bias and variance terms presented in the theorems above. 5 Discussion In this paper we have presented minimax upper and lower bounds for estimating banded precision matrices after observing n samples drawn from a p-dimensional subgaussian distribution. Furthermore, we have provided a computationally efficient algorithm that achieves the optimal rate of convergence for estimating a banded precision matrix under the operator norm. Theorems 3.1 and 3.2 together establish that the minimax rate of convergence for estimating precision matrices over the parameter space Fα given in Equation (3) is n− 2α 2α+1 + log p n , where α dictates the bandwidth of the precision matrix. The rate achieved in this setting parallels the results established for estimating a bandable covariance matrix [6]. As in that result, we observe that different regimes dictate which term dominates in the rate of convergence. In the setting where log p is of a lower order than n 1 2α+1 , the n− 2α 2α+1 term dominates, and the rate of convergence is determined by the smoothness parameter α. However, when log p is much larger than n 1 2α+1 , p has a much greater influence on the minimax rate of convergence. Overall, we have shown the performance gains that may be obtained through added structural constraints. An interesting line of future work will be to explore algorithms that uniformly exhibit a smooth transition between fully banded models and sparse models on the precision matrix. Such methods could adapt to the structure and allow for mixtures between banded and sparse precision matrices. Another interesting direction would be in understanding how dependencies between the n observations will influence the error rate of the estimator. Finally, the results presented here apply to the case of subgaussian random variables. Unfortunately, moving away from the Gaussian setting in general breaks the connection between precision matrices and graph structure. Hence, a fruitful line of work will be to also develop methods that can be applied to estimating the banded graphical model structure with general exponential family observations. Acknowledgements We would like to thank Harry Zhou for stimulating discussions regarding matrix estimation problems. SN acknowledges funding from NSF Grant DMS 1723128. 8 References [1] P. J. Bickel and Y. R. Gel. Banded regularization of autocovariance matrices in application to parameter estimation and forecasting of time series. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 73(5):711–728, 2011. [2] S. Boyd and L. Vandenberghe. Convex optimization. Cambridge University Press, Cambridge, UK, 2004. [3] T. T. Cai, W. Liu, and X. Luo. A Constrained L1 Minimization Approach to Sparse Precision Matrix Estimation. arXiv:1102.2233 [stat], February 2011. arXiv: 1102.2233. [4] T. T. Cai, W. Liu, and H. H. Zhou. Estimating sparse precision matrix: Optimal rates of convergence and adaptive estimation. Ann. Statist., 44(2):455–488, 04 2016. [5] T. T. Cai, Z. Ren, H. H. Zhou, et al. Estimating structured high-dimensional covariance and precision matrices: Optimal rates and adaptive estimation. Electronic Journal of Statistics, 10(1):1–59, 2016. [6] T. T. Cai, C.-H. Zhang, and H. H. Zhou. Optimal rates of convergence for covariance matrix estimation. The Annals of Statistics, 38(4):2118–2144, August 2010. [7] T. T. Cai and H. H. Zhou. Optimal rates of convergence for sparse covariance matrix estimation. Ann. Statist., 40(5):2389–2420, 10 2012. [8] J. Friedman, T. Hastie, and R. Tibshirani. Sparse inverse covariance estimation with the graphical Lasso. Biostatistics, 2007. [9] K. J. Friston, P. Jezzard, and R. Turner. Analysis of functional mri time-series. Human brain mapping, 1(2):153–171, 1994. [10] M. J. Hosseini and S.-I. Lee. Learning sparse gaussian graphical models with overlapping blocks. In Advances in Neural Information Processing Systems, pages 3808–3816, 2016. [11] A. J. Hu and S. N. Negahban. Minimax Estimation of Bandable Precision Matrices. arXiv, 2017. arXiv: 1710.07006v1. [12] S. L. Lauritzen. Graphical Models. Oxford Statistical Science Series. Clarendon Press, Oxford, 1996. [13] K. Lee and J. Lee. Estimating Large Precision Matrices via Modified Cholesky Decomposition. arXiv:1707.01143 [stat], July 2017. arXiv: 1707.01143. [14] N. Meinshausen and P. Bühlmann. High-dimensional graphs and variable selection with the Lasso. Annals of Statistics, 34:1436–1462, 2006. [15] N. Padmanabhan, M. White, H. H. Zhou, and R. O’Connell. Estimating sparse precision matrices. Monthly Notices of the Royal Astronomical Society, 460(2):1567–1576, 2016. [16] Z. Ren, T. Sun, C.-H. Zhang, and H. H. Zhou. Asymptotic normality and optimalities in estimation of large Gaussian graphical models. The Annals of Statistics, 43(3):991–1026, June 2015. [17] A. J. Rothman, P. J. Bickel, E. Levina, and J. Zhu. Sparse permutation invariant covariance estimation. Electronic Journal of Statistics, 2:494–515, 2008. [18] G. Saon and J. T. Chien. Bayesian sensing hidden markov models for speech recognition. In 2011 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 5056–5059, May 2011. [19] A. B. Tsybakov. Introduction to Nonparametric Estimation. Springer Publishing Company, Incorporated, 1st edition, 2008. [20] H. Visser and J. Molenaar. Trend estimation and regression analysis in climatological time series: an application of structural time series models and the kalman filter. Journal of Climate, 8(5):969–979, 1995. [21] M. A. Woodbury. Inverting modified matrices. Statistical Research Group, Memo. Rep. no. 42. Princeton University, Princeton, N. J., 1950. [22] B. Yu. Assouad, Fano and Le Cam. In Festschrift for Lucien Le Cam, pages 423–435. Springer-Verlag, Berlin, 1997. [23] M. Yuan and Y. Lin. Model selection and estimation in the Gaussian graphical model. Biometrika, 94(1):19–35, 2007. 9 | 2017 | 23 |
6,708 | A simple model of recognition and recall memory Nisheeth Srivastava Computer Science, IIT Kanpur Kanpur, UP 208016 nsrivast@cse.iitk.ac.in Edward Vul Dept of Psychology, UCSD 9500 Gilman Drive La Jolla CA 92093 evul@ucsd.edu Abstract We show that several striking differences in memory performance between recognition and recall tasks are explained by an ecological bias endemic in classic memory experiments - that such experiments universally involve more stimuli than retrieval cues. We show that while it is sensible to think of recall as simply retrieving items when probed with a cue - typically the item list itself - it is better to think of recognition as retrieving cues when probed with items. To test this theory, by manipulating the number of items and cues in a memory experiment, we show a crossover effect in memory performance within subjects such that recognition performance is superior to recall performance when the number of items is greater than the number of cues and recall performance is better than recognition when the converse holds. We build a simple computational model around this theory, using sampling to approximate an ideal Bayesian observer encoding and retrieving situational co-occurrence frequencies of stimuli and retrieval cues. This model robustly reproduces a number of dissociations in recognition and recall previously used to argue for dual-process accounts of declarative memory. 1 Introduction Over half a century, differences in memory performance in recognition and recall-based experiments have been a prominent nexus of controversy and confusion. There is broad agreement among memory researchers, following Mandler’s influential lead, that there are at least two different types of memory activities - recollection, wherein we simply remember something we want to remember, and familiarity, wherein we remember having seen something before, but nothing more beyond it [8]. Recall-based experiments are obvious representatives of recollection. Mandler suggested that recognition was a good example of familiarity activity. Dual-process accounts of memory question Mandler’s premise that recognition is exclusively a familiarity operation. They argue, phenomenologically, that recognition could also succeed successful recollection, making the process a dual composition of recollection and familiarity [20]. Experimental procedures and analysis methods have been designed to test for the relative presence of both processes in recognition experiments, with variable success. These endeavors contrast with strength-based single-process models of memory that treat recognition as the retrieval of a weak trace of item memory, and recall as retrieval of a stronger trace of the same item [19]. The single/dual process dispute also spills over into the computational modeling of memory. Gillund and Shiffrin’s influential SAM model is a single-process account of both recognition and recall [4]. In SAM and other strength-based models of declarative memory, recognition is modeled as item-relevant associative activation of memory breaching a threshold, while recall is modeled as sampling items from memory using the relative magnitudes of these associative activations. In contrast, McClelland’s equally influential CLS model is explicitly a dual-process model, where a fast learning hippocampal component primarily responsible for recollection sits atop a slow learning neocortical component responsible for familiarity [9]. Wixted’s signal detection model tries to bridge the gap between 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. these accounts by allowing dual process contributions to combine additively into a unidimensional strength variable [19]. While such pragmatic syntheses are useful, the field is still looking for a more satisfactory theoretical unification. The depth of the difference between the postulated dual processes of recollection and familiarity depends inevitably on the strength of the quantitative and qualitative dissociations that previous research has documented in memory tasks, prominent among which are recognition and recall. Mandler, for instance, postulated a one-to-one mapping between recognition and familarity on one hand and recall and recollection on the other [8], although other authors hold more nuanced views [20]. Notwithstanding such differences of opinion, the road to discovering useful single-process accounts of declarative memory has to go through explaining the multiple performance dissociations between recognition and recall memory tasks. To the extent that single process accounts of both tasks can explain such dissociations, differences between recollection and familarity will not seem nearly as fundamental. Improved strength-based models have competently modeled a large array of recognition-recall dissociations [13], but fail, or have to make intricate assumptions, in the face of others [20]. More importantly, the SAM model and its descendants are not purely single-process models. They model recognition as a threshold event and recall as a sampling event, with the unification coming from the fact that both events occur using the same information base of associative activation magnitude. We present a much simpler single process model that capably reproduces many critical qualitative recognition-recall dissociations. In the process, we rationalize the erstwhile abstract associative activation of strength-based memory models as statistically efficient monitoring of environmental co-occurrence frequencies. Finally, we show using simulations and a behavioral experiment, that the large differences between recognition and recall in the literature can be explained by the responses of an approximately Bayesian observer tracking these frequencies to two different questions. 2 Model We use a very simple model, specified completely by heavily stylized encoding and retrieval processes. The encoding component of our model simply learns the relative frequencies with which specific conjunctions of objects are attended to in the world. We consider objects x of only two types: items xi and lists xl. We model each timestep as as a Bernoulli trial between the propensity to attend to any of the set of items or to the item-list itself, with a uniform prior probability of sampling any of the objects. Observers update the probability of co-occurrence, defined in our case rigidly as 1-back occurrence, inductively as the items on the list are presented. We model this as the observer’s sequential Bayesian updates of the probability p(x), stored at every time step as a discrete memory engram m. Thus, in this encoding model, information about the displayed list of items is available in distributed form in memory as p(xi, xl|m), with each engram m storing one instance of co-occurrence. The true joint distribution of observed items,to the extent that it is encoded within the set of all task-relevant memory engrams M is then expressible as a simple probabilistic marginalization, p(xi, xl) = X m∈M p(xi, xl|m)p(m), (1) where we assume that p(m) is flat over M, i.e. we assume that within the set of memory engrams relevant for the retrieval cue, memory access is random. Our retrieval model is approximately Bayesian. It assumes that people sample a small subset of all relevant engrams M′ ⊂M when making memory judgments. Thus, the joint distribution accessible to the observer during retrieval becomes a function of the set of engrams actually retrieved, pMk(xi, xl) = X m∈Mk p(xi, xl|m)p(m), (2) where Mk denotes the set of first k engrams retrieved. Following a common approach to sampling termination in strength-based sequential sampling memory models, we use a novelty threshold that allows the memory retrieval process to self-terminate when incoming engrams no longer convey significantly novel information [4, 13]. We treat the arrival of the 2 Recall Recognition Encoding Encoding Retrieval Retrieval A B C A B C A p(x| ) p( |A) Sample from Sample from X A B C p(x| ) p( |x) Figure 1: Illustrating the ecological difference in retrieval during recognition and recall memory experiments. We model recall retrieval as a probabilistic query about items conditioned on the item list and recognition retrieval as a probabilistic query about the item list conditioned on the item presented during retrieval. Since there are almost always more items than lists in classic memory experiments, the second conditional distribution tends to be formed on a smaller discrete support set than the former. kth successive engram into working memory as a signal for the observer to probabilistically sample from pMk. The stopping rule for memory retrieval in our model is for n consecutive identical samples being drawn in succession during this internal sampling, n remaining a free parameter in the model. This rule is designed to capture the fact that memory search is frugal and self-terminating [15]. The sample drawn at the instant the novelty threshold is breached is overtly recalled. Since this sample is drawn from a distribution constructed by approximately reconstructing the true encoded distribution of situational co-occurrences, the retrieval model is approximately Bayesian. Finally, since our encoding model ensures that the observer knows the joint distribution of event co-occurrences, which contains all the information needed to compute marginals and conditionals also, we further assume that these derivative distributions can also be sampled, using the same retrieval model, when required. We show in this paper that this simple memory model yields both recognition and recall behavior. The difference between recognition and recall is simply that these two retrieval modalities ask two different questions of the same base of encoded memory - the joint distribution p(xi, xl). We illustrate this difference in Figure 1. During recall-based retrieval, experimenters ask participants to remember all the items that were on a previously studied list. In this case, the probabilistic question being asked is ’given xl, find xi’, which our model would answer by sampling p(xi|xl). In item-recognition experiments, experimenters ask participants to determine whether each of several items was on a previously shown list or not. We assert that in this case the probabilistic question being asked is ’given xi. find xl’, which our model would answer by sampling p(xl|xi). Our operationalization of recognition as a question about the list rather than the item runs contrary to previous formalizations, which have tended to model it as the associative activation engendered in the brain by observing a previously seen stimulus - models of recognition memory assume that the activation for previously seen stimuli is greater, for all sorts of reasons. In contrast, recall is modeled in classical memory accounts much the same way as in ours - as a conditional activation of items associated with retrieval cues, including both the item list and temporally contiguous items. Our approach assumes that the same mechanism of conditional activation occurs in recognition as well the difference is that we condition on the item itself. 3 3 Basic prediction: fast recognition and slow recall The sample-based threshold used to terminate memory retrieval in our model ϵ does not depend on the size of the support of the probability distribution being sampled from. This immediately implies that, for the same threshold sample value, the model will take longer to approach it when sampling from a distribution with larger support than when sampling from distributions with smaller support. In classical memory experiments, observers are typically asked to memorize multiple items associated with one, or a few, lists. Thus, there is an ecological bias built into classic memory experiments such that |items| ≫|lists|. Making this assumption immediately rationalizes the apparent difference in speed and effort between recognition and recall in our model. Because the recognition task samples p(list|item), its sample complexity is lower than recall, which involves sampling p(item|list) from memory. To verify this numerically, starting from identical memory encodings in both cases, we ran 1000 simulations of recognition and recall respectively using our retrieval model, using a fixed n = 5 1. The results, measured in terms of the number of retrieval samples k drawn before termination in each of the 1000 trials, are shown in the left panel of Figure 2. The sample complexity of recall is evidently higher than for recognition2. Thus, we suggest that the fundamental difference between recognition and recall - that recognition is easier and recall is harder - is explicable simply by virtue of the ecological bias of memory experiments that use fewer cues than stimuli. The difference in speed between recollection and familiarity processes, as measured in recall and recognition experiments, has been one of the fundamental motivations for proposing that two memory processes are involved in declarative memory. Dual-process accounts have invoked priority arguments instead, e.g. that information has to pass through semantic memory, which is responsible for recognition, before accessing episodic memory which is responsible for recall [17].Single process accounts following in the lineage of SAM [4] have explained the difference by arguing that recognition involves a single comparison of activation values to a threshold, whereas recall involves competition between multiple activations for sampling. Our model rationalizes this distinction made in SAM-style sequential sampling models by arguing that recognition memory retrieval is identical to recall memory retrieval; only the support of the distribution from which the memory trace is to be probabilistically retrieved changes. Thus, instead of using a race to threshold for recognition and a sampling process in recall, this model uses self-terminating sampling in both cases, explaining the main difference between the two tasks - easy recognition and hard recall - as a function of typical ecological parameter choices. This observation also explains the relative indifference of recognition tasks to divided attention conditions, in contrast with recall which is heavily affected [2]. Because of the lower sample complexity of recognition, fewer useful samples are needed to arrive at the correct conclusion. 4 An empirical test The explanation our model offers is simple, but untested. To directly test it, we constructed a simple behavioral experiment, where we would manipulate the number of items and cues keeping the total number of presentations constant, and see how this affected memory performance in both recognition and recall retrieval modalities. Our model predicts that memory performance difficulty scales up with the size of the support of the conditional probability distribution relevant to the retrieval modality. Thus recall, which samples from p(item|list), should become easier as the number of items to recall per cue reduces. Similarly recognition, which samples from p(listlitem), should become harder as the number of cues per item increases. Because classic memory experiments have tended to use more items than cues (lists), our model predicts that such experiments would consistently find recognition to be easier than recall. By inverting this pattern, having more cues than items, for instance, we would expect to see the opposite pattern hold. We tested for this performance crossover using the following experiment. 1Our results are relatively independent of the choice of n, since for any value of n, recognition stays easier than recall so long as the cue-item fan out remains large and vice versa. 2Recall trials that timed out by not returning a sample beyond the maximum time limit (100 samples) are not plotted. These corresponded to 55% of the trials, resulting in a recall hit rate of 45%. In contrast, the average recognition hit rate was 82% for this simulation. 4 {2,7} {3,5} {4,4} {5,3} {7,2} Condition 0 0.5 1 1.5 2 2.5 d' Recognition Recall 0 50 100 0 100 200 300 400 Recognition 0 50 100 0 100 200 300 400 Trials Sample count Recall Figure 2: (Left) Simulation results show easier recognition and harder recall given typical ecological choices for stimuli and cue set sizes. (Right) Results from experiment manipulating the stimuli and cue set size ratio. By manipulating the number of stimuli and cues, we predicted that we would be able to make recall harder than recognition for experiment participants. The results support our prediction unambiguously.Error bars show s.e.m. We used a 2×2 within subject factorial design for this experiment, testing for the effect of the retrieval mode - recognition/recall and either a stimulus heavy, or cue heavy selection of task materials. In addition, we ran two conditions between subjects, using different parameterization of the stimuli/cue ratios. In the stimulus heavy condition, for instance, participants were exposed to 5 stimuli associated with 3 cues, while for the cue heavy condition, they saw 3 stimuli associated with 5 cues. The semantic identity of the stimuli and cue sets were varied across all four conditions randomly, and the order of presentation of conditions to participants was counterbalanced. All participants worked on all four of the memory tasks, with interference avoided with the use of semantically distinct category pairs across the four conditions. Specifically, we used number-letter, vegetable-occupation, fruit-adjective and animal-place category pairs for the four conditions. Within each category, stimuli/cues for a particular presentation were sampled from a 16 item master list, such that a stimulus could not occur twice in conjunction with the same cue, but could occur in conjunction with multiple cues. 120 undergraduates participated in the experiment for course credit. Voluntary consent was obtained from all participants, and the experimental protocol was approved by an institutional IRB. We told experiment participants that they would be participating in a memory experiment, and their goal was to remember as many of the items we showed them as possible. We also told them that the experiment would have four parts, and that once they started working on a part, there would be no opportunity to take a break until it ended. 80 participants performed the experiment with 3/5 and 5/3 stimulus-to-cue mappings, 40 did it with 2/7 and 7/2 stimulus-to-cue mappings. Note that in all cases, participants saw approximately the same number of total stimulus-cue bindings (3x5 = 15 or 2x7 = 14), thus undergoing equivalent cognitive load during encoding. Stimuli and cues were presented onscreen, with each pair appearing on the screen for 3 seconds, followed by an ITI of equal duration. To prevent mnemonic strategy use at the time of encoding, the horizontal orientation of the stimulus-cue pair was randomly selected on each trial, and participants were not told beforehand which item category would be the cue; they could only discover this at the time of retrieval3. Participants were permitted to begin retrieval at their own discretion once the encoding segment of the trial had concluded within each condition. All participants chose to commence retrieval without delay. Participants were also permitted to take breaks of between 2-5 minutes between working on the different conditions, with several choosing to do so. Once participants had seen all item-pairs for one of the conditions, the experiment prompted them to, when ready, click on a button to proceed to the testing phase. In the recall condition, they saw a text box and a sentence asking them to recall all the items that occurred alongside item X, where X was randomly chosen from the set of possible cues for that condition; they responded by typing in the words they remembered. For recognition, participants saw a sentence asking them to identify if X had occurred alongside Y, where Y was randomly chosen from the set of possible cues for that condition. 3An active weblink to the actual experiment is available online at [anonymized weblink]. 5 After each forced yes/no response, a new X was shown. Half the X’s shown in the recognition test were ’lures’ , they had not been originally displayed alongside Y. Memory performance was measured using d’, which is simply the difference between the z-normed hit rate and false alarm rate, as is conventional in recognition experiments. d’ is generally not used to measure recall performance, since the number of true negatives is undefined in classic recall experiments, which leaves the false alarm rate undefined as well. In our setup, the number of true negatives is obviously the number of stimuli the participant saw that were not on the specific list being probed, which is what we used to calculate d-prime for recall as well. The right panel in Figure 2 illustrates the results of our experiment. The predicted crossover is unambiguously observed. Further, changes in memory performance across the stimulus-cue set size manipulation is symmetric across recognition and recall. This is precisely what we’d expect if set size dependence was symmetrically affecting memory performance across both tasks as occurs in our model. While not wishing to read too much into the symmetry of the quantitative result, we note that such symmetry under a simple manipulation of the retrieval conditions appears to suggest that the manipulation does in fact affect memory performance very strongly. Overall, the data strongly supports our thesis - that quantitative differences in memory performance in recognition and recall tasks are driven by differences in the set size of the underlying memory distribution being sampled. The set size of the distribution being sampled, in turn, is determined by task constraints - and ends up being symmetric when comparing single-item recognition with cued recall. 5 Predicting more recognition-recall dissociations The fact that recognition is usually easier than recall - more accurate and quicker for the same stimuli sets - is simply the most prominent difference between the two paradigms. Experimentalists have uncovered a number of interesting manipulations in memory experiments that affect performance on these tasks differentially. These are called recognition-recall dissociations, and are prominent challenges to single-process accounts of the two tasks. Why should a manipulation affect only one task and not the other if they are both outcomes of the same underlying process? [20] Previous single-process accounts have had success in explaining some such dissociations. We focus here on some that have proved relatively hard to explain without making inelegant dissociation-specific assumptions in earlier accounts [13]. 5.1 List strength effects and part set cuing Unidimensional strength-based models of memory like SAM and REM fail to predict the list strength effect [12] where participants’ memory performance in free recall is lower than a controlled baseline for weaker items on mixed lists (lists containing both strongly and weakly encoded items). Such behavior is predicted easily by strength-based models. What they find difficult to explain is that performance does not deviate from baseline in recognition tasks. The classical explanation for this discrepancy is the use of a differentiation assumption. It is assumed that stronger items are associated more strongly to the encoding context, however differences between the item itself as shown, and its encoded image are also stronger. In free recall, this second interaction does not have an effect, since the item itself is not presented, so a positive list strength effect is seen. In recognition, it is conjectured that the two influences cancel each other out, resulting in a null list strength effect [13]. A lot of intricate assumptions have to hold for the differentiation account to hold. Our model has a much simpler explanation for the null list-strength effect in recognition. Recognition involves sampling based on the strength of the associative activation of the list given a specific item and so is independent of the encoding strength of other items. On the other hand, recall involves sampling from p(item|list) across all items, in which case, having a distribution favoring other items will reduce the probability that the unstrengthened items will be sampled. Thus, the difference in which variable the retrieval operation conditions on explains the respective presence and absence of a list strength effect in recall and recognition. The left panel in Figure 3 presents simulation results from our model reproducing this effect, where we implement mixed lists by presenting certain stimuli more frequently during encoding and retrieve in the usual manner. Hit rates are calculated for less frequently presented stimuli. For either elicitation modality, the actual outcome of the retrieval itself is sampled from the appropriate conditional 6 distribution as a specific item/cue. In this particular experiment, which manipulates how much training observers have on some of the items on the list, the histories entering the simulation are generated such that some items co-occur with the future retrieval cue more frequently than others, i.e. two items occur with a probability of 0.4 and 0.3 respectively, and three items occur with a probability of 0.1 each alongside the cue. The simulation shows a positive list strength effect for recall (weaker hit rates for less studied items) and a null list strength effect for recognition, congruent with data. Our model also reconciles the results of [1] who demonstrated that the list strength effect does not occur if we examine only items that are the first in their category to be retrieved. For categoryinsensitive strength-based accounts, this is a serious problem. For our account, which is explicitly concerned with how observers co-encode stimuli and retrieval cues, this result is no great mystery. For multi-category memory tests, the presence of each semantic category instantiates a novel list during encoding, such that the strength-dependent updates during retrieval apply to each individual p(item|list) and do not apply across the other category lists. More generally, the dynamic nature of the sampled distribution in our Bayesian theory accommodates the theoretical views of both champions of strength-dependent activation and retrieval-dependent suppression [1]. Strength-dependent activation is present in our model in the form of the Bayesian posterior over cue-relevant targets at the time when cued recall commences; retrieval-dependent suppression of competitors is present in the form of normalization of the distribution during further sequential Bayesian updates as the retrieval process continues. Assigning credit differentially to individual categories predicts an attenuation (though not removal) of the list strength effect, due to the absence of learning-induced changes for the first-tested items, as well diminishing memory performance with testing position seen in [1]. 0 0.2 0.4 0.6 0.8 1 Prepend ratio 0 0.2 0.4 0.6 0.8 1 Fraction Recognition HR Recognition FAR Recall HR Recall FAR Recognition Recall Weak item hit rate Baseline Mixed 0.2 0.4 0.6 0.8 1.0 0 Figure 3: Reproducing (left) list strength effects and (right) the word frequency mirror effect using our model. The part set cueing effect is the observation that showing participants a subset of the items to be recalled during retrieval reduces their recall performance for non-shown items [11]. This effect does not appear in recognition experiments, which is again problematic for unidimensional strength-based memory models. Our model has a simple explanation. The presented items during retrieval are simply treated as further encoding opportunities for the seen items, resulting in a list strength imbalance as above. This affects recall, but not recognition for the same reasons the list strength effect does. 5.2 Mirror effect Another interesting effect that strength-based memory models have found hard to explain is the word-frequency mirror effect [5]. This is seen when participants see two different classes of items in recognition experiments. It is found, for instance, that unique items are both recognized more accurately as previously seen and unseen in such experiments than common items. Such a pattern of memory performance is contrary to the predictions of nearly all accounts of memory that depend on unidimensional measures of memory strength, who can only model adaptive changes in memory performance via shifts in the response criterion [19] that do not permit both the hit rate and the false alarm rate to improve simultaneously. 7 The essential insight of the mirror effect is that some types of stimuli are intrinsically more memorable than others, a common-sense observation that has proved surprisingly difficult for strength-based memory models to assimilate.This difficulty extends to our own model also, but our inductive framework allows us to express the assumptions about information that the stimuli base frequency adds to the picture in a clean way. Specifically, in our model observers use p(list|item) for recognition, which is high for unique items and low for common items by Bayesian inversion because p(item|list)/p(item) ≈1 for unique items, because they are unlikely to have been encountered outside the experimental context, and ≪1 for common items. In contrast, observers sample from p(item|list) during recall, removing the effect of the frequency base rate p(item), so that the pattern of results is inverted: performance is equivalent or better than baseline for common stimuli than for rare ones [6], since they are more likely to be retrieved in general. The right panel in Figure 3 shows simulation results using our model wherein we used two possible cues during encoding, one to test performance during retrieval and one to modify the non-retrieval frequency of stimuli encounters. For this experiment, which manipulates where we have to influence how often the relative frequency with which the observers have seen the items in task-irrelevant contexts other than the retrieval task, we prepended the base case history (of size 50 time steps) with differently sized prior history samples (between 10 and 50 time steps long, in steps of 5), wherein items co-occurred with cues that were not used during retrieval. The simulation results show that, in recognition, hit rates drop and false alarm rates rise with more exposure to items outside the experimental list context (high frequency items). Since our model assumes unambiguous cue conditioning, it predicts unchanged performance from baseline for recall. More intricate models that permit cue-cue associations may reproduce the advantage for common items documented empirically. 6 Discussion We have made a very simple proposal in this paper. We join multiple previous authors in arguing that memory retrieval in cued recall tasks can be interpreted as a question about the likelihood of retrieving an item given the retrieval cue, typically the list of items given at the time of encoding [17, 8, 4]. We depart from previous authors in arguing that memory retrieval in item recognition tasks asks the precisely opposite question: what is the likelihood of a given item having been associated with the list? We integrated this insight into a simple inference-based model of memory encoding, which shares its formal motivations with recent inference-based models of conditioning [3, 14], and an approximately Bayesian model of memory retrieval, which samples memory frugally along lines motivated on information-theoretic [18] and ecological grounds [16] by recent work. Our model is meant to be expository and ignores several large issues that other richer models typically engage with. For instance, it is silent about the time decay of memory particles, the partitioning of the world into items and cues, and how it would go about explaining other more intricate memory tasks like plurality discrimination and remember-know judgments. These omissions are deliberate, in the sense that we wanted to present a minimal model to deliver the core intuition behind our approach - that differences in memory performance in recognition and recall are attributable to no deeper issue than an ecological preference to test memory using more items than lists. This observation can now subsequently guide and constrain the construction of more realistic models of declarative memory [3]. To the extent that differences traditionally used to posit dual-process accounts of memory can be accounted for using simpler models like ours, the need to proliferate neuroanatomical and process-level distinctions for various memory operations can be concomitantly reduced. The distinction between recall and recognition memory also has important implications for the presumed architecture of machine learning systems. Modern ML systems increasingly rely on a combination of distributed representation of sensory information (using deep nets) and state-centric representation of utility information (using reinforcement learning) to achieve human-like learning and transfer capabilities, for example in simple Atari games [10]. The elicitation of class or category membership in neural networks is quintessentially a recognition task, while the elicitation of state value functions, as well as other intermediate computations in RL are clearly recall tasks. Partly in realization of the large differences in the sort of memory required to support these two classes of learning models, researchers have taken to postulating dual-process artificial memories [7]. Our demonstration of the fundamental unitarity of the two modes of memory performance can and should constrain the design of deep RL models in simpler ways. 8 References [1] Karl-heinz Bäuml. The list-strength effect: Strength-dependent competition or suppression? Psychonomic Bulletin & Review, 4(2):260–264, 1997. [2] Fergus IM Craik, Richard Govoni, Moshe Naveh-Benjamin, and Nicole D Anderson. The effects of divided attention on encoding and retrieval processes in human memory. Journal of Experimental Psychology: General, 125(2):159, 1996. [3] Samuel J Gershman, David M Blei, and Yael Niv. Context, learning, and extinction. Psychological review, 117(1):197, 2010. [4] Gary Gillund and Richard M Shiffrin. A retrieval model for both recognition and recall. Psychological review, 91(1):1, 1984. [5] Murray Glanzer and John K Adams. The mirror effect in recognition memory: data and theory. Journal of Experimental Psychology: Learning, Memory, and Cognition, 16(1):5, 1990. [6] Vernon Gregg. Word frequency, recognition and recall. John Wiley & Sons, 1976. [7] Dharshan Kumaran, Demis Hassabis, and James L McClelland. What learning systems do intelligent agents need? complementary learning systems theory updated. Trends in Cognitive Sciences, 20(7):512–534, 2016. [8] George Mandler. Recognizing: The judgment of previous occurrence. Psychological review, 87(3):252, 1980. [9] James L McClelland, Bruce L McNaughton, and Randall C O’reilly. Why there are complementary learning systems in the hippocampus and neocortex: insights from the successes and failures of connectionist models of learning and memory. Psychological review, 102(3):419, 1995. [10] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. [11] Raymond S Nickerson. Retrieval inhibition from part-set cuing: A persisting enigma in memory research. Memory & cognition, 12(6):531–552, 1984. [12] Roger Ratcliff, Steven E Clark, and Richard M Shiffrin. List-strength effect: I. data and discussion. Journal of Experimental Psychology: Learning, Memory, and Cognition, 16(2):163, 1990. [13] Richard M Shiffrin and Mark Steyvers. A model for recognition memory: Rem—retrieving effectively from memory. Psychonomic bulletin & review, 4(2):145–166, 1997. [14] Nisheeth Srivastava and Paul R Schrater. Classical conditioning via inference over observable situation contexts. In Proceedings of the Annual Meeting of the Cognitive Science Society, 2014. [15] Saul Sternberg. Memory-scanning: Mental processes revealed by reaction-time experiments. American scientist, 57(4):421–457, 1969. [16] Peter M Todd and Gerd Gigerenzer. Environments that make us smart: Ecological rationality. Current Directions in Psychological Science, 16(3):167–171, 2007. [17] Endel Tulving and Donald M Thomson. Retrieval processes in recognition memory: Effects of associative context. Journal of Experimental Psychology, 87(1):116, 1971. [18] Edward Vul, Noah Goodman, Thomas L Griffiths, and Joshua B Tenenbaum. One and done? optimal decisions from very few samples. Cognitive science, 38(4):599–637, 2014. [19] John T Wixted. Dual-process theory and signal-detection theory of recognition memory. Psychological review, 114(1):152, 2007. [20] Andrew P Yonelinas. The nature of recollection and familiarity: A review of 30 years of research. Journal of memory and language, 46(3):441–517, 2002. 9 | 2017 | 230 |
6,709 | Implicit Regularization in Matrix Factorization Suriya Gunasekar TTI at Chicago suriya@ttic.edu Blake Woodworth TTI at Chicago blake@ttic.edu Srinadh Bhojanapalli TTI at Chicago srinadh@ttic.edu Behnam Neyshabur TTI at Chicago behnam@ttic.edu Nathan Srebro TTI at Chicago nati@ttic.edu Abstract We study implicit regularization when optimizing an underdetermined quadratic objective over a matrix X with gradient descent on a factorization of X. We conjecture and provide empirical and theoretical evidence that with small enough step sizes and initialization close enough to the origin, gradient descent on a full dimensional factorization converges to the minimum nuclear norm solution. 1 Introduction When optimizing underdetermined problems with multiple global minima, the choice of optimization algorithm can play a crucial role in biasing us toward a specific global minima, even though this bias is not explicitly specified in the objective or problem formulation. For example, using gradient descent to optimize an unregularized, underdetermined least squares problem would yield the minimum Euclidean norm solution, while using coordinate descent or preconditioned gradient descent might yield a different solution. Such implicit bias, which can also be viewed as a form of regularization, can play an important role in learning. In particular, implicit regularization has been shown to play a crucial role in training deep models [14, 13, 18, 11]: deep models often generalize well even when trained purely by minimizing the training error without any explicit regularization, and when there are more parameters than samples and the optimization problem is underdetermined. Consequently, there are many zero training error solutions, all global minima of the training objective, many of which generalize badly. Nevertheless, our choice of optimization algorithm, typically a variant of gradient descent, seems to prefer solutions that do generalize well. This generalization ability cannot be explained by the capacity of the explicitly specified model class (namely, the functions representable in the chosen architecture). Instead, it seems that the optimization algorithm biases us toward a “simple" model, minimizing some implicit “regularization measure”, and that generalization is linked to this measure. But what are the regularization measures that are implicitly minimized by different optimization procedures? As a first step toward understanding implicit regularization in complex models, in this paper we carefully analyze implicit regularization in matrix factorization models, which can be viewed as two-layer networks with linear transfer. We consider gradient descent on the entries of the factor matrices, which is analogous to gradient descent on the weights of a multilayer network. We show how such an optimization approach can indeed yield good generalization properties even when the problem is underdetermined. We identify the implicit regularizer as the nuclear norm, and show that even when we use a full dimensional factorization, imposing no constraints on the factored matrix, optimization by gradient descent on the factorization biases us toward the minimum nuclear norm solution. Our empirical study leads us to conjecture that with small step sizes and initialization close 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. to zero, gradient descent converges to the minimum nuclear norm solution, and we provide empirical and theoretical evidence for this conjecture, proving it in certain restricted settings. 2 Factorized Gradient Descent for Matrix Regression We consider least squares objectives over matrices X ∈Rn×n of the form: min X⪰0 F(X) = ∥A(X) −y∥2 2. (1) where A : Rn×n →Rm is a linear operator specified by A(X)i = ⟨Ai, X⟩, Ai ∈Rn×n, and y ∈Rm. Without loss of generality, we consider only symmetric positive semidefinite (p.s.d.) X and symmetric linearly independent Ai (otherwise, consider optimization over a larger matrix W X X⊤Z with A operating symmetrically on the off-diagonal blocks). In particular, this setting covers problems including matrix completion (where Ai are indicators, [5]), matrix reconstruction from linear measurements [15] and multi-task training (where each column of X is a predictor for a different task and Ai have a single non-zero column, [2, 1]). We are particularly interested in the regime where m ≪n2, in which case (1) is underdetermined with many global minima satisfying A(X) = y. For such underdetermined problems, merely minimizing (1) cannot ensure recovery (in matrix completion or recovery problems) or generalization (in prediction problems). For example, in a matrix completion problem (without diagonal observations), we can minimize (1) by setting all non-diagonal unobserved entries to zero, or to any arbitrary value. Instead of working on X directly, we will study a factorization X = UU ⊤. We can write (1) equivalently as optimization over U as, min U∈Rn×d f(U) =
A(UU ⊤) −y
2 2. (2) When d < n, this imposes a constraint on the rank of X, but we will be mostly interested in the case d = n, under which no additional constraint is imposed on X (beyond being p.s.d.) and (2) is equivalent to (1). Thus, if m ≪n2, then (2) with d = n is similarly underdetermined and can be optimized in many ways – estimating a global optima cannot ensure generalization (e.g. imputing zeros in a matrix completion objective). Let us investigate what happens when we optimize (2) by gradient descent on U. To simulate such a matrix reconstruction problem, we generated m ≪n2 random measurement matrices and set y = A(X∗) according to some planted X∗⪰0. We minimized (2) by performing gradient descent on U to convergence, and then measured the relative reconstruction error ∥X −X∗∥F /∥X∗∥F for X = UU ⊤. Figure 1 shows the normalized training objective and reconstruction error as a function of the dimensionality d of the factorization, for different initialization and step-size policies, and three different planted X∗. First, we see that (for sufficiently large d) gradient descent indeed finds a global optimum, as evidenced by the training error (the optimization objective) being zero. This is not surprising since with large enough d this non-convex problem has no spurious local minima [4, 9] and gradient descent converges almost surely to a global optima [12]; there has also been recent work establishing conditions for global convergence for low d [3, 7]. The more surprising observation is that in panels (a) and (b), even when d > m/n, indeed even for d = n, we still get good reconstructions from the solution of gradient descent with initialization U0 close to zero and small step size. In this regime, (2) is underdetermined and minimizing it does not ensure generalization. To emphasize this, we plot the reference behavior of a rank unconstrained global minimizer Xgd obtained via projected gradient descent for (1) on the X space. For d < n we also plot an example of an alternate “bad" rank d global optima obtained with an initialization based on SVD of Xgd (‘SVD Initialization’). When d < m/n, we understand how the low-rank structure can guarantee generalization [16] and reconstruction [10, 3, 7]. What ensures generalization when d ≫m/n? Is there a strong implicit regularization at play for the case of gradient descent on factor space and initialization close to zero? Observing the nuclear norm of the resulting solutions plotted in Figure 2 suggests that gradient descent implicitly induces a low nuclear norm solution. This is the case even for d = n when the factorization 2 0 10 20 30 40 50 dimension d 0.0 0.2 0.4 0.6 0.8 Relative error (a) Low rank X ∗ 0 10 20 30 40 50 dimension d 0.0 0.2 0.4 0.6 0.8 (b) Low nuclear norm X ∗ 0 10 20 30 40 50 dimension d 0.0 0.5 1.0 1.5 2.0 (c) Low rank X ∗, m = nr/4 Training error ∥U0∥F = 10−4, η¯ ELS ∥U0∥F = 10−4, η = 10−3 SVD Initialization ∥U0∥F = 1, η = 10−3 Xgd Figure 1: Reconstruction error of the global optima for 50×50 matrix reconstruction. (Left) X∗is of rank r = 2 and m = 3nr; (Center) X∗has a spectrum decaying as O(1/k1.5) normalized to have ∥X∗∥∗= √r∥X∗∥F for r = 2 and m = 3nr, and (Right) is a non-reconstructable setting where the number of measurements m = nr/4 is much smaller than the requirement to reconstruct a rank r = 2 matrix. The plots compare the reconstruction error of gradient descent on U for different choices initialization U0 and step size η, including fixed step-size and exact line search clipped for stability (ηELS). Additonally, the orange dashed reference line represents the performance of Xgd – a rank unconstrained global optima obtained by projected gradient descent for (1) on X space, and ‘SVD-Initialization’ is an example of an alternate rank d global optima, where initialization U0 is picked based on SVD of Xgd and gradient descent is run on factor space with small stepsize. Training error behaves similarly in all these settings (zero for d ≥2) and is plotted for reference. Results are averaged across 3 random initialization and (near zero) errorbars indicate the standard deviation. 0 10 20 30 40 50 dimension d 1.5 2.0 2.5 Nuclear norm (a) Low rank X ∗ 0 10 20 30 40 50 dimension d 1.0 1.5 2.0 2.5 (b) Low nuclear norm X ∗ 0 10 20 30 40 50 dimension d 0.6 0.8 1.0 1.2 (c) Low rank X ∗, m = nr/4 ∥U0∥F = 10−4, η = 10−3 SVD Initialization ∥U0∥F = 10−4, η¯ ELS Xgd min A(X) = y∥X∥∗ Figure 2: Nuclear norm of the solutions from Figure 1. In addition to the reference of Xgd from Figure 1, the magenta dashed line (almost overlapped by the plot of ∥U∥F = 10−4, η = 10−3) is added as a reference for the (rank unconstrained) minimum nuclear norm global optima. The error bars indicate the standard deviation across 3 random initializations. We have dropped the plot for ∥U∥F = 1, η = 10−3 to reduce clutter. imposes no explicit constraints. Furthermore, we do not include any explicit regularization and optimization is run to convergence without any early stopping. In fact, we can see a clear bias toward low nuclear norm even in problems where reconstruction is not possible: in panel (c) of Figure 2 the number of samples m = nr/4 is much smaller than those required to reconstruct a rank r ground truth matrix X∗. The optimization in (2) is highly underdetermined and there are many possible zero-error global minima, but gradient descent still prefers a lower nuclear norm solution. The emerging story is that gradient descent biases us to a low nuclear norm solution, and we already know how having low nuclear norm can ensure generalization [17, 6] and minimizing the nuclear norm ensures reconstruction [15, 5]. Can we more explicitly characterize this bias? We see that we do not always converge precisely to the minimum nuclear norm solution. In particular, the choice of step size and initialization affects which solution gradient descent converges to. Nevertheless, as we formalize in Section 3, we argue that when U is full dimensional, the step size becomes small enough, and the initialization approaches zero, gradient descent will converge precisely to a minimum nuclear norm solution, i.e. to argminX⪰0 ∥X∥∗s.t. A(X) = y. 3 Gradient Flow and Main Conjecture The behavior of gradient descent with infinitesimally small step size is captured by the differential equation ˙Ut := dUt dt = −∇f(Ut) with an initial condition for U0. For the optimization in (2) this is ˙Ut = −A∗(A(UtU ⊤ t ) −y)Ut, (3) 3 where A∗: Rm →Rn×n is the adjoint of A and is given by A∗(r) = P i riAi. Gradient descent can be seen as a discretization of (3), and approaches (3) as the step size goes to zero. The dynamics (3) define the behavior of the solution Xt = UtU ⊤ t and using the chain rule we can verify that ˙Xt = ˙UtU ⊤ t + Ut ˙U ⊤ t = −A∗(rt)Xt −XtA∗(rt), where rt = A(Xt) −y is a vector of the residual. That is, even though the dynamics are defined in terms of specific factorization Xt = UtU ⊤ t , they are actually independent of the factorization and can be equivalently characterized as ˙Xt = −A∗(rt)Xt −XtA∗(rt). (4) We can now define the limit point X∞(Xinit) := limt→∞Xt for the factorized gradient flow (4) initialized at X0 = Xinit. We emphasize that these dynamics are very different from the standard gradient flow dynamics of (1) on X, corresponding to gradient descent on X, which take the form ˙Xt = −∇F(Xt) = −A∗(rt). Based on the preliminary experiments in Section 2 and a more comprehensive numerical study discussed in Section 5, we state our main conjecture as follows: Conjecture. For any full rank Xinit, if b X = limα→0 X∞(αXinit) exists and is a global optima for (1) with A( b X) = y, then b X ∈argminX⪰0 ∥X∥∗s.t. A(X) = y. Requiring a full-rank initial point demands a full dimensional d = n factorization in (2). The assumption of global optimality in the conjecture is generally satisfied: for almost all initializations, gradient flow will converge to a local minimizer [12], and when d = n any such local minimizer is also global minimum [9]. Since we are primarily concerned with underdetermined problems, we expect the global optimum to achieve zero error, i.e. satisfy A(X) = y. We already know from these existing literature that gradient descent (or gradient flow) will generally converge to a solution satisfying A(X) = y; the question we address here is which of those solutions will it converge to. The conjecture implies the same behavior for asymmetric factorization as X = UV ⊤with gradient flow on (U, V ), since this is equivalent to gradient flow on the p.s.d. factorization of W X X⊤Z . 4 Theoretical Analysis We will prove our conjecture for the special case where the matrices Ai commute, and discuss the more challenging non-commutative case. But first, let us begin by reviewing the behavior of straight-forward gradient descent on X for the convex problem in (1). Warm up: Consider gradient descent updates on the original problem (1) in X space, ignoring the p.s.d. constraint. The gradient direction ∇F(X) = A∗(A(X) −y) is always spanned by the m matrices Ai. Initializing at Xinit = 0, we will therefore always remain in the m-dimensional subspace L = {X = A∗(s)|s ∈Rm}. Now consider the optimization problem minX ∥X∥2 F s.t. A(X) = y. The KKT optimality conditions for this problem are A(X) = y and ∃ν s.t. X = A∗(ν). As long as we are in L, the second condition is satisfied, and if we converge to a zero-error global minimum, then the first condition is also satisfied. Since gradient descent stays on this manifold, this establishes that if gradient descent converges to a zero-error solution, it is the minimum Frobenius norm solution. Getting started: m = 1 Consider the simplest case of the factorized problem when m = 1 with A1 = A and y1 = y. The dynamics of (4) are given by ˙Xt = −rt(AXt + XtA), where rt is simply a scalar, and the solution for Xt is given by, Xt = exp (stA) X0 exp (stA) where sT = − R T 0 rtdt. Assuming b X = limα→0 X∞(αX0) exists and A( b X) = y, we want to show b X is an optimum for the following problem min X⪰0 ∥X∥∗s.t. A(X) = y. (5) The KKT optimality conditions for (5) are: ∃ν ∈Rm s.t. A(X) = y X ⪰0 A∗(ν) ⪯I (I −A∗(ν))X = 0 (6) We already know that the first condition holds, and the p.s.d. condition is guaranteed by the factorization of X. The remaining complementary slackness and dual feasibility conditions effectively require 4 that b X is spanned by the top eigenvector(s) of A. Informally, looking to the gradient flow path above, for any non-zero y, as α →0 it is necessary that |s∞| →∞in order to converge to a global optima, thus eigenvectors corresponding to the top eigenvalues of A will dominate the span of X∞(αXinit). What we can prove: Commutative {Ai}i∈[m] The characterization of the the gradient flow path from the previous section can be extended to arbitrary m in the case that the matrices Ai commute, i.e. AiAj = AjAi for all i, j. Defining sT = − R T 0 rtdt – a vector integral, we can verify by differentiating that solution of (4) is Xt = exp (A∗(st)) X0 exp (A∗(st)) (7) Theorem 1. In the case where matrices {Ai}m i=1 commute, if b X = limα→0 X∞(αI) exists and is a global optimum for (1) with A( b X) = y, then b X ∈argminX⪰0 ∥X∥∗s.t. A(X) = y. Proof. It suffices to show that such a b X satisfies the complementary slackness and dual feasibility KKT conditions in (6). Since the matrices Ai commute and are symmetric, they are simultaneously diagonalizable by a basis v1, .., vn, and so is A∗(s) for any s ∈Rm. This implies that for any α, X∞(αI) given by (7) and its limit b X also have the same eigenbasis. Furthermore, since X∞(αI) converges to b X, the scalars v⊤ k X∞(αI)vk →v⊤ k b Xvk for each k ∈[n]. Therefore, λk(X∞(αI)) → λk( b X), where λk(·) is defined as the eigenvalue corresponding to eigenvector vk and not necessarily the kth largest eigenvalue. Let β = −log α, then using X0 = e−βI in (7), λk(X∞(αI)) = exp(2λk(A∗(s∞(β))) −2β). For all k such that λk( b X) > 0, by the continuity of log, we have 2λk(A∗(s∞(β))) −2β −log λk( b X) →0 =⇒λk A∗ s∞(β) β −1 −log λk( b X) 2β →0. (8) Defining ν(β) = s∞(β)/β, we conclude that for all k such that λk( b X) ̸= 0, limβ→∞λk(A∗(ν(β))) = 1. Similarly, for each k such that λk( b X) = 0, exp(2λk(A∗(s∞(β))) −2β) →0 =⇒exp(λk(A∗(ν(β))) −1)2β →0. (9) Thus, for every ϵ ∈(0, 1], for sufficiently large β exp(λk(A∗(ν(β))) −1) < ϵ 1 2β < 1 =⇒λk(A∗(ν(β))) < 1. (10) Therefore, we have shown that limβ→∞A∗(ν(β)) ⪯I and limβ→∞A∗(ν(β)) b X = b X establishing the optimality of b X for (5). Interestingly, and similarly to gradient descent on X, this proof does not exploit the particular form of the “control" rt and only relies on the fact that the gradient flow path stays within the manifold M = {X = exp (A∗(s)) Xinit exp (A∗(s)) | s ∈Rm} . (11) Since the Ai’s commute, we can verify that the tangent space of M at a point X is given by TXM = Span {AiX + XAi}i∈[m], thus gradient flow will always remain in M. For any control rt such that following ˙Xt = −A∗(rt)Xt −XtA∗(rt) leads to a zero error global optimum, that optimum will be a minimum nuclear norm solution. This implies in particular that the conjecture extends to gradient flow on (2) even when the Euclidean norm is replaced by certain other norms, or when only a subset of measurements are used for each step (such as in stochastic gradient descent). However, unlike gradient descent on X, the manifold M is not flat, and the tangent space at each point is different. Taking finite length steps, as in gradient descent, would cause us to “fall off" of the manifold. To avoid this, we must take infinitesimal steps, as in the gradient flow dynamics. In the case that Xinit and the measurements Ai are diagonal matrices, gradient descent on (2) is equivalent to a vector least squares problem, parametrized in terms of the square root of entries: Corollary 2. Let x∞(xinit) be the limit point of gradient flow on minu∈Rn ∥Ax(u) −y∥2 2 with initialization xinit, where x(u)i = u2 i , A ∈Rm×n and y ∈Rm. If bx = limα→0 x∞(α⃗1) exists and Abx = y, then bx ∈argminx∈Rm + ∥x∥1 s.t. Ax = y. 5 The plot thickens: Non-commutative {Ai}i∈[m] Unfortunately, in the case that the matrices Ai do not commute, analysis is much more difficult. For a matrix-valued function F, d dt exp(Ft) is equal to ˙Ft exp(Ft) only when ˙Ft and Ft commute. Therefore, (7) is no longer a valid solution for (4). Discretizing the solution path, we can express the solution as the “time ordered exponential": Xt = lim ϵ→0 1 Y τ=t/ϵ exp (−ϵA∗(rτϵ)) X0 t/ϵ Y τ=1 exp (−ϵA∗(rτϵ)) , (12) where the order in the products is important. If Ai commute, the product of exponentials is equal to an exponential of sums, which in the limit evaluates to the solution in (7). However, since in general exp(A1) exp(A2) ̸= exp(A1 + A2), the path (12) is not contained in the manifold M defined in (11). It is tempting to try to construct a new manifold M′ such that Span {AiX + XAi}i∈[m] ⊆TXM′ and X0 ∈M′, ensuring the gradient flow remains in M′. However, since Ai’s do not commute, by combining infinitesimal steps along different directions, it is possible to move (very slowly) in directions that are not of the form A∗(s)X + XA∗(s) for any s ∈Rm. The possible directions of movements indeed corresponds to the Lie algebra defined by the closure of {Ai}m i=1 under the commutator operator [Ai, Aj] := AiAj −AjAi. Even when m = 2, this closure will generally encompass all of Rn×n, allowing us to approach any p.s.d. matrix X with some (wild) control rt. Thus, we cannot hope to ensure the KKT conditions for an arbitrary control as we did in the commutative case — it is necessary to exploit the structure of the residuals A(Xt) −y in some way. Nevertheless, in order to make finite progress moving along a commutator direction like [Ai, Aj]Xt + Xt[Ai, Aj]⊤, it is necessary to use an extremely non-smooth control, e.g., looping 1/ϵ2 times between ϵ steps in the directions Ai, Aj, −Ai, −Aj, each such loop making an ϵ2 step in the desired direction. We expect the actual residuals rt to behave much more smoothly and that for smooth control the non-commutative terms in the expansion of the time ordered exponential (12) are asymptotically lower order then the direct term A∗(s) (as Xinit →0). This is indeed confirmed numerically, both for the actual residual controls of the gradient flow path, and for other random controls. 5 Empirical Evidence Beyond the matrix reconstruction experiments of Section 2, we also conducted experiments with similarly simulated matrix completion problems, including problems where entries are sampled from power-law distributions (thus not satisfying incoherence), as well as matrix completion problem on non-simulated Movielens data. In addition to gradient descent, we also looked more directly at the gradient flow ODE (3) and used a numerical ODE solver provided as part of SciPy [8] to solve (3). But we still uses a finite (non-zero) initialization. We also emulated staying on a valid “steering path" by numerically approximating the time ordered exponential of 12 — for a finite discretization η, instead of moving linearly in the direction of the gradient ∇f(U) (like in gradient descent), we multiply Xt on right and left by e−ηA∗(rt). The results of these experiments are summarized in Figure 3. In these experiments, we again observe trends similar to those in Section 2. In some panels in Figure 3, we do see a discernible gap between the minimum nuclear norm global optima and the nuclear norm of the gradient flow solution with ∥U0∥F = 10−4. This discrepancy could either be due to starting at a non-limit point of U0, or numerical issue arising from approximations to the ODE, or it could potentially suggest a weakening of the conjecture. Even if the later case were true, the experiments so far provide strong evidence for atleast approximate versions of our conjecture being true under a wide range of problems. 6 (a) Low rank X ∗ (b) Low nuclear norm X ∗ (c) Low rank X∗, m = nr 4 0.0 0.5 1.0 1.5 2.0 2.5 3.0 Nuclear norm min A(X) = y∥X∥∗ ODE approx. ∥U0∥F = 10−4 Time ordered exp. ∥U0∥F = 10−4, η = 0. 1 Gradient descent ∥U0∥F = 10−4, η = 10−3 Xgd (i) Gaussian random measurements. We report the nuclear norm of the gradient flow solutions from three different approximations to (3) – numerical ODE solver (ODE approx.), time ordered exponential specified in (12) (Time ordered exp.) and standard gradient descent with small step size (Gradient descent). The nuclear norm of the solution from gradient descent on X space – Xgd and the minimum nuclear norm global minima are provided as references. In (a) X∗is rank r and m = 3nr, in (b) X∗has a decaying spectrum with ∥X∗∥∗= √r∥X∗∥F and m = 3nr, and in (c) X∗is rank r with m = nr/4, where n = 50, r = 2. (a) Low rank X ∗ (b) Low nuclear norm X ∗ (c) Low rank X∗, m = nr 4 0.0 0.5 1.0 1.5 2.0 2.5 Nuclear norm (ii) Uniform matrix completion: ∀i, Ai measures a uniform random entry of X∗. Details on X∗, number of measurements, and the legends follow Figure3-(i). (a) Low rank X ∗ (b) Low nuclear norm X ∗ (c) Low rank X∗, m = nr 4 0.0 0.2 0.4 0.6 0.8 1.0 1.2 Nuclear norm (iii) Power law matrix completion: ∀i, Ai measures a random entry of X∗chosen according to a power law distribution. Details on X∗, number of measurements, and the legends follow Figure3-(i). argminA(X)=y ∥X∥∗ Gradient descent ∥U0∥F = 10−3, η = 10−2 Xgd Test Error 0.2880 0.2631 1.000 Nuclear norm 8391 8876 20912 (iv) Benchmark movie recommendation dataset — Movielens 100k. The dataset contains ∼100k ratings from n1 = 943 users on n2 = 1682 movies. In this problem, gradient updates are performed on the asymmetric matrix factorization space X = UV ⊤with dimension d = min (n1, n2). The training data is completely fit to have <10−2 error. Test error is computed on a held out data of 10 ratings per user. Here we are not interested in the recommendation performance (test error) itself but on observing the bias of gradient flow with initialization close to zero to return a low nuclear norm solution — the test error is provided merely to demonstrate the effectiveness of such a bias in this application. Also, due to the scale of the problem, we only report a coarse approximation of the gradient flow 3 from gradient descent with ∥U0∥F = 10−3, η = 10−2. Figure 3: Additional matrix reconstruction experiments Exhaustive search Finally, we also did experiments on an exhaustive grid search over small problems, capturing essentially all possible problems of this size. We performed an exhaustive grid search for matrix completion problem instances in symmetric p.s.d. 3 × 3 matrices. With m = 4, there are 15 unique masks or {Ai}i∈[4]’s that are valid symmetric matrix completion observations. 7 For each mask, we fill the m = 4 observations with all possible combinations of 10 uniformly spaced values in the interval [−1, 1]. This gives us a total of 15 × 104 problem instances. Of these problems instances, we discard the ones that do not have a valid PSD completion and run the ODE solver on every remaining instance with a random U0 such that ∥U0∥F = ¯α, for different values of ¯α. Results on the deviation from the minimum nuclear norm are reported in Figure 4. For small ¯α = 10−5, 10−3, most of instances of our grid search algorithm returned solutions with near minimal nuclear norms, and the deviations are within the possibility of numerical error. This behavior also decays for ¯α = 1. 0.2 0.0 0.2 ∆(X∞) 0 5000 10000 15000 20000 Number of experiments (a) α = 10−5 0.2 0.0 0.2 ∆(X∞) (b) α = 10−3 0.2 0.0 0.2 ∆(X∞) (c) α = 1 Figure 4: Histogram of relative sub-optimality of nuclear norm of X∞in grid search experiments. We plot the histogram of ∆(X∞) = ∥X∞∥∗−∥Xmin∥∗ ∥Xmin∥∗ , where ∥Xmin∥∗= min A(X)=y∥X∥∗. The panels correspond to different values of norm of initialization ¯α = ∥U0∥F . (Left) ¯α = 10−5, (Center) ¯α = 10−3, and (Right) ¯α = 1. 6 Discussion It is becoming increasingly apparent that biases introduced by optimization procedures, especially for under-determined problems, are playing a key role in learning. Yet, so far we have very little understanding of the implicit biases associated with different non-convex optimization methods. In this paper we carefully study such an implicit bias in a two-layer non-convex problem, identify it, and show how even though there is no difference in the model class (problems (1) and (2) are equivalent when d = n, both with very high capacity), the non-convex modeling induces a potentially much more useful implicit bias. We also discuss how the bias in the non-convex case is much more delicate then in convex gradient descent: since we are not restricted to a flat manifold, the bias introduced by optimization depends on the step sizes taken. Furthermore, for linear least square problems (i.e. methods based on the gradients w.r.t. X in our formulation), any global optimization method that uses linear combination of gradients, including conjugate gradient descent, Nesterov acceleration and momentum methods, remains on the manifold spanned by the gradients, and so leads to the same minimum norm solution. This is not true if the manifold is curved, as using momentum or passed gradients will lead us to “shoot off” the manifold. Much of the recent work on non-convex optimization, and matrix factorization in particular, has focused on global convergence: whether, and how quickly, we converge to a global minima. In contrast, we address the complimentary question of which global minima we converge to. There has also been much work on methods ensuring good matrix reconstruction or generalization based on structural and statistical properties. We do not assume any such properties, nor that reconstruction is possible or even that there is anything to reconstruct—for any problem of the form (1) we conjecture that (4) leads to the minimum nuclear norm solution. Whether such a minimum nuclear norm solution is good for reconstruction or learning is a separate issue already well addressed by the above literature. We based our conjecture on extensive numerical simulations, with random, skewed, reconstructible, non-reconstructible, incoherent, non-incoherent, and and exhaustively enumerated problems, some of which is reported in Section 5. We believe our conjecture holds, perhaps with some additional technical conditions or corrections. We explain how the conjecture is related to control on manifolds and the time ordered exponential and discuss a possible approach for proving it. 8 References [1] Yonatan Amit, Michael Fink, Nathan Srebro, and Shimon Ullman. Uncovering shared structures in multiclass classification. In Proceedings of the 24th international conference on Machine learning, pages 17–24. ACM, 2007. [2] Andreas Argyriou, Theodoros Evgeniou, and Massimiliano Pontil. Multi-task feature learning. Advances in neural information processing systems, 19:41, 2007. [3] Srinadh Bhojanapalli, Behnam Neyshabur, and Nathan Srebro. Global optimality of local search for low rank matrix recovery. Advances in Neural Information Processing Systems, 2016. [4] Samuel Burer and Renato DC Monteiro. A nonlinear programming algorithm for solving semidefinite programs via low-rank factorization. Mathematical Programming, 95(2):329–357, 2003. [5] Emmanuel J Candès and Benjamin Recht. Exact matrix completion via convex optimization. Foundations of Computational mathematics, 9(6):717–772, 2009. [6] Rina Foygel and Nathan Srebro. Concentration-based guarantees for low-rank matrix reconstruction. In COLT, pages 315–340, 2011. [7] Rong Ge, Jason D Lee, and Tengyu Ma. Matrix completion has no spurious local minimum. In Advances in Neural Information Processing Systems, pages 2973–2981, 2016. [8] Eric Jones, Travis Oliphant, Pearu Peterson, et al. SciPy: Open source scientific tools for Python, 2001. [9] Michel Journée, Francis Bach, P-A Absil, and Rodolphe Sepulchre. Low-rank optimization on the cone of positive semidefinite matrices. SIAM Journal on Optimization, 20(5):2327–2351, 2010. [10] Raghunandan Hulikal Keshavan. Efficient algorithms for collaborative filtering. PhD thesis, STANFORD, 2012. [11] Nitish Shirish Keskar, Dheevatsa Mudigere, Jorge Nocedal, Mikhail Smelyanskiy, and Ping Tak Peter Tang. On large-batch training for deep learning: Generalization gap and sharp minima. In International Conference on Learning Representations, 2016. [12] Jason D. Lee, Max Simchowitz, Michael I. Jordan, and Benjamin Recht. Gradient descent only converges to minimizers. In 29th Annual Conference on Learning Theory, 2016. [13] Behnam Neyshabur, Ryota Tomioka, Ruslan Salakhutdinov, and Nathan Srebro. Geometry of optimization and implicit regularization in deep learning. arXiv preprint arXiv:1705.03071, 2017. [14] Behnam Neyshabur, Ryota Tomioka, and Nathan Srebro. In search of the real inductive bias: On the role of implicit regularization in deep learning. In International Conference on Learning Representations, 2015. [15] Benjamin Recht, Maryam Fazel, and Pablo A Parrilo. Guaranteed minimum-rank solutions of linear matrix equations via nuclear norm minimization. SIAM review, 52(3):471–501, 2010. [16] Nathan Srebro, Noga Alon, and Tommi S Jaakkola. Generalization error bounds for collaborative prediction with low-rank matrices. In Advances In Neural Information Processing Systems, pages 1321–1328, 2005. [17] Nathan Srebro and Adi Shraibman. Rank, trace-norm and max-norm. In International Conference on Computational Learning Theory, pages 545–560. Springer, 2005. [18] Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. In International Conference on Learning Representations, 2017. 9 | 2017 | 231 |
6,710 | Continuous DR-submodular Maximization: Structure and Algorithms An Bian ETH Zurich ybian@inf.ethz.ch Kfir Y. Levy ETH Zurich yehuda.levy@inf.ethz.ch Andreas Krause ETH Zurich krausea@ethz.ch Joachim M. Buhmann ETH Zurich jbuhmann@inf.ethz.ch Abstract DR-submodular continuous functions are important objectives with wide real-world applications spanning MAP inference in determinantal point processes (DPPs), and mean-field inference for probabilistic submodular models, amongst others. DR-submodularity captures a subclass of non-convex functions that enables both exact minimization and approximate maximization in polynomial time. In this work we study the problem of maximizing non-monotone continuous DRsubmodular functions under general down-closed convex constraints. We start by investigating geometric properties that underlie such objectives, e.g., a strong relation between (approximately) stationary points and global optimum is proved. These properties are then used to devise two optimization algorithms with provable guarantees. Concretely, we first devise a “two-phase” algorithm with 1/4 approximation guarantee. This algorithm allows the use of existing methods for finding (approximately) stationary points as a subroutine, thus, harnessing recent progress in non-convex optimization. Then we present a non-monotone FRANK-WOLFE variant with 1/e approximation guarantee and sublinear convergence rate. Finally, we extend our approach to a broader class of generalized DR-submodular continuous functions, which captures a wider spectrum of applications. Our theoretical findings are validated on synthetic and real-world problem instances. 1 Introduction Submodularity is classically most well known for set function optimization, where it enables efficient minimization [23] and approximate maximization [31; 25] in polynomial time. Submodularity has recently been studied on the integer lattice [34; 33] and on continuous domains [3; 4; 36; 21], with significant theoretical results and practical applications. For set functions, it is well known that submodularity is equivalent to the diminishing returns (DR) property. However, this does not hold for integer-lattice functions or continuous functions, where the DR property defines a subclass of submodular functions, called DR-submodular functions. In continuous domains, applying convex optimization techniques enables efficient minimization of submodular continuous functions [3; 36] (despite the non-convex nature of such objectives). In [4] it is further shown that continuous submodularity enables constant-factor approximation schemes for constrained monotone DR-submodular maximization and “box” constrained non-monotone submodular maximization problems. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Many real-world non-convex problems, such as maximizing the softmax extension of DPPs, require maximizing a non-monotone DR-submodular function over a general down-closed convex constraint. Yet, current theory [3; 4; 36] does not apply to this general problem setting, which motivates us to develop guaranteed and efficient algorithms for such problems. Exploring the structure that underlies DR-submodularity is crucial to deriving guaranteed algorithms. Combined with a notion of non-stationarity for constrained optimization problems and a new notion of “strong DR-submodularity”, we find a rich structure in the problem of continuous DR-submodular maximization. This in turn gives rise to two approximation algorithms with provable guarantees. Specifically, we make the following contributions: - We bound the difference between objective values of stationary points and the global optimum. Our analysis shows that the bound is even tighter if the objective is strongly DR-submodular (see Definition 3). - Based on the geometric properties, we present two algorithms: (i) A two-phase FRANKWOLFE-style algorithm with 1/4 approximation guarantee converges with a 1/ p k rate; (ii) a non-monotone FRANK-WOLFE variant exhibits a 1/e approximation guarantee and converges sublinearly. Even though the worst-case guarantee of the first one is worse than the second, it yields several practical advantages, which we discuss in Section 4.2. - We investigate a generalized class of submodular functions on “conic” lattices. This allows us to model a larger class of non-trivial applications. These include logistic regression with a non-convex separable regularizer, non-negative PCA, etc. To optimize them, we provide a reduction that enables to invoke algorithms for continuous submodular optimization problems. - We experimentally demonstrate the applicability of our methods on both synthetic and realworld problem instances. 1.1 Problem Statement Notation. We use boldface letters, e.g., x to represent a vector, boldface capital letters, e.g., A to denote a matrix. xi is the ith entry of x, Aij is the (ij)th entry of A. We use ei to denote the standard ith basis vector. f(·) is used to denote a continuous function, and F(·) to represent a set function. [n] := {1, ..., n} for an integer n ≥1. k · k means the Euclidean norm by default. Given two vectors x, y, x y means xi yi, 8i. x _ y and x ^ y denote coordinate-wise maximum and coordinate-wise minimum, respectively. The general setup of constrained non-monotone DR-submodular (see Definition 1 below) maximization is, max x2P f(x), (P) where f : X ! R is continuous DR-submodular, X = Qn i=1 Xi, each Xi is an interval [3; 4]. Wlog1, we assume that the lower bound u of X is 0, i.e., X = [0, ¯u]. The set P ✓[0, ¯u] is assumed to be a down-closed convex set, where down-closedness means: x 2 P and 0 y x implies that y 2 P. The diameter of P is D := maxx,y2P kx −yk, and it holds that D k¯uk. We use x⇤to denote the global maximum of (P). One can assume f is non-negative over X, since otherwise one just needs to find a lower bound for the minimum function value of f over [0, ¯u] (and box-constrained submodular minimization can be solved to arbitrary precision in polynomial time [3]). Over continuous domains, a DR-submodular function [4] is a submodular function with the diminishing returns (DR) property, Definition 1 (DR-submodular & DR property). A function f : X 7! R is DR-submodular (has the DR property) if 8a b 2 X, 8i 2 [n], 8k 2 R+ s.t. (kei + a) and (kei + b) are still in X, it holds, f(kei + a) −f(a) ≥f(kei + b) −f(b). (1) If f is differentiable, one can show that Definition 1 is equivalent to rf being an antitone mapping from Rn to Rn. Furthermore, if f is twice-differentiable, the DR property is equivalent to all of the entries of its Hessian being non-positive, i.e., r2 ijf(x) 0, 8x 2 X, i, j 2 [n]. A function f : X 7! R is DR-supermodular iff −f is DR-submodular. We also assume that f has Lipschitz gradients, 1Since otherwise one can work on a new function g(x) := f(x + u) that has 0 as the lower bound of its domain, and all properties of the function are still preserved. 2 Definition 2. A function f has L-Lipschitz gradients if for all x, y 2 X it holds that, krf(x) −rf(y)k Lkx −yk. (2) A brief summary of related work appears in Section 6. 2 Motivating Real-world Examples Many continuous objectives in practice turn out to be DR-submodular. Here we list several of them. More can be found in Appendix B. Softmax extension. Determinantal point processes (DPPs) are probabilistic models of repulsion, that have been used to model diversity in machine learning [26]. The constrained MAP (maximum a posteriori) inference problem of a DPP is an NP-hard combinatorial problem in general. Currently, the methods with the best approximation guarantees are based on either maximizing the multilinear extension [6] or the softmax extension [20], both of which are DR-submodular functions (details in Appendix F.1). The multilinear extension is given as an expectation over the original set function values, thus evaluating the objective of this extension requires expensive sampling. In constast, the softmax extension has a closed form expression, which is much more appealing from a computational perspective. Let L be the positive semidefinite kernel matrix of a DPP, its softmax extension is: f(x) = log det (diag(x)(L −I) + I) , x 2 [0, 1]n, (3) where I is the identity matrix, diag(x) is the diagonal matrix with diagonal elements set as x. The problem of MAP inference in DPPs corresponds to the problem maxx2P f(x), where P is a down-closed convex constraint, e.g., a matroid polytope or a matching polytope. Mean-field inference for log-submodular models. Log-submodular models [9] are a class of probabilistic models over subsets of a ground set V = [n], where the log-densities are submodular set functions F(S): p(S) = 1 Z exp(F(S)). The partition function Z = P S✓V exp(F(S)) is typically hard to evaluate. One can use mean-field inference to approximate p(S) by some factorized distribution qx(S) := Q i2S xi Q j /2S(1 −xj), x 2 [0, 1]n, by minimizing the distance measured w.r.t. the Kullback-Leibler divergence between qx and p, i.e., P S✓V qx(S) log qx(S) p(S) . It is, KL(x) = − X S✓V Y i2S xi Y j /2S (1 −xj)F(S) + Xn i=1[xi log xi + (1 −xi) log(1 −xi)] + log Z. KL(x) is DR-supermodular w.r.t. x (details in Appendix F.1). Minimizing the Kullback-Leibler divergence KL(x) amounts to maximizing a DR-submodular function. 2.1 Motivating Example Captured by Generalized Submodularity on Conic Lattices Submodular continuous functions can already model many scenarios. Yet, there are several interesting cases which are in general not (DR-)Submodular, but can still be captured by a generalized notion. This generalization enables to develop polynomial algorithms with guarantees by using ideas from continuous submodular optimization. We present one representative objective here (more in Appendix B). In Appendix A we show the technical details on how they are covered by a class of submodular continuous functions over conic lattices. Consider the logistic regression model with a non-convex separable regularizer. This flexibility may result in better statistical performance (e.g., in recovering discontinuities, [2]) compared to classical models with convex regularizers. Let z1, ..., zm in Rn be m training points with corresponding binary labels y 2 {±1}m. Assume that the following mild assumption is satisfied: For any fixed dimension i, all the data points have the same sign, i.e., sign(zj i ) is the same for all j 2 [m] (which can be achieved by easily scaling if not). The task is to solve the following non-convex optimization problem, min x2Rn f(x) := m−1 Xm j=1 fj(x) + λr(x), (4) where fj(x) = log(1 + exp(−yjx>zj)) is the logistic loss; λ > 0 is the regularization parameter, and r(x) is some non-convex separable regularizer. Such separable regularizers are popular in 3 statistics, and two notable choices are r(x) = Pn i=1 γx2 i 1+γx2 i , and r(x) = Pn i=1 min{γx2 i , 1} (see [2]). Let us define a vector ↵2 {±1}n as ↵i = sign(zj i ), i 2 [n] and l(x) := 1 m Pm j=1 fj(x). One can show that l(x) is not DR-submodular or DR-supermodular. Yet, in Appendix A we will show that l(x) is K↵-DR-supermodular, where the latter generalizes DR-supermodularity. Usually, one can assume the optimal solution x⇤lies in some box [u, ¯u]. Then the problem is an instance of constrained non-monotone K↵-DR-submodular maximization. 3 Underlying Properties of Constrained DR-submodular Maximization In this section we present several properties arising in DR-submodular function maximization. First we show properties related to concavity of the objective along certain directions, then we establish the relation between locally stationary points and the global optimum (thus called “local-global relation”). These properties will be used to derive guarantees for the algorithms in Section 4. All omitted proofs are in Appendix D. 3.1 Properties Along Non-negative/Non-positive Directions A DR-submodular function f is concave along any non-negative/non-positive direction [4]. Notice that DR-submodularity is a stronger condition than concavity along directions v 2 ±Rn +: for instance, a concave function is concave along any direction, but it may not be a DR-submodular function. For a DR-submodular function with L-Lipschitz gradients, one can get the following quadratic lower bound using standard techniques by combing the concavity and Lipschitz gradients in (2). Quadratic lower bound. If f is DR-submodular with a L-Lipschitz gradient, then for all x 2 X and v 2 ±Rn +, it holds, f(x + v) ≥f(x) + hrf(x), vi −L 2 kvk2. (5) It will be used in Section 4.2 for analyzing the non-monotone FRANK-WOLFE variant (Algorithm 2). Strong DR-submodularity. DR-submodular objectives may be strongly concave along directions v 2 ±Rn +, e.g., for DR-submodular quadratic functions. We will show that such additional structure may be exploited to obtain stronger guarantees for the local-global relation. Definition 3 (Strongly DR-submodular). A function f is µ-strongly DR-submodular (µ ≥0) if for all x 2 X and v 2 ±Rn +, it holds that, f(x + v) f(x) + hrf(x), vi −µ 2 kvk2. (6) 3.2 Relation Between Approximately Stationary Points and Global Optimum First of all, we present the following Lemma, which will motivate us to consider a non-stationarity measure for general constrained optimization problems. Lemma 1. If f is µ-strongly DR-submodular, then for any two points x, y in X, it holds: (y −x)>rf(x) ≥f(x _ y) + f(x ^ y) −2f(x) + µ 2 kx −yk2. (7) Lemma 1 implies that if x is stationary (i.e., rf(x) = 0), then 2f(x) ≥f(x _ y) + f(x ^ y) + µ 2 kx −yk2, which gives an implicit relation between x and y. While in practice finding an exact stationary point is not easy, usually non-convex solvers will arrive at an approximately stationary point, thus requiring a proper measure of non-stationarity for the constrained optimization problem. Non-stationarity measure. Looking at the LHS of (7), it naturally suggests to use maxy2P(y − x)>rf(x) as the non-stationarity measure, which happens to coincide with the measure proposed by recent work of [27], and it can be calculated for free for Frank-Wolfe-style algorithms (e.g., Algorithm 3). In order to adapt it to the local-global relation, we give a slightly more general definition here: For any constraint set Q ✓X, the non-stationarity of a point x 2 Q is, gQ(x) := max v2Qhv −x, rf(x)i (non-stationarity). (8) 4 It always holds that gQ(x) ≥0, and x is a stationary point in Q iff gQ(x) = 0, so (8) is a natural generalization of the non-stationarity measure krf(x)k for unconstrained optimization. As the next statement shows, gQ(x) plays an important role in characterizing the local-global relation. Proposition 1 (Local-Global Relation). Let x be a point in P with non-stationarity gP(x), and Q := {y 2 P | y ¯u −x}. Let z be a point in Q with non-stationarity gQ(z). It holds that, max{f(x), f(z)} ≥1 4 [f(x⇤) −gP(x) −gQ(z)] + µ 8 % kx −x⇤k2 + kz −z⇤k2& , (9) where z⇤:= x _ x⇤−x. Proof sketch of Proposition 1: The proof uses Lemma 1, the non-stationarity in (8) and a key observation in the following Claim. The detailed proof is in Appendix D.2. Claim 1. It holds that f(x _ x⇤) + f(x ^ x⇤) + f(z _ z⇤) + f(z ^ z⇤) ≥f(x⇤). Note that [7; 20] propose a similar relation for the special cases of multilinear/softmax extensions by mainly proving the same conclusion as in Claim 1. Their relation does not incorporate the properties of non-stationarity or strong DR-submodularity. They both use the proof idea of constructing a complicated auxiliary set function tailored to specific DR-submodular functions. We present a different proof method by directly utilizing the DR property on carefully constructed auxiliary points (e.g., (x + z) _ x⇤in the proof of Claim 1). 4 Algorithms for Constrained DR-submodular Maximization Based on the properties, we present two algorithms for solving (P). The first is based on the localglobal relation, and the second is a FRANK-WOLFE variant adapted for the non-monotone setting. All the omitted proofs are deferred to Appendix E. 4.1 An Algorithm Based on the Local-Global Relation Algorithm 1: TWO-PHASE FRANK-WOLFE for non-monotone DR-submodular maximization Input: maxx2P f(x), stopping tolerance ✏1, ✏2, #iterations K1, K2 1 x NON-CONVEX FRANK-WOLFE(f, P, K1, ✏1, x(0)) ; // x(0) 2 P 2 Q P \ {y 2 Rn + | y ¯u −x}; 3 z NON-CONVEX FRANK-WOLFE(f, Q, K2, ✏2, z(0)) ; // z(0) 2 Q Output: arg max{f(x), f(z)} ; We summarize the TWO-PHASE algorithm in Algorithm 1. It is generalized from the “two-phase” method in [7; 20]. It invokes some non-convex solver (we use the NON-CONVEX FRANK-WOLFE by [27]; pseudocode is included in Algorithm 3 of Appendix C) to find approximately stationary points in P and Q, respectively, then returns the solution with the larger function value. Though we use NON-CONVEX FRANK-WOLFE as the subroutine here, it is worth noting that any algorithm that is guaranteed to find an approximately stationary point can be plugged into Algorithm 1 as the subroutine. We give an improved approximation bound by considering more properties of DR-submodular functions. Borrowing the results from [27] for the NON-CONVEX FRANK-WOLFE subroutine, we get the following, Theorem 1. The output of Algorithm 1 satisfies, max{f(x), f(z)} ≥µ 8 % kx −x⇤k2 + kz −z⇤k2& (10) + 1 4 f(x⇤) −min ⇢max{2h1, Cf(P)} pK1 + 1 , ✏1 ) −min ⇢max{2h2, Cf(Q)} pK2 + 1 , ✏2 )* , where h1 := maxx2P f(x)−f(x(0)), h2 := maxz2Q f(z)−f(z(0)) are the initial suboptimalities, Cf(P) := supx,v2P,γ2[0,1],y=x+γ(v−x) 2 γ2 (f(y) −f(x) −(y −x)>rf(x)) is the curvature of f w.r.t. P, and z⇤= x _ x⇤−x. 5 Theorem 1 indicates that Algorithm 1 has a 1/4 approximation guarantee and 1/ p k rate. However, it has good empirical performance as demonstrated by the experiments in Section 5. Informally, this can be partially explained by the term µ 8 % kx −x⇤k2 + kz −z⇤k2& in (10): if x is away from x⇤, this term will augment the bound; if x is close to x⇤, by the smoothness of f, it should be close to optimal. 4.2 The Non-monotone FRANK-WOLFE Variant Algorithm 2: Non-monotone FRANK-WOLFE variant for DR-submodular maximization Input: maxx2P f(x), prespecified step size γ 2 (0, 1] 1 x(0) 0, t(0) 0, k 0; // k : iteration index, t(k) : cumulative step size 2 while t(k) < 1 do 3 v(k) arg maxv2P,v¯u−x(k)hv, rf(x(k))i; // shrunken LMO 4 use uniform step size γk = γ; set γk min{γk, 1 −t(k)}; 5 x(k+1) x(k) + γkv(k), t(k+1) t(k) + γk, k k + 1; Output: x(K) ; // assuming there are K iterations in total Algorithm 2 summarizes the non-monotone FRANK-WOLFE variant, which is inspired by the unified continuous greedy algorithm in [13] for maximizing the multilinear extension of a submodular set function. It initializes the solution x(0) to be 0, and maintains t(k) as the cumulative step size. At iteration k, it maximizes the linearization of f over a “shrunken” constraint set: {v|v 2 P, v ¯u −x(k)}, which is different from the classical LMO of Frank-Wolfe-style algorithms (hence we refer to it as the “shrunken LMO”). Then it employs an update step in the direction v(k) chosen by the LMO with a uniform step size γk = γ. The cumulative step size t(k) is used to ensure that the overall step sizes sum to one, thus the output solution x(K) is a convex combination of the LMO outputs, hence also lies in P. The shrunken LMO (Step 3) is the key difference compared to the monotone FRANK-WOLFE variant in [4]. The extra constraint v ¯u −x(k) is added to prevent too aggressive growth of the solution, since in the non-monotone setting such aggressive growth may hurt the overall performance. The next theorem states the guarantees of Algorithm 2. Theorem 2. Consider Algorithm 2 with uniform step size γ. For k = 1, ..., K it holds that, f(x(k)) ≥t(k)e−t(k)f(x⇤) −LD2 2 kγ2 −O(γ2)f(x⇤). (11) By observing that t(K) = 1 and applying Theorem 2, we get the following Corollary: Corollary 1. The output of Algorithm 2 satisfies f(x(K)) ≥e−1f(x⇤) −LD2 2K −O % 1 K2 & f(x⇤). Corollary 1 shows that Algorithm 2 enjoys a sublinear convergence rate towards some point x(K) inside P, with a 1/e approximation guarantee. Proof sketch of Theorem 2: The proof is by induction. To prepare the building blocks, we first of all show that the growth of x(k) is indeed bounded, Lemma 2. Assume x(0) = 0. For k = 0, ..., K −1, it holds x(k) i ¯ui[1 −(1 −γ)t(k)/γ], 8i 2 [n]. Then the following Lemma provides a lower bound, which gets the global optimum involved, Lemma 3 (Generalized from Lemma 7 in [8]). Given ✓2 (0, ¯u], let λ0 = mini2[n] ¯ui ✓i . Then for all x 2 [0, ✓], it holds f(x _ x⇤) ≥(1 −1 λ0 )f(x⇤). Then the key ingredient for induction is the relation between f(x(k+1)) and f(x(k)) indicated by: Claim 2. For k = 0, ..., K −1 it holds f(x(k+1)) ≥(1−γ)f(x(k))+γ(1−γ)t(k)/γf(x⇤)−LD2 2 γ2, which is derived by a combination of the quadratic lower bound in (5), Lemma 2 and Lemma 3. 6 Remarks on the two algorithms. Notice that though the TWO-PHASE algorithm has a worse guarantee than the non-monotone FRANK-WOLFE variant, it is still of interest: i) It allows flexibility in using a wide range of existing solvers for finding an (approximately) stationary point. ii) The guarantees that we present rely on a worst-case analysis. The empirical performance of the TWOPHASE algorithm is often comparable or better than that of the FRANK-WOLFE variant. This suggests to explore more properties in concrete problems that may favor the TWO-PHASE algorithm, which we leave for future work. 5 Experimental Results We test the performance of the analyzed algorithms, while considering the following baselines: 1) QUADPROGIP [39], which is a global solver for non-convex quadratic programming; 2) Projected gradient ascent (PROJGRAD) with diminishing step sizes ( 1 k+1, k starts from 0). We run all the algorithms for 100 iterations. For the subroutine (Algorithm 3) of TWO-PHASE FRANK-WOLFE, we set ✏1 = ✏2 = 10−6, K1 = K2 = 100. All the synthetic results are the average of 20 repeated experiments. All experiments were implemented using MATLAB. Source code can be found at: https://github.com/bianan/non-monotone-dr-submodular. 5.1 DR-submodular Quadratic Programming As a state-of-the-art global solver, QUADPROGIP2 [39] can find the global optimum (possibly in exponential time), which were used to calculate the approximation ratios. Our problem instances are synthetic DR-submodular quadratic objectives with down-closed polytope constraints, i.e., f(x) = 1 2x>Hx + h>x + c and P = {x 2 Rn + | Ax b, x ¯u, A 2 Rm⇥n ++ , b 2 Rm +}. Both objective and constraints were randomly generated, in the following two manners: 1) Uniform distribution. H 2 Rn⇥n is a symmetric matrix with uniformly distributed entries in [−1, 0]; A 2 Rm⇥n has uniformly distributed entries in [⌫, ⌫+ 1], where ⌫= 0.01 is a small positive constant in order to make entries of A strictly positive. 8 10 12 14 16 Dimensionality 0.9 0.95 1 Approx. ratio (a) m = b0.5nc 8 10 12 14 16 Dimensionality 0.85 0.9 0.95 1 Approx. ratio (b) m = n 8 10 12 14 16 Dimensionality 0.85 0.9 0.95 1 Approx. ratio (c) m = b1.5nc Figure 1: Results on DR-submodular quadratic instances with uniform distribution. 2) Exponential distribution. The entries of −H and A were sampled from exponential distributions Exp(λ) (For a random variable y ≥0, its probability density function is λe−λy, and for y < 0, its density is 0). Specifically, each entry of −H was sampled from Exp(1), then the matrix −H was made to be symmetric. Each entry of A was sampled from Exp(0.25) + ⌫, where ⌫= 0.01 is a small positive constant. In both the above two cases, we set b = 1m, and ¯u to be the tightest upper bound of P by ¯uj = mini2[m] bi Aij , 8j 2 [n]. In order to make f non-monotone, we set h = −0.2 ⇤H> ¯u. To make sure that f is non-negative, we first of all solve the problem minx2P 1 2x>Hx + h>x using QUADPROGIP, let the solution to be ˆx, then set c = −f(ˆx) + 0.1 ⇤|f(ˆx)|. The approximation ratios w.r.t. dimensionalities (n) are plotted in Figures 1 and 2, for the two manners of data generation. We set the number of constraints to be m = b0.5nc, m = n and m = b1.5nc in Figures 1a to 1c (and Figures 2a to 2c), respectively. 2We used the open source code provided by [39], and the IBM CPLEX optimization studio https://www. ibm.com/jm-en/marketplace/ibm-ilog-cplex as the subroutine. 7 8 10 12 14 16 Dimensionality 0.75 0.8 0.85 0.9 0.95 1 Approx. ratio (a) m = b0.5nc 8 10 12 14 16 Dimensionality 0.75 0.8 0.85 0.9 0.95 1 Approx. ratio (b) m = n 8 10 12 14 16 Dimensionality 0.75 0.8 0.85 0.9 0.95 1 Approx. ratio (c) m = b1.5nc Figure 2: Results on quadratic instances with exponential distribution. One can see that TWO-PHASE FRANK-WOLFE usually performs the best, PROJGRAD follows, and non-monotone FRANK-WOLFE variant is the last. The good performance of TWO-PHASE FRANKWOLFE can be partially explained by the strong DR-submodularity of quadratic functions according to Theorem 1. Performance of the two analyzed algorithms is consistent with the theoretical bounds: the approximation ratios of FRANK-WOLFE variant are always much higher than 1/e. 5.2 Maximizing Softmax Extensions With some derivation, one can see the derivative of the softmax extension in (3) is: rif(x) = tr((diag(x)(L −I) + I)−1(L −I)i), 8i 2 [n], where (L −I)i denotes the matrix obtained by zeroing all entries except the ith row of (L −I). Let C := (diag(x)(L −I) + I)−1, D := (L −I), one can see that rif(x) = D> i· C·i, which gives an efficient way to calculate the gradient rf(x). 8 10 12 14 16 Dimensionality -0.05 0 0.05 0.1 0.15 0.2 Function value (a) m = b0.5nc 8 10 12 14 16 Dimensionality -0.05 0 0.05 0.1 0.15 0.2 Function value (b) m = n 8 10 12 14 16 Dimensionality -0.05 0 0.05 0.1 0.15 0.2 Function value (c) m = b1.5nc Figure 3: Results on softmax instances with polytope constraints generated from uniform distribution. Results on synthetic data. We generate the softmax objectives (see (3)) in the following way: first generate the n eigenvalues d 2 Rn +, each randomly distributed in [0, 1.5], and set D = diag(d). After generating a random unitary matrix U, we set L = UDU>. One can verify that L is positive semidefinite and has eigenvalues as the entries of d. We generate the down-closed polytope constraints in the same form and same way as that for DRsubmodular quadratic functions, except for setting b = 2 ⇤1m. Function values returned by different solvers w.r.t. n are shown in Figure 3, for which the random polytope constraints were generated with uniform distribution (results for which the random polytope constraints were generated with exponential distribution are deferred to Appendix G). The number of constraints was set to be m = b0.5nc, m = n and m = b1.5nc in Figures 3a to 3c, respectively. One can observe that TWO-PHASE FRANK-WOLFE still has the best performance, the non-monotone FRANK-WOLFE variant follows, and PROJGRAD has the worst performance. Real-world results on matched summarization. The task of “matched summarization” is to select a set of document pairs out of a corpus of documents, such that the two documents within a pair are similar, and the overall set of pairs is as diverse as possible. The motivation for this task is very practical: it could be, for example, to compare the opinions of various politicians on a range of representative topics. In our experiments, we used a similar setting to the one in [20]. We experimented on the 2012 US Republican debates data, which consists of 8 candidates: Bachman, Gingrich, Huntsman, Paul, Perry, Romney and Santorum. Each task involves one pair of candidates, so in total there are 8 28 = 7 ⇤8/2 tasks. Figure 4a plots the averaged function values returned by the three solvers over 28 tasks, w.r.t. different values of a hyperparameter reflecting the matching quality (details see [20]). 0.2 0.4 0.6 0.8 1 Match quality controller 2 4 6 8 10 Function value (a) Average on 28 tasks 0 20 40 60 80 100 Iteration 0 0.5 1 1.5 2 2.5 Function value (b) Objectives w.r.t. iterations Figure 4: Results on 2012 US Republican debates data. Figure 4b traces the objectives w.r.t. iterations for a specific candidate pair (Bachman, Romney). For TWO-PHASE FRANK-WOLFE, the objectives of the selected phase were plotted. One can see that TWOPHASE FRANK-WOLFE also achieves the best performance, while the performance of nonmonotone FRANK-WOLFE variant and PROJGRAD is comparable. 6 Related Work Submodular optimization and, more broadly, non-convex optimization are extensively studied in the literature, which renders it very difficult comprehensively surveying all previous work. Here we only briefly summarize some of the most related papers. Submodular optimization over integer-lattice and continuous domains. Many results from submodular set function optimization have been generalized to the integer-lattice case [34; 33; 12; 24]. Of particular interest is the reduction [12] from an integer-lattice DR-submodular maximization problem to a submodular set function maximization problem. Submodular optimization over continuous domains has attracted considerable attention recently [3; 4; 36]. Two classes of functions that are covered by continuous submodularity are the Lovasz extensions [28] and multilinear extensions [6] of submodular set functions. Particularly, multilinear extensions of submodular set functions are also continuous DR-submodular [3], but with the special property that they are coordinate-wise linear. Combined with the rounding technique of contention resolution [7], maximizing multilinear extensions [38; 19; 13; 8; 11] has become the state-of-the-art method for submodular set function maximization. Some of the techniques in maximizing multilinear extensions [13; 7; 8] have inspired this work. However, we are the first to explore the rich properties and devise algorithms for the general constrained DR-submodular maximization problem over continuous domains. Non-convex optimization. Non-convex optimization receives a surge of attention in the past years. One active research topic is to reach a stationary point for unconstrained optimization [35; 32; 1] or constrained optimization [18; 27]. However, without proper assumptions, a stationary point may not lead to any global approximation guarantee. The local-global relation (in Proposition 1) provides a strong relation between (approximately) stationary points and global optimum, thus making it flexible to incorporate progress in this area. 7 Conclusion We have studied the problem of constrained non-monotone DR-submodular continuous maximization. We explored the structural properties of such problems, and established a local-global relation. Based on these properties, we presented a TWO-PHASE algorithm with a 1/4 approximation guarantee, and a non-monotone FRANK-WOLFE variant with a 1/e approximation guarantee. We further generalized submodular continuous function over conic lattices, which enabled us to model a larger class of applications. Lastly, our theoretical findings were verified by synthetic and real-world experiments. Acknowledgement. This research was partially supported by ERC StG 307036, by the Max Planck ETH Center for Learning Systems, and by the ETH Zürich Postdoctoral Fellowship program. 9 References [1] Allen-Zhu, Zeyuan and Hazan, Elad. Variance reduction for faster non-convex optimization. In International Conference on Machine Learning (ICML), pp. 699–707, 2016. [2] Antoniadis, Anestis, Gijbels, Irène, and Nikolova, Mila. Penalized likelihood regression for generalized linear models with non-quadratic penalties. Annals of the Institute of Statistical Mathematics, 63(3):585–615, 2011. [3] Bach, Francis. Submodular functions: from discrete to continous domains. arXiv preprint arXiv:1511.00394, 2015. [4] Bian, Andrew An, Mirzasoleiman, Baharan, Buhmann, Joachim M., and Krause, Andreas. Guaranteed non-convex optimization: Submodular maximization over continuous domains. In International Conference on Artificial Intelligence and Statistics (AISTATS), pp. 111–120, 2017. [5] Boyd, Stephen and Vandenberghe, Lieven. Convex optimization. Cambridge university press, 2004. [6] Calinescu, Gruia, Chekuri, Chandra, Pál, Martin, and Vondrák, Jan. Maximizing a submodular set function subject to a matroid constraint. In Integer programming and combinatorial optimization, pp. 182–196. Springer, 2007. [7] Chekuri, Chandra, Vondrák, Jan, and Zenklusen, Rico. Submodular function maximization via the multilinear relaxation and contention resolution schemes. SIAM Journal on Computing, 43 (6):1831–1879, 2014. [8] Chekuri, Chandra, Jayram, TS, and Vondrák, Jan. On multiplicative weight updates for concave and submodular function maximization. In Proceedings of the 2015 Conference on Innovations in Theoretical Computer Science, pp. 201–210. ACM, 2015. [9] Djolonga, Josip and Krause, Andreas. From map to marginals: Variational inference in bayesian submodular models. In Neural Information Processing Systems (NIPS), pp. 244–252, 2014. [10] Eghbali, Reza and Fazel, Maryam. Designing smoothing functions for improved worst-case competitive ratio in online optimization. In Advances in Neural Information Processing Systems (NIPS), pp. 3279–3287. 2016. [11] Ene, Alina and Nguyen, Huy L. Constrained submodular maximization: Beyond 1/e. In Foundations of Computer Science (FOCS), 2016 IEEE 57th Annual Symposium on, pp. 248–257, 2016. [12] Ene, Alina and Nguyen, Huy L. A reduction for optimizing lattice submodular functions with diminishing returns. arXiv preprint arXiv:1606.08362, 2016. [13] Feldman, Moran, Naor, Joseph, and Schwartz, Roy. A unified continuous greedy algorithm for submodular maximization. In Foundations of Computer Science (FOCS), 2011 IEEE 52nd Annual Symposium on, pp. 570–579. IEEE, 2011. [14] Friedland, S and Gaubert, S. Submodular spectral functions of principal submatrices of a hermitian matrix, extensions and applications. Linear Algebra and its Applications, 438(10): 3872–3884, 2013. [15] Fuchssteiner, Benno and Lusky, Wolfgang. Convex cones, volume 56. Elsevier, 2011. [16] Fujishige, Satoru. Submodular functions and optimization, volume 58. Elsevier, 2005. [17] Garg, Vijay K. Introduction to lattice theory with computer science applications. John Wiley & Sons, 2015. [18] Ghadimi, Saeed, Lan, Guanghui, and Zhang, Hongchao. Mini-batch stochastic approximation methods for nonconvex stochastic composite optimization. Mathematical Programming, 155 (1-2):267–305, 2016. [19] Gharan, Shayan Oveis and Vondrák, Jan. Submodular maximization by simulated annealing. In Proceedings of the twenty-second annual ACM-SIAM symposium on Discrete Algorithms, pp. 1098–1116. Society for Industrial and Applied Mathematics, 2011. [20] Gillenwater, Jennifer, Kulesza, Alex, and Taskar, Ben. Near-optimal map inference for determinantal point processes. In Advances in Neural Information Processing Systems (NIPS), pp. 2735–2743, 2012. 10 [21] Hassani, Hamed, Soltanolkotabi, Mahdi, and Karbasi, Amin. Gradient methods for submodular maximization. In Advances in Neural Information Processing Systems (NIPS), pp. 5837–5847, 2017. [22] Ito, Shinji and Fujimaki, Ryohei. Large-scale price optimization via network flow. In Advances in Neural Information Processing Systems (NIPS), pp. 3855–3863, 2016. [23] Iwata, Satoru, Fleischer, Lisa, and Fujishige, Satoru. A combinatorial strongly polynomial algorithm for minimizing submodular functions. Journal of the ACM, 48(4):761–777, 2001. [24] Khodabakhsh, Ali and Nikolova, Evdokia. Maximizing non-monotone dr-submodular functions with cardinality constraints. arXiv preprint arXiv:1611.09474, 2016. [25] Krause, Andreas and Golovin, Daniel. Submodular function maximization. Tractability: Practical Approaches to Hard Problems, 3:19, 2012. [26] Kulesza, Alex, Taskar, Ben, et al. Determinantal point processes for machine learning. Foundations and Trends R⃝in Machine Learning, 5(2–3):123–286, 2012. [27] Lacoste-Julien, Simon. Convergence rate of frank-wolfe for non-convex objectives. arXiv preprint arXiv:1607.00345, 2016. [28] Lovász, László. Submodular functions and convexity. In Mathematical Programming The State of the Art, pp. 235–257. Springer, 1983. [29] Montanari, Andrea and Richard, Emile. Non-negative principal component analysis: Message passing algorithms and sharp asymptotics. IEEE Transactions on Information Theory, 62(3): 1458–1484, 2016. [30] Motzkin, Theodore S and Straus, Ernst G. Maxima for graphs and a new proof of a theorem of turán. Canad. J. Math, 17(4):533–540, 1965. [31] Nemhauser, George L, Wolsey, Laurence A, and Fisher, Marshall L. An analysis of approximations for maximizing submodular set functions – i. Mathematical Programming, 14(1):265–294, 1978. [32] Reddi, Sashank J., Sra, Suvrit, Poczos, Barnabas, and Smola, Alexander J. Proximal stochastic methods for nonsmooth nonconvex finite-sum optimization. In Advances in Neural Information Processing Systems (NIPS), pp. 1145–1153. 2016. [33] Soma, Tasuku and Yoshida, Yuichi. A generalization of submodular cover via the diminishing return property on the integer lattice. In Advances in Neural Information Processing Systems (NIPS), pp. 847–855, 2015. [34] Soma, Tasuku, Kakimura, Naonori, Inaba, Kazuhiro, and Kawarabayashi, Ken-ichi. Optimal budget allocation: Theoretical guarantee and efficient algorithm. In International Conference on Machine Learning (ICML), pp. 351–359, 2014. [35] Sra, Suvrit. Scalable nonconvex inexact proximal splitting. In Advances in Neural Information Processing Systems (NIPS), pp. 530–538, 2012. [36] Staib, Matthew and Jegelka, Stefanie. Robust budget allocation via continuous submodular functions. In International Conference on Machine Learning (ICML), pp. 3230–3240, 2017. [37] Topkis, Donald M. Minimizing a submodular function on a lattice. Operations research, 26(2): 305–321, 1978. [38] Vondrák, Jan. Optimal approximation for the submodular welfare problem in the value oracle model. In Proceedings of the 40th Annual ACM Symposium on Theory of Computing, pp. 67–74, 2008. [39] Xia, Wei, Vera, Juan, and Zuluaga, Luis F. Globally solving non-convex quadratic programs via linear integer programming techniques. arXiv preprint arXiv:1511.02423, 2015. [40] Zass, Ron and Shashua, Amnon. Nonnegative sparse pca. Advances in Neural Information Processing Systems (NIPS), pp. 1561–1568, 2007. 11 | 2017 | 232 |
6,711 | Decoupling “when to update” from “how to update” Eran Malach School of Computer Science The Hebrew University, Israel eran.malach@mail.huji.ac.il Shai Shalev-Shwartz School of Computer Science The Hebrew University, Israel shais@cs.huji.ac.il Abstract Deep learning requires data. A useful approach to obtain data is to be creative and mine data from various sources, that were created for different purposes. Unfortunately, this approach often leads to noisy labels. In this paper, we propose a meta algorithm for tackling the noisy labels problem. The key idea is to decouple “when to update” from “how to update”. We demonstrate the effectiveness of our algorithm by mining data for gender classification by combining the Labeled Faces in the Wild (LFW) face recognition dataset with a textual genderizing service, which leads to a noisy dataset. While our approach is very simple to implement, it leads to state-of-the-art results. We analyze some convergence properties of the proposed algorithm. 1 Introduction In recent years, deep learning achieves state-of-the-art results in various different tasks, however, neural networks are mostly trained using supervised learning, where a massive amount of labeled data is required. While collecting unlabeled data is relatively easy given the amount of data available on the web, providing accurate labeling is usually an expensive task. In order to overcome this problem, data science becomes an art of extracting labels out of thin air. Some popular approaches to labeling are crowdsourcing, where the labeling is not done by experts, and mining available meta-data, such as text that is linked to an image in a webpage. Unfortunately, this gives rise to a problem of abundant noisy labels - labels may often be corrupted [19], which might deteriorate the performance of neural-networks [12]. Let us start with an intuitive explanation as to why noisy labels are problematic. Common neural network optimization algorithms start with a random guess of what the classifier should be, and then iteratively update the classifier based on stochastically sampled examples from a given dataset, optimizing a given loss function such as the hinge loss or the logistic loss. In this process, wrong predictions lead to an update of the classifier that would hopefully result in better classification performance. While at the beginning of the training process the predictions are likely to be wrong, as the classifier improves it will fail on less and less examples, thus making fewer and fewer updates. On the other hand, in the presence of noisy labels, as the classifier improves the effect of the noise increases - the classifier may give correct predictions, but will still have to update due to wrong labeling. Thus, in an advanced stage of the training process the majority of the updates may actually be due to wrongly labeled examples, and therefore will not allow the classifier to further improve. To tackle this problem, we propose to decouple the decision of “when to update” from the decision of “how to update”. As mentioned before, in the presence of noisy labels, if we update only when the classifier’s prediction differs from the available label, then at the end of the optimization process, these few updates will probably be mainly due to noisy labels. We would therefore like a different update criterion, that would let us decide whether it is worthy to update the classifier based on a given example. We would like to preserve the behavior of performing many updates at the beginning of the training process but only a few updates when we approach convergence. To do so, we 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. suggest to train two predictors, and perform update steps only in case of disagreement between them. This way, when the predictors get better, the “area” of their disagreement gets smaller, and updates are performed only on examples that lie in the disagreement area, therefore preserving the desired behavior of the standard optimization process. On the other hand, since we do not perform an update based on disagreement with the label (which may be due to a problem in the label rather than a problem in the predictor), this method keeps the effective amount of noisy labels seen throughout the training process at a constant rate. The idea of deciding “when to update” based on a disagreement between classifiers is closely related to approaches for active learning and selective sampling - a setup in which the learner does not have unlimited access to labeled examples, but rather has to query for each instance’s label, provided at a given cost (see for example [34]). Specifically, the well known query-by-committee algorithm maintains a version space of hypotheses and at each iteration, decides whether to query the label of a given instance by sampling two hypotheses uniformly at random from the version space [35, 14]. Naturally, maintaining the version space of deep networks seems to be intractable. Our algorithm maintains only two deep networks. The difference between them stems from the random initialization. Therefore, unlike the original query-by-committee algorithm, that samples from the version space at every iteration, we sample from the original hypotheses class only once (at the initialization), and from there on, we update these two hypotheses using the backpropagation rule, when they disagree on the label. To the best of our knowledge, this algorithm was not proposed/analyzed previously, not in the active learning literature and especially not as a method for dealing with noisy labels. To show that this method indeed improves the robustness of deep learning to noisy labels, we conduct an experiment that aims to study a real-world scenario of acquiring noisy labels for a given dataset. We consider the task of gender classification based on images. We did not have a dedicated dataset for this task. Instead, we relied on the Labeled Faces in the Wild (LFW) dataset, which contains images of different people along with their names, but with no information about their gender. To find the gender for each image, we use an online service to match a gender to a given name (as is suggested by [25]), a method which is naturally prone to noisy labels (due to unisex names). Applying our algorithm to an existing neural network architecture reduces the effect of the noisy labels, achieving better results than similar available approaches, when tested on a clean subset of the data. We also performed a controlled experiment, in which the base algorithm is the perceptron, and show that using our approach leads to a noise resilient algorithm, which can handle an extremely high label noise rates of up to 40%. The controlled experiments are detailed in Appendix B. In order to provide theoretical guarantees for our meta algorithm, we need to tackle two questions: 1. does this algorithm converge? and if so, how quickly? and 2. does it converge to an optimum? We give a positive answer to the first question, when the base algorithm is the perceptron and the noise is label flip with a constant probability. Specifically, we prove that the expected number of iterations required by the resulting algorithm equals (up to a constant factor) to that of the perceptron in the noise-free setting. As for the second question, clearly, the convergence depends on the initialization of the two predictors. For example, if we initialize the two predictors to be the same predictor, the algorithm will not perform any updates. Furthermore, we derive lower bounds on the quality of the solution even if we initialize the two predictors at random. In particular, we show that for some distributions, the algorithm’s error will be bounded away from zero, even in the case of linearly separable data. This raises the question of whether a better initialization procedure may be helpful. Indeed, we show that for the same distribution mentioned above, even if we add random label noise, if we initialize the predictors by performing few vanilla perceptron iterations, then the algorithm performs much better. Despite this worst case pessimism, we show that empirically, when working with natural data, the algorithm converges to a good solution. We leave a formal investigation of distribution dependent upper bounds to future work. 2 Related Work The effects of noisy labels was vastly studied in many different learning algorithms (see for example the survey in [13]), and various solutions to this problem have been proposed, some of them with theoretically provable bounds, including methods like statistical queries, boosting, bagging and more [21, 26, 7, 8, 29, 31, 23, 27, 3]. Our focus in this paper is on the problem of noisy labels in the context of deep learning. Recently, there have been several works aiming at improving the resilience of deep 2 learning to noisy labels. To the best of our knowledge, there are four main approaches. The first changes the loss function. The second adds a layer that tries to mimic the noise behavior. The third groups examples into buckets. The fourth tries to clean the data as a preprocessing step. Beyond these approaches, there are methods that assume a small clean data set and another large, noisy, or even unlabeled, data set [30, 6, 38, 1]. We now list some specific algorithms from these families. [33] proposed to change the cross entropy loss function by adding a regularization term that takes into account the current prediction of the network. This method is inspired by a technique called minimum entropy regularization, detailed in [17, 16]. It was also found to be effective by [12], which suggested a further improvement of this method by effectively increasing the weight of the regularization term during the training procedure. [28] suggested to use a probabilistic model that models the conditional probability of seeing a wrong label, where the correct label is a latent variable of the model. While [28] assume that the probability of label-flips between classes is known in advance, a follow-up work by [36] extends this method to a case were these probabilities are unknown. An improved method, that takes into account the fact that some instances might be more likely to have a wrong label, has been proposed recently in [15]. In particular, they add another softmax layer to the network, that can use the output of the last hidden layer of the network in order to predict the probability of the label being flipped. Unfortunately, their method involves optimizing the biases of the additional softmax layer by first training it on a simpler setup (without using the last hidden layer), which implies two-phase training that further complicates the optimization process. It is worth noting that there are some other works that suggest methods that are very similar to [36, 15], with a slightly different objective or training method [5, 20], or otherwise suggest a complicated process which involves estimation of the classdependent noise probabilities [32]. Another method from the same family is the one described in [37], who suggests to differentiate between “confusing” noise, where some features of the example make it hard to label, or otherwise a completely random label noise, where the mislabeling has no clear reason. [39] suggested to train the network to predict labels on a randomly selected group of images from the same class, instead of classifying each image individually. In their method, a group of images is fed as an input to the network, which merges their inner representation in a deeper level of the network, along with an attention model added to each image, and producing a single prediction. Therefore, noisy labels may appear in groups with correctly labeled examples, thus diminishing their impact. The final setup is rather complicated, involving many hyper-parameters, rather than providing a simple plug-and-play solution to make an existing architecture robust to noisy labels. From the family of preprocessing methods, we mention [4, 10], that try to eliminate instances that are suspected to be mislabeled. Our method shares a similar motivation of disregarding contaminated instances, but without the cost of complicating the training process by a preprocessing phase. In our experiment we test the performance of our method against methods that are as simple as training a vanilla version of neural network. In particular, from the family of modified loss function we chose the two variants of the regularized cross entropy loss suggested by [33] (soft and hard bootsrapping). From the family of adding a layer that models the noise, we chose to compare to one of the models suggested in [15] (which is very similar to the model proposed by [36]), because this model does not require any assumptions or complication of the training process. We find that our method outperformed all of these competing methods, while being extremely simple to implement. Finally, as mentioned before, our “when to update” rule is closely related to approaches for active learning and selective sampling, and in particular to the query-by-committee algorithm. In [14] a thorough analysis is provided for various base algorithms implementing the query-by-committee update rule, and particularly they analyze the perceptron base algorithm under some strong distributional assumptions. In other works, an ensemble of neural networks is trained in an active learning setup to improve the generalization of neural networks [11, 2, 22]. Our method could be seen as a simplified member of ensemble methods. As mentioned before, our motivation is very different than the active learning scenario, since our main goal is dealing with noisy labels, rather than trying to reduce the number of label queries. To the best of our knowledge, the algorithm we propose was not used or analyzed in the past for the purpose of dealing with noisy labels in deep learning. 3 3 METHOD As mentioned before, to tackle the problem of noisy labels, we suggest to change the update rule commonly used in deep learning optimization algorithms in order to decouple the decision of “when to update” from “how to update”. In our approach, the decision of “when to update” does not depend on the label. Instead, it depends on a disagreement between two different networks. This method could be generally thought of as a meta-algorithm that uses two base classifiers, performing updates according to a base learning algorithm, but only on examples for which there is a disagreement between the two classifiers. To put this formally, let X be an instance space and Y be the label space, and assume we sample examples from a distribution ˜D over X ⇥Y, with possibly noisy labels. We wish to train a classifier h, coming from a hypothesis class H. We rely on an update rule, U, that updates h based on its current value as well as a mini-batch of b examples. The meta algorithm receives as input a pair of two classifiers, h1, h2 2 H, the update rule, U, and a mini batch size, b. A pseudo-code is given in Algorithm 1. Note that we do not specify how to initialize the two base classifiers, h1, h2. When using deep learning as the base algorithm, the easiest approach is maybe to perform a random initialization. Another approach is to first train the two classifiers while following the regular “when to update” rule (which is based on the label y), possibly training each classifier on a different subset of the data, and switching to the suggested update rule only in an advanced stage of the training process. We later show that the second approach is preferable. At the end of the optimization process, we can simply return one of the trained classifiers. If a small accurately labeled test data is available, we can choose to return the classifier with the better accuracy on the clean test data. Algorithm 1 Update by Disagreement input: an update rule U batch size b two initial predictors h1, h2 2 H for t = 1, 2, . . . , N do draw mini-batch (x1, y1), . . . , (xb, yb) ⇠˜Db let S = {(xi, yi) : h1(xi) 6= h2(xi)} h1 U(h1, S) h2 U(h2, S) end for 4 Theoretical analysis Since a convergence analysis for deep learning is beyond our reach even in the noise-free setting, we focus on analyzing properties of our algorithm for linearly separable data, which is corrupted by random label noise, and while using the perceptron as a base algorithm. Let X = {x 2 Rd : kxk 1}, Y = {±1}, and let D be a probability distribution over X ⇥Y, such that there exists w⇤for which D({(x, y) : yhw⇤, xi < 1}) = 0. The distribution we observe, denoted ˜D, is a noisy version of D. Specifically, to sample (x, ˜y) ⇠˜D one should sample (x, y) ⇠D and output (x, y) with probability 1 −µ and (x, −y) with probability µ. Here, µ is in [0, 1/2). Finally, let H be the class of linear classifiers, namely, H = {x 7! sign(hw, xi) : w 2 Rd}. We use the perceptron’s update rule with mini-batch size of 1. That is, given the classifier wt 2 Rd, the update on example (xt, yt) 2 X ⇥Y is: wt+1 = U(wt, (xt, yt)) := wt + yt xt. As mentioned in the introduction, to provide a full theoretical analysis of this algorithm, we need to account for two questions: 1. does this algorithm converge? and if so, how quickly? 2. does it converge to an optimum? 4 Theorem 1 below provides a positive answer for the first question. It shows that the number of updates of our algorithm is only larger by a constant factor (that depends on the initial vectors and the amount of noise) relatively to the bound for the vanilla perceptron in the noise-less case. Theorem 1 Suppose that the “Update by Disagreement” algorithm is run on a sequence of random N examples from ˜D, and with initial vectors w(1) 0 , w(2) 0 . Denote K = maxi kw(i) 0 k. Let T be the number of updates performed by the “Update by Disagreement” algorithm. Then, E[T] 3 (4 K+1) (1−2µ)2 kw⇤k2 where the expectation is w.r.t. the randomness of sampling from ˜D. Proof It will be more convenient to rewrite the algorithm as follows. We perform N iterations, where at iteration t we receive (xt, ˜yt), and update w(i) t+1 = w(i) t + ⌧t ˜yt xt , where ⌧t = ( 1 if sign(hw(1) t , xti) 6= sign(hw(2) t , xti) 0 otherwise Observe that we can write ˜yt = ✓tyt, where (xt, yt) ⇠D, and ✓t is a random variables with P[✓t = 1] = 1 −µ and P[✓t = −1] = µ. We also use the notation vt = ythw⇤, xti and ˜vt = ✓tvt. Our goal is to upper bound ¯T := E[T] = E[P t ⌧t]. We start with showing that E " N X t=1 ⌧t˜vt # ≥(1 −2µ)T (1) Indeed, since ✓t is independent of ⌧t and vt, we get that: E[⌧t˜vt] = E[⌧t✓tvt] = E[✓t] · E[⌧tvt] = (1 −2µ) E[⌧tvt] ≥(1 −2µ) E[⌧t] where in the last inequality we used the fact that vt ≥1 with probability 1 and ⌧t is non-negative. Summing over t we obtain that Equation 1 holds. Next, we show that for i 2 {1, 2}, kw(i) t k2 kw(i) 0 k2 + N X t=1 ⌧t(2kw(2) 0 −w(1) 0 k + 1) (2) Indeed, since the update of w(1) t+1 and w(2) t+1 is identical, we have that kw(1) t+1−w(2) t+1k = kw(1) 0 −w(2) 0 k for every t. Now, whenever ⌧t = 1 we have that either ythw(1) t−1, xti 0 or ythw(2) t−1, xti 0. Assume w.l.o.g. that ythw(1) t−1, xti 0. Then, kw(1) t k2 = kw(1) t−1 + ytxtk2 = kw(1) t−1k2 + 2ythw(1) t−1, xti + kxtk2 kw(1) t−1k2 + 1 Second, kw(2) t k2 = kw(2) t−1 + ytxtk2 = kw(2) t−1k2 + 2ythw(2) t−1, xti + kxtk2 kw(2) t−1k2 + 2ythw(2) t−1 −w(1) t−1, xti + kxtk2 kw(2) t−1k2 + 2 kw(2) t−1 −w(1) t−1k + 1 = kw(2) t−1k2 + 2 kw(2) 0 −w(1) 0 k + 1 Therefore, the above two equations imply 8i 2 {1, 2}, kw(i) t k2 kw(i) t−1k2 + 2 kw(2) 0 −w(1) 0 k + 1. Summing over t we obtain that Equation 2 holds. Equipped with Equation 1 and Equation 2 we are ready to prove the theorem. Denote K = maxi kw(i) 0 k and note that kw(2) 0 −w(1) 0 k 2K. We prove the theorem by providing upper and lower bounds on E[hw(i) t , w⇤i]. Combining the update rule with Equation 1 we get: E[hw(i) t , w⇤i] = hw(i) 0 , w⇤i + E " N X t=1 ⌧t ˜vt # ≥hw(i) 0 , w⇤i + (1 −2µ) ¯T ≥−K kw⇤k + (1 −2µ) ¯T To construct an upper bound, first note that Equation 2 implies that E[kw(i) t k2] kw(i) 0 k2 + (2kw(2) 0 −w(1) 0 k + 1) ¯T K2 + (4 K + 1) ¯T 5 Using the above and Jensen’s inequality, we get that E[hw(i) t , w⇤i] E[kw(i) t k kw⇤k] kw⇤k q E[kw(i) t k2] kw⇤k q K2 + (4 K + 1) ¯T Comparing the upper and lower bounds, we obtain that −K kw⇤k + (1 −2µ) ¯T kw⇤k q K2 + (4 K + 1) ¯T Using p a + b pa + p b, the above implies that (1 −2µ) ¯T −kw⇤k p (4 K + 1) p ¯T −2 K kw⇤k 0 Denote ↵= kw⇤k p (4 K + 1), then the above also implies that (1 −2µ) ¯T −↵ p ¯T −↵0. Denote β = ↵/(1 −2µ), using standard algebraic manipulations, the above implies that ¯T β + β2 + β1.5 3 β2 , where we used the fact that kw⇤k must be at least 1 for the separability assumption to hold, hence β ≥1. This concludes our proof. The above theorem tells us that our algorithm converges quickly. We next address the second question, regarding the quality of the point to which the algorithm converges. As mentioned in the introduction, the convergence must depend on the initial predictors. Indeed, if w(1) 0 = w(2) 0 , then the algorithm will not make any updates. The next question is what happens if we initialize w(1) 0 and w(2) 0 at random. The lemma below shows that this does not suffice to ensure convergence to the optimum, even if the data is linearly separable without noise. The proof for this lemma is given in Appendix A. Lemma 1 Fix some δ 2 (0, 1) and let d be an integer greater than 40 log(1/δ). There exists a distribution over Rd ⇥{±1}, which is separable by a weight vector w⇤for which kw⇤k2 = d, such that running the “Update by Disagreement” algorithm, with the perceptron as the underlying update rule, and with every coordinate of w(1) 0 , w(2) 0 initialized according to any symmetric distribution over R, will yield a solution whose error is at least 1/8, with probability of at least 1 −δ. Trying to circumvent the lower bound given in the above lemma, one may wonder what would happen if we will initialize w(1) 0 , w(2) 0 differently. Intuitively, maybe noisy labels are not such a big problem at the beginning of the learning process. Therefore, we can initialize w(1) 0 , w(2) 0 by running the vanilla perceptron for several iterations, and only then switch to our algorithm. Trivially, for the distribution we constructed in the proof of Lemma 1, this approach will work just because in the noise-free setting, both w(1) 0 and w(2) 0 will converge to vectors that give the same predictions as w⇤. But, what would happen in the noisy setting, when we flip the label of every example with probability of µ? The lemma below shows that the error of the resulting solution is likely to be order of µ3. Here again, the proof is given in Appendix A. Lemma 2 Consider a vector w⇤2 {±1}d and the distribution ˜D over Rd ⇥{±1} such that to sample a pair (x, ˜y) we first choose x uniformly at random from {e1, . . . , ed}, set y = hw⇤, eii, and set ˜y = y with probability 1 −µ and ˜y = −y with probability µ. Let w(1) 0 , w(2) 0 be the result of running the vanilla perceptron algorithm on random examples from ˜D for any number of iterations. Suppose that we run the “Update by Disagreement” algorithm for an additional arbitrary number of iterations. Then, the error of the solution is likely to be ⌦(µ3). To summarize, we see that without making additional assumptions on the data distribution, it is impossible to prove convergence of our algorithm to a good solution. In the next section we show that for natural data distributions, our algorithm converges to a very good solution. 5 EXPERIMENTS We now demonstrate the merit of our suggested meta-algorithm using empirical evaluation. Our main experiment is using our algorithm with deep networks in a real-world scenario of noisy labels. 6 In particular, we use a hypothesis class of deep networks and a Stochastic Gradient Descent with momentum as the basis update rule. The task is classifying face images according to gender. As training data, we use the Labeled Faces in the Wild (LFW) dataset for which we had a labeling of the name of the face, but we did not have gender labeling. To construct gender labels, we used an external service that provides gender labels based on names. This process resulted in noisy labels. We show that our method leads to state-of-the-art results on this task, compared to competing noise robustness methods. We also performed controlled experiments to demonstrate our algorithm’s performance on linear classification with varying levels of noise. These results are detailed in Appendix B. 5.1 Deep Learning We have applied our algorithm with a Stochastic Gradient Descent (SGD) with momentum as the base update rule on the task of labeling images of faces according to gender. The images were taken from the Labeled Faces in the Wild (LFW) benchmark [18]. This benchmark consists of 13,233 images of 5,749 different people collected from the web, labeled with the name of the person in the picture. Since the gender of each subject is not provided, we follow the method of [25] and use a service that determines a person’s gender by their name (if it is recognized), along with a confidence level. This method gives rise to “natural” noisy labels due to “unisex” names, and therefore allows us to experiment with a real-world setup of dataset with noisy labels. Name Kim Morgan Joan Leslie Confidence 88% 64% 82% 88% Correct Mislabeled Figure 1: Images from the dataset tagged as female We have constructed train and test sets as follows. We first took all the individuals on which the gender service gave 100% confidence. We divided this set at random into three subsets of equal size, denoted N1, N2, N3. We denote by N4 the individuals on which the confidence level is in [90%, 100%), and by N5 the individuals on which the confidence level is in [0%, 90%). Needless to say that all the sets N1, . . . , N5 have zero intersection with each other. We repeated each experiment three times, where in every time we used a different Ni as the test set, for i 2 {1, 2, 3}. Suppose N1 is the test set, then for the training set we used two configurations: 1. A dataset consisting of all the images that belong to names in N2, N3, N4, N5, where unrecognized names were labeled as male (since the majority of subjects in LFW are males). 2. A dataset consisting of all the images that belong to names in N2, N3, N4. We use a network architecture suggested by [24], using an available tensorflow implementation1. It should be noted that we did not change any parameters of the network architecture or the optimization process, and use the default parameters in the implementation. Since the amount of male and female subjects in the dataset is not balanced, we use an objective of maximizing the balanced accuracy [9] - the average accuracy obtained on either class. Training is done for 30,000 iterations on 128 examples mini-batch. In order to make the networks disagreement meaningful, we initialize the two networks by training both of them normally (updating on all the examples) until iteration #5000, where we switch to training with the “Update by Disagreement” rule. Due to the fact that we are not updating on all examples, we decrease the weight of batches with less than 10% of the original examples in the original batch to stabilize gradients. 2. 1https://github.com/dpressel/rude-carnie. 2Code is available online on https://github.com/emalach/UpdateByDisagreement. 7 We inspect the balanced accuracy on our test data during the training process, comparing our method to a vanilla neural network training, as well as to soft and hard bootstrapping described in [33] and to the s-model described in [15], all of which are using the same network architecture. We use the initialization parameters for [33, 15] that were suggested in the original papers. We show that while in other methods, the accuracy effectively decreases during the training process due to overfitting the noisy labels, in our method this effect is less substantial, allowing the network to keep improving. We study two different scenarios, one in which a small clean test data is available for model selection, and therefore we can choose the iteration with best test accuracy, and a more realistic scenario where there is no clean test data at hand. For the first scenario, we observe the balanced accuracy of the best available iteration. For the second scenario, we observe the balanced accuracy of the last iteration. As can be seen in Figure 2 and the supplementary results listed in Table 1 in Appendix B, our method outperforms the other methods in both situations. This is true for both datasets, although, as expected, the improvement in performance is less substantial on the cleaner dataset. The second best algorithm is the s-model described in [15]. Since our method can be applied to any base algorithm, we also applied our method on top of the s-model. This yields even better performance, especially when the data is less noisy, where we obtain a significant improvement. Dataset #1 - more noise Dataset #2 - less noise Figure 2: Balanced accuracy of all methods on clean test data, trained on the two different datasets. 6 Discussion We have described an extremely simple approach for supervised learning in the presence of noisy labels. The basic idea is to decouple the “when to update” rule from the “how to update” rule. We achieve this by maintaining two predictors, and update based on their disagreement. We have shown that this simple approach leads to state-of-the-art results. Our theoretical analysis shows that the approach leads to fast convergence rate when the underlying update rule is the perceptron. We have also shown that proving that the method converges to an optimal solution must rely on distributional assumptions. There are several immediate open questions that we leave to future work. First, suggesting distributional assumptions that are likely to hold in practice and proving that the algorithm converges to an optimal solution under these assumptions. Second, extending the convergence proof beyond linear predictors. While obtaining absolute convergence guarantees seems beyond reach at the moment, coming up with oracle based convergence guarantees may be feasible. Acknowledgements: This research is supported by the European Research Council (TheoryDL project). 8 References [1] Rie Kubota Ando and Tong Zhang. Two-view feature generation model for semi-supervised learning. In Proceedings of the 24th international conference on Machine learning, pages 25–32. ACM, 2007. [2] Les E Atlas, David A Cohn, Richard E Ladner, Mohamed A El-Sharkawi, Robert J Marks, ME Aggoune, and DC Park. Training connectionist networks with queries and selective sampling. In NIPS, pages 566–573, 1989. [3] Pranjal Awasthi, Maria Florina Balcan, and Philip M Long. The power of localization for efficiently learning linear separators with noise. In Proceedings of the 46th Annual ACM Symposium on Theory of Computing, pages 449–458. ACM, 2014. [4] Ricardo Barandela and Eduardo Gasca. Decontamination of training samples for supervised pattern recognition methods. In Joint IAPR International Workshops on Statistical Techniques in Pattern Recognition (SPR) and Structural and Syntactic Pattern Recognition (SSPR), pages 621–630. Springer, 2000. [5] Alan Joseph Bekker and Jacob Goldberger. Training deep neural-networks based on unreliable labels. In Acoustics, Speech and Signal Processing (ICASSP), 2016 IEEE International Conference on, pages 2682–2686. IEEE, 2016. [6] Avrim Blum and Tom Mitchell. Combining labeled and unlabeled data with co-training. In Proceedings of the eleventh annual conference on Computational learning theory, pages 92– 100. ACM, 1998. [7] Jakramate Bootkrajang and Ata Kab´an. Label-noise robust logistic regression and its applications. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pages 143–158. Springer, 2012. [8] Jakramate Bootkrajang and Ata Kab´an. Boosting in the presence of label noise. arXiv preprint arXiv:1309.6818, 2013. [9] Kay Henning Brodersen, Cheng Soon Ong, Klaas Enno Stephan, and Joachim M Buhmann. The balanced accuracy and its posterior distribution. In Pattern recognition (ICPR), 2010 20th international conference on, pages 3121–3124. IEEE, 2010. [10] Carla E. Brodley and Mark A. Friedl. Identifying mislabeled training data. Journal of Artificial Intelligence Research, 11:131–167, 1999. [11] David Cohn, Les Atlas, and Richard Ladner. Improving generalization with active learning. Machine learning, 15(2):201–221, 1994. [12] David Flatow and Daniel Penner. On the robustness of convnets to training on noisy labels. http://cs231n.stanford.edu/reports/flatow_penner_report. pdf, 2017. [13] Benoˆıt Fr´enay and Michel Verleysen. Classification in the presence of label noise: a survey. IEEE transactions on neural networks and learning systems, 25(5):845–869, 2014. [14] Yoav Freund, H Sebastian Seung, Eli Shamir, and Naftali Tishby. Selective sampling using the query by committee algorithm. Machine learning, 28(2-3):133–168, 1997. [15] Jacob Goldberger and Ehud Ben-Reuven. Training deep neural networks using a noise adaptation layer. Under review for ICLR, 2017. [16] Yves Grandvalet and Yoshua Bengio. Entropy regularization. Semi-supervised learning, pages 151–168, 2006. [17] Yves Grandvalet, Yoshua Bengio, et al. Semi-supervised learning by entropy minimization. In NIPS, volume 17, pages 529–536, 2004. 9 [18] Gary B Huang, Manu Ramesh, Tamara Berg, and Erik Learned-Miller. Labeled faces in the wild: A database for studying face recognition in unconstrained environments. Technical report, Technical Report 07-49, University of Massachusetts, Amherst, 2007. [19] Panagiotis G Ipeirotis, Foster Provost, and Jing Wang. Quality management on amazon mechanical turk. In Proceedings of the ACM SIGKDD workshop on human computation, pages 64–67. ACM, 2010. [20] Pravin Kakar and Alex Yong-Sang Chia. Probabilistic learning from mislabelled data for multimedia content recognition. In Multimedia and Expo (ICME), 2015 IEEE International Conference on, pages 1–6. IEEE, 2015. [21] Michael Kearns. Efficient noise-tolerant learning from statistical queries. Journal of the ACM (JACM), 45(6):983–1006, 1998. [22] Anders Krogh, Jesper Vedelsby, et al. Neural network ensembles, cross validation, and active learning. Advances in neural information processing systems, 7:231–238, 1995. [23] Jan Larsen, L Nonboe, Mads Hintz-Madsen, and Lars Kai Hansen. Design of robust neural network classifiers. In Acoustics, Speech and Signal Processing, 1998. Proceedings of the 1998 IEEE International Conference on, volume 2, pages 1205–1208. IEEE, 1998. [24] Gil Levi and Tal Hassner. Age and gender classification using convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 34–42, 2015. [25] Philip Masek and Magnus Thulin. Evaluation of face recognition apis and libraries. Master’s thesis, University of Gothenburg, 2015. [26] Ross A McDonald, David J Hand, and Idris A Eckley. An empirical comparison of three boosting algorithms on real data sets with artificial class noise. In International Workshop on Multiple Classifier Systems, pages 35–44. Springer, 2003. [27] Aditya Krishna Menon, Brendan van Rooyen, and Nagarajan Natarajan. Learning from binary labels with instance-dependent corruption. arXiv preprint arXiv:1605.00751, 2016. [28] Volodymyr Mnih and Geoffrey E Hinton. Learning to label aerial images from noisy data. In Proceedings of the 29th International Conference on Machine Learning (ICML-12), pages 567–574, 2012. [29] Nagarajan Natarajan, Inderjit S Dhillon, Pradeep K Ravikumar, and Ambuj Tewari. Learning with noisy labels. In Advances in neural information processing systems, pages 1196–1204, 2013. [30] Kamal Nigam and Rayid Ghani. Analyzing the effectiveness and applicability of co-training. In Proceedings of the ninth international conference on Information and knowledge management, pages 86–93. ACM, 2000. [31] Giorgio Patrini, Frank Nielsen, Richard Nock, and Marcello Carioni. Loss factorization, weakly supervised learning and label noise robustness. arXiv preprint arXiv:1602.02450, 2016. [32] Giorgio Patrini, Alessandro Rozza, Aditya Menon, Richard Nock, and Lizhen Qu. Making neural networks robust to label noise: a loss correction approach. arXiv preprint arXiv:1609.03683, 2016. [33] Scott Reed, Honglak Lee, Dragomir Anguelov, Christian Szegedy, Dumitru Erhan, and Andrew Rabinovich. Training deep neural networks on noisy labels with bootstrapping. arXiv preprint arXiv:1412.6596, 2014. [34] Burr Settles. Active learning literature survey. University of Wisconsin, Madison, 52(5566):11, 2010. 10 [35] H Sebastian Seung, Manfred Opper, and Haim Sompolinsky. Query by committee. In Proceedings of the fifth annual workshop on Computational learning theory, pages 287–294. ACM, 1992. [36] Sainbayar Sukhbaatar, Joan Bruna, Manohar Paluri, Lubomir Bourdev, and Rob Fergus. Training convolutional networks with noisy labels. arXiv preprint arXiv:1406.2080, 2014. [37] Tong Xiao, Tian Xia, Yi Yang, Chang Huang, and Xiaogang Wang. Learning from massive noisy labeled data for image classification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2691–2699, 2015. [38] Xiaojin Zhu. Semi-supervised learning literature survey. Computer Sciences TR 1530, 2005. [39] Bohan Zhuang, Lingqiao Liu, Yao Li, Chunhua Shen, and Ian Reid. Attend in groups: a weakly-supervised deep learning framework for learning from web data. arXiv preprint arXiv:1611.09960, 2016. 11 | 2017 | 233 |
6,712 | Regret Analysis for Continuous Dueling Bandit Wataru Kumagai Center for Advanced Intelligence Project RIKEN 1-4-1, Nihonbashi, Chuo, Tokyo 103-0027, Japan wataru.kumagai@riken.jp Abstract The dueling bandit is a learning framework wherein the feedback information in the learning process is restricted to a noisy comparison between a pair of actions. In this research, we address a dueling bandit problem based on a cost function over a continuous space. We propose a stochastic mirror descent algorithm and show that the algorithm achieves an O(√T log T)-regret bound under strong convexity and smoothness assumptions for the cost function. Subsequently, we clarify the equivalence between regret minimization in dueling bandit and convex optimization for the cost function. Moreover, when considering a lower bound in convex optimization, our algorithm is shown to achieve the optimal convergence rate in convex optimization and the optimal regret in dueling bandit except for a logarithmic factor. 1 Introduction Information systems and computer algorithms often have many parameters which should be tuned. When cost or utility are explicitly given as numerical values or concrete functions, the system parameters can be appropriately determined depending on the the values or the functions. However, in a human-computer interaction system, it is difficult or impossible for users of the system to provide user preference as numerical values or concrete functions. Dueling bandit is introduced to model such situations in Yue and Joachims (2009) and enables us to appropriately tune the parameters based only on comparison results on two parameters by the users. In the learning process of a dueling bandit algorithm, the algorithm chooses a pair of parameters called actions (or arms) and receives only the corresponding comparison result. Since dueling bandit algorithms do not require an individual evaluation value for each action, they can be applied for wider areas that cannot be formulated using the conventional bandit approach. When action cost (or user utility) implicitly exists, the comparison between two actions is modeled via a cost (or utility) function, which represents the degree of the cost (or utility), and a link function, which determines the noise in the comparison results. We refer to such a modeling method as costbased (or utility-based) approach and employ it in this research. Yue and Joachims (2009) first introduced the utility-based approach as a model for a dueling bandit problem. The cost-based dueling bandit relates to function optimization with noisy comparisons (Jamieson et al., 2012; Matsui et al., 2016) because in both frameworks an oracle compare two actions and the feedback from the oracle is represented by binary information. In particular, the same algorithm can be applied to both frameworks. However, as different performance measures are applied to the algorithms in function optimization and dueling bandit, it has not been demonstrated that an algorithm that works efficiently in one framework will also perform well in the other framework. This study clarifies relation between function optimization and dueling bandit thorough their regret analysis. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 1.1 Problem Setup In the learning process of the dueling bandit problem, a learner presents two points, called actions in a space A, to an oracle and the oracle returns one-bit feedback to the learner based on which action wins (i.e., which action is more preferable for the oracle). Here, we denote by a ≻a′ the event that a wins a′ and by P(a ≻a′) the probability that a ≻a′ happens. In other words, we assume that the feedback from the oracle follows the following two-valued random variable: F(a, a′) := { 1 w.p. P(a ≻a′) 0 w.p. 1 −P(a ≻a′), (1) where the probability P(a ≻a′) is determined by the oracle. We refer to this type of feedback as noisy comparison feedback. Unlike conventional bandit problems, the leaner has to make a decision that is based only on the noisy comparison feedback and cannot access the individual values of the cost (or utility) function. We further assume that each comparison between a pair of actions is independent of other comparisons. The learner makes a sequence of decisions based on the noisy comparisons provided by the oracle. After receiving F(at, a′ t) at time t, the learner chooses the next two action (at+1, a′ t+1). As a performance measure for an action a, we introduce the minimum win probability: P ∗(a) = inf a′∈A P(a ≻a′). We next quantify the performance of the algorithm using the expected regret as follows:1) RegDB T = sup a∈A E [ T ∑ t=1 {(P ∗(a) −P ∗(at)) + (P ∗(a) −P ∗(a′ t))} ] . (2) 1.2 Modeling Assumption In this section, we clarify some of the notations and assumptions. Let an action space A ⊂Rd be compact convex set with non-empty interior. We denote the Euclidean norm by ∥· ∥. Assumption 1. There exist functions f : A →R and σ : R →[0, 1] such that the probability in noisy comparison feedback can be represented as follows: P(a ≻a′) = σ(f(a′) −f(a)). (3) In the following, we call f in Assumption 1 a cost function and and σ a link function. Here, the cost function and the link function are fixed for each query to the oracle. In this sense, our setting is different from online optimization where the objective function changes. Definition 1. (Strong Convexity) A function f : Rd →R is α-strongly convex over the set A ⊂Rd if for all x, y ∈A it holds that f(y) ≥f(x) + ∇f(x)⊤(y −x) + α 2 ∥y −x∥2. Definition 2. (Smoothness) A function f : Rd →R is β-smooth over the set A ⊂Rd if for all x, y ∈A it holds that f(y) ≤f(x) + ∇f(x)⊤(y −x) + β 2 ∥y −x∥2. Assumption 2. The cost function f : A →R is twice continuously differentiable, L-Lipschitz, α-strongly convex and β-smooth with respect to the Euclidean norm. From Assumption 2, there exists a unique minimizer a∗of the cost function f since f is strictly convex. We set B := supa,a′∈A f(a′) −f(a). Assumption 3. The link function σ : R →[0, 1] is three times differentiable and rotation-symmetric (i.e., σ(−x) = 1 −σ(x)). Its first derivative is positive and monotonically non-increasing on [0, B]. 1) Although the regret in (2) appears superficially different from that in Yue and Joachims (2009), two regrets can be shown to coincide with each other under Assumptions 1-3 in Subsection 1.2. 2 For examples, the standard logistic distribution function, the cumulative standard Gaussian distribution function and the linear function σ(x) = (1 + x)/2 can be taken to be link functions that satisfy Assumption 3. We note that link functions often behave like cumulative probability distribution functions. This is because the sign of the difference between two noisy function values can be regarded as the feedback (1) which satisfies Assumption 1, and then, the link function σ coincides with the cumulative probability distribution function of the noise (see Section 2 of Jamieson et al. (2012) for more details). We will discuss the relation of noisy comparison feedback to noisy function values in Section 5. 1.3 Related Work and Our Contributions Dueling bandit on the continuous action space relates with various optimization methods. We summarize related studies in the following. Dueling bandit problem: Yue and Joachims (2009) formulated information retrieval systems as a dueling bandit problem. They reduced this to a problem of optimizing an “almost"-concave function and presented a stochastic gradient ascent algorithm based on one-point bandit feedback. Subsequently, they showed that their algorithm achieves an O(T 3/4)-regret bound under the differentiability and the strict concavity for a utility function. Ailon et al. (2014) presented reduction methods from dueling bandit to the conventional bandit under the strong restriction that the link function is linear and showed that their algorithm achieves an O( √ T log3 T)-regret bound. We note that dueling bandit has a number of other formulations (Yue and Joachims, 2011; Yue et al., 2012; Busa-Fekete et al., 2013, 2014; Urvoy et al., 2013; Zoghi et al., 2014; Jamieson et al., 2015). Optimization with one-point bandit feedback: In conventional bandit settings, various convex optimization methods have been studied. Flaxman et al. (2005) showed that the gradient of smoothed version of a convex function can be estimated from a one-point bandit feedback and proposed a stochastic gradient descent algorithm which achieves an O(T 3/4) regret bound under the Lipschitzness condition. Moreover, assuming the strong convexity and the smoothness for the convex function such as (2), Hazan and Levy (2014) proposed a stochastic mirror descent algorithm which achieves an O(√T log T) regret bound and showed that the algorithm is near optimal because the upper bound matched the lower bound of Ω( √ T) derived by Shamir (2013) up to a logarithmic factor in bandit convex optimization. Optimization with two-point bandit feedback: Dueling bandit algorithms require two actions at each round in common with two-point bandit optimization. In the context of online optimization, Agarwal et al. (2010) first considered convex optimization with two-point feedback. They proposed a gradient descent-based algorithm and showed that the algorithm achieves the regret bounds of under the Lipschitzness condition and O(log T) under the strong convexity condition. In stochastic convex optimization, Duchi et al. (2015) showed that a stochastic mirror descent algorithm achieves an O( √ T) regret bound under the Lipschitzness (or the smoothness) condition and proved the upper bound to be optimal deriving a matching lower bound Ω( √ T). Moreover, in both of online and stochastic convex optimization, Shamir (2017) showed that a gradient descent-based algorithm achieves an O( √ T) regret bound with optimal dependence on the dimension under the Lipschitzness condition. However, those two-point bandit algorithms strongly depend on the availability of the difference of function values and cannot be directly applied to the case of dueling bandit where the difference of function values is compressed to one bit in noisy comparison feedback. Optimization with noisy comparison feedback: The cost-based dueling bandit relates to function optimization with noisy comparisons (Jamieson et al., 2012; Matsui et al., 2016) because in both frameworks, the feedback is represented by preference information. Jamieson et al. (2012) proposed a coordinate descent algorithm and proved that the convergence rate of the algorithm achieved an optimal order.2) Matsui et al. (2016) proposed a Newton method-based algorithm and proved that its convergence rate was almost equivalent to that of Jamieson et al. (2012). They further showed that their algorithm could easily be parallelized and performed better numerically than the dueling bandit algorithm in Yue and Joachims (2009). However, since they considered only the unconstrained case in which A = Rd, it is not possible to apply their algorithm to the setting considered here, in which the action space is compact. 2)The optimal order changes depending on the model parameter κ ≥1 of the pairwise comparison oracle in Jamieson et al. (2012). 3 Optimization with one-bit feedback: The optimization method of the dueling bandit algorithm is based on one-bit feedback. In related work, Zhang et al. (2016) considered stochastic optimization under one-bit feedback. However, since their approach was restricted to the problem of linear optimization with feedback generated by the logit model, it cannot be applied to the problem addressed in the current study. Our contributions: In this paper, we consider the cost-based dueling bandit under Assumptions 1-3. While the formulation is similar to that of Yue and Joachims (2009), Assumptions 2 and 3 are stronger than those used in that study. On the other hand, we impose the weaker assumption on the link function than that of Ailon et al. (2014). Yue and Joachims (2009) showed that a stochastic gradient descent algorithm can be applied to dueling bandit. Thus, it is naturally expected that a stochastic mirror descent algorithm, which achieves the (near) optimal order in convex optimization with one/two-point bandit feedback, can be applied to dueling bandit setting and achieves good performance. Following this intuition, we propose a mirror descent-based algorithm. Our key contributions can be summarized as follows: • We propose a stochastic mirror descent algorithm with noisy comparison feedback. • We provide an O(√T log T)-regret bound for our algorithm in dueling bandit. • We clarify the relation between the cost-based dueling bandit and convex optimization in terms of their regrets and show that our algorithm can be applied to convex optimization. • We show that the convergence rate of our algorithm is O( √ log T/T) in convex optimization. • We derive a lower bound in convex optimization with noisy comparison feedback and show our algorithm to be near optimal in both dueling bandit and convex optimization. 2 Algorithm and Main Result 2.1 Stochastic Mirror Descent Algorithm We first prepare the notion of a self-concordant function on which our algorithm is constructed (see e.g., Nesterov et al. (1994), Appendix F in Griva et al. (2009)). Definition 3. A function R : int(A) →R is considered self-concordant if the following two conditions hold: 1. R is three times continuously differentiable and convex, and approaches infinity along any sequence of points approaching the boundary of int(A). 2. For every h ∈Rd and x ∈int(A), |∇3R(x)[h, h, h]| ≤2(h⊤∇2R(x)h) 3 2 holds, where ∇3R(x)[h, h, h] := ∂3R ∂t1∂t2∂t3 (x + t1h + t2h + t3h) t1=t2=t3=0. In addition to these two conditions, if R satisfies the following condition for a positive real number ν, it is called a ν-self-concordant function: 3. For every h ∈Rd and x ∈int(A), |∇R(x)⊤h| ≤ν 1 2 (h⊤∇2R(x)h) 1 2 . In this paper, we assume the Hessian ∇2R(a) of a ν-self-concordant function to be full-rank over A and ∇R(int(A)) = Rd. Bubeck and Eldan (2014) showed that such a ν-self-concordant function satisfying ν = (1+o(1))d will always exist as long as the dimension d is sufficiently large. We next propose Algorithm 1, which we call NC-SMD. This can be regarded as stochastic mirror descent with noisy comparison feedback. We make three remarks on Algorithm 1. First, the function Rt is self-concordant though not νself-concordant. The second remark is as follows. Let us denote the local norms by ∥a∥w = √ a⊤∇2R(w)a. Then, if R is a self-concordant function for A, the Dikin Ellipsoid {a′ ∈A| ∥a′ − a∥a ≤1} centered at a is entirely contained in int(A) for any a ∈int(A). Thus, a′ t := at + ∇2Rt(at)−1 2 ut in Algorithm 1 is contained in int(A) for any at ∈int(A) and a unit vector ut. This shows a comparison between actions at and a′ t to be feasible. Our third remark is as follows. Since the self-concordant function Rt at round t depends on the past actions {ai}t i=1, it may be thought that those past actions are stored during the learning process. However, note that only ∇Rt 4 Algorithm 1 Noisy Comparison-based Stochastic Mirror Descent (NC-SMD) Input: Learning rate η, ν-self-concordant function R, time horizon T, tuning parameters λ, µ Initialize: a1 = argmina∈AR(a). for t = 1 to T do Update Rt(a) = R(a) + λη 2 ∑t i=1 ∥a −ai∥2 + µ∥a∥2 Pick a unit vector ut uniformly at random Compare at and a′ t := at + ∇2Rt(at)−1 2 ut and receive F(a′ t, at) Set ˆgt = F(a′ t, at)d∇2Rt(at) 1 2 ut Set at+1 = ∇R−1 t (∇Rt(at) −ηˆgt) end for Output: aT +1 and ∇2Rt are used in the algorithm; ∇Rt depends only on ∑t i=1 at and ∇2Rt does not depend on the past actions. Thus, only the sum of past actions must be stored, rather than all past actions. 2.2 Main Result: Regret Bound From Assumption 2 and the compactness of A, the diameter R and B := supa,a′∈A f(a′) −f(a) are finite. From Assumption 3, there are exist positive constants l0, L0, B2 and L2 such that the first derivative σ′ of the link function is bounded as l0 ≤σ′ ≤L0 on [−B, B] and the second derivative σ′′ is bounded above by B2 and L2-Lipschitz on [−B, B]. We use the constants below. The following theorem shows that with appropriate parameters, NC-SMD (Algorithms 1) achieves an O(√T log T)-regret bound. Theorem 4. We set C := ν + B2L2+(L+1)L0β 2λ . When the tuning parameters satisfy λ ≤l0α/2, µ ≥ ( L3 0L2/λ )2 and the total number T of rounds satisfies T ≥C log T. Algorithm 1 with a νself-concordant function and the learning parameter η = 1 2d √ C log T T achieves the following regret bound under Assumptions 1-3: RegDB T ≤ 4d √ CT log T + 2LL0R. (4) 3 Regret Analysis We prove Theorem 4 in this section. The proofs of lemmas in this section are provided in supplementary material. 3.1 Reduction to Locally-Convex Optimization We first reduce the dueling bandit problem to a locally-convex optimization problem. We define Pb(a) := σ(f(a) −f(b)) for a, b ∈A and Pt(a) := Pat(a). For a cost function f and a selfconcordant function R, we set a∗:= argmina∈Af(a), a1 := argmina∈AR(a) and a∗ T := 1 T a1 + (1 −1 T )a∗. The regret of dueling bandit is bounded as follows. Lemma 5. The regret of Algorithm 1 is bounded as follows: RegDB T ≤ 2E [ T ∑ t=1 (Pt(at) −Pt(a∗ T )) ] + LL0β λη log T + 2LL0R. (5) The following lemma shows that Pb inherits the smoothness of f globally. Lemma 6. The function Pb is (L0β + B2L2)-smooth for an arbitrary b ∈A. Let B be the unit Euclidean ball, B(a, δ) the ball centered at a with radius δ and L(a, b) the line segment between a and b. In addition, for a, b ∈A, let Aδ(a, b) := ∪a′∈L(a,b)B(a′, δ) ∩A. The following lemma guarantees the local strong convexity of Pb. Lemma 7. The function Pb is 1 2l0α-strongly convex on Aδ(a∗, b) when δ ≤ l0α 2L3 0L2 . 5 3.2 Gradient Estimation We note that at + ∇2Rt(at)−1 2 x for x ∈B is included in A due to the properties of the Dikin ellipsoid. We introduce the smoothed version of Pt over int(A): ˆPt(a) := Ex∈B[Pt(a + ∇2Rt(at)−1 2 x)] (6) = Ex∈B[σ(f(a + ∇2Rt(at)−1 2 x) −f(at))]. (7) Next, we adopt the following estimator for the gradient of ˆPt: ˆgt := F(at + ∇2Rt(at)−1 2 ut, at)d∇2Rt(at) 1 2 ut, where ut is drawn from the unit surface S uniformly. We then derive the unbiasedness of ˆgt as follows. Lemma 8. E[ˆgt|at] = ∇ˆPt(at). 3.3 Regret Bound with Bregman Divergence From Lemma 5, the regret analysis in dueling bandit is reduced to the minimization problem of the regret-like value of Pt. Since Pt is globally smooth and locally strongly convex from Lemmas 6 and 7, we can employ convex-optimization methods. Moreover, since ˆgt is an unbiased estimator for the gradient of the smoothed version of Pt from Lemma 8, it is expected that stochastic mirror descent (Algorithm 1) with ˆgt is effective to the minimization problem. In the following, making use of the property of stochastic mirror descent, we bound the regret-like value of Pt by the Bregman divergence, and subsequently prove Theorem 4. Definition 9. Let R be a continuously differentiable strictly convex function on int(A). Then, the Bregman divergence associated with R is defined by DR(a, b) = R(a) −R(b) −∇R(b)⊤(a −b). Lemma 10. When λ ≤l0α/2 and µ ≥ ( L3 0L2/λ )2, the regret of Algorithm 1 is bounded for any a ∈int(A) as follows: E [ T ∑ t=1 (Pt(at) −Pt(a)) ] ≤1 η ( R(a) −R(a1) + E [ T ∑ t=1 DR∗ t (∇R(at) −ηˆgt, ∇R(at)) ]) + L0β + B2L2 λη log T, (8) where R∗ t (a) := supx∈Rd⟨x, a⟩−Rt(a) is the Fenchel dual of Rt. The Bregman divergence in Lemma 10 is bounded as follows. Lemma 11. When η ≤ 1 2d, the sequence at output by Algorithm 1 satisfies DR∗ t (∇Rt(at) −ηˆgt, ∇Rt(at)) ≤4d2η2. (9) [Proof of Theorem 4] From Lemma 4 of Hazan and Levy (2014), the ν-self-concordant function R satisfies R(a∗ T ) −R(a1) ≤ν log 1 1 −πa1(a∗ T ), where πa(a′) := inf{r ≥0|a+r−1(a′ −a)} is the Minkowsky function. Since πa1(a∗ T ) ≤1−T −1 from the definition of a∗ T , we obtain R(a∗ T ) −R(a1) ≤ν log T. Note that the condition η ≤ 1 2d in Lemma 11 is satisfied due to T ≥C log T. Combining Lemmas 5, 10 and 11, we have RegDB T ≤ 2 η ( ν log T + 4d2η2T ) + L0β + Dσ′′L2 λη log T + LL0β l0αη + 2LL0R ≤ ( 2ν + B2L2 + (L + 1)L0β λ ) log T η + 8d2Tη + 2LL0R. Thus, when η is defined in Theorem 4, the regret bound (4) is obtained. 6 4 Convergence Rate in Convex Optimization In the previous sections, we considered the minimization problem for the regret of dueling bandit. In this section, as an application of the approach, we show that the averaged action of NC-SMD (Algorithm 1) minimize the cost function f in (3). To derive the convergence rate of our algorithm, we introduce the regret of function optimization and establish a connection between the regrets of dueling bandit and function optimization. In convex optimization with noisy comparison feedback, the learner chooses a pair (at, a′ t) of actions in the learning process and suffers a loss f(at) + f(a′ t). Then, the regret of the algorithms in function optimization is defined as follows: RegF O T := E [ T ∑ t=1 (f(at) −f(a∗)) + (f(a′ t) −f(a∗)) ] , (10) where a∗= argmina∈Af. Recalling that the positive constants l0 and L0 satisfy l0 ≤σ′ ≤L0 on [−B, B], where B := supa,a′∈A f(a′) −f(a), the regrets of function optimization (10) and dueling bandit (2) are related as follows: Lemma 12. RegDB T L0 ≤RegF O T ≤RegDB T l0 . (11) Theorem 4 and Lemma 12 give an O(√T log T)-upper bound of the regret of function optimization in Algorithm 1 under the same conditions as Theorem 4. Given the convexity of f, the average of the chosen actions of any dueling bandit algorithm ¯aT := 1 2T ∑T t=1(at + a′ t) satisfies E[f(¯aT ) −f(a∗)] ≤RegF O T 2T . (12) Thus, if an optimization algorithm has a sub-linear regret bound, the above online-to-batch conversion guarantees convergence to the optimal point. Theorem 13. Under Assumptions 1-3, the averaged action ¯aT satisfies the following when T ≥ C log T: E[f(¯aT ) −f(a∗)] ≤1 l0 ( 2d √ ν log T + C T + LL0R T ) , where C is the constant defined in Theorem 4. Theorem 13 shows the convergence rate of NC-SMD (Algorithm 1) to be O(d √ log T/T). 5 Lower Bound We next derive a lower bound in convex optimization with noisy comparison feedback. To do so, we employ a lower bound of convex optimization with noisy function feedback. In a setting where the function feedback is noisy, we query a point a ∈A and obtain a noisy function value f(a)+ξ, where ξ is a zero-mean random variable with a finite second moment and independent for each query. 3) Theorem 14. Assume that the action space A is the d-dimensional unit Euclidean ball Bd and that the link function σG is the cumulative distribution function of the zero-mean Gaussian random variable with variance 2. Let the number of rounds T be fixed. Then, for any algorithm with noisy comparison feedback, there exists a function f over Bd which is twice continuously differentiable, 0.5-strongly convex and 3.5-smooth such that the output aT of the algorithm satisfies E[f(aT ) −f(a∗)] ≥0.004 min { 1, d √ 2T } . (13) 3)In general, the noise ξ can depend on the action a. See e.g. Shamir (2013) for more details. 7 [Proof] The probability distribution of noisy comparison feedback F(a, a′) with the link function σG can be realized by noisy function feedback with thestandard Gaussian noise as follows. Two noisy function values f(a) + ξ and f(a′) + ξ′ can be obtained using the noisy function feedback twice, where ξ and ξ′ are independent standard Gaussian random variables. Then, the probability distribution of the following random variable coincide with that of F(a, a′) for arbitrary a, a′ ∈A: sign(f(a) + ξ −(f(a′) + ξ′)) = sign(f(a) −f(a′) + (ξ −ξ′)). (14) Here, note that ξ −ξ′ is the zero-mean Gaussian random variable with variance 2. Thus, single noisy comparison feedback with the link function σG for any actions can be obtained by using noisy function feedback with standard Gaussian noise twice. This means that if any algorithm with 2T-times noisy function feedback is unable to achieve a certain performance, any algorithm with T-times noisy comarison feedback is similarly unable to achieve that performance. Thus, to derive Theorem 14, it is sufficient to show a lower bound of convergence rate with noisy function feedback. The following lower bound is derived by Theorem 7 of Shamir (2013). Theorem 15. (Shamir, 2013) Let the number of rounds T be fixed. Suppose that the noise ξ at each round is a standard Gaussian random variable. Then, for any algorithm with noisy function feedback, there exists a function f over Bd which is twice continuously differentiable, 0.5-strongly convex and 3.5-smooth such that the output aT satisfies E[f(aT ) −f(a∗)] ≥0.004 min { 1, d √ T } . By the above discussion and from Theorem 15, we obtain Theorem 14. Combining Theorem 13 and Theorem 14, the convergence rate of NC-SMD (Algorithm 1) is near optimal with respect to the number of rounds T. In addition, when the parameter ν of the selfconcordant function is of constant order with respect to the dimension d of the space A, the convergence rate of NC-SMD is optimal with respect to d. However, it should be noted that the parameter ν of a self-concordant function is often of the order of Θ(d) for compact convex sets including the simplex and the hypercube. As a consequece of Lemma 12, (12), and Theorems 4 and 14, the optimal regrets of dueling bandit and function optimization are of the order √ T except for the logarithmic factor and NC-SMD achieves the order. To the best of our knowledge, this is the first algorithm with the optimal order in the continuous dueling bandit setting with the non-linear link function. Finally, we provide an interesting observation on convex optimization. When noisy function feedback is available, the optimal regret of function optimization is of the order Θ( √ T) under strong convexity and smoothness conditions (Shamir, 2013). However, even when noisy function feedback is "compressed" into one-bit information as in (14), our results show that NC-MSD (Algorithm 1) achieves almost the same order O(√T log T) about the regret of function optimization as long as the cumulative probability distribution of the noise satisfies Assumption 3.4) 6 Conclusion We considered a dueling bandit problem over a continuous action space and proposed a stochastic mirror descent. By introducing Assumptions 1-3, we proved that our algorithm achieves an O(√T log T)-regret bound. We further considered convex optimization under noisy comparison feedback and showed that the regrets of dueling bandit and function optimization are essentially equivalent. Using the connection between the two regrets, it was shown that our algorithm achieves a convergence rate of O( √ log T/T) in the framework of function optimization with noisy comparison feedback. Moreover, we derived a lower bound of the convergence rate in convex optimization and showed that our algorithm achieves near optimal performance in dueling bandit and convex optimization. Some open questions still remain. While we have only dealt with bounds which hold in expectation, the derivation of the high-probability bound is a problem that has not been solved. While the analysis of our algorithm relies on strong convexity and smoothness, a regret bound without these conditions is also important. 4)Jamieson et al. (2012) provided a similar observation. However, their upper bound of the regret was derived only when the action space is the whole of Euclidean space (i.e., A = Rd) and the assumption for noisy comparison feedback is different from ours (Assumption 1). 8 Acknowledgment We would like to thank Professor Takafumi Kanamori for helpful comments. This work was supported by JSPS KAKENHI Grant Number 17K12653. References [1] A. Agarwal, O. Dekel, and L. Xiao (2010) “Optimal Algorithms for Online Convex Optimization with Multi-Point Bandit Feedback.,” in COLT, pp. 28–40, Citeseer. [2] N. Ailon, T. Joachims, and Z. Karnin (2014) “Reducing dueling bandits to cardinal bandits,” arXiv preprint arXiv:1405.3396. [3] S. Bubeck and R. Eldan (2014) “The entropic barrier: a simple and optimal universal self-concordant barrier,” arXiv preprint arXiv:1412.1587. [4] R. Busa-Fekete, E. Hüllermeier, and B. Szörényi (2014) “Preference-based rank elicitation using statistical models: The case of Mallows,” in Proceedings of the 31st International Conference on Machine Learning (ICML-14), pp. 1071–1079. [5] R. Busa-Fekete, B. Szorenyi, W. Cheng, P. Weng, and E. Hüllermeier (2013) “Top-k selection based on adaptive sampling of noisy preferences,” in International Conference on Machine Learning, pp. 1094– 1102. [6] J. C. Duchi, M. I. Jordan, M. J. Wainwright, and A. Wibisono (2015) “Optimal rates for zero-order convex optimization: The power of two function evaluations,” IEEE Transactions on Information Theory, Vol. 61, pp. 2788–2806. [7] A. D. Flaxman, A. T. Kalai, and H. B. McMahan (2005) “Online convex optimization in the bandit setting: gradient descent without a gradient,” in Proceedings of the sixteenth annual ACM-SIAM symposium on Discrete algorithms, pp. 385–394, Society for Industrial and Applied Mathematics. [8] I. Griva, S. G. Nash, and A. Sofer (2009) Linear and nonlinear optimization: Siam Appendix F which contains (F.2) is available at the following URL: http://math.gmu.edu/~igriva/book/topics.html. [9] E. Hazan and K. Levy (2014) “Bandit convex optimization: Towards tight bounds,” in Advances in Neural Information Processing Systems, pp. 784–792. [10] K. G. Jamieson, S. Katariya, A. Deshpande, and R. D. Nowak (2015) “Sparse Dueling Bandits.,” in AISTATS. [11] K. G. Jamieson, R. Nowak, and B. Recht (2012) “Query complexity of derivative-free optimization,” in Advances in Neural Information Processing Systems, pp. 2672–2680. [12] K. Matsui, W. Kumagai, and T. Kanamori (2016) “Parallel distributed block coordinate descent methods based on pairwise comparison oracle,” Journal of Global Optimization, pp. 1–21. [13] Y. Nesterov, A. Nemirovskii, and Y. Ye (1994) Interior-point polynomial algorithms in convex programming, Vol. 13: SIAM. [14] O. Shamir (2013) “On the Complexity of Bandit and Derivative-Free Stochastic Convex Optimization.,” in COLT, pp. 3–24. [15] (2017) “An Optimal Algorithm for Bandit and Zero-Order Convex Optimization with TwoPoint Feedback,” The Journal of Machine Learning Research, Vol. 18, p. 1–11. [16] T. Urvoy, F. Clerot, R. Féraud, and S. Naamane (2013) “Generic Exploration and K-armed Voting Bandits.,” in ICML (2), pp. 91–99. [17] Y. Yue, J. Broder, R. Kleinberg, and T. Joachims (2012) “The k-armed dueling bandits problem,” Journal of Computer and System Sciences, Vol. 78, pp. 1538–1556. [18] Y. Yue and T. Joachims (2009) “Interactively optimizing information retrieval systems as a dueling bandits problem,” in Proceedings of the 26th Annual International Conference on Machine Learning, pp. 1201–1208, ACM. 9 [19] (2011) “Beat the mean bandit,” in Proceedings of the 28th International Conference on Machine Learning (ICML-11), pp. 241–248. [20] L. Zhang, T. Yang, R. Jin, Y. Xiao, and Z.-H. Zhou (2016) “Online stochastic linear optimization under one-bit feedback,” in International Conference on Machine Learning, pp. 392–401. [21] M. Zoghi, S. Whiteson, R. Munos, M. d. Rijke et al. (2014) “Relative upper confidence bound for the k-armed dueling bandit problem,” in JMLR Workshop and Conference Proceedings, No. 32, pp. 10–18, JMLR. 10 | 2017 | 234 |
6,713 | One-Sided Unsupervised Domain Mapping Sagie Benaim1 and Lior Wolf1,2 1The Blavatnik School of Computer Science , Tel Aviv University, Israel 2Facebook AI Research Abstract In unsupervised domain mapping, the learner is given two unmatched datasets A and B. The goal is to learn a mapping GAB that translates a sample in A to the analog sample in B. Recent approaches have shown that when learning simultaneously both GAB and the inverse mapping GBA, convincing mappings are obtained. In this work, we present a method of learning GAB without learning GBA. This is done by learning a mapping that maintains the distance between a pair of samples. Moreover, good mappings are obtained, even by maintaining the distance between different parts of the same sample before and after mapping. We present experimental results that the new method not only allows for one sided mapping learning, but also leads to preferable numerical results over the existing circularity-based constraint. Our entire code is made publicly available at https://github.com/sagiebenaim/DistanceGAN. 1 Introduction The advent of the Generative Adversarial Network (GAN) [6] technology has allowed for the generation of realistic images that mimic a given training set by accurately capturing what is inside the given class and what is “fake”. Out of the many tasks made possible by GANs, the task of mapping an image in a source domain to the analog image in a target domain is of a particular interest. The solutions proposed for this problem can be generally separated by the amount of required supervision. On the one extreme, fully supervised methods employ pairs of matched samples, one in each domain, in order to learn the mapping [9]. Less direct supervision was demonstrated by employing a mapping into a semantic space and requiring that the original sample and the analog sample in the target domain share the same semantic representation [22]. If the two domains are highly related, it was demonstrated that just by sharing weights between the networks working on the two domains, and without any further supervision, one can map samples between the two domains [21, 13]. For more distant domains, it was demonstrated recently that by symmetrically leaning mappings in both directions, meaningful analogs are obtained [28, 11, 27]. This is done by requiring circularity, i.e., that mapping a sample from one domain to the other and then back, produces the original sample. In this work, we go a step further and show that it is possible to learn the mapping between the source domain and the target domain in a one-sided unsupervised way, by enforcing high crossdomain correlation between the matching pairwise distances computed in each domain. The new constraint allows one-sided mapping and also provides, in our experiments, better numerical results than circularity. Combining both of these constraints together often leads to further improvements. Learning the new constraint requires comparing pairs of samples. While there is no real practical reason not to do so, since training batches contain multiple samples, we demonstrate that similar constraints can even be applied per image by computing the distance between, e.g., the top part of the image and the bottom part. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 1.1 Related work Style transfer These methods [5, 23, 10] typically receive as input a style image and a content image and create a new image that has the style of the first and the content of the second. The problem of image translation between domains differs since when mapping between domains, part of the content is replaced with new content that matches the target domain and not just the style. However, the distinction is not sharp, and many of the cross-domain mapping examples in the literature can almost be viewed as style transfers. For example, while a zebra is not a horse in another style, the horse to zebra mapping, performed in [28] seems to change horse skin to zebra skin. This is evident from the stripped Putin example obtained when mapping the image of shirtless Putin riding a horse. Generative Adversarial Networks GAN [6] methods train a generator network G that synthesizes samples from a target distribution, given noise vectors, by jointly training a second network D. The specific generative architecture we and others employ is based on the architecture of [18]. In image mapping, the created image is based on an input image and not on random noise [11, 28, 27, 13, 22, 9]. Unsupervised Mapping The work that is most related to ours, employs no supervision except for sample images from the two domains. This was done very recently [11, 28, 27] in image to image translation and slightly earlier for translating between natural languages [24]. Note that [11] proposes the “GAN with reconstruction loss” method, which applies the cycle constraint in one side and trains only one GAN. However, unlike our method, this method requires the recovery of both mappings and is outperformed by the full two-way method. The CoGAN method [13], learns a mapping from a random input vector to matching samples from the two domains. It was shown in [13, 28] that the method can be modified in order to perform domain translation. In CoGAN, the two domains are assumed to be similar and their generators (and GAN discriminators) share many of the layers weights, similar to [21]. As was demonstrated in [28], the method is not competitive in the field of image to image translation. Weakly Supervised Mapping In [22], the matching between the source domain and the target domain is performed by incorporating a fixed pre-trained feature map f and requiring f-constancy, i.e, that the activations of f are the same for the input samples and for mapped samples. Supervised Mapping When provided with matching pairs of (input image, output image) the supervision can be performed directly. An example of such method that also uses GANs is [9], where the discriminator D receives a pair of images where one image is the source image and the other is either the matching target image (“real” pair) or a generated image (“fake” pair); The linking between the source and the target image is further strengthened by employing the U-net architecture [19]. Domain Adaptation In this setting, we typically are given two domains, one having supervision in the form of matching labels, while the second has little or no supervision. The goal is to learn to label samples from the second domain. In [3], what is common to both domains and what is distinct is separated thus improving on existing models. In [2], a transformation is learned, on the pixel level, from one domain to another, using GANs. In [7], an unsupervised adversarial approach to semantic segmentation, which uses both global and category specific domain adaptation techniques, is proposed. 2 Preliminaries In the problem of unsupervised mapping, the learning algorithm is provided with unlabeled datasets from two domains, A and B. The first dataset includes i.i.d samples from the distribution pA and the second dataset includes i.i.d samples from the distribution pB. Formally, given {xi}m i=1 such that xi i.i.d ∼pA and {xj}n j=1 such that xj i.i.d ∼pB, our goal is to learn a function GAB, which maps samples in domain A to analog samples in domain B, see examples below. In previous work [11, 28, 27], it is necessary to simultaneously recover a second function GBA, which similarly maps samples in domain B to analog samples in domain A. Justification In order to allow unsupervised learning of one directional mapping, we introduce the constraint that pairs of inputs x, x′, which are at a certain distance from each other, are mapped to pairs of outputs GAB(x), GAB(x′) with a similar distance, i.e., that the distances ∥x −x′∥and 2 Figure 1: Each triplet shows the source handbag image, the target shoe as produced by CycleGAN’s [28] mapper GAB and the results of approximating GAB by a fixed nonnegative linear transformation T, which obtains each output pixel as a linear combination of input pixels. The linear transformation captures the essence of GAB showing that much of the mapping is achieved by a fixed spatial transformation. ∥GAB(x) −GAB(x′)∥are highly correlated. As we show below, it is reasonable to assume that this constraint approximately holds in many of the scenarios demonstrated by previous work on domain translation. Although approximate, it is sufficient, since as was shown in [21], mapping between domains requires only little supervision on top of requiring that the output distribution of the mapper matches that of the target distribution. Consider, for example, the case of mapping shoes to edges, as presented in Fig. 4. In this case, the edge points are simply a subset of the image coordinates, selected by local image criterion. If image x is visually similar to image x′, it is likely that their edge maps are similar. In fact, this similarity underlies the usage of gradient information in the classical computer vision literature. Therefore, while the distances are expected to differ in the two domains, one can expect a high correlation. Next, consider the case of handbag to shoe mapping (Fig. 4). Analogs tend to have the same distribution of image colors in different image formations. Assuming that the spatial pixel locations of handbags follow a tight distribution (i.e., the set of handbag images share the same shapes) and the same holds for shoes, then there exists a set of canonical displacement fields that transform a handbag to a shoe. If there was one displacement, which would happen to be a fixed permutation of pixel locations, distances would be preserved. In practice, the image transformations are more complex. To study whether the image displacement model is a valid approximation, we learned a nonnegative linear transformation T ∈R642×642 + that maps, one channel at a time, handbag images of size 64 × 64 × 3 to the output shoe images of the same size given by the CycleGAN method. T’s columns can be interpreted as weights that determine the spread of mass in the output image for each pixel location in the input image. It was estimated by minimizing the squared error of mapping every channel (R, G, or B) of a handbag image to the same channel in the matching shoe. Optimization was done by gradient descent with a projection to the space of nonnegative matrices, i.e., zeroing the negative elements of T at each iteration. Sample mappings by the matrix T are shown in Fig. 1. As can be seen, the nonnegative linear transformation approximates CycleGAN’s multilayer CNN GAB to some degree. Examining the elements of T, they share some properties with permutations: the mean sum of the rows is 1.06 (SD 0.08) and 99.5% of the elements are below 0.01. In the case of adding glasses or changing gender or hair color (Fig 3), a relatively minor image modification, which does not significantly change the majority of the image information, suffices in order to create the desired visual effect. Such a change is likely to largely maintain the pairwise image distance before and after the transformation. In the case of computer generated heads at different angles vs. rotated cars, presented in [11], distances are highly correlated partly because the area that is captured by the foreground object is a good indicator of the object’s yaw. When mapping between horses to zebras [28], the texture of a horse’s skin is transformed to that of the zebra. In this case, most of the image information is untouched and the part that is changed is modified by a uniform texture, again approximately maintaining pairwise distances. In Fig 2(a), we compare the L1 distance in RGB space of pairs of horse images to the distance of the samples after mapping by the CycleGAN Network [28] is performed, using the public implementation. It is evident that the cross-domain correlation between pairwise distances is high. We also looked at Cityscapes image and ground truth label pairs in Fig 2(c), and found that there is high correlation between the distances. This is the also the case in many other literature-based mappings between datasets we have tested and ground truth pairs. While there is little downside to working with pairs of training images in comparison to working with single images, in order to further study the amount of information needed for successful alignment, we also consider distances between the two halves of the same image. We compare the L1 distance 3 (a) (b) (c) (d) Figure 2: Justifying the high correlation between distances in different domains. (a) Using the CycleGAN model [28], we map horses to zebras and vice versa. Green circles are used for the distance between two random horse images and the two corresponding translated zebra images. Blue crosses are for the reverse direction translating zebra to horse images. The Pearson correlation for horse to zebra translation is 0.77 (p-value 1.7e−113) and for zebra to horse it is 0.73 (p-value 8.0e−96). (b) As in (a) but using the distance between two halves of the same image that is either a horse image translated to a zebra or vice-versa. The Pearson correlation for horse to zebra translation is 0.91 (p-value 9.5e−23) and for zebra to horse it is 0.87 (p-value 9.7e−19). (c) Cityscapes images and associated labels. Green circles are used for distance between two cityscapes images and the two corresponding ground truth images The Pearson correlation is 0.65 (p-value 6.0e−16). (d) As in (c) but using the distance between two halves of the same image. The Pearson correlation is 0.65 (p-value 1.4e−12). between the left and right halves as computed on the input image to that which is obtained on the generated image or the corresponding ground truth image. Fig. 2(b) and Fig. 2(d) presents the results for horses to zebras translation and for Cityscapes image and label pairs, respectively. As can be seen, the correlation is also very significant in this case. From Correlations to Sum of Absolute Differences We have provided justification and empirical evidence that for many semantic mappings, there is a high degree of correlations between the pairwise distances in the two domains. In other words, let dk be a vector of centered and unit-variance normalized pairwise distances in one domain and let d′ k be the vector of normalized distances obtained in the other domain by translating each image out of each pair between the domains, then P dkd′ k should be high. When training the mapper GAB, the mean and variance used for normalization in each domain are precomputed based on the training samples in each domain, which assumes that the post mapping distribution of samples is similar to the training distribution. The pairwise distances in the source domain dk are fixed and maximizing P dkd′ k causes pairwise distances dk with large absolute value to dominate the optimization. Instead, we propose to minimize the sum of absolute differences P k |dk −d′ k|, which spreads the error in distances uniformly. The two losses −P dkd′ k and P k |dk −d′ k| are highly related and the negative correlation between them was explicitly computed for simple distributions and shown to be very strong [1]. 4 3 Unsupervised Constraints on the Learned Mapping There are a few types of constraints suggested in the literature, which do not require paired samples. First, one can enforce the distribution of GAB(x) : x ∼pA, which we denote as GAB(pA), to be indistinguishable from that of pB. In addition, one can require that mapping from A to B and back would lead to an identity mapping. Another constraint suggested, is that for every x ∈B GAB(x) = x. We review these constraints and then present the new constraints we propose. Adversarial constraints Our training sets are viewed as two discrete distributions ˆpA and ˆpB that are sampled from the source and target domain distributions pA and pB, respectively. For the learned network GAB, the similarity between the distributions GAB(pA) and pB is modeled by a GAN. This involves the training of a discriminator network DB : B →{0, 1}. The loss is given by: LGAN(GAB, DB, ˆpA, ˆpB) =ExB∼ˆpB[log DB(xB)] + ExA∼ˆpA[log(1 −DB(GAB(xA))] This loss is minimized over GAB and maximized over DB. When both GAB and GBA are learned simultaneously, there is an analog expression LGAN(GBA, DA, ˆpB, ˆpA), in which the domains A and B switch roles and the two losses (and four networks) are optimized jointly. Circularity constraints In three recent reports [11, 28, 27], circularity loss was introduced for image translation. The rationale is that given a sample from domain A, translating it to domain B and then back to domain A should result in the identical sample. Formally, the following loss is added: Lcycle(GAB, GBA, ˆpA) = Ex∼ˆpA∥GBA(GAB(x)) −x∥1 The L1 norm employed above was found to be mostly preferable, although L2 gives similar results. Since the circularity loss requires the recovery of the mappings in both directions, it is usually employed symmetrically, by considering Lcycle(GAB, GBA, ˆpA) + Lcycle(GBA, GAB, ˆpB). The circularity constraint is often viewed as a definite requirement for admissible functions GAB and GBA. However, just like distance-based constraints, it is an approximate one. To see this, consider the zebra to horse mapping example. Mapping a zebra to a horse means losing the stripes. The inverse mapping, therefore, cannot be expected to recover the exact input stripes. Target Domain Identity A constraint that has been used in [22] and in some of the experiments in [28] states that GAB applied to samples from the domain B performs the identity mapping. We did not experiment with this constraint and it is given here for completeness: LT-ID(GAB, ˆpB) = Ex∼ˆpB∥x −GAB(x)∥2 Distance Constraints The adversarial loss ensures that samples from the distribution of A are translated to samples in the distribution of B. However, there are many such possible mappings. Given a mapping for n samples of A to n samples of B, one can consider any permutation of the samples in B as a valid mapping and, therefore, the space of functions mapping from A to B is very large. Adding the circularity constraint, enforces the mapping from B to A to be the inverse of the permutation that occurs from A to B, which reduces the amount of admissible permutations. To further reduce this space, we propose a distance preserving map, that is, the distance between two samples in A should be preserved in the mapping to B. We therefore consider the following loss, which is the expectation of the absolute differences between the distances in each domain up to scale: Ldistance(GAB, ˆpA) = Exi,xj∼ˆpA| 1 σA (∥xi −xj∥1 −µA) −1 σB (∥GAB(xi) −GAB(xj)∥1 −µB)| where µA, µB (σA, σB) are the means (standard deviations) of pairwise distances in the training sets from A and B, respectively, and are precomputed. In practice, we compute the loss over pairs of samples that belong to the same minibatch during training. Even for minibatches with 64 samples, as in DiscoGAN [11], considering all pairs is feasible. If needed, for even larger mini-batches, one can subsample the pairs. When the two mappings are simultaneously learned, Ldistance(GBA, ˆpB) is similarly defined. In both cases, the absolute difference of the L1 distances between the pairs in the two domains is considered. 5 In comparison to circularity, the distance-based constraint does not suffer from the model collapse problem that is described in [11]. In this phenomenon, two different samples from domain A are mapped to the same sample in domain B. The mapping in the reverse direction then generates an average of the two original samples, since the sample in domain B should be mapped back to both the first and second original samples in A. Pairwise distance constraints prevents this from happening. Self-distance Constraints Whether or not the distance constraint is more effective than the circularity constraint in recovering the alignment, the distance based constraint has the advantage of being one sided. However, it requires that pairs of samples are transfered at once, which, while having little implications on the training process as it is currently done, might effect the ability to perform on-line learning. Furthermore, the official CycleGAN [28] implementation employs minibatches of size one. We, therefore, suggest an additional constraint, which employs one sample at a time and compares the distances between two parts of the same sample. Let L, R : Rh×w →Rh×w/2 be the operators that given an input image return the left or right part of it. We define the following loss: L selfdistance(GAB, ˆpA) = Ex∼ˆpA| 1 σA (∥L(x) −R(x)∥1 −µA) −1 σB (∥L(GAB(x)) −R(GAB(x))∥1 −µB)| (1) where µA and σA are the mean and standard deviation of the pairwise distances between the two halves of the image in the training set from domain A, and similarly for µB and σB, e.g., given the training set {xj}n j=1 ⊂B, µB is precomputed as 1 n P j ∥L(xj) −R(xj)∥1. 3.1 Network Architecture and Training When training the networks GAB, GBA, DB and DA, we employ the following loss, which is minimized over GAB and GBA and maximized over DB and DA: α1ALGAN(GAB, DB, ˆpA, ˆpB) + α1BLGAN(GBA, DA, ˆpB, ˆpA) + α2ALcycle(GAB, GBA, ˆpA)+ α2BLcycle(GBA, GAB, ˆpB) + α3ALdistance(GAB, ˆpA) + α3BLdistance(GBA, ˆpB)+ α4ALself-distance(GAB, ˆpA) + α4BLself-distance(GBA, ˆpB) where αiA, αiB are trade-off parameters. We did not test the distance constraint and the self-distance constraint jointly, so in every experiment, either α3A = α3B = 0 or α4A = α4A = 0. When performing one sided mapping from A to B, only α1A and either α3A or α4A are non-zero. We consider A and B to be a subset of R3×s×s of images where s is either 64, 128 or 256, depending on the image resolution. In order to directly compare our results with previous work and to employ the strongest baseline in each dataset, we employ the generator and discriminator architectures of both DiscoGAN [11] and CycleGAN [28]. In DiscoGAN, the generator is build of an encoder-decoder unit. The encoder consists of convolutional layers with 4 × 4 filters followed by Leaky ReLU activation units. The decoder consists of deconvolutional layers with 4 × 4 filters followed by a ReLU activation units. Sigmoid is used for the output layer and batch normalization [8] is used before the ReLU or Leaky ReLU activations. Between 4 to 5 convolutional/deconvolutional layers are used, depending on the domains used in A and B (we match the published code architecture per dataset). The discriminator is similar to the encoder, but has an additional convolutional layer as the first layer and a sigmoid output unit. The CycleGAN architecture for the generator is based on [10]. The generators consist of two 2stride convolutional layers, between 6 to 9 residual blocks depending on the image resolution and two fractionally strided convolutions with stride 1/2. Instance normalization is used as in [10]. The discriminator uses 70 × 70 PatchGANs [9]. For training, CycleGAN employs two additional techniques. The first is to replace the negative log-likelihood by a least square loss [25] and the second is to use a history of images for the discriminators, rather then only the last image generated [20]. 6 Table 1: Tradeoff weights for each experiment. Experiment α1A α1B α2A α2B α3A α3B α4A α4B DiscoGAN 0.5 0.5 0.5 0.5 0 0 0 0 Distance →0.5 0 0 0 0.5 0 0 0 Distance ← 0 0.5 0 0 0 0.5 0 0 Dist+Cycle 0.5 0.5 0.5 0.5 0.5 0.5 0 0 Self Dist →0.5 0 0 0 0 0 0.5 0 Self Dist ← 0 0.5 0 0 0 0 0 0.5 Table 2: Normalized RMSE between the angles of source and translated images. Method car2car car2head DiscoGAN 0.306 0.137 Distance 0.135 0.097 Dist.+Cycle 0.098 0.273 Self Dist. 0.117 0.197 Table 3: MNIST classification on mapped SHVN images. Method Accuracy CycleGAN 26.1% Distance 26.8% Dist.+Cycle 18.0% Self Dist. 25.2% Table 4: CelebA mapping results using the VGG face descriptor. Male →Female Blond →Black Glasses →Without Method Cosine Separation Cosine Separation Cosine Separation Similarity Accuracy Similarity Accuracy Similarity Accuracy DiscoGAN 0.23 0.87 0.15 0.89 0.13 0.84 Distance 0.32 0.88 0.24 0.92 0.42 0.79 Distance+Cycle 0.35 0.87 0.24 0.91 0.41 0.82 Self Distance 0.24 0.86 0.24 0.91 0.34 0.80 ———— Other direction ———— DiscoGAN 0.22 0.86 0.14 0.91 0.10 0.90 Distance 0.26 0.87 0.22 0.96 0.30 0.89 Distance+Cycle 0.31 0.89 0.22 0.95 0.30 0.85 Self Distance 0.24 0.91 0.19 0.94 0.30 0.81 4 Experiments We compare multiple methods: the DiscoGAN or the CycleGAN baselines; the one sided mapping using Ldistance (A →B or B →A); the combination of the baseline method with Ldistance; the self distance method. For DiscoGAN, we use a fixed weight configuration for all experiments, as shown in Tab. 1. For CycleGAN, there is more sensitivity to parameters and while the general pattern is preserved, we used different weight for the distance constraint depending on the experiment, digits or horses to zebra. Models based on DiscoGAN Datasets that were tested by DiscoGAN are evaluated here using this architecture. In initial tests, CycleGAN is not competitive on these out of the box. The first set of experiments maps rotated images of cars to either cars or heads. The 3D car dataset [4] consists of rendered images of 3D cars whose degree varies at 15◦intervals. Similarly, the head dataset, [17], consists of 3D images of rotated heads which vary from −70◦to 70◦. For the car2car experiment, the car dataset is split into two parts, one of which is used for A and one for B (It is further split into train and test set). Since the rotation angle presents the largest source of variability, and since the rotation operation is shared between the datasets, we expect it to be the major invariant that the network learns, i.e., a semantic mapping would preserve angles. A regressor was trained to calculate the angle of a given car image based on the training data. Tab. 2 shows the Root Mean Square Error (RMSE) between the angle of source image and translated image. As can be seen, the pairwise distance based mapping results in lower error than the DiscoGAN one, combining both further improves results, and the self distance outperforms both DiscoGAN and pairwise distance. The original DiscoGAN implementation was used, but due to differences in evaluation (different regressors) these numbers are not compatible with the graph shown in DiscoGAN. For car2head, DiscoGAN’s solution produces mirror images and combination of DiscoGAN’s circularity constraint with the distance constraint produces a solution that is rotated by 90◦. We consider these biases as ambiguities in the mapping and not as mistakes and, therefore, remove the mean error prior to computing the RMSE. In this experiment, distance outperforms all other methods. The combination of both methods is less competitive than both, perhaps since each method pulls toward a different solution. Self distance, is worse than circularity in this dataset. 7 Another set of experiments arises from considering face images with and without a certain property. CelebA [26, 14] was annotated for multiple attributes including the person’s gender, hair color, and the existence of glasses in the image. Following [11] we perform mapping between two values of each of these three properties. The results are shown in the supplementary material with some examples in Fig. 3. It is evident that the DiscoGAN method (using the unmodified authors’ implementation) presents many more failure cases than our pair based method. The self-distance method was implemented with the top and bottom image halves, instead of left to right distances, since faces are symmetric. This method also seems to outperform DiscoGAN. In order to evaluate how well the face translation was performed, we use the representation layer of VGG faces [16] on the image in A and its output in B. One can assume that two images that match will have many similar features and so the VGG representation will be similar. The cosine similarities, as evaluated between input images and their mapped versions, are shown in Tab. 4. In all cases, the pair-distance produces more similar input-output faces. Self-distance performs slightly worse than pairs, but generally better than DiscoGAN. Applying circularity together with pair-distance, provides the best results but requires, unlike the distance, learning both sides simultaneously. While we create images that better match in the face descriptor metric, our ability to create images that are faithful to the second distribution is not impaired. This is demonstrated by learning a linear classifier between the two domains based on the training samples and then applying it to a set of test image before and after mapping. The separation accuracy between the input test image and the mapped version is also shown in Tab. 4. As can be seen, the separation ability of our method is similar to that of DiscoGAN (it arises from the shared GAN terms). We additionally perform a user study to asses the quality of our results. The user is first presented with a set of real images from the dataset. Then, 50 random pairs of images are presented to a user for a second, one trained using DiscoGAN and one using our method. The user is asked to decide which image looks more realistic. The test was performed on 22 users. On shoes to handbags translation, our translation performed better on 65% of the cases. For handbags to shoes, the score was 87%. For male to female, both methods showed a similar realness score (51% to 49% of DiscoGAN’s). We, therefore, asked a second question: given the face of a male, which of the two generated female variants is a better fit to the original face. Our method wins 88% of the time. In addition, in the supplementary material we compare the losses of the GAN discriminator for the various methods and show that these values are almost identical. We also measure the losses of the various methods during test, even if these were not directly optimized. For example, despite this constraints not being enforced, the distance based methods seem to present a low circularity loss, while DiscoGAN presents a relatively higher distance losses. Sample results of mapping shoes to handbags and edges to shoes and vice versa using the DiscoGAN baseline architecture are shown in Fig. 3. More results are shown in the supplementary. Visually, the results of the distance-based approach seem better then DiscoGAN while the results of self-distance are somewhat worse. The combination of DiscoGAN and distance usually works best. Models based on CycleGAN Using the CycleGAN architecture we map horses to zebras, see Fig. 4 and supplementary material for examples. Note that on the zebra to horse mapping, all methods fail albeit in different ways. Subjectively, it seems that the distance + cycle method shows the most promise in this translation. In order to obtain numerical results, we use the baseline CycleGAN method as well as our methods in order to translate from Street View House Numbers (SVHN) [15] to MNIST [12]. Accuracy is then measured in the MNIST space by using a neural net trained for this task. Results are shown in Tab. 3 and visually in the Supplementary. While the pairwise distance based method improves upon the baseline method, there is still a large gap between the unsupervised and semi-supervised setting presented in [22], which achieves much higher results. This can be explained by the large amount of irrelevant information in the SVHN images (examples are shown in the supplementary). Combining the distance based constraint with the circularity one does not work well on this dataset. We additionally performed a qualitative evaluation using FCN score as in [28]. The FCN metric evaluates the interoperability images by taking a generated cityscape image and generating a label using semantic segmentation algorithm. The generated label can then be compared to the ground truth label. FCN results are given as three measures: per-pixel accuracy, per-class accuracy and Class 8 Input Disco GAN Distance Distance +cycle Self distance (a) (b) (c) (d) (e) (f) Figure 3: Translations using various methods on the celebA dataset: (a,b) Male to and from Female. (c,d) Blond to and from black hair. (e,f) With eyeglasses to from without eyeglasses. Input Disco/ CycleGAN Distance Distance +cycle Self distance (a) (b) (c) (d) (e) (f) Figure 4: (a,b) Handbags to and from shoes. (c,d) Edges to/from shoes. (e,f) Horse to/from zebra. IOU. Our distance GAN method is preferable on all three scores (0.53 vs. 0.52, 0.19 vs. 0.17, and 0.11 vs 0.11, respectively). The paired t-test p-values are 0.29, 0.002 and 0.42 respectively. In a user study similar to the one for DiscoGAN above, our cityscapes translation scores 71% for realness when comparing to CycleGAN’s. When looking at similarity to the ground truth image we score 68%. 5 Conclusion We have proposed an unsupervised distance-based loss for learning a single mapping (without its inverse), which empirically outperforms the circularity loss. It is interesting to note that the new loss is applied to raw RGB image values. This is in contrast to all of the work we are aware of that computes image similarity. Clearly, image descriptors or low-layer network activations can be used. However, by considering only RGB values, we not only show the general utility of our method, but also further demonstrate that a minimal amount of information is needed in order to form analogies between two related domains. Acknowledgements This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant ERC CoG 725974). The authors would like to thank Laurens van der Maaten and Ross Girshick for insightful discussions. 9 References [1] Werner Van Belle. Correlation between the inproduct and the sum of absolute differences is -0.8485 for uniform sampled signals on [-1:1]. Available at http: // werner. yellowcouch. org/ Papers/ sadvssip/ index. html , 2006. [2] Konstantinos Bousmalis, Nathan Silberman, David Dohan, Dumitru Erhan, and Dilip Krishnan. Unsupervised pixel-level domain adaptation with generative adversarial networks. In CVPR, 2017. [3] Konstantinos Bousmalis, George Trigeorgis, Nathan Silberman, Dilip Krishnan, and Dumitru Erhan. Domain separation networks. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 343–351. Curran Associates, Inc., 2016. [4] Sanja Fidler, Sven Dickinson, and Raquel Urtasun. 3d object detection and viewpoint estimation with a deformable 3d cuboid model. In NIPS, 2012. [5] Leon A. Gatys, Alexander S. Ecker, and Matthias Bethge. Image style transfer using convolutional neural networks. In CVPR, 2016. [6] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS. 2014. [7] Judy Hoffman, Dequan Wang, Fisher Yu, and Trevor Darrell. Fcns in the wild: Pixel-level adversarial and constraint-based adaptation. 12 2016. [8] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. [9] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In CVPR, 2017. [10] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In ECCV, 2016. [11] Taeksoo Kim, Moonsu Cha, Hyunsoo Kim, Jungkwon Lee, and Jiwon Kim. Learning to discover cross-domain relations with generative adversarial networks. arXiv preprint arXiv:1703.05192, 2017. [12] Yann LeCun and Corinna Cortes. MNIST handwritten digit database. 2010. [13] Ming-Yu Liu and Oncel Tuzel. Coupled generative adversarial networks. In NIPS, pages 469–477. 2016. [14] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In Proceedings of International Conference on Computer Vision (ICCV), 2015. [15] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y. Ng. Reading digits in natural images with unsupervised feature learning. In NIPS Workshop on Deep Learning and Unsupervised Feature Learning, 2011. [16] O. M. Parkhi, A. Vedaldi, and A. Zisserman. Deep face recognition. In British Machine Vision Conference, 2015. [17] Pascal Paysan, Reinhard Knothe, Brian Amberg, Sami Romdhani, and Thomas Vetter. A 3d face model for pose and illumination invariant face recognition. In AVSS, 2009. [18] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. [19] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In MICCAI, 2015. 10 [20] Ashish Shrivastava, Tomas Pfister, Oncel Tuzel, Josh Susskind, Wenda Wang, and Russ Webb. Learning from simulated and unsupervised images through adversarial training. arXiv preprint arXiv:1612.07828, 2016. [21] Ilya Sutskever, Rafal Jozefowicz, Karol Gregor, Danilo Rezende, Tim Lillicrap, and Oriol Vinyals. Towards principled unsupervised learning. In ICLR workshop, 2016. [22] Yaniv Taigman, Adam Polyak, and Lior Wolf. Unsupervised cross-domain image generation. In International Conference on Learning Representations (ICLR), 2017. [23] D. Ulyanov, V. Lebedev, A. Vedaldi, and V. Lempitsky. Texture networks: Feed-forward synthesis of textures and stylized images. In ICML, 2016. [24] Yingce Xia, Di He, Tao Qin, Liwei Wang, Nenghai Yu, Tie-Yan Liu, and Wei-Ying Ma. Dual learning for machine translation. arXiv preprint arXiv:1611.00179, 2016. [25] X.Mao, Q.Li, H.Xie, R.Y. Lau, and Z.Wang. Multi-class generative adversarial networks with the l2 loss function. arXiv preprint arXiv:1611.04076, 2016. [26] Shuo Yang, Ping Luo, Chen Change Loy, and Xiaoou Tang. From facial parts responses to face detection: A deep learning approach. In ICCV, pages 3676–3684, 2015. [27] Zili Yi, Hao Zhang, Ping Tan Gong, et al. Dualgan: Unsupervised dual learning for image-toimage translation. arXiv preprint arXiv:1704.02510, 2017. [28] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networkss. arXiv preprint arXiv:1703.10593, 2017. 11 | 2017 | 235 |
6,714 | Poincaré Embeddings for Learning Hierarchical Representations Maximilian Nickel Facebook AI Research maxn@fb.com Douwe Kiela Facebook AI Research dkiela@fb.com Abstract Representation learning has become an invaluable approach for learning from symbolic data such as text and graphs. However, state-of-the-art embedding methods typically do not account for latent hierarchical structures which are characteristic for many complex symbolic datasets. In this work, we introduce a new approach for learning hierarchical representations of symbolic data by embedding them into hyperbolic space – or more precisely into an n-dimensional Poincaré ball. Due to the underlying hyperbolic geometry, this allows us to learn parsimonious representations of symbolic data by simultaneously capturing hierarchy and similarity. We present an efficient algorithm to learn the embeddings based on Riemannian optimization and show experimentally that Poincaré embeddings can outperform Euclidean embeddings significantly on data with latent hierarchies, both in terms of representation capacity and in terms of generalization ability. 1 Introduction Learning representations of symbolic data such as text, graphs and multi-relational data has become a central paradigm in machine learning and artificial intelligence. For instance, word embeddings such as WORD2VEC [20], GLOVE [27] and FASTTEXT [5, 16] are widely used for tasks ranging from machine translation to sentiment analysis. Similarly, embeddings of graphs such as latent space embeddings [15], NODE2VEC [13], and DEEPWALK [28] have found important applications for community detection and link prediction in social networks. Furthermore, embeddings of multirelational data such as RESCAL [22], TRANSE [7], and Universal Schema [31] are being used for knowledge graph completion and information extraction. Typically, the objective of an embedding method is to organize symbolic objects (e.g., words, entities, concepts) in a way such that their similarity or distance in the embedding space reflects their semantic similarity. For instance, Mikolov et al. [20] embed words in Rd such that their inner product is maximized when words co-occur within similar contexts in text corpora. This is motivated by the distributional hypothesis [14, 11], i.e., that the meaning of words can be derived from the contexts in which they appear. Similarly, Hoff et al. [15] embed social networks such that the distance between social actors is minimized if they are connected in the network. This reflects the homophily property that is characteristic for many networks, i.e. that similar actors tend to associate with each other. Although embedding methods have proven successful in numerous applications, they suffer from a fundamental limitation: their ability to model complex patterns is inherently bounded by the dimensionality of the embedding space. For instance, Nickel et al. [23] showed that linear embeddings of graphs can require a prohibitively large dimensionality to model certain types of relations. Although non-linear embeddings can mitigate this problem [8], complex graph patterns can still require a computationally infeasible embedding dimension. As a consequence, no method yet exists that is able to compute embeddings of large graph-structured data – such as social networks, knowledge graphs or taxonomies – without loss of information. Since the ability to express information is a 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. precondition for learning and generalization, it is therefore important to increase the representation capacity of embedding methods such that they can realistically be used to model complex patterns on a large scale. In this work, we focus on mitigating this problem for a certain class of symbolic data, i.e., large datasets whose objects can be organized according to a latent hierarchy – a property that is inherent in many complex datasets. For instance, the existence of power-law distributions in datasets can often be traced back to hierarchical structures [29]. Prominent examples of power-law distributed data include natural language (Zipf’s law [40]) and scale-free networks such as social and semantic networks [32]. Similarly, the empirical analysis of Adcock et al. [1] indicated that many real-world networks exhibit an underlying tree-like structure. To exploit this structural property for learning more efficient representations, we propose to compute embeddings not in Euclidean but in hyperbolic space, i.e., space with constant negative curvature. Informally, hyperbolic space can be thought of as a continuous version of trees and as such it is naturally equipped to model hierarchical structures. For instance, it has been shown that any finite tree can be embedded into a finite hyperbolic space such that distances are preserved approximately [12]. We base our approach on a particular model of hyperbolic space, i.e., the Poincaré ball model, as it is well-suited for gradient-based optimization. This allows us to develop an efficient algorithm for computing the embeddings based on Riemannian optimization, which is easily parallelizable and scales to large datasets. Experimentally, we show that our approach can provide high quality embeddings of large taxonomies – both with and without missing data. Moreover, we show that embeddings trained on WORDNET provide state-of-the-art performance for lexical entailment. On collaboration networks, we also show that Poincaré embeddings are successful in predicting links in graphs where they outperform Euclidean embeddings, especially in low dimensions. The remainder of this paper is organized as follows: In Section 2 we briefly review hyperbolic geometry and discuss related work. In Section 3 we introduce Poincaré embeddings and present a scalable algorithm to compute them. In Section 4 we evaluate our approach on tasks such as taxonomy embedding, link prediction in networks and predicting lexical entailment. 2 Embeddings and Hyperbolic Geometry Hyperbolic geometry is a non-Euclidean geometry which studies spaces of constant negative curvature. It is, for instance, related to Minkowski spacetime in special relativity. In network science, hyperbolic spaces have started to receive attention as they are well-suited to model hierarchical data. For instance, consider the task of embedding a tree into a metric space such that its structure is reflected in the embedding. A regular tree with branching factor b has (b + 1)bℓ−1 nodes at level ℓand ((b + 1)bℓ−2)/(b −1) nodes on a level less or equal than ℓ. Hence, the number of children grows exponentially with their distance to the root of the tree. In hyperbolic geometry this kind of tree structure can be modeled easily in two dimensions: nodes that are exactly ℓlevels below the root are placed on a sphere in hyperbolic space with radius r ∝ℓand nodes that are less than ℓlevels below the root are located within this sphere. This type of construction is possible as hyperbolic disc area and circle length grow exponentially with their radius.1 See Figure 1b for an example. Intuitively, hyperbolic spaces can be thought of as continuous versions of trees or vice versa, trees can be thought of as "discrete hyperbolic spaces" [19]. In R2, a similar construction is not possible as circle length (2πr) and disc area (2πr2) grow only linearly and quadratically with regard to r in Euclidean geometry. Instead, it is necessary to increase the dimensionality of the embedding to model increasingly complex hierarchies. As the number of parameters increases, this can lead to computational problems in terms of runtime and memory complexity as well as to overfitting. Due to these properties, hyperbolic space has recently been considered to model complex networks. For instance, Kleinberg [18] introduced hyperbolic geometry for greedy routing in geographic communication networks. Similarly, Boguñá et al. [4] proposed hyperbolic embeddings of the AS Internet topology to perform greedy shortest path routing in the embedding space. Krioukov et al. [19] developed a geometric framework to model complex networks using hyperbolic space and showed how typical properties such as heterogeneous degree distributions and strong clustering can emerge by assuming an underlying hyperbolic geometry to networks. Furthermore, Adcock et al. 1For instance, in a two dimensional hyperbolic space with constant curvature K = −1, the length of a circle is given as 2π sinh r while the area of a disc is given as 2π(cosh r −1). Since sinh r = 1 2(er −e−r) and cosh r = 1 2(er + e−r), both disc area and circle length grow exponentially with r. 2 p1 p2 p3 p4 p5 (a) Geodesics of the Poincaré disk (b) Embedding of a tree in B2 (c) Growth of Poincaré distance Figure 1: (a) Due to the negative curvature of B, the distance of points increases exponentially (relative to their Euclidean distance) the closer they are to the boundary. (c) Growth of the Poincaré distance d(u, v) relative to the Euclidean distance and the norm of v (for fixed ∥u∥= 0.9). (b) Embedding of a regular tree in B2 such that all connected nodes are spaced equally far apart (i.e., all black line segments have identical hyperbolic length). [1] proposed a measure based on Gromov’s δ-hyperbolicity [12] to characterize the tree-likeness of graphs. Ontrup and Ritter [25] proposed hyperbolic self-organizing maps for data exploration. Asta and Shalizi [3] used hyperbolic embeddings to compare the global structure of networks. Sun et al. [33] proposed Space-Time embeddings to learn representations of non-metric data. Euclidean embeddings, on the other hand, have become a popular approach to represent symbolic data in machine learning and artificial intelligence. For instance, in addition to the methods discussed in Section 1, Paccanaro and Hinton [26] proposed one of the first embedding methods to learn from relational data. More recently, Holographic [24] and Complex Embeddings [34] have shown stateof-the-art performance in Knowledge Graph completion. In relation to hierarchical representations, Vilnis and McCallum [36] proposed to learn density-based word representations, i.e., Gaussian embeddings, to capture uncertainty and asymmetry. Given ordered input pairs, Vendrov et al. [35] proposed Order Embeddings to model visual-semantic hierarchies over words, sentences, and images. Demeester et al. [10] showed that including prior information about hypernymy relations in form of logical rules can improve the quality of word embeddings. 3 Poincaré Embeddings In the following, we are interested in finding embeddings of symbolic data such that their distance in the embedding space reflects their semantic similarity. We assume that there exists a latent hierarchy in which the symbols can be organized. In addition to the similarity of objects, we intend to also reflect this hierarchy in the embedding space to improve over existing methods in two ways: 1. By inducing an appropriate structural bias on the embedding space we aim at improving generalization performance as well as runtime and memory complexity. 2. By capturing the hierarchy explicitly in the embedding space, we aim at gaining additional insights about the relationships between symbols and the importance of individual symbols. Although we assume that there exists a latent hierarchy, we do not assume that we have direct access to information about this hierarchy, e.g., via ordered input pairs. Instead, we consider the task of inferring the hierarchical relationships fully unsupervised, as is, for instance, necessary for text and network data. For these reasons – and motivated by the discussion in Section 2 – we embed symbolic data into hyperbolic space H. In contrast to Euclidean space R, there exist multiple, equivalent models of H such as the Beltrami-Klein model, the hyperboloid model, and the Poincaré half-plane model. In the following, we will base our approach on the Poincaré ball model, as it is well-suited for gradient-based optimization. In particular, let Bd = {x ∈Rd | ∥x∥< 1} be the open d-dimensional unit ball, where ∥· ∥denotes the Euclidean norm. The Poincaré ball model of hyperbolic space corresponds then to the Riemannian manifold (Bd, gx), i.e., the open unit ball equipped with the Riemannian metric tensor gx = 2 1 −∥x∥2 2 gE, 3 where x ∈Bd and gE denotes the Euclidean metric tensor. Furthermore, the distance between points u, v ∈Bd is given as d(u, v) = arcosh 1 + 2 ∥u −v∥2 (1 −∥u∥2)(1 −∥v∥2) . (1) The boundary of the ball is denoted by ∂B. It corresponds to the sphere Sd−1 and is not part of the manifold, but represents infinitely distant points. Geodesics in Bd are then circles that are orthogonal to ∂B (as well as all diameters). See Figure 1a for an illustration. It can be seen from Equation (1), that the distance within the Poincaré ball changes smoothly with respect to the location of u and v. This locality property of the Poincaré distance is key for finding continuous embeddings of hierarchies. For instance, by placing the root node of a tree at the origin of Bd it would have a relatively small distance to all other nodes as its Euclidean norm is zero. On the other hand, leaf nodes can be placed close to the boundary of the Poincaré ball as the distance grows very fast between points with a norm close to one. Furthermore, please note that Equation (1) is symmetric and that the hierarchical organization of the space is solely determined by the distance of points to the origin. Due to this self-organizing property, Equation (1) is applicable in an unsupervised setting where the hierarchical order of objects is not specified in advance such as text and networks. Remarkably, Equation (1) allows us therefore to learn embeddings that simultaneously capture the hierarchy of objects (through their norm) as well a their similarity (through their distance). Since a single hierarchical structure can be well represented in two dimensions, the Poincaré disk (B2) is a common way to model hyperbolic geometry. In our method, we instead use the Poincaré ball (Bd), for two main reasons: First, in many datasets such as text corpora, multiple latent hierarchies can co-exist, which can not always be modeled in two dimensions. Second, a larger embedding dimension can decrease the difficulty for an optimization method to find a good embedding (also for single hierarchies) as it allows for more degrees of freedom during the optimization process. To compute Poincaré embeddings for a set of symbols S = {xi}n i=1, we are then interested in finding embeddings Θ = {θi}n i=1, where θi ∈Bd. We assume we are given a problem-specific loss function L(Θ) which encourages semantically similar objects to be close in the embedding space according to their Poincaré distance. To estimate Θ, we then solve the optimization problem Θ′ ←arg min Θ L(Θ) s.t. ∀θi ∈Θ : ∥θi∥< 1. (2) We will discuss specific loss functions in Section 4. 3.1 Optimization Since the Poincaré Ball has a Riemannian manifold structure, we can optimize Equation (2) via stochastic Riemannian optimization methods such as RSGD [6] or RSVRG [39]. In particular, let TθB denote the tangent space of a point θ ∈Bd. Furthermore, let ∇R ∈TθB denote the Riemannian gradient of L(θ) and let ∇E denote the Euclidean gradient of L(θ). Using RSGD, parameter updates to minimize Equation (2) are then of the form θt+1 = Rθt (−ηt∇RL(θt)) where Rθt denotes the retraction onto B at θ and ηt denotes the learning rate at time t. Hence, for the minimization of Equation (2), we require the Riemannian gradient and a suitable retraction. Since the Poincaré ball is a conformal model of hyperbolic space, the angles between adjacent vectors are identical to their angles in the Euclidean space. The length of vectors however might differ. To derive the Riemannian gradient from the Euclidean gradient, it is sufficient to rescale ∇E with the inverse of the Poincaré ball metric tensor, i.e., g−1 θ . Since gθ is a scalar matrix, the inverse is trivial to compute. Furthermore, since Equation (1) is fully differentiable, the Euclidean gradient can easily be derived using standard calculus. In particular, the Euclidean gradient ∇E = ∂L(θ) ∂d(θ,x) ∂d(θ,x) ∂θ depends on the gradient of L, which we assume is known, and the partial derivatives of the Poincaré distance, which can be computed as follows: Let α = 1 −∥θ∥2 , β = 1 −∥x∥2 and let γ = 1 + 2 αβ ∥θ −x∥2 . The partial derivate of the Poincaré distance with respect to θ is then given as ∂d(θ, x) ∂θ = 4 β p γ2 −1 ∥x∥2 −2⟨θ, x⟩+ 1 α2 θ −x α . (3) 4 Since d(·, ·) is symmetric, the partial derivative ∂d(x,θ) ∂θ can be derived analogously. As retraction operation we use Rθ(v) = θ + v. In combination with the Riemannian gradient, this corresponds then to the well-known natural gradient method [2]. Furthermore, we constrain the embeddings to remain within the Poincaré ball via the projection proj(θ) = θ/∥θ∥−ε if ∥θ∥≥1 θ otherwise , where ε is a small constant to ensure numerical stability. In all experiments we used ε = 10−5. In summary, the full update for a single embedding is then of the form θt+1 ←proj θt −ηt (1 −∥θt∥2)2 4 ∇E . (4) It can be seen from Equations (3) and (4) that this algorithm scales well to large datasets, as the computational and memory complexity of an update depends linearly on the embedding dimension. Moreover, the algorithm is straightforward to parallelize via methods such as Hogwild [30], as the updates are sparse (only a small number of embeddings are modified in an update) and collisions are very unlikely on large-scale data. 3.2 Training Details In addition to this optimization procedure, we found that the following training details were helpful for obtaining good representations: First, we initialize all embeddings randomly from the uniform distribution U(−0.001, 0.001). This causes embeddings to be initialized close to the origin of Bd. Second, we found that a good initial angular layout can be helpful to find good embeddings. For this reason, we train during an initial "burn-in" phase with a reduced learning rate η/c. In combination with initializing close to the origin, this can improve the angular layout without moving too far towards the boundary. In our experiments, we set c = 10 and the duration of the burn-in to 10 epochs. 4 Evaluation In this section, we evaluate the quality of Poincaré embeddings for a variety of tasks, i.e., for the embedding of taxonomies, for link prediction in networks, and for modeling lexical entailment. In all tasks, we train on data where the hierarchy of objects is not explicitly encoded. This allows us to evaluate the ability of the embeddings to infer hierachical relationships without supervision. Moreover, since we are mostly interested in the properties of the metric space, we focus on embeddings based purely on the Poincaré distance and on models with comparable expressivity. In particular, we compare the Poincaré distance as defined in Equation (1) to the following two distance functions: Euclidean In all cases, we include the Euclidean distance d(u, v) = ∥u −v∥2. As the Euclidean distance is flat and symmetric, we expect that it requires a large dimensionality to model the hierarchical structure of the data. Translational For asymmetric data, we also include the score function d(u, v) = ∥u −v + r∥2, as proposed by Bordes et al. [7] for modeling large-scale graph-structured data. For this score function, we also learn the global translation vector r during training. Note that the translational score function has, due to its asymmetry, more information about the nature of an embedding problem than a symmetric distance when the order of (u, v) indicates the hierarchy of elements. This is, for instance, the case for is-a(u, v) relations in taxonomies. For the Poincaré distance and the Euclidean distance we could randomly permute the order of (u, v) and obtain the identical embedding, while this is not the case for the translational score function. As such, it is not fully unsupervised and only applicable where this hierarchical information is available. 4.1 Embedding Taxonomies In the first set of experiments, we are interested in evaluating the ability of Poincaré embeddings to embed data that exhibits a clear latent hierarchical structure. For this purpose, we conduct experiments on the transitive closure of the WORDNET noun hierarchy [21] in two settings: 5 Table 1: Experimental results on the transitive closure of the WORDNET noun hierarchy. Highlighted cells indicate the best Euclidean embeddings as well as the Poincaré embeddings which achieve equal or better results. Bold numbers indicate absolute best results. Dimensionality 5 10 20 50 100 200 WORDNET Reconstruction Euclidean Rank 3542.3 2286.9 1685.9 1281.7 1187.3 1157.3 MAP 0.024 0.059 0.087 0.140 0.162 0.168 Translational Rank 205.9 179.4 95.3 92.8 92.7 91.0 MAP 0.517 0.503 0.563 0.566 0.562 0.565 Poincaré Rank 4.9 4.02 3.84 3.98 3.9 3.83 MAP 0.823 0.851 0.855 0.86 0.857 0.87 WORDNET Link Pred. Euclidean Rank 3311.1 2199.5 952.3 351.4 190.7 81.5 MAP 0.024 0.059 0.176 0.286 0.428 0.490 Translational Rank 65.7 56.6 52.1 47.2 43.2 40.4 MAP 0.545 0.554 0.554 0.56 0.562 0.559 Poincaré Rank 5.7 4.3 4.9 4.6 4.6 4.6 MAP 0.825 0.852 0.861 0.863 0.856 0.855 Reconstruction To evaluate representation capacity, we embed fully observed data and reconstruct it from the embedding. The reconstruction error in relation to the embedding dimension is then a measure for the capacity of the model. Link Prediction To test generalization performance, we split the data into a train, validation and test set by randomly holding out observed links. The validation and test set do not include links involving root or leaf nodes as these links would either be trivial or impossible to predict reliably. Since we are embedding the transitive closure, the hierarchical structure is not directly visible from the raw data but has to be inferred. For Poincaré and Euclidean embeddings we additionaly remove the directionality of the edges and embed undirected graphs. The transitive closure of the WORDNET noun hierarchy consists of 82,115 nouns and 743,241 hypernymy relations. On this data, we learn embeddings in both settings as follows: Let D = {(u, v)} be the set of observed hypernymy relations between noun pairs. We then learn embeddings of all symbols in D such that related objects are close in the embedding space. In particular, we minimize the loss function L(Θ) = X (u,v)∈D log e−d(u,v) P v′∈N (u) e−d(u,v′) , (5) where N(u) = {v′ | (u, v′) ̸∈D} ∪{v} is the set of negative examples for u (including v). For training, we randomly sample 10 negative examples per positive example. Equation (5) is similar to the loss used in Linear Relational Embeddings [26] (with additional negative sampling) and encourages related objects to be closer to each other than objects for which we didn’t observe a relationship. This choice of loss function is motivated by the observation that we don’t want to push symbols that belong to distinct subtrees arbitrarily far apart, as their subtrees might still be close. Instead, we only want them to be farther apart than symbols with an observed relation. We evaluate the quality of the embeddings as commonly done for graph embeddings [7, 24]: For each observed relationship (u, v), we rank its distance d(u, v) among the ground-truth negative examples for u, i.e., among the set {d(u, v′) | (u, v′) ̸∈D)}. In the Reconstruction setting, we evaluate the ranking on all nouns in the dataset. We then record the mean rank of v as well as the mean average precision (MAP) of the ranking. The results of these experiments are shown in Table 1. It can be seen that Poincaré embeddings are very successful in the embedding of large taxonomies – both with regard to their representation capacity and their generalization performance. Even compared to Translational embeddings, which have more information about the structure of the task, Poincaré embeddings show a greatly improved performance while using an embedding that is smaller by an order of magnitude. Furthermore, the results of Poincaré embeddings in the link prediction task are robust with regard to the embedding dimension. We attribute this result to the structural bias of 6 (a) Intermediate embedding after 20 epochs (b) Embedding after convergence Figure 2: Two-dimensional Poincaré embeddings of transitive closure of the WORDNET mammals subtree. Ground-truth is-a relations of the original WORDNET tree are indicated via blue edges. A Poincaré embedding with d = 5 achieves mean rank 1.26 and MAP 0.927 on this subtree. the embedding space which could lead to reduced overfitting on data with a clear latent hierarchy. Additionally, Figure 2 shows a visualization of a two-dimensional Poincaré embedding. For the purpose of clarity, this embedding has been trained only on the mammals subtree of WORDNET. 4.2 Network Embeddings Next, we evaluated the performance of Poincaré embeddings for modeling complex networks. Since edges in such networks can often be explained via latent hierarchies over their nodes [9], we are interested in the benefits of Poincaré embeddings in terms representation size and generalization performance. We performed our experiments on four commonly used social networks, i.e, ASTROPH, CONDMAT, GRQC, and HEPPH. These networks represent scientific collaborations such that there exists an undirected edge between two persons if they co-authored a paper. For these networks, we model the probability of an edge as proposed by Krioukov et al. [19] via the Fermi-Dirac distribution P((u, v) = 1 | Θ) = 1 e(d(u,v)−r)/t + 1 (6) where r, t > 0 are hyperparameters. Here, r corresponds to the radius around each point u such that points within this radius are likely to have an edge with u. The parameter t specifies the steepness of the logistic function and influences both average clustering as well as the degree distribution [19]. We use the cross-entropy loss to learn the embeddings and sample negatives as in Section 4.1. For evaluation, we split each dataset randomly into train, validation, and test set. The hyperparameters r and t were tuned for each method on the validation set. Table 2 lists the MAP score of Poincaré and Euclidean embeddings on the test set for the hyperparameters with the best validation score. Additionally, we also list the reconstruction performance without missing data. Translational embeddings are not applicable to these datasets as they consist of undirected edges. It can be seen that Poincaré embeddings perform again very well on these datasets and – especially in the low-dimensional regime – outperform Euclidean embeddings. 4.3 Lexical Entailment An interesting aspect of Poincaré embeddings is that they allow us to make graded assertions about hierarchical relationships, as hierarchies are represented in a continuous space. We test this property on HYPERLEX [37], which is a gold standard resource for evaluating how well semantic models capture graded lexical entailment by quantifying to what degree X is a type of Y via ratings on a scale of [0, 10]. Using the noun part of HYPERLEX, which consists of 2163 rated noun pairs, we then evaluated how well Poincaré embeddings reflect these graded assertions. For this purpose, we 7 Table 2: Mean average precision for Reconstruction and Link Prediction on network data. Dimensionality Reconstruction Link Prediction 10 20 50 100 10 20 50 100 ASTROPH Euclidean 0.376 0.788 0.969 0.989 0.508 0.815 0.946 0.960 N=18,772; E=198,110 Poincaré 0.703 0.897 0.982 0.990 0.671 0.860 0.977 0.988 CONDMAT Euclidean 0.356 0.860 0.991 0.998 0.308 0.617 0.725 0.736 N=23,133; E=93,497 Poincaré 0.799 0.963 0.996 0.998 0.539 0.718 0.756 0.758 GRQC Euclidean 0.522 0.931 0.994 0.998 0.438 0.584 0.673 0.683 N=5,242; E=14,496 Poincaré 0.990 0.999 0.999 0.999 0.660 0.691 0.695 0.697 HEPPH Euclidean 0.434 0.742 0.937 0.966 0.642 0.749 0.779 0.783 N=12,008; E=118,521 Poincaré 0.811 0.960 0.994 0.997 0.683 0.743 0.770 0.774 Table 3: Spearman’s ρ for Lexical Entailment on HYPERLEX. FR SLQS-Sim WN-Basic WN-WuP WN-LCh Vis-ID Euclidean Poincaré ρ 0.283 0.229 0.240 0.214 0.214 0.253 0.389 0.512 used the Poincaré embeddings that were obtained in Section 4.1 by embedding WORDNET with a dimensionality d = 5. Note that these embeddings were not specifically trained for this task. To determine to what extent is-a(u, v) is true, we used the score function: score(is-a(u, v)) = −(1 + α(∥v∥−∥u∥))d(u, v). (7) Here, the term α(∥v∥−∥u∥) acts as a penalty when v is lower in the embedding hierarchy, i.e., when v has a higher norm than u. The hyperparameter α determines the severity of the penalty. In our experiments we set α = 103. Using Equation (7), we scored all noun pairs in HYPERLEX and recorded Spearman’s rank correlation with the ground-truth ranking. The results of this experiment are shown in Table 3. It can be seen that the ranking based on Poincaré embeddings clearly outperforms all state-of-the-art methods evaluated in [37]. Methods in Table 3 that are prefixed with WN also use WORDNET as a basis and therefore are most comparable. The same embeddings also achieved a state-of-the-art accuracy of 0.86 on WBLESS [38, 17], which evaluates non-graded lexical entailment. 5 Discussion and Future Work In this paper, we introduced Poincaré embeddings for learning representations of symbolic data and showed how they can simultaneously learn the similarity and the hierarchy of objects. Furthermore, we proposed an efficient algorithm to compute the embeddings and showed experimentally, that Poincaré embeddings provide important advantages over Euclidean embeddings on hierarchical data: First, Poincaré embeddings enable parsimonious representations that allow us to learn highquality embeddings of large-scale taxonomies. Second, excellent link prediction results indicate that hyperbolic geometry can introduce an important structural bias for the embedding of complex symbolic data. Third, state-of-the-art results for predicting lexical entailment suggest that the hierarchy in the embedding space corresponds well to the underlying semantics of the data. The focus of this work was to evaluate general properties of hyperbolic geometry for the embedding of symbolic data. In future work, we intend to expand the applications of Poincaré embeddings – for instance to multi-relational data – and to derive models that are tailored to specific tasks such as word embeddings. Furthermore, we have shown that natural gradient based optimization already produces very good embeddings and scales to large datasets. We expect that a full Riemannian optimization approach can further increase the quality of the embeddings and lead to faster convergence. An important aspect of future work regards also the applicability of hyperbolic embeddings in downstream tasks: models that operate on embeddings often make an implicit Euclidean assumption and likely require some adaptation to be compatible with hyperbolic spaces. 8 References [1] Aaron B Adcock, Blair D Sullivan, and Michael W Mahoney. Tree-like structure in large social and information networks. In Data Mining (ICDM), 2013 IEEE 13th International Conference on, pages 1–10. IEEE, 2013. [2] Shun-ichi Amari. Natural gradient works efficiently in learning. Neural Computation, 10(2): 251–276, 1998. [3] Dena Marie Asta and Cosma Rohilla Shalizi. Geometric network comparisons. In Proceedings of the Thirty-First Conference on Uncertainty in Artificial Intelligence, UAI, pages 102–110. AUAI Press, 2015. [4] M Boguñá, F Papadopoulos, and D Krioukov. Sustaining the internet with hyperbolic mapping. Nature communications, 1:62, 2010. [5] Piotr Bojanowski, Edouard Grave, Armand Joulin, and Tomas Mikolov. Enriching word vectors with subword information. arXiv preprint arXiv:1607.04606, 2016. [6] Silvere Bonnabel. Stochastic gradient descent on Riemannian manifolds. IEEE Trans. Automat. Contr., 58(9):2217–2229, 2013. [7] Antoine Bordes, Nicolas Usunier, Alberto García-Durán, Jason Weston, and Oksana Yakhnenko. Translating embeddings for modeling multi-relational data. In Advances in Neural Information Processing Systems 26, pages 2787–2795, 2013. [8] Guillaume Bouchard, Sameer Singh, and Theo Trouillon. On approximate reasoning capabilities of low-rank vector spaces. AAAI Spring Syposium on Knowledge Representation and Reasoning (KRR): Integrating Symbolic and Neural Approaches, 2015. [9] Aaron Clauset, Cristopher Moore, and Mark EJ Newman. Hierarchical structure and the prediction of missing links in networks. Nature, 453(7191):98–101, 2008. [10] Thomas Demeester, Tim Rocktäschel, and Sebastian Riedel. Lifted rule injection for relation embeddings. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, EMNLP, pages 1389–1399. The Association for Computational Linguistics, 2016. [11] John Rupert Firth. A synopsis of linguistic theory, 1930-1955. Studies in linguistic analysis, 1957. [12] Mikhael Gromov. Hyperbolic groups. In Essays in group theory, pages 75–263. Springer, 1987. [13] Aditya Grover and Jure Leskovec. node2vec: Scalable feature learning for networks. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 855–864. ACM, 2016. [14] Zellig S Harris. Distributional structure. Word, 10(2-3):146–162, 1954. [15] Peter D Hoff, Adrian E Raftery, and Mark S Handcock. Latent space approaches to social network analysis. Journal of the american Statistical association, 97(460):1090–1098, 2002. [16] Armand Joulin, Edouard Grave, Piotr Bojanowski, and Tomas Mikolov. Bag of tricks for efficient text classification. arXiv preprint arXiv:1607.01759, 2016. [17] Douwe Kiela, Laura Rimell, Ivan Vulic, and Stephen Clark. Exploiting image generality for lexical entailment detection. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics (ACL 2015), pages 119–124. ACL, 2015. [18] Robert Kleinberg. Geographic routing using hyperbolic space. In INFOCOM 2007. 26th IEEE International Conference on Computer Communications. IEEE, pages 1902–1909. IEEE, 2007. [19] Dmitri Krioukov, Fragkiskos Papadopoulos, Maksim Kitsak, Amin Vahdat, and Marián Boguná. Hyperbolic geometry of complex networks. Physical Review E, 82(3):036106, 2010. [20] Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg Corrado, and Jeffrey Dean. Distributed representations of words and phrases and their compositionality. CoRR, abs/1310.4546, 2013. [21] George Miller and Christiane Fellbaum. Wordnet: An electronic lexical database, 1998. [22] Maximilian Nickel, Volker Tresp, and Hans-Peter Kriegel. A three-way model for collective learning on multi-relational data. In Proceedings of the 28th International Conference on Machine Learning, ICML, pages 809–816. Omnipress, 2011. 9 [23] Maximilian Nickel, Xueyan Jiang, and Volker Tresp. Reducing the rank in relational factorization models by including observable patterns. In Advances in Neural Information Processing Systems 27, pages 1179–1187, 2014. [24] Maximilian Nickel, Lorenzo Rosasco, and Tomaso A. Poggio. Holographic embeddings of knowledge graphs. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, pages 1955–1961. AAAI Press, 2016. [25] Jörg Ontrup and Helge Ritter. Large-scale data exploration with the hierarchically growing hyperbolic SOM. Neural networks, 19(6):751–761, 2006. [26] Alberto Paccanaro and Geoffrey E. Hinton. Learning distributed representations of concepts using linear relational embedding. IEEE Trans. Knowl. Data Eng., 13(2):232–244, 2001. [27] Jeffrey Pennington, Richard Socher, and Christopher D Manning. Glove: Global vectors for word representation. In EMNLP, volume 14, pages 1532–1543, 2014. [28] Bryan Perozzi, Rami Al-Rfou, and Steven Skiena. Deepwalk: Online learning of social representations. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 701–710. ACM, 2014. [29] Erzsébet Ravasz and Albert-László Barabási. Hierarchical organization in complex networks. Physical Review E, 67(2):026112, 2003. [30] Benjamin Recht, Christopher Ré, Stephen J. Wright, and Feng Niu. Hogwild: A lock-free approach to parallelizing stochastic gradient descent. In Advances in Neural Information Processing Systems 24, pages 693–701, 2011. [31] Sebastian Riedel, Limin Yao, Andrew McCallum, and Benjamin M. Marlin. Relation extraction with matrix factorization and universal schemas. In Human Language Technologies: Conference of the North American Chapter of the Association of Computational Linguistics, Proceedings, pages 74–84. The Association for Computational Linguistics, 2013. [32] Mark Steyvers and Joshua B Tenenbaum. The large-scale structure of semantic networks: Statistical analyses and a model of semantic growth. Cognitive science, 29(1):41–78, 2005. [33] Ke Sun, Jun Wang, Alexandros Kalousis, and Stéphane Marchand-Maillet. Space-time local embeddings. In Advances in Neural Information Processing Systems 28, pages 100–108, 2015. [34] Théo Trouillon, Johannes Welbl, Sebastian Riedel, Éric Gaussier, and Guillaume Bouchard. Complex embeddings for simple link prediction. In Proceedings of the 33nd International Conference on Machine Learning, ICML, volume 48 of JMLR Workshop and Conference Proceedings, pages 2071–2080. JMLR.org, 2016. [35] Ivan Vendrov, Ryan Kiros, Sanja Fidler, and Raquel Urtasun. Order-embeddings of images and language. arXiv preprint arXiv:1511.06361, 2015. [36] Luke Vilnis and Andrew McCallum. Word representations via Gaussian embedding. In International Conference on Learning Representations (ICLR), 2015. [37] Ivan Vulic, Daniela Gerz, Douwe Kiela, Felix Hill, and Anna Korhonen. Hyperlex: A large-scale evaluation of graded lexical entailment. arXiv preprint arXiv:1608.02117, 2016. [38] Julie Weeds, Daoud Clarke, Jeremy Reffin, David Weir, and Bill Keller. Learning to distinguish hypernyms and co-hyponyms. In Proceedings of COLING 2014, the 25th International Conference on Computational Linguistics: Technical Papers, pages 2249–2259. Dublin City University and Association for Computational Linguistics, 2014. [39] Hongyi Zhang, Sashank J. Reddi, and Suvrit Sra. Riemannian SVRG: fast stochastic optimization on riemannian manifolds. In Advances in Neural Information Processing Systems 29, pages 4592–4600, 2016. [40] George Kingsley Zipf. Human Behaviour and the Principle of Least Effort: an Introduction to Human Ecology. Addison-Wesley, 1949. 10 | 2017 | 236 |
6,715 | Variance-based Regularization with Convex Objectives Hongseok Namkoong Stanford University hnamk@stanford.edu John C. Duchi Stanford University jduchi@stanford.edu Abstract We develop an approach to risk minimization and stochastic optimization that provides a convex surrogate for variance, allowing near-optimal and computationally efficient trading between approximation and estimation error. Our approach builds off of techniques for distributionally robust optimization and Owen’s empirical likelihood, and we provide a number of finite-sample and asymptotic results characterizing the theoretical performance of the estimator. In particular, we show that our procedure comes with certificates of optimality, achieving (in some scenarios) faster rates of convergence than empirical risk minimization by virtue of automatically balancing bias and variance. We give corroborating empirical evidence showing that in practice, the estimator indeed trades between variance and absolute performance on a training sample, improving out-of-sample (test) performance over standard empirical risk minimization for a number of classification problems. 1 Introduction Let X be a sample space, P0 a distribution on X, and ⇥a parameter space. For a loss function ` : ⇥⇥X ! R, consider the problem of finding ✓2 ⇥minimizing the risk R(✓) := E[`(✓, X)] = Z `(✓, x)dP(x) (1) given a sample {X1, . . . , Xn} drawn i.i.d. according to the distribution P. Under appropriate conditions on the loss `, parameter space ⇥, and random variables X, a number of researchers [2, 6, 12, 7, 3] have shown results of the form that with high probability, R(✓) 1 n n X i=1 `(✓, Xi) + C1 r Var(`(✓, X)) n + C2 n for all ✓2 ⇥ (2) where C1 and C2 depend on the parameters of problem (1) and the desired confidence guarantee. Such bounds justify empirical risk minimization, which chooses b✓n to minimize 1 n Pn i=1 `(✓, Xi) over ✓2 ⇥. Further, these bounds showcase a tradeoff between bias and variance, where we identify the bias (or approximation error) with the empirical risk 1 n Pn i=1 `(✓, Xi), while the variance arises from the second term in the bound. Considering the bias-variance tradeoff (1) in statistical learning, it is natural to instead choose ✓to directly minimize a quantity trading between approximation and estimation error: 1 n n X i=1 `(✓, Xi) + C s Var b Pn(`(✓, X)) n , (3) where Var b Pn denotes the empirical variance. Maurer and Pontil [16] consider this idea, giving guarantees on the convergence and good performance of such a procedure. Unfortunately, even when 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. the loss ` is convex in ✓, the formulation (3) is generally non-convex, which limits the applicability of procedures that minimize the variance-corrected empirical risk (3). In this paper, we develop an approach based on Owen’s empirical likelihood [19] and ideas from distributionally robust optimization [4, 5, 10] that—whenever the loss ` is convex—provides a tractable convex formulation closely approximating the penalized risk (3). We give a number of theoretical guarantees and empirical evidence for its performance. To describe our approach, we require a few definitions. For a convex function φ : R+ ! R with φ(1) = 0, Dφ (P||Q) = R X φ( dP dQ)dQ is the φ-divergence between distributions P and Q defined on X. Throughout this paper, we use φ(t) = 1 2(t −1)2, which gives the χ2-divergence. Given φ and an i.i.d. sample X1, . . . , Xn, we define the ⇢-neighborhood of the empirical distribution Pn := n distributions P s.t. Dφ(P|| bPn) ⇢ n o , where bPn denotes the empirical distribution of the sample {Xi}n i=1, and our choice φ(t) = 1 2(t −1)2 means that Pn has support {Xi}n i=1. We then define the robustly regularized risk Rn(✓, Pn) := sup P 2Pn EP [`(✓, X)] = sup P n EP [`(✓, X)] : Dφ(P|| bPn) ⇢ n o . (4) As it is the supremum of a family of convex functions, the robust risk ✓7! Rn(✓, Pn) is convex in ✓regardless of the value of ⇢≥0 whenever the original loss `(·; X) is convex and ⇥is a convex set. Namkoong and Duchi [18] propose a stochastic procedure for minimizing (4) almost as fast as stochastic gradient descent. See Appendix C for a detailed account of an alternative method. We show that the robust risk (4) provides an excellent surrogate for the variance-regularized quantity (3) in a number of ways. Our first result (Thm. 1 in Sec. 2) is that for bounded loss functions, Rn(✓, Pn) = E b Pn[`(✓, X)] + r 2⇢ n Var b Pn(`(✓, X)) + "n(✓), (5) where "n(✓) 0 and is O(1/n) uniformly in ✓. We show that when `(✓, X) has suitably large variance, we have "n = 0 with high probability. With the expansion (5) in hand, we can show a number of finite-sample convergence guarantees for the robustly regularized estimator b✓rob n 2 argmin ✓2⇥ ⇢ sup P n EP [`(✓, X)] : Dφ(P|| bPn) ⇢ n o+ . (6) Based on the expansion (5), solutions b✓rob n of problem (6) enjoy automatic finite sample optimality certificates: for ⇢≥0, with probability at least 1 −C1 exp(−⇢) we have E[`(b✓rob n ; X)] Rn(b✓rob n ; Pn) + C2⇢ n = inf ✓2⇥Rn(✓, Pn) + C2⇢ n where C1, C2 are constants (which we specify) that depend on the loss ` and domain ⇥. That is, with high probability the robust solution has risk no worse than the optimal finite sample robust objective up to an O(⇢/n) error term. To guarantee a desired level of risk performance with probability 1 −δ, we may specify the robustness penalty ⇢= O(log 1 δ ). Secondly, we show that the procedure (6) allows us to automatically and near-optimally trade between approximation and estimation error (bias and variance), so that E[`(b✓rob n ; X)] inf ✓2⇥ ( E[`(✓; X)] + 2 r 2⇢ n Var(`(✓; X)) ) + C⇢ n with high probability. When there are parameters ✓with small risk R(✓) (relative to the optimal parameter ✓?) and small variance Var(`(✓, X)), this guarantees that the excess risk R(b✓rob n ) −R(✓?) is essentially of order O(⇢/n), where ⇢governs our desired confidence level. We give an explicit example in Section 3.2 where our robustly regularized procedure (6) converges at O(log n/n) compared to O(1/pn) of empirical risk minimization. Bounds that trade between risk and variance are known in a number of cases in the empirical risk minimization literature [15, 22, 2, 1, 6, 3, 7, 12], which is relevant when one wishes to achieve “fast 2 rates” of convergence for statistical learning algorithms. In many cases, such tradeoffs require either conditions such as the Mammen-Tsybakov noise condition [15, 6] or localization results [3, 2, 17] made possible by curvature conditions that relate the risk and variance. The robust solutions (6) enjoy a variance-risk tradeoff that is differen but holds essentially without conditions except compactness of ⇥. We show in Section 3.3 that the robust solutions enjoy fast rates of convergence under typitcal curvature conditions on the risk R. We complement our theoretical results in Section 4, where we conclude by providing two experiments comparing empirical risk minimization (ERM) strategies to robustly-regularized risk minimization (6). These results validate our theoretical predictions, showing that the robust solutions are a practical alternative to empirical risk minimization. In particular, we observe that the robust solutions outperform their ERM counterparts on “harder” instances with higher variance. In classification problems, for example, the robustly regularized estimators exhibit an interesting tradeoff, where they improve performance on rare classes (where ERM usually sacrifices performance to improve the common cases—increasing variance slightly) at minor cost in performance on common classes. 2 Variance Expansion We begin our study of the robust regularized empirical risk Rn(✓, Pn) by showing that it is a good approximation to the empirical risk plus a variance term (5). Although the variance of the loss is in general non-convex, the robust formulation (6) is a convex optimization problem for variance regularization whenever the loss function is convex [cf. 11, Prop. 2.1.2.]. To gain intuition for the variance expansion that follows, we consider the following equivalent formulation for the robust objective supP 2Pn EP [Z] maximize p n X i=1 pizi subject to p 2 Pn = ⇢ p 2 Rn + : 1 2 knp −1k2 2 ⇢, h1, pi = 1 + , (7) where z 2 Rn is a vector. For simplicity, let s2 n = 1 n kzk2 2 −(z)2 = 1 n kz −zk2 2 denote the empirical “variance” of the vector z, where z = 1 n h1, zi is the mean value of z. Then by introducing the variable u = p −1 n1, the objective in problem (7) satisfies hp, zi = z + hu, zi = z + hu, z −zi because hu, 1i = 0. Thus problem (7) is equivalent to solving maximize u2Rn z + hu, z −zi subject to kuk2 2 2⇢ n2 , h1, ui = 0, u ≥−1 n. Notably, by the Cauchy-Schwarz inequality, we have hu, z −zi p2⇢kz −zk2 /n = p 2⇢s2n/n, and equality is attained if and only if ui = p2⇢(zi −z) n kz −zk2 = p2⇢(zi −z) n p ns2n . Of course, it is possible to choose such ui while satisfying the constraint ui ≥−1/n if and only if min i2[n] p2⇢(zi −z) p ns2n ≥−1. (8) Thus, if inequality (8) holds for the vector z—that is, there is enough variance in z—we have sup p2Pn hp, zi = z + r 2⇢s2n n . For losses `(✓, X) with enough variance relative to `(✓, Xi) −E b Pn[`(✓, Xi)], that is, those satisfying inequality (8), then, we have Rn(✓, Pn) = E b Pn[`(✓, X)] + r 2⇢ n Var b Pn(`(✓, X)). A slight elaboration of this argument, coupled with the application of a few concentration inequalities, yields the next theorem. Recall that φ(t) = 1 2(t −1)2 in our definition of the φ-divergence. 3 Theorem 1. Let Z be a random variable taking values in [M0, M1] where M = M1 −M0 and fix ⇢≥0. Then r 2⇢ n Var b Pn(Z) −2M⇢ n ! + sup P n EP [Z] : Dφ(P|| bPn) ⇢ n o −E b Pn[Z] r 2⇢ n Var b Pn(Z). (9) If n ≥max{ 24⇢ Var(Z), 16 Var(Z), 1}M 2 and we set tn = p Var(Z) 1p 1 −n−1 −1 2 2 −M 2 n ≥ q Var(Z) 18 , sup P :Dφ(P || b Pn)⇢ n EP [Z] = E b Pn[Z] + r 2⇢ n Var b Pn(Z) (10) with probability at least 1 −exp(−nt2 n 2M 2 ) ≥1 −exp(−nVar(Z) 36M 2 ). See Appendix A.1 for the proof. Inequality (9) and the exact expansion (10) show that, at least for bounded loss functions `, the robustly regularized risk (4) is a natural (and convex) surrogate for empirical risk plus standard deviation of the loss, and the robust formulation approximates exact variance regularization with a convex penalty. We also provide a uniform variant of Theorem 1 based on the standard notion of the covering number, which we now define. Let V be a vector space with (semi)norm k·k on V, and let V ⇢ V. We say a collection v1, . . . , vN ⇢V is an ✏-cover of V if for each v 2 V , there exists vi such that kv −vik ✏. The covering number of V with respect to k·k is then N(V, ✏, k·k) := inf {N 2 N : there is an ✏-cover of V with respect to k·k}. Now, let F be a collection of functions f : X ! R, and define the L1(X)-norm by kf −gkL1(X) := supx2X |f(x) −g(x)|. Although we state our results abstractly, we typically take F := {`(✓, ·) | ✓2 ⇥}. As a motivating example, we give the following standard bound on the covering number of Lipschitz losses [24]. Example 1: Let ⇥⇢Rd and assume that ` : ⇥⇥X ! R is L-Lipschitz in ✓with respect to the `2-norm for all x 2 X, meaning that |`(✓, x) −`(✓0, x)| L k✓−✓0k2. Then taking F = {`(✓, ·) : ✓2 ⇥}, any ✏-covering {✓1, . . . , ✓N} of ⇥in `2-norm guarantees that mini |`(✓, x) −`(✓i, x)| L✏ for all ✓, x. That is, N(F, ✏, k·kL1(X)) N(⇥, ✏/L, k·k2) ✓ 1 + diam(⇥)L ✏ ◆d , where diam(⇥) = sup✓,✓02⇥k✓−✓0k2. Thus `2-covering numbers of ⇥control L1-covering numbers of the family F. ⌥ With this definition, we provide a result showing that the variance expansion (5) holds uniformly for all functions with enough variance. Theorem 2. Let F be a collection of bounded functions f : X ! [M0, M1] where M = M1 −M0, and let ⌧≥0 be a constant. Define F≥⌧:= 6 f 2 F : Var(f) ≥⌧2 and tn = ⌧( p 1 −n−1 −1 2)− M 2 n . If ⌧2 ≥32⇢M 2 n , then with probability at least 1 −N ⇣ F, ⌧ 32, k·kL1(X) ⌘ exp ⇣ −nt2 n 2M 2 ⌘ , we have for all f 2 F≥⌧ sup P :Dφ(P || b Pn)⇢ n EP [f(X)] = E b Pn[f(X)] + r 2⇢ n Var b Pn(f(X)). (11) We prove the theorem in Section A.2. Theorem 2 shows that the variance expansion of Theorem 1 holds uniformly for all functions f with sufficient variance. See Duchi, Glynn, and Namkoong [10] for an asymptotic analogue of the equality (11) for heavier tailed random variables. 3 Optimization by Minimizing the Robust Loss Based on the variance expansions in the preceding section, we show that the robust solution (6) automatically trades between approximation and estimation error. In addition to k·kL1(X)-covering 4 numbers defined in the previous section, we use the tighter notion of empirical `1-covering numbers. For x 2 X n, define F(x) = {(f(x1), . . . , f(xn)) : f 2 F} and the empirical `1-covering numbers N1(F, ✏, n) := supx2X n N (F(x), ✏, k·k1), which bound the number of `1-balls of radius ✏ required to cover F(x). Note that we always have N1(F) N(F). Typically, we consider the function class F := {`(✓, ·) : ✓2 ⇥}, though we state our minimization results abstractly. Although the below result is in terms of covering numbers for ease of exposition, a variant holds depending on localized Rademacher averages [2] of the class F, which can yield tighter guarantees (we omit such results for lack of space). We prove the following theorem in Section A.3. Theorem 3. Let F be a collection of functions f : X ! [M0, M1] with M = M1 −M0. Define the empirical minimizer bf 2 argmin f2F ⇢ sup P n EP [f(X)] : Dφ(P|| bPn) ⇢ n o+ . Then for ⇢≥t, with probability at least 1 −2(N(F, ✏, k·kL1(X)) + 1)e−t, E[ bf(X)] sup P :Dφ(P || b Pn)⇢ n EP [ bf(X)] + 7M⇢ n + 2 + r 2t n −1 ! ✏ (12a) inf f2F ( E[f] + 2 r 2⇢ n Var(f) ) + 11M⇢ n + 2 + r 2t n −1 ! ✏. (12b) Further, for n ≥8M 2 t , t ≥log 12, and ⇢≥9t, with probability at least 1−2(3N1 (F, ✏, 2n)+1)e−t, E[ bf(X)] sup P :Dφ(P || b Pn)⇢ n EP [ bf(X)] + 11 3 M⇢ n + 2 + 4 r 2t n ! ✏ (13a) inf f2F ( E[f] + 2 r 2⇢ n Var(f) ) + 19M⇢ 3n + 2 + 4 r 2t n ! ✏. (13b) Unlike analogous results for empirical risk minimization [6], Theorem 3 does not require the selfbounding type assumption Var(f) BE[f]. A consequence of this is that when v = Var(f ⇤) is small, where f ⇤2 argminf2F E[f], we achieve O(1/n + p v/n) (fast) rates of convergence. This condition is different from the typical conditions required for empirical risk minimization to have fast rates of convergence, highlighting the possibilities of variance-based regularization. It will be interesting to understand appropriate low-noise conditions (e.g. the Mammen-Tsybakov noise condition [15, 6]) guaranteeing good performance. Additionally, the robust objective Rn(✓, Pn) is an empirical likelihood confidence bound on the population risk [10], and as empirical likelihood confidence bounds are self-normalizing [19], other fast-rate generalizations may exist. 3.1 Consequences of Theorem 3 We now turn to a number of corollaries that expand on Theorem 3 to investigate its consequences. Our first corollary shows that Theorem 3 applies to standard Vapnik-Chervonenkis (VC) classes. As VC dimension is preserved through composition, this result also extends to the procedure (6) in typical empirical risk minimization scenarios. See Section A.4 for its proof. Corollary 3.1. In addition to the conditions of Theorem 3, let F have finite VC-dimension VC(F). Then for a numerical constant c < 1, the bounds (13) hold with probability at least 1 − ⇣ c VC(F) 1 16Mne ✏ 2VC(F)−1 + 2 ⌘ e−t. Next, we focus more explicitly on the estimator b✓rob n defined by minimizing the robust regularized risk (6). Let us assume that ⇥⇢Rd, and that we have a typical linear modeling situation, where a loss h is applied to an inner product, that is, `(✓, x) = h(✓>x). In this case, by making the substitution that the class F = {`(✓, ·) : ✓2 ⇥} in Corollary 3.1, we have VC(F) d, and we obtain the following corollary. Recall the definition (1) of the population risk R(✓) = E[`(✓, X)], and the uncertainty set Pn = {P : Dφ(P|| bPn) ⇢ n}, and that Rn(✓, Pn) = supP 2Pn EP [`(✓, X)]. By setting ✏= M/n in Corollary 3.1, we obtain the following result. 5 Corollary 3.2. Let the conditions of the previous paragraph hold and assume that `(✓, x) 2 [0, M] for all ✓2 ⇥, x 2 X. Then if n ≥⇢≥9 log 12, R(b✓rob n ) Rn(b✓rob n , Pn) + 11M⇢ 3n + 4M n inf ✓2⇥ ( R(✓) + 2 r 2⇢ n Var(`(✓; X)) ) + 11M⇢ n with probability at least 1 −2 exp(c1d log n −c2⇢), where ci are universal constants with c2 ≥1/9. Unpacking Theorem 3 and Corollary 3.2 a bit, the first result (13a) provides a high-probability guarantees that the true expectation E[ bf] cannot be more than O(1/n) worse than its robustlyregularized empirical counterpart, that is, R(b✓rob n ) Rn(b✓rob n , Pn) + O(⇢/n), which is (roughly) a consequence of uniform variants of Bernstein’s inequality. The second result (13b) guarantee the convergence of the empirical minimizer to a parameter with risk at most O(1/n) larger than the best possible variance-corrected risk. In the case that the losses take values in [0, M], then Var(`(✓, X)) MR(✓), and thus for ✏= 1/n in Theorem 3, we obtain R(b✓rob n ) R(✓?) + C r M⇢R(✓?) n + C M⇢ n , a type of result well-known and achieved by empirical risk minimization for bounded nonnegative losses [6, 26, 25]. In some scenarios, however, the variance may satisfy Var(`(✓, X)) ⌧MR(✓), yielding improvements. To give an alternative variant of Corollary 3.2, let ⇥⇢Rd and assume that for each x 2 X, inf✓2⇥`(✓, x) = 0 and that ` is L-Lipschitz in ✓. If D := diam(⇥) = sup✓,✓02⇥k✓−✓0k < 1, then 0 `(✓, x) L diam(⇥) =: M. Corollary 3.3. Let the conditions of the preceeding paragraph hold. Set t = ⇢= log 2n + d log(2nDL) and ✏= 1 n in Theorem 3 and assume that D . nk and L . nk for a numerical constant k. With probability at least 1 −1/n, E[`(b✓rob n ; X)] = R(b✓rob n ) inf ✓2⇥ ( R(✓) + C r d Var(`(✓, X)) n log n ) + C dLD log n n where C is a numerical constant. 3.2 Beating empirical risk minimization We now provide an example in which the robustly-regularized estimator (6) exhibits a substantial improvement over empirical risk minimization. We expect the robust approach to offer performance benefits in situations in which the empirical risk minimizer is highly sensitive to noise, say, because the losses are piecewise linear, and slight under- or over-estimates of slope may significantly degrade solution quality. With this in mind, we construct a toy 1-dimensional example—estimating the median of a distribution supported on X = {−1, 0, 1}—in which the robust-regularized estimator has convergence rate log n/n, while empirical risk minimization is at best 1/pn. Define the loss `(✓; x) = |✓−x| −|x|, and for δ 2 (0, 1) let the distribution P be defined by P(X = 1) = 1−δ 2 , P(X = −1) = 1−δ 2 , P(X = 0) = δ. Then for ✓2 R, the risk of the loss is R(✓) = δ|✓| + 1 −δ 2 |✓−1| + 1 −δ 2 |✓+ 1| −(1 −δ). By symmetry, it is clear that ✓? := argmin✓R(✓) = 0, which satisfies R(✓?) = 0. (Note that `(✓, x) = `(✓, x) −`(✓?, x).) Without loss of generality, we assume that ⇥= [−1, 1]. Define the empirical risk minimizer and the robust solution b✓erm := argmin ✓2R E b Pn[`(✓, X)] = argmin ✓2[−1,1] E b Pn[|✓−X|], b✓rob n 2 argmin ✓2⇥ Rn(✓, Pn). Intuitively, if too many of the observations satisfy Xi = 1 or too many satisfy Xi = −1, then b✓erm will be either 1 or −1; for small δ, such events become reasonably probable. On the other hand, we have `(✓?; x) = 0 for all x 2 X, so that Var(`(✓?; X)) = 0 and variance regularization achieves the rate O(log n/n) as opposed to empirical risk minimizer’s O(1/pn). See Section A.6 for the proof. 6 Proposition 1. Under the conditions of the previous paragraph, for n ≥⇢= 3 log n, with probability at least 1−4 n, we have R(b✓rob n )−R(✓?) 45 log n n . However, with probability at least 2Φ(− q n n−1)− 2 p 2/p⇡en ≥2Φ(− q n n−1) −n−1 2 , we have R(b✓erm) ≥R(✓?) + n−1 2 . For n ≥20, the probability of the latter event is ≥.088. Hence, for this (specially constructed) example, we see that there is a gap of nearly n 1 2 in order of convergence. 3.3 Fast Rates In cases in which the risk R has curvature, empirical risk minimization often enjoys faster rates of convergence [6, 21]. The robust solution b✓rob n similarly attains faster rates of convergence in such cases, even with approximate minimizers of Rn(✓, Pn). For the risk R and ✏≥0, let S✏:= {✓2 ⇥: R(✓) inf✓?2⇥R(✓?) + ✏} denote the ✏-sub-optimal (solution) set, and similarly let bS✏:= {✓2 ⇥: Rn(✓, Pn) inf✓02⇥Rn(✓0, Pn) + ✏}. For a vector ✓2 ⇥, let ⇡S(✓) = argmin✓?2S k✓? −✓k2 denote the Euclidean projection of ✓onto the set S. Our below result depends on a local notion of Rademacher complexity. For i.i.d. random signs "i 2 {±1}, the empirical Rademacher complexity of a function class F ⇢{f : X ! R} is RnF := E sup f2F 1 n n X i=1 "if(Xi) | X ; . Although we state our results abstractly, we typically take F := {`(✓, ·) | ✓2 ⇥}. For example, when F is a VC-class, we typically have E[RnF] . p VC(F)/n. Many other bounds on E[RnF] are possible [1, 24, Ch. 2]. For A ⇢⇥let Rn(A) denote the Rademacher complexity of the localized process {x 7! `(✓; x) −`(⇡S(✓); x) : ✓2 A}. We then have the following result, whose proof we provide in Section A.7. Theorem 4. Let ⇥⇢Rd be convex and let `(·; x) be convex and L-Lipshitz for all x 2 X. For constants λ > 0, γ > 1, and r > 0, assume that R satisfies R(✓) −inf ✓2⇥R(✓) ≥λ dist(✓, S)γ for all ✓such that dist(✓, S) r. (14) Let t > 0. If 0 ✏1 2λrγ satisfies ✏≥ ✓8L2⇢ n ◆ γ 2(γ−1) ✓2 λ ◆ 1 γ−1 and ✏ 2 ≥2E[Rn(S2✏)] + L ✓2✏ λ ◆1 γ r 2t n , (15) then P(bS✏⇢S2✏) ≥1 −e−t, and inequality (15) holds for all ✏& ( L2(t+⇢+d) λ2/γn ) γ 2(γ−1) . 4 Experiments We present two real classification experiments to carefully compare standard empirical risk minimization (ERM) to the variance-regularized approach we present. Empirically, we show that the ERM estimator b✓erm performs poorly on rare classes with (relatively) more variance, where the robust solution achieves improved classification performance on rare instances. In all our experiments, this occurs with little expense over the more common instances. 4.1 Protease cleavage experiments For our first experiment, we compare our robust regularization procedure to other regularizers using the HIV-1 protease cleavage dataset from the UCI ML-repository [14]. In this binary classification task, one is given a string of amino acids (a protein) and a featurized representation of the string of dimension d = 50960, and the goal is to predict whether the HIV-1 virus will cleave the amino acid sequence in its central position. We have a sample of n = 6590 observations of this process, where the class labels are somewhat skewed: there are 1360 examples with label Y = +1 (HIV-1 cleaves) and 5230 examples with Y = −1 (does not cleave). 7 (a) test error (b) rare class (Yi = +1) (c) common class (Yi = −1) Figure 1: HIV-1 Protease Cleavage plots (2-standard error confidence bars). Comparison of misclassification test error rates among different regularizers. We use the logistic loss `(✓; (x, y)) = log(1 + exp(−y✓>x)). We compare the performance of different constraint sets ⇥by taking ⇥= 6 ✓2 Rd : a1 k✓k1 + a2 k✓k2 r , which is equivalent to elastic net regularization [27], while varying a1, a2, and r. We experiment with `1-constraints (a1 = 1, a2 = 0) with r 2 {50, 100, 500, 1000, 5000}, `2-constraints (a1 = 0, a2 = 1) with r 2 {5, 10, 50, 100, 500}, elastic net (a1 = 1, a2 = 10) with r 2 {102, 2 · 102, 103, 2 · 103, 104}, our robust regularizer with ⇢2 {102, 103, 104, 5 · 104, 105} and our robust regularizer coupled with the `1-constraint (a1 = 1, a2 = 0) with r = 100. Though we use a convex surrogate (logistic loss), we measure performance of the classifiers using the zero-one (misclassification) loss 1{sign(✓T x)y 0}. For validation, we perform 50 experiments, where in each experiment we randomly select 9/10 of the data to train the model, evaluating its performance on the held out 1/10 fraction (test). We plot results summarizing these experiments in Figure 1. The horizontal axis in each figure indexes our choice of regularization value (so “Regularizer = 1” for the `1-constrained problem corresponds to r = 50). The figures show that the robustly regularized risk provides a different type of protection against overfitting than standard regularization or constraint techniques do: while other regularizers underperform in heavily constrained settings, the robustly regularized estimator b✓rob n achieves low classification error for all values of ⇢. Notably, even when coupled with a fairly stringent `1-constraint (r = 100), robust regularization has performance better than `1 except for large values r, especially on the rare label Y = +1. We investigate the effects of the robust regularizer with a slightly different perspective in Table 1, where we use ⇥= {✓: k✓k1 100} for the constraint set for each experiment. We give error rates and logistic risk values for the different procedures, averaged over 50 independent runs. We note that all gaps are significant at the 3-standard error level. We see that the ERM solutions achieve good performance on the common class (Y = −1) but sacrifice performance on the uncommon class. As we increase ⇢, performance of the robust solution b✓rob n on the rarer label Y = +1 improves, while the error rate on the common class degrades a small (insignificant) amount. Table 1: HIV-1 Cleavage Error risk error (%) error (Y = +1) error (Y = −1) ⇢ train test train test train test train test erm 0.1587 0.1706 5.52 6.39 17.32 18.79 2.45 3.17 100 0.1623 0.1763 4.99 5.92 15.01 17.04 2.38 3.02 1000 0.1777 0.1944 4.5 5.92 13.35 16.33 2.19 3.2 10000 0.283 0.3031 2.39 5.67 7.18 14.65 1.15 3.32 4.2 Document classification in the Reuters corpus For our second experiment, we consider a multi-label classification problem with a reasonably large dataset. The Reuters RCV1 Corpus [13] has 804,414 examples with d = 47,236 features, where feature j is an indicator variable for whether word j appears in a given document. The goal is to classify documents as a subset of the 4 categories where documents are labeled with a subset of those. As documents can belong to multiple categories, we fit binary classifiers on each of the four 8 (a) (b) (c) Figure 2: Reuters corpus experiment. (a) Logistic risks. (b) Recall. (c) Recall on Economics (rare). categories. Each category has different number of documents (Corporate: 381, 327, Economics: 119, 920, Government: 239, 267, Markets: 204, 820) In this experiment, we expect the robust solution to outperform ERM on the rarer category (Economics), as the robustification (6) naturally upweights rarer (harder) instances, which disproportionally affect variance—as in the previous experiment. For each category k 2 {1, 2, 3, 4}, we use the logistic loss `(✓k; (x, y)) = log(1 + exp(−y✓> k x)). For each binary classifier, we use the `1 constraint set ⇥= 6 ✓2 Rd : k✓k1 1000 . To evaluate performance on this multi-label problem, we use precision (ratio of the number of correct positive labels to the number classified as positive) and recall (ratio of the number of correct positive labels to the number of actual positive labels). We partition the data into ten equally-sized sub-samples and perform ten validation experiments, where in each experiment we use one of the ten subsets for fitting the logistic models and the remaining nine partitions as a test set to evaluate performance. In Figure 2, we summarize the results of our experiment averaged over the 10 runs, with 2-standard error bars (computed across the folds). To facilitate comparison across the document categories, we give exact values of these averages in Tables 2 and 3. Both b✓rob n and b✓erm have reasonably high precision across all categories, with increasing ⇢giving a mild improvement in precision (from .93 ± .005 to .94 ± .005). On the other hand, we observe in Figure 2(c) that ERM has low recall (.69 on test) for the Economics category, which contains about 15% of documents. As we increase ⇢ from 0 (ERM) to 105, we see a smooth and substantial improvement in recall for this rarer category (without significant degradation in precision). This improvement in recall amounts to reducing variance in predictions on the rare class. This precision and recall improvement comes in spite of the increase in the average binary logistic risk for each of the 4 classes. In Figure 2(a), we plot the average binary logistic loss (on train and test sets) averaged over the 4 categories as well as the upper confidence bound Rn(✓, Pn) as we vary ⇢. The robust regularization effects reducing variance appear to improve the performance of the binary logistic loss as a surrogate for true error rate. Table 2: Reuters Corpus Precision (%) Precision Corporate Economics Government Markets ⇢ train test train test train test train test train test erm 92.72 92.7 93.55 93.55 89.02 89 94.1 94.12 92.88 92.94 1E3 92.97 92.95 93.31 93.33 87.84 87.81 93.73 93.76 92.56 92.62 1E4 93.45 93.45 93.58 93.61 87.6 87.58 93.77 93.8 92.71 92.75 1E5 94.17 94.16 94.18 94.19 86.55 86.56 94.07 94.09 93.16 93.24 1E6 91.2 91.19 92 92.02 74.81 74.8 91.19 91.25 89.98 90.18 Table 3: Reuters Corpus Recall (%) Recall Corporate Economics Government Markets ⇢ train test train test train test train test train test erm 90.97 90.96 90.20 90.25 67.53 67.56 90.49 90.49 88.77 88.78 1E3 91.72 91.69 90.83 90.86 70.42 70.39 91.26 91.23 89.62 89.58 1E4 92.40 92.39 91.47 91.54 72.38 72.36 91.76 91.76 90.48 90.45 1E5 93.46 93.44 92.65 92.71 76.79 76.78 92.26 92.21 91.46 91.47 1E6 93.10 93.08 92.00 92.04 79.84 79.71 91.89 91.90 92.00 91.97 Code is available at https://github.com/hsnamkoong/robustopt. 9 Acknowledgments We thank Feng Ruan for pointing out a much simpler proof of Theorem 1 than in our original paper. JCD and HN were partially supported by the SAIL-Toyota Center for AI Research and HN was partially supported Samsung Fellowship. JCD was also partially supported by the National Science Foundation award NSF-CAREER-1553086 and the Sloan Foundation. References [1] P. L. Bartlett and S. Mendelson. Rademacher and Gaussian complexities: Risk bounds and structural results. Journal of Machine Learning Research, 3:463–482, 2002. [2] P. L. Bartlett, O. Bousquet, and S. Mendelson. Local Rademacher complexities. Annals of Statistics, 33(4): 1497–1537, 2005. [3] P. L. Bartlett, M. I. Jordan, and J. McAuliffe. Convexity, classification, and risk bounds. Journal of the American Statistical Association, 101:138–156, 2006. [4] A. Ben-Tal, D. den Hertog, A. D. Waegenaere, B. Melenberg, and G. Rennen. Robust solutions of optimization problems affected by uncertain probabilities. Management Science, 59(2):341–357, 2013. [5] D. Bertsimas, V. Gupta, and N. Kallus. Robust SAA. arXiv:1408.4445 [math.OC], 2014. URL http: //arxiv.org/abs/1408.4445. [6] S. Boucheron, O. Bousquet, and G. Lugosi. Theory of classification: a survey of some recent advances. ESAIM: Probability and Statistics, 9:323–375, 2005. [7] S. Boucheron, G. Lugosi, and P. Massart. Concentration Inequalities: a Nonasymptotic Theory of Independence. Oxford University Press, 2013. [8] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [9] J. C. Duchi, S. Shalev-Shwartz, Y. Singer, and T. Chandra. Efficient projections onto the `1-ball for learning in high dimensions. In Proceedings of the 25th International Conference on Machine Learning, 2008. [10] J. C. Duchi, P. W. Glynn, and H. Namkoong. Statistics of robust optimization: A generalized empirical likelihood approach. arXiv:1610.03425 [stat.ML], 2016. URL https://arxiv.org/abs/1610.03425. [11] J. Hiriart-Urruty and C. Lemaréchal. Convex Analysis and Minimization Algorithms I & II. Springer, New York, 1993. [12] V. Koltchinskii. Local Rademacher complexities and oracle inequalities in risk minimization. Annals of Statistics, 34(6):2593–2656, 2006. [13] D. Lewis, Y. Yang, T. Rose, and F. Li. RCV1: A new benchmark collection for text categorization research. Journal of Machine Learning Research, 5:361–397, 2004. [14] M. Lichman. UCI machine learning repository, 2013. URL http://archive.ics.uci.edu/ml. [15] E. Mammen and A. B. Tsybakov. Smooth discrimination analysis. Annals of Statistics, 27:1808–1829, 1999. [16] A. Maurer and M. Pontil. Empirical Bernstein bounds and sample variance penalization. In Proceedings of the Twenty Second Annual Conference on Computational Learning Theory, 2009. [17] S. Mendelson. Learning without concentration. In Proceedings of the Twenty Seventh Annual Conference on Computational Learning Theory, 2014. [18] H. Namkoong and J. C. Duchi. Stochastic gradient methods for distributionally robust optimization with f-divergences. In Advances in Neural Information Processing Systems 29, 2016. [19] A. B. Owen. Empirical likelihood. CRC press, 2001. [20] P. Samson. Concentration of measure inequalities for Markov chains and φ-mixing processes. Annals of Probability, 28(1):416–461, 2000. [21] A. Shapiro, D. Dentcheva, and A. Ruszczy´nski. Lectures on Stochastic Programming: Modeling and Theory. SIAM and Mathematical Programming Society, 2009. [22] A. B. Tsybakov. Optimal aggregation of classifiers in statistical learning. Annals of Statistics, pages 135–166, 2004. [23] A. B. Tsybakov. Introduction to Nonparametric Estimation. Springer, 2009. [24] A. W. van der Vaart and J. A. Wellner. Weak Convergence and Empirical Processes: With Applications to Statistics. Springer, New York, 1996. [25] V. N. Vapnik. Statistical Learning Theory. Wiley, 1998. [26] V. N. Vapnik and A. Y. Chervonenkis. On the uniform convergence of relative frequencies of events to their probabilities. Theory of Probability and its Applications, XVI(2):264–280, 1971. [27] H. Zou and T. Hastie. Regularization and variable selection via the elastic net. Journal of the Royal Statistical Society, Series B, 67(2):301–320, 2005. [28] A. Zubkov and A. Serov. A complete proof of universal inequalities for the distribution function of the binomial law. Theory of Probability & Its Applications, 57(3):539–544, 2013. 10 | 2017 | 237 |
6,716 | A Sharp Error Analysis for the Fused Lasso, with Application to Approximate Changepoint Screening Kevin Lin Carnegie Mellon University Pittsburgh, PA 15213 kevinl1@andrew.cmu.edu James Sharpnack University of California, Davis Davis, CA 95616 jsharpna@ucdavis.edu Alessandro Rinaldo Carnegie Mellon University Pittsburgh, PA 15213 arinaldo@stat.cmu.edu Ryan J. Tibshirani Carnegie Mellon University Pittsburgh, PA 15213 ryantibs@stat.cmu.edu Abstract In the 1-dimensional multiple changepoint detection problem, we derive a new fast error rate for the fused lasso estimator, under the assumption that the mean vector has a sparse number of changepoints. This rate is seen to be suboptimal (compared to the minimax rate) by only a factor of log log n. Our proof technique is centered around a novel construction that we call a lower interpolant. We extend our results to misspecified models and exponential family distributions. We also describe the implications of our error analysis for the approximate screening of changepoints. 1 Introduction Consider the 1-dimensional multiple changepoint model yi = θ0,i + ϵi, i = 1, . . . , n, (1) where ϵi, i = 1, . . . , n are i.i.d. errors, and θ0,i, i = 1, . . . , n is a piecewise constant mean sequence, having a set of changepoints S0 = i ∈{1, . . . , n −1} : θ0,i ̸= θ0,i+1 . (2) This is a well-studied setting, and there is a large body of literature on estimation of the piecewise constant mean vector θ0 ∈Rn and its changepoints S0 using various estimators; refer, e.g., to the surveys Brodsky and Darkhovski (1993); Chen and Gupta (2000); Eckley et al. (2011). In this work, we consider the 1-dimensional fused lasso (also called 1d fused lasso, or simply fused lasso) estimator, which, given a data vector y ∈Rn from a model as in (1), is defined by bθ = argmin θ∈Rn 1 2 n X i=1 (yi −θi)2 + λ n−1 X i=1 |θi −θi+1|, (3) where λ ≥0 serves as a tuning parameter. This was proposed and named by Tibshirani et al. (2005), but the same idea was proposed earlier in signal processing, under the name total variation denoising, by Rudin et al. (1992). Variants of the fused lasso have been used in biology to detect regions where two genomic samples differ due to genetic variations (Tibshirani and Wang, 2008), in finance to detect shifts in the stock market (Chan et al., 2014), and in neuroscience to detect changes in stationary behaviors of the brain (Aston and Kirch, 2012). Popularity of the fused lasso can be attributed in part to its computational scalability, the optimization problem in (3) being convex and highly structured. There has also been plenty of supporting statistical theory developed for the fused lasso, which we review in Section 2. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Notation. We will make use of the following quantities that are defined in terms of the mean θ0 in (1) and its changepoint set S0 in (2). We denote the size of the changepoint set by s0 = |S0|. We enumerate S0 = {t1, . . . , ts0}, where 1 ≤t1 < . . . < ts0 < n, and for convenience we set t0 = 0, ts0+1 = n. The smallest distance between changepoints in θ0 is denoted by Wn = min i=0,1...,s0 (ti+1 −ti), (4) and the smallest distance between consecutive levels of θ0 by Hn = min i∈S0 |θ0,i+1 −θ0,i|. (5) We use D ∈R(n−1)×n to denote the difference operator D = −1 1 0 . . . 0 0 −1 1 . . . 0 ... ... ... 0 0 . . . −1 1 . (6) Note that s0 = ∥Dθ0∥0. We write DS to extract rows of D indexed by a subset S ⊆{1, . . . , n −1}, and D−S to extract the rows in Sc = {1, . . . , n −1} \ S. For a vector x ∈Rn, we use ∥x∥2 n = ∥x∥2 2/n to denote its length-scaled ℓ2 norm. For sequences an, bn, we use standard asymptotic notation: an = O(bn) to denote that an/bn is bounded for large enough n, an = Ω(bn) to denote that bn/an is bounded for large enough n, an = Θ(bn) to denote that both an = O(bn) and an = Ω(bn), an = o(bn) to denote that an/bn →0, and an = ω(bn) to denote that bn/an →0. For random sequences An, Bn, we write An = OP(Bn) to denote that An/Bn is bounded in probability. A random variable Z is said to have a sub-Gaussian distribution provided that E(Z) = 0 and P(|Z| > t) ≤2 exp(−t2/(2σ2)) for all t ≥0, and a constant σ > 0. Summary of results. Our main focus is on deriving a sharp estimation error bound for the fused lasso, parametrized by the number of changepoints s0 in θ0. We also study several consequences of our error bound and its analysis. A summary of our contributions is as follows. • New error analysis for the fused lasso. In Section 3, we develop a new error analysis for the fused lasso, in the model (1) with sub-Gaussian errors. Our analysis leverages a novel quantity that we call a lower interpolant to approximate the fused lasso estimate (once it has been orthogonalized with respect to the changepoint structure of the mean θ0) with 2s0 + 2 monotonic segments, which allows for finer control of the empirical process term. When s0 = O(1), and the changepoint locations in S0 are (asymptotically) evenly spaced, our main result implies E∥bθ −θ0∥2 n = O(log n(log log n)/n) for the fused lasso estimator bθ in (3). This is slower than the minimax rate by a log log n factor. Our result improves on previously established results from Dalalyan et al. (2017), and after the completion of this paper, was itself improved upon by Guntuboyina et al. (2017) (who are able to remove the extraneous log log n factor). • Extension to misspecified and exponential family models. In Section 4, we extend our error analysis to cover a mean vector θ0 that is not necessarily piecewise constant (or in other words, has potentially many changepoints). In Section 5, we extend our analysis to exponential family models. The latter extension, especially, is of practical importance, as many applications, e.g., CNV data analysis, call for changepoint detection on count data. • Application to approximate screening and recovery. In Section 6, we establish that the maximum distance between any true changepoint and its nearest estimated changepoint is OP(log n(log log n)/H2 n) using the fused lasso, when s0 = O(1) and all changepoints are (asymptotically) evenly spaced. After applying simple post-processing step, we show that the maximum distance between any estimated changepoint and its nearest true changepoint is of the same order. Our proof technique relies only on the estimation error rate of the fused lasso, and therefore immediately generalizes to any estimator of θ0, where the distance (for approximate changepoint screening and recovery) is a function of the inherent error rate. The supplementary document gives numerical simulations that support the theory in this paper. 2 2 Preliminary review of existing theory We begin by describing known results on the quantity ∥bθ −θ0∥2 n, the estimation error between the fused lasso estimate bθ in (3) and the mean θ0 in (1). Early results on the fused lasso are found in Mammen and van de Geer (1997) (see also Tibshirani (2014) for a translation to a setting more consistent with that of the current paper). These authors study what may be called the weak sparsity case, in which it is that assumed ∥Dθ0∥1 ≤Cn, with D being the difference operator in (6). Assuming additionally that the errors in (1) are sub-Gaussian, Mammen and van de Geer (1997) show that for a choice of tuning parameter λ = Θ(n1/3C−1/3 n ), the fused lasso estimate bθ in (3) satisfies ∥bθ −θ0∥2 n = OP(n−2/3C2/3 n ). (7) The weak sparsity setting is not the focus of our paper, but we still recall the above result to give a sense of the difference between the weak and strong sparsity settings, the latter being the setting in which we assume control over s0 = ∥Dθ0∥0, as we do in the current paper. Prior to this paper, the strongest result in the strong sparsity setting was given by Dalalyan et al. (2017), who assume N(0, σ2) errors in (1), and show that for λ = σ p 2n log(n/δ), the fused lasso estimate satisfies ∥bθ −θ0∥2 n ≤Cσ2 s0 log(n/δ) n log n + n Wn , (8) with probability at least 1 −2δ, for large enough n, and a constant C > 0, where recall Wn is the minimum distance between changepoints in θ0, as in (4). Our main result in Theorem 1 improves upon (8) in two ways: by reducing the first log n term inside the brackets to log s0 + log log n, and reducing the second n/Wn term to p n/Wn. After our paper was completed, Guntuboyina et al. (2017) gave an even sharper error rate for the fused lasso (and more broadly, for trend the family of higher-order filtering estimates as defined in Steidl et al. (2006); Kim et al. (2009); Tibshirani (2014)). Again assuming N(0, σ2) errors in (1), as well as Wn ≥cn/(s0 + 1) for some constant c ≥1, these authors show that the family of fused lasso estimates {bθλ, λ ≥0} (using subscripts here to explicitly denote the dependence on the tuning parameter λ) satisfies inf λ≥0 ∥bθλ −θ0∥2 n ≤Cσ2 s0 + 1 n log en s0 + 1 + 4σ2δ n , (9) with probability at least 1 −exp(−δ), for large enough n, and a constant C > 0. The above bound is sharper than ours in Theorem 1 in that (log s0 + log log n) log n + p n/Wn is replaced essentially by log Wn. (Also, the result in (9) does not actually require Wn ≥cn/(s0 + 1), but only requires the distance between changepoints where jumps alternate in sign to be larger than cn/(s0 + 1), which is another improvement.) Further comparisons will be made in Remark 1 following Theorem 1. There are numerous other estimators, e.g., based on segmentation techniques or wavelets, that admit estimation results comparable to those above. These are described in Remark 2 following Theorem 1. Lastly, it can be seen the minimax estimation error over the class of signals θ0 with s0 changepoints, assuming N(0, σ2) errors in (1), satisfies inf bθ sup ∥Dθ0∥0≤s0 E∥bθ −θ0∥2 n ≥Cσ2 s0 n log n s0 , (10) for large enough n, and a constant C > 0. This says that one cannot hope to improve the rate in (9). The minimax result in (10) follows from standard minimax theory for sparse normal means problems, as in, e.g., Johnstone (2015); for a proof, see Padilla et al. (2016). 3 Sharp error analysis for the fused lasso estimator Here we derive a sharper error bound for the fused lasso, improving upon the previously established result of Dalalyan et al. (2017) as stated in (8). Our proof is based on a concept that we call a lower interpolant, which as far as we can tell, is a new idea that may be of interest in its own right. 3 Theorem 1. Assume the data model in (1), with errors ϵi, i = 1, . . . , n i.i.d. from a sub-Gaussian distribution. Then under a choice of tuning parameter λ = (nWn)1/4, the fused lasso estimate bθ in (3) satisfies ∥bθ −θ0∥2 n ≤γ2cs0 n (log s0 + log log n) log n + r n Wn ! , with probability at least 1 −exp(−Cγ), for all γ > 1 and n ≥N, where c, C, N > 0 are constants that depend on only σ (the parameter appearing in the sub-Gaussian distribution of the errors). An immediate corollary is as follows. Corollary 1. Under the same assumptions as in Theorem 1, we have E∥bθ −θ0∥2 n ≤cs0 n (log s0 + log log n) log n + r n Wn ! , for some constant c > 0. We give some remarks comparing Theorem 1 to related results in the literature. Remark 1 (Comparison to Dalalyan et al. (2017); Guntuboyina et al. (2017)). We can see that the result in Theorem 1 is sharper than that in (8) from Dalalyan et al. (2017) for any s0, Wn, as log s0 ≤log n and p n/Wn ≤n/Wn. Moreover, when s0 = O(1) and Wn = Θ(n), the rates are log2 n/n and log n(log log n)/n from Theorem 1 and (8), respectively. Comparing the result in Theorem 1 to that in (9) from Guntuboyina et al. (2017), the latter is sharper in that it reduces the factor of (log s0 + log log n) log n + p n/Wn to a single term of log Wn. In the case s0 = O(1) and Wn = Θ(n), the rates are log n(log log n)/n and log n/n from Theorem 1 and (8), respectively, and the latter rate cannot be improved, owing to the minimax lower bound in (10). Similar to our expectation bound in Corollary 1, Guntuboyina et al. (2017) establish inf λ≥0 E∥bθλ −θ0∥2 n ≤Cσ2 s0 + 1 n log en s0 + 1 , (11) for the family of fused lasso estimates {bθλ, λ ≥0}, for large enough n, and a constant C > 0. Like their high probability result in (9), their expectation result in (11) is stated in terms of an infimum over λ ≥0, and does not provide an explicit value of λ that attains the bound. (Inspection of their proofs suggests that it is not at all easy to make such a value of λ explicit.) Meanwhile, Theorem 1 and Corollary 1 have the advantage this choice is made explicit, as in λ = (nWn)1/4. Remark 2 (Comparison to other estimators). Various other estimators obtain comparable estimation error rates. In what follows, all results are stated in the case s0 = O(1). The Potts estimator, defined by replacing the ℓ1 penalty Pn−1 i=1 |θi −θi+1| in (3) with the ℓ0 penalty Pn−1 i=1 1{θi ̸= θi+1}, and denoted say by bθPotts, satisfies a bound ∥bθPotts −θ0∥2 n = O(log n/n) a.s. as shown by Boysen et al. (2009). Wavelet denoising (placing weak conditions on the wavelet basis), denoted by bθwav, satisfies E∥bθwav −θ0∥2 n = O(log2 n/n) as shown by Donoho and Johnstone (1994). Pairing unbalanced Haar (UH) wavelets with a basis selection method, Fryzlewicz (2007) developed an estimator bθUH with E∥bθUH −θ0∥2 n = O(log2 n/n). Though they are not written in this form, the results in Fryzlewicz (2016) imply that his “tail-greedy” unbalanced Haar (TGUH) estimator, bθTGUH, satisfies ∥bθTGUH −θ0∥2 n = O(log2 n/n) with probability tending to 1. Here is an overview of the proof of Theorem 1. The full proof is deferred until the supplement, as with all proofs in this paper. We begin by deriving a basic inequality (stemming from the optimality of the fused lasso estimate bθ in (3)): ∥bθ −θ0∥2 2 ≤2ϵ⊤(bθ −θ0) + 2λ ∥Dθ0∥1 −∥Dbθ∥1 . (12) To precisely control the empirical process term ϵ⊤(bθ −θ0), we consider a decomposition ϵ⊤(bθ −θ0) = ϵ⊤bδ + ϵ⊤bx, where we define bδ = P0(bθ −θ0) and bx = P1bθ. Here P0 is the projection matrix onto the piecewise constant structure inherent in θ0, and P1 = I −P0. More precisely, writing S0 = {t1, . . . , ts0} for the set of ordered changepoints in θ0, we define Bj = {tj + 1, . . . , tj+1}, and denote by 1Bj ∈Rn 4 the indicator of block Bj, for j = 0, . . . , s0. In this notation, P0 is the projection onto the (s0 + 1)dimensional linear subspace R = span{1B0, . . . , 1Bs0 }. The parameter bδ lies in an low-dimensional subspace, which makes bounding the term ϵ⊤bδ relatively easy. Bounding the term ϵ⊤bx requires a much more intricate argument, which is spelled out in the following lemmas. Lemma 1 is a deterministic result ensuring the existence of what we call a lower interpolant bz to bx. This interpolant approximates bx using 2s0 + 2 monotonic segments, and its empirical process term ϵ⊤bz can be finely controlled, as shown in Lemma 2. The residual from the interpolant approximation, denoted bw = bx −bz, has an empirical process term ϵ⊤bw that is more crudely controlled, in Lemma 3. Put together, as in ϵ⊤bx = ϵ⊤bz + ϵ⊤bw, gives the final control on ϵ⊤bx. Before stating Lemma 1, we define the class of vectors containing the lower interpolant. Given any collection of changepoints t1 < . . . < ts0 (and t0 = 0, ts0+1 = n), let M be the set of “piecewise monotonic” vectors z ∈Rn, with the following properties, for each i = 0, . . . , s0: (i) there exists a point t′ i such that ti + 1 ≤t′ i ≤ti+1, and such that the absolute value |zj| is nonincreasing over the segment j ∈{ti + 1, . . . , t′ i}, and nondecreasing over the segment j ∈{t′ i, . . . , ti+1}; (ii) the signs remain constant on the monotone pieces, sign(zti) · sign(zj) ≥0, j = ti + 1, . . . , t′ i, sign(zti+1) · sign(zj) ≥0, j = t′ i + 1, . . . , ti+1. Now we state our lemma that characterizes the lower interpolant. Lemma 1. Given changepoints t0 < . . . < ts0+1, and any x ∈Rn, there exists a vector z ∈M (not necessarily unique), such that the following statements hold: ∥D−S0x∥1 = ∥D−S0z∥1 + ∥D−S0(x −z)∥1, (13) ∥DS0x∥1 = ∥DS0z∥1 ≤∥D−S0z∥1 + 4√s0 √Wn ∥z∥2, (14) ∥z∥2 ≤∥x∥2 and ∥x −z∥2 ≤∥x∥2, (15) where D ∈R(n−1)×n is the difference matrix in (6). We call a vector z with these properties a lower interpolant to x. Loosely speaking, the lower interpolant bz can be visualized by taking a string that lies initially on top of bx, is nailed down at the changepoints t0, . . . ts0+1, and then pulled taut while maintaining that it is not greater (elementwise) than bx, in magnitude. Here “pulling taut” means that ∥Dbz∥1 is made small. Figure 1 provides illustrations of the interpolant bz to bx for a few examples. Note that bz consists of 2s0 +2 monotonic pieces. This special structure leads to a sharp concentration inequality. The next lemma is the primary contributor to the fast rate given in Theorem 1. Lemma 2. Given changepoints t1 < . . . < ts0, there exists constants cI, CI, NI > 0 such that when ϵ ∈Rn has i.i.d. sub-Gaussian components, P sup z∈M |ϵ⊤z| ∥z∥2 > γcI p (log s0 + log log n)s0 log n ! ≤2 exp −CIγ2c2 I(log s0 + log log n) , for any γ > 1, and n ≥NI. Finally, the following lemma controls the residuals, bw = bx −bz. Lemma 3. Given changepoints t1 < . . . < ts0, there exists constants cR, CR > 0 such that when ϵ ∈Rn has i.i.d. sub-Gaussian components, P sup w∈R⊥ |ϵ⊤w| p ∥D−S0w∥1∥w∥2 > γcR(ns0)1/4 ≤2 exp(−CRγ2c2 R √s0), for any γ > 1, where R⊥is the orthogonal complement of R = span{1B0, . . . , 1Bs0 }. 5 G G G G G G G G G G GG G G GGG G G GGG G G G G G G G GG GG G G G G G GGG G G G G G G GG G GG GG GG G GG G GGG G G G G G G G G G G G G G G G G G G G G G GG GG G G GG G G G G G G G G G GGG G G G G G G G G G G G G G G G G G G GG G G G G G G G G G G G G GG G G G G G G G G G G GG G G G G G GG G GG G G G G G G G GG G G G GG G G G G G G G G GGG G GG G G G G G G G G G GGG G GG GG G G G G G G G G G G G G G GG G G G G G G G G G G GG GG GG G G G G G G G G GGG GGG G G GGG GG G GGG G G G G G G G G G G G G G G G GG G G GG G GGG G G G G G GG G G G G G G G G G G G GGG G G G G G G G GG G G GG G G G G GG G G GGG G GG G G G G G G G GGG G G GG GG G G G GGG GG G G G G GG G GG G G GG G G G G G G G G G G G G G G G G GG G G G G G G GGG GG G G G G G G G G GG GG G G G G G G G G G G G G G G G G G G GGGG G G G G GG G GG GGGGG G G G GG G GG G G G G G G G G G G G G G G G G G GG GG G GG G G G G GG GG GG G GG GG GG G GG G GGGG G G GG G G G G G G G G G G G G G GG G G G G G G GGGG G GG G G G G GG G GG G GG G G G G G G G G G G GG G G G G G GG GG G G G G G G G GGG G GG G G G G GG G G G G G G G G G GG G G G G G G G G G GG G G G G G G G G G G G G G GG GG G G G G G G G G GG GG GG G G G G GG G G G G G GG G GG G GG GG G G G G G G GG GG G G G G G G G G GG G G GGG G G G G G GG G G GG G G GG G G G G G G G G G G G GG G G G G G GG G G GG G G G G G GG G G G G GG GG G G G G G G G G G G G GGGG G GG G GG G G G GG G G G G G G 0 200 400 600 800 −5 0 5 10 Index 0 200 400 600 800 −1.5 −0.5 0.0 0.5 1.0 GG G G GG G G G G GG G GG G G G GG G G G G G GGG GG G G G G GG G G GG G GG G G GG GG G GG G G GG G G G G G GG G GGG G G G G GG G G G G G G G G G GGGGG G G GGGG G G GG G G G G G G G G GG G GG G G GG G G GGGG G GG G G G G G G G G G G GGG GGGG GG G G G G GG G GGG G GG G G G GG G G G GGG G G G GG G G G G G G G GGGG G G G G G GG GG G G GG G GGGG G G GG G G G G G G G G G G G G G GG G GG G GG G G G G G G G GGGG G G GG G GGGG GGGG GGG G GG G GGGG GG G G GG G G GGGGG G G G GG G G GG G G G G GG G G GG G GG GG G G GG G G G GG G G GG G G G GG GG G G GGGG GG GGGGGGG G G GGGGGG G G G G G G G G G GG G G G G G GGG G GG GGG G G G G GGG GG G G G G G G GG G G GGG G G GGG G G GG G G G G G G G G G GG G G GGGG G G G G G G G G G G GG GG GGG G G G G GG G GG G G G G GG G G G G G G G G GGGGG G GG G G G G G G G G GG G G G G G G G G G GG GG G G G GG G G G G G G G G G GG G G GG G GG G G G G G G G GG GG G G G GG G G G G G G GG G G G GGG G GGGGG G G G G G G G GG G GGG G G G G G G G G GG G G GGG GG G G G G GG G G G G GG G GG G GGGGG G G G G G G G G G G G G G G G G G G G GG G G G G GGG G GG G G G GG G GG G G GGGG G G GG G G G G G GGG G G G G GG G GG GGG GG G G G G GG G G G G G G G GGG G G GG G G G G G G GGG G G G GGG GG GG G G G G GG G GG G G G G G GG GG G GGGGG GG G G GGG G GG G GGGG GGGGG GG G G G G GG G G G G G GG G G GGG G G G GGG 0 200 400 600 800 −2 0 2 4 6 8 Index 0 200 400 600 800 −3 −2 −1 0 1 Figure 1: The lower interpolants for two examples (in the left and right columns), each with n = 800 points. In the top row, the data y (in gray) and underlying signal θ0 (red) are plotted across the locations 1, . . . , n. Also shown is the fused lasso estimate bθ (blue). In the bottom row, the error vector bx = P1bθ is plotted (blue) as well as the interpolant (black), and the dotted vertical lines (red) denote the changepoints t1, . . . ts0 of θ0. 4 Extension to misspecified models We consider data from the model in (1) but where the mean θ0 is not necessarily piecewise constant (i.e., where s0 is potentially large). Let us define θ0(s) = argmin θ∈Rn ∥θ0 −θ∥2 2 subject to ∥Dθ∥0 ≤s, (16) which we call the best s-approximation to θ0. We now present an extension of Theorem 1. Theorem 2. Assume the data model in (1), with errors ϵi, i = 1, . . . , n i.i.d. from a sub-Gaussian distribution. For any s, consider the best s-approximation θ0(s) to θ0, as in (16), and let Wn(s) be the minimum distance between the s changepoints in θ0(s). Then under a choice of tuning parameter λ = (nWn(s))1/4, the fused lasso estimate bθ in (3) satisfies ∥bθ −θ0∥2 n ≤∥θ0(s) −θ0∥2 n + γ2c s n (log s + log log n) log n + r n Wn(s) ! , (17) with probability at least 1 −exp(−Cγ), for all γ > 1 and n ≥N, where c, C, N > 0 are constants that depend on only σ. Further, if λ is chosen large enough so that ∥Dbθ∥0 ≤s on an event E, then ∥bθ −θ0(s)∥2 n ≤γ2c s n (log s + log log n) log n + λ2 Wn(s) + n λ2 ! , (18) on E intersected with an event of probability at least 1 −exp(−Cγ), for all γ > 1, n ≥N, where c, C, N > 0 are the same constants as above. The first result in (17) in Theorem 2 is a standard oracle inequality. It provides a bound on the error of the fused lasso estimator that decomposes into two parts, the first term being the approximation error, determined by the proximity of θ0(s) to θ0, and second term being the usual bound we would encounter if the mean truly had s changepoints. The second result in (18) in the theorem is a direct bound on the estimation error ∥bθ −θ0(s)∥2 n. We see that the estimation error can be small, apparently regardless of the size of ∥θ0(s) −θ0∥2 n, if we take λ to be large enough for bθ to itself have s changepoints. But the rate worsens as λ grows larger, so implicitly, the proximity of θ0(s) to θ0 does play an role (if θ0 were actually far away from a signal with s changepoints, then we may have to take λ very large to ensure that bθ has s changepoints). 6 Remark 3 (Comparison to other results). Dalalyan et al. (2017); Guntuboyina et al. (2017) also provide oracle inequalities and their results could be adapted to take forms as in Theorem 2. It is not clear to us that previous results on other estimators, such as those from Remark 2, adapt as easily. 5 Extension to exponential family models We consider data y = (y1, . . . , yn) ∈Rn with independent components distributed according to p(yi; θ0,i) = h(yi) exp yiθ0,i −Λ(θ0,i) , i = 1, . . . , n. (19) Here, for each i = 1, . . . , n, the parameter θ0,i is the natural parameter in the exponential family and Λ is the cumulant generating function. As before, in the location model, we are mainly interested in the case in which the natural parameter vector θ0 is piecewise constant (with s0 denoting its number of changepoints, as before). Estimation is now based on penalization of the negative log-likelihood: bθ = argmin θ∈Rn n X i=1 −yiθi + Λ(θi) + λ n X i=1 |θi −θi+1|, (20) Since the cumulant generating function Λ is always convex in exponential families, the above is a convex optimization problem. We present an estimation error bound the present setting. Theorem 3. Assume the data model in (19), with a strictly convex, twice continuously differentiable cumulant generating function Λ. Assume that θ0,i ∈[l, u], i = 1, . . . , n for constants l, u ∈R, and add the constraints θi ∈[l, u], i = 1, . . . , n in the optimization problem in (20). Finally, assume that the random variables yi −E(yi), i = 1, . . . , n obey a sub-Gaussian distribution, with parameter σ. Then under a choice of tuning parameter λ = (nWn)1/4, the exponential family fused lasso estimate bθ in (20) (subject to the additional boundedness constraints) satisfies ∥bθ −θ0∥2 n ≤γ2cs0 n (log s0 + log log n) log n + r n Wn ! , with probability at least 1 −exp(−Cγ), for all γ > 1 and n ≥N, where c, C, N > 0 are constants that depend on only l, u, σ. Remark 4 (Roles of l, u). The restriction of θ0,i and the optimization parameters in (20) to [l, u], for i = 1, . . . , n, is used to ensure that the second derivative of Λ is bounded away from zero. (The same property could be accomplished by instead adding a small squared ℓ2 penalty on θ in (20).) A more refined analysis could alleviate the need for this bounded domain (or extra squared ℓ2 penalty) but we do not pursue this for simplicity. Remark 5 (Sub-Gaussianity in exponential families). When are the random variables yi −E(yi), i = 1, . . . , n sub-Gaussian, in an exponential family model (19)? A simple sufficient condition (not specific to exponential families, in fact) is that these centered variates are bounded. This covers the binomial model yi ∼Bin(k, µ(θ0,i)), where µ(θ0,i) = 1/(1 + e−θ0,i), i = 1, . . . , n, and k is a fixed constant. Hence Theorem 3 applies to binomial data. For Poisson data yi ∼Pois(µ(θ0,i)), where µ(θ0,i) = eθ0,i, i = 1, . . . , n, we now give two options for the analysis. The first is to assume a maximum achieveable count (which may be reasonable in CNV data) and then apply Theorem 3 owing again to boundedness. The second is to invoke the fact that Poisson random variables have sub-exponential (rather than sub-Gaussian) tails, and then use a truncation argument, to show that for the Poisson fused lasso estimate bθ in (20) (under the additional boundedness constraints), with λ = log n(nWn)1/4, ∥bθ −θ0∥2 n ≤γ2cs0 log n n (log s0 + log log n) log n + r n Wn ! , (21) with probability at least 1 −exp(−Cγ) −1/n, for all γ > 1 and n ≥N, where c, C, N > 0 are constants depending on l, u. This is slower than the rate in Theorem 3 by a factor of log n. Remark 6 (Comparison to other results). The results in Dalalyan et al. (2017); Guntuboyina et al. (2017) assume normal errors. It seems believable to us that the results of Dalalyan et al. (2017) could be extended to sub-Gaussian errors and hence exponential family data, in a manner similar to what we have done above in Theorem 3. To us, this is less clear for the results of Guntuboyina et al. (2017), which rely on some technical calculations involving Gaussian widths. It is even less clear to us how results from other estimators, as in Remark 2, extend to exponential family data. 7 6 Approximate changepoint screening and recovery In many applications of changepoint detection, one may be interested in estimation of the changepoint locations in θ0, rather than the mean vector θ0 as a whole. In this section, we show that estimation of the changepoint locations and of θ0 itself are two very closely linked problems, in the following sense: any procedure with guarantees on its error in estimating θ0 automatically has certain approximate changepoint detection guarantees, and not surprisingly, a faster error rate (in estimating θ0) translates into a stronger statement about approximate changepoint detection. We use this general link to prove new approximate changepoint screening results for the fused lasso. We also show that in general a simple post-processing step may be used to discard spurious detected changepoints, and again apply this to the fused lasso to yield new approximate changepoint recovery results. It helps to introduce some additional notation. For a vector θ ∈Rn, we write S(θ) for the set of its changepoint indices, i.e., S(θ) = i ∈{1, . . . , n −1} : θi ̸= θi+1 . Recall, we abbreviate S0 = S(θ0) for the changepoints of the underlying mean θ0. For two discrete sets A, B, we define the metrics d(A|B) = max b∈B min a∈A |a −b| and dH(A, B) = max d(A|B), d(B|A)}. The first metric above can be seen as a one-sided screening distance from B to A, measuring the furthest distance of an element in B to its closest element in A. The second metric above is known as the Hausdorff distance between A and B. Approximate changepoint screening. We present our general theorem on changepoint screening. The basic idea behind the result is quite simple: if an estimator misses a (large) changepoint in θ0, then its estimation error must suffer, and we can use this fact to bound the screening distance. Theorem 4. Let eθ ∈Rn be an estimator such that ∥eθ −θ0∥2 n = OP(Rn). Assume that nRn/H2 n = o(Wn), where, recall, Hn is the minimum gap between adjacent levels of θ0, defined in (5), and Wn is the minimum distance between adjacent changepoints of θ0, defined in (4). Then d S(eθ) | S0 = OP nRn H2n . Remark 7 (Generic setting: no specific data model, and no assumptions on estimator). Importantly, Theorem 4 assumes no data model whatsoever, and treats eθ as a generic estimator of θ0. (Of course, through the statement ∥eθ −θ0∥2 n = OP(Rn), one can see that eθ is random, constructed from data that depends on θ0, but no specific data model is required, nor are any specific properties of eθ, other than its error rate.) This flexibility allows for the result to be applied in any problem setting in which one has control of the error in estimating a piecewise constant parameter θ0 (in some cases this may be easier to obtain, compared to direct analysis of detection properties). A similar idea was used (concurrently and independently) by Fryzlewicz (2016) in the analysis of the TGUH estimator. Combining the above theorem with known error rates for the fused lasso estimator—(7) in the weak sparsity case, and Theorem 1 in the strong sparsity case—gives the following result. Corollary 2. Assume the data model in (1), with errors ϵi, i = 1, . . . , n i.i.d. from a sub-Gaussian distribution. Let Cn = ∥Dθ0∥1, and assume that Hn = ω(n1/6C1/3 n /√Wn). Then the fused lasso estimator bθ in (3) with λ = Θ(n1/3C−1/3 n ) satisfies d S(bθ) | S0 = OP n1/3C2/3 n H2n . (22) Alternatively, assume s0 = O(1), Wn = Θ(n), and Hn = ω( p log n(log log n)/n). Then the fused lasso with λ = Θ(√n) satisfies d S(bθ) | S0 = OP log n(log log n) H2n . (23) Remark 8 (Changepoint detection limit). The restriction Hn = ω( p log n(log log n)/n) for (23) in Corollary 2 is very close to the optimal detection limit of Hn = ω(1/√n): Duembgen and Walther (2008) showed that in Gaussian changepoint model with a single elevated region, and Wn = Θ(n), there is no test for detecting a changepoint that has asymptotic power 1 unless Hn = ω(1/√n). 8 Combining Theorem 4 with (21) gives the following (a similar result holds for the binomial model). Corollary 3. Assume yi ∼Pois(eθ0,i), independently, for i = 1, . . . , n, and assume ∥θ0∥∞= O(1), s0 = O(1), Wn = Θ(n), Hn = ω(log n p log log n/n). Then for the Poisson fused lasso estimator bθ in (20) (subject to appropriate boundedness constraints) with λ = Θ(log n√n), we have d S(bθ) | S0 = OP log2 n(log log n) H2n . Approximate changepoint recovery. We present a post-processing procedure for the estimated changepoints in eθ, to eliminate changepoints of eθ that lie far away from changepoints of θ0. Our procedure is based on convolving eθ with a filter that resembles the mother Haar wavelet. Consider Fi(eθ) = 1 bn i+bn X j=i+1 eθj −1 bn i X j=i−bn+1 eθj, for i = bn, . . . , n −bn, (24) for an integral bandwidth bn > 0. By evaluating the filter Fi(eθ) at all locations i = bn, . . . , n −bn, and retaining only locations at which the filter value is large (in magnitude), we can approximately recovery the changepoints of θ0, in the Hausdorff metric. Theorem 5. Let eθ ∈Rn be such that ∥eθ −θ0∥2 n = OP(Rn). Consider the following procedure: we evaluate the filter in (24) with bandwidth bn at locations in IF (eθ) = n i ∈{bn, . . . , n −bn} : i ∈S(eθ), or i + bn ∈S(eθ), or i −bn ∈S(eθ) o ∪{bn, n −bn}, and define a set of filtered points SF (eθ) = {i ∈IF (eθ) : |Fi(eθ)| ≥τn}, for a threshold level τn. If bn, τn satisfy bn = ω(nRn/H2 n), 2bn ≤Wn, and τn/Hn →ρ ∈(0, 1) as n →∞, then P dH SF (eθ), S0 ≤2bn →1 as n →∞. Note that the set of filtered points |SF (eθ)| in Theorem 5 is not necessarily of a subset of the original set of estimated changepoints S(eθ), but it has the property |SF (eθ)| ≤3|S(eθ)| + 2. We finish with corollaries for the fused lasso. For space reasons, remarks comparing them to related approximate recovery results in the literature are deferred to the supplement. Corollary 4. Assume the data model in (1), with errors ϵi, i = 1, . . . , n i.i.d. from a sub-Gaussian distribution. Let Cn = ∥Dθ0∥1. If we apply the post-processing procedure in Theorem 5 to the fused lasso estimator bθ in (3) with λ = Θ(n1/3C−1/3 n ), bn = ⌊n1/3C2/3 n ν2 n/H2 n⌋≤Wn/2 for a sequence νn →∞, and τn/Hn →ρ ∈(0, 1), then P dH SF (bθ), S0 ≤2n1/3C2/3 n ν2 n H2n →1 as n →∞. (25) Alternatively, assuming s0 = O(1), Wn = Θ(n), if we apply the same post-processing procedure to the fused lasso with λ = Θ(√n), bn = ⌊log n(log log n)ν2 n/H2 n⌋≤Wn/2 for a sequence νn →∞, and τn/Hn →ρ ∈(0, 1), then P dH SF (bθ), S0 ≤2 log n(log log n)ν2 n H2n →1 as n →∞. (26) Corollary 5. Assume yi ∼Pois(eθ0,i), independently, for i = 1, . . . , n, and assume ∥θ0∥∞= O(1), s0 = O(1), Wn = Θ(n). If we apply the post-processing method in Theorem 5 to the Poisson fused lasso estimator bθ in (20) (subject to appropriate boundedness constraints) with λ = Θ(log n√n), bn = ⌊log2 n(log log n)ν2 n/H2 n⌋≤Wn/2 for a sequence νn →∞, and τn/Hn →ρ ∈(0, 1), then P dH SF (bθ), S0 ≤2 log2 n(log log n)ν2 n H2n →1 as n →∞. 7 Summary We gave a new error analysis for the fused lasso, with extensions to misspecified models and data from exponential families. We showed that error bounds for general changepoint estimators lead to approximate changepoint screening results, and after post-processing, approximate recovery results. Acknolwedgements. JS was supported by NSF Grant DMS-1712996. RT was supported by NSF Grant DMS-1554123. 9 References John AD Aston and Claudia Kirch. Evaluating stationarity via change-point alternatives with applications to fMRI data. The Annals of Applied Statistics, 6(4):1906–1948, 2012. Leif Boysen, Angela Kempe, Volkmar Liebscher, Axel Munk, and Olaf Wittich. Consistencies and rates of convergence of jump-penalized least squares estimators. The Annals of Statistics, 37(1): 157–183, 2009. Boris Brodsky and Boris Darkhovski. Nonparametric Methods in Change-Point Problems. Springer, 1993. Ngai Hang Chan, Chun Yip Yau, and Rong-Mao Zhang. Group lasso for structural break time series. Journal of the American Statistical Association, 109(506):590–599, 2014. Jie Chen and Arjun Gupta. Parametric Statistical Change Point Analysis. Birkhauser, 2000. Arnak S. Dalalyan, Mohamed Hebiri, and Johannes Lederer. On the prediction performance of the lasso. Bernoulli, 23(1):552–581, 2017. David L Donoho and Iain M Johnstone. Ideal spatial adaptation by wavelet shrinkage. Biometrika, 81(3):425–455, 1994. Lutz Duembgen and Guenther Walther. Multiscale inference about a density. The Annals of Statistics, 36(4):1758–1785, 2008. Idris Eckley, Paul Fearnhead, and Rebecca Killick. Analysis of changepoint models. In David Barber, Taylan Cemgil, and Silvia Chiappa, editors, Bayesian Time Series Models, chapter 10, pages 205–224. Cambridge University Press, Cambridge, 2011. Piotr Fryzlewicz. Unbalanced Haar technique for nonparametric function estimation. Journal of the American Statistical Association, 102(480):1318–1327, 2007. Piotr Fryzlewicz. Tail-greedy bottom-up data decompositions and fast multiple change-point detection. 2016. URL http://stats.lse.ac.uk/fryzlewicz/tguh/tguh.pdf. Adityanand Guntuboyina, Donovan Lieu, Sabyasachi Chatterjee, and Bodhisattva Sen. Spatial adaptation in trend filtering. arXiv preprint arXiv:1702.05113, 2017. Iain M. Johnstone. Gaussian Estimation: Sequence and Wavelet Models. Cambridge University Press, 2015. Draft version. Seung-Jean Kim, Kwangmoo Koh, Stephen Boyd, and Dimitry Gorinevsky. ℓ1 trend filtering. SIAM Review, 51(2):339–360, 2009. Enno Mammen and Sara van de Geer. Locally adaptive regression splines. The Annals of Statistics, 25(1):387–413, 1997. Oscar Hernan Madrid Padilla, James Sharpnack, James Scott, , and Ryan J. Tibshirani. The DFS fused lasso: Linear-time denoising over general graphs. arXiv preprint arXiv:1608.03384, 2016. Leonid Rudin, Stanley Osher, and Emad Faterni. Nonlinear total variation based noise removal algorithms. Physica D: Nonlinear Phenomena, 60(1–4):259–268, 1992. Gabriel Steidl, Stephan Didas, and Julia Neumann. Splines in higher order TV regularization. International Journal of Computer Vision, 70(3):214–255, 2006. Robert Tibshirani and Pei Wang. Spatial smoothing and hot spot detection for cgh data using the fused lasso. Biostatistics, 9(1):18–29, 2008. Robert Tibshirani, Michael Saunders, Saharon Rosset, Ji Zhu, and Keith Knight. Sparsity and smoothness via the fused Lasso. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 67(1):91–108, 2005. Ryan J. Tibshirani. Adaptive piecewise polynomial estimation via trend filtering. The Annals of Statistics, 42(1):285–323, 2014. 10 | 2017 | 238 |
6,717 | Cross-Spectral Factor Analysis Neil M. Gallagher1,*, Kyle Ulrich2,*, Austin Talbot3, Kafui Dzirasa1,4, Lawrence Carin2 and David E. Carlson5,6 1Department of Neurobiology, 2Department of Electrical and Computer Engineering, 3Department of Statistical Science, 4Department of Psychiatry and Behavioral Sciences, 5Department of Civil and Environmental Engineering, 6Department of Biostatistics and Bioinformatics , Duke University *Contributed equally to this work {neil.gallagher,austin.talbot,kafui.dzirasa, lcarin,david.carlson}@duke.edu Abstract In neuropsychiatric disorders such as schizophrenia or depression, there is often a disruption in the way that regions of the brain synchronize with one another. To facilitate understanding of network-level synchronization between brain regions, we introduce a novel model of multisite low-frequency neural recordings, such as local field potentials (LFPs) and electroencephalograms (EEGs). The proposed model, named Cross-Spectral Factor Analysis (CSFA), breaks the observed signal into factors defined by unique spatio-spectral properties. These properties are granted to the factors via a Gaussian process formulation in a multiple kernel learning framework. In this way, the LFP signals can be mapped to a lower dimensional space in a way that retains information of relevance to neuroscientists. Critically, the factors are interpretable. The proposed approach empirically allows similar performance in classifying mouse genotype and behavioral context when compared to commonly used approaches that lack the interpretability of CSFA. We also introduce a semi-supervised approach, termed discriminative CSFA (dCSFA). CSFA and dCSFA provide useful tools for understanding neural dynamics, particularly by aiding in the design of causal follow-up experiments. 1 Introduction Neuropsychiatric disorders (e.g. schizophrenia, autism spectral disorder, etc.) take an enormous toll on our society [16]. In spite of this, the underlying neural causes of many of these diseases are poorly understood and treatments are developing at a slow pace [2]. Many of these disorders have been linked to a disruption of neural dynamics and communication between brain regions [10, 33]. In recent years, tools such as optogenetics [15, 26] have facilitated the direct probing of causal relationships between neural activity in different brain regions and neural disorders [28]. Planning a well-designed experiment to study spatiotemoral dynamics in neural activity can present a challenge due to the high number of design choices, such as which region(s) to stimulate, what neuron types, and what stimulation pattern to use. In this manuscript we explore how a machine learning approach can facilitate the design of these experiments by developing interpretable and predictive methods. These two qualities are crucial because they allow exploratory experiments to be used more effectively in the design of causal studies. We explore how to construct a machine learning approach to capture neural dynamics from raw neural data during changing behavioral and state conditions. A body of literature in theoretical and experimental neuroscience has focused on linking synchronized oscillations, which are observable in LFPs and EEGs, to neural computation [18, 24]. Such oscillations are often quantified by 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. spectral power, coherence, and phase relationships in particular frequency bands; disruption of these relationships has been observed in neuropsychiatric disorders [20, 33]. There are a number of methods for quantifying synchrony between pairs of brain regions based on statistical correlation between recorded activity in those regions [36, 5], but current methods for effectively identifying such patterns on a multi-region network level, such as Independent Component Analysis (ICA), are difficult to transform to actionable hypotheses. The motivating data considered here are local field potentials (LFPs) recorded from implanted depth electrodes at multiple sites (brain regions). LFPs are believed to reflect the combined local neural activity of hundreds of thousands of neurons [9]. The unique combination of spatial and temporal precision provided by LFPs allows for accurate representation of frequency and phase relationships between activity in different brain regions. Notably, LFPs do not carry the signal precision present in spiking activity from signal neurons; however, LFP signal characteristics are more consistent between animals, meaning that information gleaned from LFPs can be used to understand population level effects, just as in fMRI or EEG studies. Our empirical results further demonstrate this phenomenon. Multi-region LFP recordings produce relatively high-dimensional datasets. Basic statistical tests typically perform poorly in such high dimensional spaces without being directed by prior knowledge due to multiple comparisons, which diminish statistical power [27]. Furthermore, typical multi-site LFP datasets are both “big data” in the sense that there are a large number of high-dimensional measurements and “small data” in the sense that only a few animals are used to represent the entire population. A common approach to address this issue is to describe such data by a small number of factors (e.g. dimensionality reduction), which increases the statistical power when relevant information (e.g. relationship to behavior) is captured in the factors. Many methods for reducing the dimensionality of neural datasets exist [14], but are generally either geared towards spiking data or simple general-purpose methods such as principal components analysis (PCA). Therefore, reducing the dimensionality of multi-channel LFP datasets into a set of interpretable factors can facilitate the construction of testable hypotheses regarding the role of neural dynamics in brain function. The end goal of this analysis is not simply to improve predictive performance, but to design meaningful future causal experiments. By identifying functional and interpretable networks, we can form educated hypotheses and design targeted manipulation of neural circuits. This approach has been previously successful in the field of neuroscience [10]. The choice to investigate networks that span large portions of the brain is critical, as this is the scale at which most clinical and scientific in vivo interventions are applied. Additionally, decomposing complex signatures of brain activity into contributions from individual functional networks (i.e. factors) allows for models and analyses that are more conceptually and technically tractable. Here, we introduce a new framework, denoted Cross-Spectral Factor Analysis (CSFA), which is able to accurately represent multi-region neural dynamics in a low-dimensional manifold while retaining interpretability. The model defines a set of factors, each capturing the power, coherence, and phase relationships for a distribution of neural signals. The learned parameters for each factor correspond to an interpretable representation of the network dynamics. Changes in the relative strengths of each factor can relate neural dynamics to desired variables. Empirically, CSFA discovers networks that are highly predictive of response variables (behavioral context and genotype) for recordings from mice undergoing a behavioral paradigm designed to measure an animal’s response to a challenging experience. We further show that incorporating response variables in a supervised multi-objective framework can further map relevant information into a smaller set of features, as in [30], potentially increasing statistical power. 2 Model Description Here, we describe a model to extract a low-dimensional “brain state” representation from multichannel LFP recordings. The states in this model are defined by a set of factors, each of which describes a specific distribution of observable signals in the network. The data is segmented into time windows composed of N observations, equally spaced over time, from C distinct brain regions. We let window w be represented by Y w = [yw 1 , . . . , yw N] 2 RC⇥N (see Fig 1[left]). N is determined by the sampling rate and the duration of the window. The complete dataset is represented by the set Y = {Y w}w=1,...,W . Window lengths are typically chosen to be 1-5 seconds, as this temporal resolution is assumed to be sufficient to capture the broad changes in brain state that we are interested 2 !"#$ !" !"%$ !"%& zw sw1 sw2 . . . swL yw 1 yw 2 . . . yw N ✓ φ W Figure 1: [left] Example of multi-site LFP data from seven brain regions, separated into time windows. [right] Visual description of the parameters of the dCSFA model. yw c : Signal from channel c in window w. zw: Task-relevant side information. sw`: Score for factor ` in window w. ✓: Parameters describing CSFA model. φ: Parameters of side-information classifier. Shaded regions indicate observed variables and clear represent inferred variables. in. We assume that window durations are short enough to make the signal approximately stationary. This assumption, while only an approximation, is appropriate because we are interested in brain state dynamics that occur on a relatively long time scale (i.e. multiple seconds). Therefore, within a single window of LFP data the observation may be represented by a stationary Gaussian process (GP). It is important to distinguish between signal dynamics, which occur on a time scale of milliseconds, and brain state dynamics, which are assumed to occur over a longer time scale. In the following, the Cross-Spectral Mixture kernel [34], a key step in the proposed model, is reviewed in Section 2.1. The formulation of the CSFA model is given in Section 2.2. Model inference is discussed in Section 2.3. In Section 2.4, a joint CSFA and classification model called discriminative CSFA (dCSFA) is introduced. Supplemental Section A discusses additional related work. Supplemental Section B gives additional mathematical background on multi-region Gaussian processes. Supplemental Section C offers an alternative formulation of the CSFA model that models the observed signal as the real component of a complex signal. For efficient calculations, computational approximations for the CSFA model are described in Supplemental Section D. 2.1 Cross-Spectral Mixture Kernel Common methods to characterize spectral relationships within and between signal channels are the power-spectral density (PSD) and cross-spectral density (CSD), respectively [29]. A set of multichannel neural recordings may be characterized by the set of PSDs for each channel and CSDs for each pair of channels, resulting in a quadratic increase in the number of parameters with the number of channels observed. In order to counteract the issues arising from many multiple comparisons, neuroscientists typically preselect channels and frequencies of interest before testing experimental hypotheses about spectral relationships in neural datasets. Instead of directly calculating each of these parameters, we use a modeling approach to estimate the PSDs and CSDs over all channels and frequency bands by using the Cross-Spectral Mixture (CSM) covariance kernel [34]. In this way we effectively reduce the number of parameters required to obtain a good representation of the PSDs and CSDs for a multi-site neural recording. The CSM multi-output kernel is given by KCSM(t, t0; Bq, µq, ⌫q) = Real ⇣PQ q=1 Bqkq(t, t0; µq, ⌫q) ⌘ , (1) where the matrix KCSM 2 CC⇥C. This is the real component of a sum of Q separable kernels. Each of these kernels is given by the combination of a cross-spectral density matrix, Bq 2 CC⇥C, and a stationary function of two time points that defines a frequency band, kq(·). Representing ⌧= t −t0, as all kernels used here are stationary and depend only on the difference between the two inputs, the frequency band for each spectral kernel is defined by a spectral Gaussian kernel, kq(⌧; µq, ⌫q) = exp $ −1 2⌫q⌧2 + jµq⌧ % , (2) 3 which is equivalent to a Gaussian distribution in the frequency domain with variance ⌫q, centered at µq. The matrix Bq is a positive semi-definite matrix with rank R. (Note: The cross-spectral density matrix Bq is also known as coregionalization matrix in spatial statistics [4]). Keeping R small for the coregionalization matrices ameliorates overfitting by reducing the overall parameter space. This relationship is maintained and Bq is updated by storing the full matrix as the outer product of a tall matrix with itself: Bq = ˜Bq ˜B† q, ˜Bq 2 C ⇥R. (3) Phase coherence between regions is given by the magnitudes of the complex off-diagonal entries in Bq. The phase offset is given by the complex angle of those off-diagonal entries. 2.2 Cross-Spectral Factor Analysis Our proposed model creates a low-dimensional manifold by extending the CSM framework to a multiple kernel learning framework [17]. Let tn represent the time point of the nth sample in the window and t represent [t1, . . . , tN]. Each window of data is modeled as yw n = f w(tn) + ✏w n , ✏w n ⇠N(0, ⌘−1IC), (4) F w(t) = L X l=1 swlF l w(t), F w(t) = [f w(t1), . . . , f w(tN)], (5) where F w(t) is represented as a linear combination functions drawn from L latent factors, given by {F l w(t)}L l=1. The l-th latent function is drawn independently for each task according to F l w(t) ⇠GP(0, KCSM(·; ✓l)), (6) where ✓l is the set of parameters associated with the lth factor (i.e. {Bl q, µl q, ⌫l q}Q q=1). The GP here represents a multi-output Gaussian process due to the cross-correlation structure between the brain regions, as in [32]. Additional details on the multi-output Gaussian process formulation can be found in Supplemental Section B. In CSFA, the latent functions {F l w(t)}L l=1 are not the same across windows; rather, the underlying cross-spectral content (power, coherence, and phase) of the signals is shared and the functional instantiation differs from window to window. A marginalization of all latent functions results in a covariance kernel that is a weighted superposition of the kernels for each latent factor, which is given mathematically as Y w ⇠GP(0, KCSF A(·; ⇥, w)) (7) KCSF A(⌧; ⇥, w) = L X l=1 s2 wlKCSM(⌧; ✓l) + ⌘−1δ⌧IC. (8) Here, ⇥= {✓1, . . . , ✓L} is the set of parameters associated with all L factors and δ⌧represents the Dirac delta function and constructs the additive Gaussian noise. The use of this multi-output GP formulation within the CSFA kernel means that the latent variables can be directly integrated out, facilitating inference. To address multiplicative non-identifiability, the maximum power in any frequency band is limited for each CSM kernel (i.e. max(diag(KCSM(0; ✓l))) = 1 for all l). In this way, the factor scores squared, s2 wl, may now be interpreted approximately as the variance associated with factor l in window w. 2.3 Inference A maximum likelihood formulation for the zero-mean Gaussian process given by Eq. 7 is used to learn the factor scores {sw}W w=1 and CSM kernel parameters ⇥, given the full dataset Y. If we let ⌃w CSF A 2 CNC⇥NC be the covariance matrix obtained from the kernel KCSF A(·; ⇥, w) evaluated 4 at time points t, we have ({sw}W w=1, ⇥) = arg max { ˜ sw}W w=1, ˜⇥ L(Y; { ˜ sw}W w=1, ˜⇥) (9) L(Y; {sw}W w=1, ⇥) = W Y w=1 N(vec(Y w); 0, ⌃w CSF A), (10) where vec(·) gives a column-wise vectorization of its matrix argument, and W is the total number of windows. As is common with many Gaussian processes, an analytic solution to maximize the log-likelihood does not exist. We resort to a batch gradient descent algorithm based on the Adam formulation [22]. Fast calculation of gradients is accomplished via a discrete Fourier transform (DFT) approximation for the CSM kernel [34]. This approximation alters the formulation given in Eq. 7 slightly; the modified form is given in Supplemental Section D. The hyperparameters of the model are the number of factors (L), the number of spectral Gaussians per factor (Q), the rank of the coregionalization matrix (R), and the precision of the additive white noise (⌘). In applications where the generative properties of the model are most important, hyperparameters should be chosen using cross-validation based on hold-out log-likelihood. In the results described below, we emphasize the predictive aspects of the model, so hyperparameters are chosen by cross-validating on predictive performance. In order to maximize the generalizability of the model to a population, validation and test sets are composed of data from complete animals/subjects that were not included in the training set. In all of the results described below, models were trained for 500 Adam iterations, with a learning rate of 0.01 and other learning parameters set to the defaults suggested in [22]. The kernel parameters ⇥were then fixed at their values from the 500th iteration and sufficient additional iterations were carried out until the factor scores, {sw}W w=1, reached approximate convergence. Corresponding factor scores are learned for validation and test sets in a similar manner, by initializing the kernel parameters ⇥with those learned from the training set and holding them fixed while learning factor scores to convergence as outlined above. Normalization to address multiplicative identifiability, as described in Section 2.2, was applied to each model after all iterations were completed. 2.4 Discriminative CSFA We often wish to discover factors that are associated with some side information (e.g. behavioral context). More formally, given a set of labels, {z1, . . . , zW }, we wish to maximize the ability of the factor scores, {s1, . . . , sw}, to predict the labels. This is accomplished by modifying the objective function to include a second term related to the performance of a classifier that takes the factor scores as regressors. We term this modified model discriminative CSFA, or dCSFA. We choose the cross-entropy error of a simple logistic regression classifier to demonstrate this, giving {{sw}W w=1, ⇥} = arg max { ˜ sw}W w=1, ˜⇥ L(Y; { ˜ sw}W w=1, ˜⇥) + λ PW w=1 P1 k=0 1zw=k log ⇣ exp(φk ˜ sw) P0 k exp(φ0 k ˜ sw) ⌘ . (11) The first term of the RHS of (11) quantifies the generative aspect of how well the model fits the data (the log-likelihood of Section 2.2). The second term is the loss function of classification. Here λ is a parameter that controls the relative importance of the classification loss function to the generative likelihood. It is straightforward to include alternative classifiers or side information. For example, when there are multiple classes it is desirable to set the loss function to be the cross entropy loss associated with multinomial logistic regression [23], which only involves modifying the second term of the RHS of (11). In this dCSFA formulation, λ and the other hyperparameters are chosen based on cross-validation of the predictive accuracy of the factors, to produce factors that are predictive as possible in a new dataset from other members of the population. The number of factors included in the classification and corresponding loss function can be limited to a number less than L. One application of dCSFA is to find a few factors predictive of side information, embedded in a full set of factors that describe a dataset [30]. In this way, the predictive factors maintain the desirable properties of a generative model, such as robustness to missing regressors. We assume that in many applications of dCSFA, the descriptive properties of the remaining factors matter only in that they provide a larger generative model to embed the discriminative factors in. In applications where the descriptive properties of the 5 Open Field Homecage Tail Suspension Test Open Field Homecage Tail Suspension Test Day 1 Day 2 Open Field Homecage Tail Suspension Test Figure 2: Factor scores learned in two different dCSFA models. Data shown corresponds to the test set described in 3.2. Score trajectories are smoothed over time for visualization. Bold lines give score trajectory averaged over all 6 mice. (top) Scores for three factors that track with behavioral context over a two-day experiment. (bottom) Scores for a single factor that tracks with genotype. remaining factors are of major importance, hyperparameters can instead be cross-validated using the objective function from (11) applied to data from new members of the population. 2.5 Handling Missing Channels Electrode and surgical failures resulting in unusable data channels are common when collecting the multi-channel LFP datasets that motivate this work. Fortunately, accounting for missing channels is straightforward within the CSFA model by taking advantage of the marginal properties of multivariate Gaussian distributions. This is a standard approach in the Gaussian process literature [31]. Missing channels are handled by marginalizing the missing channel out of the covariance matrix in Eq. 7. This mechanism also allows for the application of CSFA to multiple datasets simultaneously, as long as there is some overlap in the set of regions recorded in each dataset. Similarly, the conditional properties of multivariate Gaussian distributions provide a mechanism for simulating data from missing channels. This is accomplished by finding the conditional covariance matrix for the missing channels given the original matrix (Eq. 8) and the recorded data. 3 Results 3.1 Synthetic Data In order to demonstrate that CSFA is capable of accurately representing the true spectral characteristics associated with some dataset, we tested it on a synthetic dataset. The synthetic dataset was simulated from a CSFA model with pre-determined kernel parameters and randomly generated score values at each window. In this way there is a known covariance matrix associated with each window of the dataset. Details of the model used to generate this data are described in Supplemental Section E and Supplemental Table 2. The cross-spectral density was learned for each window of the dataset by training a randomly initialized CSFA model and the KL-divergence compared to the true crossspectral density was computed. Hyperparameters for the learned CSFA model were chosen to match the model from which the dataset was generated. 6 A classical issue with many factor analysis approaches, such as probabilistic PCA [7], is the assumption of a constant covariance matrix. To emphasize the point that our method captures dynamics of the covariance structure, we compare the results from CSFA to the KL-divergence from a constant estimate of the covariance matrix over all of the windows, as is assumed in traditional factor analysis approaches. CSFA had an average divergence of 5466.8 (std. dev. of 49.5) compared to 7560.2 (std. dev. of 17.9) for the mean estimate. These distributions were significantly different (p-value < 2 ⇥10−308, Wilcoxon rank sum test). This indicates that, on average, CSFA provides a much better estimate of the covariance matrix associated with a window in this synthetic dataset compared to the classical constant covariance assumption. 3.2 Mouse Data We collected a dataset of LFPs recorded from 26 mice from two different genetic backgrounds (14 wild type, 12 CLOCK∆19). The CLOCK∆19 line of mice have been proposed as a model of bipolar disorder [35]. There are 20 minutes of recordings for each mouse: 5 minutes while the mouse was in its home cage, 5 minutes during open field exploration, and 10 minutes during a tail suspension test. The tail suspension test is used as an assay of response to a challenging experience [1]. Eleven distinct brain regions were recorded: Nucleus Accumbens Core, Nucleus Accumbens Shell, Basolateral Amygdala, Infralimbic Cortex, Mediodorsal Thalamus, Prelimbic Cortex, Ventral Tegmental Area, Lateral Dorsal Hippocampus, Lateral Substantia Nigra Pars Compacta, Medial Dorsal Hippocampus, and Medial Substantia Nigra Pars Compacta. Following previous applications [34], the window length was set to 5 seconds and data was downsampled to 250 Hz. We learned CSFA and dCSFA models in two separate classification tasks: prediction of animal genotype and of the behavioral context of the recording (i.e. home cage, open field, or tail-suspension test). Three mice of each genotype were held out as a testing set. We used a 5-fold cross-validation approach to select the number of factors, L, the number of spectral Gaussians per factor (i.e. factor complexity), Q, the rank of the cross-spectral density matrix, R, and the additive noise precision, ⌘. For each validation set, CSFA models were trained for each combination of L 2 {10, 20, 30}, Q 2 {3, 5, 8}, R 2 {1, 2}, ⌘2 {5, 20}, and the model giving the best classification performance on the validation set was selected for testing (see table 1). The hyperparameters above for each dCSFA model were chosen based on the best average performance over all validation sets using CSFA. The parameters for the dCSFA model corresponding to each validation set were initialized from a trained CSFA model for that validation set with the chosen hyperparameters. 3 factors from the CSFA model were chosen to be included in the classifier component of the dCSFA model. For the binary classification task, the 3 factors with the lowest p-value in a Wilcoxon rank-sum test between scores associated with each class were chosen. For the multinomial classification task, a rank-sum test was performed between all pairs of classes, and the 3 factors with the lowest average log p-value were chosen. The λ hyperparameter for dCSFA was chosen from {1, 0.1, 0.01} based on validation set classification performance. Features Genotype (AUROC) Behavioral Context (% Accuracy) FFT + PCA 0.632 [0.012] 85.5 [0.2] Welch + PCA 0.922 [0.013] 87.5 [1.5] CSFA 0.685 [0.067] 82.8 [0.9] dCSFA 0.731 [0.064] 83.1 [0.6] dCSFA-3 0.741 [0.099] 70.7 [1.9] Welch + PCA-3 0.528 [0.045] 54.7 [0.4] Table 1: Classification performance. For genotype, logistic regression with an L1 regularization penalty was used. For behavioral context, multinomial logistic regression with an L2 penalty was used. All results are reported as a mean, with standard error included in brackets. FFT+PCA: PCA applied to magnitude of FFT. Welch+PCA: PCA applied to Welch’s estimated spectral densities. CSFA: CSFA factor scores. dCSFA: All dCSFA factor scores. dCSFA-3: Scores for 3 discriminative dCSFA factors. Welch + PCA-3: PCA applied to estimated spectral densities; 3 components selected using the criteria described in 3.2. 7 Figure 3: Visual representations of a dCSFA factor. [right] Relative power-spectral (diagonal) and cross-spectral (off-diagonal) densities associated with the covariance function defining a single factor. Amplitude reported for each frequency within a power or cross-spectral density is normalized relative to the total sum of powers or coherences, respectively, at that frequency for all factors. [left] Simplified representation of the same factor. Each ’wedge’ corresponds to a single brain region. Colored regions along the ‘hub’ of the circle represent frequency bands with significant power within that corresponding region. Colored ‘spokes’ represent frequency bands with significant coherence between the corresponding pair of regions. We compare our CSFA and dCSFA models to two-stage modeling approaches that are representative of techniques commonly used in the analysis of neural oscillation data [21]. Each of these approaches begins with a method for estimating the spectral content of a signal, followed by PCA to reduce dimensionality (see Supplemental Section F for details). CSFA models were trained as described in Section 2.3; dCSFA models were initialized as reported above and trained for an additional 500 iterations. Figure 2 demonstrates that the predictive features learned from dCSFA clearly track the different behavioral paradigms. If we constrain our classifier to use only a few of the learned features, dCSFA features significantly outperform features from the best comparison method. Compressing relevant predictive information into only a handful of factors here is desirable for a number of reasons; it reduces the necessary number of statistical tests for testing hypotheses and also offers a more interpretable situation for neuroscientists. The dCSFA factor that is most strongly associated with genotype is visualized in Figure 3. 3.3 Visualization The models generated by CSFA are easily visualized and interpreted in a way that allows neuroscientists to generate testable hypotheses related to brain network dynamics. Figure 3 shows one way to visualize the latent factors produced by CSFA. The upper-right section shows the power and cross-spectra associated with the CSM kernel from a single factor. Together these plots define a distribution of multi-channel signals that are described by this one factor. Plots along the diagonal give power spectra for each of the 11 brain regions included in the dataset. The off diagonal plots show the cross spectra with the associated phase offset in orange. The phase offset implies that oscillations may originate in one region and travel to another, given the assumption that another (observed or unobserved) region is not responsible for the observed phase offset. These assumptions are not true in general, so we emphasize that their use is in hypothesis generation. 8 The circular plot on the bottom-left of Figure 3 visualizes the same factor in an alternative concise way. Around the edge of the circle are the names of the brain regions in the data set and a range of frequencies modeled for each region. Colored bands along the outside of the circle indicate that spectral power in the corresponding region and frequency bands is above a threshold value. Similarly, lines connecting one region to another indicate that the coherence between the two regions is above the same threshold value at the corresponding frequency band. Given the assumption that coherence implies communication between brain regions [5], this plot quickly shows which brain regions are believed to be communicating and at what frequency band in each functional network. 4 Discussion and Conclusion Multi-channel LFP datasets have enormous potential for describing brain network dynamics at the level of individual regions. The dynamic nature and high-dimensionality of such datasets makes direct interpretation quite difficult. In order to take advantage of the information in such datasets, techniques for simplifying and detecting patterns in this context are necessary. Currently available techniques for simplifying these types of high dimensional datasets into a manageable size (e.g. ICA, PCA) generally do not offer sufficient insight into the types of questions that neuroscientists are interested in. More specifically, there is evidence that neural networks produce oscillatory patterns in LFPs as signatures of network activation [18]. Methods such as CSFA, which identify and interpret these signatures at a network level, are needed to form reasonable and testable hypotheses about the dynamics of whole-brain networks. In this work, we show that CSFA detects signatures of multi-region network activity that explain variables of interest to neuroscientists (i.e. animal genotype, behavioral context). The proposed CSFA model explicitly targets known relationships of LFP data to map the highdimensional data to a low-dimensional set of features. In direct contrast to many other dimensionality reduction methods, each factor maintains a high degree of interpretability, particularly in neuroscience applications. We emphasize that CSFA captures both spectral power and coherence across brain regions, both of which have been associated with neural information processing within the brain [19]. It is important to note that this model finds temporal precedence in observed signals, rather than true causality; there are many examples where temporal precedence does not imply true causation. Therefore, we emphasize that CSFA facilitates the generation of testable hypothesis rather than demonstrating causal relationships by itself. In addition, CSFA can suggest ways of manipulating network dynamics in order to directly test their role in mental processes. Such experiments might involve closed-loop stimulation using optogenetic or transcranial magnetic stimulation to manipulate the complex temporal dynamics of neural activity captured by the learned factors. Future work will focus on making these approaches broadly applicable, computationally efficient, and reliable. It is worth noting that CSFA describes the full-cross spectral density of the data, but that there are additional signal characteristics of interest to neuroscientists that are not described, such as cross-frequency coupling [24]; another possible area of future work is the development of additional kernel formulations that could capture these additional signal characteristics. CSFA will also be generalized to include other measurement modalities (e.g. neural spiking, fMRI) to create joint generative models. In summary, we believe that CSFA fulfills three important criteria: 1. It consolidates high-dimensional data into an easily interpretable low-dimensional space. 2. It adequately represents the raw observed data. 3. It retains information from the original dataset that is relevant to neuroscience researchers. All three of these characteristics are necessary to enable neuroscience researchers to generate trustworthy hypotheses about a network-level brain dynamics. Acknowledgements In working on this project L.C. received funding from the DARPA HIST program; K.D., L.C., and D.C. received funding from the National Institutes of Health by grant R01MH099192-05S2; K.D received funding from the W.M. Keck Foundation. 9 References [1] H. M. Abelaira, G. Z. Reus, and J. Quevedo. Animal models as tools to study the pathophysiology of depression. Revista Brasileira de Psiquiatria, 2013. [2] H. Akil, S. Brenner, E. Kandel, K. S. Kendler, M.-C. King, E. Scolnick, J. D. Watson, and H. Y. Zoghbi. The future of psychiatric research: genomes and neural circuits. Science, 2010. [3] M. A. Alvarez, L. Rosasco, and N. D. Lawrence. Kernels for Vector-Valued Functions: a Review. Foundations and Trends in Machine Learning, 2012. [4] S. Banerjee, B. P. Carlin, and A. E. Gelfand. Hierarchical modeling and analysis for spatial data. Crc Press, 2014. [5] A. M. Bastos and J.-M. Schoffelen. A Tutorial Review of Functional Connectivity Analysis Methods and Their Interpretational Pitfalls. Front Syst Neurosci 2016. [6] M. J. Beal. Variational Algorithms for Approximate Bayesian Inference. PhD thesis, University of London, United Kingdom, 2003. [7] C. M. Bishop. Pattern recognition. Machine Learning, 2006. [8] D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent Dirichlet Allocation. Journal of Machine Learning Research, 2003. [9] G. Buzsáki, C. A. Anastassiou, and C. Koch. The origin of extracellular fields and currents—EEG, ECoG, LFP and spikes. Nature Reviews Neuroscience, 2012. [10] D. Carlson, L. K. David, N. M. Gallagher, M.-A. T. Vu, M. Shirley, R. Hultman, J. Wang, C. Burrus, C. A. McClung, S. Kumar, L. Carin, S. D. Mague, and K. Dzirasa. Dynamically Timed Stimulation of Corticolimbic Circuitry Activates a Stress-Compensatory Pathway. Biological Psychiatry 2017. [11] R. Caruana. Multitask Learning. Machine Learning, 1997. [12] B. Chen, G. Polatkan, G. Sapiro, D. Blei, D. Dunson, and L. Carin. Deep learning with hierarchical convolutional factor analysis. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2013. [13] Y. Cho and L. K. Saul. Kernel methods for deep learning. In Advances in Neural Information Processing Systems, 2009. [14] J. P. Cunningham and M. Y. Byron. Dimensionality reduction for large-scale neural recordings. Nature Neuroscience, 2014. [15] K. Deisseroth. Optogenetics. Nature Methods, 2011. [16] W. W. Eaton, S. S. Martins, G. Nestadt, O. J. Bienvenu, D. Clarke, and P. Alexandre. The burden of mental disorders. Epidemiologic reviews, 2008. [17] M. Gönen and E. Alpaydın. Multiple kernel learning algorithms. Journal of Machine Learning Research, 2011. [18] A. Z. Harris and J. A. Gordon. Long-Range Neural Synchrony in Behavior. Annual Review of Neuroscience, 2015. [19] K. D. Harris and A. Thiele. Cortical state and attention. Nature Reviews Neuroscience, 2011. [20] R. Hultman, S. D. Mague, Q. Li, B. M. Katz, N. Michel, L. Lin, J. Wang, L. K. David, C. Blount, R. Chandy, and others. Dysregulation of prefrontal cortex-mediated slow-evolving limbic dynamics drives stress-induced emotional pathology. Neuron, 2016. [21] D. Iacoviello, A. Petracca, M. Spezialetti, and G. Placidi. A real-time classification algorithm for EEGbased BCI driven by self-induced emotions. Computer Methods and Programs in Biomedicine, 2015. [22] D. P. Kingma and J. Ba. Adam: A Method for Stochastic Optimization. arXiv:1412.6980 [cs] 2014. arXiv: 1412.6980. [23] C. Kwak and A. Clayton-Matthews. Multinomial logistic regression. Nursing research, 2002. [24] J. E. Lisman and O. Jensen. The Theta-Gamma Neural Code. Neuron 2013. [25] J. Mairal, P. Koniusz, Z. Harchaoui, and C. Schmid. Convolutional kernel networks. In Advances in Neural Information Processing Systems, 2014. [26] G. Miesenböck. Genetic methods for illuminating the function of neural circuits. Current Opinion in Neurobiology, 2004. [27] M. D. Moran. Arguments for rejecting the sequential Bonferroni in ecological studies. Oikos, 2003. [28] E. J. Nestler and S. E. Hyman. Animal models of neuropsychiatric disorders. Nature Neuroscience, 2010. [29] A. V. Oppenheim. Discrete-time signal processing. Pearson Education India, 1999. 10 [30] R. Raina, Y. Shen, A. Mccallum, and A. Y. Ng. Classification with hybrid generative/discriminative models. In Advances in Neural Information Processing Systems, 2004. [31] C. E. Rasmussen and C. K. I. Williams. Gaussian Processes for Machine Learning. the MIT Press, 2006. [32] Y. W. Teh, M. Seeger, and M. I. Jordan. Semiparametric Latent Factor Models. AISTATS, 2005. [33] P. J. Uhlhaas, C. Haenschel, D. Nikoli´c, and W. Singer. The role of oscillations and synchrony in cortical networks and their putative relevance for the pathophysiology of schizophrenia. Schizophr Bull 2008. [34] K. R. Ulrich, D. E. Carlson, K. Dzirasa, and L. Carin. GP Kernels for Cross-Spectrum Analysis. Advances in Neural Information Processing Systems, 2015. [35] J. van Enkhuizen, A. Minassian, and J. W. Young. Further evidence for clockδ19 mice as a model for bipolar disorder mania using cross-species tests of exploration and sensorimotor gating. Behavioural Brain Research, 2013. [36] H. E. Wang, C. G. Bénar, P. P. Quilichini, K. J. Friston, V. K. Jirsa, and C. Bernard. A systematic framework for functional connectivity measures. Front. Neurosci., 2014. [37] P. Welch. The use of fast Fourier transform for the estimation of power spectra: A method based on time averaging over short, modified periodograms. IEEE Transactions on Audio and Electroacoustics 1967. [38] A. G. Wilson, E. Gilboa, A. Nehorai, and J. P. Cunningham. Fast Kernel Learning for Multidimensional Pattern Extrapolation. Advances in Neural Information Processing Systems, 2014. [39] A. Wilson and R. Adams. Gaussian process kernels for pattern discovery and extrapolation. In Proceedings of the 30th International Conference on Machine Learning (ICML-13), 2013. [40] M. Zhou, H. Chen, L. Ren, G. Sapiro, L. Carin, and J. W. Paisley. Non-parametric Bayesian dictionary learning for sparse image representations. In Advances in Neural Information Processing Systems, 2009. 11 | 2017 | 239 |
6,718 | Kernel functions based on triplet comparisons Matthäus Kleindessner⇤ Department of Computer Science Rutgers University Piscataway, NJ 08854 mk1572@cs.rutgers.edu Ulrike von Luxburg Department of Computer Science University of Tübingen Max Planck Institute for Intelligent Systems, Tübingen luxburg@informatik.uni-tuebingen.de Abstract Given only information in the form of similarity triplets “Object A is more similar to object B than to object C” about a data set, we propose two ways of defining a kernel function on the data set. While previous approaches construct a lowdimensional Euclidean embedding of the data set that reflects the given similarity triplets, we aim at defining kernel functions that correspond to high-dimensional embeddings. These kernel functions can subsequently be used to apply any kernel method to the data set. 1 Introduction Assessing similarity between objects is an inherent part of many machine learning problems, be it in an unsupervised task like clustering, in which similar objects should be grouped together, or in classification, where many algorithms are based on the assumption that similar inputs should produce similar outputs. In a typical machine learning setting one assumes to be given a data set D of objects together with a dissimilarity function d (or, equivalently, a similarity function s) quantifying how “close” objects are to each other. In recent years, however, a new branch of the machine learning literature has emerged that relaxes this scenario (see the next paragraph and Section 3 for references). Instead of being able to evaluate d itself, we only get to see a collection of similarity triplets of the form “Object A is more similar to object B than to object C”, which claims that d(A, B) < d(A, C). The main motivation for this relaxation comes from human-based computation: It is widely accepted that humans are better and more reliable at providing similarity triplets, which means assessing similarity on a relative scale, than at providing similarity estimates on an absolute scale (“The similarity between objects A and B is 0.8”). This can be seen as a special case of the general observation that humans are better at comparing two stimuli than at identifying a single one (Stewart et al., 2005). For this reason, whenever one is lacking a meaningful dissimilarity function that can be evaluated automatically and has to incorporate human expertise into the machine learning process, collecting similarity triplets (e.g., via crowdsourcing) may be an appropriate means. Given a data set D and similarity triplets for its objects, it is not immediately clear how to solve machine learning problems on D. A general approach is to construct an ordinal embedding of D, that is to map objects to a Euclidean space of a small dimension such that the given triplets are preserved as well as possible (Agarwal et al., 2007; Tamuz et al., 2011; van der Maaten and Weinberger, 2012; Terada and von Luxburg, 2014; Amid and Ukkonen, 2015; Heim et al., 2015; Amid et al., 2016; Jain et al., 2016). Once such an ordinal embedding has been constructed, one can solve a problem on D by solving it on the embedding. Only recently, algorithms have been proposed for solving various specific problems directly without constructing an ordinal embedding as an intermediate step (Heikinheimo and Ukkonen, 2013; Kleindessner and von Luxburg, 2017). With this paper we provide another generic means for solving machine learning problems based on similarity triplets that is different from ⇤Work done while being a PhD student at the University of Tübingen. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. the ordinal embedding approach. We define two data-dependent kernel functions on D, corresponding to high-dimensional embeddings of D, that can subsequently be used by any kernel method. Our proposed kernel functions measure similarity between two objects in D by comparing to which extent the two objects give rise to resembling similarity triplets. The intuition is that this quantifies the relative difference in the locations of the two objects in D. Experiments on both artificial and real data show that this is indeed the case and that the similarity scores defined by our kernel functions are meaningful. Our approach is appealingly simple, and other than ordinal embedding algorithms our kernel functions are deterministic and parameter-free. We observe them to run significantly faster than well-known embedding algorithms and to be ideally suited for a landmark design. Setup Let X be an arbitrary set and d : X ⇥X ! R+ 0 be a symmetric dissimilarity function on X: a higher value of d means that two elements of X are more dissimilar to each other. The terms dissimilarity and distance are used synonymously. To simplify presentation, we assume that for all triples of distinct objects A, B, C 2 X either d(A, B) < d(A, C) or d(A, B) > d(A, C) is true. Note that we do not require d to be a metric. We formally define a similarity triplet as binary answer to a dissimilarity comparison d(A, B) ?< d(A, C). (1) We refer to A as the anchor object. A similarity triplet can be incorrect, meaning that it claims a positive answer to the comparison (1) although in fact the negative answer is true. In the following, we deal with a finite data set D = {x1, . . . , xn} ✓X and collections of similarity triplets that are encoded as follows: an ordered triple of distinct objects (xi, xj, xk) means d(xi, xj) < d(xi, xk). A collection of similarity triplets is the only information that we are given about D. Note that such a collection does not necessarily provide an answer to every possible dissimilarity comparison (1). 2 Our kernel functions Assume we are given a collection S of similarity triplets for the objects of D. Similarity triplets in S can be incorrect, but for the moment assume that contradicting triples (xi, xj, xk) and (xi, xk, xj) cannot be present in S at the same time. We will discuss how to deal with the general case below. Kernel function k1 Our first kernel function is based on the following idea: We fix two objects xa and xb. In order to compute a similarity score between xa and xb we would like to rank all objects in D with respect to their distance from xa and also rank them with respect to their distance from xb, and take a similarity score between these two rankings as similarity score between xa and xb. One possibility to measure similarity between rankings is given by the famous Kendall tau correlation coefficient (Kendall, 1938), which is also known as Kendall’s ⌧: for two rankings of n items, Kendall’s ⌧between the two rankings is the fraction of concordant pairs of items minus the fraction of discordant pairs of items. Here, a pair of two items i1 and i2 is concordant if i1 ≺i2 or i1 ≻i2 according to both rankings, and discordant if it satisfies i1 ≺i2 according to one and i1 ≻i2 according to the other ranking. Formally, a ranking is represented by a permutation σ : {1, . . . , n} ! {1, . . . , n} such that σ(i) 6= σ(j), i 6= j, and σ(i) = m means that item i is ranked at the m-th position. Given two rankings σ1 and σ2, the number of concordant pairs equals fc(σ1, σ2) = X i<j [ {σ1(i) < σ1(j)} {σ2(i) < σ2(j)} + {σ1(i) > σ1(j)} {σ2(i) > σ2(j)}], the number of discordant pairs equals fd(σ1, σ2) = X i<j [ {σ1(i) < σ1(j)} {σ2(i) > σ2(j)} + {σ1(i) > σ1(j)} {σ2(i) < σ2(j)}], and Kendall’s ⌧between σ1 and σ2 is given by ⌧(σ1, σ2) = [fc(σ1, σ2) −fd(σ1, σ2)] / "n 2 # . By measuring similarity between the two rankings of objects (one with respect to their distance from xa and one with respect to their distance from xb) with Kendall’s ⌧we would compute a similarity score between xa and xb. This idea is illustrated with an example in Figure 1 (left). It has been established recently that Kendall’s ⌧is actually a kernel function on the set of total rankings (Jiao and Vert, 2015). Hence, by measuring similarity on D in the described way we would even end up with a 2 x1 x2 x3 x4 x5 x6 x7 d(x1, x4) d(x1, x3) x1 x2 x3 x4 x5 x6 x7 d(x1, x3) d(x2, x3) d(x3, x5) Figure 1: Illustrations of the ideas behind k1 (left) and k2 (right). For k1: In order to compute a similarity score between x1 (in red) and x2 (in blue) we would like to rank all objects with respect to their distance from x1 and also with respect to their distance from x2 and compute Kendall’s ⌧between the two rankings. In this example, the objects would rank as x1 ≺x3 ≺x2 ≺ x4 ≺x5 ≺x6 ≺x7 and x2 ≺x3 ≺x6 ≺x1 ≺x5 ≺x4 ≺x7, respectively. Kendall’s ⌧between these two rankings is 1/3, and this would be the similarity score between x1 and x2. For comparison, the score between x1 and x7 (in green) would be −5/7, and between x2 and x7 it would be −3/7. For k2: In order to compute a similarity score between x1 and x2 we would like to check for every pair of objects (xi, xj) whether the distance comparisons d(xi, x1) ? < d(xi, xj) and d(xi, x2) ? < d(xi, xj) yield the same result or not. Here, we have 32 pairs for which they yield the same result and 17 pairs for which they do not. We would assign 7−2 · (32 −17) = 15/49 as similarity score between x1 and x2. The score between x1 and x7 would be 3/49, and between x2 and x7 it would be 1/49. kernel function on D since the following holds: for any mapping h : D ! Z and kernel function k : Z ⇥Z ! R, k ◦(h, h) : D ⇥D ! R is a kernel function. In our situation, the problem is that in most cases S will contain only a small fraction of all possible similarity triplets and also that some of the triplets in S might be incorrect, so that there is no way of ranking all objects with respect to their distance from any fixed object based on the similarity triplets in S. To adapt the procedure, we consider a feature map that corresponds to the kernel function just described. By a feature map corresponding to a kernel function k : D ⇥D ! R we mean a mapping Φ : D ! Rm for some m 2 N such that k(xi, xj) = hΦ(xi), Φ(xj)i = Φ(xi)T · Φ(xj). It is easy to see from the above formulas (also compare with Jiao and Vert, 2015) that a feature map corresponding to the described kernel function is given by Φk⌧: D ! R( n 2) with Φk⌧(xa) = 1 q"n 2 # · ✓ {d(xa, xi) < d(xa, xj)} − {d(xa, xi) > d(xa, xj)} ◆ 1i<jn . In our situation, where we are only given S and cannot evaluate Φk⌧in most cases, we have to replace Φk⌧by an approximation: up to a normalizing factor, we replace an entry in Φk⌧(xa) by zero if we cannot evaluate it based on the triplets in S. More precisely, we consider the feature map Φk1 : D ! R( n 2) given by Φk1(xa) = ([Φk1(xa)]i,j)1i<jn with [Φk1(xa)]i,j = 1 p |{(xi, xj, xk) 2 S : xi = xa}| · ✓ {(xa, xi, xj) 2 S} − {(xa, xj, xi) 2 S} ◆ (2) and define our first proposed kernel function k1 : D ⇥D ! R by k1(xi, xj) = Φk1(xi)T · Φk1(xj). (3) Note that the scaling factor in the definition of Φk1, ensuring that the feature embedding lies on the unit sphere, is crucial whenever the number of similarity triplets in which an object appears as anchor object is not approximately constant over the different objects. For ease of exposition we have assumed that every object in D appears at least once as an anchor object in a similarity triplet in S. In the unlikely case that xa does not appear at least once as an anchor object, meaning that we do not have any information for ranking the objects in D with respect to their distance from xa at all, we simply set Φk1(xa) to zero (which is consistent with (2) under the convention “0/0=0”). Kernel function k2 Our second kernel function is based on a similar idea. Now we do not consider xa and xb as anchor objects when measuring their similarity, but compare whether they rank similarly with respect to their distances from the various other objects. Concretely, we would like to count the number of pairs of objects (xi, xj) for which the comparisons d(xi, xa) ?< d(xi, xj) and d(xi, xb) ?< d(xi, xj) (4) 3 x1 x2 xn x3 x4 x5 ... {y : d(y, xn) < d(y, x2)} {y : d(y, x5) < d(y, x4)} Figure 2: k1 measures similarity between two objects by counting in how many of the halfspaces that are obtained from distance comparisons the two objects reside at the same time. The outcome does not only depend on the distance between the two objects, but also on their location within the data set: although x1 and x2 are located far apart, k1 considers them to be very similar. See the running text for details. yield the same result and subtract the number of pairs for which these comparisons yield different results. See the right-hand side of Figure 1 for an illustration of this idea. Adapted to our situation of being only given S it corresponds to considering the feature map Φk2 : D ! Rn2 given by Φk2(xa) = 1 p |{(xi, xj, xk) 2 S : xj = xa _ xk = xa}| · ✓ {(xi, xa, xj) 2 S} − {(xi, xj, xa) 2 S} ◆ 1i,jn and defining our second proposed kernel function k2 : D ⇥D ! R by k2(xi, xj) = Φk2(xi)T · Φk2(xj). (5) Again, the scaling factor in the definition of Φk2 is crucial whenever there are objects appearing in more similarity triplets than others and we apply the convention “0/0=0”. Contradicting similarity triplets If S contains contradicting triples (xi, xj, xk) and (xi, xk, xj) and there might be triples being present repeatedly, one can alter the definition of Φk1 or Φk2 as follows: if #{(xa, xi, xj) 2 S} denotes the number of how often the triple (xa, xi, xj) appears in S, set Φk1(xa) = eΦk1(xa)/ ))eΦk1(xa) )) where eΦk1(xa) equals ✓#{(xa, xi, xj) 2 S} −#{(xa, xj, xi) 2 S} #{(xa, xi, xj) 2 S} + #{(xa, xj, xi) 2 S} ◆ 1i<jn . The definition of Φk2 can be revised in an analogous way. In doing so, we incorporate a simple estimate of the likelihood of a triple being correct. 2.1 Reducing diagonal dominance If the number |S| of given similarity triplets is small, our kernel functions suffer from a problem that is shared by many other kernel functions defined on complex data: Φk1 and Φk2 map the objects in D to sparse vectors, that is almost all of their entries are zero. As a consequence, two different feature vectors Φki(xa) and Φki(xb) appear to be almost orthogonal and the similarity score ki(xa, xb) is much smaller than the self-similarity scores ki(xa, xa) or ki(xb, xb). This phenomenon, usually referred to as diagonal dominance of the kernel function, has been observed to pose difficulties for the kernel methods using the kernel function, and several ways have been proposed for dealing with it (Schölkopf et al., 2002; Greene and Cunningham, 2006). In all our experiments we deal with diagonal dominance in the following simple way: Let k denote a kernel function and K the kernel matrix on D, that is K = (k(xi, xj))n i,j=1, which would be the input to a kernel method. Then we replace K by K −λminI where I 2 Rn⇥n denotes the identity matrix and λmin is the smallest eigenvalue of K. 2.2 Geometric intuition Intuitively, our kernel functions measure similarity between xa and xb by quantifying to which extent xa and xb can be expected to be located in the same region of D: Think of D as a subset of Rm and d being the Euclidean metric. A similarity triplet d(xa, xi) < d(xa, xj) then tells us that xa resides in the halfspace defined by the hyperplane that is perpendicular to the line segment connecting xi and xj and goes through the segment’s midpoint. If there is also a similarity triplet d(xb, xi) < d(xb, xj), xa and xb thus are located in the same halfspace (assuming the correctness of the similarity triplets) and this is reflected by a higher value of k1(xa, xb). Similarly, a similarity triplet d(xi, xa) < d(xi, xj) 4 400 points Distance matrix K1 K2 Similarity scores -6 -4 -2 0 2 4 6 -2 0 2 4 6 8 -5 0 5 -2 0 2 4 6 8 -0.05 0 0.05 0.1 0.15 0.2 -5 0 5 10 15 -8 -6 -4 -2 0 2 4 6 -5 0 5 10 15 -10 -5 0 5 10 -0.05 0 0.05 0.1 0.15 0.2 Figure 3: Kernel matrices for two data sets, each consisting of 400 points, based on 10% of all similarity triplets. 1st plot of a row: Data points. 2nd plot: Distance matrix. 3rd / 4th plot: Kernel matrix for k1 / k2. 6th plot: Similarity scores between a fixed point and the other points (for k1). tells us that xa is located in a ball with radius d(xi, xj) centered at xi, and the value of k2(xa, xb) is higher if there is a similarity triplet d(xi, xb) < d(xi, xj) telling us that xb is located in this ball too and it is smaller if there is a triplet d(xi, xj) < d(xi, xb) telling us that xb is not located in this ball. Note that the similarity scores between xa and xb defined by k1 or k2 do not only depend on d(xa, xb), but rather on the locations of xa and xb within D and on how the points in D are spread in the space since this affects how the various hyperplanes or balls are related to each other. Consider the example illustrated in Figure 2: Let d(x3, xn) = 1 implying that d(xi, xi+1) = ⇥(1/n), 3 i < n, and d(x1, x2) > d(x2, xn) > d(x1, xn) > d(x2, x3) > d(x1, x3) > 1 be arbitrarily large. Although x1 and x2 are located at the maximum distance to each other, they satisfy d(x1, xi) < d(x1, xj) and d(x2, xi) < d(x2, xj) for all 3 i < j n, and hence both x1 and x2 are jointly located in all the halfspaces obtained from these distance comparisons. We end up with k1(x1, x2) ! 1, n ! 1, assuming k1 is computed based on all possible similarity triplets, all of which are correct. The distance between x3 and xn is much smaller, but there are many points in between them and the hyperplanes obtained from the distance comparisons with these points separate x3 and xn. We end up with k1(x3, xn) ! −1, n ! 1. Depending on the task at hand, this may be desirable or not. Let us examine the meaningfulness of our kernel functions by calculating them on five visualizable data sets. Each of the first four data sets consists of 400 points in R2 and d equals the Euclidean metric. The fifth data set consists of 400 vertices of an undirected graph from a stochastic block model and d equals the shortest path distance. We computed k1 and k2 based on 10% of all possible similarity triplets (chosen uniformly at random from all triplets). The results for the first two data sets are shown in Figure 3. The results for the remaining data sets are shown in Figure 6 in Section A.1 in the supplementary material. The first plot of a row shows the data set. The second plot shows the distance matrix on the data set. Next, we can see the kernel matrices. The last plot of a row shows the similarity scores (encoded by color) based on k1 between one fixed point (shown as a black cross) and the other points in the data set. Clearly, the kernel matrices reflect the block structures of the distance matrices, and the similarity scores between a fixed point and the other points tend to decrease as the distances to the fixed point increase. A situation like in the example of Figure 2 does not occur. 2.3 Landmark design Our kernel functions are designed as to extract information from an arbitrary collection S of similarity triplets. However, by construction, a single triplet is useless, and what matters is the concurrent presence of two triplets: k1(xa, xb) is only affected by pairs of triplets answering d(xa, xi) ? < d(xa, xj) and d(xb, xi) ? < d(xb, xj), while k2(xa, xb) is only affected by pairs of triplets answering (4). Hence, when we can choose which dissimilarity comparisons of the form (1) are evaluated for creating S (e.g., in crowdsourcing), we should aim at maximizing the number of appropriate pairs of triplets. This can easily be achieved by means of a landmark design inspired from landmark multidimensional scaling (de Silva and Tenenbaum, 2004): We choose a small subset of landmark objects L ✓D. Then, for k1, only comparisons of the form d(xi, xj) ? < d(xi, xk) with xi 2 D and xj, xk 2 L are evalu5 ated. For k2, only comparisons of the form d(xj, xi) ? < d(xj, xk) with xi 2 D and xj, xk 2 L are evaluated. The landmark objects can be chosen either randomly or, if available, based on additional knowledge about D and the task at hand. 2.4 Computational complexity General S A naive implementation of our kernel functions explicitly computes the feature vectors Φk1(xi) or Φk2(xi), i = 1, . . . , n, and subsequently calculates the kernel matrix K by means of (3) or (5). In doing so, we store the feature vectors in the feature matrix Φk1(D) = (Φk1(xi))n i=1 2 R( n 2)⇥n or Φk2(D) = (Φk2(xi))n i=1 2 Rn2⇥n. Proceeding this way is straightforward and simple, requiring to go through S only once, but comes with a computational cost of O(|S| + n4) operations. Note that the number of different distance comparisons of the form (1) is O(n3) and hence one might expect that |S| 2 O(n3) and O(|S| + n4) = O(n4). By performing (3) or (5) in terms of matrix multiplication Φk1(D)T · Φk1(D) or Φk2(D)T · Φk2(D) and applying Strassen’s algorithm (Higham, 1990) one can reduce the number of operations to O(|S| + n3.81), but still this is infeasible for many data sets. Infeasibility for large data sets, however, is even more the case for ordinal embedding algorithms, which are the current state-of-the-art method for solving machine learning problems based on similarity triplets. All existing ordinal embedding algorithms iteratively solve an optimization problem. For none of these algorithms theoretical bounds for their complexity are available in the literature, but it is widely known that their running times are prohibitively high (Heim et al., 2015; Kleindessner and von Luxburg, 2017). Landmark design If we know that S contains only dissimilarity comparisons involving landmark objects, we can adapt the feature matrices such that Φk1(D) 2 R( |L| 2 )⇥n or Φk2(D) 2 R|L|2⇥n and reduce the number of operations to O(|S| + min{|L|2, n}log2(7/8)|L|2n2), which is O(|S| + |L|1.62n2) if |L|2 n. Note that in this case we might expect that |S| 2 O(|L|2n). In both cases, whenever the number of given similarity triplets |S| is small compared to the number of all different distance comparisons under consideration, the feature matrix Φk1(D) or Φk2(D) is sparse with only O(|S|) non-zero entries and methods for sparse matrix multiplication decrease computational complexity (Gustavson, 1978; Kaplan et al., 2006). 3 Related work Similarity triplets are a special case of answers to the general dissimilarity comparisons d(A, B) ? < d(C, D), A, B, C, D 2 X. We refer to any collection of answers to these general comparisons as ordinal data. In recent years, ordinal data has become popular in machine learning. Among the work on ordinal data in general (see Kleindessner and von Luxburg, 2014, 2017, for references), similarity triplets have been paid particular attention: Jamieson and Nowak (2011) deal with the question of how many similarity triplets are required for uniquely determining an ordinal embedding of Euclidean data. This work has been carried on and generalized by Jain et al. (2016). Algorithms for constructing an ordinal embedding based on similarity triplets (but not on general ordinal data) are proposed in Tamuz et al. (2011), van der Maaten and Weinberger (2012), Amid et al. (2016), and Jain et al. (2016). Heikinheimo and Ukkonen (2013) present a method for medoid estimation based on statements “Object A is the outlier within the triple of objects (A, B, C)”, which correspond to the two similarity triplets d(B, C) < d(B, A) and d(C, B) < d(C, A). Ukkonen et al. (2015) use the same kind of statements for density estimation and Ukkonen (2017) uses them for clustering. Wilber et al. (2014) examine how to minimize time and costs when collecting similarity triplets via crowdsourcing. Producing a number of ordinal embeddings at the same time, each corresponding to a different dissimilarity function based on which a comparison (1) might have been evaluated, is studied in Amid and Ukkonen (2015). In Heim et al. (2015), one of the algorithms by van der Maaten and Weinberger (2012) is adapted from the batch setting to an online setting, in which similarity triplets are observed in a sequential way, using stochastic gradient descent. In Kleindessner and von Luxburg (2017), we propose algorithms for medoid estimation, outlier detection, classification, and clustering based on statements “Object A is the most central object within (A, B, C)”, which comprise the two similarity triplets d(B, A) < d(B, C) and d(C, A) < d(C, B). Finally, Haghiri et al. (2017) study the problem of efficient nearest neighbor search based on similarity triplets. There 6 Figure 4: Best viewed magnified on screen. Left: Clustering of the food data set. Part of the dendrogram obtained from complete-linkage clustering using k1. Right: Kernel PCA on the car data set based on the kernel function k2. is also a number of papers that consider similarity triplets as side information to vector data (e.g., Schultz and Joachims, 2003; McFee and Lanckriet, 2011; Wilber et al., 2015). 4 Experiments We performed experiments that demonstrate the usefulness of our kernel functions. We first apply them to three small image data sets for which similarity triplets have been gathered via crowdsourcing. We then study them more systematically and compare them to an ordinal embedding approach in clustering tasks on subsets of USPS and MNIST digits using synthetically generated triplets. 4.1 Crowdsourced similarity triplets In this section we present experiments on real crowdsourcing data that show that our kernel functions can capture the structure of a data set. Note that for the following data sets there is no ground truth available and hence there is no way other than visual inspection for evaluating our results. Food data set We applied the kernelized version of complete-linkage clustering based on our kernel function k1 to the food data set introduced in Wilber et al. (2014). This data set consists of 100 images2 of a wide range of foods and comes with 190376 (unique) similarity triplets, which contain 9349 pairs of contradicting triplets. Figure 4 (left) shows a part of the dendrogram that we obtained. Each of the ten clusters depicted there contains pretty homogeneous images. For example, the fourth row only shows vegetables and salads whereas the ninth row only shows fruits and the last row only shows desserts. To give an impression of accelerated running time of our approach compared to an ordinal embedding approach: computation of k1 or k2 on this data set took about 0.1 seconds while computing an ordinal embedding using the GNMDS algorithm (Agarwal et al., 2007) took 18 seconds (embedding dimension equaling two; all computations performed in Matlab—see Section 4.2 for details; the embedding is shown in Figure 9 in Section A.1 in the supplementary material). Car data set We applied kernel PCA (Schölkopf et al., 1999) based on our kernel function k2 to the car data set, which we have introduced in Kleindessner and von Luxburg (2017). It consists of 60 images of cars. For this data set we have collected statements of the kind “Object A is the most central object within (A, B, C)”, meaning that d(B, A) < d(B, C) and d(C, A) < d(C, B), via crowdsourcing. We ended up with 13514 similarity triplets, of which 12502 were unique. The projection of the car data set onto the first two kernel principal components can be seen in Figure 4 (right). The result looks reasonable, with the cars arranged in groups of sports cars (top left), ordinary cars (middle right) and off-road/sport utility vehicles (bottom left). Also within these groups there is some reasonable structure. For example, the race-like sports cars are located near to each other and close to the Formula One car, and the sport utility vehicles from German manufacturers are placed next to each other. Nature data set We performed similar experiments on the nature data set introduced in Heikinheimo and Ukkonen (2013). The results are presented in Section A.2 in the supplementary material. 2According to Wilber et al., the data set contains copyrighted material under the educational fair use exemption to the U.S. copyright law. 7 We would like to discuss a question raised by one of the reviewers: in our setup (see Section 1), we assume that similarity triplets are noisy evaluations of dissimilarity comparisons (1), where d is some fixed dissimilarity function. This leads to our (natural) way of dealing with contradicting similarity triplets as described in Section 2. In a different setup one could drop the dissimilarity function d and consider similarity triplets as elements of some binary relation on D ⇥D that is not necessarily transitive or antisymmetric. In the latter setup it is not clear whether our way of dealing with contradicting triplets is the right thing to do. However, we believe that the experiments of this section show that our setup is valid in a wide range of scenarios and our approach works in practice. 4.2 Synthetically generated triplets We studied our kernel functions with respect to the number of input similarity triplets that they require in order to produce a valuable solution in clustering tasks. We found that in the scenario of a general collection S of triplets our approach is highly superior compared to an ordinal embedding approach in terms of running time, but on most data sets it is inferior regarding the required number of triplets. The full benefit of our kernel functions emerges in a landmark design. There our approach can compete with an embedding approach in terms of the required number of triplets and is so much faster as to being easily applicable to large data sets to which ordinal embedding algorithms are not. In this section we want to demonstrate this claim. We studied k1 and k2 in a landmark design by applying kernel k-means clustering (Dhillon et al., 2001) to subsets of USPS and MNIST digits, respectively. Collections S of similarity triplets were generated as follows: We chose a certain number of landmark objects uniformly at random from all objects of the data set under consideration. Choosing d as the Euclidean metric, we created answers to all possible distance comparisons with the landmark objects as explained in Section 2.3. Answers were incorrect with some probability 0 ep 1 independently of each other. From the set of all answers we chose triplets in S uniformly at random without replacement. We compared our approach to an ordinal embedding approach with ordinary k-means clustering. We tried the GNMDS (Agarwal et al., 2007), the CKL (Tamuz et al., 2011), and the t-STE (van der Maaten and Weinberger, 2012) embedding algorithms in the Matlab implementation made available by van der Maaten and Weinberger (2012). In doing so, we set all parameters except the embedding dimension to the provided default parameters. The parameter µ of the CKL algorithm was set to 0.1 since we observed good results with this value. Note that in these unsupervised clustering tasks there is no immediate way of performing cross-validation for choosing parameters. We compared to the embedding algorithms in two scenarios: in one case they were provided the same triplets as input as our kernel functions, in the other case (denoted by the additional “rand” in the plots) they were provided a same number of triplets chosen uniformly at random with replacement from all possible triplets (no landmark design) and incorrect with the same probability ep. For further comparison, we considered ordinary k-means applied to the original point set and a random clustering. We always provided the correct number of clusters as input, and set the number of replicates in k-means and kernel k-means to five and the maximum number of iterations to 100. For assessing the quality of a clustering we computed its purity (e.g., Manning et al., 2008), which measures the accordance with the known ground truth partitioning according to the digits’ values. A high purity value indicates a good clustering. Note that the limitation for the scale of our experiments only comes from the running time of the embedding algorithms and not from our kernel functions. Still, in terms of the number of data points our experiments are comparable or actually even superior to all the papers on ordinal embedding cited in Section 3. In terms of the number of similarity triplets per data point, we used comparable numbers of triplets. USPS digits We chose 1000 points uniformly at random from the subset of USPS digits 1, 2, and 3. Using 15 landmark objects, we studied the performance of our approach and the ordinal embedding approach as a function of the number of input triplets. The first and the second row of Figure 5 show the results (average over 10 runs of an experiment) for k1. The results for k2 are shown in Figure 7 in Section A.1 in the supplementary material. The first two plots of a row show the purity values of the various clusterings for ep = 0 and ep = 0.3, respectively. The third and the fourth plot show the corresponding time (in sec) that it took to compute our kernel function or an ordinal embedding. We set the embedding dimension to 2 (1st row) or 10 (2nd row). Based on the achieved purity values no method can be considered superior. Our kernel function k2 performs slightly worse than k1 and the ordinal embedding algorithms. The GNMDS algorithm apparently cannot deal with the landmark triplets at all and yields the same purity values as a random clustering when provided with the landmark triplets. Our approach is highly superior regarding running time. The running times of the 8 0 1 2 3 4 # input triplets 104 0.4 0.6 0.8 1 Purity k1 on USPS (ep=0, embedding dim=2) 0 2 4 6 # input triplets 104 0.4 0.6 0.8 1 Purity k1 on USPS (ep=0.3, embedding dim=2) k1 GNMDS t-STE CKL GNMDS rand t-STE rand CKL rand Coordinates Random 0 1 2 3 4 # input triplets 104 0 10 20 30 40 Running time [s] k1 on USPS (ep=0, embedding dim=2) 0 2 4 6 # input triplets 104 0 10 20 30 40 Running time [s] k1 on USPS (ep=0.3, embedding dim=2) 0 1 2 3 4 # input triplets 104 0.4 0.6 0.8 1 Purity k1 on USPS (ep=0, embedding dim=10) 0 2 4 6 # input triplets 104 0.4 0.6 0.8 1 Purity k1 on USPS (ep=0.3, embedding dim=10) 0 1 2 3 4 # input triplets 104 0 20 40 60 80 100 Running time [s] k1 on USPS (ep=0, embedding dim=10) 0 2 4 6 # input triplets 104 0 50 100 150 Running time [s] k1 on USPS (ep=0.3, embedding dim=10) 0 2000 4000 6000 8000 10000 # points 0.2 0.4 0.6 Purity k1 on MNIST (ep=0.15, embedding dim=5) 0 2000 4000 6000 8000 10000 # points 0.2 0.4 0.6 Purity k2 on MNIST (ep=0.15, embedding dim=5) k2 0 2000 4000 6000 8000 10000 # points 0 1000 2000 3000 Running time [s] k1 on MNIST (ep=0.15, embedding dim=5) 0 2000 4000 6000 8000 10000 # points 0 1000 2000 3000 4000 Running time [s] k2 on MNIST (ep=0.15, embedding dim=5) Figure 5: 1st & 2nd row (USPS digits for k1): Clustering 1000 points from USPS digits 1, 2, and 3. Purity and running time as a function of the number of input triplets. 3rd row (MNIST digits): Clustering subsets of MNIST digits. Purity and running time as a function of the number of points. ordinal embedding algorithms depend on the embedding dimension and ep and in these experiments the dependence is monotonic. All computations were performed in Matlab R2016a on a MacBook Pro with 2.9 GHz Intel Core i7 and 8 GB 1600 MHz DDR3. In order to make a fair comparison we did not use MEX files or sparse matrix operations in the implementation of our kernel functions. MNIST digits We studied the performance of the various methods as a function of the size n of the data set with the number of input triplets growing linearly with n. For i = 1, . . . , 10, we chose n = i · 103 points uniformly at random from MNIST digits. We used 30 landmark objects and provided 150n input similarity triplets. The third row of Figure 5 shows the purity values of the various methods for k1 / k2 (1st / 2nd plot) and the corresponding running times (3rd / 4th plot) when ep = 0.15. The embedding dimension was set to 5. A spot check suggested that setting it to 2 would have given worse results, while setting it to 10 would have given similar results, but would have led to a higher running time. We computed the t-STE embedding only for n 6000 due to its high running time. It seems that GNMDS with random input triplets performs best, but for large values of n our kernel function k1 can compete with it. For 10000 points, computing k1 or k2 took 100 or 180 seconds, while even the fastest embedding algorithm ran for 2000 seconds. For further comparison, Figure 8 in Section A.1 in the supplementary material shows a kernel PCA embedding based on k1 (150n landmark triplets) and a 2-dim GNMDS embedding (150n random triplets) of n = 20000 digits. Here, computation of k1 took 900 seconds, while GNMDS ran for more than 6000 seconds. 5 Conclusion We proposed two data-dependent kernel functions that can be evaluated when given only an arbitrary collection of similarity triplets for a data set D. Our kernel functions can be used to apply any kernel method to D. Hence they provide a generic alternative to the standard ordinal embedding approach based on numerical optimization for machine learning with similarity triplets. In a number of experiments we demonstrated the meaningfulness of our kernel functions. A big advantage of our kernel functions compared to the ordinal embedding approach is that our kernel functions run significantly faster. A drawback is that, in general, they seem to require a higher number of similarity triplets for capturing the structure of a data set. However, in a landmark design our kernel functions can compete with the ordinal embedding approach in terms of the required number of triplets. 9 Acknowledgements This work has been supported by the Institutional Strategy of the University of Tübingen (DFG, ZUK 63). References S. Agarwal, J. Wills, L. Cayton, G. Lanckriet, D. Kriegman, and S. Belongie. Generalized non-metric multidimensional scaling. In International Conference on Artificial Intelligence and Statistics (AISTATS), 2007. E. Amid and A. Ukkonen. Multiview triplet embedding: Learning attributes in multiple maps. In International Conference on Machine Learning (ICML), 2015. E. Amid, N. Vlassis, and M. Warmuth. t-exponential triplet embedding. arXiv:1611.09957v1 [cs.AI], 2016. V. de Silva and J. Tenenbaum. Sparse multidimensional scaling using landmark points. Technical report, Stanford University, 2004. I. Dhillon, Y. Guan, and B. Kulis. Kernel k-means, spectral clustering and normalized cuts. In International Conference on Knowledge Discovery and Data Mining (KDD), 2001. D. Greene and P. Cunningham. Practical solutions to the problem of diagonal dominance in kernel document clustering. In International Conference on Machine Learning (ICML), 2006. F. G. Gustavson. Two fast algorithms for sparse matrices: Multiplication and permuted transposition. ACM Transactions on Mathematical Software, 4(3):250–269, 1978. S. Haghiri, U. von Luxburg, and D. Ghoshdastidar. Comparison based nearest neighbor search. In International Conference on Artificial Intelligence and Statistics (AISTATS), 2017. H. Heikinheimo and A. Ukkonen. The crowd-median algorithm. In Conference on Human Computation and Crowdsourcing (HCOMP), 2013. Data available on http://www.anttiukkonen.com/. E. Heim, M. Berger, L. M. Seversky, and M. Hauskrecht. Efficient online relative comparison kernel learning. In SIAM International Conference on Data Mining (SDM), 2015. N. Higham. Exploiting fast matrix multiplication within the level 3 BLAS. ACM Transactions on Mathematical Software, 16(4):352–368, 1990. L. Jain, K. Jamieson, and R. Nowak. Finite sample prediction and recovery bounds for ordinal embedding. In Neural Information Processing Systems (NIPS), 2016. K. Jamieson and R. Nowak. Low-dimensional embedding using adaptively selected ordinal data. In Allerton Conference on Communication, Control, and Computing, 2011. Y. Jiao and J.-P. Vert. The Kendall and Mallows kernels for permutations. In International Conference on Machine Learning (ICML), 2015. H. Kaplan, M. Sharir, and E. Verbin. Colored intersection searching via sparse rectangular matrix multiplication. In Symposium on Computational Geometry (SoCG), 2006. M. Kendall. A new measure of rank correlation. Biometrika, 30(1–2):81–93, 1938. M. Kleindessner and U. von Luxburg. Uniqueness of ordinal embedding. In Conference on Learning Theory (COLT), 2014. M. Kleindessner and U. von Luxburg. Lens depth function and k-relative neighborhood graph: Versatile tools for ordinal data analysis. JMLR, 18(58):1–52, 2017. Data available on http://www.tml.cs.uni-tuebingen.de/team/luxburg/code_and_data/. C. D. Manning, P. Raghavan, and H. Schütze. Introduction to Information Retrieval. Cambridge University Press, 2008. 10 B. McFee and G. Lanckriet. Learning multi-modal similarity. JMLR, 12:491–523, 2011. B. Schölkopf, A. Smola, and K.-R. Müller. Kernel principal component analysis. In B. Schölkopf, C. Burges, and A. Smola, editors, Advances in Kernel Methods: Support Vector Learning, pages 327–352. MIT Press, 1999. B. Schölkopf, J. Weston, E. Eskin, C. Leslie, and W. Noble. A kernel approach for learning from almost orthogonal patterns. In European Conference on Machine Learning (ECML), 2002. M. Schultz and T. Joachims. Learning a distance metric from relative comparisons. In Neural Information Processing Systems (NIPS), 2003. N. Stewart, G. D. A. Brown, and N. Chater. Absolute identification by relative judgment. Psychological Review, 112(4):881–911, 2005. O. Tamuz, C. Liu, S. Belongie, O. Shamir, and A. Kalai. Adaptively learning the crowd kernel. In International Conference on Machine Learning (ICML), 2011. Y. Terada and U. von Luxburg. Local ordinal embedding. In International Conference on Machine Learning (ICML), 2014. A. Ukkonen. Crowdsourced correlation clustering with relative distance comparisons. In International Conference on Data Mining series (ICDM), 2017. A. Ukkonen, B. Derakhshan, and H. Heikinheimo. Crowdsourced nonparametric density estimation using relative distances. In Conference on Human Computation and Crowdsourcing (HCOMP), 2015. L. van der Maaten and K. Weinberger. Stochastic triplet embedding. In IEEE International Workshop on Machine Learning for Signal Processing (MLSP), 2012. Code available on http://homepage.tudelft.nl/19j49/ste/. M. Wilber, I. Kwak, and S. Belongie. Cost-effective hits for relative similarity comparisons. In Conference on Human Computation and Crowdsourcing (HCOMP), 2014. Data available on http://vision.cornell.edu/se3/projects/cost-effective-hits/. M. Wilber, I. Kwak, D. Kriegman, and S. Belongie. Learning concept embeddings with combined human-machine expertise. In International Conference on Computer Vision (ICCV), 2015. 11 | 2017 | 24 |
6,719 | Self-Normalizing Neural Networks Günter Klambauer Thomas Unterthiner Andreas Mayr Sepp Hochreiter LIT AI Lab & Institute of Bioinformatics, Johannes Kepler University Linz A-4040 Linz, Austria {klambauer,unterthiner,mayr,hochreit}@bioinf.jku.at Abstract Deep Learning has revolutionized vision via convolutional neural networks (CNNs) and natural language processing via recurrent neural networks (RNNs). However, success stories of Deep Learning with standard feed-forward neural networks (FNNs) are rare. FNNs that perform well are typically shallow and, therefore cannot exploit many levels of abstract representations. We introduce self-normalizing neural networks (SNNs) to enable high-level abstract representations. While batch normalization requires explicit normalization, neuron activations of SNNs automatically converge towards zero mean and unit variance. The activation function of SNNs are “scaled exponential linear units” (SELUs), which induce self-normalizing properties. Using the Banach fixed-point theorem, we prove that activations close to zero mean and unit variance that are propagated through many network layers will converge towards zero mean and unit variance — even under the presence of noise and perturbations. This convergence property of SNNs allows to (1) train deep networks with many layers, (2) employ strong regularization schemes, and (3) to make learning highly robust. Furthermore, for activations not close to unit variance, we prove an upper and lower bound on the variance, thus, vanishing and exploding gradients are impossible. We compared SNNs on (a) 121 tasks from the UCI machine learning repository, on (b) drug discovery benchmarks, and on (c) astronomy tasks with standard FNNs, and other machine learning methods such as random forests and support vector machines. For FNNs we considered (i) ReLU networks without normalization, (ii) batch normalization, (iii) layer normalization, (iv) weight normalization, (v) highway networks, and (vi) residual networks. SNNs significantly outperformed all competing FNN methods at 121 UCI tasks, outperformed all competing methods at the Tox21 dataset, and set a new record at an astronomy data set. The winning SNN architectures are often very deep. 1 Introduction Deep Learning has set new records at different benchmarks and led to various commercial applications [21, 26]. Recurrent neural networks (RNNs) [15] achieved new levels at speech and natural language processing, for example at the TIMIT benchmark [10] or at language translation [29], and are already employed in mobile devices [24]. RNNs have won handwriting recognition challenges (Chinese and Arabic handwriting) [26, 11, 4] and Kaggle challenges, such as the “Grasp-and Lift EEG” competition. Their counterparts, convolutional neural networks (CNNs) [20] excel at vision and video tasks. CNNs are on par with human dermatologists at the visual detection of skin cancer [8]. The visual processing for self-driving cars is based on CNNs [16], as is the visual input to AlphaGo which has beaten one 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 0 250 500 750 1000 1250 1500 1750 2000 10 5 10 4 10 3 10 2 10 1 100 BatchNorm Depth 8 BatchNorm Depth 16 BatchNorm Depth 32 SNN Depth 8 SNN Depth 16 SNN Depth 32 Training loss Iterations 0 250 500 750 1000 1250 1500 1750 2000 10 5 10 4 10 3 10 2 10 1 100 BatchNorm Depth 8 BatchNorm Depth 16 BatchNorm Depth 32 SNN Depth 8 SNN Depth 16 SNN Depth 32 Iterations Training loss Figure 1: The left panel and the right panel show the training error (y-axis) for feed-forward neural networks (FNNs) with batch normalization (BatchNorm) and self-normalizing networks (SNN) across update steps (x-axis) on the MNIST dataset the CIFAR10 dataset, respectively. We tested networks with 8, 16, and 32 layers and learning rate 1e-5. FNNs with batch normalization exhibit high variance due to perturbations. In contrast, SNNs do not suffer from high variance as they are more robust to perturbations and learn faster. of the best human GO players [27]. At vision challenges, CNNs are constantly winning, for example at the large ImageNet competition [19, 13], but also almost all Kaggle vision challenges, such as the “Diabetic Retinopathy” and the “Right Whale” challenges [7, 12]. However, looking at Kaggle challenges that are not related to vision or sequential tasks, gradient boosting, random forests, or support vector machines (SVMs) are winning most of the competitions. Deep Learning is notably absent, and for the few cases where FNNs won, they are shallow. For example, the HIGGS challenge, the Merck Molecular Activity challenge, and the Tox21 Data challenge were all won by FNNs with at most four hidden layers. Surprisingly, it is hard to find success stories with FNNs that have many hidden layers, though they would allow for different levels of abstract representations of the input [2]. To robustly train very deep CNNs, batch normalization evolved into a standard to normalize neuron activations to zero mean and unit variance [17]. Layer normalization [1] also ensures zero mean and unit variance, while weight normalization [25] ensures zero mean and unit variance if in the previous layer the activations have zero mean and unit variance. Natural neural networks [6] also aim at normalizing the variance of activations by reparametrization of the weights. However, training with normalization techniques is perturbed by stochastic gradient descent (SGD), stochastic regularization (like dropout), and the estimation of the normalization parameters. Both RNNs and CNNs can stabilize learning via weight sharing, therefore they are less prone to these perturbations. In contrast, FNNs trained with normalization techniques suffer from these perturbations and have high variance in the training error (see Figure 1). This high variance hinders learning and slows it down. Furthermore, strong regularization, such as dropout, is not possible as it would further increase the variance which in turn would lead to divergence of the learning process. We believe that this sensitivity to perturbations is the reason that FNNs are less successful than RNNs and CNNs. Self-normalizing neural networks (SNNs) are robust to perturbations and do not have high variance in their training errors (see Figure 1). SNNs push neuron activations to zero mean and unit variance thereby leading to the same effect as batch normalization, which enables to robustly learn many layers. SNNs are based on scaled exponential linear units “SELUs” which induce self-normalizing properties like variance stabilization which in turn avoids exploding and vanishing gradients. 2 Self-normalizing Neural Networks (SNNs) Normalization and SNNs. For a neural network with activation function f, we consider two consecutive layers that are connected by a weight matrix W . Since the input to a neural network is a random variable, the activations x in the lower layer, the network inputs z = W x, and the activations y = f(z) in the higher layer are random variables as well. We assume that all activations 2 xi of the lower layer have mean µ := E(xi) and variance ν := Var(xi). An activation y in the higher layer has mean ˜µ := E(y) and variance ˜ν := Var(y). Here E(.) denotes the expectation and Var(.) the variance of a random variable. A single activation y = f(z) has net input z = wT x. For n units with activation xi, 1 ⩽i ⩽n in the lower layer, we define n times the mean of the weight vector w ∈Rn as ω := Pn i=1 wi and n times the second moment as τ := Pn i=1 w2 i . We consider the mapping g that maps mean and variance of the activations from one layer to mean and variance of the activations in the next layer g : (µ, ν) 7→(˜µ, ˜ν). Normalization techniques like batch, layer, or weight normalization ensure a mapping g that keeps (µ, ν) and (˜µ, ˜ν) close to predefined values, typically (0, 1). Definition 1 (Self-normalizing neural net). A neural network is self-normalizing if it possesses a mapping g : Ω7→Ωfor each activation y that maps mean and variance from one layer to the next and has a stable and attracting fixed point depending on (ω, τ) in Ω. Furthermore, the mean and the variance remain in the domain Ω, that is g(Ω) ⊆Ω, where Ω= {(µ, ν) | µ ∈[µmin, µmax], ν ∈ [νmin, νmax]}. When iteratively applying the mapping g, each point within Ωconverges to this fixed point. Therefore, we consider activations of a neural network to be normalized, if both their mean and their variance across samples are within predefined intervals. If mean and variance of x are already within these intervals, then also mean and variance of y remain in these intervals, i.e., the normalization is transitive across layers. Within these intervals, the mean and variance both converge to a fixed point if the mapping g is applied iteratively. Therefore, SNNs keep normalization of activations when propagating them through layers of the network. The normalization effect is observed across layers of a network: in each layer the activations are getting closer to the fixed point. The normalization effect can also observed be for two fixed layers across learning steps: perturbations of lower layer activations or weights are damped in the higher layer by drawing the activations towards the fixed point. If for all y in the higher layer, ω and τ of the corresponding weight vector are the same, then the fixed points are also the same. In this case we have a unique fixed point for all activations y. Otherwise, in the more general case, ω and τ differ for different y but the mean activations are drawn into [µmin, µmax] and the variances are drawn into [νmin, νmax]. Constructing Self-Normalizing Neural Networks. We aim at constructing self-normalizing neural networks by adjusting the properties of the function g. Only two design choices are available for the function g: (1) the activation function and (2) the initialization of the weights. For the activation function, we propose “scaled exponential linear units” (SELUs) to render a FNN as self-normalizing. The SELU activation function is given by selu(x) = λ x if x > 0 αex −α if x ⩽0 . (1) SELUs allow to construct a mapping g with properties that lead to SNNs. SNNs cannot be derived with (scaled) rectified linear units (ReLUs), sigmoid units, tanh units, and leaky ReLUs. The activation function is required to have (1) negative and positive values for controlling the mean, (2) saturation regions (derivatives approaching zero) to dampen the variance if it is too large in the lower layer, (3) a slope larger than one to increase the variance if it is too small in the lower layer, (4) a continuous curve. The latter ensures a fixed point, where variance damping is equalized by variance increasing. We met these properties of the activation function by multiplying the exponential linear unit (ELU) [5] with λ > 1 to ensure a slope larger than one for positive net inputs. For the weight initialization, we propose ω = 0 and τ = 1 for all units in the higher layer. The next paragraphs will show the advantages of this initialization. Of course, during learning these assumptions on the weight vector will be violated. However, we can prove the self-normalizing property even for weight vectors that are not normalized, therefore, the self-normalizing property can be kept during learning and weight changes. Deriving the Mean and Variance Mapping Function g. We assume that the xi are independent from each other but share the same mean µ and variance ν. Of course, the independence assumptions is not fulfilled in general. We will elaborate on the independence assumption below. The network 3 input z in the higher layer is z = wT x for which we can infer the following moments E(z) = Pn i=1 wi E(xi) = µ ω and Var(z) = Var(Pn i=1 wi xi) = ν τ, where we used the independence of the xi. The net input z is a weighted sum of independent, but not necessarily identically distributed variables xi, for which the central limit theorem (CLT) states that z approaches a normal distribution: z ∼N(µω, √ντ) with density pN(z; µω, √ντ). According to the CLT, the larger n, the closer is z to a normal distribution. For Deep Learning, broad layers with hundreds of neurons xi are common. Therefore the assumption that z is normally distributed is met well for most currently used neural networks (see Supplementary Figure S7). The function g maps the mean and variance of activations in the lower layer to the mean ˜µ = E(y) and variance ˜ν = Var(y) of the activations y in the next layer: g : µ ν 7→ ˜µ ˜ν : ˜µ(µ, ω, ν, τ) = Z ∞ −∞ selu(z) pN(z; µω, √ντ) dz (2) ˜ν(µ, ω, ν, τ) = Z ∞ −∞ selu(z)2 pN(z; µω, √ντ) dz −˜µ2 . These integrals can be analytically computed and lead to following mappings of the moments: ˜µ = 1 2λ (µω) erf µω √ 2√ντ + (3) α eµω+ ντ 2 erfc µω + ντ √ 2√ντ −α erfc µω √ 2√ντ + r 2 π √ντe−(µω)2 2(ντ) + µω ! ˜ν = 1 2λ2 (µω)2 + ντ 2 −erfc µω √ 2√ντ + α2 −2eµω+ ντ 2 erfc µω + ντ √ 2√ντ (4) +e2(µω+ντ) erfc µω + 2ντ √ 2√ντ + erfc µω √ 2√ντ + r 2 π (µω)√ντe−(µω)2 2(ντ) ! −(˜µ)2 Stable and Attracting Fixed Point (0, 1) for Normalized Weights. We assume a normalized weight vector w with ω = 0 and τ = 1. Given a fixed point (µ, ν), we can solve equations Eq. (3) and Eq. (4) for α and λ. We chose the fixed point (µ, ν) = (0, 1), which is typical for activation normalization. We obtain the fixed point equations ˜µ = µ = 0 and ˜ν = ν = 1 that we solve for α and λ and obtain the solutions α01 ≈1.6733 and λ01 ≈1.0507, where the subscript 01 indicates that these are the parameters for fixed point (0, 1). The analytical expressions for α01 and λ01 are given in Supplementary Eq. (8). We are interested whether the fixed point (µ, ν) = (0, 1) is stable and attracting. If the Jacobian of g has a norm smaller than 1 at the fixed point, then g is a contraction mapping and the fixed point is stable. The (2x2)-Jacobian J (µ, ν) of g : (µ, ν) 7→(˜µ, ˜ν) evaluated at the fixed point (0, 1) with α01 and λ01 is J (0, 1) = ((0.0, 0.088834), (0.0, 0.782648)). The spectral norm of J (0, 1) (its largest singular value) is 0.7877 < 1. That means g is a contraction mapping around the fixed point (0, 1) (the mapping is depicted in Figure 2). Therefore, (0, 1) is a stable fixed point of the mapping g. The norm of the Jacobian also determines the convergence rate as a consequence of the Banach fixed point theorem. The convergence rate around the fixed point (0,1) is about 0.78. In general, the convergence rate depends on ω, µ, ν, τ and is between 0.78 and 1. Stable and Attracting Fixed Points for Unnormalized Weights. A normalized weight vector w cannot be ensured during learning. For SELU parameters α = α01 and λ = λ01, we show in the next theorem that if (ω, τ) is close to (0, 1), then g still has an attracting and stable fixed point that is close to (0, 1). Thus, in the general case there still exists a stable fixed point which, however, depends on (ω, τ). If we restrict (µ, ν, ω, τ) to certain intervals, then we can show that (µ, ν) is mapped to the respective intervals. Next we present the central theorem of this paper, from which follows that SELU networks are self-normalizing under mild conditions on the weights. Theorem 1 (Stable and Attracting Fixed Points). We assume α = α01 and λ = λ01. We restrict the range of the variables to the following intervals µ ∈[−0.1, 0.1], ω ∈[−0.1, 0.1], ν ∈[0.8, 1.5], and τ ∈[0.95, 1.1], that define the functions’ domain Ω. For ω = 0 and τ = 1, the mapping Eq. (2) has the stable fixed point (µ, ν) = (0, 1), whereas for other ω and τ the mapping Eq. (2) has a stable and attracting fixed point depending on (ω, τ) in the (µ, ν)-domain: µ ∈[−0.03106, 0.06773] and 4 Figure 2: For ω = 0 and τ = 1, the mapping g of mean µ (x-axis) and variance ν (y-axis) to the next layer’s mean ˜µ and variance ˜ν is depicted. Arrows show in which direction (µ, ν) is mapped by g : (µ, ν) 7→(˜µ, ˜ν). The fixed point of the mapping g is (0, 1). ν ∈[0.80009, 1.48617]. All points within the (µ, ν)-domain converge when iteratively applying the mapping Eq. (2) to this fixed point. Proof. We provide a proof sketch (see detailed proof in Supplementary Material). With the Banach fixed point theorem we show that there exists a unique attracting and stable fixed point. To this end, we have to prove that a) g is a contraction mapping and b) that the mapping stays in the domain, that is, g(Ω) ⊆Ω. The spectral norm of the Jacobian of g can be obtained via an explicit formula for the largest singular value for a 2 × 2 matrix. g is a contraction mapping if its spectral norm is smaller than 1. We perform a computer-assisted proof to evaluate the largest singular value on a fine grid and ensure the precision of the computer evaluation by an error propagation analysis of the implemented algorithms on the according hardware. Singular values between grid points are upper bounded by the mean value theorem. To this end, we bound the derivatives of the formula for the largest singular value with respect to ω, τ, µ, ν. Then we apply the mean value theorem to pairs of points, where one is on the grid and the other is off the grid. This shows that for all values of ω, τ, µ, ν in the domain Ω, the spectral norm of g is smaller than one. Therefore, g is a contraction mapping on the domain Ω. Finally, we show that the mapping g stays in the domain Ωby deriving bounds on ˜µ and ˜ν. Hence, the Banach fixed-point theorem holds and there exists a unique fixed point in Ωthat is attained. Consequently, feed-forward neural networks with many units in each layer and with the SELU activation function are self-normalizing (see definition 1), which readily follows from Theorem 1. To give an intuition, the main property of SELUs is that they damp the variance for negative net inputs and increase the variance for positive net inputs. The variance damping is stronger if net inputs are further away from zero while the variance increase is stronger if net inputs are close to zero. Thus, for large variance of the activations in the lower layer the damping effect is dominant and the variance decreases in the higher layer. Vice versa, for small variance the variance increase is dominant and the variance increases in the higher layer. However, we cannot guarantee that mean and variance remain in the domain Ω. Therefore, we next treat the case where (µ, ν) are outside Ω. It is especially crucial to consider ν because this variable has much stronger influence than µ. Mapping ν across layers to a high value corresponds to an exploding gradient, since the Jacobian of the activation of high layers with respect to activations in lower layers has large singular values. Analogously, mapping ν across layers to a low value corresponds to an vanishing gradient. Bounding the mapping of ν from above and below would avoid both exploding and vanishing gradients. Theorem 2 states that the variance of neuron activations of SNNs is bounded from above, and therefore ensures that SNNs learn robustly and do not suffer from exploding gradients. Theorem 2 (Decreasing ν). For λ = λ01, α = α01 and the domain Ω+: −1 ⩽µ ⩽1, −0.1 ⩽ω ⩽ 0.1, 3 ⩽ν ⩽16, and 0.8 ⩽τ ⩽1.25, we have for the mapping of the variance ˜ν(µ, ω, ν, τ, λ, α) given in Eq. (4): ˜ν(µ, ω, ν, τ, λ01, α01) < ν. The proof can be found in Supplementary Material. Thus, when mapped across many layers, the variance in the interval [3, 16] is mapped to a value below 3. Consequently, all fixed points (µ, ν) 5 of the mapping g (Eq. (2)) have ν < 3. Analogously, Theorem 3 states that the variance of neuron activations of SNNs is bounded from below, and therefore ensures that SNNs do not suffer from vanishing gradients. Theorem 3 (Increasing ν). We consider λ = λ01, α = α01 and the domain Ω−: −0.1 ⩽µ ⩽0.1, and −0.1 ⩽ω ⩽0.1. For the domain 0.02 ⩽ν ⩽0.16 and 0.8 ⩽τ ⩽1.25 as well as for the domain 0.02 ⩽ν ⩽0.24 and 0.9 ⩽τ ⩽1.25, the mapping of the variance ˜ν(µ, ω, ν, τ, λ, α) given in Eq. (4) increases: ˜ν(µ, ω, ν, τ, λ01, α01) > ν. The proof can be found in the Supplementary Material. All fixed points (µ, ν) of the mapping g (Eq. (2)) ensure for 0.8 ⩽τ that ˜ν > 0.16 and for 0.9 ⩽τ that ˜ν > 0.24. Consequently, the variance mapping Eq. (4) ensures a lower bound on the variance ν. Therefore SELU networks control the variance of the activations and push it into an interval, whereafter the mean and variance move toward the fixed point. Thus, SELU networks are steadily normalizing the variance and subsequently normalizing the mean, too. In all experiments, we observed that self-normalizing neural networks push the mean and variance of activations into the domain Ω. Initialization. Since SNNs have a fixed point at zero mean and unit variance for normalized weights ω = Pn i=1 wi = 0 and τ = Pn i=1 w2 i = 1 (see above), we initialize SNNs such that these constraints are fulfilled in expectation. We draw the weights from a Gaussian distribution with E(wi) = 0 and variance Var(wi) = 1/n. Uniform and truncated Gaussian distributions with these moments led to networks with similar behavior. The “MSRA initialization” is similar since it uses zero mean and variance 2/n to initialize the weights [14]. The additional factor 2 counters the effect of rectified linear units. New Dropout Technique. Standard dropout randomly sets an activation x to zero with probability 1 −q for 0 < q ⩽1. In order to preserve the mean, the activations are scaled by 1/q during training. If x has mean E(x) = µ and variance Var(x) = ν, and the dropout variable d follows a binomial distribution B(1, q), then the mean E(1/qdx) = µ is kept. Dropout fits well to rectified linear units, since zero is in the low variance region and corresponds to the default value. For scaled exponential linear units, the default and low variance value is limx→−∞selu(x) = −λα = α′. Therefore, we propose “alpha dropout”, that randomly sets inputs to α′. The new mean and new variance is E(xd + α′(1 −d)) = qµ + (1 −q)α′, and Var(xd + α′(1 −d)) = q((1 −q)(α′ − µ)2 + ν). We aim at keeping mean and variance to their original values after “alpha dropout”, in order to ensure the self-normalizing property even for “alpha dropout”. The affine transformation a(xd + α′(1 −d)) + b allows to determine parameters a and b such that mean and variance are kept to their values: E(a(x · d + α′(1 −d)) + b) = µ and Var(a(x · d + α′(1 −d)) + b) = ν . In contrast to dropout, a and b will depend on µ and ν, however our SNNs converge to activations with zero mean and unit variance. With µ = 0 and ν = 1, we obtain a = q + α′2q(1 −q) −1/2 and b = − q + α′2q(1 −q) −1/2 ((1 −q)α′). The parameters a and b only depend on the dropout rate 1 −q and the most negative activation α′. Empirically, we found that dropout rates 1 −q = 0.05 or 0.10 lead to models with good performance. “Alpha-dropout” fits well to scaled exponential linear units by randomly setting activations to the negative saturation value. Applicability of the central limit theorem and independence assumption. In the derivative of the mapping (Eq. (2)), we used the central limit theorem (CLT) to approximate the network inputs z = Pn i=1 wixi with a normal distribution. We justified normality because network inputs represent a weighted sum of the inputs xi, where for Deep Learning n is typically large. The Berry-Esseen theorem states that the convergence rate to normality is n−1/2 [18]. In the classical version of the CLT, the random variables have to be independent and identically distributed, which typically does not hold for neural networks. However, the Lyapunov CLT does not require the variable to be identically distributed anymore. Furthermore, even under weak dependence, sums of random variables converge in distribution to a Gaussian distribution [3]. Optimizers. Empirically, we found that SGD, momentum, Adadelta and Adamax worked well for training SNNs, whereas for Adam we had to adjust the parameters (β2 = 0.99, ϵ = 0.01) to obtain proficient networks. 6 3 Experiments We compare SNNs to other deep networks at different benchmarks. Hyperparameters such as number of layers (blocks), neurons per layer, learning rate, and dropout rate, are adjusted by grid-search for each dataset on a separate validation set (see Supplementary Section S4). We compare the following FNN methods: (1) “MSRAinit”: FNNs without normalization and with ReLU activations and “Microsoft weight initialization” [14]. (2) “BatchNorm”: FNNs with batch normalization [17]. (3) “LayerNorm”: FNNs with layer normalization [1]. (4) “WeightNorm”: FNNs with weight normalization [25]. (5) “Highway”: Highway networks [28]. (6) “ResNet”: Residual networks [13] adapted to FNNs using residual blocks with 2 or 3 layers with rectangular or diavolo shape. (7) “SNNs”: Self normalizing networks with SELUs with α = α01 and λ = λ01 and the proposed dropout technique and initialization strategy. 121 UCI Machine Learning Repository datasets. The benchmark comprises 121 classification datasets from the UCI Machine Learning repository [9] from diverse application areas, such as physics, geology, or biology. The size of the datasets ranges between 10 and 130, 000 data points and the number of features from 4 to 250. In abovementioned work [9], there were methodological mistakes [30] which we avoided here. Each compared FNN method was optimized with respect to its architecture and hyperparameters on a validation set that was then removed from the subsequent analysis. The selected hyperparameters served to evaluate the methods in terms of accuracy on the pre-defined test sets. The accuracies are reported in the Supplementary Table S8. We ranked the methods by their accuracy for each prediction task and compared their average ranks. SNNs significantly outperform all competing networks in pairwise comparisons (paired Wilcoxon test across datasets) as reported in Table 1 (left panel). Table 1: Left: Comparison of seven FNNs on 121 UCI tasks. We consider the average rank difference to rank 4, which is the average rank of seven methods with random predictions. The first column gives the method, the second the average rank difference, and the last the p-value of a paired Wilcoxon test whether the difference to the best performing method is significant. SNNs significantly outperform all other methods. Right: Comparison of 24 machine learning methods (ML) on the UCI datasets with more than 1000 data points. The first column gives the method, the second the average rank difference to rank 12.5, and the last the p-value of a paired Wilcoxon test whether the difference to the best performing method is significant. Methods that were significantly worse than the best method are marked with “*”. SNNs outperform all competing methods. FNN method comparison ML method comparison Method avg. rank diff. p-value Method avg. rank diff. p-value SNN -0.756 SNN -6.7 MSRAinit -0.240* 2.7e-02 SVM -6.4 5.8e-01 LayerNorm -0.198* 1.5e-02 RandomForest -5.9 2.1e-01 Highway 0.021* 1.9e-03 MSRAinit -5.4* 4.5e-03 ResNet 0.273* 5.4e-04 LayerNorm -5.3 7.1e-02 WeightNorm 0.397* 7.8e-07 Highway -4.6* 1.7e-03 BatchNorm 0.504* 3.5e-06 . . . . . . . . . We further included 17 machine learning methods representing diverse method groups [9] in the comparison and the grouped the data sets into “small” and “large” data sets (for details see Supplementary Section S4.2). On 75 small datasets with less than 1000 data points, random forests and SVMs outperform SNNs and other FNNs. On 46 larger datasets with at least 1000 data points, SNNs show the highest performance followed by SVMs and random forests (see right panel of Table 1, for complete results see Supplementary Tables S9 and S10). Overall, SNNs have outperformed state of the art machine learning methods on UCI datasets with more than 1,000 data points. Typically, hyperparameter selection chose SNN architectures that were much deeper than the selected architectures of other FNNs, with an average depth of 10.8 layers, compared to average depths of 6.0 for BatchNorm, 3.8 WeightNorm, 7.0 LayerNorm, 5.9 Highway, and 7.1 for MSRAinit networks. For ResNet, the average number of blocks was 6.35. SNNs with many more than 4 layers often provide the best predictive accuracies across all neural networks. 7 Drug discovery: The Tox21 challenge dataset. The Tox21 challenge dataset comprises about 12,000 chemical compounds whose twelve toxic effects have to be predicted based on their chemical structure. We used the validation sets of the challenge winners for hyperparameter selection (see Supplementary Section S4) and the challenge test set for performance comparison. We repeated the whole evaluation procedure 5 times to obtain error bars. The results in terms of average AUC are given in Table 2. In 2015, the challenge organized by the US NIH was won by an ensemble of shallow ReLU FNNs which achieved an AUC of 0.846 [23]. Besides FNNs, this ensemble also contained random forests and SVMs. Single SNNs came close with an AUC of 0.845±0.003. The best performing SNNs have 8 layers, compared to the runner-ups ReLU networks with layer normalization with 2 and 3 layers. Also batchnorm and weightnorm networks, typically perform best with shallow networks of 2 to 4 layers (Table 2). The deeper the networks, the larger the difference in performance between SNNs and other methods (see columns 5–8 of Table 2). The best performing method is an SNN with 8 layers. Table 2: Comparison of FNNs at the Tox21 challenge dataset in terms of AUC. The rows represent different methods and the columns different network depth and for ResNets the number of residual blocks (6 and 32 blocks were omitted due to computational constraints). The deeper the networks, the more prominent is the advantage of SNNs. The best networks are SNNs with 8 layers. #layers / #blocks method 2 3 4 6 8 16 32 SNN 83.7 ± 0.3 84.4 ± 0.5 84.2 ± 0.4 83.9 ± 0.5 84.5 ± 0.2 83.5 ± 0.5 82.5 ± 0.7 Batchnorm 80.0 ± 0.5 79.8 ± 1.6 77.2 ± 1.1 77.0 ± 1.7 75.0 ± 0.9 73.7 ± 2.0 76.0 ± 1.1 WeightNorm 83.7 ± 0.8 82.9 ± 0.8 82.2 ± 0.9 82.5 ± 0.6 81.9 ± 1.2 78.1 ± 1.3 56.6 ± 2.6 LayerNorm 84.3 ± 0.3 84.3 ± 0.5 84.0 ± 0.2 82.5 ± 0.8 80.9 ± 1.8 78.7 ± 2.3 78.8 ± 0.8 Highway 83.3 ± 0.9 83.0 ± 0.5 82.6 ± 0.9 82.4 ± 0.8 80.3 ± 1.4 80.3 ± 2.4 79.6 ± 0.8 MSRAinit 82.7 ± 0.4 81.6 ± 0.9 81.1 ± 1.7 80.6 ± 0.6 80.9 ± 1.1 80.2 ± 1.1 80.4 ± 1.9 ResNet 82.2 ± 1.1 80.0 ± 2.0 80.5 ± 1.2 81.2 ± 0.7 81.8 ± 0.6 81.2 ± 0.6 na Astronomy: Prediction of pulsars in the HTRU2 dataset. Since a decade, machine learning methods have been used to identify pulsars in radio wave signals [22]. Recently, the High Time Resolution Universe Survey (HTRU2) dataset has been released with 1,639 real pulsars and 16,259 spurious signals. Currently, the highest AUC value of a 10-fold cross-validation is 0.976 which has been achieved by Naive Bayes classifiers followed by decision tree C4.5 with 0.949 and SVMs with 0.929. We used eight features constructed by the PulsarFeatureLab as used previously [22]. We assessed the performance of FNNs using 10-fold nested cross-validation, where the hyperparameters were selected in the inner loop on a validation set (for details see Supplementary Section S4). Table 3 reports the results in terms of AUC. SNNs outperform all other methods and have pushed the state-of-the-art to an AUC of 0.98. Table 3: Comparison of FNNs and reference methods at HTRU2 in terms of AUC. The first, fourth and seventh column give the method, the second, fifth and eight column the AUC averaged over 10 cross-validation folds, and the third and sixth column the p-value of a paired Wilcoxon test of the AUCs against the best performing method across the 10 folds. FNNs achieve better results than Naive Bayes (NB), C4.5, and SVM. SNNs exhibit the best performance and set a new record. FNN methods FNN methods ref. methods method AUC p-value method AUC p-value method AUC SNN 0.9803 ± 0.010 MSRAinit 0.9791 ± 0.010 3.5e-01 LayerNorm 0.9762* ± 0.011 1.4e-02 NB 0.976 WeightNorm 0.9786* ± 0.010 2.4e-02 BatchNorm 0.9760 ± 0.013 6.5e-02 C4.5 0.946 Highway 0.9766* ± 0.009 9.8e-03 ResNet 0.9753* ± 0.010 6.8e-03 SVM 0.929 SNNs and convolutional neural networks. In initial experiments with CNNs, we found that SELU activations work well at image classification tasks: On MNIST, SNN-CNNs (2x Conv, MaxPool, 2x fully-connected, 30 Epochs) reach 99.2%±0.1 accuracy (ReLU: 99.2%±0.1) and on CIFAR10 (2x Conv, MaxPool, 2x Conv, MaxPool, 2x fully-connected, 200 Epochs) SNN-CNNs reach 82.5±0.8% 8 accuracy (ReLU: 76.1±1.0%). This finding unsurprising since even standard ELUs without the self-normalizing property have been shown to improve CNN training and accuracy[5]. 4 Conclusion To summarize, self-normalizing networks work well with the following configuration: • SELU activation with parameters λ ≈1.0507 and α ≈1.6733, • inputs normalized to zero mean and unit variance, • network weights initialized with variance 1/n, and • regularization with “alpha-dropout”. We have introduced self-normalizing neural networks for which we have proved that neuron activations are pushed towards zero mean and unit variance when propagated through the network. Additionally, for activations not close to unit variance, we have proved an upper and lower bound on the variance mapping. Consequently, SNNs do not face vanishing and exploding gradient problems. Therefore, SNNs work well for architectures with many layers, allowed us to introduce a novel regularization scheme and learn very robustly. On 121 UCI benchmark datasets, SNNs have outperformed other FNNs with and without normalization techniques, such as batch, layer, and weight normalization, or specialized architectures, such as Highway or Residual networks. SNNs also yielded the best results on drug discovery and astronomy tasks. The best performing SNN architectures are typically very deep in contrast to other FNNs. References [1] Ba, J. L., Kiros, J. R., and Hinton, G. (2016). Layer normalization. arXiv preprint arXiv:1607.06450. [2] Bengio, Y. (2013). Deep learning of representations: Looking forward. In Proceedings of the First International Conference on Statistical Language and Speech Processing, pages 1–37, Berlin, Heidelberg. [3] Bradley, R. C. (1981). Central limit theorems under weak dependence. Journal of Multivariate Analysis, 11(1):1–16. [4] Cire¸san, D. and Meier, U. (2015). Multi-column deep neural networks for offline handwritten chinese character classification. In 2015 International Joint Conference on Neural Networks (IJCNN), pages 1–6. IEEE. [5] Clevert, D.-A., Unterthiner, T., and Hochreiter, S. (2015). Fast and accurate deep network learning by exponential linear units (ELUs). 5th International Conference on Learning Representations, arXiv:1511.07289. [6] Desjardins, G., Simonyan, K., Pascanu, R., et al. (2015). Natural neural networks. In Advances in Neural Information Processing Systems, pages 2071–2079. [7] Dugan, P., Clark, C., LeCun, Y., and Van Parijs, S. (2016). Phase 4: Dcl system using deep learning approaches for land-based or ship-based real-time recognition and localization of marine mammals-distributed processing and big data applications. arXiv preprint arXiv:1605.00982. [8] Esteva, A., Kuprel, B., Novoa, R., Ko, J., Swetter, S., Blau, H., and Thrun, S. (2017). Dermatologist-level classification of skin cancer with deep neural networks. Nature, 542(7639):115–118. [9] Fernández-Delgado, M., Cernadas, E., Barro, S., and Amorim, D. (2014). Do we need hundreds of classifiers to solve real world classification problems. Journal of Machine Learning Research, 15(1):3133–3181. [10] Graves, A., Mohamed, A., and Hinton, G. (2013). Speech recognition with deep recurrent neural networks. In IEEE International conference on acoustics, speech and signal processing (ICASSP), pages 6645–6649. [11] Graves, A. and Schmidhuber, J. (2009). Offline handwriting recognition with multidimensional recurrent neural networks. In Advances in neural information processing systems, pages 545–552. [12] Gulshan, V., Peng, L., Coram, M., Stumpe, M. C., Wu, D., Narayanaswamy, A., Venugopalan, S., Widner, K., Madams, T., Cuadros, J., et al. (2016). Development and validation of a deep learning algorithm for detection of diabetic retinopathy in retinal fundus photographs. JAMA, 316(22):2402–2410. 9 [13] He, K., Zhang, X., Ren, S., and Sun, J. (2015a). Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR). [14] He, K., Zhang, X., Ren, S., and Sun, J. (2015b). Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 1026–1034. [15] Hochreiter, S. and Schmidhuber, J. (1997). Long short-term memory. Neural Computation, 9(8):1735– 1780. [16] Huval, B., Wang, T., Tandon, S., et al. (2015). An empirical evaluation of deep learning on highway driving. arXiv preprint arXiv:1504.01716. [17] Ioffe, S. and Szegedy, C. (2015). Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of The 32nd International Conference on Machine Learning, pages 448–456. [18] Korolev, V. and Shevtsova, I. (2012). An improvement of the Berry–Esseen inequality with applications to Poisson and mixed Poisson random sums. Scandinavian Actuarial Journal, 2012(2):81–105. [19] Krizhevsky, A., Sutskever, I., and Hinton, G. (2012). Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems, pages 1097–1105. [20] LeCun, Y. and Bengio, Y. (1995). Convolutional networks for images, speech, and time series. The handbook of brain theory and neural networks, 3361(10):1995. [21] LeCun, Y., Bengio, Y., and Hinton, G. (2015). Deep learning. Nature, 521(7553):436–444. [22] Lyon, R., Stappers, B., Cooper, S., Brooke, J., and Knowles, J. (2016). Fifty years of pulsar candidate selection: From simple filters to a new principled real-time classification approach. Monthly Notices of the Royal Astronomical Society, 459(1):1104–1123. [23] Mayr, A., Klambauer, G., Unterthiner, T., and Hochreiter, S. (2016). DeepTox: Toxicity prediction using deep learning. Frontiers in Environmental Science, 3:80. [24] Sak, H., Senior, A., Rao, K., and Beaufays, F. (2015). Fast and accurate recurrent neural network acoustic models for speech recognition. arXiv preprint arXiv:1507.06947. [25] Salimans, T. and Kingma, D. P. (2016). Weight normalization: A simple reparameterization to accelerate training of deep neural networks. In Advances in Neural Information Processing Systems, pages 901–909. [26] Schmidhuber, J. (2015). Deep learning in neural networks: An overview. Neural Networks, 61:85–117. [27] Silver, D., Huang, A., Maddison, C., et al. (2016). Mastering the game of Go with deep neural networks and tree search. Nature, 529(7587):484–489. [28] Srivastava, R. K., Greff, K., and Schmidhuber, J. (2015). Training very deep networks. In Advances in Neural Information Processing Systems, pages 2377–2385. [29] Sutskever, I., Vinyals, O., and Le, Q. V. (2014). Sequence to sequence learning with neural networks. In Advances in Neural Information Processing Systems, pages 3104–3112. [30] Wainberg, M., Alipanahi, B., and Frey, B. J. (2016). Are random forests truly the best classifiers? Journal of Machine Learning Research, 17(110):1–5. 10 | 2017 | 240 |
6,720 | Fast amortized inference of neural activity from calcium imaging data with variational autoencoders Artur Speiser12, Jinyao Yan3, Evan Archer4∗, Lars Buesing4†, Srinivas C. Turaga3‡ and Jakob H. Macke1‡§ 1research center caesar, an associate of the Max Planck Society, Bonn, Germany 2IMPRS Brain and Behavior Bonn/Florida 3HHMI Janelia Research Campus 4Columbia University artur.speiser@caesar.de, turagas@janelia.hhmi.org, jakob.macke@caesar.de Abstract Calcium imaging permits optical measurement of neural activity. Since intracellular calcium concentration is an indirect measurement of neural activity, computational tools are necessary to infer the true underlying spiking activity from fluorescence measurements. Bayesian model inversion can be used to solve this problem, but typically requires either computationally expensive MCMC sampling, or faster but approximate maximum-a-posteriori optimization. Here, we introduce a flexible algorithmic framework for fast, efficient and accurate extraction of neural spikes from imaging data. Using the framework of variational autoencoders, we propose to amortize inference by training a deep neural network to perform model inversion efficiently. The recognition network is trained to produce samples from the posterior distribution over spike trains. Once trained, performing inference amounts to a fast single forward pass through the network, without the need for iterative optimization or sampling. We show that amortization can be applied flexibly to a wide range of nonlinear generative models and significantly improves upon the state of the art in computation time, while achieving competitive accuracy. Our framework is also able to represent posterior distributions over spike-trains. We demonstrate the generality of our method by proposing the first probabilistic approach for separating backpropagating action potentials from putative synaptic inputs in calcium imaging of dendritic spines. 1 Introduction Spiking activity in neurons leads to changes in intra-cellular calcium concentration which can be measured by fluorescence microscopy of synthetic calcium indicators such as Oregon Green BAPTA-1 [1] or genetically encoded calcium indictors such as GCaMP6 [2]. Such calcium imaging has become important since it enables the parallel measurement of large neural populations in a spatially resolved and minimally invasive manner [3, 4]. Calcium imaging can also be used to study neural activity at subcellular resolution, e.g. for measuring the tuning of dendritic spines [5, 6]. However, due to the indirect nature of calcium imaging, spike inference algorithms must be used to infer the underlying neural spiking activity leading to measured fluorescence dynamics. ∗current affiliation: Cogitai.Inc †current affiliation: DeepMind ‡equal contribution §current primary affiliation: Centre for Cognitive Science, Technical University Darmstadt 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Most commonly-used approaches to spike inference [7, 8, 9, 10, 11, 12, 13, 14] are based on carefully designed generative models that describe the process by which spiking activity leads to fluorescence measurements. Spikes are treated as latent variables, and spike-prediction is performed by inferring both the parameters of the model and the spike latent variables from fluorescence time series, or “traces” [7, 8, 9, 10]. The advantage of this approach is that it does not require extensive ground truth data for training, since simultaneous electrophysiological and fluorescence recordings of neural activity are difficult to acquire, and that prior knowledge can be incorporated in the specification of the generative model. The accuracy of the predictions depends on the faithfulness of the generative model of the transformation of spike trains into fluorescence measurements [14, 12]. The disadvantage of this approach is that spike-inference requires either Markov-Chain Monte Carlo (MCMC) or Sequential Monte-Carlo techniques to sample from the posterior distribution over spike-trains or alternatively, iterative optimization to obtain an approximate maximum a-posteriori (MAP) prediction. Currently used approaches rely on bespoke, model-specific inference algorithms, which can limit the flexibility in designing suitable generative models. Most commonly used methods are based on simple phenomenological (and often linear) models [7, 8, 9, 10, 13]. Recently, a small number of cell-attached electrophysiological recordings of neural activity have become available, with simultaneous fluorescence calcium measurements in the same neurons. This has made it possible to train powerful and fast classifiers to perform spike-inference in a discriminative manner, precluding the need for accurate generative models of calcium dynamics [15]. The disadvantage of this approach is that it can require large labeled data-sets for every new combination of calcium indicator, cell-type and microscopy method, which can be expensive or impossible to acquire. Further, these discriminative methods do not easily allow the incorporation of prior knowledge about the generative process. Finally, current classification approaches yield only pointwise predictions of spike probability (i.e. firing rates), independent across time, and ignore temporal correlations in the posterior distribution of spikes. Sampled spikes Predicted probability Forward RNN 1D CNN Backward RNN Figure 1: Amortized inference for predicting spikes from imaging data. A) Our goal is to infer a spike train s from an observed time-series of fluorescence-measurements f. We assume that we have a generative model of fluorescence given spikes with (unknown) parameters θ, and we simultaneously learn θ as well as a ‘recognition model’ which approximates the posterior over spikes s given f and which can be used for decoding a spike train from imaging data. B) We parameterize the recognition-model by a multi-layer network architecture: Fluorescence-data is first filtered by a deep 1D convolutional network (CNN), providing input to a stochastic forward running recurrent neural network (RNN) which predicts spike-probabilities and takes previously sampled spikes as additional input. An additional deterministic RNN runs backward in time and provides further context. Here, we develop a new spike inference framework called DeepSpike (DS) based on the variational autoencoder technique which uses stochastic variational inference (SVI) to teach a classifier to predict spikes in an unsupervised manner using a generative model. This new strategy allows us to combine the advantages of generative [7] and discriminative approaches [15] into a single fast classifier-based method for spike inference. In the variational autoencoder framework, the classifier is called a recognition model and represents an approximate posterior distribution over spike trains from which samples can be drawn in an efficient manner. Once trained to perform spike inference on one dataset, the recognition model can be applied to perform inference on statistically similar datasets without any retraining: The computational cost of variational spike inference is amortized, dramatically speeding up inference at test-time by exploiting fast, classifier based recognition models. 2 We introduce two recognition models: The first is a temporal convolutional network which produces a posterior distribution which is factorized in time, similar to standard classifier-based methods [15]. The second is a recurrent neural network-based recognition model, similar to [16, 17] which can represent any correlated posterior distribution in the non-parametric limit. Once trained, both models perform spike inference with state-of-the-art accuracy, and enable simultaneous spike inference for populations as large as 104 in real time on a single GPU. We show the generality of this black-box amortized inference method by demonstrating its accuracy for inference with a classic linear generative model [7, 8], as well as two nonlinear generative models [12]. Finally, we show an extension of the spike inference method to simultaneous inference and demixing of synaptic inputs from backpropagating somatic action potentials from simultaneous somatic and dendritic calcium imaging. 2 Amortized inference using variational autoencoders 2.1 Approach and training procedure We observe fluorescence traces f i t, t = 1 . . . T i representing noisy measurements of the dynamics of somatic calcium concentration in neurons i = 1 . . . N. We assume a parametrised, probabilistic, differentiable generative model pθi(f|s) with (unknown) parameters θi. The generative model predicts a fluorescence trace given an underlying binary spike train si, where si t = 1 indicates that the neuron i produced an action potential in the interval indexed by t. Our goal is to infer a latent spike-train s given only fluorescence observations f. We will solve this problem by training a deep neural network as a “recognition model” [18, 19, 20] parametrized by weights φ. Use of a recognition model enables fast computation of an approximate posterior distribution over spike trains from a fluorescence trace qφ(s|f). We will share one recognition model across multiple cells, i.e. that qφ(si|f i) ≈pθi(si|f i) for each i. We describe an unsupervised training procedure which jointly optimizes parameters of the generative model θ and the recognition network φ in order to maximize a lower bound on the log likelihood of the observed data, log p(f) [19, 18, 20]. We learn the parameters φ and θ simultaneously by jointly maximizing LK(θ, φ), a multi-sample importance-weighting lower bound on the log likelihood log p(f) given by [21] LK(θ, φ) = Es1,...,sK∼qφ(s|f) " log 1 K K X k=1 pθ(sk, f) qφ(sk|f) # ≤log p(f), (1) where sk are spike trains sampled from the recognition model qφ(s|f). This stochastic objective involves drawing K samples from the recognition model, and evaluating their likelihood by passing them through the generative model. When K = 1, the bound reduces to the evidence lower bound (ELBO). Increasing K yields a tighter lower bound (than the ELBO) on the marginal log likelihood, at the cost of additional training time. We found that increasing the number of samples leads to better fits of the generative model; in our experiments, we used K = 64. To train θ and φ by stochastic gradient ascent, we must estimate the gradient ∇φ,θL(θ, φ). As our recognition model produces an approximate posterior over binary spike trains, the gradients have to be estimated based on samples. Obtaining functional estimates of the gradients ∇φL(θ, φ) with respect to parameters of the recognition model is challenging and relies on constructing effective control variates to reduce variance [22]. We use the variational inference for monte carlo objectives (VIMCO) approach of [23] to produce low-variance unbiased estimates of the gradients ∇φ,θLK(θ, φ). The generative training procedure could be augmented with a supervised cost term [24, 25], resulting in a semi-supervised training method. Gradient optimization: We use ADAM [26], an adaptive gradient update scheme, to perform online stochastic gradient ascent. The training data is cut into short chunks of several hundred time-steps and arranged in batches containing samples from a single cell. As we train only one recognition model but multiple generative models in parallel, we load the respective generative model and ADAM parameters at each iteration. Finally, we use norm-clipping to scale the gradients acting on the recognition model: the norm of all gradients is calculated, and if it exceeds a fixed threshold the gradients are rescaled. While norm-clipping was introduced to prevent exploding gradients in RNNs 3 [27], we found it to be critical to achieve high performance both for RNN and CNN architectures in our learning problem. Very small threshold values (0.02) empirically yielded best results. 2.2 Generative models pθ(f|s) To demonstrate that our computational strategy can be applied to a wide range of differentiable models in a black-box manner, we consider four generative models: a simple, but commonly used linear model of calcium dynamics [7, 8, 9, 10], two more sophisticated nonlinear models which additionally incorporate saturation and facilitation resulting from the dynamics of calcium binding to the calcium sensor, and finally a multi-dimensional model for dendritic imaging data. Linear auto-regressive generative model (SCF): We use the name SCF for the classic linear convolutional generative model used in [7, 8, 9, 10], since this generative process is described by the Spikes st, which linearly impact Calcium concentration ct, which in turn determines the observed Fluorescence intensity ft, ct = p X t′=1 γt′ct−t′ + δst, ft = αct + β + et, (2) with linear auto-regressive dynamics of order p for the calcium concentration with parameters γ, spike-amplitude δ, gain α, constant fluorescence baseline β, and additive measurement noise et ∼N(0, σ2). Nonlinear auto-regressive and sensor dynamics generative models (SCDF & MLphys): As examples of nonlinear generative models [28], we consider two simple models of the discrete-time dynamics of the calcium sensor or dye. In the first (SCDF), the concentration of fluorescent dye molecules dt is a function of the somatic Calcium concentration ct, and has Dynamics dt −dt−1 = κoncη t ([D] −dt−1) −κoffdt−1, ft = αdt + β + et, (3) where κon and κoffare the rates at which the calcium sensor binds and unbinds calcium ions, and η is a Hill coefficient. We constrained these parameters to be non-negative. [D] is the total concentration of the dye molecule in the soma, which sets the maximum possible value of dt. The richer dynamics of the SCDF model allow for facilitation of fluorescence at low firing rates, and saturation at high rates. The parameters of the SCDF model are θ = {α, β, γ, κon, κoff, η, [D], σ2}. The second nonlinear model (MLphys) is a discrete-time version of the MLspike generative model [12], simplified by not including a model of the time-varying baseline. The dynamics for ft and ct are as above, with δ = 1. We replace the dynamics for dt by dt −dt−1 = 1 τon (1 + ω((c0 + ct)η −cη 0))( ((c0 + ct)η −cη 0) (1 + ω((c0 + ct)η −cη 0)) −dt−1). (4) Multi-dimensional soma + dendrite generative model (DS-F-DEN): The dendritic generative model is a multi-dimensional SCDF model that incorporates back-propagating action potentials (bAPs). The calcium concentration at the cell body (superscript c) is generated as for SCDF, whereas for the spine (superscript s), there are two components: synaptic inputs and bAPs from the soma, cc t = p X t′=1 γc t′cc t−t′ + δcsc t, cs t = p X t′=1 γs t′cs t−t′ + δsss t + δbssc t, (5) where δbs are the amplitude coefficients of bAPs for different spine locations, and c ∈{1, ..., Nc}, s ∈{1, ..., Ns}. The spines and soma share the same dye dynamics as in (3). The parameters of the dendritic integration model are θ = {αs,c, βs,c, γs,c, κon, κoff, η, [D], σ2 s,c}. We note that this simple generative model does not attempt to capture the full complexity of nonlinear processing in dendrites (e.g. it does not incorporate nonlinear phenomena such as dendritic plateau potentials). Its goal is to separate local influences (synaptic inputs) from global events (bAPs, or potentially regenerative dendritic events). 4 2.3 Recognition models: parametrization of the approximate posterior qφ(s|f) The goal of the recognition model is to provide a fast and efficient approximation qφ(s|f) to the true posterior p(s|f) over discrete latent spike trains s. We will use both a factorized, localized approximation (parameterized as a convolutional neural network), and a more flexible, non-factorized and non-localized approximation (parameterized using additional recurrent neural networks). Convolutional neural network: Factorized posterior approximation (DS-F) In [15], it was reported that good spike-prediction performance can be achieved by making the spike probability qφ(st|ft−τ...t+τ) depend on a local window of the fluorescence trace of length 2τ + 1 centered at t when training such a model fully supervised. We implement a scaled up version of this idea, using a deep neural network which is convolutional in time as the recognition model. We use architectures with up to five hidden layers and ≈20 filters per layer with Leaky ReLUs units [29]. The output layer uses a sigmoid nonlinearity to compute the Bernoulli spike probabilities qφ(st|f). Recurrent neural network: Capturing temporal correlations in the posterior (DS-NF) The fully-factorized posterior approximation (DS-F) above ignores temporal correlations in the posterior over spike trains. Such correlations can be useful in modeling uncertainty in the precise timing of a spike, which induces negative correlations between nearby time bins. To model temporal correlations, we developed a RNN-based non-factorizing distribution which can approach the true posterior in the non-parametric limit (see figure 1B). Similar to [16], we use the temporal ordering over spikes and factorize the joint distribution over spikes as qφ(s|f) = Q t qφ(st|f, s0, ..., st−1), by conditioning spikes at t on all previously sampled spikes. Our RNN uses a CNN as described above to extract features from the input trace. Additional input is provided by a a backwards RNN which also receives input from the CNN features. The outputs of the forward RNN and CNN are transformed into Bernoulli spike probabilities qφ(st|f) through a dense sigmoid layer. This probability and the sample drawn from it are relayed to the forward RNN in the next time step. Forward and backward RNN have a single layer with 64 gated recurrent units each [30]. 2.4 Details of synthetic and real data and evaluation methodology We evaluated our method on simulated and experimental data. From our SCF and SCDF generative models for spike-inference, we simulated traces of length T = 104 assuming a recording frequency of 60 Hz. Initial parameters where obtained by fitting the models to real data (see below), and heterogeneity across neurons was achieved by randomly perturbing parameters. We used 50 neurons each for training and validation and 100 neurons in the test set. For each cell, we generated three traces with firing rates of 0.6, 0.9 and 1.1 Hz, assuming i.i.d. spikes. Finally, we compared methods on two-photon imaging data from 9 + 11 cells from [2], which is available at www.crcns.org. Layer 2/3 pyramidal neurons in mouse visual cortex were imaged at 60 Hz using the genetically encoded calcium-indicators GCaMP6s and GCaMP6f, while action-potentials were measured electrophysiologically using cell-attached recordings. Data was pre-processed by removing a slow moving baseline using the 5th percentile in a window of 6000 time steps. Furthermore we used this baseline estimate to calculate ∆F/F. Cross-validated results where obtained using 4 folds, where we trained and validated on 3/4 of the cells in each dataset and tested on the remaining cells to highlight the potential for amortized inference. Early stopping was performed based on the the correlation achieved on the train/validation set, which was evaluated every 100 update steps. We report results using the cross-correlation between true and predicted spike-rates, at the sampling discretization of 16.6 ms for simulated data and 40 ms for real data. As the predictions of our DS-NF model are not deterministic, we sample 30 times from the model and average over the resulting probability distributions to obtain an estimate of the marginal probability before we calculate crosscorrelations. We used multiple generative models to show that our inference algorithm is not tied to a particular model: SCDF for the experiments depicted in Fig. 2, SCF for a comparison with established methods based on this linear model (Table 1, column 1), and MLphys on real data as it is used by the current state-of-the-art inference algorithm (Table 1, columns 2 & 3, Fig. 3). 5 0 2 4 6 8 A True spikes Trace Reconstruction | DS-F Reconstruction | DS-NF 0.0 0.5 1.0 Marginal probability Sampled spiketrains 0 2 4 6 8 Time in seconds 0.4 0.6 0.8 1.0 Amortized network 0.4 0.6 0.8 1.0 Single cell inference Mean correlation: 0.77 Mean correlation: 0.80 C 0 100 200 300 400 500 500 400 300 200 100 0 Correlated posterior Loglikelihood (True spiketrain) D 0.4 0.6 0.8 1.0 Factorized posterior 0.4 0.6 0.8 1.0 Correlation (Marginal probability) 0 1 2 3 Sampled spikes / True spike 0 100 200 300 B DS-F DS-NF Figure 2: Model-inversion with variational autoencoders, simulated data A) Illustration of factorized (CNN, DS-F) and non-factorized posterior approximation (RNN, DS-NF) on simulated data (SCDF generative model). DS-NF yields more accurate reconstructions, but both methods lead to similar marginal predictions (i.e. predicted firing rates, bottom). B) Number of spikes sampled for every true spike for the factorized (red) and non-factorized (red) posterior. The correlated posterior consistently samples the correct number of spikes while still accounting for the uncertainty in the spike timing. C) Performance of amortized vs non-amortized inference on simulated data. D) Scatter plots of achieved log-likelihood of the true spike train under the posterior model (top) and achieved correlation coefficients between the marginalized spiking probabilities and true spike trains (bottom). 3 Results 3.1 Stochastic variational spike inference of factorized and correlated posteriors We first illustrate our approach on synthetic data, and compare our two different architectures for recognition models. We simulated data from the SCDF nonlinear generative model and trained DeepSpike unsupervised using the same SCDF model. While only the more expressive recognition model (DS-NF) is able to achieve a close-to-perfect reconstructions of the fluorescence traces (Fig. 2 A, top row), both approaches yield similar marginal firing rate predictions (second row). However, as the factorized model does not model correlations in the posterior, it yields higher variance in the number of spikes reconstructed for each true spike (Fig. 2 B). This is because the factorized model can not capture that a fluorescence increase might be ‘explained away’ by a spike that has just been sampled, i.e. it can not capture the difference between uncertainty in spike-timing and uncertainty in (local) spike-counts. Therefore, while both approaches predict firing rates similarly well on simulated data (as quantified using correlation, Fig. 2 D), the DS-NF model assigns higher posterior probability to the true spike trains. 3.2 Amortizing inference leads to fast and accurate test-time inference In principle, our unsupervised learning procedure could be re-trained on every data-set of interest. However, it also allows for amortizing inference by sharing one recognition model across multiple cells, and applying the recognition model directly on new data without additional training for fast test-time performance. Amortized inference allows for the recognition model to be used for inference in the same way as a network that was trained fully supervised. Since there is no variational optimization at test time, inference with this network is just as fast as inference with a supervised network. Similarly to supervised learning, there will be limitations on the ability of this network to generalize to different imaging conditions or indicators that where not included in the training set. To test if our recognition model generalizes well enough for amortized inference to work across multiple cells, as well as on cells it did not see during training, we trained one DS-NF model on 50 6 cells (simulated data, SCDF) and evaluated its performance on a non-overlapping set of 30 cells. For comparison, we also trained 30 DS-NF models separately, on each of those cells– this amounts to standard variational inference using a neural network to parametrize the posterior approximation, but without amortizing inference. We found that amortizing inference only causes a small drop in performance (Fig. 2 C). However, this drop in performance is offset by the the large gain in computational efficiency as training a neural network takes several orders of magnitude more time then applying it at test time. Inference using the DS-F model only requires a single forward pass through a convolutional network to predict firing rates, and DS-NF requires running a stochastic RNN for each sampled spike train. While the exact running-time of each of these applications will depend on both implementation and hardware, we give rough indications of computational speed number estimated on an Intel(R) Xeon(R) CPU E5-2697 v3. On the CPU, our DS-F approach takes 0.05 s to process a single trace of 10K time steps, when using a network appropriate for 60 Hz data. This is on the same order as the 0.07 s (Intel Core i5 2.7 GHz CPU) reported by [31] for their OASIS algorithm, which is currently the fastest available implementation for constrained deconvolution (CDEC) of SCF, but restricted to this linear generative model. The DS-NF algorithm requires 4.6 s which still compares favourably to MLspike which takes 9.2 s (evaluated on the same CPU). As our algorithm is implemented in Theano [32] it can be easily accelerated and allows for massive parallelization on a single GPU. On a GTX Titan X, DS-F and DS-NF take 0.001 s and 1.5 s, respectively. When processing 500 traces in parallel, DS-NF becomes only 2.5 times slower. Extrapolating from these results, this implies that even when using the DS-NF algorithm, we would be able to perform spike-inference on 1 hour of recordings at 60 Hz for 500 cells in less then 90 s. Table 1: Performance comparison. Values are correlations between predicted marginal probabilities and ground truth spikes. Dataset Dendritic dataset Algorithm SCF-Sim. GCaMP6s GCaMP6f Soma Spine DS-F 0.88 ± 0.01 0.74 ± 0.02 0.74 ± 0.02 DS-NF 0.89 ± 0.01 0.72 ± 0.02 0.73 ± 0.02 CDEC [10] 0.86 ± 0.01 0.39 ± 0.03 * 0.58 ± 0.02 * MCMC [9] 0.87 ± 0.01 0.47 ± 0.03 * 0.53 ± 0.03 * MLSpike [12] 0.60 ± 0.02 * 0.67 ± 0.01 * DS-F-DEN 0.84 ± 0.01 0.78 ± 0.01 Foopsi-RR [2] 0.66 ± 0.02 0.60 ± 0.01 3.3 DS achieves competitive results on simulated and publicly available imaging data The advantages of our framework (black-box inference for different generative models, fast testtime performance through amortization, correlated posteriors through RNNs) are only useful if the approach can also achieve competitive performance. To demonstrate that this is the case, we compare our approach to alternative generative-model based spike prediction methods on data sampled from the SCF model– as this is the generative model underlying commonly used methods [10, 9], it is difficult to beat their performance on this data. We find that both DS-F and DS-NF achieve competitive performance, as measured by correlation between predicted firing rates and true (simulated) spike trains (Table 1, left column. Values are means and standard error of the mean calculated over cells). To evaluate our performance on real data we compare to the current state-of-the-art method for spike inference based on generative models[12]. For these experiments we trained separate models on each of the GCaMP variants using the MLspike generative model. We achieve competitive accuracy to the results in [12] (see Table 1, values marked with an asterisk are taken from [12], Fig. 6d) and clearly outperform methods that are based on the linear SCF model. We note that, while our method performs inference in an unsupervised fashion and is trained using an un-supervised objective, we initialized our generative model with the mean values given in [12] (Fig. S6a), which were obtained using ground truth data. An example of inference and reconstruction using the DS-NF model is shown in Fig. 3. The reconstruction based on the true spikes (purple line) was obtained using the generative model parameters which had been acquired from unsupervised learning. This explains why the reconstruction using the inferred spikes is more accurate and suggests that there is a mismatch 7 Corr: 0.73 Spikes: 41.74 / 35.0 GCaMP6s Corr. posterior True spikes Trace Prediction | Infered spiketrain Prediction | True spiketrain 0.0 0.5 1.0 Marginal probability 0 10 20 30 40 50 Time in seconds Figure 3: Inference and reconstruction using the DS-NF algorithm on GECI data. The reconstruction based on the inferred spike trains (blue) shows that the algorithm converges to a good joint model while the reconstruction based on the true spikes (purple) shows a mismatch of the generative model for high activity which results in an overestimate of the overall firing rate. between the MLphys model and the true data-generating generating process. Developing more accurate generative models would therefore likely further increase the performance of the algorithm. True soma spikes Soma trace 0.0 0.5 1.0 Marginal probability Inferred: DS-F-DEN Inferred: FOOPSI-RR True synaptic inputs Spine trace 0 2 4 6 8 10 12 Time in seconds 0.0 0.5 1.0 Marginal probability Cell cartoon Figure 4: Inference of somatic spikes and synaptic input spikes from simulated dendritic imaging data. We simulated imaging data from our generative model, and compared our approach (DS-F-DEN) to an analysis inspired by [2] (Foopsi-RR), and found that our method can extract synaptic inputs more accurately. Traces at the soma and spines are used to infer somatic spikes and synaptic inputs at spines. Top: somatic trace and predictions. DS-F-DEN produces better predictions at the soma since it uses all traces to infer global events. Bottom: spine trace and predictions. DS-F-DEN performs better in terms of extracting synaptic inputs. 3.4 Extracting putative synaptic inputs from calcium imaging in dendritic spines We generalized the DeepSpike variational-inference approach to perform simultaneous inference of backpropagating APs and synaptic inputs, imaged jointly across the entire neuronal dendritic arbor. We illustrate this idea on synthetic data based on the DS-F-DEN generative model (5). We simulated 15 cells each with 10 dendritic spines with a range of firing rates and noise levels. We then used a multi-input multi-output convolutional neural network (CNN, DS-F) in the non-amortized setting to infer a fully-factorized Bernoulli posterior distribution over global action potentials and local synaptic events. We compared our results to an analysis technique inspired by [2] which we call Foopsi-RR. We first apply constrained deconvolution [33] to somatic and dendritic calcium traces, and then use robust 8 linear regression to identify and subtract deconvolved components of the spine signal that correlated with global back-propagated action potential. Compared to the method suggested by [2], our model is significantly more accurate. The average correlation of our model is 0.84 for soma and 0.78 for spines, whereas for Foopsi-RR the average correlation is 0.66 for soma and 0.60 for spines (Table 1). 4 Discussion Spike inference is an important step in the analysis of fluorescence imaging. We here propose a strategy based on variational autoencoders that combines the advantages of generative [7] and discriminative approaches [15]. The generative model makes it possible to incorporate knowledge about underlying mechanisms and thus learn from unlabeled data. A simultaneously-learned recognition network allows fast test-time performance, without the need for expensive optimization or MCMC sampling. This opens up the possibility of scaling up spike inference to very large neural populations [34], and to real-time and closed-loop applications. Furthermore, our approach is able to estimate full posteriors rather than just marginal firing rates. It is likely that improvements in performance and interpretability will result from the design of better, biophysically accurate and possibly dye-, cell-type- and modality-specific models of the fluorescence measurement process, the dynamics of neurons [28] and indicators, as well as from taking spatial information into account. Our goal here is not to design such models or to improve accuracy per se, but rather to develop an inference strategy which can be applied to a large class of such potential generative models without model-specific modifications: A trained recognition model that can invert, and provide fast test-time performance, for any such model while preserving performance in spike-detection. Our recognition model is designed to serve as the common approximate posterior for multiple, possibly heterogeneous populations of cells, requiring an expressive model. These assumptions are supported by prior work [15] and our results on simulated and publicly available data, but might be suboptimal or not appropriate in other contexts, or for other performance measures. In particular, we emphasize that our comparisons are based on a specific data-set and performance measure which is commonly used for comparing spike-inference algorithms, but which can in itself not provide conclusive evidence for performance in other settings and measures. Our approach includes rich posterior approximations [35] based on RNNs to make predictions using longer context-windows and modelling posterior correlations. Possible extensions include causal recurrent recognition models for real-time spike inference, which would require combining them with fast algorithms for detecting regions of interest from imaging-movies [10, 36]. Another promising avenue is extending our variational inference approach so it can also learn from available labeled data to obtain a semisupervised algorithm [37]. As a statistical problem, spike inference has many similarities with other analysis problems in biological imaging– an underlying, sparse signal needs to be reconstructed from spatio-temporal imaging observations, and one has substantial prior knowledge about the image-formation process which can be encapsulated in generative models. As a concrete example of generalization, we proposed an extension to multi-dimensional inference of inputs from dendritic imaging data, and illustrated it on simulated data. We expect the approach pursued here to also be applicable in other inference tasks, such as the localization of particles from fluorescence microscopy [38]. 5 Acknowledgements We thank T. W. Chen, K. Svoboda and the GENIE project at Janelia Research Campus for sharing their published GCaMP6 data, available at http://crcns.org. We also thank T. Deneux for sharing his results for comparison and comments on the manuscript and D. Greenberg, L. Paninski and A. Mnih for discussions. This work was supported by SFB 1089 of the German Research Foundation (DFG) to J. H. Macke. A. Speiser was funded by an IMPRS for Brain & Behavior scholarship by the Max Planck Society. 9 References [1] R. Y. Tsien, “New calcium indicators and buffers with high selectivity against magnesium and protons: design, synthesis, and properties of prototype structures,” Biochemistry, vol. 19, no. 11, pp. 2396–2404, 1980. [2] T.-W. Chen, T. J. Wardill, Y. Sun, S. R. Pulver, S. L. Renninger, A. Baohan, E. R. Schreiter, R. A. Kerr, M. B. Orger, V. Jayaraman, L. L. Looger, K. Svoboda, and D. S. Kim, “Ultrasensitive fluorescent proteins for imaging neuronal activity,” Nature, vol. 499, no. 7458, pp. 295–300, 2013. [3] J. N. D. Kerr and W. Denk, “Imaging in vivo: watching the brain in action,” Nat Rev Neurosci, vol. 9, pp. 195–205, Mar 2008. [4] C. Grienberger and A. Konnerth, “Imaging calcium in neurons.,” Neuron, vol. 73, no. 5, pp. 862–885, 2012. [5] S. L. Smith, I. T. Smith, T. Branco, and M. Häusser, “Dendritic spikes enhance stimulus selectivity in cortical neurons in vivo,” Nature, vol. 503, no. 7474, pp. 115–120, 2013. [6] T.-W. Chen, T. J. Wardill, Y. Sun, S. R. Pulver, S. L. Renninger, A. Baohan, E. R. Schreiter, R. A. Kerr, M. B. Orger, V. Jayaraman, et al., “Ultrasensitive fluorescent proteins for imaging neuronal activity,” Nature, vol. 499, no. 7458, pp. 295–300, 2013. [7] J. T. Vogelstein, B. O. Watson, A. M. Packer, R. Yuste, B. Jedynak, and L. Paninski, “Spike inference from calcium imaging using sequential monte carlo methods,” Biophysical journal, vol. 97, no. 2, pp. 636–655, 2009. [8] J. T. Vogelstein, A. M. Packer, T. A. Machado, T. Sippy, B. Babadi, R. Yuste, and L. Paninski, “Fast nonnegative deconvolution for spike train inference from population calcium imaging,” Journal of neurophysiology, vol. 104, no. 6, pp. 3691–3704, 2010. [9] E. Pnevmatikakis, J. Merel, A. Pakman, L. Paninski, et al., “Bayesian spike inference from calcium imaging data,” in Signals, Systems and Computers, 2013 Asilomar Conference on, pp. 349–353, IEEE, 2013. [10] E. A. Pnevmatikakis, D. Soudry, Y. Gao, T. A. Machado, J. Merel, D. Pfau, T. Reardon, Y. Mu, C. Lacefield, W. Yang, et al., “Simultaneous denoising, deconvolution, and demixing of calcium imaging data,” Neuron, 2016. [11] E. Ganmor, M. Krumin, L. F. Rossi, M. Carandini, and E. P. Simoncelli, “Direct estimation of firing rates from calcium imaging data,” arXiv preprint arXiv:1601.00364, 2016. [12] T. Deneux, A. Kaszas, G. Szalay, G. Katona, T. Lakner, A. Grinvald, B. Rózsa, and I. Vanzetta, “Accurate spike estimation from noisy calcium signals for ultrafast three-dimensional imaging of large neuronal populations in vivo,” Nature Communications, vol. 7, 2016. [13] M. Pachitariu, C. Stringer, M. Dipoppa, S. Schröder, L. F. Rossi, H. Dalgleish, M. Carandini, and K. D. Harris, “Suite2p: beyond 10,000 neurons with standard two-photon microscopy,” bioRxiv, 2017. [14] D. Greenberg, D. Wallace, J. Vogelstein, and J. Kerr, “Spike detection with biophysical models for gcamp6 and other multivalent calcium indicator proteins,” 2015 Neuroscience Meeting Planner. Washington, DC: Society for Neuroscience, 2015. [15] L. Theis, P. Berens, E. Froudarakis, J. Reimer, M. Román Rosón, T. Baden, T. Euler, A. S. Tolias, and M. Bethge, “Benchmarking spike rate inference in population calcium imaging,” Neuron, vol. 90, no. 3, pp. 471–82, 2016. [16] A. v. d. Oord, N. Kalchbrenner, and K. Kavukcuoglu, “Pixel recurrent neural networks,” arXiv preprint arXiv:1601.06759, 2016. [17] H. Larochelle and I. Murray, “The neural autoregressive distribution estimator.,” in AISTATS, vol. 1, p. 2, 2011. [18] D. J. Rezende, S. Mohamed, and D. Wierstra, “Stochastic backpropagation and approximate inference in deep generative models,” arXiv preprint arXiv:1401.4082, 2014. [19] D. P. Kingma and M. Welling, “Auto-encoding variational bayes,” arXiv preprint arXiv:1312.6114, 2013. [20] M. Titsias and M. Lázaro-Gredilla, “Doubly stochastic variational bayes for non-conjugate inference,” in Proceedings of the 31st International Conference on Machine Learning (ICML-14), pp. 1971–1979, 2014. [21] Y. Burda, R. Grosse, and R. Salakhutdinov, “Importance weighted autoencoders,” arXiv preprint arXiv:1509.00519, 2015. [22] A. Mnih and K. Gregor, “Neural variational inference and learning in belief networks,” arXiv preprint arXiv:1402.0030, 2014. [23] A. Mnih and D. J. Rezende, “Variational inference for monte carlo objectives,” in Proceedings of the 33st International Conference on Machine Learning, 2016. 10 [24] D. P. Kingma, S. Mohamed, D. J. Rezende, and M. Welling, “Semi-supervised learning with deep generative models,” in Advances in Neural Information Processing Systems, pp. 3581–3589, 2014. [25] L. Maaloe, C. K. Sonderby, S. K. Sønderby, and O. Winther, “Improving semi-supervised learning with auxiliary deep generative models,” in NIPS Workshop on Advances in Approximate Bayesian Inference, 2015. [26] D. Kingma and J. Ba, “Adam: A method for stochastic optimization,” arXiv preprint arXiv:1412.6980, 2014. [27] R. Pascanu, T. Mikolov, and Y. Bengio, “On the difficulty of training recurrent neural networks.,” ICML (3), vol. 28, pp. 1310–1318, 2013. [28] V. Rahmati, K. Kirmse, D. Markovi´c, K. Holthoff, and S. J. Kiebel, “Inferring neuronal dynamics from calcium imaging data using biophysical models and bayesian inference,” PLoS Comput Biol, vol. 12, no. 2, p. e1004736, 2016. [29] A. L. Maas, A. Y. Hannun, and A. Y. Ng, “Rectifier nonlinearities improve neural network acoustic models,” in Proc. ICML, vol. 30, 2013. [30] K. Cho, B. Van Merriënboer, D. Bahdanau, and Y. Bengio, “On the properties of neural machine translation: Encoder-decoder approaches,” arXiv preprint arXiv:1409.1259, 2014. [31] J. Friedrich, P. Zhou, and L. Paninski, “Fast Active Set Methods for Online Deconvolution of Calcium Imaging Data,” arXiv.org, Sept. 2016. [32] J. Bergstra, O. Breuleux, F. Bastien, P. Lamblin, R. Pascanu, G. Desjardins, J. Turian, D. Warde-Farley, and Y. Bengio, “Theano: A cpu and gpu math compiler in python,” in Proc. 9th Python in Science Conf, pp. 1–7, 2010. [33] E. A. Pnevmatikakis, Y. Gao, D. Soudry, D. Pfau, C. Lacefield, K. Poskanzer, R. Bruno, R. Yuste, and L. Paninski, “A structured matrix factorization framework for large scale calcium imaging data analysis,” arXiv preprint arXiv:1409.2903, 2014. [34] M. B. Ahrens, J. M. Li, M. B. Orger, D. N. Robson, A. F. Schier, F. Engert, and R. Portugues, “Brain-wide neuronal dynamics during motor adaptation in zebrafish,” Nature, vol. 485, pp. 471–7, May 2012. [35] C. K. Sonderby, T. Raiko, L. Maaloe, S. K. Sonderby, and O. Winther, “How to train deep variational autoencoders and probabilistic ladder networks,” arXiv preprint arXiv:1602.02282, 2016. [36] N. Apthorpe, A. Riordan, R. Aguilar, J. Homann, Y. Gu, D. Tank, and H. S. Seung, “Automatic neuron detection in calcium imaging data using convolutional networks,” in Advances In Neural Information Processing Systems, pp. 3270–3278, 2016. [37] L. Maaløe, C. K. Sønderby, S. K. Sønderby, and O. Winther, “Improving semi-supervised learning with auxiliary deep generative models,” in NIPS Workshop on Advances in Approximate Bayesian Inference, 2015. [38] E. Betzig, G. H. Patterson, R. Sougrat, O. W. Lindwasser, S. Olenych, J. S. Bonifacino, M. W. Davidson, J. Lippincott-Schwartz, and H. F. Hess, “Imaging intracellular fluorescent proteins at nanometer resolution,” Science, vol. 313, no. 5793, pp. 1642–1645, 2006. 11 | 2017 | 241 |
6,721 | Asynchronous Parallel Coordinate Minimization for MAP Inference Ofer Meshi Google meshi@google.com Alexander G. Schwing Department of Electrical and Computer Engineering University of Illinois at Urbana-Champaign aschwing@illinois.edu Abstract Finding the maximum a-posteriori (MAP) assignment is a central task for structured prediction. Since modern applications give rise to very large structured problem instances, there is increasing need for efficient solvers. In this work we propose to improve the efficiency of coordinate-minimization-based dual-decomposition solvers by running their updates asynchronously in parallel. In this case messagepassing inference is performed by multiple processing units simultaneously without coordination, all reading and writing to shared memory. We analyze the convergence properties of the resulting algorithms and identify settings where speedup gains can be expected. Our numerical evaluations show that this approach indeed achieves significant speedups in common computer vision tasks. 1 Introduction Finding the most probable configuration of a structured distribution is an important task in machine learning and related applications. It is also known as the maximum a-posteriori (MAP) inference problem in graphical models [Wainwright and Jordan, 2008, Koller and Friedman, 2009], and has found use in a wide range of applications, from disparity map estimation in computer vision, to part-of-speech tagging in natural language processing, protein-folding in computational biology and others. Generally, MAP inference is intractable, and efficient algorithms only exist in some special cases, such as tree-structured graphs. It is therefore common to use approximations. In recent years, many approximate MAP inference methods have been proposed [see Kappes et al., 2015, for a recent survey]. One of the major challenges in applying approximate inference techniques is that modern applications give rise to very large instances. For example, in semantic image segmentation the task is to assign labels to all pixels in an image [e.g., Zhou et al., 2016]. This can translate into a MAP inference problem with hundreds of thousands of variables (one for each pixel). For this reason, efficiency of approximate inference algorithms is becoming increasingly important. One approach to dealing with the growth in problem complexity is to use cheap (but often inaccurate) algorithms. For example, variants of the mean field algorithm have witnessed a surge in popularity due to their impressive success in several computer vision tasks [Krähenbühl and Koltun, 2011]. A shortcoming of this approach is that it is limited to a specific type of model (fully connected graphs with Gaussian pairwise potentials). Moreover, the mean field approximation is often less accurate than other approximations, e.g., those based on convex relaxations [Desmaison et al., 2016]. In this work we study an alternative approach to making approximate MAP inference algorithms more efficient – parallel computation. Our study is motivated by two developments. First, current hardware trends increase the availability of parallel processing hardware in the form of multi-core CPUs as well as GPUs. Second, recent theoretical results improve our understanding of various asynchronous parallel algorithms, and demonstrate their potential usefulness, especially for objective functions that are typical in machine learning problems [e.g., Recht et al., 2011, Liu et al., 2015]. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Focusing on a smoothed objective function originating from a dual-decomposition approximation, we present a fully asynchronous parallel algorithm for MAP inference based on block-coordinate updates. Our approach gives rise to a message-passing procedure, where messages are computed and updated in shared memory asynchronously in parallel by multiple processing units, with no attempt to coordinate their actions. The reason we focus on asynchronous algorithms is because the runtime of synchronous algorithms is dominated by the slowest worker, which may cause the overhead from synchronization to outweigh the gain from parallelization. The asynchronous parallel setting is particularly suitable for message-passing algorithms, like the ones we study here. Our analysis is conducted under the bounded delay assumption, which is standard in the literature on asynchronous optimization and matches well modern multicore architectures. It reveals the precise relation between the delay and the expected change in objective value following an update. This result suggests a natural criterion for adaptively choosing the number of parallel workers to guarantee convergence to the optimal value. Additional analysis shows that speedups which are linear in the number of processors can be expected under some conditions. We illustrate the performance of our algorithm both on synthetic models and on a disparity estimation task from computer vision. We demonstrate 45-fold improvements or more when compared to other asynchronous optimization techniques. 2 Related Work Our work is inspired by recent advances in the study of asynchronous parallel algorithms and their successful application to various machine learning tasks. In particular, parallel versions of various sequential algorithms have been recently analyzed, adding to past work in asynchronous parallel optimization [Bertsekas and Tsitsiklis, 1989, Tseng, 1991]. Those include, for example, stochastic gradient descent [Recht et al., 2011], conditional gradient [Wang et al., 2016], ADMM [Zhang and Kwok, 2014], proximal gradient methods [Davis et al., 2016], and coordinate descent [Liu et al., 2015, Liu and Wright, 2015, Avron et al., 2015, Hsieh et al., 2015, Peng et al., 2016, You et al., 2016]. The algorithms we study here are based on block coordinate minimization, a coordinate descent method in which an optimal update is computed in closed form.1 To the best of our knowledge, this algorithm has yet to be analyzed in the asynchronous parallel setting. The analysis of this algorithm is significantly more challenging compared to other coordinate descent methods, since there is no notion of a step-size, which is carefully chosen in previous analyses to guarantee convergence [e.g., Liu et al., 2015, Avron et al., 2015, Peng et al., 2016]. Furthermore, in most previous papers, the function which is being optimized is assumed to be strongly convex, or to satisfy a slightly weaker condition [Liu et al., 2015, Hsieh et al., 2015]. In contrast, we analyze a smooth and convex MAP objective, which does not satisfy any of these strong-convexity conditions. We focus on this particular objective function since optimal block coordinate updates are known in this case, which is not true for its strongly convex counterparts [Meshi et al., 2015]. We are not the first to study parallel inference methods in graphical models. Parallel variants of Belief Propagation (BP) are proposed and analyzed by Gonzalez et al. [2011]. They present bounds on achievable gains from parallel inference on chain graphs, as well as an optimal parallelization scheme. However, the algorithms they propose include global synchronization steps, which often hurt efficiency. In contrast, we focus on the fully asynchronous setting, so our algorithms and analysis are substantially different. Piatkowski and Morik [2011] and Ma et al. [2011] also describe parallel implementations of BP, but those again involve synchronization. We are particularly interested in the MAP inference problem and use convergent coordinate minimization methods with a dualdecomposition objective. This is quite different from marginal inference with BP, used in the aforementioned works; for example, BP is not guaranteed to converge even with sequential execution. Dual-decomposition based parallel inference for graphical models has been investigated by Choi and Rutenbar [2012] and extended by Hurkat et al. [2015]. They study hardware implementations of the TRW-S algorithm (a coordinate-minimization algorithm very similar to the ones we study here), where some message computations can be parallelized. However, their parallelization scheme is quite different from ours as it is synchronous, i.e., the messages computed in parallel have to be carefully chosen, and it is specific to grid-structured graphs. In addition, they provide no theoretical analysis 1For a single coordinate this is equivalent to exact line search, but for larger blocks the updates can differ. 2 of convergence (which is not directly implied by TRW-S convergence due to different message scheduling). Schwing et al. [2011] and Zhang et al. [2014] also study dual-decomposition based parallel inference. They demonstrate gains when parallelizing the computation across multiple machines in a cluster. However, their approach requires the employed processing units to run in synchrony. Parallel MAP solvers based on subdifferential techniques [Schwing et al., 2012], have also been considered by Schwing et al. [2014] using a Frank-Wolfe algorithm. Albeit individual computations are performed in parallel, their approach also requires a synchronous gradient step. An alternative parallel inference approach is based on sampling algorithms [Singh et al., 2010, Wick et al., 2010, Asuncion et al., 2011]. However, the gains in runtime observed in this case are usually much smaller than those observed for algorithms which do not use sampling. Our work is thus the first to propose and analyze a fully asynchronous parallel coordinate minimization algorithm for MAP inference in graphical models. 3 Approach In this section we formalize the MAP inference problem and present our algorithmic framework. Consider a set of discrete variables X1, . . . , XN, and denote by xi 2 Xi a particular assignment to variable Xi from a discrete set Xi. Let r ✓{1, . . . , N} denote a subset of the variables, also known as a region, and let R be the set of all regions that are used in a problem. Each region r 2 R is associated with a local score function ✓r(xr), referred to as a factor. The MAP inference problem is to find a joint assignment x that maximizes the sum of all factor scores, max x X r2R ✓r(xr) . (1) Consider semantic image segmentation as an example. Factors depending on a single variable denote univariate preferences often obtained from neural networks [Chen⇤et al., 2015]. Factors depending on two or more variables encode local preference relationships. The problem in Eq. (1) is a combinatorial optimization problem which is generally NP-hard [Shimony, 1994]. Notable tractable special cases include tree-structured graphs and super-modular pairwise factors. In this work we are interested in solving the general form of the problem, therefore we resort to approximate inference. Multiple ways to compute an approximate MAP solution have been proposed. Here we employ approximations based on the dual-decomposition method [Komodakis et al., 2007, Werner, 2010, Sontag et al., 2011], which often deliver competitive performance compared to other approaches, and are also amenable to asynchronous parallel execution. The key idea in dual-decomposition is to break the global optimization problem of Eq. (1) into multiple (easy) subproblems, one for each factor. Agreement constraints between overlapping subproblem maximizers are then defined, and the resulting program takes the following form,2 min δ X r2R max xr ✓r(xr)+ X p:r2p δpr(xr)− X c:c2r δrc(xc) ! ⌘ min δ X r2R max xr ˆ✓δ r(xr) . (2) Here, ‘r 2 p’ (similarly, ‘c 2 r’) represents parent-child containment relationships, often represented as a region graph [Wainwright and Jordan, 2008], and δ are Lagrange multipliers for the agreement constraints, defined for every region r, assignment xr, and parent p : r 2 p. In particular, these constraints enforce that the maximizing assignment in a parent region p agrees with the maximizing assignment in the child region r on the values of the variables in r (which are also in p due to containment). For a full derivation see Werner [2010] (Eq. (11)). The modification of the model factors ✓r by the multipliers δ is known as a reparameterization, and is denoted here by ˆ✓δ r for brevity. The program in Eq. (2) is an unconstrained convex problem with a (piecewise-linear) non-smooth objective function. Standard algorithms, such as subgradient descent, can be applied in this case [Komodakis et al., 2007, Sontag et al., 2011], however, often, faster algorithms can be derived for a smoothed variant of this objective function [Johnson, 2008, Hazan and Shashua, 2010, Werner, 2009, 2The problem in Eq. (2) can also be derived as the dual of a linear programming relaxation of Eq. (1). 3 Algorithm 1 Block Coordinate Minimization 1: Initialize: δ0 = 0 2: while not converged do 3: Choose a block s at random 4: Update: δt+1 s = argminδ0s f(δ0 s, δt −s), and keep: δt+1 −s = δt −s 5: end while Savchynskyy et al., 2011]. In this approach the max operator is replaced with soft-max, giving rise to the following problem: min δ f(δ) := X r2R γ log X xr exp ⇣ ˆ✓δ r(xr)/γ ⌘ , (3) where γ is a parameter controlling the amount of smoothing (larger is smoother). Algorithms: Several algorithms for optimizing either the smooth (Eq. (3)) or non-smooth (Eq. (2)) problem have been studied. Block coordinate minimization algorithms, which are the focus of our work, are among the most competitive methods. In particular, in this approach a block of variables δs is updated at each iteration using the values in other blocks, i.e., δ−s, which are held fixed. Below we will assume a randomized schedule, where the next block to update is chosen uniformly at random. Other schedules are possible [e.g., Meshi et al., 2014, You et al., 2016], but this one will help to avoid unwanted coordination between workers in an asynchronous implementation. The resulting meta-algorithm is given in Algorithm 1. Various choices of blocks give rise to different algorithms in this family. A key consideration is to make sure that the update in line 4 of Algorithm 1 can be computed efficiently. Indeed, for several types of blocks, efficient, oftentimes analytically computable, updates are known [Werner, 2007, Globerson and Jaakkola, 2008, Kolmogorov, 2006, Sontag et al., 2011, Meshi et al., 2014]. To make the discussion concrete, we next instantiate the block coordinate minimization update (line 4 in Algorithm 1) using the smooth objective in Eq. (3) for two types of blocks.3 Specifically, we use the Pencil block, consisting of the variables δpr(·), and the Star block, which consists of the set δ·r(·). Intuitively, for the Pencil block, we choose a parent p and one of its children r. For the Star block we choose a region r and consider all of its parents. To simplify notation, it is useful to define per-factor probability distributions, referred to as beliefs: µr(xr) / exp ⇣ ˆ✓δ r(xr)/γ ⌘ . Using this definition, the Pencil update is performed by picking a pair of adjacent regions p, r, and setting: δt+1 pr (xr) = δt pr(xr) + 1 2γ $ log µt p(xr) −log µt r(xr) % (4) for all xr, where we denote the marginal belief µp(xr) = P x0 p\r µp(xr, x0 p\r). Similarly, for the Star update we pick a region r, and set: δt+1 pr (xr) = δt pr(xr) + γ log µt p(xr) − 1 Pr + 1 · γ log 0 @µt r(xr) · Y p0:r2p0 µt p0(xr) 1 A for all p : r 2 p and all xr, where Pr = |{p : r 2 p}| is the number of parents of r in the region graph. Full derivation of the above updates is outside the scope of this paper and can be found in previous work [e.g., Meshi et al., 2014]. The variables δ are sometimes called messages. Hence the algorithms considered here belong to the family of message-passing procedures. In terms of convergence rate, it is known that coordinate minimization converges to the optimum of the smooth problem in Eq. (3) with rate O(1/γt) [Meshi et al., 2014]. In this work our goal is to study asynchronous parallel coordinate minimization for approximate MAP inference. This means that each processing unit repeatedly performs the operations in lines 3-4 3Similar updates for the non-smooth case (Eq. (2)) are also known. Those are easily obtained by switching from soft-max to max. 4 of Algorithm 1 independently, with minimal coordination between units. We refer to this algorithm as APCM – for Asynchronous Parallel Coordinate Minimization. We use APCM-Pencil and APCM-Star to refer to the instantiations of APCM with Pencil and Star blocks, respectively. 4 Analysis We now proceed to analyze the convergence properties of the asynchronous variants of Algorithm 1. In this setting, the iteration counter t corresponds to write operations, which are assumed to be atomic. Note, however, that in our experiments in Section 5 we use a lock-free implementation, which may result in inconsistent writes and reads. If there is no delay, then the algorithm is performing exact coordinate minimization. However, since updates happen asynchronously, there will generally be a difference between the current beliefs µt and the ones used to compute the update. We denote by k(t) the iteration counter corresponding to the time in which values were read. The bounded delay assumption implies that t −k(t) ⌧for some constant ⌧. We present results for the Pencil block next, and defer results for the Star block to Appendix B. Our first result precisely characterizes the expected change in objective value following an update as a function of the old and new beliefs. All proofs appear in the supplementary material. Proposition 1. The APCM-Pencil algorithm satisfies: Es[f(δt+1)] −f(δt) = γ n X r X p:r2p log X xr µt r(xr) µk(t) r (xr) q µk(t) p (xr) · µk(t) r (xr) (5) + log X xr µt p(xr) µk(t) p (xr) q µk(t) p (xr) · µk(t) r (xr) ! , where n = P r P p:r2p 1 is the number of Pencil blocks, and the expectation is over the choice of blocks. At a high-level, our derivation carefully tracks the effect of stale beliefs on convergence by separating old and new beliefs after applying the update (see Appendix A.1). We next highlight a few consequences of Proposition 1. First, it provides an exact characterization of the expected change in objective value, not an upper bound. Second, as a sanity check, when there is no delay (k(t) = t), the belief ratio terms (µt/µk(t)) drop, and we recover the sequential decrease in objective, which corresponds to the (negative) Bhattacharyya divergence measure between the pair of distributions µt r(xr) and µt p(xr) [Meshi et al., 2014]. Finally, Proposition 1 can be used to dynamically set the degree of parallelization as follows. We estimate Eq. (5) (per block) and if the result is strictly positive then it suggests that the delay is too large and we should reduce the number of concurrent processors. Next, we obtain an upper bound on the expected change in objective value that takes into account the sparsity of the update. Proposition 2. The APCM-Pencil algorithm satisfies: Es[f(δt+1)] −f(δt) γ n t−1 X d=k(t) " max xr log µd+1 r(d)(xr) µd r(d)(xr) ! + max xr log µd+1 p(d)(xr) µd p(d)(xr) !# (6) + γ n X r X p:r2p log X xr q µk(t) p (xr) · µk(t) r (xr) !2 . (7) This bound separates the expected change in objective into two terms: the delay term (Eq. (6)) and the (stale) improvement term (Eq. (7)). The improvement term is always non-positive, it is equal to the negative Bhattacharyya divergence, and it is exactly the same as the expected improvement in the sequential setting. The delay term is always non-negative, and as before, when there is no delay (k(t) = t), the sum in Eq. (6) is empty, and we recover the sequential improvement. Note that the delay term depends only on the beliefs in regions that were actually updated between the read and current write. This result is obtained by exploiting the sparsity of the updates: each message affects only the neighboring nodes in the graph (see Appendix A.2). Similar structural properties are also used in related analyses [e.g., Recht et al., 2011], however in other settings this involves making 5 Iteration 0 20 40 60 80 100 120 Objective 0 1 2 3 4 5 6 7 1 worker 10 workers 20 workers 40 workers 40 workers (adaptive) Iteration 0 20 40 60 80 100 120 Objective 1 1.5 2 2.5 3 3.5 4 4.5 40 workers (adaptive) Number of active workers 5 10 15 20 25 30 35 40 Iteration 0 20 40 60 80 100 120 Objective 30 35 40 45 50 55 1 worker 10 workers 20 workers 40 workers 40 workers (adaptive) Figure 1: Simulation of APCM-Pencil on toy models. (Left) objective vs. iteration (equiv., update) on a 3-node chain graph. The dashed lines show the same objective when iterations are divided by the number of workers, which approximates runtime. (Middle) objective vs. iteration and vs. number of active workers on a 3-node chain graph when adapting the number of workers. (Right) objective vs. iteration (equiv., update) on a 6-node fully connected graph. non-trivial assumptions (such as how training examples interact), whereas in our case the sparsity pattern is readily available through the structure of the graphical model. To demonstrate the hardness of our setting, we present in Appendix A.3 a case where the RHS of Eq. (6) - (7) may be a large positive number. This happens when some beliefs are very close to 0. In contrast, the next theorem uses the results above to show speedups under additional assumptions. Theorem 1. Let |ˆ✓δt r (xr)| M for all t, r, xr, and let kδt −δ⇤k2 < B for all t. Assume that the gradient is bounded from below as krfk2 ≥c, and that the delay is bounded as ⌧ γc 32M . Then Es[f(δt)] −f(δ⇤) 8nB γt . This upper bound is only 2 times slower than the corresponding sequential bound (see Theorem 3 in Meshi et al. [2014]), however, in this parallel setting we execute updates roughly ⌧times faster, so we obtain a linear speedup in this case. Notice that this rate applies only when the gradient is not too small, so we expect to get large gains from parallelization initially, and smaller gains as we get closer to optimality. This is due to the hardness of our setting (see Appendix A.3), and gives another theoretical justification to adaptively reduce the number of processing units as the iterations progress. At first glance, the assumptions in Theorem 1 (specifically, the bounds M and B) seem strong. However, it turns out that they are easily satisfied whenever f(δt) f(0) (see Lemma 9 in Meshi et al. [2014]) – which is a mild assumption that is satisfied in all of our experiments except some adversarially constructed toy problems (see Section 5.1). 5 Experiments In this section we present numerical experiments to study the performance of APCM in practical MAP estimation problems. We first simulate APCM on toy problems in Section 5.1, then, in Section 5.2, we demonstrate our approach on a disparity estimation task from computer vision. 5.1 Synthetic Problems To better understand the behavior of APCM, we simulate the APCM-Pencil algorithm sequentially as follows. We keep a set of ‘workers,’ each of which can be in one of two states: ‘read’ or ‘update.’ In every step, we choose one of the workers at random using a skewed distribution to encourage large delays: the probability of sampling a worker w is pw = esw/P w0 esw0 , where sw is sampled uniformly in [0, 1], and = 5. If the worker is in the ‘read’ state, then it picks a message uniformly at random, makes a local copy of the beliefs, and moves to state ‘update.’ Else, if the worker wakes up in state ‘update,’ then it computes the update from its local beliefs, writes the update to the global beliefs, and goes back to state ‘read.’ This procedure creates delays between the read and write steps. Our first toy model consists of 3 binary variables and 2 pairwise factors, forming a chain graph. This model has a total of 4 messages. Factor values are sampled uniformly in the range [−5, 5]. In Fig. 1 (left) we observe that as the number of workers grows, the updates become less effective due to stale beliefs. Importantly, it takes 40 workers operating on 4 messages to observe divergence. We don’t 6 2 200 4 200 8 200 8 400 Ours 103 104 Time [ms] 5.48 5.5 5.52 5.54 5.56 5.58 5.6 Dual 106 1 2 4 8 16 32 46 103 104 105 Time [ms] 2.79 2.795 2.8 2.805 2.81 Dual 107 1 2 4 8 16 32 46 103 104 105 Time [ms] 1.154 1.1545 1.155 1.1555 1.156 Dual 108 1 2 4 8 16 32 46 104 106 Time [ms] 1.154 1.1545 1.155 1.1555 1.156 Dual 108 1 2 4 8 16 32 46 HOGWILD! 103 104 Time [ms] 5.48 5.5 5.52 5.54 5.56 5.58 5.6 Dual 106 1 2 4 8 16 32 46 103 104 105 Time [ms] 2.79 2.795 2.8 2.805 2.81 Dual 107 1 2 4 8 16 32 46 103 104 105 Time [ms] 1.154 1.1545 1.155 1.1555 1.156 Dual 108 1 2 4 8 16 32 46 104 106 Time [ms] 1.154 1.1545 1.155 1.1555 1.156 Dual 108 1 2 4 8 16 32 46 Figure 2: For γ = 1 and an 8 state model, we illustrate the convergence behavior of our approach compared to HOGWILD!, for a variety of MRF configurations (2, 4, 8), and different number of iterations (200, 400). Different number of threads are used for each configuration. Algorithm 2 HOGWILD! A single update 1: Choose a region r 2 R at random 2: Update: δpr(xr) −= ⌘tµr(xr) for all xr, p : r 2 p δrc(xc) += ⌘tµr(xc) for all xc, c : c 2 r expect a setting with more workers than messages to be observed in practice. We also adaptively change the number of workers as suggested by our theory, which indeed helps to regain convergence. Fig. 1 (middle) shows how the number of workers decreases as the objective approaches the optimum. Our second toy model consists of 6 binary variables forming a fully connected graph. This model has 30 messages. In this setting, despite stale beliefs due to a skewed distribution, Fig. 1 (right) shows that APCM is convergent even with 40 active workers. Hypothetically assuming 40 workers to run in parallel yields a significant speedup when compared to a single thread, as is illustrated by the dashed lines in Fig. 1. 5.2 Disparity Estimation We now proceed to test our approach on a disparity estimation task, a more realistic setup. In our case, the employed pairwise graphical model, often also referred to as a pairwise Markov random field (MRF), is grid structured. It has 144 ⇥185 = 26, 640 unary regions with 8 states and is a downsampled version from Schwing et al. [2011]. We use the temperature parameter γ = 1 for the smooth objective (Eq. (3)). We compare our APCM-Star algorithm to the HOGWILD! approach [Recht et al., 2011], which employs an asynchronous parallel stochastic gradient descent method – summarized in Algorithm 2, where we use the shorthand µr(xc) = P x0 r\c µr(xc, x0 r\c). We refer the reader to Appendix C in the supplementary material for additional results on graphical models with larger state space size and for results regarding the non-smooth update obtained for γ = 0. In short, those results are similar to the ones reported here. No synchronization is used for both HOGWILD! and our approach, i.e., we allow inconsistent reads and writes. Hence our optimization is lock-free and each of the threads is entirely devoted to computing and updating messages. We use one additional thread that constantly monitors progress by computing the objective in Eq. (3). We perform this function evaluation a fixed number of times, either 200 or 400 times. Running for more iterations lets us compare performance in the high-accuracy regime. During function evaluation, other threads randomly and independently choose a region r and update the variables δ·r(·), i.e., we evaluate the Star block updates of Eq. (5). Our choice is motivated by the fact that Star block updates are more overlapping compared to Pencil updates, as they depend on more variables. Therefore, Star blocks are harder to parallelize (see Theorem 2 in Appendix B). To assess the performance of our technique we use pairwise graphical models of different densities. In particular, we use a ‘connection width’ of 2, 4, or 8. This means we connect variables in the grid by 7 Ours HOGWILD! Comparison 10 20 30 40 threads 10 20 30 40 speedup f 2 200 4 200 8 200 8 400 10 20 30 40 threads 10 20 30 40 speedup f 2 200 4 200 8 200 8 400 10 20 30 40 threads 0 20 40 60 80 100 speedup 2 200 4 200 8 200 8 400 (a) (b) (c) Figure 3: Speedup w.r.t. single thread obtained for a specific number of threads for our approach (a) and HOGWILD! (b), using a variety of MRF neighborhoods (2, 4, 8), and different number of iterations (200, 400). Speedups are shown for γ = 1 and 8 states. (c) shows the speedup of our method compared to HOGWILD!. pairwise factors, if their `1-norm distance is less than 2, 4, or 8. A ‘connection width’ of 2 is often also referred to as 8-neighborhood, because a random variable is connected to its eight immediate neighbors. A ‘connection width’ of 4 or 8 connects a random variable to 48 or 224 neighboring variables respectively. Hence, the connectivity of the employed graphical model is reasonably dense to observe inconsistent reads and writes. At the same time our experiments cover connection densities well above many typical graphical models used in practice. Convergence: In a first experiment we investigate the convergence behavior of our approach and the HOGWILD! implementation for different graphical model configurations. We examine the behavior when using one to 46 threads, where the number of threads is not adapted, but remains fixed throughout the run. The stepsize parameter, necessary in the case of HOGWILD!, is chosen to be as large as possible while still ensuring convergence (following Recht et al. [2011]). Note that our approach is hyper-parameter free. Hence no tuning is required, which we consider an important practical advantage. We also evaluated HOGWILD! using a diminishing stepsize, but found those results to be weaker than the ones reported here. Also note that a diminishing stepsize introduces yet another hyper-parameter. Our results are provided in Fig. 2 for γ = 1 and 8 states per random variable. We assess different MRF configurations (2, 4, 8 connectivity), and iterations (200, 400). Irrespective of the chosen setup, we observe monotone convergence even with 46 threads at play for both approaches. In neither of our configurations do we observe any instability during optimization. As expected, we also observe the exact minimization employed in our approach to result in significantly faster descent than use of the gradient (i.e., HOGWILD!). This is consistent with the comparison of these methods in the sequential setting. Thread speedup: In our second experiment we investigate the speedup obtained when using an increasing number of threads. To this end we use the smallest dual value obtained with a single thread and illustrate how much faster we are able to obtain an identical or better value when using more than one thread during computation. The results for all the investigated graphical model configurations are illustrated in Fig. 3 (a) for our approach and in Fig. 3 (b) for HOGWILD!. In these figures, we observe very similar speedups across different graphical model configurations. We also observe that our approach scales just as well as the gradient based technique does. HOGWILD! speedup: In our third experiment we directly compare HOGWILD! to our approach. More specifically, we use the smallest dual value found with the gradient based technique using a fixed number of threads, and assess how much faster the proposed approach is able to find an identical or better value when using the same number of threads. We show speedups of our approach compared to HOGWILD! in Fig. 3 (c). Considering the results presented in the previous paragraphs, speedups are to be expected. In all cases, we observe the speedups to be larger when using more threads. Depending on the model setup, we observe speedups to stabilize at values around 45 or higher. In summary, we found our asynchronous optimization technique to be a compelling practical approach to infer approximate MAP configurations for graphical models. 8 6 Conclusion We believe that parallel algorithms are essential for dealing with the scale of modern problem instances in graphical models. This has led us to present an asynchronous parallel coordinate minimization algorithm for MAP inference. Our theoretical analysis provides insights into the effect of stale updates on the convergence and speedups of this scheme. Our empirical results show the great potential of this approach, achieving linear speedups with up to 46 concurrent threads. Future work may include improving the analysis (possibly under additional assumptions), particularly the restriction on the gradients in Theorems 1 and 2. An interesting extension of our work is to derive asynchronous parallel coordinate minimization algorithms for other objective functions, including those arising in other inference tasks, such as marginal inference. Another natural extension is to try our algorithms on MAP problems from other domains, such as natural language processing and computational Biology, adding to our experiments on disparity estimation in computer vision. Acknowledgments This material is based upon work supported in part by the National Science Foundation under Grant No. 1718221. This work utilized computing resources provided by the Innovative Systems Lab (ISL) at NCSA. References A. Asuncion, P. Smyth, M. Welling, D. Newman, I. Porteous, and S. Triglia. Distributed Gibbs sampling for latent variable models. 2011. H. Avron, A. Druinsky, and A. Gupta. Revisiting asynchronous linear solvers: Provable convergence rate through randomization. J. ACM, 62(6):51:1–51:27, 2015. D. P. Bertsekas and J. N. Tsitsiklis. Parallel and Distributed Computation: Numerical Methods. Prentice-Hall, Inc., Upper Saddle River, NJ, USA, 1989. ISBN 0-13-648700-9. L.-C. Chen⇤, A. G. Schwing⇤, A. L. Yuille, and R. Urtasun. Learning Deep Structured Models. In Proc. ICML, 2015. ⇤equal contribution. J. Choi and R. A. Rutenbar. Hardware implementation of mrf map inference on an fpga platform. In Field Programmable Logic, 2012. D. Davis, B. Edmunds, and M. Udell. The sound of apalm clapping: Faster nonsmooth nonconvex optimization with stochastic asynchronous palm. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 226–234. 2016. A. Desmaison, R. Bunel, P. Kohli, P. H. Torr, and M. P. Kumar. Efficient continuous relaxations for dense crf. In European Conference on Computer Vision, pages 818–833, 2016. A. Globerson and T. Jaakkola. Fixing max-product: Convergent message passing algorithms for MAP LPrelaxations. In NIPS. MIT Press, 2008. J. Gonzalez, Y. Low, and C. Guestrin. Parallel Inference on Large Factor Graphs. Cambridge University Press, 2011. T. Hazan and A. Shashua. Norm-product belief propagation: Primal-dual message-passing for approximate inference. IEEE Transactions on Information Theory, 56(12):6294–6316, 2010. C.-J. Hsieh, H.-F. Yu, and I. S. Dhillon. Passcode: Parallel asynchronous stochastic dual co-ordinate descent. In ICML, volume 15, pages 2370–2379, 2015. S. Hurkat, J. Choi, E. Nurvitadhi, J. F. Martínez, and R. A. Rutenbar. Fast hierarchical implementation of sequential tree-reweighted belief propagation for probabilistic inference. In Field Programmable Logic, pages 1–8, 2015. J. Johnson. Convex Relaxation Methods for Graphical Models: Lagrangian and Maximum Entropy Approaches. PhD thesis, EECS, MIT, 2008. J. H. Kappes, B. Andres, F. A. Hamprecht, C. Schnörr, S. Nowozin, D. Batra, S. Kim, B. X. Kausler, T. Kröger, J. Lellmann, N. Komodakis, B. Savchynskyy, and C. Rother. A comparative study of modern inference techniques for structured discrete energy minimization problems. International Journal of Computer Vision, 115(2):155–184, 2015. 9 D. Koller and N. Friedman. Probabilistic Graphical Models: Principles and Techniques. MIT Press, 2009. V. Kolmogorov. Convergent tree-reweighted message passing for energy minimization. IEEE Transactions on Pattern Analysis and Machine Intelligence, 28(10):1568–1583, 2006. N. Komodakis, N. Paragios, and G. Tziritas. Mrf optimization via dual decomposition: Message-passing revisited, 2007. P. Krähenbühl and V. Koltun. Efficient inference in fully connected crfs with gaussian edge potentials. In Advances in Neural Information Processing Systems 24, pages 109–117. 2011. J. Liu and S. J. Wright. Asynchronous stochastic coordinate descent: Parallelism and convergence properties. SIAM Journal on Optimization, 25(1):351–376, 2015. J. Liu, S. J. Wright, C. Ré, V. Bittorf, and S. Sridhar. An asynchronous parallel stochastic coordinate descent algorithm. Journal of Machine Learning Research, 16:285–322, 2015. N. Ma, Y. Xia, and V. K. Prasanna. Data parallelism for belief propagation in factor graphs. In 2011 23rd International Symposium on Computer Architecture and High Performance Computing, pages 56–63, 2011. O. Meshi, T. Jaakkola, and A. Globerson. Smoothed coordinate descent for map inference. In S. Nowozin, P. V. Gehler, J. Jancsary, and C. Lampert, editors, Advanced Structured Prediction. MIT Press, 2014. O. Meshi, M. Mahdavi, and A. G. Schwing. Smooth and strong: MAP inference with linear convergence. In Neural Informaion Processing Systems, 2015. Y. Nesterov. Efficiency of coordinate descent methods on huge-scale optimization problems. SIAM Journal on Optimization, 22(2):341–362, 2012. Z. Peng, Y. Xu, M. Yan, and W. Yin. Arock: An algorithmic framework for asynchronous parallel coordinate updates. SIAM Journal on Scientific Computing, 38(5):A2851–A2879, 2016. N. Piatkowski and K. Morik. Parallel inference on structured data with crfs on gpus. In International Workshop at ECML PKDD on Collective Learning and Inference on Structured Data (COLISD2011), 2011. B. Recht, C. Re, S. Wright, and F. Niu. Hogwild: A lock-free approach to parallelizing stochastic gradient descent. In Advances in Neural Information Processing Systems 24. 2011. B. Savchynskyy, S. Schmidt, J. Kappes, and C. Schnorr. A study of Nesterov’s scheme for lagrangian decomposition and map labeling. CVPR, 2011. A. G. Schwing, T. Hazan, M. Pollefeys, and R. Urtasun. Distributed Message Passing for Large Scale Graphical Models. In Proc. CVPR, 2011. A. G. Schwing, T. Hazan, M. Pollefeys, and R. Urtasun. Globally Convergent Dual MAP LP Relaxation Solvers using Fenchel-Young Margins. In Proc. NIPS, 2012. A. G. Schwing, T. Hazan, M. Pollefeys, and R. Urtasun. Globally Convergent Parallel MAP LP Relaxation Solver using the Frank-Wolfe Algorithm. In Proc. ICML, 2014. Y. Shimony. Finding the MAPs for belief networks is NP-hard. Aritifical Intelligence, 68(2):399–410, 1994. S. Singh, A. Subramanya, F. Pereira, and A. McCallum. Distributed map inference for undirected graphical models. In Neural Information Processing Systems (NIPS) Workshop on Learning on Cores, Clusters, and Clouds (LCCC), 2010. D. Sontag, A. Globerson, and T. Jaakkola. Introduction to dual decomposition for inference. In Optimization for Machine Learning, pages 219–254. MIT Press, 2011. P. Tseng. On the rate of convergence of a partially asynchronous gradient projection algorithm. SIAM Journal on Optimization, 1(4):603–619, 1991. M. Wainwright and M. I. Jordan. Graphical Models, Exponential Families, and Variational Inference. Now Publishers Inc., Hanover, MA, USA, 2008. Y.-X. Wang, V. Sadhanala, W. Dai, W. Neiswanger, S. Sra, and E. Xing. Parallel and distributed block-coordinate frank-wolfe algorithms. In Proceedings of The 33rd International Conference on Machine Learning, pages 1548–1557, 2016. T. Werner. A linear programming approach to max-sum problem: A review. IEEE Transactions on Pattern Analysis and Machine Intelligence, 29(7):1165–1179, 2007. T. Werner. Revisiting the decomposition approach to inference in exponential families and graphical models. Technical Report CTU-CMP-2009-06, Czech Technical University, 2009. 10 T. Werner. Revisiting the linear programming relaxation approach to gibbs energy minimization and weighted constraint satisfaction. IEEE PAMI, 32(8):1474–1488, 2010. M. Wick, A. McCallum, and G. Miklau. Scalable probabilistic databases with factor graphs and mcmc. Proc. VLDB Endow., 3(1-2):794–804, 2010. Y. You, X. Lian, J. Liu, H.-F. Yu, I. S. Dhillon, J. Demmel, and C.-J. Hsieh. Asynchronous parallel greedy coordinate descent. In Advances in Neural Information Processing Systems 29, pages 4682–4690. 2016. J. Zhang, A. G. Schwing, and R. Urtasun. Message Passing Inference for Large Scale Graphical Models with High Order Potentials. In Proc. NIPS, 2014. R. Zhang and J. T. Kwok. Asynchronous distributed admm for consensus optimization. In ICML, pages 1701–1709, 2014. B. Zhou, H. Zhao, X. Puig, S. Fidler, A. Barriuso, and A. Torralba. Semantic understanding of scenes through the ade20k dataset. arXiv preprint arXiv:1608.05442, 2016. 11 | 2017 | 242 |
6,722 | Inductive Representation Learning on Large Graphs William L. Hamilton∗ wleif@stanford.edu Rex Ying∗ rexying@stanford.edu Jure Leskovec jure@cs.stanford.edu Department of Computer Science Stanford University Stanford, CA, 94305 Abstract Low-dimensional embeddings of nodes in large graphs have proved extremely useful in a variety of prediction tasks, from content recommendation to identifying protein functions. However, most existing approaches require that all nodes in the graph are present during training of the embeddings; these previous approaches are inherently transductive and do not naturally generalize to unseen nodes. Here we present GraphSAGE, a general inductive framework that leverages node feature information (e.g., text attributes) to efficiently generate node embeddings for previously unseen data. Instead of training individual embeddings for each node, we learn a function that generates embeddings by sampling and aggregating features from a node’s local neighborhood. Our algorithm outperforms strong baselines on three inductive node-classification benchmarks: we classify the category of unseen nodes in evolving information graphs based on citation and Reddit post data, and we show that our algorithm generalizes to completely unseen graphs using a multi-graph dataset of protein-protein interactions. 1 Introduction Low-dimensional vector embeddings of nodes in large graphs1 have proved extremely useful as feature inputs for a wide variety of prediction and graph analysis tasks [5, 11, 28, 35, 36]. The basic idea behind node embedding approaches is to use dimensionality reduction techniques to distill the high-dimensional information about a node’s neighborhood into a dense vector embedding. These node embeddings can then be fed to downstream machine learning systems and aid in tasks such as node classification, clustering, and link prediction [11, 28, 35]. However, previous works have focused on embedding nodes from a single fixed graph, and many real-world applications require embeddings to be quickly generated for unseen nodes, or entirely new (sub)graphs. This inductive capability is essential for high-throughput, production machine learning systems, which operate on evolving graphs and constantly encounter unseen nodes (e.g., posts on Reddit, users and videos on Youtube). An inductive approach to generating node embeddings also facilitates generalization across graphs with the same form of features: for example, one could train an embedding generator on protein-protein interaction graphs derived from a model organism, and then easily produce node embeddings for data collected on new organisms using the trained model. The inductive node embedding problem is especially difficult, compared to the transductive setting, because generalizing to unseen nodes requires “aligning” newly observed subgraphs to the node embeddings that the algorithm has already optimized on. An inductive framework must learn to ∗The two first authors made equal contributions. 1While it is common to refer to these data structures as social or biological networks, we use the term graph to avoid ambiguity with neural network terminology. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Figure 1: Visual illustration of the GraphSAGE sample and aggregate approach. recognize structural properties of a node’s neighborhood that reveal both the node’s local role in the graph, as well as its global position. Most existing approaches to generating node embeddings are inherently transductive. The majority of these approaches directly optimize the embeddings for each node using matrix-factorization-based objectives, and do not naturally generalize to unseen data, since they make predictions on nodes in a single, fixed graph [5, 11, 23, 28, 35, 36, 37, 39]. These approaches can be modified to operate in an inductive setting (e.g., [28]), but these modifications tend to be computationally expensive, requiring additional rounds of gradient descent before new predictions can be made. There are also recent approaches to learning over graph structures using convolution operators that offer promise as an embedding methodology [17]. So far, graph convolutional networks (GCNs) have only been applied in the transductive setting with fixed graphs [17, 18]. In this work we both extend GCNs to the task of inductive unsupervised learning and propose a framework that generalizes the GCN approach to use trainable aggregation functions (beyond simple convolutions). Present work. We propose a general framework, called GraphSAGE (SAmple and aggreGatE), for inductive node embedding. Unlike embedding approaches that are based on matrix factorization, we leverage node features (e.g., text attributes, node profile information, node degrees) in order to learn an embedding function that generalizes to unseen nodes. By incorporating node features in the learning algorithm, we simultaneously learn the topological structure of each node’s neighborhood as well as the distribution of node features in the neighborhood. While we focus on feature-rich graphs (e.g., citation data with text attributes, biological data with functional/molecular markers), our approach can also make use of structural features that are present in all graphs (e.g., node degrees). Thus, our algorithm can also be applied to graphs without node features. Instead of training a distinct embedding vector for each node, we train a set of aggregator functions that learn to aggregate feature information from a node’s local neighborhood (Figure 1). Each aggregator function aggregates information from a different number of hops, or search depth, away from a given node. At test, or inference time, we use our trained system to generate embeddings for entirely unseen nodes by applying the learned aggregation functions. Following previous work on generating node embeddings, we design an unsupervised loss function that allows GraphSAGE to be trained without task-specific supervision. We also show that GraphSAGE can be trained in a fully supervised manner. We evaluate our algorithm on three node-classification benchmarks, which test GraphSAGE’s ability to generate useful embeddings on unseen data. We use two evolving document graphs based on citation data and Reddit post data (predicting paper and post categories, respectively), and a multigraph generalization experiment based on a dataset of protein-protein interactions (predicting protein functions). Using these benchmarks, we show that our approach is able to effectively generate representations for unseen nodes and outperform relevant baselines by a significant margin: across domains, our supervised approach improves classification F1-scores by an average of 51% compared to using node features alone and GraphSAGE consistently outperforms a strong, transductive baseline [28], despite this baseline taking ∼100× longer to run on unseen nodes. We also show that the new aggregator architectures we propose provide significant gains (7.4% on average) compared to an aggregator inspired by graph convolutional networks [17]. Lastly, we probe the expressive capability of our approach and show, through theoretical analysis, that GraphSAGE is capable of learning structural information about a node’s role in a graph, despite the fact that it is inherently based on features (Section 5). 2 2 Related work Our algorithm is conceptually related to previous node embedding approaches, general supervised approaches to learning over graphs, and recent advancements in applying convolutional neural networks to graph-structured data.2 Factorization-based embedding approaches. There are a number of recent node embedding approaches that learn low-dimensional embeddings using random walk statistics and matrix factorization-based learning objectives [5, 11, 28, 35, 36]. These methods also bear close relationships to more classic approaches to spectral clustering [23], multi-dimensional scaling [19], as well as the PageRank algorithm [25]. Since these embedding algorithms directly train node embeddings for individual nodes, they are inherently transductive and, at the very least, require expensive additional training (e.g., via stochastic gradient descent) to make predictions on new nodes. In addition, for many of these approaches (e.g., [11, 28, 35, 36]) the objective function is invariant to orthogonal transformations of the embeddings, which means that the embedding space does not naturally generalize between graphs and can drift during re-training. One notable exception to this trend is the Planetoid-I algorithm introduced by Yang et al. [40], which is an inductive, embeddingbased approach to semi-supervised learning. However, Planetoid-I does not use any graph structural information during inference; instead, it uses the graph structure as a form of regularization during training. Unlike these previous approaches, we leverage feature information in order to train a model to produce embeddings for unseen nodes. Supervised learning over graphs. Beyond node embedding approaches, there is a rich literature on supervised learning over graph-structured data. This includes a wide variety of kernel-based approaches, where feature vectors for graphs are derived from various graph kernels (see [32] and references therein). There are also a number of recent neural network approaches to supervised learning over graph structures [7, 10, 21, 31]. Our approach is conceptually inspired by a number of these algorithms. However, whereas these previous approaches attempt to classify entire graphs (or subgraphs), the focus of this work is generating useful representations for individual nodes. Graph convolutional networks. In recent years, several convolutional neural network architectures for learning over graphs have been proposed (e.g., [4, 9, 8, 17, 24]). The majority of these methods do not scale to large graphs or are designed for whole-graph classification (or both) [4, 9, 8, 24]. However, our approach is closely related to the graph convolutional network (GCN), introduced by Kipf et al. [17, 18]. The original GCN algorithm [17] is designed for semi-supervised learning in a transductive setting, and the exact algorithm requires that the full graph Laplacian is known during training. A simple variant of our algorithm can be viewed as an extension of the GCN framework to the inductive setting, a point which we revisit in Section 3.3. 3 Proposed method: GraphSAGE The key idea behind our approach is that we learn how to aggregate feature information from a node’s local neighborhood (e.g., the degrees or text attributes of nearby nodes). We first describe the GraphSAGE embedding generation (i.e., forward propagation) algorithm, which generates embeddings for nodes assuming that the GraphSAGE model parameters are already learned (Section 3.1). We then describe how the GraphSAGE model parameters can be learned using standard stochastic gradient descent and backpropagation techniques (Section 3.2). 3.1 Embedding generation (i.e., forward propagation) algorithm In this section, we describe the embedding generation, or forward propagation algorithm (Algorithm 1), which assumes that the model has already been trained and that the parameters are fixed. In particular, we assume that we have learned the parameters of K aggregator functions (denoted AGGREGATEk, ∀k ∈{1, ..., K}), which aggregate information from node neighbors, as well as a set of weight matrices Wk, ∀k ∈{1, ..., K}, which are used to propagate information between different layers of the model or “search depths”. Section 3.2 describes how we train these parameters. 2In the time between this papers original submission to NIPS 2017 and the submission of the final, accepted (i.e., “camera-ready”) version, there have been a number of closely related (e.g., follow-up) works published on pre-print servers. For temporal clarity, we do not review or compare against these papers in detail. 3 Algorithm 1: GraphSAGE embedding generation (i.e., forward propagation) algorithm Input : Graph G(V, E); input features {xv, ∀v ∈V}; depth K; weight matrices Wk, ∀k ∈{1, ..., K}; non-linearity σ; differentiable aggregator functions AGGREGATEk, ∀k ∈{1, ..., K}; neighborhood function N : v →2V Output : Vector representations zv for all v ∈V 1 h0 v ←xv, ∀v ∈V ; 2 for k = 1...K do 3 for v ∈V do 4 hk N (v) ←AGGREGATEk({hk−1 u , ∀u ∈N(v)}); 5 hk v ←σ Wk · CONCAT(hk−1 v , hk N (v)) 6 end 7 hk v ←hk v/∥hk v∥2, ∀v ∈V 8 end 9 zv ←hK v , ∀v ∈V The intuition behind Algorithm 1 is that at each iteration, or search depth, nodes aggregate information from their local neighbors, and as this process iterates, nodes incrementally gain more and more information from further reaches of the graph. Algorithm 1 describes the embedding generation process in the case where the entire graph, G = (V, E), and features for all nodes xv, ∀v ∈V, are provided as input. We describe how to generalize this to the minibatch setting below. Each step in the outer loop of Algorithm 1 proceeds as follows, where k denotes the current step in the outer loop (or the depth of the search) and hk denotes a node’s representation at this step: First, each node v ∈V aggregates the representations of the nodes in its immediate neighborhood, {hk−1 u , ∀u ∈N(v)}, into a single vector hk−1 N (v). Note that this aggregation step depends on the representations generated at the previous iteration of the outer loop (i.e., k −1), and the k = 0 (“base case”) representations are defined as the input node features. After aggregating the neighboring feature vectors, GraphSAGE then concatenates the node’s current representation, hk−1 v , with the aggregated neighborhood vector, hk−1 N (v), and this concatenated vector is fed through a fully connected layer with nonlinear activation function σ, which transforms the representations to be used at the next step of the algorithm (i.e., hk v, ∀v ∈V). For notational convenience, we denote the final representations output at depth K as zv ≡hK v , ∀v ∈V. The aggregation of the neighbor representations can be done by a variety of aggregator architectures (denoted by the AGGREGATE placeholder in Algorithm 1), and we discuss different architecture choices in Section 3.3 below. To extend Algorithm 1 to the minibatch setting, given a set of input nodes, we first forward sample the required neighborhood sets (up to depth K) and then we run the inner loop (line 3 in Algorithm 1), but instead of iterating over all nodes, we compute only the representations that are necessary to satisfy the recursion at each depth (Appendix A contains complete minibatch pseudocode). Relation to the Weisfeiler-Lehman Isomorphism Test. The GraphSAGE algorithm is conceptually inspired by a classic algorithm for testing graph isomorphism. If, in Algorithm 1, we (i) set K = |V|, (ii) set the weight matrices as the identity, and (iii) use an appropriate hash function as an aggregator (with no non-linearity), then Algorithm 1 is an instance of the Weisfeiler-Lehman (WL) isomorphism test, also known as “naive vertex refinement” [32]. If the set of representations {zv, ∀v ∈V} output by Algorithm 1 for two subgraphs are identical then the WL test declares the two subgraphs to be isomorphic. This test is known to fail in some cases, but is valid for a broad class of graphs [32]. GraphSAGE is a continuous approximation to the WL test, where we replace the hash function with trainable neural network aggregators. Of course, we use GraphSAGE to generate useful node representations–not to test graph isomorphism. Nevertheless, the connection between GraphSAGE and the classic WL test provides theoretical context for our algorithm design to learn the topological structure of node neighborhoods. Neighborhood definition. In this work, we uniformly sample a fixed-size set of neighbors, instead of using full neighborhood sets in Algorithm 1, in order to keep the computational footprint of each batch 4 fixed.3 That is, using overloaded notation, we define N(v) as a fixed-size, uniform draw from the set {u ∈V : (u, v) ∈E}, and we draw different uniform samples at each iteration, k, in Algorithm 1. Without this sampling the memory and expected runtime of a single batch is unpredictable and in the worst case O(|V|). In contrast, the per-batch space and time complexity for GraphSAGE is fixed at O(QK i=1 Si), where Si, i ∈{1, ..., K} and K are user-specified constants. Practically speaking we found that our approach could achieve high performance with K = 2 and S1 · S2 ≤500 (see Section 4.4 for details). 3.2 Learning the parameters of GraphSAGE In order to learn useful, predictive representations in a fully unsupervised setting, we apply a graph-based loss function to the output representations, zu, ∀u ∈V, and tune the weight matrices, Wk, ∀k ∈{1, ..., K}, and parameters of the aggregator functions via stochastic gradient descent. The graph-based loss function encourages nearby nodes to have similar representations, while enforcing that the representations of disparate nodes are highly distinct: JG(zu) = −log σ(z⊤ u zv) −Q · Evn∼Pn(v) log σ(−z⊤ u zvn) , (1) where v is a node that co-occurs near u on fixed-length random walk, σ is the sigmoid function, Pn is a negative sampling distribution, and Q defines the number of negative samples. Importantly, unlike previous embedding approaches, the representations zu that we feed into this loss function are generated from the features contained within a node’s local neighborhood, rather than training a unique embedding for each node (via an embedding look-up). This unsupervised setting emulates situations where node features are provided to downstream machine learning applications, as a service or in a static repository. In cases where representations are to be used only on a specific downstream task, the unsupervised loss (Equation 1) can simply be replaced, or augmented, by a task-specific objective (e.g., cross-entropy loss). 3.3 Aggregator Architectures Unlike machine learning over N-D lattices (e.g., sentences, images, or 3-D volumes), a node’s neighbors have no natural ordering; thus, the aggregator functions in Algorithm 1 must operate over an unordered set of vectors. Ideally, an aggregator function would be symmetric (i.e., invariant to permutations of its inputs) while still being trainable and maintaining high representational capacity. The symmetry property of the aggregation function ensures that our neural network model can be trained and applied to arbitrarily ordered node neighborhood feature sets. We examined three candidate aggregator functions: Mean aggregator. Our first candidate aggregator function is the mean operator, where we simply take the elementwise mean of the vectors in {hk−1 u , ∀u ∈N(v)}. The mean aggregator is nearly equivalent to the convolutional propagation rule used in the transductive GCN framework [17]. In particular, we can derive an inductive variant of the GCN approach by replacing lines 4 and 5 in Algorithm 1 with the following:4 hk v ←σ(W · MEAN({hk−1 v } ∪{hk−1 u , ∀u ∈N(v)}). (2) We call this modified mean-based aggregator convolutional since it is a rough, linear approximation of a localized spectral convolution [17]. An important distinction between this convolutional aggregator and our other proposed aggregators is that it does not perform the concatenation operation in line 5 of Algorithm 1—i.e., the convolutional aggregator does concatenate the node’s previous layer representation hk−1 v with the aggregated neighborhood vector hk N (v). This concatenation can be viewed as a simple form of a “skip connection” [13] between the different “search depths”, or “layers” of the GraphSAGE algorithm, and it leads to significant gains in performance (Section 4). LSTM aggregator. We also examined a more complex aggregator based on an LSTM architecture [14]. Compared to the mean aggregator, LSTMs have the advantage of larger expressive capability. However, it is important to note that LSTMs are not inherently symmetric (i.e., they are not permutation invariant), since they process their inputs in a sequential manner. We adapt LSTMs to operate on an unordered set by simply applying the LSTMs to a random permutation of the node’s neighbors. 3Exploring non-uniform samplers is an important direction for future work. 4Note that this differs from Kipf et al’s exact equation by a minor normalization constant [17]. 5 Pooling aggregator. The final aggregator we examine is both symmetric and trainable. In this pooling approach, each neighbor’s vector is independently fed through a fully-connected neural network; following this transformation, an elementwise max-pooling operation is applied to aggregate information across the neighbor set: AGGREGATEpool k = max({σ Wpoolhk ui + b , ∀ui ∈N(v)}), (3) where max denotes the element-wise max operator and σ is a nonlinear activation function. In principle, the function applied before the max pooling can be an arbitrarily deep multi-layer perceptron, but we focus on simple single-layer architectures in this work. This approach is inspired by recent advancements in applying neural network architectures to learn over general point sets [29]. Intuitively, the multi-layer perceptron can be thought of as a set of functions that compute features for each of the node representations in the neighbor set. By applying the max-pooling operator to each of the computed features, the model effectively captures different aspects of the neighborhood set. Note also that, in principle, any symmetric vector function could be used in place of the max operator (e.g., an element-wise mean). We found no significant difference between max- and mean-pooling in developments test and thus focused on max-pooling for the rest of our experiments. 4 Experiments We test the performance of GraphSAGE on three benchmark tasks: (i) classifying academic papers into different subjects using the Web of Science citation dataset, (ii) classifying Reddit posts as belonging to different communities, and (iii) classifying protein functions across various biological protein-protein interaction (PPI) graphs. Sections 4.1 and 4.2 summarize the datasets, and the supplementary material contains additional information. In all these experiments, we perform predictions on nodes that are not seen during training, and, in the case of the PPI dataset, we test on entirely unseen graphs. Experimental set-up. To contextualize the empirical results on our inductive benchmarks, we compare against four baselines: a random classifer, a logistic regression feature-based classifier (that ignores graph structure), the DeepWalk algorithm [28] as a representative factorization-based approach, and a concatenation of the raw features and DeepWalk embeddings. We also compare four variants of GraphSAGE that use the different aggregator functions (Section 3.3). Since, the “convolutional” variant of GraphSAGE is an extended, inductive version of Kipf et al’s semi-supervised GCN [17], we term this variant GraphSAGE-GCN. We test unsupervised variants of GraphSAGE trained according to the loss in Equation (1), as well as supervised variants that are trained directly on classification cross-entropy loss. For all the GraphSAGE variants we used rectified linear units as the non-linearity and set K = 2 with neighborhood sample sizes S1 = 25 and S2 = 10 (see Section 4.4 for sensitivity analyses). For the Reddit and citation datasets, we use “online” training for DeepWalk as described in Perozzi et al. [28], where we run a new round of SGD optimization to embed the new test nodes before making predictions (see the Appendix for details). In the multi-graph setting, we cannot apply DeepWalk, since the embedding spaces generated by running the DeepWalk algorithm on different disjoint graphs can be arbitrarily rotated with respect to each other (Appendix D). All models were implemented in TensorFlow [1] with the Adam optimizer [16] (except DeepWalk, which performed better with the vanilla gradient descent optimizer). We designed our experiments with the goals of (i) verifying the improvement of GraphSAGE over the baseline approaches (i.e., raw features and DeepWalk) and (ii) providing a rigorous comparison of the different GraphSAGE aggregator architectures. In order to provide a fair comparison, all models share an identical implementation of their minibatch iterators, loss function and neighborhood sampler (when applicable). Moreover, in order to guard against unintentional “hyperparameter hacking” in the comparisons between GraphSAGE aggregators, we sweep over the same set of hyperparameters for all GraphSAGE variants (choosing the best setting for each variant according to performance on a validation set). The set of possible hyperparameter values was determined on early validation tests using subsets of the citation and Reddit data that we then discarded from our analyses. The appendix contains further implementation details.5 5Code and links to the datasets: http://snap.stanford.edu/graphsage/ 6 Table 1: Prediction results for the three datasets (micro-averaged F1 scores). Results for unsupervised and fully supervised GraphSAGE are shown. Analogous trends hold for macro-averaged scores. Citation Reddit PPI Name Unsup. F1 Sup. F1 Unsup. F1 Sup. F1 Unsup. F1 Sup. F1 Random 0.206 0.206 0.043 0.042 0.396 0.396 Raw features 0.575 0.575 0.585 0.585 0.422 0.422 DeepWalk 0.565 0.565 0.324 0.324 — — DeepWalk + features 0.701 0.701 0.691 0.691 — — GraphSAGE-GCN 0.742 0.772 0.908 0.930 0.465 0.500 GraphSAGE-mean 0.778 0.820 0.897 0.950 0.486 0.598 GraphSAGE-LSTM 0.788 0.832 0.907 0.954 0.482 0.612 GraphSAGE-pool 0.798 0.839 0.892 0.948 0.502 0.600 % gain over feat. 39% 46% 55% 63% 19% 45% Figure 2: A: Timing experiments on Reddit data, with training batches of size 512 and inference on the full test set (79,534 nodes). B: Model performance with respect to the size of the sampled neighborhood, where the “neighborhood sample size” refers to the number of neighbors sampled at each depth for K = 2 with S1 = S2 (on the citation data using GraphSAGE-mean). 4.1 Inductive learning on evolving graphs: Citation and Reddit data Our first two experiments are on classifying nodes in evolving information graphs, a task that is especially relevant to high-throughput production systems, which constantly encounter unseen data. Citation data. Our first task is predicting paper subject categories on a large citation dataset. We use an undirected citation graph dataset derived from the Thomson Reuters Web of Science Core Collection, corresponding to all papers in six biology-related fields for the years 2000-2005. The node labels for this dataset correspond to the six different field labels. In total, this is dataset contains 302,424 nodes with an average degree of 9.15. We train all the algorithms on the 2000-2004 data and use the 2005 data for testing (with 30% used for validation). For features, we used node degrees and processed the paper abstracts according Arora et al.’s [2] sentence embedding approach, with 300-dimensional word vectors trained using the GenSim word2vec implementation [30]. Reddit data. In our second task, we predict which community different Reddit posts belong to. Reddit is a large online discussion forum where users post and comment on content in different topical communities. We constructed a graph dataset from Reddit posts made in the month of September, 2014. The node label in this case is the community, or “subreddit”, that a post belongs to. We sampled 50 large communities and built a post-to-post graph, connecting posts if the same user comments on both. In total this dataset contains 232,965 posts with an average degree of 492. We use the first 20 days for training and the remaining days for testing (with 30% used for validation). For features, we use off-the-shelf 300-dimensional GloVe CommonCrawl word vectors [27]; for each post, we concatenated (i) the average embedding of the post title, (ii) the average embedding of all the post’s comments (iii) the post’s score, and (iv) the number of comments made on the post. The first four columns of Table 1 summarize the performance of GraphSAGE as well as the baseline approaches on these two datasets. We find that GraphSAGE outperforms all the baselines by a significant margin, and the trainable, neural network aggregators provide significant gains compared 7 to the GCN approach. For example, the unsupervised variant GraphSAGE-pool outperforms the concatenation of the DeepWalk embeddings and the raw features by 13.8% on the citation data and 29.1% on the Reddit data, while the supervised version provides a gain of 19.7% and 37.2%, respectively. Interestingly, the LSTM based aggregator shows strong performance, despite the fact that it is designed for sequential data and not unordered sets. Lastly, we see that the performance of unsupervised GraphSAGE is reasonably competitive with the fully supervised version, indicating that our framework can achieve strong performance without task-specific fine-tuning. 4.2 Generalizing across graphs: Protein-protein interactions We now consider the task of generalizing across graphs, which requires learning about node roles rather than community structure. We classify protein roles—in terms of their cellular functions from gene ontology—in various protein-protein interaction (PPI) graphs, with each graph corresponding to a different human tissue [41]. We use positional gene sets, motif gene sets and immunological signatures as features and gene ontology sets as labels (121 in total), collected from the Molecular Signatures Database [34]. The average graph contains 2373 nodes, with an average degree of 28.8. We train all algorithms on 20 graphs and then average prediction F1 scores on two test graphs (with two other graphs used for validation). The final two columns of Table 1 summarize the accuracies of the various approaches on this data. Again we see that GraphSAGE significantly outperforms the baseline approaches, with the LSTM- and pooling-based aggregators providing substantial gains over the mean- and GCN-based aggregators.6 4.3 Runtime and parameter sensitivity Figure 2.A summarizes the training and test runtimes for the different approaches. The training time for the methods are comparable (with GraphSAGE-LSTM being the slowest). However, the need to sample new random walks and run new rounds of SGD to embed unseen nodes makes DeepWalk 100-500× slower at test time. For the GraphSAGE variants, we found that setting K = 2 provided a consistent boost in accuracy of around 10-15%, on average, compared to K = 1; however, increasing K beyond 2 gave marginal returns in performance (0-5%) while increasing the runtime by a prohibitively large factor of 10-100×, depending on the neighborhood sample size. We also found diminishing returns for sampling large neighborhoods (Figure 2.B). Thus, despite the higher variance induced by sub-sampling neighborhoods, GraphSAGE is still able to maintain strong predictive accuracy, while significantly improving the runtime. 4.4 Summary comparison between the different aggregator architectures Overall, we found that the LSTM- and pool-based aggregators performed the best, in terms of both average performance and number of experimental settings where they were the top-performing method (Table 1). To give more quantitative insight into these trends, we consider each of the six different experimental settings (i.e., (3 datasets) × (unsupervised vs. supervised)) as trials and consider what performance trends are likely to generalize. In particular, we use the non-parametric Wilcoxon Signed-Rank Test [33] to quantify the differences between the different aggregators across trials, reporting the T-statistic and p-value where applicable. Note that this method is rank-based and essentially tests whether we would expect one particular approach to outperform another in a new experimental setting. Given our small sample size of only 6 different settings, this significance test is somewhat underpowered; nonetheless, the T-statistic and associated p-values are useful quantitative measures to assess the aggregators’ relative performances. We see that LSTM-, pool- and mean-based aggregators all provide statistically significant gains over the GCN-based approach (T = 1.0, p = 0.02 for all three). However, the gains of the LSTM and pool approaches over the mean-based aggregator are more marginal (T = 1.5, p = 0.03, comparing 6Note that in very recent follow-up work Chen and Zhu [6] achieve superior performance by optimizing the GraphSAGE hyperparameters specifically for the PPI task and implementing new training techniques (e.g., dropout, layer normalization, and a new sampling scheme). We refer the reader to their work for the current state-of-the-art numbers on the PPI dataset that are possible using a variant of the GraphSAGE approach. 8 LSTM to mean; T = 4.5, p = 0.10, comparing pool to mean). There is no significant difference between the LSTM and pool approaches (T = 10.0, p = 0.46). However, GraphSAGE-LSTM is significantly slower than GraphSAGE-pool (by a factor of ≈2×), perhaps giving the pooling-based aggregator a slight edge overall. 5 Theoretical analysis In this section, we probe the expressive capabilities of GraphSAGE in order to provide insight into how GraphSAGE can learn about graph structure, even though it is inherently based on features. As a case-study, we consider whether GraphSAGE can learn to predict the clustering coefficient of a node, i.e., the proportion of triangles that are closed within the node’s 1-hop neighborhood [38]. The clustering coefficient is a popular measure of how clustered a node’s local neighborhood is, and it serves as a building block for many more complicated structural motifs [3]. We can show that Algorithm 1 is capable of approximating clustering coefficients to an arbitrary degree of precision: Theorem 1. Let xv ∈U, ∀v ∈V denote the feature inputs for Algorithm 1 on graph G = (V, E), where U is any compact subset of Rd. Suppose that there exists a fixed positive constant C ∈R+ such that ∥xv −xv′∥2 > C for all pairs of nodes. Then we have that ∀ϵ > 0 there exists a parameter setting Θ∗for Algorithm 1 such that after K = 4 iterations |zv −cv| < ϵ, ∀v ∈V, where zv ∈R are final output values generated by Algorithm 1 and cv are node clustering coefficients. Theorem 1 states that for any graph there exists a parameter setting for Algorithm 1 such that it can approximate clustering coefficients in that graph to an arbitrary precision, if the features for every node are distinct (and if the model is sufficiently high-dimensional). The full proof of Theorem 1 is in the Appendix. Note that as a corollary of Theorem 1, GraphSAGE can learn about local graph structure, even when the node feature inputs are sampled from an absolutely continuous random distribution (see the Appendix for details). The basic idea behind the proof is that if each node has a unique feature representation, then we can learn to map nodes to indicator vectors and identify node neighborhoods. The proof of Theorem 1 relies on some properties of the pooling aggregator, which also provides insight into why GraphSAGE-pool outperforms the GCN and mean-based aggregators. 6 Conclusion We introduced a novel approach that allows embeddings to be efficiently generated for unseen nodes. GraphSAGE consistently outperforms state-of-the-art baselines, effectively trades off performance and runtime by sampling node neighborhoods, and our theoretical analysis provides insight into how our approach can learn about local graph structures. A number of extensions and potential improvements are possible, such as extending GraphSAGE to incorporate directed or multi-modal graphs. A particularly interesting direction for future work is exploring non-uniform neighborhood sampling functions, and perhaps even learning these functions as part of the GraphSAGE optimization. Acknowledgments The authors thank Austin Benson, Aditya Grover, Bryan He, Dan Jurafsky, Alex Ratner, Marinka Zitnik, and Daniel Selsam for their helpful discussions and comments on early drafts. The authors would also like to thank Ben Johnson for his many useful questions and comments on our code. This research has been supported in part by NSF IIS-1149837, DARPA SIMPLEX, Stanford Data Science Initiative, Huawei, and Chan Zuckerberg Biohub. W.L.H. was also supported by the SAP Stanford Graduate Fellowship and an NSERC PGS-D grant. The views and conclusions expressed in this material are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the above funding agencies, corporations, or the U.S. and Canadian governments. 9 References [1] M. Abadi, A. Agarwal, P. Barham, E. Brevdo, Z. Chen, C. Citro, G. S. Corrado, A. Davis, J. Dean, M. Devin, et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint , 2016. [2] S. Arora, Y. Liang, and T. Ma. A simple but tough-to-beat baseline for sentence embeddings. In ICLR, 2017. [3] A. R. Benson, D. F. Gleich, and J. Leskovec. Higher-order organization of complex networks. Science, 353(6295):163–166, 2016. [4] J. Bruna, W. Zaremba, A. Szlam, and Y. LeCun. Spectral networks and locally connected networks on graphs. In ICLR, 2014. [5] S. Cao, W. Lu, and Q. Xu. Grarep: Learning graph representations with global structural information. In KDD, 2015. [6] J. Chen and J. Zhu. Stochastic training of graph convolutional networks. arXiv preprint arXiv:1710.10568, 2017. [7] H. Dai, B. Dai, and L. Song. Discriminative embeddings of latent variable models for structured data. In ICML, 2016. [8] M. Defferrard, X. Bresson, and P. Vandergheynst. Convolutional neural networks on graphs with fast localized spectral filtering. In NIPS, 2016. [9] D. K. Duvenaud, D. Maclaurin, J. Iparraguirre, R. Bombarell, T. Hirzel, A. Aspuru-Guzik, and R. P. Adams. Convolutional networks on graphs for learning molecular fingerprints. In NIPS, 2015. [10] M. Gori, G. Monfardini, and F. Scarselli. A new model for learning in graph domains. In IEEE International Joint Conference on Neural Networks, volume 2, pages 729–734, 2005. [11] A. Grover and J. Leskovec. node2vec: Scalable feature learning for networks. In KDD, 2016. [12] W. L. Hamilton, J. Leskovec, and D. Jurafsky. Diachronic word embeddings reveal statistical laws of semantic change. In ACL, 2016. [13] K. He, X. Zhang, S. Ren, and J. Sun. Identity mappings in deep residual networks. In EACV, 2016. [14] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735– 1780, 1997. [15] K. Hornik. Approximation capabilities of multilayer feedforward networks. Neural Networks, 4(2):251–257, 1991. [16] D. Kingma and J. Ba. Adam: A method for stochastic optimization. In ICLR, 2015. [17] T. N. Kipf and M. Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2016. [18] T. N. Kipf and M. Welling. Variational graph auto-encoders. In NIPS Workshop on Bayesian Deep Learning, 2016. [19] J. B. Kruskal. Multidimensional scaling by optimizing goodness of fit to a nonmetric hypothesis. Psychometrika, 29(1):1–27, 1964. [20] O. Levy and Y. Goldberg. Neural word embedding as implicit matrix factorization. In NIPS, 2014. [21] Y. Li, D. Tarlow, M. Brockschmidt, and R. Zemel. Gated graph sequence neural networks. In ICLR, 2015. [22] T. Mikolov, I. Sutskever, K. Chen, G. S. Corrado, and J. Dean. Distributed representations of words and phrases and their compositionality. In NIPS, 2013. [23] A. Y. Ng, M. I. Jordan, Y. Weiss, et al. On spectral clustering: Analysis and an algorithm. In NIPS, 2001. [24] M. Niepert, M. Ahmed, and K. Kutzkov. Learning convolutional neural networks for graphs. In ICML, 2016. 10 [25] L. Page, S. Brin, R. Motwani, and T. Winograd. The pagerank citation ranking: Bringing order to the web. Technical report, Stanford InfoLab, 1999. [26] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011. [27] J. Pennington, R. Socher, and C. D. Manning. Glove: Global vectors for word representation. In EMNLP, 2014. [28] B. Perozzi, R. Al-Rfou, and S. Skiena. Deepwalk: Online learning of social representations. In KDD, 2014. [29] C. R. Qi, H. Su, K. Mo, and L. J. Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In CVPR, 2017. [30] R. ˇReh˚uˇrek and P. Sojka. Software Framework for Topic Modelling with Large Corpora. In LREC, 2010. [31] F. Scarselli, M. Gori, A. C. Tsoi, M. Hagenbuchner, and G. Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 20(1):61–80, 2009. [32] N. Shervashidze, P. Schweitzer, E. J. v. Leeuwen, K. Mehlhorn, and K. M. Borgwardt. Weisfeilerlehman graph kernels. Journal of Machine Learning Research, 12:2539–2561, 2011. [33] S. Siegal. Nonparametric statistics for the behavioral sciences. McGraw-hill, 1956. [34] A. Subramanian, P. Tamayo, V. K. Mootha, S. Mukherjee, B. L. Ebert, M. A. Gillette, A. Paulovich, S. L. Pomeroy, T. R. Golub, E. S. Lander, et al. Gene set enrichment analysis: a knowledge-based approach for interpreting genome-wide expression profiles. Proceedings of the National Academy of Sciences, 102(43):15545–15550, 2005. [35] J. Tang, M. Qu, M. Wang, M. Zhang, J. Yan, and Q. Mei. Line: Large-scale information network embedding. In WWW, 2015. [36] D. Wang, P. Cui, and W. Zhu. Structural deep network embedding. In KDD, 2016. [37] X. Wang, P. Cui, J. Wang, J. Pei, W. Zhu, and S. Yang. Community preserving network embedding. In AAAI, 2017. [38] D. J. Watts and S. H. Strogatz. Collective dynamics of ‘small-world’ networks. Nature, 393(6684):440–442, 1998. [39] L. Xu, X. Wei, J. Cao, and P. S. Yu. Embedding identity and interest for social networks. In WWW, 2017. [40] Z. Yang, W. Cohen, and R. Salakhutdinov. Revisiting semi-supervised learning with graph embeddings. In ICML, 2016. [41] M. Zitnik and J. Leskovec. Predicting multicellular function through multi-layer tissue networks. Bioinformatics, 33(14):190–198, 2017. 11 | 2017 | 243 |
6,723 | Data-Efficient Reinforcement Learning in Continuous State-Action Gaussian-POMDPs Rowan Thomas McAllister Department of Engineering Cambridge University Cambridge, CB2 1PZ rtm26@cam.ac.uk Carl Edward Rasmussen Department of Engineering University of Cambridge Cambridge, CB2 1PZ cer54@cam.ac.uk Abstract We present a data-efficient reinforcement learning method for continuous stateaction systems under significant observation noise. Data-efficient solutions under small noise exist, such as PILCO which learns the cartpole swing-up task in 30s. PILCO evaluates policies by planning state-trajectories using a dynamics model. However, PILCO applies policies to the observed state, therefore planning in observation space. We extend PILCO with filtering to instead plan in belief space, consistent with partially observable Markov decisions process (POMDP) planning. This enables data-efficient learning under significant observation noise, outperforming more naive methods such as post-hoc application of a filter to policies optimised by the original (unfiltered) PILCO algorithm. We test our method on the cartpole swing-up task, which involves nonlinear dynamics and requires nonlinear control. 1 Introduction The Probabilistic Inference and Learning for COntrol (PILCO) [5] framework is a reinforcement learning algorithm, which uses Gaussian Processes (GPs) to learn the dynamics in continuous state spaces. The method has shown to be highly efficient in the sense that it can learn with only very few interactions with the real system. However, a serious limitation of PILCO is that it assumes that the observation noise level is small. There are two main reasons which make this assumption necessary. Firstly, the dynamics are learnt from the noisy observations, but learning the transition model in this way doesn’t correctly account for the noise in the observations. If the noise is assumed small, then this will be a good approximation to the real transition function. Secondly, PILCO uses the noisy observation directly to calculate the action, which is problematic if the observation noise is substantial. Consider a policy controlling an unstable system, where high gain feed-back is necessary for good performance. Observation noise is amplified when the noisy input is fed directly to the high gain controller, which in turn injects noise back into the state, creating cycles of increasing variance and instability. In this paper we extend PILCO to address these two shortcomings, enabling PILCO to be used in situations with substantial observation noise. The first issue is addressed using the so-called Direct method for training the transition model, see section 3.3. The second problem can be tackled by filtering the observations. One way to look at this is that PILCO does planning in observation space, rather than in belief space. In this paper we extend PILCO to allow filtering of the state, by combining the previous state distribution with the dynamics model and the observation using Bayes rule. Note, that this is easily done when the controller is being applied, but to gain the full benefit, we have to also take the filter into account when optimising the policy. PILCO trains its policy through minimising the expected predicted loss when simulating the system and controller actions. Since the dynamics are not known exactly, the simulation in PILCO had to 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. simulate distributions of possible trajectories of the physical state of the system. This was achieved using an analytical approximation based on moment-matching and Gaussian state distributions. In this paper we thus need to augment the simulation over physical states to include the state of the filter, an information state or belief state. A complication is that the belief state is itself a probability distribution, necessitating simulating distributions over distributions. This allows our algorithm to not only apply filtering during execution, but also anticipate the effects of filtering during training, thereby learning a better policy. We will first give a brief outline of related work in section 2 and the original PILCO algorithm in section 3, including the proposed use of the ‘Direct method’ for training dynamics from noisy observations in section 3.3. In section 4 will derive the algorithm for POMDP training or planning in belief space. Note an assumption is that we observe noisy versions of the state variables. We do not handle more general POMDPs where other unobserved states are also learnt nor learn any other mapping from the state space to observations other than additive Gaussian noise. In the final sections we show experimental results of our proposed algorithm handling observation noise better than competing algorithms. 2 Related work Implementing a filter is straightforward when the system dynamics are known and linear, referred to as Kalman filtering. For known nonlinear systems, the extended Kalman filter (EKF) is often adequate (e.g. [13]), as long as the dynamics are approximately linear within the region covered by the belief distribution. Otherwise, the EKF’s first order Taylor expansion approximation breaks down. Larger nonlinearities warrant the unscented Kalman filter (UKF) – a deterministic sampling technique to estimate moments – or particle methods [7, 12]. However, if moments can be computed analytically and exactly, moment-matching methods are preferred. Moment-matching using distributions from the exponential family (e.g. Gaussians) is equivalent to optimising the Kullback-Leibler divergence KL(p||q) between the true distribution p and an approximate distribution q. In such cases, momentmatching is less susceptible to model bias than the EKF due to its conservative predictions [4]. Unfortunately, the literature does not provide a continuous state-action method that is both data efficient and resistant to noise when the dynamics are unknown and locally nonlinear. Model-free methods can solve many tasks but require thousands of trials to solve the cartpole swing-up task [8], opposed to model-based methods like PILCO which requires about six. Sometimes the dynamics are partially-known, with known functional form yet unknown parameters. Such ‘grey-box’ problems have the aesthetic solution of incorporating the unknown dynamics parameters into the state, reducing the learning task to a POMDP planning task [6, 12, 14]. Finite state-action space tasks can be similarly solved, perhaps using Dirichlet parameters to model the finitely-many state-action-state transitions [10]. However, such solutions are not suitable for continuous-state ‘black-box’ problems with no prior dynamics knowledge. The original PILCO framework does not assume task-specific prior dynamics knowledge (only that the prior is vague, encoding only time-independent dynamics and smoothness on some unknown scale) yet assumes full state observability, failing under moderate sensor noise. One proposed solution is to filter observations during policy execution [4]. However, without also predicting system trajectories w.r.t. the filtering process, a policy is merely optimised for unfiltered control, not filtered control. The mismatch between unfiltered-prediction and filtered-execution restricts PILCO’s ability to take full advantage of filtering. Dallaire et al. [3] optimise a policy using a more realistic filtered-prediction. However, the method neglects model uncertainty by using the maximum a posteriori (MAP) model. Unlike the method of Deisenroth and Peters [4] which gives a full probabilistic treatment of the dynamics predictions, work by Dallaire et al. [3] is therefore highly susceptible to model error, hampering data-efficiency. We instead predict system trajectories using closed loop filtered control precisely because we execute closed loop filtered control. The resulting policies are thus optimised for the specific case in which they are used. Doing so, our method retains the same data-efficiency properties of PILCO whilst applicable to tasks with high observation noise. To evaluate our method, we use the benchmark cartpole swing-up task with noisy sensors. We show that realistic and probabilistic prediction enable our method to outperform the aforementioned methods. 2 Algorithm 1 PILCO 1: Define policy’s functional form: π : zt × ψ →ut. 2: Initialise policy parameters ψ randomly. 3: repeat 4: Execute policy, record data. 5: Learn dynamics model p(f). 6: Predict state trajectories from p(X0) to p(XT ). 7: Evaluate policy: J(ψ) = PT t=0 γtEt, Et = EX[cost(Xt)|ψ]. 8: Improve policy: ψ ←argminψJ(ψ). 9: until policy parameters ψ converge 3 The PILCO algorithm PILCO is a model-based policy-search RL algorithm, summarised by Algorithm 1. It applies to continuous-state, continuous-action, continuous-observation and discrete-time control tasks. After the policy is executed, the additional data is recorded to train a probabilistic dynamics model. The probabilistic dynamics model is then used to predict one-step system dynamics (from one timestep to the next). This allows PILCO to probabilistically predict multi-step system trajectories over an arbitrary time horizon T, by repeatedly using the predictive dynamics model’s output at one timestep, as the (uncertain) input in the following timestep. For tractability PILCO uses moment-matching to keep the latent state distribution Gaussian. The result is an analytic distribution of state-trajectories, approximated as a joint Gaussian distribution over T states. The policy is evaluated as the expected total cost of the trajectories, where the cost function is assumed to be known. Next, the policy is improved using local gradient-based optimisation, searching over policy-parameter space. A distinct advantage of moment-matched prediction for policy search instead of particle methods is smoother policy gradients and fewer local optima [9]. This process then repeats a small number of iterations before converging to a locally optimal policy. We now discuss details of each step in Algorithm 1 below, with policy evaluation and improvement discussed Appendix B. 3.1 Execution phase Once a policy is initialised, PILCO can execute the system (Algorithm 1, line 4). Let the latent state of the system at time t be xt ∈RD, which is noisily observed as zt = xt + ϵt, where ϵt iid ∼N(0, Σϵ). The policy π, parameterised by ψ, takes observation zt as input, and outputs a control action ut = π(zt, ψ) ∈RF . Applying action ut to the dynamical system in state xt, results in a new system state xt+1. Repeating until horizon T results in a new single state-trajectory of data. 3.2 Learning dynamics To learn the unknown dynamics (Algorithm 1, line 5), any probabilistic model flexible enough to capture the complexity of the dynamics can be used. Bayesian nonparametric models are particularly suited given their resistance to overfitting and underfitting respectively. Overfitting otherwise leads to model bias - the result of optimising the policy on the erroneous model. Underfitting limits the complexity of the system this method can learn to control. In a nonparametric model no prior dynamics knowledge is required, not even knowledge of how complex the unknown dynamics might be since the model’s complexity grows with the available data. We define the latent dynamics f : ˜xt →xt+1, where ˜xt .= [x⊤ t , u⊤ t ]⊤. PILCO models the dynamics with D independent Gaussian process (GP) priors, one for each dynamics output variable: f a : ˜xt →xa t+1, where a ∈[1, D] is the a’th dynamics output, and f a ∼GP(φ⊤ a ˜x, ka(˜xi, ˜xj)). Note we implement PILCO with a linear mean function1, φ⊤ a ˜x, where φa are additional hyperparameters trained by optimising the marginal likelihood [11, Section 2.7]. The covariance function k is squared exponential, with length scales Λa = diag([l2 a,1, ..., l2 a,D+F ]), and signal variance s2 a: ka(˜xi, ˜xj) = s2 a exp −1 2(˜xi −˜xj)⊤Λ−1 a (˜xi −˜xj) . 3.3 Learning dynamics from noisy observations The original PILCO algorithm ignored sensor noise when training each GP by assuming each observation zt to be the latent state xt. However, this approximation breaks down under significant noise. More complex training schemes are required for each GP that correctly treat each training 1 The original PILCO [5] instead uses a zero mean function, and instead predicts relative changes in state. 3 datum xt as latent, yet noisily-observed as zt. We resort to GP state space model methods, specifically the ‘Direct method’ [9, section 3.5]. The Direct method infers the marginal likelihood p(z1:N) approximately using moment-matching in a single forward-pass. Doing so, it specifically exploits the time series structure that generated observations z1:N. We use the Direct method to set the GP’s training data {x1:N, u1:N} and observation noise variance Σϵ to the inducing point parameters and noise parameters that optimise the marginal likelihood. In this paper we use the superior Direct method to train GPs, both in our extended version of PILCO presented section 4, and in our implementation of the original PILCO algorithm for fair comparison in the experiments. 3.4 Prediction phase In contrast to the execution phase, PILCO also predicts analytic distributions of state-trajectories (Algorithm 1, line 6) for policy evaluation. PILCO does this offline, between the online system executions. Predicted control is identical to executed control except each aforementioned quantity is instead now a random variable, distinguished with capitals: Xt, Zt, Ut, ˜Xt and Xt+1, all approximated as jointly Gaussian. These variables interact both in execution and prediction according to Figure 1. To predict Xt+1 now that ˜Xt is uncertain PILCO uses the iterated law of expectation and variance: p(Xt+1| ˜Xt) = N(µx t+1 = E ˜ X[Ef[f( ˜Xt)]], Σx t+1 = V ˜ X[Ef[f( ˜Xt)]] + E ˜ X[Vf[f( ˜Xt)]]). (1) After a one-step prediction from X0 to X1, PILCO repeats the process from X1 to X2, and up to XT , resulting in a multi-step prediction whose joint we refer to as a distribution over state-trajectories. 4 Our method: PILCO extended with Bayesian filtering Here we describe the novel aspects of our method. Our method uses the same high-level algorithm as PILCO (Algorithm 1). However, we modify (using PILCO’s source code http://mlg.eng. cam.ac.uk/pilco/) two subroutines to extend PILCO from MDPs to a special-case of POMDPs (specifically where the partial observability has the form of additive Gaussian noise on the unobserved state X). First, we filter observations during system execution (Algorithm 1, line 4), detailed in Section 4.1. Second, we predict belief-trajectories instead of state-trajectories (line 6), detailed section 4.2. Filtering maintains a belief posterior of the latent system state. The belief is conditioned on, not just the most recent observation, but all previous observations (Figure 2). Such additional conditioning has the benefit of providing a less-noisy and more-informed input to the policy: the filtered belief-mean instead of the raw observation zt. Our implementation continues PILCO’s distinction between executing the system (resulting in a single real belief-trajectory) and predicting the system’s responses (which in our case yields an analytic distribution of multiple possible future belief-trajectories). During the execution phase, the system reads specific observations zt. Our method additionally maintains a belief state b ∼N(m, V ) by filtering observations. This belief state b can be treated as a random variable with a distribution parameterised by belief-mean m and belief-certainty V seen Figure 3. Note both m and V are functions of previous observations z1:t. Now, during the (probabilistic) prediction phase, future observations are instead random variables (since they have not been observed yet), distinguished as Z. Since the belief parameters m and V are Xt Xt+1 Zt Ut Zt+1 π f Figure 1: The original (unfiltered) PILCO, as a probabilistic graphical model. At each timestep, the latent system Xt is observed noisily as Zt which is inputted directly into policy function π to decide action Ut. Finally, the latent system will evolve to Xt+1, according to the unknown, nonlinear dynamics function f of the previous state Xt and action Ut. Bt|t−1 Bt|t Bt+1|t Zt Ut Zt+1 π f Figure 2: Our method (PILCO extended with Bayesian filtering). Our prior belief Bt|t−1 (over latent system Xt), generates observation Zt. The prior belief Bt|t−1 then combines with observation Zt resulting in posterior belief Bt|t (the update step). Then, the mean posterior belief E[Bt|t] is inputted into policy function π to decide action Ut. Finally, the next timestep’s prior belief Bt+1|t is predicted using dynamics model f (the prediction step). 4 m V B Figure 3: Belief in execution phase: a Gaussian random variable parameterised by mean m and variance V . µm Σm M ¯V B Figure 4: Belief in prediction phase: a Gaussian random variable with random mean M and nonrandom variance ¯V , where M is itself a Gaussian random variable parameterised by mean µm and variance Σm. functions of the now-random observations, the belief parameters must be random also, distinguished as M and V ′. Given the belief’s distribution parameters are now random, the belief is hierarchicallyrandom, denoted B ∼N(M, V ′) seen Figure 4. Our framework allows us to consider multiple possible future belief-states analytically during policy evaluation. Intuitively, our framework is an analytical analogue of POMDP policy evaluation using particle methods. In particle methods, each particle is associated with a distinct belief, due to each conditioning on independent samples of future observations. A particle distribution thus defines a distribution over beliefs. Our method is the analytical analogue of this particle distribution, and requires no sampling. By restricting our beliefs as (parametric) Gaussian, we can tractably encode a distribution over beliefs by a distribution over belief-parameters. 4.1 Execution phase with a filter When an actual filter is applied, it starts with three pieces of information: mt|t−1, Vt|t−1 and a noisy observation of the system zt (the dual subscript means belief of the latent physical state x at time t given all observations up until time t −1 inclusive). The filtering ‘update step’ combines prior belief bt|t−1 = Xt|z1:t−1, u1:t−1 ∼N(mt|t−1, Vt|t−1) with observational likelihood p(zt) = N(Xt, Σϵ) using Bayes rule to yield posterior belief bt|t = Xt|z1:t, u1:t−1: bt|t ∼N(mt|t, Vt|t), mt|t = Wmmt|t−1 + Wzzt, Vt|t = WmVt|t−1, (2) with weight matrices Wm = Σϵ(Vt|t−1+Σϵ)−1 and Wz = Vt|t−1(Vt|t−1+Σϵ)−1 computed from the standard result Gaussian conditioning. The policy π instead uses updated belief-mean mt|t (smoother and better-informed than zt) to decide the action: ut = π(mt|t, ψ). Thus, the joint distribution over the updated (random) belief and the (non-random) action is ˜bt|t .= bt|t ut ∼N ˜mt|t .= mt|t ut , ˜Vt|t .= Vt|t 0 0 0 . (3) Next, the filtering ‘prediction step’ computes the predictive-distribution of bt+1|t = p(xt+1|z1:t, u1:t) from the output of dynamics model f given random input ˜bt|t. The distribution f(˜bt|t) is nonGaussian yet has analytically computable moments [5]. For tractability, we approximate bt+1|t as Gaussian-distributed using moment-matching: bt+1|t ∼N(mt+1|t, Vt+1|t), ma t+1|t =E˜bt|t[f a(˜bt|t)], V ab t+1|t =C˜bt|t[f a(˜bt|t), f b(˜bt|t)], (4) where a and b refer to the a’th and b’th dynamics output. Both ma t+1|t and V ab t+1|t are derived in Appendix D. The process then repeats using the predictive belief (4) as the prior belief in the following timestep. This completes the specification of the system in execution. 4.2 Prediction phase with a filter During the prediction phase, we compute the probabilistic behaviour of the filtered system via an analytic distribution of belief states (Figure 4). We begin with a prior belief at time t = 0 before any observations are recorded (symbolised by ‘−1’), setting the prior Gaussian belief to have a distribution equal 5 to the known initial Gaussian state distribution: B0|−1 ∼N(M0|−1, ¯V0|−1), where M0|−1 ∼N(µx 0, 0) and ¯V0|−1 = Σx 0. Note the variance of M0|−1 is zero, corresponding to a single prior belief at the beginning of the prediction phase. We probabilistically predict the yet-unobserved observation Zt using our belief distribution Bt|t−1 and the known additive Gaussian observation noise ϵt as per Figure 2. Since we restrict both the belief mean M and observation Z to being Gaussian random variables, we can express their joint distribution: Mt|t−1 Zt ∼N µm t|t−1 µm t|t−1 , Σm t|t−1 Σm t|t−1 Σm t|t−1 Σz t , (5) where Σz t = Σm t|t−1 + ¯Vt|t−1 + Σϵ. The filtering ‘update step’ combines prior belief Bt|t−1 with observation Zt using the same logic as (2), the only difference being Zt is now random. Since the updated posterior belief mean Mt|t is a (deterministic) function of random Zt, then Mt|t is necessarily random (with non-zero variance unlike M0|−1). Their relationship, Mt|t = WmMt|t−1 + WzZt, results in the updated hierarchical belief posterior: Bt|t ∼ N Mt|t, ¯Vt|t , where Mt|t ∼N µm t|t, Σm t|t , (6) µm t|t = Wmµm t|t−1 + Wzµm t|t−1 = µm t|t−1, (7) Σm t|t = WmΣm t|t−1W ⊤ m + WmΣm t|t−1W ⊤ z + WzΣm t|t−1W ⊤ m + WzΣz t W ⊤ z , (8) ¯Vt|t = Wm ¯Vt|t−1. (9) The policy now has a random input Mt|t, thus the control output must also be random (even though π is a deterministic function): Ut = π(Mt|t, ψ), which we implement by overloading the policy function: (µu t , Σu t , Cmu t ) = π(µm t|t, Σm t|t, ψ), where µu t is the output mean, Σu t the output variance and Cmu t input-output covariance with premultiplied inverse input variance, Cmu t .= (Σm t|t)−1CM[Mt|t, Ut]. Making a moment-matched approximation yields a joint Gaussian: ˜ Mt|t .= Mt|t Ut ∼N µ ˜m t|t .= µm t|t µu t , Σ ˜m t|t .= Σm t|t Σm t|tCmu t (Cmu t )⊤Σm t|t Σu t . (10) Finally, we probabilistically predict the belief-mean Mt+1|t ∼N(µm t+1|t, Σm t+1|t) and the expected belief-variance ¯Vt+1|t = E ˜ Mt|t[V ′ t+1|t]. To do this we use a novel generalisation of Gaussian process moment matching with uncertain inputs by Candela et al. [1] generalised to hierarchically-uncertain inputs detailed in Appendix E. We have now discussed the one-step prediction of the filtered system, from Bt|t−1 to Bt+1|t. Using this process repeatedly, from initial belief B0|−1 we one-step predict to B1|0, then to B2|1, up to BT |T −1. 5 Experiments We test our algorithm on the cartpole swing-up problem (shown in Appendix A), a benchmark for comparing controllers of nonlinear dynamical systems. We experiment using a physics simulator by solving the differential equations of the system. Each episode begins with the pendulum hanging downwards. The goal is then to swing the pendulum upright, thereafter continuing to balance it. The use a cart mass of mc = 0.5kg. A zero-order hold controller applies horizontal forces to the cart within range [−10, 10]N. The policy is a linear combination of 100 radial basis functions. Friction resists the cart’s motion with damping coefficient b = 0.1Ns/m. Connected to the cart is a pole of length l = 0.2m and mass mp = 0.5kg located at its endpoint, which swings due to gravity’s acceleration g = 9.82m/s2. An inexpensive camera observes the system. Frame rates of $10 webcams are typically 30Hz at maximum resolution, thus the time discretisation is ∆t = 1/30s. The state x comprises the cart position, pendulum angle, and their time derivatives x = [xc, θ, ˙xc, ˙θ]⊤. We both randomlyinitialise the system and set the initial belief of the system according to B0|−1 ∼N(M0|−1, V0|−1) where M0|−1 ∼δ([0, π, 0, 0]⊤) and V 1/2 0|−1 = diag([0.2m, 0.2rad, 0.2m/s, 0.2rad/s]). The camera’s noise standard deviation is: (Σϵ)1/2 = diag([0.03m, 0.03rad, 0.03 ∆t m/s, 0.03 ∆t rad/s]), noting 0.03rad ≈ 1.7◦. We use the 0.03 ∆t terms since using a camera we cannot observe velocities directly but can estimate them with finite differences. Each episode has a two second time horizon (60 timesteps). The cost function we impose is 1 −exp −1 2d2/σ2 c where σc = 0.25m and d2 is the squared Euclidean distance between the pendulum’s end point and its goal. 6 We compare four algorithms: 1) PILCO by Deisenroth and Rasmussen [5] as a baseline (unfiltered execution, and unfiltered full-prediction); 2) the method by Dallaire et al. [3] (filtered execution, and filtered MAP-prediction); 3) the method by Deisenroth and Peters [4] (filtered execution, and unfiltered full-prediction); and lastly 4) our method (filtered execution, and filtered full-prediction). For clear comparison we first control for data and dynamics models, where each algorithm has access to the exact same data and exact same dynamics model. The reason is to eliminate variance in performance caused by different algorithms choosing different actions. We generate a single dataset by running the baseline PILCO algorithm for 11 episodes (totalling 22 seconds of system interaction). The independent variables of our first experiment are 1) the method of system prediction and 2) the method of system execution. Each policy is then optimised from the same initialisation using their respective prediction methods, before comparing performances. Afterwards, we experiment allowing each algorithm to collect its own data, and also experiment with various noise level. 6 Results and analysis 6.1 Results using a common dataset We now compare algorithm performance, both predictive (Figure 5) and empirical (Figure 6). First, we analyse predictive costs per timestep (Figure 5). Since predictions are probabilistic, the costs have distributions, with the exception of Dallaire et al. [3] which predicts MAP trajectories and therefore has deterministic cost. Even though we plot distributed costs, policies are optimised w.r.t. expected total cost only. Using the same dynamics, the different prediction methods optimise different policies (with the exception of Deisenroth and Rasmussen [5] and Deisenroth and Peters [4], whose prediction methods are identical). During the first 10 timesteps, we note identical performance with maximum cost due to the non-zero time required to physically swing the pendulum up near the goal. Performances thereafter diverge. Since we predict w.r.t. a filtering process, less noise is predicted to be injected into the policy, and the optimiser can thus afford higher gain parameters w.r.t. the pole at balance point. If we linearise our policy around the goal point, our policy has a gain of -81.7N/rad w.r.t. pendulum angle, a larger-magnitude than both Deisenroth method gains of -39.1N/rad (negative values refer to left forces in Figure 11). This higher gain is advantageous here, corresponding to a more reactive system which is more likely to catch a falling pendulum. Finally, we note Dallaire et al. [3] predict very high performance. Without balancing the costs across multiple possible trajectories, the method instead optimises a sequence of deterministic states to near perfection. To compare the predictive results against the empirical, we used 100 executions of each algorithm (Figure 6). First, we notice a stark difference between predictive and executed performances from Dallaire et al. [3], due to neglecting model uncertainty, suffering model bias. In contrast, the other methods consider uncertainty and have relatively unbiased predictions, judging by the similarity between predictive-vs-empirical performances. Deisenroth’s methods, which differ only in execution, illustrate that filtering during execution-only can be better than no filtering at all. However, the major benefit comes when the policy is evaluated from multi-step predictions of a filtered system. Opposed to Deisenroth and Peters [4], our method’s predictions reflect reality closer because we both predict and execute system trajectories using closed loop filtering control. To test statistical significance of empirical cost differences given 100 executions, we use a Wilcoxon rank-sum test at each time step. Excluding time steps ranging t = [0, 29] (whose costs are similar), the minimum z-score over timesteps t = [30, 60] that our method has superior average-cost than each other methods follows: Deisenroth 2011 min(z) = 4.99, Dallaire 2009’s min(z) = 8.08, Deisenroth 2012’s min(z) = 3.51. Since the minimum min(z) = 3.51, we have p > 99.9% certainty our method’s average empirical cost is superior than each other method. 6.2 Results of full reinforcement learning task In the previous experiment we used a common dataset to compare each algorithm, to isolate and focus on how well each algorithm makes use of data, rather than also considering the different ways each algorithm collects different data. Here, we remove the constraint of a common dataset, and test the full reinforcement learning task by allowing each algorithm to collect its own data over repeated trials of the cart-pole task. Each algorithm is allowed 15 trials (episodes), repeated 10 times with different random seeds. For a particular re-run experiment and episode number, an algorithm’s predicted loss is unchanged when repeatedly computed, yet the empirical loss differs due to random initial states, observation noise, and process noise. We therefore average the empirical results over 100 random executions of the controller at each episode and seed. 7 0 10 20 30 40 50 60 0 0.2 0.4 0.6 0.8 1 Timestep Cost Deisenroth 2011 Dallaire 2009 Deisenroth 2012 Our Method Figure 5: Predictive cost per timestep. The error bars show ±1 standard deviation. Each algorithm has access to the same data set (generated by baseline Deisenroth 2011) and dynamics model. Algorithms differ in their multi-step prediction methods (except Deisenroth’s algorithms whose predictions overlap). 0 10 20 30 40 50 60 0 0.2 0.4 0.6 0.8 1 Timestep Figure 6: Empirical cost per timestep. We generate empirical cost distributions from 100 executions per algorithm. Error bars show ±1 standard deviation. The plot colours and shapes correspond to the legend in Figure 5. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 20 40 60 Episode Loss Deisenroth 2011 Dallaire 2009 Deisenroth 2012 Our Method Figure 7: Predictive loss per episode. Error bars show ±1 standard error of the mean predicted loss given 10 repeats of each algorithm. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 20 40 60 Episode Deisenroth 2011 Dallaire 2009 Deisenroth 2012 Our Method Figure 8: Empirical loss per episode. Error bars show ±1 standard error of the mean empirical loss given 10 repeats of each algorithm. In each repeat we computed the mean empirical loss using 100 independent executions of the controller. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 10 20 30 40 50 60 Episode Loss k = 1 k = 2 k = 4 k = 8 k = 16 Figure 9: Empirical loss of Deisenroth 2011 for various noise levels. The error bars show ±1 standard deviation of the empirical loss distribution based on 100 repeats of the same learned controller, per noise level. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 10 20 30 40 50 60 Episode Figure 10: Empirical loss of Filtered PILCO for various noise levels. The error bars show ±1 standard deviation of the empirical loss distribution based on 100 repeats of the same learned controller, per noise level. 8 The predictive loss (cumulative cost) distributions of each algorithm are shown Figure 7. Perhaps the most striking difference between the full reinforcement learning predictions and those made with a controlled dataset (Figure 5) is that Dallaire does not predict it will perform well. The quality of the data collected by Dallaire within the first 15 episodes is not sufficient to predict good performance. Our Filtered PILCO method accurately predicts its own strong performance and additionally outperforms the competing algorithm seen in Figure 8. Of interest is how each algorithm performs equally poorly during the first four episodes, with Filtered PILCO’s performance breaking away and learning the task well by the seventh trial. Such a learning rate was similar to the original PILCO experiment with the noise-free cartpole. 6.3 Results with various observation noises Different observation noise levels were also tested, comparing PILCO (Figure 9) with Filtered PILCO (Figure 10). Both figures show a noise factors k, such that the observation noise is: √ Σϵ =k × diag([0.01m, 0.01rad, 0.01 ∆t m/s, 0.01 ∆t rad/s]). For reference, our previous experiments used a noise factor of k = 3. At low noise factor k = 1, both algorithms perform similarly-well, since observations are precise enough to control a system without a filter. As observations noise increases, the performance of unfiltered PILCO soon drops, whilst the Filtered PILCO can successfully control the system under higher noise levels (Figure 10). 6.4 Training time complexity Training the GP dynamics model involved N = 660 data points, M = 50 inducing points under a sparse GP Fully Independent Training Conditional (FITC) [2], P = 100 policy RBF centroids, D = 4 state dimensions, F = 1 action dimensions, and T = 60 timestep horizon, with time complexity O(DNM 2). Policy optimisation (with 300 steps, each of which require trajectory prediction with gradients) is the most intense part: our method and both Deisenroth’s methods scale O(M 2D2(D + F)2T + P 2D2F 2T), whilst Dallaire’s only scales O(MD(D + F)T + PDFT). Worst case we require M = O(exp(D + F)) inducing points to capture dynamics, the average case is unknown. Total training time was four hours to train the original PILCO method with an additional one hour to re-optimise the policy. 7 Conclusion and future work In this paper, we extended the original PILCO algorithm [5] to filter observations, both during system execution and multi-step probabilistic prediction required for policy evaluation. The extended framework enables learning in a special case of partially-observed MDP environments (POMDPs) whilst retaining PILCO’s data-efficiency property. We demonstrated successful application to a benchmark control problem, the noisily-observed cartpole swing-up. Our algorithm learned a good policy under significant observation noise in less than 30 seconds of system interaction. Importantly, our algorithm evaluates policies with predictions that are faithful to reality: we predict w.r.t. closed loop filtered control precisely because we execute closed loop filtered control. We showed experimentally that faithful and probabilistic predictions improved performance with respect to the baselines. For clear comparison we first constrained each algorithm to use the same dynamics dataset to demonstrate superior data-usage of our algorithm. Afterwards we relaxed this constraint, and showed our algorithm was able to learn from fewer data. Several more challenges remain for future work. Firstly the assumption of zero variance of the belief-variance could be relaxed. A relaxation allows distributed trajectories to more accurately consider belief states having various degrees of certainty (belief-variance). For example, system trajectories have larger belief-variance when passing though data-sparse regions of state-space, and smaller belief-variance in data-dense regions. Secondly, the policy could be a function of the full belief distribution (mean and variance) rather than just the mean. Such flexibility could help the policy make more ‘cautious’ actions when more uncertain about the state. A third challenge is handling non-Gaussian noise and unobserved state variables. For example, in real-life scenarios using a camera sensor for self-driving, observations are occasionally fully or partially occluded, or limited by weather conditions, where such occlusions and limitations change, opposed to assuming a fixed Gaussian addition noise. Lastly, experiments with a real robot would be important to show the usefulness in practice. 9 References [1] Joaquin Candela, Agathe Girard, Jan Larsen, and Carl Rasmussen. Propagation of uncertainty in Bayesian kernel models-application to multiple-step ahead forecasting. In International Conference on Acoustics, Speech, and Signal Processing, volume 2, pages 701–704, 2003. [2] Lehel Csató and Manfred Opper. Sparse on-line Gaussian processes. Neural Computation, 14(3):641–668, 2002. [3] Patrick Dallaire, Camille Besse, Stephane Ross, and Brahim Chaib-draa. Bayesian reinforcement learning in continuous POMDPs with Gaussian processes. In International Conference on Intelligent Robots and Systems, pages 2604–2609, 2009. [4] Marc Deisenroth and Jan Peters. Solving nonlinear continuous state-action-observation POMDPs for mechanical systems with Gaussian noise. In European Workshop on Reinforcement Learning, 2012. [5] Marc Deisenroth and Carl Rasmussen. PILCO: A model-based and data-efficient approach to policy search. In International Conference on Machine Learning, pages 465–472, New York, NY, USA, 2011. [6] Michael Duff. Optimal Learning: Computational procedures for Bayes-adaptive Markov decision processes. PhD thesis, Department of Computer Science, University of Massachusetts Amherst, 2002. [7] Jonathan Ko and Dieter Fox. GP-BayesFilters: Bayesian filtering using Gaussian process prediction and observation models. Autonomous Robots, 27(1):75–90, 2009. [8] Timothy Lillicrap, Jonathan Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. In arXiv preprint, arXiv 1509.02971, 2015. [9] Andrew McHutchon. Nonlinear modelling and control using Gaussian processes. PhD thesis, Department of Engineering, University of Cambridge, 2014. [10] Pascal Poupart, Nikos Vlassis, Jesse Hoey, and Kevin Regan. An analytic solution to discrete Bayesian reinforcement learning. International Conference on Machine learning, pages 697–704, 2006. [11] Carl Rasmussen and Chris Williams. Gaussian Processes for Machine Learning. MIT Press, Cambridge, MA, USA, 1 2006. [12] Stephane Ross, Brahim Chaib-draa, and Joelle Pineau. Bayesian reinforcement learning in continuous POMDPs with application to robot navigation. In International Conference on Robotics and Automation, pages 2845–2851, 2008. [13] Jur van den Berg, Sachin Patil, and Ron Alterovitz. Efficient approximate value iteration for continuous Gaussian POMDPs. In Association for the Advancement of Artificial Intelligence, 2012. [14] Dustin Webb, Kyle Crandall, and Jur van den Berg. Online parameter estimation via real-time replanning of continuous Gaussian POMDPs. In International Conference Robotics and Automation, pages 5998–6005, 2014. 10 | 2017 | 244 |
6,724 | Coded Distributed Computing for Inverse Problems Yaoqing Yang, Pulkit Grover and Soummya Kar Carnegie Mellon University {yyaoqing, pgrover, soummyak}@andrew.cmu.edu Abstract Computationally intensive distributed and parallel computing is often bottlenecked by a small set of slow workers known as stragglers. In this paper, we utilize the emerging idea of “coded computation” to design a novel error-correcting-code inspired technique for solving linear inverse problems under specific iterative methods in a parallelized implementation affected by stragglers. Example machinelearning applications include inverse problems such as personalized PageRank and sampling on graphs. We provably show that our coded-computation technique can reduce the mean-squared error under a computational deadline constraint. In fact, the ratio of mean-squared error of replication-based and coded techniques diverges to infinity as the deadline increases. Our experiments for personalized PageRank performed on real systems and real social networks show that this ratio can be as large as 104. Further, unlike coded-computation techniques proposed thus far, our strategy combines outputs of all workers, including the stragglers, to produce more accurate estimates at the computational deadline. This also ensures that the accuracy degrades “gracefully” in the event that the number of stragglers is large. 1 Introduction The speed of distributed computing is often affected by a few slow workers known as the “stragglers” [1–4]. This issue is often addressed by replicating tasks across workers and using this redundancy to ignore some of the stragglers. Recently, methods from error-correcting codes (ECC) have been used for speeding up distributed computing [5–15], which build on classical works on algorithm-based fault-tolerance [16]. The key idea is to treat stragglers as “erasures” and use ECC to retrieve the result after a subset of fast workers have finished. In some cases, (e.g. [6, 8] for matrix multiplications), techniques that utilize ECC achieve scaling-sense speedups in average computation time compared to replication. In this work, we propose a novel coding-inspired technique to deal with stragglers in distributed computing of linear inverse problems using iterative solvers [17]. Existing techniques that use coding to deal with stragglers treat straggling workers as “erasures”, that is, they ignore computation results of the stragglers. In contrast, when using iterative methods for linear inverse problems, even if the computation result at a straggler has not converged, the proposed algorithm does not ignore the result, but instead combines it (with appropriate weights) with results from other workers. This is in part because the results of iterative methods often converge gradually to the true solutions. We use a small example shown in Fig. 1 to illustrate this idea. Suppose we want to solve two linear inverse problems with solutions x∗ 1 and x∗ 2. We “encode the computation” by adding an extra linear inverse problem with solution x∗ 1 + x∗ 2 (see Section 3), and distribute these three problems to three workers. Using this method, the solutions x∗ 1 and x∗ 2 can be obtained from the results of any combination of two fast workers that first return their solutions. But what if we have a computational deadline, Tdl, by which only one worker converges? The natural extension of existing strategies (e.g., [6]) will declare a failure because it needs at least two workers to respond. However, our strategy does not require convergence: even intermediate results can be utilized to estimate solutions. In other words, our strategy degrades gracefully as the number of stragglers increases, or as the deadline is pulled earlier. Indeed, we show that it is suboptimal to ignore stragglers as erasures, and design strategies that treat the difference from the optimal solution 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. x1+e1 x2+e2 x1+x2+e3 Processor1 Processor2 Processor3 x1 x1+x2 r1 r2 r1+r2 General coded computation Proposed coded method (slow) ignore! Processor1 Processor2 Processor3 (slow) waitEforEtwoE fastEworkers DeadlineETdl D e c o d e * * * * * * * x2* (slow) (slow) D e c o d e fail weightedE combination E n c o d e r1 r2 r1 r2 r1+r2 E n c o d e r1 r2 Figure 1: A comparison between the existing scheme in [6] and the proposed algorithm. as “soft” additive noise (see Section 3). We use an algorithm that is similar to weighted least-squares for decoding, giving each worker a weight based on its proximity to convergence. In this way, we can expect to fully utilize the computation results from all workers and obtain better speedup. Theoretically, we show that for a specified deadline time Tdl, under certain conditions on worker speed distributions, the coded linear inverse solver using structured codes has smaller mean squared error than the replication-based linear solver (Theorem 4.4). In fact, under more relaxed conditions on worker speed distributions, when the computation time Tdl increases, the ratio of the mean-squared error (MSE) of replication-based and coded linear solvers can get arbitrarily large (Theorem 4.5)! For validation of our theory, we performed experiments to compare coded and replication-based computation for a graph mining problem, namely personalized PageRank [18] using the classical power-iteration method [19]. We conduct experiments on the Twitter and Google Plus social networks under a deadline on computation time using a given number of workers on a real computation cluster (Section 6). We observe that the MSE of coded PageRank is smaller than that of replication by a factor of 104 at Tdl = 2 seconds. From an intuitive perspective, the advantage of coding over replication is that coding utilizes the diversity of all heterogeneous workers, whereas replication cannot (see section 7 for details). To compare with existing coded technique in [6], we adapt it to inverse problems by inverting only the partial results from the fast workers. However, from our experiments, if only the results from the fast workers are used, the error amplifies due to inverting an ill-conditioned submatrix during decoding (Section 6). This ill-conditioning issue of real-number erasure codes has also been recognized in a recent communication problem [20]. In contrast, our novel way of combining all the partial results including those from the stragglers helps bypass the difficulty of inverting an ill-conditioned matrix. The focus of this work is on utilizing computations to deliver the minimal MSE in solving linear inverse problems. Our algorithm does not reduce the communication cost. However, because each worker performs sophisticated iterative computations in our problem, such as the power-iteration computations, the time required for computation dominates that of communication (Section 5.2). This is unlike some recent works (e.g.[21–24]) where communication costs are observed to dominate because the per-processor computation is smaller. Finally, we summarize our main contributions in this paper: • We propose a coded computing algorithm for multiple instances of a linear inverse problem; • We theoretically analyze the mean-squared error of coded, uncoded and replication-based iterative linear solvers under a deadline constraint, and show scaling sense advantage of coded solvers in theory and orders of magnitude smaller error in data experiments. • This is the first work that treats stragglers as soft errors instead of erasures, which leads to graceful degradation in the event that the number of stragglers is large. 2 System Model and Problem Formulation 2.1 Preliminaries on Solving Linear Systems using Iterative Methods Consider the problem of solving k inverse problems with the same linear transform matrix M and different inputs ri: Mxi = ri, i = 1, 2, . . . k. When M is a square matrix, the closed-form solution is xi = M−1ri. When M is a non-square matrix, the regularized least-square solution is xi = (M⊤M + λI)−1M⊤ri, i = 1, 2, . . . k, with an appropriate regularization parameter λ. Since matrix inversion is hard, iterative methods are often used. We now look at two ordinary iterative methods, namely the Jacobian method [17] and the gradient descent method. For a square matrix M = D + L, where D is diagonal, the Jacobian iteration is written as x(l+1) i = D−1(ri −Lx(l) i ). Under certain conditions of D and L ([17, p.115]), the computation result converges to the true solution. One example is the PageRank algorithm discussed in Section 2.2. For the ℓ2-minimization problem with a non-square M, the gradient descent method has the form x(l+1) i = ((1−λ)I−ϵM⊤M)x(l) i +ϵM⊤ri, 2 where ϵ is an appropriate step-size. We can see that both the Jacobian iteration and the gradient descent iteration mentioned above have the form x(l+1) i = Bx(l) i + Kri, i = 1, 2, . . . k, (1) for two appropriate matrices B and K, which solves the following equation with true solution x∗ i : x∗ i = Bx∗ i + Kri, i = 1, 2, . . . k. (2) Therefore, subtracting (2) from (1), we have that the computation error e(l) i = x(l) i −x∗ i satisfies e(l+1) i = Be(l) i . (3) For the iterative method to converge, we always assume the spectral radius ρ(B) < 1 (see [17, p.115]). We will study iterative methods that have the form (1) throughout this paper. 2.2 Motivating Applications of Linear Inverse Problems Our coded computation technique requires solving multiple inverse problems with the same linear transform matrix M. One such problem is personalized PageRank. For a directed graph, the PageRank algorithm [19] aims to measure the nodes’ importance by solving the linear problem x = d N 1N + (1 −d)Ax, where d = 0.15 is called the “teleport” probability, N is the number of nodes and A is the column-normalized adjacency matrix. The personalized PageRank problem [18] considers a more general equation x = dr + (1 −d)Ax, for any possible vector r ∈RN that satisfies 1⊤r = 1. Compared to PageRank [19], personalized PageRank [18] incorporates r as the preference of different users or topics. A classical method to solve PageRank is power-iteration, which iterates the computation x(l+1) = dr + (1 −d)Ax(l) until convergence. This iterative method is the same as (1), which is essentially the Jacobian method mentioned above. Another example application is the sampling and recovery problem in the emerging field of graph signal processing [25, 26] as a non-square system, which is discussed in Supplementary section 8.1. 2.3 Problem Formulation: Distributed Computing and the Straggler Effect Consider solving k linear inverse problems Mxi = ri, i = 1, 2, . . . k in n > k workers using the iterative method (1), where each worker solves one inverse problem. Due to the straggler effect, the computation at different workers can have different speeds. The goal is to obtain minimal MSE in solving linear inverse problems before a deadline time Tdl. Suppose after Tdl, the i-th worker has completed li iterations in (1). Then, from (3), the residual error at the i-th worker is e(li) i = Blie(0) i . (4) For our theoretical results, we sometimes need the following assumption. Assumption 1. We assume that the optimal solutions x∗ i , i = 1, 2, . . . k, are i.i.d. Denote by µE and CE respectively the mean and the covariance of each x∗ i . Note that Assumption 1 is equivalent to the assumption that the inputs ri, i = 1, 2, . . . k are i.i.d., because ri and x∗ i are related by the linear equation (2). For the personalized PageRank problem discussed above, this assumption is reasonable because queries from different users or topics are unrelated. Assume we have estimated the mean µE beforehand and we start with the initial estimate x(0) i = µE. Then, e(0) i = x(0) i −x∗ i has mean 0N and covariance CE. We also try to extend our results for the case when x∗ i ’s (or equivalently, ri’s) are correlated. Since the extension is rather long and may hinder the understanding of the main paper, we provide it in supplementary section 8.2 and section 8.5. 2.4 Preliminaries on Error Correcting Codes We will use “encode” and “decode” to denote preprocessing and post-processing before and after parallel computation. In this paper, the encoder multiplies the inputs to the parallel workers with a “generator matrix” G and the decoder multiplies the outputs of the workers with a “decoding matrix” L (see Algorithm 1). We call a code an (n, k) code if the generator matrix has size k × n. We often use generator matrices G with orthonormal rows, which means Gk×nG⊤ n×k = Ik. An example of such a matrix is the submatrix formed by any k rows of an n × n orthonormal matrix (e.g., a Fourier matrix). Under this assumption, Gk×n can be augmented to form an n × n orthonormal matrix using another matrix H(n−k)×n, i.e. the square matrix Fn×n = Gk×n H(n−k)×n satisfies F⊤F = In. 3 3 Coded Distributed Computing of Linear Inverse Problems The proposed coded linear inverse algorithm (Algorithm 1) has three stages: (1) preprocessing (encoding) at the central controller, (2) parallel computing at n > k parallel workers, and (3) postprocessing (decoding) at the central controller. As we show later in the analysis of computing error, the entries trace(C(li)) in the diagonal matrix Λ are the expected MSE at each worker prior to decoding. The decoding matrix Lk×n in the decoding step (7) is chosen to be (GΛ−1G⊤)−1GΛ−1 to reduce the mean-squared error of the estimates of linear inverse solutions by assigning different weights to different workers based on the estimated accuracy of their computation (which is what Λ provides). This particular choice of Λ is inspired from the weighted least-square solution. Algorithm 1 Coded Distributed Linear Inverse Input: Input vectors [r1, r2, . . . , rk], generator matrix Gk×n, the linear system matrices B and K defined in (1). Initialize (Encoding): Encode the input vectors and the initial estimates by multiplying G: [s1, s2, . . . , sn] = [r1, r2, . . . , rk] · G. (5) [y(0) 1 , y(0) 2 , . . . , y(0) n ] = [x(0) 1 , x(0) 2 , . . . , x(0) k ] · G. (6) Parallel Computing: for i = 1 to n (in parallel) do Send si and y(0) i to the i-th worker. Execute the iterative method (1) with initial estimate y(0) i and input si at each worker. end for After a deadline time Tdl, collect all linear inverse results y(li) i from these n workers. The superscript li in y(li) i represents that the i-th worker finished li iterations. Denote by Y(Tdl) the collection of all results Y(Tdl) N×n = [y(l1) 1 , y(l2) 2 , . . . , y(ln) n ]. Post Processing (decoding at the central controller): Compute an estimate of the linear inverse solutions using the following matrix multiplication: ˆX⊤= L · (Y(Tdl))⊤:= (GΛ−1G⊤)−1GΛ−1(Y(Tdl))⊤, (7) where the estimate ˆXN×k = [ˆx1, ˆx2, . . . , ˆxk], the matrix Λ is Λ = diag [trace(C(l1)), . . . , trace(C(ln))] , (8) where the matrices C(li), i = 1, . . . , n are defined as C(li) = BliCE(B⊤)li. (9) In computation of Λ, if trace(C(li)) are not available, one can use precomputed estimates of this trace as discussed in Supplementary Section 8.9 with negligible computational complexity and theoretically guaranteed accuracy. 3.1 Bounds on Performance of the Coded Linear Inverse Algorithm Define l = [l1, l2, . . . ln] as the vector of the number of iterations at all workers. E[·|l] denotes the conditional expectation taken with respect to the randomness of the optimal solution x∗ i (see Assumption 1) conditioned on fixed iteration number li at each worker, i.e., E[X|l] = E[X|l1, l2, . . . ln]. Define X∗ N×k = [x∗ 1, x∗ 2, . . . x∗ k] as the matrix composed of all the true solutions. Theorem 3.1. Define E = ˆX −X∗, i.e., the error of the decoding result (7). Assuming that the solutions for each linear inverse problem are chosen i.i.d. (across all problems) according to a distribution with covariance CE. Then, the error covariance of E satisfies E[∥E∥2 |l] ≤σmax(G⊤G)trace (GΛ−1G⊤)−1 , (10) where the norm ∥·∥is the Frobenius norm, σmax(G⊤G) is the maximum eigenvalue of G⊤G and the matrix Λ is defined in (8). Further, when G has orthonormal rows, E[∥E∥2 |l] ≤trace (GΛ−1G⊤)−1 , (11) 4 Proof overview. See supplementary Section 8.3 for the complete proof. Here we provide the main intuition by analyzing a “scalar version” of the linear inverse problem, in which case the matrix B is equal to a scalar a. For B = a, the inputs and the initial estimates in (5) and (6) are vectors instead of matrices. As we show in Supplementary Section 8.3, if we encode both the inputs and the initial estimates using (5) and (6), we also “encode” the error [ϵ(0) 1 , ϵ(0) 2 , . . . , ϵ(0) n ] = [e(0) 1 , e(0) 2 , . . . , e(0) k ] · G =: E0G, (12) where ϵ(0) i = y(0) i −y∗ i is the initial error at the i-th worker, e(0) i = x(0) i −x∗ i is the initial error of the i-th linear inverse problem, and E0 := [e(0) 1 , e(0) 2 , . . . e(0) k ]. Suppose var[e(0) i ] = ce, which is a scalar version of CE after Assumption 1. From (4), the error satisfies: ϵ(li) i = aliϵ(0) i , i = 1, 2, . . . n. (13) Denote by D = diag{al1, al2, . . . aln}. Therefore, from (12) and (13), the error before the decoding step (7) can be written as [ϵ(l1) 1 , ϵ(l2) 2 , . . . ϵ(ln) n ] =[ϵ(0) 1 , ϵ(0) 2 , . . . ϵ(0) n ] · D = E0GD. (14) We can show (see Supplementary Section 8.3 for details) that after the decoding step (7), the error vector is also multiplied by the decoding matrix L = (GΛ−1G⊤)−1GΛ−1: E⊤= L h ϵ(l1) 1 , ϵ(l2) 2 , . . . ϵ(ln) n i⊤ = LD⊤G⊤E⊤ 0 . (15) Thus, E[∥E∥2 |l] =E[trace[E⊤E]|l] = trace[LD⊤G⊤E[E⊤ 0 E0|l]GDL⊤] (a) =trace[LD⊤G⊤ceIkGDL⊤] = cetrace[LD⊤G⊤GDL⊤] (b) ≤ceσmax(G⊤G)trace[LD⊤DL⊤] = σmax(G⊤G)trace[L(ceD⊤D)L⊤] (c) =σmax(G⊤G)trace[LΛL⊤] (d) = σmax(G⊤G)trace[(GΛ−1G⊤)−1], (16) where (a) holds because E0 := [e(0) 1 , e(0) 2 , . . . e(0) k ] and var[e(0) i ] = ce, (b) holds because G⊤G ⪯ σmax(G⊤G)In, (c) holds because ceD⊤D = Λ, which is from the fact that for a scalar linear system matrix B = a, the entries in the Λ matrix in (8) satisfy trace(C(li)) = alice(a⊤)li = cea2li, (17) which is the same as the entries in the diagonal matrix ceD⊤D. Finally, (d) is obtained by directly plugging in L := (GΛ−1G⊤)−1GΛ−1. Finally, inequality 11 holds because when G has orthonormal rows, σ(G⊤G) = 1. Additionally, we note that in (10), the term trace (GΛ−1G⊤)−1 resembles the MSE of ordinary weighted least-square solution, and the term σmax(G⊤G) represents the “inaccuracy” due to using the weighted least-square solution as the decoding result, because the inputs to different workers become correlated by multiplying the i.i.d. inputs with matrix G (see (5)). 4 Comparison with Uncoded Schemes and Replication-based Schemes Here, we often assume (we will state explicitly in the theorem) that the number of iterations li at different workers are i.i.d.. We use Ef[·] to denote expectation on randomness of both the linear inverse solutions x∗ i and the number of iterations li (this is different from the notation E[·|l]). Assumption 2. Within time Tdl, the number of iterations of linear inverse computations (see (1)) at each worker follows an i.i.d. distribution li ∼f(l). 4.1 Comparison between the coded and uncoded linear inverse before a deadline First, we compare the coded linear inverse scheme with an uncoded scheme, in which case we use the first k workers to solve k linear inverse problems in (2) without coding. The following theorem quantifies the overall mean-squared error of the uncoded scheme given l1, l2, . . . , lk. The proof is in Supplementary Section 8.6. 5 Theorem 4.1. In the uncoded scheme, the error E h ∥Euncoded∥2 |l i = E
[e(l1) 1 . . . , e(lk) k ]
2 l = Pk i=1 trace (C(li)). Further, when the i.i.d. Assumption 2 holds, Ef h ∥Euncoded∥2i = kEf[trace(C(l1))]. (18) Then, we compare the overall mean-squared error of coded and uncoded linear inverse algorithms. Note that this comparison is not fair because the coded algorithm uses more workers than uncoded. However, we still include Theorem 4.2 because we need it for the fair comparison between coded and replication-based linear inverse. The proof is in Supplementary section 8.4. Theorem 4.2. (Coded linear inverse beats uncoded) Suppose the i.i.d. Assumptions 1 and 2 hold and suppose G is a k × n submatrix of an n × n Fourier transform matrix F, i.e., Fn×n = Gk×n H(n−k)×n . Then, expected error of the coded linear inverse is strictly less than that of uncoded: Ef h ∥Euncoded∥2i −Ef h ∥Ecoded∥2i ≥Ef[trace(J2J−1 4 J⊤ 2 )], (19) where J2 and J4 are the submatrices of FΛF⊤:= J1 J2 J⊤ 2 J4 n×n and the matrix Λ is defined in (8). That is, (J1)k×k is GΛG⊤, (J2)k×(n−k) is GΛH⊤, and (J4)(n−k)×(n−k) is HΛH⊤. 4.2 Comparison between the replication-based and coded linear inverse before a deadline Consider an alternative way of doing linear inverse using n > k workers. In this paper, we only consider the case when n −k < k, i.e., the number of extra workers is only slightly bigger than the number of problems (both in theory and in experiments). Since we have n −k extra workers, a natural way is to pick any (n −k) linear inverse problems and replicate them using these extra (n −k) workers. After we obtain two computation results for the same equation, we use two natural “decoding” strategies for this replication-based linear inverse: (i) choose the worker with higher number of iterations; (ii) compute the weighted average using weights w1 w1+w2 and w2 w1+w2 , where w1 = 1/ p trace(C(l1)) and w2 = 1/ p trace(C(l2)), and l1 and l2 are the number of iterations completed at the two workers (recall that trace(C(li)) represents the residual MSE at the i-th worker). Theorem 4.3. The replication-based schemes satisfy the following lower bound on the MSE: Ef h ∥Erep∥2i >Ef h ∥Euncoded∥2i −(n −k)Ef[trace(C(l1))]. (20) Proof overview. Here the goal is to obtain a lower bound on the MSE of replication-based linear inverse and compare it with an upper bound on the MSE of coded linear inverse. Note that if an extra worker is used to replicate the computation at the i-th worker, i.e., the linear inverse problem with input ri is solved on two workers, the expected error of the result of the i-th problem could at best reduced from Ef[trace(C(l1))] (see Thm. 4.1) to zero1. Therefore, (n−k) extra workers make the error decrease by at most (and strictly smaller than) (n −k)Ef[trace(C(l1))]. Using this lower bound, we can provably show that coded linear inverse beats replication-based linear inverse when certain conditions are satisfied. One crucial condition is that the distribution of the random variable trace(C(l)) (i.e., the expected MSE at each worker) satisfies a “variance heavy-tail” property defined as follows. Definition 1. The random variable trace(C(l)) is said to have a “ρ-variance heavy-tail” property if varf[trace(C(l))] > ρE2 f[trace(C(l))], (21) for some constant ρ > 1. Notice that the term trace(C(l)) is essentially the remaining MSE after l iterations at a single machine. Therefore, this property simply means the remaining error at a single machine has large variance. For the coded linear inverse, we will use a “Fourier code”, the generator matrix G of which is a submatrix of a Fourier matrix. This particular choice of code is only for ease of analysis in comparing coded linear inverse and replication-based linear inverse. In practice, the code that minimizes mean-squared error should be chosen. 1Although this is clearly a loose bound, it makes for convenient comparison with coded linear inverse. 6 Theorem 4.4. (Coded linear inverse beats replication) Suppose the i.i.d. Assumptions 1 and 2 hold and G is a k × n submatrix of k rows of an n × n Fourier matrix F. Further, suppose (n −k) = o(√n). Then, the expected error of the coded linear inverse satisfies lim n→∞ 1 n −k h Ef h ∥Euncoded∥2i −Ef h ∥Ecoded∥2ii ≥varf[trace(C(l1))] Ef[trace(C(l1))] . (22) Moreover, if the random variable trace(C(l)) satisfies the ρ-variance heavy-tail property for ρ > 1, coded linear inverse outperforms replication-based linear inverse in the following sense, lim n→∞ 1 (n −k) Ef ∥Euncoded∥2 −Ef ∥Erep∥2 < 1 ρ lim n→∞ 1 (n −k) Ef ∥Euncoded∥2 −Ef ∥Ecoded∥2 . (23) Proof overview. See Supplementary Section 8.7 for a complete and rigorous proof. Here we only provide the main intuition behind the proof. From Theorem 4.2, we have Ef h ∥Euncoded∥2i − Ef h ∥Ecoded∥2i ≥Ef[trace(J2J−1 4 J⊤ 2 )]. Therefore, to prove (22), the main technical difficulty is to simplify the term trace(J2J−1 4 J⊤ 2 ). For a Fourier matrix F, we are able to show that the matrix FΛF⊤= J1 J2 J⊤ 2 J4 (see Theorem 4.2) is a Toeplitz matrix, which provides a good structure for us to study its behavior. Then, we use the Gershgorin circle theorem [27] (with some algebraic manipulations) to show that the maximum eigenvalue of J4 satisfies σmax(J4) ≈Ef[trace(C(l1))], and separately using some algebraic manipulations, we show trace(J2J⊤ 2 ) ≈(n −k)varf[trace(C(l1))], (24) for large matrix size n. Since trace(J2J−1 4 J⊤ 2 ) ≥trace(J2(σmax(J4))−1J⊤ 2 ) = 1 σmax(J4)trace(J2J⊤ 2 ), trace(J2J−1 4 J⊤ 2 ) ≥(n −k)varf[trace(C(l1))] Ef[trace(C(l1))] , (25) for large n. Then, (22) can be proved by plugging (25) into (19). After that, we can combine (22), (20) and the variance heavy-tail property to prove (23). 4.3 Asymptotic Comparison between Coded, Uncoded and Replication-based linear inverse as the Deadline Tdl →∞ Assumption 3. We assume the computation time of one power iteration is fixed at each worker for each linear inverse computation, i.e., there exist n independent (not necessarily identically distributed) random variables v1, v2, . . . vn such that li = ⌈Tdl vi ⌉, i = 1, 2, . . . n. The above assumption is validated in experiments in Supplementary Section 8.13. The k-th order statistic of a sample is equal to its k-th smallest value. Suppose the order statistics of the sequence v1, v2, . . . vn are vi1 < vi2 < . . . vin, where {i1, i2, . . . in} is a permutation of {1, 2, . . . n}. Denote by [k] the set {1, 2, . . . k} and [n] the set {1, 2, . . . n}. Theorem 4.5. (Error exponent comparison when Tdl →∞) Suppose the i.i.d. Assumption 1 and Assumption 3 hold. Suppose n −k < k. Then, the error exponents of the coded and uncoded computation schemes satisfy lim Tdl→∞−1 Tdl log E[∥Ecoded∥2 |l] ≥2 vik log 1 1 −d, (26) lim Tdl→∞−1 Tdl log E[∥Euncoded∥2 |l] = lim Tdl→∞−1 Tdl log E[∥Erep∥2 |l] = 2 maxi∈[k] vi log 1 1 −d. (27) The error exponents satisfy coded>replication=uncoded. Here the expectation E[·|l] is only taken with respect to the randomness of the linear inverse sequence xi, i = 1, 2, . . . k. Proof overview. See Supplementary Section 8.8 for a detailed proof. The main intuition behind this result is the following: when Tdl approaches infinity, the error of uncoded computation is dominated 7 by the slowest worker among the first k workers, which has per-iteration time maxi∈[k] vi. For the replication-based scheme, since the number of extra workers n−k < k, there is a non-zero probability (which does not change with Tdl) that the n −k extra workers do not replicate the computation in the slowest one among the first worker. Therefore, replication when n −k < k does not improve the error exponent, because the error is dominated by this slowest worker. For coded computation, we show in Supplementary Section 8.8 that the slowest n −k workers among the overall n workers do not affect the error exponent, which means that the error is dominated by the k-th fastest worker, which has per-iteration time vik. Since the k-th fastest worker among all n workers can not be slower than the slowest one among the first (unordered) k workers, the error exponent of coded linear inverse is larger than that of the uncoded and the replication-based linear inverse. 5 Analyzing the Computational Complexity 5.1 Encoding and decoding complexity We first show that the encoding and decoding complexity of Algorithm 1 are in scaling-sense smaller than that of the computation at each worker. This ensures that straggling comes from the parallel workers, not the encoder or decoder. The proof of Theorem 5.1 is in Supplementary Section 8.10. In our experiment on the Google Plus graph (See Section 6) for computing PageRank, the computation time at each worker is 30 seconds and the encoding and decoding time at the central controller is about 1 second. Theorem 5.1. The computational complexity for the encoding and decoding is Θ(nkN), where N is the number of rows in the matrix B and k, n depend on the number of available workers assuming that each worker performs a single linear inverse computation. For a general dense matrix B, the computational complexity of computing linear inverse at each worker is Θ(N 2l), where l is the number of iterations in the specified iterative algorithm. The complexity of encoding and decoding is smaller than that of the computation at each user for large B matrices (large N). 5.2 Analysis on the cost of communication versus computation In this work, we focus on optimizing the computation cost. However, what if the computation cost is small compared to the overall cost, including the communication cost? If this is true, optimizing the computation cost is not very useful. In Theorem 5.2 (proof appears in Supplementary Section 8.11), we show that the computation cost is larger than the communication cost in the scaling-sense. Theorem 5.2. The ratio between the number of operations (computation) and the number of bits transmitted (communication) at the i-th worker is COSTcomputation/COSTcommunication = Θ(li ¯d) operations per integer, where li is the number of iterations at the i-th worker, and ¯d is the average number of non-zeros in each row of the B matrix. 6 Experiments on Real Systems We test the performance of the coded linear inverse algorithm for the PageRank problem on the Twitter graph and the Google Plus graph from the SNAP datasets [28]. The Twitter graph has 81,306 nodes and 1,768,149 edges, and the Google Plus graph has 107,614 nodes and 13,673,453 edges. We use the HT-condor framework in a cluster to conduct the experiments. The task is to solve k = 100 personalized PageRank problems in parallel using n = 120 workers. The uncoded algorithm picks the first k workers and uses one worker for each PageRank problem. The two replication-based schemes replicate the computation of the first n −k PageRank problems in the extra n −k workers (see Section 4.2). The coded PageRank uses n workers to solve these k = 100 equations using Algorithm 1. We use a (120, 100) code where the generator matrix is the submatrix composed of the first 100 rows in a 120×120 DFT matrix. The computation results are shown in the left two figures in Fig. 2. Note that the two graphs are of different sizes so the computation in the two experiments take different time. From Fig. 2, we can see that the mean-squared error of uncoded and replication-based schemes is larger than that of coded computation by a factor of 104 for large deadlines. We also compare Algorithm 1 with the coded computing algorithm proposed in [6]. As we discussed in the Figure 1, the original coded technique in [6] ignores partial results and is suboptimal even in the toy example of three workers. However, it has a natural extension to iterative methods, which will be 8 0 10 20 30 Deadline Tdl (sec) 10-10 100 0 1 2 Deadline Tdl (sec) 10-5 100 0 10 20 30 Deadline Tdl (sec) 10-10 10-5 100 Average mean-squared error Google Plus graph 0.5 1 1.5 2 Deadline Tdl (sec) 10-5 100 Twitter graph Google Plus graph Coded Twitter graph DFT Sparse Binary Gaussian Repetition-1 Uncoded Repetition-2 Repetition-1 Coded >104 Uncoded Repetition-2 Extension of coded Method in [Lee et.al.] Algorithm 1 Original Coded Method in [Lee et.al.] Figure 2: From left to right: (1,2) Experimentally computed overall MSE of uncoded, replicationbased and coded personalized PageRank on the Twitter and Google Plus graph on a cluster with 120 workers. The ratio of MSE for repetition-based schemes and coded linear inverse increase as Tdl increases. (3) Comparison between an extended version of the algorithm in [6] and Algorithm 1 on the Google Plus graph. The figure shows that naively extending the general coded method using matrix inverse introduces error amplification. (4) Comparison of different codes. In this experiment the DFT-code out-performs the other candidates in MSE. discussed in details later. The third figure in Fig. 2 shows the comparison between the performance of Algorithm 1 and this extension of the algorithm from [6]. This extension uses the (unfinished) partial results from the k fastest workers to retrieve the required PageRank solutions. More concretely, suppose S ⊂[n] is the index set of the k fastest workers. Then, this extension retrieves the solutions to the original k PageRank problems by solving the equation YS = [x∗ 1, x∗ 2, . . . , x∗ k] · GS, where YS is composed of the (partial) computation results obtained from the fastest k workers and GS is the k ×k submatrix composed of the columns in the generator matrix G with indexes in S. However, since there is some remaining error at each worker (i.e., the computation results YS have not converged yet), when conducting the matrix-inverse-based decoding from [6], the error is magnified due to the large condition number of GS. This is why the algorithm in [6] should not be naively extended in the coded linear inverse problem. One question remains: what is the best code design for the coded linear inverse algorithm? Although we do not have a concrete answer to this question, we have tested different codes (with different generator matrices G) in the Twitter graph experiment, all using Algorithm 1. The results are shown in the fourth figure in Fig. 2. The generator matrix used for the “binary” curve has i.i.d. binary entries in {−1, 1}. The generator matrix used for the “sparse” curve has random binary sparse entries. The generator matrix for the “Gaussian” curve has i.i.d. standard Gaussian entries. In this experiment, the DFT-code performs the best. However, finding the best code in general is a meaningful future work. 7 Conclusions By studying coding for iterative algorithms designed for distributed inverse problems, we aim to introduce new applications and analytical tools to the problem of coded computing with stragglers. Since these iterative algorithms designed for inverse problems commonly have decreasing error with time, the partial computation results at stragglers can provide useful information for the final outputs. Note that this is unlike recent works on coding for multi-stage computing problems [29, 30], where the computation error can accumulate with time and coding has to be applied repeatedly to suppress this error accumulation. An important connection worth discussing is the diversity gain in this coded computing problem. The distributed computing setting in this work resembles random fading channels, which means coding can be used to exploit straggling diversity just as coding is used in communication channels to turn diverse channel fading into an advantage. What makes coding even more suitable in our setting is that the amount of diversity gain achieved here through replication is actually smaller than that can be achieved by replication in fading channels. This is because for two computers that solve the same equation Mxi = ri, the remaining error at the slow worker is a deterministic multiple of the remaining error at the fast worker (see equation (3)). Therefore, taking a weighted average of the two computation results through replication does not reduce error as in independent fading channels. How diversity gain can be achieved here optimally is worth deep investigation. Our next goals are two-fold: (1) extend the current method to solving a single large-scale inverse problem, such as graph mining with graphs that exceed the memory of a single machine; (2) carry out experiments on faster distributed systems such as Amazon EC2. 9 References [1] J. Dean and L. A. Barroso. The tail at scale. Communications of the ACM, 56(2):74–80, 2013. [2] G. Joshi, Y. Liu, and E. Soljanin. On the delay-storage trade-off in content download from coded distributed storage systems. IEEE Journal on Selected Areas in Communications, 32(5): 989–997, 2014. [3] D. Wang, G. Joshi, and G. Wornell. Efficient task replication for fast response times in parallel computation. In ACM SIGMETRICS Performance Evaluation Review, volume 42, pages 599–600. ACM, 2014. [4] D. Wang, G. Joshi, and G. Wornell. Using straggler replication to reduce latency in large-scale parallel computing. ACM SIGMETRICS Performance Evaluation Review, 43(3):7–11, 2015. [5] L. Huang, S. Pawar, H. Zhang, and K. Ramchandran. Codes can reduce queueing delay in data centers. In IEEE International Symposium on Information Theory Proceedings (ISIT), pages 2766–2770. IEEE, 2012. [6] K. Lee, M. Lam, R. Pedarsani, D. Papailiopoulos, and K. Ramchandran. Speeding up distributed machine learning using codes. In IEEE International Symposium on Information Theory (ISIT), pages 1143–1147. IEEE, 2016. [7] R. Tandon, Q. Lei, A. G. Dimakis, and N. Karampatziakis. Gradient coding. 2016. [8] S. Dutta, V. Cadambe, and P. Grover. Short-dot: Computing large linear transforms distributedly using coded short dot products. In Advances In Neural Information Processing Systems, pages 2092–2100, 2016. [9] N. S. Ferdinand and S. C. Draper. Anytime coding for distributed computation. In 54th Annual Allerton Conference on Communication, Control, and Computing (Allerton), pages 954–960. IEEE, 2016. [10] S. Li, M. A. Maddah-Ali, and A. S. Avestimehr. A unified coding framework for distributed computing with straggling servers. In IEEE Globecom Workshops (GC Wkshps), pages 1–6. IEEE, 2016. [11] A. Reisizadehmobarakeh, S. Prakash, R. Pedarsani, and S. Avestimehr. Coded computation over heterogeneous clusters. In IEEE International Symposium on Information Theory (ISIT), pages 2408–2412. IEEE, 2017. [12] S. Li, M. A. Maddah-Ali, and A. S. Avestimehr. Coding for distributed fog computing. IEEE Communications Magazine, 55(4):34–40, 2017. [13] Q. Yu, M. A. Maddah-Ali, and A. S. Avestimehr. Polynomial codes: an optimal design for high-dimensional coded matrix multiplication. In Advances In Neural Information Processing Systems, 2017. [14] K. Lee, C. Suh, and K. Ramchandran. High-dimensional coded matrix multiplication. In IEEE International Symposium on Information Theory (ISIT), pages 2418–2422. IEEE, 2017. [15] K. Lee, R. Pedarsani, D. Papailiopoulos, and K. Ramchandran. Coded computation for multicore setups. In IEEE International Symposium on Information Theory (ISIT), pages 2413–2417. IEEE, 2017. [16] K.-H. Huang et al. Algorithm-based fault tolerance for matrix operations. IEEE transactions on computers, 100(6):518–528, 1984. [17] Y. Saad. Iterative methods for sparse linear systems. SIAM, 2003. [18] T. H. Haveliwala. Topic-sensitive pagerank. In Proceedings of the 11th international conference on World Wide Web, pages 517–526. ACM, 2002. [19] L. Page, S. Brin, R. Motwani, and T. Winograd. The pagerank citation ranking: Bringing order to the web. Technical report, Stanford InfoLab, 1999. 10 [20] M. Haikin and R. Zamir. Analog coding of a source with erasures. In IEEE International Symposium on Information Theory, pages 2074–2078. IEEE, 2016. [21] A. G. Dimakis, P. B. Godfrey, Y. Wu, M. J. Wainwright, and K. Ramchandran. Network coding for distributed storage systems. IEEE Transactions on Information Theory, 56(9):4539–4551, 2010. [22] M. Sathiamoorthy, M. Asteris, D. Papailiopoulos, A. G. Dimakis, R. Vadali, S. Chen, and D. Borthakur. Xoring elephants: Novel erasure codes for big data. In Proceedings of the VLDB Endowment, volume 6, pages 325–336. VLDB Endowment, 2013. [23] M. A. Maddah-Ali and U. Niesen. Decentralized coded caching attains order-optimal memoryrate tradeoff. IEEE/ACM Transactions on Networking, 23(4):1029–1040, 2015. [24] S. Li, M. A. Maddah-Ali, and A. S. Avestimehr. Coded mapreduce. In Communication, Control, and Computing (Allerton), 2015 53rd Annual Allerton Conference on, pages 964–971. IEEE, 2015. [25] D. I. Shuman, S. K. Narang, P. Frossard, A. Ortega, and P. Vandergheynst. The emerging field of signal processing on graphs: Extending high-dimensional data analysis to networks and other irregular domains. IEEE Signal Processing Magazine, 30(3):83–98, 2013. [26] A. Sandryhaila and J. M. F. Moura. Discrete signal processing on graphs. IEEE transactions on signal processing, 61(7):1644–1656, 2013. [27] G. H. Golub and C. F. van Loan. Matrix computations, volume 3. JHU Press, 2012. [28] J. Leskovec and J. J. Mcauley. Learning to discover social circles in ego networks. In Advances in neural information processing systems, pages 539–547, 2012. [29] Y. Yang, P. Grover, and S. Kar. Computing linear transformations with unreliable components. IEEE Transactions on Information Theory, 2017. [30] Y. Yang, P. Grover, and S. Kar. Rate distortion for lossy in-network linear function computation and consensus: Distortion accumulation and sequential reverse water-filling. IEEE Transactions on Information Theory, 2017. [31] X. Wang, P. Liu, and Y. Gu. Local-set-based graph signal reconstruction. IEEE Transactions on Signal Processing, 63(9):2432–2444, 2015. [32] S. K. Narang, A. Gadde, E. Sanou, and A. Ortega. Localized iterative methods for interpolation in graph structured data. In 2013 IEEE Global Conference on Signal and Information Processing (GlobalSIP), pages 491–494. IEEE, 2013. [33] S. Chen, R. Varma, A. Sandryhaila, and J. Kovaˇcevi´c. Discrete signal processing on graphs: Sampling theory. IEEE Transactions on Signal Processing, 63(24):6510–6523, 2015. [34] S. Chen, Y. Yang, C. Faloutsos, and J. Kovacevic. Monitoring manhattan’s traffic at 5 intersections? In IEEE 2016 GlobalSIP Conference on Signal and Information Processing (GlobalSIP), 2016. [35] A. M. Mood, F. A. Graybill, and D. C. Boes. Introduction to the theory of statistics, 3rd edition. 1974. [36] H. Zhang and F. Ding. On the kronecker products and their applications. Journal of Applied Mathematics, 2013, 2013. 11 | 2017 | 245 |
6,725 | Dykstra’s Algorithm, ADMM, and Coordinate Descent: Connections, Insights, and Extensions Ryan J. Tibshirani Department of Statistics and Machine Learning Department Carnegie Mellon University Pittsburgh, PA 15213 ryantibs@stat.cmu.edu Abstract We study connections between Dykstra’s algorithm for projecting onto an intersection of convex sets, the augmented Lagrangian method of multipliers or ADMM, and block coordinate descent. We prove that coordinate descent for a regularized regression problem, in which the penalty is a separable sum of support functions, is exactly equivalent to Dykstra’s algorithm applied to the dual problem. ADMM on the dual problem is also seen to be equivalent, in the special case of two sets, with one being a linear subspace. These connections, aside from being interesting in their own right, suggest new ways of analyzing and extending coordinate descent. For example, from existing convergence theory on Dykstra’s algorithm over polyhedra, we discern that coordinate descent for the lasso problem converges at an (asymptotically) linear rate. We also develop two parallel versions of coordinate descent, based on the Dykstra and ADMM connections. 1 Introduction In this paper, we study two seemingly unrelated but closely connected convex optimization problems, and associated algorithms. The first is the best approximation problem: given closed, convex sets C1, . . . , Cd ⊆Rn and y ∈Rn, we seek the point in C1 ∩· · · ∩Cd (assumed nonempty) closest to y, and solve min u∈Rn ∥y −u∥2 2 subject to u ∈C1 ∩· · · ∩Cd. (1) The second problem is the regularized regression problem: given a response y ∈Rn and predictors X ∈Rn×p, and a block decomposition Xi ∈Rn×pi, i = 1, . . . , d of the columns of X (i.e., these could be columns, or groups of columns), we build a working linear model by applying blockwise regularization over the coefficients, and solve min w∈Rp 1 2∥y −Xw∥2 2 + d X i=1 hi(wi), (2) where hi : Rpi →R, i = 1, . . . , d are convex functions, and we write wi ∈Rpi, i = 1, . . . , d for the appropriate block decomposition of a coefficient vector w ∈Rp (so that Xw = Pd i=1 Xiwi). Two well-studied algorithms for problems (1), (2) are Dykstra’s algorithm (Dykstra, 1983; Boyle and Dykstra, 1986) and (block) coordinate descent (Warga, 1963; Bertsekas and Tsitsiklis, 1989; Tseng, 1990), respectively. The jumping-off point for our work in this paper is the following fact: these two algorithms are equivalent for solving (1) and (2). That is, for a particular relationship between the sets C1, . . . , Cd and penalty functions h1, . . . , hd, the problems (1) and (2) are duals of each other, and Dykstra’s algorithm on the primal problem (1) is exactly the same as coordinate descent on the dual problem (2). We provide details in Section 2. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. This equivalence between Dykstra’s algorithm and coordinate descent can be essentially found in the optimization literature, dating back to the late 1980s, and possibly earlier. (We say “essentially” here because, to our knowledge, this equivalence has not been stated for a general regression matrix X, and only in the special case X = I; but, in truth, the extension to a general matrix X is fairly straightforward.) Though this equivalence has been cited and discussed in various ways over the years, we feel that it is not as well-known as it should be, especially in light of the recent resurgence of interest in coordinate descent methods. We revisit the connection between Dykstra’s algorithm and coordinate descent, and draw further connections to a third method—the augmented Lagrangian method of multipliers or ADMM (Glowinski and Marroco, 1975; Gabay and Mercier, 1976)—that has also received a great deal of attention recently. While these basic connections are interesting in their own right, they also have important implications for analyzing and extending coordinate descent. Below we give a summary of our contributions. 1. We prove in Section 2 (under a particular relationship between C1, . . . , Cd and h1, . . . , hd) that Dykstra’s algorithm for (1) is equivalent to block coordinate descent for (2). (This is a mild generalization of the previously known connection when X = I.) 2. We also show in Section 2 that ADMM is closely connected to Dykstra’s algorithm, in that ADMM for (1), when d = 2 and C1 is a linear subspace, matches Dykstra’s algorithm. 3. Leveraging existing results on the convergence of Dykstra’s algorithm for an intersection of halfspaces, we establish in Section 3 that coordinate descent for the lasso problem has an (asymptotically) linear rate of convergence, regardless of the dimensions of X (i.e., without assumptions about strong convexity of the problem). We derive two different explicit forms for the error constant, which shed light onto how correlations among the predictor variables affect the speed of convergence. 4. Appealing to parallel versions of Dykstra’s algorithm and ADMM, we present in Section 4 two parallel versions of coordinate descent (each guaranteed to converge in full generality). 5. We extend in Section 5 the equivalence between coordinate descent and Dykstra’s algorithm to the case of nonquadratic loss in (2), i.e., non-Euclidean projection in (1). This leads to a Dykstra-based parallel version of coordinate descent for (separably regularized) problems with nonquadratic loss, and we also derive an alternative ADMM-based parallel version of coordinate descent for the same class of problems. 2 Preliminaries and connections Dykstra’s algorithm. Dykstra’s algorithm was first proposed by Dykstra (1983), and was extended to Hilbert spaces by Boyle and Dykstra (1986). Since these seminal papers, a number of works have analyzed and extended Dykstra’s algorithm in various interesting ways. We will reference many of these works in the coming sections, when we discuss connections between Dykstra’s algorithm and other methods; for other developments, see the comprehensive books Deutsch (2001); Bauschke and Combettes (2011) and review article Bauschke and Koch (2013). Dykstra’s algorithm for the best approximation problem (1) can be described as follows. We initialize u(0) = y, z(−d+1) = · · · = z(0) = 0, and then repeat, for k = 1, 2, 3, . . .: u(k) = PC[k](u(k−1) + z(k−d)), z(k) = u(k−1) + z(k−d) −u(k), (3) where PC(x) = argminc∈C ∥x −c∥2 2 denotes the (Euclidean) projection of x onto a closed, convex set C, and [·] denotes the modulo operator taking values in {1, . . . , d}. What differentiates Dykstra’s algorithm from the classical alternating projections method of von Neumann (1950); Halperin (1962) is the sequence of (what we may call) dual variables z(k), k = 1, 2, 3, . . .. These track, in a cyclic fashion, the residuals from projecting onto C1, . . . , Cd. The simpler alternating projections method will always converge to a feasible point in C1 ∩· · · ∩Cd, but will not necessarily converge to the solution in (1) unless C1, . . . , Cd are subspaces (in which case alternating projections and Dykstra’s algorithm coincide). Meanwhile, Dykstra’s algorithm converges in general (for any closed, convex sets C1, . . . , Cd with nonempty intersection, see, e.g., Boyle and Dykstra (1986); Han (1988); Gaffke and Mathar (1989)). We note that Dykstra’s algorithm (3) can be rewritten in a different form, which 2 will be helpful for future comparisons. First, we initialize u(0) d = y, z(0) 1 = · · · = z(0) d = 0, and then repeat, for k = 1, 2, 3, . . .: u(k) 0 = u(k−1) d , u(k) i = PCi(u(k) i−1 + z(k−1) i ), z(k) i = u(k) i−1 + z(k−1) i −u(k) i , ) for i = 1, . . . , d. (4) Coordinate descent. Coordinate descent methods have a long history in optimization, and have been studied and discussed in early papers and books such as Warga (1963); Ortega and Rheinboldt (1970); Luenberger (1973); Auslender (1976); Bertsekas and Tsitsiklis (1989), though coordinate descent was still likely in use much earlier. (Of course, for solving linear systems, coordinate descent reduces to Gauss-Seidel iterations, which dates back to the 1800s.) Some key papers analyzing the convergence of coordinate descent methods are Tseng and Bertsekas (1987); Tseng (1990); Luo and Tseng (1992, 1993); Tseng (2001). In the last 10 or 15 years, a considerable interest in coordinate descent has developed across the optimization community. With the flurry of recent work, it would be difficult to give a thorough account of the recent progress on the topic. To give just a few examples, recent developments include finite-time (nonasymptotic) convergence rates for coordinate descent, and exciting extensions such as accelerated, parallel, and distributed versions of coordinate descent. We refer to Wright (2015), an excellent survey that describes this recent progress. In (block) coordinate descent1 for (2), we initialize say w(0) = 0, and repeat, for k = 1, 2, 3, . . .: w(k) i = argmin wi∈Rpi 1 2
y − X j<i Xjw(k) j − X j>i Xjw(k−1) j −Xiwi
2 2 + hi(wi), i = 1, . . . , d. (5) We assume here and throughout that Xi ∈Rn×pi, i = 1, . . . , d each have full column rank so that the updates in (5) are uniquely defined (this is used for convenience, and is not a strong assumption; note that there is no restriction on the dimensionality of the full problem in (2), i.e., we could still have X ∈Rn×p with p ≫n). The precise form of these updates, of course, depends on the penalty functions. Suppose that each hi is the support function of a closed, convex set Di ⊆Rpi, i.e., hi(v) = max d∈Di⟨d, v⟩, for i = 1, . . . , d. Suppose also that Ci = (XT i )−1(Di) = {v ∈Rn : XT i v ∈Di}, the inverse image of Di under the linear map XT i , for i = 1, . . . , d. Then, perhaps surprisingly, it turns out that the coordinate descent iterations (5) are exactly the same as the Dykstra iterations (4), via a duality argument. We extract the key relationship as a lemma below, for future reference, and then state the formal equivalence. Proofs of these results, as with all results in this paper, are given in the supplement. Lemma 1. Assume that Xi ∈Rn×pi has full column rank and hi(v) = maxd∈Di⟨d, v⟩for a closed, convex set Di ⊆Rpi. Then for Ci = (XT i )−1(Di) ⊆Rn and any b ∈Rn, ˆwi = argmin wi∈Rpi 1 2∥b −Xiwi∥2 2 + hi(wi) ⇐⇒Xi ˆwi = (Id −PCi)(b). where Id(·) denotes the identity mapping. Theorem 1. Assume the setup in Lemma 1, for each i = 1, . . . , d. Then problems (1), (2) are dual to each other, and their solutions, denoted ˆu, ˆw, respectively, satisfy ˆu = y −X ˆw. Further, Dykstra’s algorithm (4) and coordinate descent (5) are equivalent, and satisfy at all iterations k = 1, 2, 3, . . .: z(k) i = Xiw(k) i and u(k) i = y − X j≤i Xjw(k) j − X j>i Xjw(k−1) j , for i = 1, . . . , d. The equivalence between coordinate descent and Dykstra’s algorithm dates back to (at least) Han (1988); Gaffke and Mathar (1989), under the special case X = I. In fact, Han (1988), presumably unaware of Dykstra’s algorithm, seems to have reinvented the method and established convergence 1To be precise, this is cyclic coordinate descent, where exact minimization is performed along each block of coordinates. Randomized versions of this algorithm have recently become popular, as have inexact or proximal versions. While these variants are interesting, they are not the focus of our paper. 3 through its relationship to coordinate descent. This work then inspired Tseng (1993) (who must have also been unaware of Dykstra’s algorithm) to improve the existing analyses of coordinate descent, which at the time all assumed smoothness of the objective function. (Tseng continued on to become arguably the single most important contributor to the theory of coordinate descent of the 1990s and 2000s, and his seminal work Tseng (2001) is still one of the most comprehensive analyses to date.) References to this equivalence can be found speckled throughout the literature on Dykstra’s method, but given the importance of the regularized problem form (2) for modern statistical and machine learning estimation tasks, we feel that the connection between Dykstra’s algorithm and coordinate descent and is not well-known enough and should be better explored. In what follows, we show that some old work on Dykstra’s algorithm, fed through this equivalence, yields new convergence results for coordinate descent for the lasso and a new parallel version of coordinate descent. ADMM. The augmented Lagrangian method of multipliers or ADMM was invented by Glowinski and Marroco (1975); Gabay and Mercier (1976). ADMM is a member of a class of methods generally called operator splitting techniques, and is equivalent (via a duality argument) to Douglas-Rachford splitting (Douglas and Rachford, 1956; Lions and Mercier, 1979). Recently, there has been a strong revival of interest in ADMM (and operator splitting techniques in general), arguably due (at least in part) to the popular monograph of Boyd et al. (2011), where it is argued that the ADMM framework offers an appealing flexibility in algorithm design, which permits parallelization in many nontrivial situations. As with coordinate descent, it would be difficult thoroughly describe recent developments on ADMM, given the magnitude and pace of the literature on this topic. To give just a few examples, recent progress includes finite-time linear convergence rates for ADMM (see Nishihara et al. 2015; Hong and Luo 2017 and references therein), and accelerated extensions of ADMM (see Goldstein et al. 2014; Kadkhodaie et al. 2015 and references therein). To derive an ADMM algorithm for (1), we introduce auxiliary variables and equality constraints to put the problem in a suitable ADMM form. While different formulations for the auxiliary variables and constraints give rise to different algorithms, loosely speaking, these algorithms generally take on similar forms to Dykstra’s algorithm for (1). The same is also true of ADMM for the set intersection problem, a simpler task than the best approximation problem (1), in which we only seek a point in the intersection C1 ∩· · · ∩Cd, and solve min u∈Rn d X i=1 ICi(ui), (6) where IC(·) denotes the indicator function of a set C (equal to 0 on C, and ∞otherwise). Consider the case of d = 2 sets, in which case the translation of (6) into ADMM form is unambiguous. ADMM for (6), properly initialized, appears highly similar to Dykstra’s algorithm for (1); so similar, in fact, that Boyd et al. (2011) mistook the two algorithms for being equivalent, which is not generally true, and was shortly thereafter corrected by Bauschke and Koch (2013). Below we show that when d = 2, C1 is a linear subspace, and y ∈C1, an ADMM algorithm for (1) (and not the simpler set intersection problem (6)) is indeed equivalent to Dykstra’s algorithm for (1). Introducing auxiliary variables, the problem (1) becomes min u1,u2∈Rn ∥y −u1∥2 2 + IC1(u1) + IC2(u2) subject to u1 = u2. The augmented Lagrangian is L(u1, u2, z) = ∥y −u1∥2 2 + IC1(u1) + IC2(u2) + ρ∥u1 −u2 + z∥2 2 −ρ∥z∥2 2, where ρ > 0 is an augmented Lagrangian parameter. ADMM repeats, for k = 1, 2, 3, . . .: u(k) 1 = PC1 y 1 + ρ + ρ(u(k−1) 2 −z(k−1)) 1 + ρ , u(k) 2 = PC2(u(k) 1 + z(k−1)), z(k) = z(k−1) + u(k) 1 −u(k) 2 . (7) Suppose we initialize u(0) 2 = y, z(0) = 0, and set ρ = 1. Using linearity of PC1, the fact that y ∈C1, and a simple inductive argument, the above iterations can be rewritten as u(k) 1 = PC1(u(k−1) 2 ), u(k) 2 = PC2(u(k) 1 + z(k−1)), z(k) = z(k−1) + u(k) 1 −u(k) 2 , (8) 4 which is precisely the same as Dykstra’s iterations (4), once we realize that, due again to linearity of PC1, the sequence z(k) 1 , k = 1, 2, 3, . . . in Dykstra’s iterations plays no role and can be ignored. Though d = 2 sets in (1) may seem like a rather special case, the strategy for parallelization in both Dykstra’s algorithm and ADMM stems from rewriting a general d-set problem as a 2-set problem, so the above connection between Dykstra’s algorithm and ADMM can be relevant even for problems with d > 2, and will reappear in our later discussion of parallel coordinate descent. As a matter of conceptual interest only, we note that for general d (and no constraints on the sets being subspaces), Dykstra’s iterations (4) can be viewed as a limiting version of the ADMM iterations either for (1) or for (6), as we send the augmented Lagrangian parameters to ∞or to 0 at particular scalings. See the supplement for details. 3 Coordinate descent for the lasso The lasso problem (Tibshirani, 1996; Chen et al., 1998), defined for a tuning parameter λ ≥0 as min w∈Rp 1 2∥y −Xw∥2 2 + λ∥w∥1, (9) is a special case of (2) where the coordinate blocks are of each size 1, so that Xi ∈Rn, i = 1, . . . , p are just the columns of X, and wi ∈R, i = 1, . . . , p are the components of w. This problem fits into the framework of (2) with hi(wi) = λ|wi| = maxd∈Di dwi for Di = [−λ, λ], for each i = 1, . . . , d. Coordinate descent is widely-used for the lasso (9), both because of the simplicity of the coordinatewise updates, which reduce to soft-thresholding, and because careful implementations can achieve state-of-the-art performance, at the right problem sizes. The use of coordinate descent for the lasso was popularized by Friedman et al. (2007, 2010), but was studied earlier or concurrently by several others, e.g., Fu (1998); Sardy et al. (2000); Wu and Lange (2008). As we know from Theorem 1, the dual of problem (9) is the best approximation problem (1), where Ci = (XT i )−1(Di) = {v ∈Rn : |XT i v| ≤λ} is an intersection of two halfspaces, for i = 1, . . . , p. This makes C1 ∩· · · ∩Cd an intersection of 2p halfspaces, i.e., a (centrally symmetric) polyhedron. For projecting onto a polyhedron, it is well-known that Dykstra’s algorithm reduces to Hildreth’s algorithm (Hildreth, 1957), an older method for quadratic programming that itself has an interesting history in optimization. Theorem 1 hence shows coordinate descent for the lasso (9) is equivalent not only to Dykstra’s algorithm, but also to Hildreth’s algorithm, for (1). This equivalence suggests a number of interesting directions to consider. For example, key practical speedups have been developed for coordinate descent for the lasso that enable this method to attain state-of-the-art performance at the right problem sizes, such as clever updating rules and screening rules (e.g., Friedman et al. 2010; El Ghaoui et al. 2012; Tibshirani et al. 2012; Wang et al. 2015). These implementation tricks can now be used with Dykstra’s (Hildreth’s) algorithm. On the flip side, as we show next, older results from Iusem and De Pierro (1990); Deutsch and Hundal (1994) on Dykstra’s algorithm for polyhedra, lead to interesting new results on coordinate descent for the lasso. Theorem 2 (Adaptation of Iusem and De Pierro 1990). Assume the columns of X ∈Rn×p are in general position, and λ > 0. Then coordinate descent for the lasso (9) has an asymptotically linear convergence rate, in that for large enough k, ∥w(k+1) −ˆw∥Σ ∥w(k) −ˆw∥Σ ≤ a2 a2 + λmin(XT AXA)/ maxi∈A ∥Xi∥2 2 1/2 , (10) where ˆw is the lasso solution in (9), Σ = XT X, and ∥z∥2 Σ = zT Σz for z ∈Rp, A = supp( ˆw) is the active set of ˆw, a = |A| is its size, XA ∈Rn×a denotes the columns of X indexed by A, and λmin(XT AXA) denotes the smallest eigenvalue of XT AXA. Theorem 3 (Adaptation of Deutsch and Hundal 1994). Assume the same conditions and notation as in Theorem 2. Then for large enough k, ∥w(k+1) −ˆw∥Σ ∥w(k) −ˆw∥Σ ≤ 1 − a−1 Y j=1 ∥P ⊥ {ij+1,...,ia}Xij∥2 2 ∥Xij∥2 2 !1/2 , (11) where we enumerate A = {i1, . . . , ia}, i1 < . . . < ia, and we denote by P ⊥ {ij+1,...,ia} the projection onto the orthocomplement of the column span of X{ij+1,...,ia}. 5 The results in Theorems 2, 3 both rely on the assumption of general position for the columns of X. This is only used for convenience and can be removed at the expense of more complicated notation. Loosely put, the general position condition simply rules out trivial linear dependencies between small numbers of columns of X, but places no restriction on the dimensions of X (i.e., it still allows for p ≫n). It implies that the lasso solution ˆw is unique, and that XA (where A = supp( ˆw)) has full column rank. See Tibshirani (2013) for a precise definition of general position and proofs of these facts. We note that when XA has full column rank, the bounds in (10), (11) are strictly less than 1. Remark 1 (Comparing (10) and (11)). Clearly, both the bounds in (10), (11) are adversely affected by correlations among Xi, i ∈A (i.e., stronger correlations will bring each closer to 1). It seems to us that (11) is usually the smaller of the two bounds, based on simple mathematical and numerical comparisons. More detailed comparisons would be interesting, but is beyond the scope of this paper. Remark 2 (Linear convergence without strong convexity). One striking feature of the results in Theorems 2, 3 is that they guarantee (asymptotically) linear convergence of the coordinate descent iterates for the lasso, with no assumption about strong convexity of the objective. More precisely, there are no restrictions on the dimensionality of X, so we enjoy linear convergence even without an assumption on the smooth part of the objective. This is in line with classical results on coordinate descent for smooth functions, see, e.g., Luo and Tseng (1992). The modern finite-time convergence analyses of coordinate descent do not, as far as we understand, replicate this remarkable property. For example, Beck and Tetruashvili (2013); Li et al. (2016) establish finite-time linear convergence rates for coordinate descent, but require strong convexity of the entire objective. Remark 3 (Active set identification). The asymptotics developed in Iusem and De Pierro (1990); Deutsch and Hundal (1994) are based on a notion of (in)active set identification: the critical value of k after which (10), (11) hold is based on the (provably finite) iteration number at which Dykstra’s algorithm identifies the inactive halfspaces, i.e., at which coordinate descent identifies the inactive set of variables, Ac = supp( ˆw)c. This might help explain why in practice coordinate descent for the lasso performs exceptionally well with warm starts, over a decreasing sequence of tuning parameter values λ (e.g., Friedman et al. 2007, 2010): here, each coordinate descent run is likely to identify the (in)active set—and hence enter the linear convergence phase—at an early iteration number. 4 Parallel coordinate descent Parallel-Dykstra-CD. An important consequence of the connection between Dykstra’s algorithm and coordinate descent is a new parallel version of the latter, stemming from an old parallel version of the former. A parallel version of Dykstra’s algorithm is usually credited to Iusem and Pierro (1987) for polyhedra and Gaffke and Mathar (1989) for general sets, but really the idea dates back to the product space formalization of Pierra (1984). We rewrite problem (1) as min u=(u1,...,ud)∈Rnd d X i=1 γi∥y −ui∥2 2 subject to u ∈C0 ∩(C1 × · · · × Cd), (12) where C0 = {(u1, . . . , ud) ∈Rnd : u1 = · · · = ud}, and γ1, . . . , γd > 0 are weights that sum to 1. After rescaling appropriately to turn (12) into an unweighted best approximation problem, we can apply Dykstra’s algorithm, which sets u(0) 1 = · · · = u(0) d = y, z(0) 1 = · · · = z(0) d = 0, and repeats: u(k) 0 = d X i=1 γiu(k−1) i , u(k) i = PCi(u(k) 0 + z(k−1) i ), z(k) i = u(k) 0 + z(k−1) i −u(k) i , ) for i = 1, . . . , d, (13) for k = 1, 2, 3, . . .. The steps enclosed in curly brace above can all be performed in parallel, so that (13) is a parallel version of Dykstra’s algorithm (4) for (1). Applying Lemma 1, and a straightforward inductive argument, the above algorithm can be rewritten as follows. We set w(0) = 0, and repeat: w(k) i = argmin wi∈Rpi 1 2
y −Xw(k−1) +Xiw(k−1) i /γi −Xiwi/γi
2 2 +hi(wi/γi), i = 1, . . . , d, (14) for k = 1, 2, 3, . . ., which we call parallel-Dykstra-CD (with CD being short for coordinate descent). Again, note that the each of the d coordinate updates in (14) can be performed in parallel, so that 6 (14) is a parallel version of coordinate descent (5) for (2). Also, as (14) is just a reparametrization of Dykstra’s algorithm (13) for the 2-set problem (12), it is guaranteed to converge in full generality, as per the standard results on Dykstra’s algorithm (Han, 1988; Gaffke and Mathar, 1989). Theorem 4. Assume that Xi ∈Rn×pi has full column rank and hi(v) = maxd∈Di⟨d, v⟩for a closed, convex set Di ⊆Rpi, for i = 1, . . . , d. If (2) has a unique solution, then the iterates in (14) converge to this solution. More generally, if the interior of ∩d i=1(XT i )−1(Di) is nonempty, then the sequence w(k), k = 1, 2, 3, . . . from (14) has at least one accumulation point, and any such point solves (2). Further, Xw(k), k = 1, 2, 3, . . . converges to X ˆw, the optimal fitted value in (2). There have been many recent exciting contributions to the parallel coordinate descent literature; two standouts are Jaggi et al. (2014); Richtarik and Takac (2016), and numerous others are described in Wright (2015). What sets parallel-Dykstra-CD apart, perhaps, is its simplicity: convergence of the iterations (14), given in Theorem 4, just stems from the connection between coordinate descent and Dykstra’s algorithm, and the fact that the parallel Dykstra iterations (13) are nothing more than the usual Dykstra iterations after a product space reformulation. Moreover, parallel-Dykstra-CD for the lasso enjoys an (asymptotic) linear convergence rate under essentially no assumptions, thanks once again to an old result on the parallel Dykstra (Hildreth) algorithm from Iusem and De Pierro (1990). The details can be found in the supplement. Parallel-ADMM-CD. As an alternative to the parallel method derived using Dykstra’s algorithm, ADMM can also offer a version of parallel coordinate descent. Since (12) is a best approximation problem with d = 2 sets, we can refer back to our earlier ADMM algorithm in (7) for this problem. By passing these ADMM iterations through the connection developed in Lemma 1, we arrive at what we call parallel-ADMM-CD, which initializes u(0) 0 = y, w(−1) = w(0) = 0, and repeats: u(k) 0 = (Pd i=1 ρi)u(k−1) 0 1 + Pd i=1 ρi + y −Xw(k−1) 1 + Pd i=1 ρi + X(w(k−2) −w(k−1)) 1 + Pd i=1 ρi , w(k) i = argmin wi∈Rpi 1 2
u(k) 0 + Xiw(k−1) i /ρi −Xiwi/ρi
2 2 + hi(wi/ρi), i = 1, . . . , d, (15) for k = 1, 2, 3, . . ., where ρ1, . . . , ρd > 0 are augmented Lagrangian parameters. In each iteration, the updates to w(k) i , i = 1, . . . , d above can be done in parallel. Just based on their form, it seems that (15) can be seen as a parallel version of coordinate descent (5) for problem (2). The next result confirms this, leveraging standard theory for ADMM (Gabay, 1983; Eckstein and Bertsekas, 1992). Theorem 5. Assume that Xi ∈Rn×pi has full column rank and hi(v) = maxd∈Di⟨d, v⟩for a closed, convex set Di ⊆Rpi, for i = 1, . . . , d. Then the sequence w(k), k = 1, 2, 3, . . . in (15) converges to a solution in (2). The parallel-ADMM-CD iterations in (15) and parallel-Dykstra-CD iterations in (14) differ in that, where the latter uses a residual y −Xw(k−1), the former uses an iterate u(k) 0 that seems to have a more complicated form, being a convex combination of u(k−1) 0 and y −Xw(k−1), plus a quantity that acts like a momentum term. It turns out that when ρ1, . . . , ρd sum to 1, the two methods (14), (15) are exactly the same. While this may seem like a surprising coincidence, it is in fact nothing more than a reincarnation of the previously established equivalence between Dykstra’s algorithm (4) and ADMM (8) for a 2-set best approximation problem, as here C0 is a linear subspace. Of course, with ADMM we need not choose probability weights for ρ1, . . . , ρd, and the convergence in Theorem 5 is guaranteed for any fixed values of these parameters. Thus, even though they were derived from different perspectives, parallel-ADMM-CD subsumes parallel-Dykstra-CD, and it is a strictly more general approach. It is important to note that larger values of ρ1, . . . , ρd can often lead to faster convergence in practice, as we show in Figure 1. More detailed study and comparisons to related parallel methods are worthwhile, but are beyond the scope of this work. 5 Discussion and extensions We studied connections between Dykstra’s algorithm, ADMM, and coordinate descent. Leveraging these connections, we established an (asymptotically) linear convergence rate for coordinate descent for the lasso, as well as two parallel versions of coordinate descent (one based on Dykstra’s algorithm and the other on ADMM). Some extensions and possibilities for future work are described below. 7 0 500 1000 1500 2000 1e−08 1e−05 1e−02 1e+01 1e+04 No parallelization Actual iteration number Suboptimality Coordinate descent Par−Dykstra−CD Par−ADMM−CD, rho=10 Par−ADMM−CD, rho=50 Par−ADMM−CD, rho=200 0 50 100 150 1e−08 1e−05 1e−02 1e+01 1e+04 10% parallelization Effective iteration number Suboptimality Coordinate descent Par−Dykstra−CD Par−ADMM−CD, rho=10 Par−ADMM−CD, rho=50 Par−ADMM−CD, rho=200 Figure 1: Suboptimality curves for serial coordinate descent, parallel-Dykstra-CD, and three tunings of parallel-ADMM-CD (i.e., three different values of ρ = Pp i=1 ρi), each run over the same 30 lasso problems with n = 200 and p = 500. For details of the experimental setup, see the supplement. Nonquadratic loss: Dykstra’s algorithm and coordinate descent. Given a convex function f, a generalization of (2) is the regularized estimation problem min w∈Rp f(Xw) + d X i=1 hi(wi). (16) Regularized regression (2) is given by f(z) = 1 2∥y −z∥2 2, and e.g., regularized classification (under the logistic loss) by f(z) = −yT z + Pn i=1 log(1 + ezi). In (block) coordinate descent for (16), we initialize say w(0) = 0, and repeat, for k = 1, 2, 3, . . .: w(k) i = argmin wi∈Rpi f X j<i Xjw(k) j + X j>i Xjw(k−1) j + Xiwi + hi(wi), i = 1, . . . , d. (17) On the other hand, given a differentiable and strictly convex function g, we can generalize (1) to the following best Bregman-approximation problem, min u∈Rn Dg(u, b) subject to u ∈C1 ∩· · · ∩Cd. (18) where Dg(u, b) = g(u) −g(b) −⟨∇g(b), u −b⟩is the Bregman divergence between u and b with respect to g. When g(v) = 1 2∥v∥2 2 (and b = y), this recovers the best approximation problem (1). As shown in Censor and Reich (1998); Bauschke and Lewis (2000), Dykstra’s algorithm can be extended to apply to (18). We initialize u(0) d = b, z(0) 1 = · · · = z(0) d = 0, and repeat for k = 1, 2, 3, . . .: u(k) 0 = u(k−1) d , u(k) i = (P g Ci ◦∇g∗) ∇g(u(k) i−1) + z(k−1) i , z(k) i = ∇g(u(k) i−1) + z(k−1) i −∇g(u(k) i ), for i = 1, . . . , d, (19) where P g C(x) = argminc∈C Dg(c, x) denotes the Bregman (rather than Euclidean) projection of x onto a set C, and g∗is the conjugate function of g. Though it may not be immediately obvious, when g(v) = 1 2∥v∥2 2 the above iterations (19) reduce to the standard (Euclidean) Dykstra iterations in (4). Furthermore, Dykstra’s algorithm and coordinate descent are equivalent in the more general setting. Theorem 6. Let f be a strictly convex, differentiable function that has full domain. Assume that Xi ∈Rn×pi has full column rank and hi(v) = maxd∈Di⟨d, v⟩for a closed, convex set Di ⊆Rpi, for i = 1, . . . , d. Also, let g(v) = f ∗(−v), b = −∇f(0), and Ci = (XT i )−1(Di) ⊆Rn, i = 1, . . . , d. 8 Then (16), (18) are dual to each other, and their solutions ˆw, ˆu satisfy ˆu = −∇f(X ˆw). Moreover, Dykstra’s algorithm (19) and coordinate descent (17) are equivalent, i.e., for k = 1, 2, 3, . . .: z(k) i = Xiw(k) i and u(k) i = −∇f X j≤i Xjw(k) j + X j>i Xjw(k−1) j , for i = 1, . . . , d. Nonquadratic loss: parallel coordinate descent methods. For a general regularized estimation problem (16), parallel coordinate descent methods can be derived by applying Dykstra’s algorithm and ADMM to a product space reformulation of the dual. Interestingly, the subsequent coordinate descent algorithms are no longer equivalent (for a unity augmented Lagrangian parameter), and they feature quite different computational structures. Parallel-Dykstra-CD for (16) initializes w(0) = 0, and repeats: w(k) i = argmin wi∈Rpi f Xw(k) −Xiw(k) i /γi + Xiwi/γi + hi(wi/γi), i = 1, . . . , d, (20) for k = 1, 2, 3, . . ., and weights γ1, . . . , γd > 0 that sum to 1. In comparison, parallel-ADMM-CD for (16) begins with u(0) 0 = 0, w(−1) = w(0) = 0, and repeats: Find u(k) 0 such that: u(k) 0 = −∇f d X i=1 ρi (u(k) 0 −u(k−1) 0 ) −X(w(k−2) −2w(k−1)) ! , w(k) i = argmin wi∈Rpi 1 2
u(k) 0 + Xiw(k−1) i /ρi −Xiwi/ρi
2 2 + hi(wi/ρi), i = 1, . . . , d, (21) for k = 1, 2, 3, . . ., and parameters ρ1, . . . , ρd > 0. Derivation details are given in the supplement. Notice the stark contrast between the parallel-Dykstra-CD iterations (20) and the parallel-ADMMCD iterations (21). In (20), we perform (in parallel) coordinatewise hi-regularized minimizations involving f, for i = 1, . . . , d. In (21), we perform a single quadratically-regularized minimization involving f for the u0-update, and then for the w-update, we perform (in parallel) coordinatewise hi-regularized minimizations involving a quadratic loss, for i = 1, . . . , d (these are typically much cheaper than the analogous minimizations for typical nonquadratic losses f of interest). We note that the u0-update in the parallel-ADMM-CD iterations (21) simplifies for many losses f of interest; in particular, for separable loss functions of the form f(v) = Pn i=1 fi(vi), for convex, univariate functions fi, i = 1, . . . , n, the u0-update separates into n univariate minimizations. As an example, consider the logistic lasso problem, min w∈Rp −yT Xw + n X i=1 log(1 + exT i w) + λ∥w∥1, (22) where xi ∈Rp, i = 1, . . . , n denote the rows of X. Abbreviating ρ = Pp i=1 ρi, and denoting by σ(x) = 1/(1 + e−x) the sigmoid function, and by St(x) = sign(x)(|x| −t)+ the soft-thresholding function at a level t > 0, the parallel-ADMM-CD iterations (21) for (22) reduce to: Find u(k) 0i such that: u(k) 0i = yi −σ(ρu(k) 0i −c(k) i ), i = 1, . . . , n, w(k) i = Sλρi/∥Xi∥2 2 ρiXT i (u(k) 0 + Xiw(k−1) i /ρi) ∥Xi∥2 2 , i = 1, . . . , p, (23) where c(k) i = ρu(k−1) 0i + xT i (w(k−2) −2w(k−1)), for i = 1, . . . , n, k = 1, 2, 3, . . .. We see that both the u0-update and w-update in (23) can be parallelized, and each coordinate update in the former can be done with, say, a simple bisection search. Asynchronous parallel algorithms, and coordinate descent in Hilbert spaces. We finish with some directions for possible future work. Asynchronous variants of parallel coordinate descent are currently of great interest, e.g., see the review in Wright (2015). Given the link between ADMM and coordinate descent developed in this paper, it would be interesting to investigate the implications of the recent exciting progress on asynchronous ADMM, e.g., see Chang et al. (2016a,b) and references therein, for coordinate descent. In a separate direction, much of the literature on Dykstra’s algorithm emphasizes that this method works seamlessly in Hilbert spaces. It would be interesting to consider the connections to (parallel) coordinate descent in infinite-dimensional function spaces, which we would encounter, e.g., in alternating conditional expectation algorithms or backfitting algorithms in additive models. 9 References Alfred Auslender. Optimisation: Methodes Numeriques. Masson, 1976. Heinz H. Bauschke and Patrick L. Combettes. Convex Analysis and Monotone Operator Theory in Hilbert Spaces. Springer, 2011. Heinz H. Bauschke and Valentin R. Koch. Projection methods: Swiss army knives for solving feasibility and best approximation problems with halfspaces. arXiv: 1301.4506, 2013. Heinz H. Bauschke and Adrian S. Lewis. Dykstra’s algorithm with Bregman projections: a convergence proof. Optimization, 48:409–427, 2000. Amir Beck and Luba Tetruashvili. On the convergence of block coordinate descent type methods. SIAM Journal on Optimization, 23(4):2037–2060, 2013. Dimitri P. Bertsekas and John N. Tsitsiklis. Parallel and Distributed Computation: Numerical Methods. Prentice Hall, 1989. Steve Boyd, Neal Parikh, Eric Chu, Borja Peleato, and Jonathan Eckstein. Distributed optimization and statistical learning via the alternative direction method of multipliers. Foundations and Trends in Machine Learning, 3(1):1–122, 2011. James P. Boyle and Richard L. Dykstra. A method for finding projections onto the intersection of convex sets in hilbert spaces. Advances in Order Restricted Statistical Inference: Proceedings of the Symposium on Order Restricted Statistical Inference, pages 28–47, 1986. Yair Censor and Simeon Reich. The Dykstra algorithm with Bregman projections. Communications in Applied Analysis, 48:407–419, 1998. Tsung-Hui Chang, Mingyi Hong, Wei-Cheng Liao, and Xiangfeng Wang. Asynchronous distributed ADMM for large-scale optimization—part i: Algorithm and convergence analysis. IEEE Transactions on Signal Processing, 64(12):3118–3130, 2016a. Tsung-Hui Chang, Wei-Cheng Liao, Mingyi Hong, and Xiangfeng Wang. Asynchronous distributed ADMM for large-scale optimization—part ii: Linear convergence analysis and numerical performance. IEEE Transactions on Signal Processing, 64(12):3131–3144, 2016b. Scott Chen, David L. Donoho, and Michael Saunders. Atomic decomposition for basis pursuit. SIAM Journal on Scientific Computing, 20(1):33–61, 1998. Frank Deutsch. Best Approximation in Inner Product Spaces. Springer, 2001. Frank Deutsch and Hein Hundal. The rate of convergence of Dykstra’s cyclic projections algorithm: The polyhedral case. Numerical Functional Analysis and Optimization, 15(5–6):537–565, 1994. Jim Douglas and H. H. Rachford. On the numerical solution of heat conduction problems in two and three space variables. Transactions of the American Mathematical Society, 82:421–439, 1956. Richard L. Dykstra. An algorithm for restricted least squares regression. Journal of the American Statistical Association, 78(384):837–842, 1983. Jonathan Eckstein and Dimitri P. Bertsekas. On the Douglas-Rachford splitting method and the proximal point algorithm for maximal monotone operators. Mathematical Programming, 55(1): 293–318, 1992. Laurent El Ghaoui, Vivian Viallon, and Tarek Rabbani. Safe feature elimination in sparse supervised learning. Pacific Journal of Optimization, 8(4):667–698, 2012. Jerome Friedman, Trevor Hastie, Holger Hoefling, and Robert Tibshirani. Pathwise coordinate optimization. Annals of Applied Statistics, 1(2):302–332, 2007. Jerome Friedman, Trevor Hastie, and Robert Tibshirani. Regularization paths for generalized linear models via coordinate descent. Journal of Statistical Software, 33(1):1–22, 2010. 10 Wenjiang J. Fu. Penalized regressions: The bridge versus the lasso. Journal of Computational and Graphical Statistics, 7(3):397–416, 1998. Daniel Gabay. Applications of the method of multipliers to variational inequalities. Studies in Mathematics and Its Applications, 15:299–331, 1983. Daniel Gabay and Bertrand Mercier. A dual algorithm for the solution of nonlinear variational problems via finite element approximation. Computers & Mathematics with Applications, 2(1): 17–40, 1976. Norbert Gaffke and Rudolf Mathar. A cyclic projection algorithm via duality. Metrika, 36(1):29–54, 1989. Roland Glowinski and A. Marroco. Sur l’approximation, par elements finis d’ordre un, et la resolution, par penalisation-dualite d’une classe de problemes de Dirichlet non lineaires. Modelisation Mathematique et Analyse Numerique, 9(R2):41–76, 1975. Tom Goldstein, Brendan O’Donoghue, Simon Setzer, and Richard Baraniuk. Fast alternating direction optimization methods. SIAM Journal on Imaging Sciences, 7(3):1588–1623, 2014. Israel Halperin. The product of projection operators. Acta Scientiarum Mathematicarum, 23:96–99, 1962. Shih-Ping Han. A successive projection algorithm. Mathematical Programming, 40(1):1–14, 1988. Clifford Hildreth. A quadratic programming procedure. Naval Research Logistics Quarterly, 4(1): 79–85, 1957. Mingyi Hong and Zhi-Quan Luo. On the linear convergence of the alternating direction method of multipliers. Mathematical Programming, 162(1):165–199, 2017. Alfredo N. Iusem and Alvaro R. De Pierro. On the convergence properties of Hildreth’s quadratic programming algorithm. Mathematical Programming, 47(1):37–51, 1990. Alfredo N. Iusem and Alvaro R. De Pierro. A simultaneous iterative method for computing projections on polyhedra. SIAM Journal on Control and Optimization, 25(1):231–243, 1987. Martin Jaggi, Virginia Smith, Martin Takac, Jonathan Terhorst, Sanjay Krishnan, Thomas Hofmann, and Michael I. Jordan. Communication-efficient distributed dual coordinate ascent. Advances in Neural Information Processing, 27:3068–3076, 2014. Mojtaba Kadkhodaie, Konstantina Christakopoulou, Maziar Sanjabi, and Arindam Banerjee. Accelerated alternating direction method of multipliers. International Conference on Knowledge Discovery and Data Mining, 21:497–506, 2015. Xingguo Li, Tuo Zhao, Raman Arora, Han Liu, and Mingyi Hong. An improved convergence analysis of cyclic block coordinate descent-type methods for strongly convex minimization. International Conference on Artificial Intelligence and Statistics, 19:491–499, 2016. P. L. Lions and B. Mercier. Splitting algorithms for the sum of two nonlinear operators. SIAM Journal on Numerical Analysis, 16(6):964–979, 1979. David Luenberger. Introduction to Linear and Nonlinear Programming. Addison-Wesley, 1973. Zhi-Quan Luo and Paul Tseng. On the convergence of the coordinate descent method for convex differentiable minimization. Journal of Optimization Theory and Applications, 72(1):7–35, 1992. Zhi-Quan Luo and Paul Tseng. On the convergence rate of dual ascent methods for linearly constrained convex minimization. Mathematics of Operations Research, 18(4):846–867, 1993. Robert Nishihara, Laurent Lessard, Benjamin Recht, Andrew Packard, and Michael I. Jordan. A general analysis of the convergence of ADMM. International Conference on Machine Learning, 32:343–352, 2015. 11 James M. Ortega and Werner C. Rheinboldt. Iterative Solution of Nonlinear Equations in Several Variables. Academic Press, 1970. G. Pierra. Decomposition through formalization in a product space. Mathematical Programming, 28 (1):96–115, 1984. Peter Richtarik and Martin Takac. Parallel coordinate descent methods for big data optimization. Mathematical Programming, 156(1):433–484, 2016. Sylvain Sardy, Andrew G. Bruce, and Paul Tseng. Block coordinate relaxation methods for nonparametric wavelet denoising. Journal of Computational and Graphical Statistics, 9(2):361–379, 2000. Robert Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society: Series B, 58(1):267–288, 1996. Robert Tibshirani, Jacob Bien, Jerome Friedman, Trevor Hastie, Noah Simon, Jonathan Taylor, and Ryan J. Tibshirani. Strong rules for discarding predictors in lasso-type problems. Journal of the Royal Statistical Society: Series B, 74(2):245–266, 2012. Ryan J. Tibshirani. The lasso problem and uniqueness. Electronic Journal of Statistics, 7:1456–1490, 2013. Paul Tseng. Dual ascent methods for problems with strictly convex costs and linear constraints: A unified approach. SIAM Journal on Control and Optimization, 28(1):214–29, 1990. Paul Tseng. Dual coordinate ascent methods for non-strictly convex minimization. Mathematical Programming, 59(1):231–247, 1993. Paul Tseng. Convergence of a block coordinate descent method for nondifferentiable minimization. Journal of Optimization Theory and Applications, 109(3):475–494, 2001. Paul Tseng and Dimitri P. Bertsekas. Relaxation methods for problems with strictly convex separable costs and linear constraints. Mathematical Programming, 38(3):303–321, 1987. John von Neumann. Functional Operators, Volume II: The Geometry of Orthogonal Spaces. Princeton University Press, 1950. Jie Wang, Peter Wonka, and Jieping Ye. Lasso screening rules via dual polytope projection. Journal of Machine Learning Research, 16:1063–1101, 2015. Jack Warga. Minimizing certain convex functions. Journal of the Society for Industrial and Applied Mathematics, 11(3):588–593, 1963. Stephen J. Wright. Coordinate descent algorithms. Mathematical Programming, 151(1):3–34, 2015. Tong Tong Wu and Kenneth Lange. Coordinate descent algorithms for lasso penalized regression. The Annals of Applied Statistics, 2(1):224–244, 2008. 12 | 2017 | 246 |
6,726 | Training recurrent networks to generate hypotheses about how the brain solves hard navigation problems Ingmar Kanitscheider & Ila Fiete Department of Neuroscience The University of Texas Austin, TX 78712 ikanitscheider, ilafiete @mail.clm.utexas.edu Abstract Self-localization during navigation with noisy sensors in an ambiguous world is computationally challenging, yet animals and humans excel at it. In robotics, Simultaneous Location and Mapping (SLAM) algorithms solve this problem through joint sequential probabilistic inference of their own coordinates and those of external spatial landmarks. We generate the first neural solution to the SLAM problem by training recurrent LSTM networks to perform a set of hard 2D navigation tasks that require generalization to completely novel trajectories and environments. Our goal is to make sense of how the diverse phenomenology in the brain’s spatial navigation circuits is related to their function. We show that the hidden unit representations exhibit several key properties of hippocampal place cells, including stable tuning curves that remap between environments. Our result is also a proof of concept for end-to-end-learning of a SLAM algorithm using recurrent networks, and a demonstration of why this approach may have some advantages for robotic SLAM. 1 Introduction Sensory noise and ambiguous spatial cues make self-localization during navigation computationally challenging. Errors in self-motion estimation cause rapid deterioration in localization performance, if localization is based simply on path integration (PI), the integration of self-motion signals. Spatial features in the world are often spatially extended (e.g. walls) or similar landmarks are found at multiple locations, and thus provide only partial position information. Worse, localizing in novel environments requires solving a chicken-or-egg problem: Since landmarks are not yet associated with coordinates, agents must learn landmark positions from PI (known as mapping), but PI location estimates drift rapidly and require correction from landmark coordinates. Despite the computational difficulties, animals exhibit stable neural tuning in familiar and novel environments over several 10s of minutes [1, 2], even though the PI estimates in the same animals is estimated to deteriorate within a few minutes [3]. These experimental and computational findings suggest that the brain is solving some version of the simultaneous localization and mapping (SLAM) problem. In robotics, the SLAM problem is solved by algorithms that approximate Bayes-optimal sequential probabilistic inference: at each step, a probability distribution over possible current locations and over the locations of all the landmarks is updated based on noisy motion and noisy, ambiguous landmark inputs [4]. These algorithms simultaneously update location and map estimates, effectively bootstrapping their way to better estimates of both. Quantitative studies of neural responses in rodents suggest that their brains might also perform high-quality sequential probabilistic fusion of motion and landmark cues during navigation [3]. The required probabilistic computations are difficult to 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. translate by hand into forms amenable to neural circuit dynamics, and it is entirely unknown how the brain might perform them. We ask here how the brain might solve the SLAM problem. Instead of imposing heavy prior assumptions on the form a neural solution might take, we espouse a relatively model-free approach [5, 6, 7]: supervised training of recurrent neural networks to solve spatial localization in familiar and novel environments. A recurrent architecture is necessary because self-localization from motion inputs and different landmark encounters involves integration over time, which requires memory. We expect that the network will form representations of the latent variables essential to solving the task . Unlike robotic SLAM algorithms that simultaneously acquire a representation of the agent’s location and a detailed metric map of a novel environment, we primarily train the network to perform accurate localization; the map representation is only explicitly probed by asking the network to extract features to correctly classify the environment it is currently in. However, even if the goal is to merely localize in one of several environments, the network must have created and used a map of the environment to enable accurate localization with noisy PI. In turn, an algorithm that successfully solves the problem of accurate localization in novel environments can automatically solve the SLAM problem, as mapping a space then simply involves assigning correct coordinates to landmarks, walls, and other features in the space [4]. Our network solution exploits the fact that the SLAM problem can be considered as one of mapping sequences of ambiguous motion and landmark observations to locations, in a way that generalizes across trajectories and environments. Our goal is to better understand how the brain solves such problems, by relating emergent responses in the trained network to those observed in the brain, and through this process to synthesize, from a function-driven perspective, the large body of phenomenology on the brain’s spatial navigation circuits. Because we have access to all hidden units and control over test environments and trajectories, this approach allows us to predict the effective dimensionality of the dynamics required to solve the 2D SLAM task and make novel predictions about the representations the brain might construct to solve hard inference problems. Even from the perspective of well-studied robotic SLAM, this approach could allow for the learning and use of rich environment structure priors from past experience, which can enable faster map building in novel environments. 2 Methods 2.1 Environments and trajectories We study the task of a simulated rat that must estimate its position (i.e., localize itself) while moving along a random trajectory in two-dimensional enclosures, similar to a typical task in which rats chase randomly scattered food pellets [8]. The enclosure is polygon-shaped and the rat does not have access to any local or distal spatial cues other than touch-based information upon contact with the boundaries of the environment (Figure 1A-B; for details see SI Text, section 1-4). We assume that the rat has access to noisy estimates of self-motion speed and direction, as might be derived from proprioceptive and vestibular cues (Figure 1A), and to boundary-contact information derived from its rare encounters with a boundary whose only feature is its geometry. On boundary contact, the rat receives information only about its distance and angle relative to the boundary (Figure 1B). This information is degenerate: it depends simply on the pose of the rat with respect to the boundary, and the same signal could arise at various locations along the boundary. Self-motion and boundary contact estimates are realistically noisy, with magnitudes based on work in [3]. 2.2 Navigation tasks We study the following navigation tasks: • Localization only: Localization in a single familiar environment. The rat is familiar with the geometry of the environment but starts each trial at a random unknown location. To successfully solve the task, the rat must infer its location relative to a fixed point in the interior on the basis of successive boundary contacts and its knowledge of the environment’s geometry, and be able to generalize this computation across novel random trajectories. • Generalized SLAM: Localization in novel environments. Each trial takes place in a novel environment, sampled from a distribution of random polygons (Figure 1C; SI Text, section 2 A B C D localization or classification recurrent layer (LSTM) input: motion and boundary ? ? 1 m Figure 1: Task setup. Self-localization in 2D enclosures. A Noisy heading direction and speed inputs allow the simulated rat to update its location in the interior. B Occasional boundary contacts provide noisy estimates of the its relative angle (β) and distance (d) from the wall. Length scale is for localization-only task. C Samples from the distribution of random environments. D Architecture of the recurrent neural network. 1); the rat must accurately infer its location relative to the starting point by exploiting boundary inputs despite not knowing the geometry of its enclosure. To solve the task, the rat must be able to generalize its localization computations to trials with both novel trajectories and novel environments. • Specialized task: Localization in and classification of any of 100 familiar environments. Each trial takes place in one of 100 known environments, sampled from a distribution of random polygons (Figure 1C; SI Text, section 1), but the rat does not know which one. The trial starts at a fixed point inside the polygon (known to rat through training), and the ongoing trajectory is random. In addition to the challenges of the localization tasks above, the rat must correctly classify the environment. The environments are random polygons with 10 vertices. The center-to vertex lengths are drawn randomly from a distribution with mean 1m in the localization-only task or 0.33m in the specialized and generalized SLAM tasks. 2.3 Recurrent network architecture and training The network has three layers: input, recurrent hidden and output layer (Figure 1D). The input layer encodes noisy self-motion cues like velocity and head direction change, as well as noisy boundarycontact information like relative angle and distance to boundary (SI Text, section 9). The recurrent layer contains 256 Long Short-Term Memory (LSTM) units with peepholes and forget gates [9], an architecture demonstrated to be able to learn dependencies across many timesteps [10]. We adapt the nonlinearity of the LSTM units to produce non-negative hidden activations in order to facilitate the comparison with neural firing rates1. Two self-localization units in the output perform a linear readout; their activations correspond to the estimated location coordinates. The cost function for localization is mean squared error. The classification output is implemented by a softmax layer with 100 neurons (1 per environment); the cost function is cross-entropy. When the network is trained to both localize and classify, the relative weight is tuned such that the classification cost is half of the localization cost. Independent trials used for training: 5000 trials in the localization-only task, 250,000 trials in the specialized task, and 300,000 trials in the generalized task. The network is trained using the Adam algorithm [11], a form of stochastic gradient descent. Gradients are clipped 1The LSTM equations are implemented by the equations: it = σ(Wxixt + Whiht−1 + wci ⊙ct−1 + bi) ft = σ(Wxfxt + Whfht−1 + wcf ⊙ct−1 + bf) ct = ftct−1 + it tanh(Wxcxt + Whcht−1 + bc) ot = σ(Wxoxt + Whoht−1 + wco ⊙ct + bo) ht = ot tanh([ct]+) where σ is the logistic sigmoid function, h is the hidden activation vector, i, f, o and c are respectively the input gate, forget gate, output gate and cell activation vectors, a ⊙b denotes point-wise multiplication and [x]+ denotes rectification. 3 to 1. During training performance is monitored on a validation set of 1000 independent trials, and network parameters with the smallest validation error are selected. All results are cross-validated on a separate set of 1000 test trials to ensure the network indeed generalizes across new random trajectories and/or environments. 3 Results 3.1 Network performance on spatial tasks rivals optimal performance 3.1.1 Localization in a familiar environment The trained network, starting a trial from an unknown random initial position and running along a new random trajectory, quickly localizes itself within the space (Figure 2, red curve). The mean location error (averaged over new test trials) drops as a function of time in each trial, as the rat encounters more boundaries in the environment. After about 5 boundary contacts, the initial error has sharply declined. 0 500 1000 1500 timestep 0 0.5 1 1.5 mean abs err [m] PI PF NN SH 0 500 1000 1500 timestep 0 1 radial error [m] 0 1 2 ang error [rads] 0 500 1000 1500 timestep PF SH Figure 2: Localization in a single familiar environment. Mean absolute error on the localization-only task (left), radial error measured from origin (middle) and angular error (right). One time step corresponds to 0.77 seconds. Network performance (red, NN) is compared to that of the particle filter (black, PF). Also shown: single hypothesis filter (light red, SH) and simple path integration (gray, PI) estimates as controls. The drop in error over time and the final error of the network match that of the optimal Bayesian estimator with access to the same noisy sensory data but perfect knowledge of the boundary coordinates (Figure 2, black). The optimal Bayesian estimator is implemented as a particle filter (PF) with 1000 particles and performs fully probabilistic sequential inference about position, using the environment coordinates and the noisy sensory data. The posterior location distributions are frequently elongated in an angular arc and multimodal (thus far from Gaussian). Both network and PF vastly outperform pure PI. First, since the PI estimate does not have access to boundary information, it cannot overcome initial localization uncertainty due to the unknown starting point. Second, the error in the PI estimate of location grows unbounded with time, as expected due to the accumulating effects of noise in the motion estimates (Figure 2, gray). In contrast, the errors in the network and PF – which make use of the same motion estimates – remain bounded. Finally we contrast the performance of the network and PF with the single hypothesis (SH) algorithm, which updates a single location estimate (rather than a probability distribution) by taking into account motion, contact, and arena shape. The SH algorithm can be thought of as an abstraction of neural bump attractor models [12, 13], in which an activity bump is updated using PI and corrected when a landmark or boundary with known spatial coordinates is observed. The SH algorithm overcomes, to a certain degree, the initial localization uncertainty due to the unknown starting position, but the error steadily increases thereafter. It still vastly underperforms the network and PF, since it is not able to efficiently resolve the complex-shaped uncertainties induced by featureless boundaries. 4 3.1.2 Localization in novel environments The network is trained to localize within a different environment in each trial, then tested on a set of trials in different novel environments. Strikingly, the network localizes well in the novel environments, despite its ignorance about their specific geometry (Figure 3A, red). While the network (unsurprisingly) does not match the performance of an oracular PF that is supplied with the arena geometry at the beginning of the trial (Figure 3A, black), its error exceeds the oracular PF by only ≈50%, and it vastly outperforms PI-based estimation (Figure 3A, gray) and a naive Bayesian (NB) approach that takes into account the distribution of locations across the ensemble of environments (Figure 3A, reddish-gray; SI section 8). Compared to robotic SLAM in open-field environments, this task setting is especially difficult since distant boundary information is gathered only from sparse contacts, rather than spatially extended and continuous measurements with laser or radar scanners. 3.1.3 Localization in and classification of 100 familiar environments The network is trained on 100 environments then tested in an arbitrary environment from that set. The goal is to identify the environment and localize within it, from a known starting location. Localization initially deteriorates because of PI errors (Figure 3B, red). After a few boundary encounters, the network correctly identifies the environment (Figure 3C), and simultaneously, localization error drops as the network now associates the boundary with coordinates for the appropriate environment. The network’s localization error post-classification matches that of an oracular PF with full knowledge about the environment geometry. Within 200s of exploration within the environment, classification performance is close to 100%. As a measure of the efficacy of the neural network in solving the specialized task, we compare its performance to PFs that do not know the identity of the environment at the outset of the trial (PF SLAM) and that perform both localization and classification, with varying numbers of particles, Figure 3D-E. For classification, the asymptotic network performance with 256 recurrent units is comparable to a 10,000 particle PF SLAM, while for localization, the asymptotic network performance is comparable to a 4,000 particle PF SLAM, suggesting that the network is extremely efficient. Even the 10,000 particle PF SLAM classification estimate sometimes prematurely collapses to not always the correct value. The network is slower to select a classification, and is more accurate, improving on a common problem with particle-filter based SLAM caused by particle depletion. PI oracular PF NN NB specialized network 0 500 1000 1500 timestep 0 500 1000 1500 timestep 0 500 1000 1500 timestep generalized network, specialized task 0 0.1 0.05 B F C D E oracular PF 500 PF SLAM 1000 4000 10000 generalized network A 0 0 500 1000 1500 0.2 0.4 0.6 mean abs err [m] timestep 0 100 0 100 class (%) class (%) Figure 3: Localization and classification in the generalized and specialized SLAM tasks. A Localization performance of the generalized network (red, NN) tested in novel environments, compared to a PF that knows the environment identity (black, oracular PF). Controls: PI only (gray, PI) and a naive Bayes filter (see text and SI; reddish-gray, NB). B Same as (A), but for the specialized network tested in 100 familiar environments. C Classification performance of the specialized network in 100 familiar environments. D-E Localization and classification by a SLAM PF with different number of particles, compared to the specialized network in 100 familiar environments. F Classification performance of the general network after retraining of the readout weights on the specialized task. 5 3.1.4 Spontaneous classification of novel environments In robotic SLAM, algorithms that self-localize accurately in novel environments in the presence of noise must simultaneously build a map of the environments. Since the network in the general task in Figure 3A successfully localizes in novel environments, and is able to distinguish between them though they are quite similar, we conjecture that it must entertain a spontaneous representation of the environment. To test this hypothesis we fix the input and recurrent weights of the network trained on the generalized task (completely novel environments) and retrain it on the specialized task (one out of hundred familiar environments), whereby only the readout weights are trained for classification. We find that the classification performance late in each trial is close to 80%, much higher than chance (1%), Figure 3F. This implies that the hidden neurons spontaneously build a representation that separates novel environments so they can be linearly classified. This separation can be interpreted as a simple form of spontaneous map-building. However, this spontaneous map-building is done with fixed weights this is different than standard Hopfield-type network models that require synaptic plasticity to learn a new environment. 3.2 Comparison with and predictions for neural representation Neural activity in the hippocampus and entorhinal cortex – areas involved in spatial navigation – has been extensively catalogued, usually while animals chase randomly dropped food pellets in open field environments. It is not always clear what function the observed responses play in solving hard navigation problems, or why certain responses exist. Here we compare the responses of our network, which is trained to solve such tasks, with the experimental phenomenology. Hidden units in our network exhibit stable place tuning, similar to place cells in CA1/CA3 of the hippocampus [14, 15, 16], Figure 4A,B (left two columns). Stable place fields are observed across tasks – the network trained to localize in a single familiar environment exhibits stable fields there, while the networks trained on the specialized and generalized tasks exhibit repeatedly stable fields in all tested environments. specialized network env A env A env B generalized network A B C 0 1 cumul freq env A env A env B 0.05 0.1 0.15 0.2 normalized similarity spatial selectivity (SS) 0 0.5 1 frequency 0 10 20 30 D E SS weight 0 1 head direction activity distribution Figure 4: Neuron-like representations. A Spatial tuning of four typical hidden units from the specialized network, measured twice with different trajectories in the same environment (columns 1-2, blue box). The same cells are measured in a second environment (column 3, red box). B Same as A but for the generalized network; both environments were not in the training set. C Hidden units (representative sample of 20) are not tuned to head direction. D Cumulative distribution of similarity of hidden unit states in the specialized (top) and generalized (bottom) networks, for trials in the same environment (blue) versus trials in different environments (pink). Control: similarity after randomizing over environments (gray). E Spatial selectivities of hidden units in the specialized network. Inset: spatial selectivity (averaged across environments) versus effective projection strength to classifier neurons, per hidden unit. The hidden units, all of which receive head direction inputs and use this data to compute location estimates, nevertheless exhibit weak to nil head direction tuning, Figure 4C, again similar to observations in rodent place cells [17] (but see [18] for a report of head direction tuning in bat place cells). Between different environments, the network trained on the specialized task exhibits clear remapping [19, 20], both global and local: cells fire in some environments and not others, and cells that were co-active in one environment are not in another, Figure 4A,B (third column). There is, in addition, a substantial amount of rate modulation in cells when they do not globally remap. Strikingly, the network trained on the generalized task exhibits different but stable and reproducible maps of different 6 novel environments with remapping, even though the input and recurrent connections were never readjusted for these novel environments, Figure 4B. This result suggests a computation that is distinct from the dynamics of settling into pre-trained fixed maps for different environments. The similarity and dissimilarity of the representations within the same environment and across environments, in the specialized and generalized tasks are quantified in Figure 4D: the representations are randomized across environments but stable within an environment. For networks trained on the specialized or generalized tasks, the spatial selectivity of hidden units in an environment - measured as the fraction of the variance of each hidden neuron’s activation that can be explained by location - is broad and long-tailed or sparse, Figure 4E: a few cells exhibit high selectivity, many have low selectivity. Interestingly, cells with low spatial selectivity in one environment also tend to have low selectivity across environments (in other words, the distribution in selectivity per cell across environments is narrower than the distribution of selectivity across cells per environment). Indeed, spatial information in hippocampal neurons seems to be concentrated in a small set of neurons [21], an experimental observation that seemed to run counter to the informationtheoretic view that whitened representations are most efficient. However, our 256-neuron recurrent network, which efficiently solves a hard task that requires 104 particles, seems to do the same. There is a negative correlation between spatial selectivity and the strength of feedforward connections to the classification units: Hidden units that more strongly drive classification also tend to be less spatially selective, Figure 4E (inset). In other words, some low spatial selectivity cells correspond to what are termed context cells [22]. It remains unclear and the focus of future work to understand the role of the remaining cells with low spatial selectivity. 3.3 Inner workings of the network 3.9 s A 8.6 s 10.1 s 30.3 s -1.5 -1 -0.5 0 0.5 0 5 10 15 log(#elements within) d = 5.0 +/- 0.04 0 10 d = 5.6 +/- 0.03 0 5 10 15 d = 8.6 +/- 0.1 log(radius) 0 0.02 0 0.02 -0.01 0.01 Cxx (net prediction) 0 0.1 0 0.1 -0.05 0.05 Cxx (PF) Cyy (PF) Cyy (net prediction) Cxy (PF) Cxy (net prediction) r = 0.49 r = 0.45 r = 0.45 C B Figure 5: Inner workings of the network A Hidden units in the localization-only network predict the covariances (Cxx, Cyy, Cxy) of the posterior location (x, y) distributions in the particle filter. B Light red: snapshots of the narrowing set of potential environment classifications by the specialized neural network at different early times in a trajectory, as determined by the activation of classifier neurons in the output layer. C Dimensionality of the hidden representations, estimated by the correlation dimension measure: localization network (top), specialized network (middle), generalized network (bottom). Dimensionality estimated from across-environment pooled responses for the latter two networks. Beyond the similarities between representations in our hidden units and neural representations, what can we learn about how the network solves the SLAM problem? The performance of the network compared to the particle filter (and its superiority to simpler strategies used as controls) already implies that the network is performing sophisticated probabilistic computations about location. If it is indeed tracking probabilities, it should be possible to predict the 7 uncertainties in location estimation from the hidden units. Indeed, all three covariance components related to the location estimate of the particle filter can be predicted by cross-validated linear regression from the hidden units in the localization-only network (Figure 5A). When first placed into one of 100 familiar environments, the specialized network simultaneously entertains multiple possibilities for environment identity, Figure 5B. The activations of neurons in the soft-max classification layer may be viewed as a posterior distribution over environment identity. With continued exploration and boundary encounters, the represented possibilities shrink until the network has identified the correct environment. Unlike the particle filter and contrary to neural models that implement probabilistic inference by stochastic sampling of the underlying distribution [23], this network implements ongoing near-optimal probabilistic location estimation through a fully deterministic dynamics. Location in 2D spaces is a continuous 2D metric variable, so one might expect location representations to lie on a low-dimensional manifold. On the other hand, SLAM also involves the representation of landmark and boundary coordinates and the capability to classify environments, which may greatly expand the effective dimension of a system solving the problem. We analyze the fractal manifold dimension of the hidden layer activities in the three networks, Figure 5C2. The localization-only network has a dimension D = 5.0. Surprisingly, the specialized network states (pooled across all 100 environments) are equally low-dimensional: D = 5.6. The generalized network states, pooled across environments, have dimension D = 8.6. (The dimensionality of activity in the latter two networks, considered in single environments only, remains the same as when pooled across environments.) This implies that the network extracts and representing only the most relevant summary statistics required to solve the 2D localization tasks, and that these statistics have fairly low dimension. These dimension estimates could serve as a prediction for hippocampal dynamics in the brain. 4 Discussion By training a recurrent network on a range of challenging navigation tasks, we have generated – to our knowledge – the first fully neural SLAM solution that is as effective as particle filter-based implementations. Existing neurally-inspired SLAM algorithms such as RatSLAM [24] have combined attractor models with semi-metric topological maps, but only the former was neurally implemented. [25] trained a bidirectional LSTM network to transform laser range sensor data into location estimates, but the network was not shown to generalize across environments. In contrast, our recurrent network implementation is fully neural and generalizes successfully across environments with very different shapes. (Also see [26], a new preprint posted while this paper was under review, reporting on a SLAM implementation with recurrent neural network components. Other recent efforts to combine DNNs with SLAM usually apply DNNs to the input visual input, and the outputs of the DNN are then fed into an existing SLAM algorithm [27, 28]. By contrast, our focus has been on finding neural solutions to the SLAM algorithm itself.) Previous hand-designed models such as the multichart attractor model of Samsonovich & McNaughton [12] could path integrate and use landmark information to correct the network’s PI estimate in many different environments. Yet our model substantially transcends those computational capabilities: First, our model performs sequential probabilistic inference, not simply a hard resetting of the PI estimate according to external cues. Second, our network reliably localizes in 100 environments with 256 LSTM units (which corresponds to 512 dynamical units); the low capacity of the multichart attractor model would require about 175,000 neurons for the same number of environments. This comparison suggests that the special network architecture of the LSTM not only affects learnability, but also capacity. Finally, unlike the multichart attractor model, our model is able to linearly separate completely novel environments without changing its weights, as shown in section 3.1.4. Despite its success in reproducing some key elements of the phenomenology of the hippocampus, our network model does not incorporate many biological constraints. This is in itself interesting, since it suggests that observed phenomena like stable place fields and remapping may emerge from the computational demands of hard navigation tasks rather than from detailed biological 2To estimate the fractal dimension, we use “correlation dimension”: measure the number of states across trials that fall into a ball of radius r around a point in state space. The slope of log(#states) versus log(r) is the fractal dimension at that point. 8 constraints. It will be interesting to see whether incorporating constraints like Dale’s law and the known gross architecture of the hippocampal circuit results in the emergence of additional features associated with the brain’s navigation circuits, such as sparse population activity, directionality in place representations in 1D environments, and grid cell-like responses. The choice of an LSTM architecture for the hidden layer units, involving multiplicative input, output and forget gates and persistent cells, was primarily motivated by its ability to learn longer timedependencies. One might wonder whether such multiplicative interactions could be implemented in biological neurons. A model by [29] proposed that dendrites of granule cells in the dental gyrus contextually gate projections from grid cells in the entorhinal cortex to place cells. Similarly, granule cells could implement LSTM gates by modulating recurrent connections between pyramidal neurons in hippocampal area CA3. LSTM cells might be interpreted as neural activity or as synaptic weights updated by a form of synaptic plasticity. The learning of synaptic weights by gradient descent does not map well to biologically plausible synaptic plasticity rules, and such learning is slow, requiring a vast number of supervised training examples. Our present results offer a hint that, through extensive learning, the generalized network acquires useful general prior knowledge about the structure of natural navigation tasks, which it then uses to map and localize in novel environments with minimal further learning. One could thus argue that the slow phase of learning is evolutionary, while learning during a lifetime can be brief and driven by relatively little experience in new environments. At the same time, progress in biologically plausible learning may one day bridge the efficiency gap to gradient descent [30]. Finally, although our work is focused on understanding the phenomenology of navigation circuits in the brain, it might also be of some interest for robotic SLAM. SLAM algorithms are sometimes augmented by feedforward convolutional networks to assist in specific tasks like place recognition (see e.g. [27, 28]) from camera images, but the geometric calculations and parameters at the core of SLAM algorithms are still largely hand-specified. By contrast, this work provides a proof of concept for the feasibility end-to-end learning of SLAM algorithms using recurrent neural networks and shows that the trained network provides a solution to the particle depletion problem that plagues many particle filter-based approaches to SLAM and is highly effective in identifying which low-dimensional summary statistics to update over time. Acknowledgments This work is supported by the NSF (CRCNS 26-1004-04xx), an HFSP award to IRF (26-6302-87), and the Simons Foundation through the Simons Collaboration on the Global Brain. The authors acknowledge the Texas Advanced Computing Center (TACC) at The University of Texas at Austin (URL: http://www.tacc.utexas.edu) for providing HPC resources that have contributed to the research results reported within this paper. References [1] Etienne Save, Ludek Nerad, and Bruno Poucet. Contribution of multiple sensory information to place field stability in hippocampal place cells. Hippocampus, 10(1):64–76, 2000. [2] Torkel Hafting, Marianne Fyhn, Sturla Molden, May-Britt Moser, and Edvard I. Moser. Microstructure of a spatial map in the entorhinal cortex. Nature, 436:801–806, 2005. [3] Allen Cheung, David Ball, Michael Milford, Gordon Wyeth, and Janet Wiles. Maintaining a cognitive map in darkness: the need to fuse boundary knowledge with path integration. PLoS Comput Biol, 8(8):e1002651, 2012. [4] Sebastian Thrun, Wolfram Burgard, and Dieter Fox. Probabilistic robotics. MIT press, 2005. [5] Valerio Mante, David Sussillo, Krishna V Shenoy, and William T Newsome. Context-dependent computation by recurrent dynamics in prefrontal cortex. Nature, 503(7474):78–84, 2013. [6] Daniel LK Yamins, Ha Hong, Charles F Cadieu, Ethan A Solomon, Darren Seibert, and James J DiCarlo. Performance-optimized hierarchical models predict neural responses in higher visual cortex. Proceedings of the National Academy of Sciences, 111(23):8619–8624, 2014. [7] Adam Marblestone, Greg Wayne, and Konrad Kording. Towards an integration of deep learning and neuroscience. arXiv preprint arXiv:1606.03813, 2016. 9 [8] Robert U Muller and John L Kubie. The effects of changes in the environment on the spatial firing of hippocampal complex-spike cells. Journal of Neuroscience, 7(7):1951–1968, 1987. [9] Alex Graves. Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850, 2013. [10] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. [11] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [12] A Samsonovich and B L McNaughton. Path integration and cognitive mapping in a continuous attractor neural network model. J Neurosci, 17(15):5900–5920, 1997. [13] Yoram Burak and Ila R Fiete. Fundamental limits on persistent activity in networks of noisy neurons. Proc Natl Acad Sci U S A, 109(43):17645–50, Oct 2012. [14] J O’Keefe and J Dostrovsky. The hippocampus as a spatial map. preliminary evidence from unit activity in the freely-moving rat. Brain Res, 34(1):171–175, 1971. [15] John O’Keefe and Lynn Nadel. The hippocampus as a cognitive map. Behavioral and Brain Sciences, 2(04):487–494, 1979. [16] Matthew A Wilson and Bruce L McNaughton. Dynamics of the hippocampal ensemble code for space. Science, 261(5124):1055–1058, 1993. [17] Robert U Muller, Elizabeth Bostock, Jeffrey S Taube, and John L Kubie. On the directional firing properties of hippocampal place cells. The Journal of Neuroscience, 14(12):7235–7251, 1994. [18] Alon Rubin, Michael M Yartsev, and Nachum Ulanovsky. Encoding of head direction by hippocampal place cells in bats. The Journal of Neuroscience, 34(3):1067–1080, 2014. [19] J O’Keefe and DH Conway. Hippocampal place units in the freely moving rat: why they fire where they fire. Experimental Brain Research, 31(4):573–590, 1978. [20] Robert U. Muller, John L. Kubie, E. M. Bostock, J. S. Taube, and G. J. Quirk. Spatial firing correlates of neurons in the hippocampal formation of freely moving rats, pages 296–333. Oxford University Press, New York, NY, US, 1991. [21] György Buzsáki and Kenji Mizuseki. The log-dynamic brain: how skewed distributions affect network operations. Nature Reviews Neuroscience, 15(4):264–278, 2014. [22] David M Smith and Sheri J Y Mizumori. Hippocampal place cells, context, and episodic memory. Hippocampus, 16(9):716–729, 2006. [23] József Fiser, Pietro Berkes, Gerg˝o Orbán, and Máté Lengyel. Statistically optimal perception and learning: from behavior to neural representations. Trends in cognitive sciences, 14(3):119–130, 2010. [24] Michael Milford and Gordon Wyeth. Persistent navigation and mapping using a biologically inspired slam system. The International Journal of Robotics Research, 29(9):1131–1153, 2010. [25] Alexander Förster, Alex Graves, and Jürgen Schmidhuber. Rnn-based learning of compact maps for efficient robot localization. In ESANN, pages 537–542, 2007. [26] J. Zhang, L. Tai, J. Boedecker, W. Burgard, and M. Liu. Neural SLAM. arXiv preprint arXiv:1706.09520, 2017. [27] Zetao Chen, Obadiah Lam, Adam Jacobson, and Michael Milford. Convolutional neural network-based place recognition. CoRR, abs/1411.1509, 2014. [28] Niko Sunderhauf, Sareh Shirazi, Feras Dayoub, Ben Upcroft, and Michael Milford. On the performance of convnet features for place recognition. In Intelligent Robots and Systems (IROS), 2015 IEEE/RSJ International Conference on, pages 4297–4304. IEEE, 2015. [29] Robin M Hayman and Kathryn J Jeffery. How heterogeneous place cell responding arises from homogeneous grids - a contextual gating hypothesis. Hippocampus, 18(12):1301–1313, 2008. [30] Yoshua Bengio, Dong-Hyun Lee, Jorg Bornschein, and Zhouhan Lin. Towards biologically plausible deep learning. arXiv preprint arXiv:1502.04156, 2015. 10 | 2017 | 247 |
6,727 | SafetyNets: Verifiable Execution of Deep Neural Networks on an Untrusted Cloud Zahra Ghodsi, Tianyu Gu, Siddharth Garg New York University {zg451, tg1553, sg175}@nyu.edu Abstract Inference using deep neural networks is often outsourced to the cloud since it is a computationally demanding task. However, this raises a fundamental issue of trust. How can a client be sure that the cloud has performed inference correctly? A lazy cloud provider might use a simpler but less accurate model to reduce its own computational load, or worse, maliciously modify the inference results sent to the client. We propose SafetyNets, a framework that enables an untrusted server (the cloud) to provide a client with a short mathematical proof of the correctness of inference tasks that they perform on behalf of the client. Specifically, SafetyNets develops and implements a specialized interactive proof (IP) protocol for verifiable execution of a class of deep neural networks, i.e., those that can be represented as arithmetic circuits. Our empirical results on three- and four-layer deep neural networks demonstrate the run-time costs of SafetyNets for both the client and server are low. SafetyNets detects any incorrect computations of the neural network by the untrusted server with high probability, while achieving state-of-the-art accuracy on the MNIST digit recognition (99.4%) and TIMIT speech recognition tasks (75.22%). 1 Introduction Recent advances in deep learning have shown that multi-layer neural networks can achieve state-ofthe-art performance on a wide range of machine learning tasks. However, training and performing inference (using a trained neural network for predictions) can be computationally expensive. For this reason, several commercial vendors have begun offering “machine learning as a service" (MLaaS) solutions that allow clients to outsource machine learning computations, both training and inference, to the cloud. While promising, the MLaaS model (and outsourced computing, in general) raises immediate security concerns, specifically relating to the integrity (or correctness) of computations performed by the cloud and the privacy of the client’s data [16]. This paper focuses on the former, i.e., the question of integrity. Specifically, how can a client perform inference using a deep neural network on an untrusted cloud, while obtaining strong assurance that the cloud has performed inference correctly? Indeed, there are compelling reasons for a client to be wary of a third-party cloud’s computations. For one, the cloud has a financial incentive to be “lazy." A lazy cloud might use a simpler but less accurate model, for instance, a single-layer instead of a multi-layer neural network, to reduce its computational costs. Further the cloud could be compromised by malware that modifies the results sent back to the client with malicious intent. For instance, the cloud might always mis-classify a certain digit in a digit recognition task, or allow unauthorized access to certain users in a face recognition based authentication system. The security risks posed by cloud computing have spurred theoretical advances in the area of verifiable computing (VC) [21]. The idea is to enable a client to provably (and cheaply) verify that an untrusted 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. server has performed computations correctly. To do so, the server provides to the client (in addition to the result of computation) a mathematical proof of the correctness of the result. The client rejects, with high probability, any incorrectly computed results (or proofs) provided by the server, while always accepting correct results (and corresponding proofs) 1. VC techniques aim for the following desirable properties: the size of the proof should be small, the client’s verification effort must be lower than performing the computation locally, and the server’s effort in generating proofs should not be too high. The advantage of proof-based VC is that it provides unconditional, mathematical guarantees on the integrity of computation performed by the server. Alternative solutions for verifiable execution require the client to make trust assumptions that are hard for the client to independently verify. Trusted platform modules [7], for instance, require the client to place trust on the hardware manufacturer, and assume that the hardware is tamper-proof. Audits based on the server’s execution time [15] require precise knowledge of the server’s hardware configuration and assume, for instance, that the server is not over-clocked. Client (verifier) Untrusted Server (prover) digit=4 5 challenge 1 response 1 Random Challenge Verify Execute Neural Network Compute Response challenge n response n ... Random Challenge Reject Compute Response Input Image Reject Figure 1: High-level overview of the SafetyNets IP protocol. In this example, an untrusted server intentionally changes the classification output from 4 to 5. The work in this paper leverages powerful VC techniques referred to as interactive proof (IP) systems [5, 9, 18, 19]. An IP system consists of two entities, a prover (P), i.e., the untrusted server, and a verifier (V), i.e., the client. The framework is illustrated in Figure 1. The verifier sends the prover an input x, say a batch of test images, and asks the prover to compute a function y = f(x). In our setting, f(.) is a trained multi-layer neural network that is known to both the verifier and prover, and y is the neural network’s classification output for each image in the batch. The prover performs the computation and sends the verifier a purported result y′ (which is not equal to y if the prover cheats). The verifier and prover then engage in n rounds of interaction. In each round, the verifier sends the prover a randomly picked challenge, and the prover provides a response based on the IP protocol. The verifier accepts that y′ is indeed equal to f(x) if it is satisfied with the prover’s response in each round, and rejects otherwise. A major criticism of IP systems (and, indeed, all existing VC techniques) when used for verifying general-purpose computations is that the prover’s overheads are large, often orders of magnitude more than just computing f(x) [21]. Recently, however, Thaler [18] showed that certain types of computations admit IP protocols with highly efficient verifiers and provers, which lays the foundations for the specialized IP protocols for deep neural networks that we develop in this paper. Paper Contributions. This paper introduces SafetyNets, a new (and to the best of our knowledge, the first) approach for verifiable execution of deep neural networks on untrusted clouds. Specifically, SafetyNets composes a new, specialized IP protocol for the neural network’s activation layers with Thaler’s IP protocol for matrix multiplication to achieve end-to-end verifiability, dramatically reducing the bandwidth costs versus a naive solution that verifies the execution of each layer of the neural network separately. SafetyNets applies to a certain class of neural networks that can be represented as arithmetic circuits that perform computations over finite fields (i.e., integers modulo a large prime p). Our implementation of SafetyNets addresses several practical challenges in this context, including the choice of the prime p, its relationship to accuracy of the neural network, and to the verifier and prover run-times. Empirical evaluations on the MNIST digit recognition and TIMIT speech recognition tasks illustrate that SafetyNets enables practical, low-cost verifiable outsourcing of deep neural network execution without compromising classification accuracy. Specifically, the client’s execution time is 8×-80× lower than executing the network locally, the server’s overhead in generating proofs is less than 5%, and the client/server exchange less than 8 KBytes of data during the IP protocol. SafetyNets’ security 1Note that the SafetyNets is not intended to and cannot catch any inherent mis-classifications due to the model itself, only those that result from incorrect computations of the model by the server. 2 guarantees ensure that a client can detect any incorrect computations performed by a malicious server with probability vanishingly close to 1. At the same time, SafetyNets achieves state-of-the-art classification accuracies of 99.4% and 75.22% on the MNIST and TIMIT datasets, respectively. 2 Background In this section, we begin by reviewing necessary background on IP systems, and then describe the restricted class of neural networks (those that can be represented as arithmetic circuits) that SafetyNets handles. 2.1 Interactive Proof Systems Existing IP systems proposed in literature [5, 9, 18, 19] use, at their heart, a protocol referred to as the sum-check protocol [13] that we describe here in some detail, and then discuss its applicability in verifying general-purpose computations expressed as arithmetic circuits. Sum-check Protocol Consider a d-degree n-variate polynomial g(x1, x2, . . . , xn), where each variable xi ∈Fp (Fp is the set of all natural numbers between zero and p −1, for a given prime p) and g : Fn p →Fp. The prover P seeks to prove the following claim: y = X x1∈{0,1} X x2∈{0,1} . . . X xn∈{0,1} g(x1, x2, . . . , xn) (1) that is, the sum of g evaluated at 2n points is y. P and V now engage in a sum-check protocol to verify this claim. In the first round of the protocol, P sends the following unidimensional polynomial h(x1) = X x2∈{0,1} X x3∈{0,1} . . . X xn∈{0,1} g(x1, x2, . . . , xn) (2) to V in the form of its coefficients. V checks if h(0) + h(1) = y. If yes, it proceeds, otherwise it rejects P’s claim. Next, V picks a random value q1 ∈Fp and evaluates h(q1) which, based on Equation 2, yields a new claim: h(q1) = X x2∈{0,1} X x3∈{0,1} . . . X xn∈{0,1} g(q1, x2, . . . , xn). (3) V now recursively calls the sum-check protocol to verify this new claim. By the final round of the sum-check protocol, P returns the value g(q1, q2, . . . , qn) and the V checks if this value is correct by evaluating the polynomial by itself. If so, V accepts the original claim in Equation 1, otherwise it rejects the claim. Lemma 2.1. [2] V rejects an incorrect claim by P with probability greater than (1 −ϵ) where ϵ = nd p is referred to as the soundness error. IPs for Verifying Arithmetic Circuits In their seminal work, Goldwasser et al. [9] demonstrated how sum-check can be used to verify the execution of arithmetic circuits using an IP protocol now referred to as GKR. An arithmetic circuit is a directed acyclic graph of computation over elements of a finite field Fp in which each node can perform either addition or multiplication operations (modulo p). While we refer the reader to [9] for further details of GKR, one important aspect of the protocol bears mention. GKR organizes nodes of an arithmetic circuit into layers; starting with the circuit inputs, the outputs of one layer feed the inputs of the next. The GKR proof protocol operates backwards from the circuit outputs to its inputs. Specifically, GKR uses sum-check to reduce the prover’s assertion about the circuit output into an assertion about the inputs of the output layer. This assertion is then reduced to an assertion about the inputs of the penultimate layer, and so on. The protocol continues iteratively till the verifier is left with an assertion about the circuit inputs, which it checks on its own. The layered nature of GKR’s prover aligns almost perfectly with the structure of a multi-layer neural network and motivates the use of an IP system based on GKR for SafetyNets. 3 2.2 Neural Networks as Arithmetic Circuits As mentioned before, SafetyNets applies to neural networks that can be expressed as arithmetic circuits. This requirement places the following restrictions on the neural network layers. Quadratic Activations The activation functions in SafetyNets must be polynomials with integer coefficients (or, more precisely, coefficients in the field Fp). The simplest of these is the element-wise quadratic activation function whose output is simply the square of its input. Other commonly used activation functions such as ReLU, sigmoid or softmax activations are precluded, except in the final output layer. Prior work has shown that neural networks with quadratic activations have the same representation power as networks with threshold activations and can be efficiently trained [6, 12]. Sum Pooling Pooling layers are commonly used to reduce the network size, to prevent overfitting and provide translation invariance. SafetyNets uses sum pooling, wherein the output of the pooling layer is the sum of activations in each local region. However, techniques such as max pooling [10] and stochastic pooling [22] are not supported since max and divisions operations are not easily represented as arithmetic circuits. Finite Field Computations SafetyNets supports computations over elements of the field Fp, that is, integers in the range {−p−1 2 , . . . , 0, . . . , p−1 2 }. The inputs, weights and all intermediate values computed in the network must lie in this range. Note that due to the use of quadratic activations and sum pooling, the values in the network can become quite large. In practice, we will pick large primes to support these large values. We note that this restriction applies to the inference phase only; the network can be trained with floating point inputs and weights. The inputs and weights are then re-scaled and quantized, as explained in Section 3.3, to finite field elements. We note that the restrictions above are shared by a recently proposed technique, CryptoNets [8], that seeks to perform neural network based inference on encrypted inputs so as to guarantee data privacy. However, Cryptonets does not guarantee integrity and compared to SafetyNets, incurs high costs for both the client and server (see Section 4.3 for a comparison). Conversely, SafetyNets is targeted towards applications where integrity is critical, but does not provide privacy. 2.3 Mathematical Model An L layer neural network with the constraints discussed above can be modeled, without loss of generality, as follows. The input to the network is x ∈Fn0×b p , where n0 is the dimension of each input and b is the batch size. Layer i ∈[1, L] has ni output neurons2, and is specified using a weight matrix wi−1 ∈Fni×ni−1 p , and biases bi−1 ∈Fni p . The output of Layer i ∈[1, L], yi ∈Fni×b p is: yi = σquad(wi−1.yi−1 + bi−11T ) ∀i ∈[1, L −1]; yL = σout(wL−1.yL−1 + bL−11T ), (4) where σquad(.) is the quadratic activation function, σout(.) is the activation function of the output layer, and 1 ∈Fb p is the vector of all ones. We will typically use softmax activations in the output layer. We will also find it convenient to introduce the variable zi ∈Fni+1×b p defined as zi = wi.yi + bi1T ∀i ∈[0, L −1]. (5) The model captures both fully connected and convolutional layers; in the latter case the weight matrix is sparse. Further, without loss of generality, all successive linear transformations in a layer, for instance sum pooling followed by convolutions, are represented using a single weight matrix. With this model in place, the goal of SafetyNets is to enable the client to verify that yL was correctly computed by the server. We note that as in prior work [19], SafetyNets amortizes the prover and verifier costs over batches of inputs. If the server incorrectly computes the output corresponding to any input in a batch, the verifier rejects the entire batch of computations. 2The 0th layer is defined to be input layer and thus y0 = x. 4 3 SafetyNets We now describe the design and implementation of our end-to-end IP protocol for verifying execution of deep networks. The SafetyNets protocol is a specialized form of the IP protocols developed by Thaler [18] for verifying “regular" arithmetic circuits, that themselves specialize and refine prior work [5]. The starting point for the protocol is a polynomial representation of the network’s inputs and parameters, referred to as a multilinear extension. Multilinear Extensions Consider a matrix w ∈Fn×n p . Each row and column of w can be referenced using m = log2(n) bits, and consequently one can represent w as a function W : {0, 1}m × {0, 1}m →Fp. That is, given Boolean vectors t, u ∈{0, 1}m, the function W(t, u) returns the element of w at the row and column specified by Boolean vectors t and u, respectively. A multi-linear extension of W is a polynomial function ˜W : Fm p × Fm p →Fp that has the following two properties: (1) given vectors t, u ∈Fm p such that ˜W(t, u) = W(t, u) for all points on the unit hyper-cube, that is, for all t, u ∈{0, 1}m; and (2) ˜W has degree 1 in each of its variables. In the remainder of this discussion, we will use ˜X, ˜Yi and ˜Zi and ˜ Wi to refer to multi-linear extensions of x, yi, zi, and wi, respectively, for i ∈[1, L]. We will also assume, for clarity of exposition, that the biases, bi are zero for all layers. The supplementary draft describes how biases are incorporated. Consistent with the IP literature, the description of our protocol refers to the client as the verifier and the server as the prover. Protocol Overview The verifier seeks to check the result yL provided by the prover corresponding to input x. Note that yL is the output of the final activation layer which, as discussed in Section 2.2, is the only layer that does not use quadratic activations, and is hence not amenable to an IP. Instead, in SafetyNets, the prover computes and sends zL−1 (the input of the final activation layer) as a result to the verifier. zL−1 has the same dimensions as yL and therefore this refinement has no impact on the server to client bandwidth. Furthermore, the verifier can easily compute yL = σout(zL−1) locally. Now, the verifier needs to check whether the prover computed zL−1 correctly. As noted by Vu et al. [19], this check can be replaced by a check on whether the multilinear extension of zL−1 is correctly computed at a randomly picked point in the field, with minimal impact on the soundness error. That is, the verifier picks two vectors, qL−1 ∈Flog(nL) p and rL−1 ∈Flog(b) p at random, evaluates ˜ZL−1(qL−1, rL−1), and checks whether it was correctly computed using a specialized sum-check protocol for matrix multiplication due to Thaler [18] (described in Section 3.1). Since zL−1 depends on wL−1 and yL−1, sum-check yields assertions on the values of ˜WL−1(qL−1, sL−1) and ˜YL−1(sL−1, rL−1), where sL−1 ∈Flog(nL−1) p is another random vector picked by the verifier during sum-check. ˜WL−1(qL−1, sL−1) is an assertion about the weight of the final layer. This is checked by the verifier locally since the weights are known to both the prover and verifier. Finally, the verifier uses our specialized sum-check protocol for activation layers (described in Section 3.2) to reduce the assertion on ˜YL−1(sL−1, rL−1) to an assertion on ˜ZL−2(qL−2, sL−2). The protocol repeats till it reaches the input layer and produces an assertion on ˜X(s0, r0), the multilinear extension of the input x. The verifier checks this locally. If at any point in the protocol, the verifier’s checks fail, it rejects the prover’s computation. Next, we describe the sum-check protocols for matrix multiplication and activation that SafetyNets uses. 3.1 Sum-check for Matrix Multiplication Since zi = wi.yi (recall we assumed zero biases for clarity), we can check an assertion about the multilinear extension of zi evaluated at randomly picked points qi and ri by expressing ˜Zi(qi, ri) as [18]: ˜Zi(qi, ri) = X j∈{0,1}log(ni) ˜Wi(qi, j). ˜Yi(j, ri) (6) 5 Note that Equation 6 has the same form as the sum-check problem in Equation 1. Consequently the sum-check protocol described in Section 2.1 can be used to verify this assertion. At the end of the sum-check rounds, the verifier will have assertions on ˜Wi which it checks locally, and ˜Yi which is checked using the sum-check protocol for quadratic activations described in Section 3.2. The prover run-time for running the sum-check protocol in layer i is O(ni(ni−1 + b)), the verifier’s run-time is O(nini−1) and the prover/verifier exchange 4 log(ni) field elements. 3.2 Sum-check for Quadratic Activation In this step, we check an assertion about the output of quadratic activation layer i, ˜Yi(si, ri), by writing it in terms of the input of the activation layer as follows: ˜Yi(si, ri) = X j∈{0,1}log(ni),k∈{0,1}log(b) ˜I(si, j)˜I(ri, k) ˜Z2 i−1(j, k), (7) where ˜I(., .) is the multilinear extension of the identity matrix. Equation 7 can also be verified using the sum-check protocol, and yields an assertion about ˜Zi−1, i.e., the inputs to the activation layer. This assertion is in turn checked using the protocol described in Section 3.1. The prover run-time for running the sum-check protocol in layer i is O(bni), the verifier’s runtime is O(log(bni)) and the prover/verifier exchange 5 log(bni) field elements. This completes the theoertical description of the SafetyNets specialized IP protocol. Lemma 3.1. The SafetyNets verifier rejects incorrect computations with probability greater than (1 −ϵ) where ϵ = 3b PL i=0 ni p is the soundness error. In practice, with p = 261 −1 the soundness error < 1 230 for practical network parameters and batch sizes. 3.3 Implementation The fact that SafetyNets operates only on elements in a finite field Fp during inference imposes a practical challenge. That is, how do we convert floating point inputs and weights from training into field elements, and how do we select the size of the field p? Let w′ i ∈Rni−1×ni and b′ i ∈Rni be the floating point parameters obtained from training for each layer i ∈[1, L]. We convert the weights to integers by multiplying with a constant β > 1 and rounding, i.e., wi = ⌊βw′ i⌉. We do the same for inputs with a scaling factor α, i.e., x = ⌊αx′⌉. Then, to ensure that all values in the network scale isotropically, we must set bi = ⌊α2i−1β(2i−1+1)b′ i⌉. While larger α and β values imply lower quantization errors, they also result in large values in the network, especially in the layers closer to the output. Similar empirical observations were made by the CryptoNets work [8]. To ensure accuracy the values in the network must lie in the range [−p−1 2 , p−1 2 ]; this influences the choice of the prime p. On the other hand, we note that large primes increase the verifier and prover run-time because of the higher cost of performing modular additions and multiplications. As in prior works [5, 18, 19], we restrict our choice of p to Mersenne primes since they afford efficient modular arithmetic implementations, and specifically to the primes p = 261 −1 and p = 2127 −1. For a given p, we explore and different values of α and β and use the validation dataset to the pick the ones that maximize accuracy while ensuring that the values in the network lie within [−p−1 2 , p−1 2 ]. 4 Empirical Evaluation In this section, we present empirical evidence to support our claim that SafetyNets enables low-cost verifiable execution of deep neural networks on untrusted clouds without compromising classification accuracy. 6 0 0.5 1 1.5 2 2.5 200 400 600 800 1000 1200 Error (%) Time (s) CNN-2-ReLU Train CNN-2-ReLU Test CNN-2-Quad Train CNN-2-Quad Test (a) MNIST 0 2 4 6 8 10 0 200 400 600 800 1000 1200 Error (%) Time (s) CNN-2-ReLU Train CNN-2-ReLU Test CNN-2-Quad Train CNN-2-Quad Test (b) MNIST-Back-Rand 10 20 30 40 50 60 70 80 10000 20000 30000 40000 Error (%) Time (s) FcNN-3-ReLU Train FcNN-3-ReLU Test FcNN-3-Quad Train FcNN-3-Quad Test (c) TIMIT Figure 2: Evolution of training and test error for the MNIST, MNIST-Back-Rand and TIMIT tasks. 4.1 Setup Datasets We evaluated SafetyNets on three classifications tasks. (1) Handwritten digit recognition on the MNIST dataset, using 50,000 training, 10,000 validation and 10,000 test images. (2) A more challenging version of digit recognition, MNIST-Back-Rand, an artificial dataset generated by inserting a random background into MNIST image [1]. The dataset has 10,000 training, 2,000 validation and 50,000 test images. ZCA whitening is applied to the raw dataset before training and testing [4]. (3) Speech recognition on the TIMIT dataset, split into a training set with 462 speakers, a validation set with 144 speakers and a testing set with 24 speakers. The raw audio samples are pre-processed as described by [3]. Each example includes its preceding and succeeding 7 frames, resulting in a 1845-dimensional input in total. During testing, all labels are mapped to 39 classes [11] for evaluation. Neural Networks For the two MNIST tasks, we used a convolutional neural network same as [23] with 2 convolutional layers with 5 × 5 filters, a stride of 1 and a mapcount of 16 and 32 for the first and second layer respectively. Each convolutional layer is followed by quadratic activations and 2 × 2 sum pooling with a stride of 2. The fully connected layer uses softmax activation. We refer to this network as CNN-2-Quad. For TIMIT, we use a four layer network described by [3] with 3 hidden, fully connected layers with 2000 neurons and quadratic activations. The output layer is fully connected with 183 output neurons and softmax activation. We refer to this network as FcNN-3-Quad. Since quadratic activations are not commonly used, we compare the performance of CNN-2-Quad and FcNN-3-Quad with baseline versions in which the quadratic activations are replaced by ReLUs. The baseline networks are CNN-2-ReLU and FcNN-3-ReLU. The hyper-parameters for training are selected based on the validation datasets. The Adam Optimizer is used for CNNs with learning rate 0.001, exponential decay and dropout probability 0.75. The AdaGrad optimizer is used for FcNNs with a learning rate of 0.01 and dropout probability 0.5. We found that norm gradient clipping was required for training the CNN-2-Quad and FcNN-3-Quad networks, since the gradient values for quadratic activations can become large. Our implementation of SafetyNets uses Thaler’s code for the IP protocol for matrix multiplication [18] and our own implementation of the IP for quadratic activations. We use an Intel Core i7-4600U CPU running at 2.10 GHz for benchmarking. 4.2 Classification Accuracy of SafetyNets SafetyNets places certain restrictions on the activation function (quadratic) and requires weights and inputs to be integers (in field Fp). We begin by analyzing how (and if) these restrictions impact classification accuracy/error. Figure 2 compares training and test error of CNN-2-Quad/FcNN-3-Quad versus CNN-2-ReLU/FcNN-3-ReLU. For all three tasks, the networks with quadratic activations are competitive with networks that use ReLU activations. Further, we observe that the networks with quadratic activations appear to converge faster during training, possibly because their gradients are larger despite gradient clipping. Next, we used the scaling and rounding strategy proposed in Section 3.3 to convert weights and inputs to integers. Table 1 shows the impact of scaling factors α and β on the classification error and maximum values observed in the network during inference for MNIST-Back-Rand. The validation 7 Table 1: Validation error and maximum value observed in the network for MNIST-Rand-Back and different values of scaling parameters, α and β. Shown in bold red font are values of α and β that are infeasible because the maximum value exceeds that allowed by prime p = 261 −1. α = 4 α = 8 α = 16 α = 32 α = 64 β Err Max Err Max Err Max Err Max Err Max 4 0.188 4.0 × 108 0.073 4.0 × 1010 0.042 5.5 × 1012 0.039 6.6 × 1014 0.04 8.8 × 1016 8 0.194 6.1 × 109 0.072 6.9 × 1011 0.039 8.3 × 1013 0.038 1.0 × 1016 0.037 1.3 × 1018 16 0.188 9.4 × 1010 0.072 1.1 × 1013 0.036 1.3 × 1015 0.037 1.6 × 1017 0.035 2.1 × 1019 32 0.186 1.5 × 1012 0.073 1.7 × 1014 0.038 2.1 × 1016 0.037 2.6 × 1018 0.036 3.5 × 1020 64 0.185 2.5 × 1013 0.073 2.8 × 1015 0.038 3.4 × 1017 0.037 4.2 × 1019 0.036 5.6 × 1021 error drops as α and β are increased. On the other hand, for p = 261 −1, the largest value allowed is 1.35 × 1018; this rules out α and β greater than 64, as shown in the table. For MNIST-Back-Rand, we pick α = β = 16 based on validation data, and obtain a test error of 4.67%. Following a similar methodology, we obtain a test error of 0.63% for MNIST (p = 261 −1) and 25.7% for TIMIT (p = 2127 −1). We note that SafetyNets does not support techniques such as Maxout [10] that have demonstrated lower error on MNIST (0.45%). Ba et al. [3] report an error of 18.5% for TIMIT using an ensemble of nine deep neural networks, which SafetyNets might be able to support by verifying each network individually and performing ensemble averaging at the client-side. 4.3 Verifier and Prover Run-times 0.1 1 10 100 1000 28 29 210 211 212 Running Time (s) Input Batch Size FcNN-Quad-3 Exe Time Additional Prover Time Verifier Time Figure 3: Run-time of verifier, prover and baseline execution time for the arithmetic circuit representation of FcNNQuad-3 versus input batch size. The relevant performance metrics for SafetyNets are (1) the client’s (or verifier’s) run-time, (2) the server’s runtime which includes baseline time to execute the neural network and overhead of generating proofs, and (3) the bandwidth required by the IP protocol. Ideally, these quantities should be small, and importantly, the client’s runtime should be smaller than the case in which it executes the network by itself. Figure 3 plots run-time data over input batch sizes ranging from 256 to 2048 for FcNNQuad-3. For FcNN-Quad-3, the client’s time for verifying proofs is 8× to 82× faster than the baseline in which it executes FcNN-Quad-3 itself, and decreases with batch size. The increase in the server’s execution time due to the overhead of generating proofs is only 5% over the baseline unverified execution of FcNN-Quad-3. The prover and verifier exchange less than 8 KBytes of data during the IP protocol for a batch size of 2048, which is negligible (less than 2%) compared to the bandwidth required to communicate inputs and outputs back and forth. In all settings, the soundness error ϵ, i.e., the chance that the verifier fails to detect incorrect computations by the server is less than 1 230 , a negligible value. We note SafetyNets has significantly lower bandwidth costs compared to an approach that separately verifies the execution of each layer using only the IP protocol for matrix multiplication. A closely related technique, CryptoNets [8], uses homomorphic encryption to provide privacy, but not integrity, for neural networks executing in the cloud. Since SafetyNets and CryptoNets target different security goals a direct comparison is not entirely meaningful. However, from the data presented in the CryptoNets paper, we note that the client’s run-time for MNIST using a CNN similar to ours and an input batch size b = 4096 is about 600 seconds, primarily because of the high cost of encryptions. For the same batch size, the client-side run-time of SafetyNets is less than 10 seconds. Recent work has also looked at how neural networks can be trained in the cloud without compromising the user’s training data [14], but the proposed techniques do not guarantee integrity. We expect that SafetyNets can be extended to address the verifiable neural network training problem as well. 5 Conclusion In this paper, we have presented SafetyNets, a new framework that allows a client to provably verify the correctness of deep neural network based inference running on an untrusted clouds. Building upon the rich literature on interactive proof systems for verifying general-purpose and specialized computations, we designed and implemented a specialized IP protocol tailored for a certain class 8 of deep neural networks, i.e., those that can be represented as arithmetic circuits. We showed that placing these restrictions did not impact the accuracy of the networks on real-world classification tasks like digit and speech recognition, while enabling a client to verifiably outsource inference to the cloud at low-cost. For our future work, we will apply SafetyNets to deeper networks and extend it to address both integrity and privacy. There are VC techniques [17] that guarantee both, but typically come at higher costs. Further, building on prior work on the use of IPs to build verifiable hardware [20], we intend to deploy the SafetyNets protocol in the design of a verifiable hardware accelerator for neural network inference. References [1] Variations on the MNIST digits. http://www.iro.umontreal.ca/~lisa/twiki/bin/ view.cgi/Public/MnistVariations. [2] S. Arora and B. Barak. Computational complexity: a modern approach. Cambridge University Press, 2009. [3] J. Ba and R. Caruana. Do deep nets really need to be deep? In Advances in Neural Information Processing Systems, pages 2654–2662, 2014. [4] A. Coates, A. Ng, and H. Lee. An analysis of single-layer networks in unsupervised feature learning. In International Conference on Artificial Intelligence and Statistics, pages 215–223, 2011. [5] G. Cormode, J. Thaler, and K. Yi. Verifying computations with streaming interactive proofs. Proceedings of the Very Large Database Endowment, pages 25–36, 2011. [6] A. Gautier, Q. N. Nguyen, and M. Hein. Globally optimal training of generalized polynomial neural networks with nonlinear spectral methods. In Advances in Neural Information Processing Systems, pages 1687–1695, 2016. [7] R. Gennaro, C. Gentry, and B. Parno. Non-interactive verifiable computing: Outsourcing computation to untrusted workers. Annual Cryptology Conference, pages 465–482, 2010. [8] R. Gilad-Bachrach, N. Dowlin, K. Laine, K. Lauter, M. Naehrig, and J. Wernsing. Cryptonets: Applying neural networks to encrypted data with high throughput and accuracy. In International Conference on Machine Learning, pages 201–210, 2016. [9] S. Goldwasser, Y. T. Kalai, and G. N. Rothblum. Delegating computation: interactive proofs for muggles. Symposium on Theory of Computing, pages 113–122, 2008. [10] I. J. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y. Bengio. Maxout networks. arXiv preprint arXiv:1302.4389, 2013. [11] K. Lee and H. Hon. Speaker-independent phone recognition using hidden markov models. IEEE Transactions on Acoustics, Speech, and Signal Processing, pages 1641–1648, 1989. [12] R. Livni, S. Shalev-Shwartz, and O. Shamir. On the computational efficiency of training neural networks. In Advances in Neural Information Processing Systems, pages 855–863, 2014. [13] C. Lund, L. Fortnow, H. Karloff, and N. Nisan. Algebraic methods for interactive proof systems. Journal of the ACM, pages 859–868, 1992. [14] P. Mohassel and Y. Zhang. Secureml: A system for scalable privacy-preserving machine learning. IACR Cryptology ePrint Archive, 2017. [15] F. Monrose, P. Wyckoff, and A. D. Rubin. Distributed execution with remote audit. In Network and Distributed System Security Symposium, pages 3–5, 1999. [16] N. Papernot, P. McDaniel, A. Sinha, and M. Wellman. Towards the science of security and privacy in machine learning. arXiv preprint arXiv:1611.03814, 2016. [17] B. Parno, J. Howell, C. Gentry, and M. Raykova. Pinocchio: Nearly practical verifiable computation. In Symposium on Security and Privacy, pages 238–252, 2013. 9 [18] J. Thaler. Time-optimal interactive proofs for circuit evaluation. In International Cryptology Conference, pages 71–89, 2013. [19] V. Vu, S. Setty, A. J. Blumberg, and M. Walfish. A hybrid architecture for interactive verifiable computation. In Symposium on Security and Privacy, pages 223–237, 2013. [20] R. S. Wahby, M. Howald, S. Garg, A. Shelat, and M. Walfish. Verifiable asics. In Symposium on Security and Privacy, pages 759–778, 2016. [21] M. Walfish and A. J. Blumberg. Verifying computations without reexecuting them. Communications of the ACM, pages 74–84, 2015. [22] M. D. Zeiler and R. Fergus. Stochastic pooling for regularization of deep convolutional neural networks. arXiv preprint arXiv:1301.3557, 2013. [23] Y. Zhang, P. Liang, and M. J. Wainwright. Convexified convolutional neural networks. arXiv preprint arXiv:1609.01000, 2016. Proof of Lemma 3.1 Lemma 3.1 The SafetyNets verifier rejects incorrect computations with probability greater than (1 −ϵ) where ϵ = 3b PL i=0 ni p is the soundness error. Proof. Verifying a multi-linear extension of the output sampled at a random point, instead of each value adds a soundness error of ϵ = bnL p . Each instance of the sum-check protocol adds to the soundness error [19]. The IP protocol for matrix multiplication adds a soundness error of ϵ = 2ni−1 p in Layer i [18]. Finally, the IP protocol for quadratic activations adds a soundness error of ϵ = 3bni p in Layer i [18]. Summing together we get a total soundness error of 2 PL−1 i=0 ni+3 PL−1 i=1 bni+bnL p . The final result is an upper bound on this value. Handling Bias Variables We assumed that the bias variables were zero, allowing us to write bmzi = wi.yi while it should be bmzi = wi.yi + bi1T . Let z′ i = wi.yi We seek to convert an assertion on ˜Zi(qi, ri) to an assertion on ˜Z′i. We can do so by noting that: ˜Zi(qi, ri) = X j∈{0,1}log(ni) ˜I(j, qi)( ˜Z′i(j, ri) + ˜Bi(j)) (8) which can be reduced to sum-check and thus yields an assertion on ˜Bi which the verifier checks locally and ˜Z′i, which is passed to the IP protocol for matrix multiplication. 10 | 2017 | 248 |
6,728 | Improved Graph Laplacian via Geometric Consistency Dominique C. Perrault-Joncas Google, Inc. dominiquep@google.com Marina Meil˘a Department of Statistics University of Washington mmp2@uw.edu James McQueen Amazon jmcq@amazon.com Abstract In all manifold learning algorithms and tasks setting the kernel bandwidth ϵ used construct the graph Laplacian is critical. We address this problem by choosing a quality criterion for the Laplacian, that measures its ability to preserve the geometry of the data. For this, we exploit the connection between manifold geometry, represented by the Riemannian metric, and the Laplace-Beltrami operator. Experiments show that this principled approach is effective and robust. 1 Introduction Manifold learning and manifold regularization are popular tools for dimensionality reduction and clustering [1, 2], as well as for semi-supervised learning [3, 4, 5, 6] and modeling with Gaussian Processes [7]. Whatever the task, a manifold learning method requires the user to provide an external parameter, called “bandwidth” or “scale” ϵ, that defines the size of the local neighborhood. More formally put, a common challenge in semi-supervised and unsupervised manifold learning lies in obtaining a “good” graph Laplacian estimator L. We focus on the practical problem of optimizing the parameters used to construct L and, in particular, ϵ. As we see empirically, since the Laplace-Beltrami operator on a manifold is intimately related to the geometry of the manifold, our estimator for ϵ has advantages even in methods that do not explicitly depend on L. In manifold learning, there has been sustained interest for determining the asymptotic properties of L [8, 9, 10, 11]. The most relevant is [12], which derives the optimal rate for ϵ w.r.t. the sample size N ϵ2 = C(M)N − 1 3+d/2 , (1) with d denoting the intrinsic dimension of the data manifold M. The problem is that C(M) is a constant that depends on the yet unknown data manifold, so it is rarely known in practice. Considerably fewer studies have focused on the parameters used to construct L in a finite sample problem. A common approach is to “tune” parameters by cross-validation in the semi-supervised context. However, in an unsurpervised problem like non-linear dimensionality reduction, there is no context in which to apply cross-validation. While several approaches [13, 14, 15, 16] may yield a usable parameter, they generally do not aim to improve L per se and offer no geometry-based justification for its selection. In this paper, we present a new, geometrically inspired approach to selecting the bandwidth parameter ϵ of L for a given data set. Under the data manifold hypothesis, the Laplace-Beltrami operator ∆M of the data manifold M contains all the intrinsic geometry of M. We set out to exploit this fact by comparing the geometry induced by the graph Laplacian L with the local data geometry and choose the value of ϵ for which these two are closest. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 2 Background: Heat Kernel, Laplacian and Geometry Our paper builds on two previous sets of results: 1) the construction of L that is consistent for ∆M when the sample size N →∞under the data manifold hypothesis (see [17]); and 2) the relationship between ∆M and the Riemannian metric g on a manifold, as well as the estimation of g (see [18]). Construction of the graph Laplacian. Several methods methods to construct L have been suggested (see [10, 11]). The one we present, due to [17], guarantees that, if the data are sampled from a manifold M, L converges to ∆M: Given a set of points D = {x1, . . . , xN} in high-dimensional Euclidean space Rr, construct a weighted graph G = (D, W) over them, with W = [wij]ij=1:N. The weight wij between xi and xj is the heat kernel [1] Wij ≡wϵ(xi, xj) = exp ||xi −xj||2 2 /ϵ2 , (2) with ϵ a bandwidth parameter fixed by the user. Next, construct L = [Lij]ij of G by ti= X j Wij , W ′ ij = Wij titj , t′ i = X j W ′ ij , and Lij = X j W ′ ij t′ j . (3) Equation (3) represents the discrete versions of the renormalized Laplacian construction from [17]. Note that ti, t′ i, W ′, L all depend on the bandwidth ϵ via the heat kernel. Estimation of the Riemannian metric. We follow [18] in this step. A Riemannian manifold (M, g) is a smooth manifold M endowed with a Riemannian metric g; the metric g at point p ∈M is a scalar product over the vectors in TpM, the tangent subspace of M at p. In any coordinate representation of M, gp ≡G(p) - the Riemannian metric at p - represents a positive definite matrix1 of dimension d equal to the intrinsic dimension of M. We say that the metric g encodes the geometry of M because g determines the volume element for any integration over M by p det G(x)dx, and the line element for computing distances along a curve x(t) ⊂M, by q dx dt TG(x) dx dt . If we assume that the data we observe (in Rr) lies on a manifold, then under rotation of the original coordinates, the metric G(p) is the unit matrix of dimension d padded with zeros up to dimension r. When the data is mapped to another coordinate system - for instance by a manifold learning algorithm that performs non-linear dimension reduction - the matrix G(p) changes with the coordinates to reflect the distortion induced by the mapping (see [18] for more details). Proposition 2.1 Let x denote local coordinate functions of a smooth Riemannian manifold (M, g) of dimension d and ∆M the Laplace-Beltrami operator defined on M. Then, H(p) = (G(p))−1 the (matrix) inverse of the Riemannian metric at point p, is given by (H(p))kj = 1 2∆M xk −xk(p) xj −xj(p) |x=x(p) with i, j = 1, . . . , d. (4) Note that the inverse matrices H(p), p ∈M, being symmetric and positive definite, also defines a metric h called the cometric on M. Proposition 2.1 says that the cometric is given by applying the ∆M operator to the function φkj = xk −xk(p) xj −xj(p) , where xk, xj denote coordinates k, j seen as functions on M. A converse theorem [19] states that g (or h) uniquely determines ∆M. Proposition 2.1 provides a way to estimate h and g from data. Algorithm 1, adapted from [18], implements (4). 3 A Quality Measure for L Our approach can be simply stated: the “best” value for ϵ is the value for which the corresponding L of (3) best captures the original data geometry. For this we must: (1) estimate the geometry g or h 1This paper contains mathematical objects like M, g and ∆, and computable objects like a data point x, and the graph Laplacian L. The Riemannian metric at a point belongs to both categories, so it will sometimes be denoted gp, gxi and sometimes G(p), G(xi), depending on whether we refer to its mathematical or algorithmic aspects (or, more formally, whether the expression is coordinate free or in a given set of coordinates). This also holds for the cometric h, defined in Proposition 2.1. 2 Algorithm 1 Riemannian Metric(X, i, L, pow ∈{−1, 1}) Input: N × d design matrix X, i index in data set, Laplacian L, binary variable pow for k = 1 →d, l = 1 →d do Hk,l ←PN j=1 Lij (Xjk −Xik)(Xjl −Xil) end for return Hpow (i.e. H if pow = 1 and H−1 if pow = −1) from L (this is achieved by RiemannianMetric()); (2) find an independent way to estimate the data geometry, locally (this is done in Sections 3.2 and 3.1); (3) define a measure of agreement between the two (Section 3.3). 3.1 The Geometric Consistency Idea and gtarget There is a natural way to estimate the geometry of the data without the use of L. We consider the canonical embedding of the data in the ambient space Rr for which the geometry is trivially known. This provides a target gtarget; we tune the scale of the Laplacian so that the g calculated from Proposition 2.1 matches this target. Hence, we choose ϵ to maximize consistency with the geometry of the data. We denote the inherited metric by gRr|T M, which stands for the restriction of the natural metric of the ambient space Rr to the tangent bundle TM of the manifold M. We tune the parameters of the graph Laplacian L so as to enforce (a coordinate expression of) the identity gp(ϵ) = gtarget, with gtarget = gRr|TpM ∀p ∈M . (5) In the above, the l.h.s. will be the metric implied from the Laplacian via Proposition 2.1, and the r.h.s is the metric induced by Rr. Mathematically speaking, (5) is necessary and sufficient for finding the “correct” Laplacian. The next section describes how to obtain the r.h.s. from a finite sample D. Then, to optimize the graph Laplacian we estimate g from L as prescribed by Proposition 2.1 and compare with gRr|TpMnumerically. We call this approach geometric consistency (GC). The GC method is not limited to the choice of ϵ, but can be applied to any other parameter required for the Laplacian. 3.2 Robust Estimation of gtarget for a finite sample First idea: estimate tangent subspace We use the simple fact, implied by Section 3.1, that projecting the data onto TpM preserves the metric locally around p. Hence, Gtarget = Id in the projected data. Moreover, projecting on any direction in TpM does not change the metric in that direction. This remark allows us to work with small matrices (of at most d × d instead of r × r) and to avoid the problem of estimating d, the intrinsic dimension of the data manifold. Specifically, we evaluate the tangent subspace around each sampled point xi using weighted (local) Principal Component Analysis (wPCA) and then express gRr|TpM directly in the resulting lowdimensional subspace as the unit matrix Id. The tangent subspace also serves to define a local coordinate chart, which is passed as input to Algorithm 1 which computes H(xi), G(xi) in these coordinates. For computing TxiM, by wPCA, we choose weights defined by the heat kernel (2), centered around xi, with same bandwidth ϵ as for computing L. This approach is similar to samplewise weighted PCA of [20], with one important requirements: the weights must decay rapidly away from xi so that only points close xi are used to estimate TxiM. This is satisfied by the weighted recentered design matrix Z, where Zi:, row i of Z, is given by: Zi: = Wij(xi −¯x)/ N X j′=1 Wij′ , with ¯x = N X j=1 Wijxj / N X j′=1 Wij′ . (6) [21] proves that the wPCA using the heat kernel, and equating the PCA and heat kernel bandwidths as we do, yields a consistent estimator of TxiM. This is implemented in Algorithm 2. In summary, to instantiate equation (5) at point xi ∈D, one must (i) construct row i of the graph Laplacian by (3); (ii) perform Algorithm 2 to obtain Y ; (iii) apply Algorithm 1 to Y to obtain G(xi) ∈Rd×d; (iv) this matrix is then compared with Id, which represents the r.h.s. of (5). 3 Algorithm 2 Tangent Subspace Projection(X, w, d′) Input: N × r design matrix X, weight vector w, working dimension d′ Compute Z using (6) [V, Λ] ←eig(ZT Z, d′) (i.e.d′-SVD of Z) Center X around ¯x from (6) Y ←XV:,1:d′ (Project X on d′ principal subspace) return Y Second idea: project onto tangent directions We now take this approach a few steps further in terms of improving its robustness with minimal sacrifice to its theoretical grounding. In particular, we perform both Algorithm 2 and Algorithm 1 in d′ dimensions, with d′ < d (and typically d′ = 1). This makes the algorithm faster, and make the computed metrics G(xi), H(xi) both more stable numerically and more robust to possible noise in the data2. Proposition 3.1 shows that the resulting method remains theoretically sound. Proposition 3.1 Let X, Y, Z, V, W:i, H, and d ≥1 represent the quantities in Algorithms 1 and 2; assume that the columns of V are sorted in decreasing order of the singular values, and that the rows and columns of H are sorted according to the same order. Now denote by Y ′, V ′, H′ the quantitities computed by Algorithms 1 and 2 for the same X, W:i but with d ←d′ = 1. Then, V ′ = V:1 ∈Rr×1 Y ′ = Y:1 ∈RN×1 H′ = H11 ∈R. (7) The proof of this result is straightforward and omitted for brevity. It is easy to see that Proposition 3.1 generalizes immediately to any 1 ≤d′ < d. In other words, by using d′ < d, we will be projecting the data on a proper subspace of TxiM - namely, the subspace of least curvature [22]. The cometric H′ of this projection is the principal submatrix of order d′ of H, i.e. H11 if d′ = 1. Third idea: use h instead of g Relation (5) is trivially satisfied by the cometrics of g and gtarget (the latter being Htarget = Id). Hence, inverting H in Algorithm 1 is not necessary, and we will use the cometric h in place of g by default. This saves time and increases numerical stability. 3.3 Measuring the Distortion For a finite sample, we cannot expect (5) to hold exactly, and so we need to define a distortion between the two metrics to evaluate how well they agree. We propose the distortion D = 1 N N X i=1 ||H(xi) −Id|| (8) where ||A|| = λmax(A) is the matrix spectral norm. Thus D measures the average distance of H from the unit matrix over the data set. For a “good” Laplacian, the distortion D should be minimal: ˆϵ = argminϵD . (9) The choice of norm in (8) is not arbitrary. Riemannian metrics are order 2 tensors or TM hence the expression of D is the discrete version of Dg0 (g1, g2) = R M ||g1 −g2||g0 dVg0, with ||g||g0 p = supu,v∈TpM\{0} <u,v>gp <u,v>g0p , representing the tensor norm of gp on TpM with respect to the Riemannian metric g0p. Now, (8) follows when g0, g1, g2 are replaced by I, I and H, respectively. With (9), we have established a principled criterion for selecting the parameter(s) of the graph Laplacian, by minimizing the distortion between the true geometry and the geometry derived from Proposition 2.1. Practically, we have in (9) a 1D optimization problem with no derivatives, and we can use standard algorithms to find its minimum. ˆϵ. 4 Related Work We have already mentioned the asymptotic result (1) of [12]. Other work in this area [8, 10, 11, 23] provides the rates of change for ϵ with respect to N to guarantee convergence. These studies are 2We know from matrix perturbation theory that noise affects the d-th principal vector increasingly with d. 4 Algorithm 3 Compute Distortion(X, ϵ, d′) Input: N × r design matrix X, ϵ, working dimension d′, index set I ⊆{1, . . . , N} Compute the heat kernel W by (2) for each pair of points in X Compute the graph Laplacian L from W by (3) D ←0 for i ∈I do Y ←TangentSubspaceProjection(X, Wi,:, d′) H ←RiemannianMetric(Y, L, pow = 1) D ←D + ||H −Id′||2/|I| end for return D relevant; but they depend on manifold parameters that are usually not known. Recently, an extremely interesting Laplacian "continuous nearest neighbor” consistent construction method was proposed by [24], from a topological perspective. However, this method depends on a smoothness parameter too, and this is estimated by constructing the persistence diagram of the data. [25] propose a new, statistical approach for estimating ϵ, which is very promising, but currently can be applied only to un-normalized Laplacian operators. This approach also depends on unknown pparameters a, b, which are set heuristically. (By contrast, our method depends only weakly on d′, which can be set to 1.) Among practical methods, the most interesting is that of [14], which estimates k, the number of nearest neighbors to use in the construction of the graph Laplacian. This method optimizes k depending on the embedding algorithm used. By contrast, the selection algorithm we propose estimates an intrinsic quantity, a scale ϵ that depends exclusively on the data. Moreover, it is not known when minimizing reconstruction error for a particular method can be optimal, since [26] even in the limit of infinite data, the most embeddings will distort the original geometry. In semi-supervised learning (SSL), one uses Cross-Validation (CV) [5]. Finally, we mention the algorithm proposed in [27] (CLMR). Its goal is to obtain an estimate of the intrinsic dimension of the data; however, a by-product of the algorithm is a range of scales where the tangent space at a data point is well aligned with the principal subspace obtained by a local singular value decomposition. As these are scales at which the manifold looks locally linear, one can reasonably expect that they are also the correct scales at which to approximate differential operators, such as ∆M. Given this, we implement the method and compare it to our own results. From the computational point of view, all methods described above explore exhaustively a range of ϵ values. GC and CLMR only require local PCA at a subset of the data points (with d′ < d components for GC, d′ >> d for CLMR); whereas CV, and [14] require respectively running a SSL algorithm, or an embedding algorithm, for each ϵ. In relation to these, GC is by far the most efficient computationally. 3 5 Experimental Results Synthethic Data. We experimented with estimating the bandwidth ˆϵ on data sampled from two known manifolds, the two-dimensional hourglass and dome manifolds of Figure 1. We sampled points uniformly from these, adding 10 “noise” dimensions and Gaussian noise N(0, σ2) resulting in r = 13 dimensions. The range of ϵ values was delimited by ϵmin and ϵmax. We set ϵmax to the average of ||xi −xj||2 over all point pairs and ϵmin to the limit in which the heat kernel W becomes approximately equal to the unit matrix; this is tested by maxj(P i Wij) −1 < γ4 for γ ≈10−4. This range spans about two orders of magnitude in the data we considered, and was searched by a logarithmic grid with approximately 20 points. We saved computatation time by evaluating all pointwise quantities ( ˆD, local SVD) on a random sample of size N ′ = 200 of each data set. We replicated each experiment on 10 independent samples. 3In addition, these operations being local, they can be further parallelized or accelerated in the usual ways. 4Guaranteeing that all eigenvalues of W are less than γ away from 1. 5 σ = 0.001 σ = 0.01 σ = 0.1 Figure 1: Estimates ˆϵ (mean and standard deviation over 10 runs) on the dome and hourglass data, vs sample sizes N for various noise levels σ; d′ = 2 is in black and d′ = 1 in blue. In the background, we also show as gray rectangles, for each N, σ the intervals in the ϵ range where the eigengaps of local SVD indicate the true dimension, and, as unfillled rectangles, the estimates proposed by CLMR [27] for these intervals. The variance of ˆϵ observed is due to randomness in the subsample N ′ used to evaluate the distortion. Our ˆϵ always falls in the true interval (when this exists), and have are less variable and more accurate than the CLMR intervals. Reconstruction of manifold w.r.t. gold standard These results (relegated to the Supplement) are uniformly very positive, and show that GC achieves its most explicit goal, even in the presence of noise. In the remainder, we illustrate the versatility of our method on on other tasks. Effects of d′, noise and N. The estimated ϵ are presented in Figure 1. Let ˆϵd′ denote the estimate obtained for a given d′ ≤d. We note that when d1 < d2, typically ˆϵd1 > ˆϵd2, but the values are of the same order (a ratio of about 2 in the synthetic experiments). The explanation is that, chosing d′ < d directions in the tangent subspace will select a subspace aligned with the “least curvature” directions of the manifold, if any exist, or with the “least noise” in the random sample. In these directions, the data will tolerate more smoothing, which results in larger ˆϵ. The optimal ϵ decreases with N and grows with the noise levels, reflecting the balance it must find between variance and bias. Note that for the hourglass data, the highest noise level of σ = 0.1 is an extreme case, where the original manifold is almost drowned in the 13-dimensional noise. Hence, ϵ is not only commensurately larger, but also stable between the two dimensions and runs. This reflects the fact that ϵ captures the noise dimension, and its values are indeed just below the noise amplitude of 0.1 √ 13. The dome data set exhibits the same properties discussed previously, showing that our method is effective even for manifolds with border. Semi-supervised Learning (SSL) with Real Data. In this set of experiments, the task is classification on the benchmark SSL data sets proposed by [28]. This was done by least-square classification, similarly to [5], after choosing the optimal bandwidth by one of the methods below. TE Minimize Test Error, i.e. “cheat” in an attempt to get an estimate of the “ground truth”. CV Cross-validation We split the training set (consisting of 100 points in all data sets) into two equal groups;5 we minimize the highly non-smooth CV classification error by simulated annealing. Rec Minimize the reconstruction error We cannot use the method of [14] directly, as it requires an embedding, so we minimize reconstruction error based on the heat kernel weights w.r.t. ϵ (this is reminiscent of LLE [29]): R(ϵ) = Pn i=1 xi −P j̸=i Wij P l̸=i Wij xj 2 Our method is denoted GC for Geometric Consistency; we evaluate straighforward GC, that uses the cometric H and a variant that includes the matrix inversion in Algorithm 1 denoted GC−1. 5In other words, we do 2-fold CV. We also tried 20-fold and 5-fold CV, with no significant difference. 6 TE CV Rec GC−1 GC Digit1 0.67±0.08 0.80±0.45 0.64 0.74 0.74 [0.57, 0.78] [0.47, 1.99] USPS 1.24±0.15 1.25±0.86 1.68 2.42 1.10 [1.04, 1.59] [0.50, 3.20] COIL 49.79±6.61 69.65±31.16 78.37 216.95 116.38 [42.82, 60.36] [50.55, 148.96] BCI 3.4±3.1 3.2±2.5 3.31 3.19 5.61 [1.2, 8.9] [1.2, 8.2] g241c 8.3± 2.5 8.8±3.3 3.79 7.37 7.38 [6.3, 14.6] [4.4, 14.9] g241d 5.7± 0.24 6.4±1.15 3.77 7.35 7.36 [5.6, 6.3] [4.3, 8.2] Table 1: Estimates of ϵ by methods presented for the six SSL data sets used, as well as TE. For TE and CV, which depend on the training/test splits, we report the average, its standard error, and range (in brackets below) over the 12 splits. CV Rec GC−1 GC Digit1 3.32 2.16 2.11 2.11 USPS 5.18 4.83 12.00 3.89 COIL 7.02 8.03 16.31 8.81 BCI 49.22 49.17 50.25 48.67 g241c 13.31 23.93 12.77 12.77 g241d 8.67 18.39 8.76 8.76 d′=1 d′=2 d′=3 Digit1 GC−1 0.743 0.293 0.305 GC 0.744 0.767 0.781 USPS GC−1 2.42 2.31 3.88 GC 1.10 1.16 1.18 COIL GC−1 116 87.4 128 GC 187 179 187 BCI GC−1 3.32 3.48 3.65 GC 5.34 5.34 5.34 g241c GC−1 7.38 7.38 7.38 GC 7.38 9.83 9.37 g241d GC−1 7.35 7.35 7.35 GC 7.35 9.33 9.78 Table 2: Left panel: Percent classification error for the six SSL data sets using the four ϵ estimation methods described. Right panel: ϵ obtained for the six datasets using various d′ values with GC and GC−1 . ˆϵ was computed for d=5 for Digit1, as it is known to have an intrinsic dimension of 5, and found to be 1.162 with GC and 0.797 with GC−1 . Across all methods and data sets, the estimate of ϵ closer to the values determined by TE lead to better classification error, see Table 2. For five of the six data sets6, GC-based methods outperformed CV, and were 2 to 6 times faster to compute. This is in spite of the fact that GC does not use label information, and is not aimed at reducing the classification error, while CV does. Further, the CV estimates of ϵ are highly variable, suggesting that CV tends to overfit to the training data. Effect of Dimension d′. Table 2 shows how changing the dimension d′ alters our estimate of ϵ. We see that the ˆϵ for different d′ values are close, even though we search over a range of two orders of magnitude. Even for g241c and g241d, which were constructed so as to not satisfy the manifold hypothesis, our method does reasonably well at estimating ϵ. That is, our method finds the ˆϵ for which the Laplacian encodes the geometry of the data set irrespective of whether or not that geometry is lower-dimensional. Overall, we have found that using d′ = 1 is most stable, and that adding more dimensions introduces more numerical problems: it becomes more difficult to optimize the distortion as in (9), as the minimum becomes shallower. In our experience, this is due to the increase in variance associated with adding more dimensions. Using one dimension probably works well because the wPCA selects the dimension that explains the most variance and hence is the closest to linear over the scale considered. Subsequently, the wPCA moves to incrementally “shorter” or less linear dimensions, leading to more variance in the estimate of the tangent subspace (more evidence for this in the Supplement). 6In the COIL data set, despite their variability, CV estimates still outperformed the GC-based methods. This is the only data set constructed from a collection of manifolds - in this case, 24 one-dimensional image rotations. As such, one would expect that there would be more than one natural length scale. 7 Figure 2: Bandwidth Estimation For Galaxy Spectra Data. Left: GC results for d′ = 1 (d′ = 2, 3 are also shown); we chose radius = 66 the minimum of D for d = 1′. Right: A log-log plot of radius versus average number of neighbors within this radius. The region in blue includes radius = 66 and indicates dimension d = 3. In the code ϵ = radius/3, hence we use ϵ = 22. Embedding spectra of galaxies (Details of this experiment are in the Supplement.) For these data in r = 3750 dimensions, with N = 650, 000, the goal was to obtain a smooth, low dimensional embedding. The intrinsic dimension d is unknown, CV cannot be applied, and it is impractical to construct multiple embeddings for large N. Hence, we used the GC method with d′ = 1, 2, 3 and N ′ = |I| = 200. We compare the ˆϵ’s obtained with a heuristic based on the scaling of the neighborhood sizes [30] with the radius, which relates ϵ, d and N (Figure 2). Remarkably, both methods yield the same ϵ, see the Supplement for evidence that the resulting embedding is smooth. 6 Discussion In manifold learning, supervised and unsupervised, estimating the graph versions of Laplacian-type operators is a fundamental task. We have provided a principled method for selecting the parameters of such operators, and have applied it to the selection of the bandwidth/scale parameter ϵ. Moreover, our method can be used to optimize any other parameters used in the graph Laplacian; for example, k in the k-nearest neighbors graph, or - more interestingly - the renormalization parameter λ [17] of the kernel. The latter is theoretically equal to 1, but it is possible that it may differ from 1 in the finite N regime. In general, for finite N, a small departure from the asymptotic prescriptions may be beneficial - and a data-driven method such as ours can deliver this benefit. By imposing geometric self-consistency, our method estimates an intrinsic quantity of the data. GC is also fully unsupervised, aiming to optimize a (lossy) representation of the data, rather than a particular task. This is an efficiency if the data is used in an unsupervised mode, or if it is used in many different subsequent tasks. Of course, one cannot expect an unsupervised method to always be superior to a task-dependent one. Yet, GC has shown to be competitive and sometimes superior in experiments with the widely accepted CV. Besides the experimental validation, there are other reasons to consider an unsupervised method like GC in a supervised task: (1) the labeled data is scarce, so ˆϵ will have high variance, (2) the CV cost function is highly non-smooth while D is much smoother, and (3) when there is more than one parameter to optimize, difficulties (1) and (2) become much more severe. Our algorithm requires minimal prior knowledge. In particular, it does not require exact knowledge of the intrinsic dimension d, since it can work satisfactorily with d′ = 1 in many cases. An interesting problem that is outside the scope of our paper is the question of whether ϵ needs to vary over M. This is a question/challenge facing not just GC, but any method for setting the scale, unsupervised or supervised. Asymptotically, a uniform ϵ is sufficient. Practically, however, we believe that allowing ϵ to vary may be beneficial. In this respect, the GC method, which simply evaluates the overall result, can be seamlessly adapted to work with any user-selected spatially-variable ϵ, by appropriately changing (2) or sub-sampling D when calculating D. 8 References [1] M. Belkin and P. Niyogi. Laplacian eigenmaps for dimensionality reduction and data representation. Neural Computation, 15:1373–1396, 2002. [2] U. von Luxburg, M. Belkin, and O. Bousquet. Consistency of spectral clustering. Annals of Statistics, 36(2):555–585, 2008. [3] M. Belkin, P. Niyogi, and V. Sindhwani. Manifold regularization: A geometric framework for learning from labeled and unlabeled examples. Journal of Machine Learning Research, 7:2399–2434, December 2006. [4] Xiaojin Zhu, John Lafferty, and Zoubin Ghahramani. Semi-supervised learning: From gaussian fields to gaussian processes. Technical Report, 2003. [5] X. Zhou and M. Belkin. Semi-supervised learning by higher order regularization. AISTAT, 2011. [6] A. J. Smola and I.R. Kondor. Kernels and regularization on graphs. In Proceedings of the Annual Conference on Computational Learning Theory, 2003. [7] V. Sindhwani, W. Chu, and S. S. Keerthi. Semi-supervised gaussian process classifiers. In Proceedings of the International Joint Conferences on Artificial Intelligence, 2007. [8] E. Giné and V. Koltchinskii. Empirical Graph Laplacian Approximation of Laplace-Beltrami Operators: Large Sample results. High Dimensional Probability, pages 238–259, 2006. [9] M. Belkin and P. Niyogi. Convergence of laplacians eigenmaps. NIPS, 19:129–136, 2007. [10] M. Hein, J.-Y. Audibert, and U. von Luxburg. Graph Laplacians and their Convergence on Random Neighborhood Graphs. Journal of Machine Learning Research, 8:1325–1368, 2007. [11] D. Ting, L Huang, and M. I. Jordan. An analysis of the convergence of graph laplacians. In ICML, pages 1079–1086, 2010. [12] A. Singer. From graph to manifold laplacian: the convergence rate. Applied and Computational Harmonic Analysis, 21(1):128–134, 2006. [13] John A. Lee and Michel Verleysen. Nonlinear Dimensionality Reduction. Springer Publishing Company, Incorporated, 1st edition, 2007. [14] Lisha Chen and Andreas Buja. Local Multidimensional Scaling for nonlinear dimension reduction, graph drawing and proximity analysis. Journal of the American Statistical Association, 104(485):209–219, March 2009. [15] "E. Levina and P. Bickel". Maximum likelihood estimation of intrinsic dimension. "Advances in NIPS", 17, 2005. "Vancouver Canada". [16] "K. Carter, A. Hero, and R Raich". "de-biasing for intrinsic dimension estimation". "IEEE/SP 14th Workshop on Statistical Signal Processing", pages 601–605, 8 2007. [17] R. R. Coifman and S. Lafon. Diffusion maps. Applied and Computational Harmonic Analysis, 21(1):6–30, 2006. [18] Anonymous. Metric learning and manifolds: Preserving the intrinsic geometry. Submitted, 7, December 2012. [19] S. Rosenberg. The Laplacian on a Riemannian Manifold. Cambridge University Press, 1997. [20] H. Yue, M. Tomoyasu, and N. Yamanashi. Weighted principal component analysis and its applications to improve fdc performance. In 43rd IEEE Conference on Decision and Control, pages 4262–4267, 2004. [21] Anil Aswani, Peter Bickel, and Claire Tomlin. Regression on manifolds: Estimation of the exterior derivative. Annals of Statistics, 39(1):48–81, 2011. 9 [22] J. M. Lee. Riemannian Manifolds: An Introduction to Curvature, volume M. Springer, New York, 1997. [23] Xu Wang. Spectral convergence rate of graph laplacian. ArXiv, 2015. convergence rate of Laplacian when both n and h vary simultaneously. [24] Tyrus Berry and Timothy Sauer. Consistent manifold representation for topological data analysis. ArXiv, June 2016. [25] Frederic Chazal, Ilaria Giulini, and Bertrand Michel. Data driven estimation of laplace-beltrami operator. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 3963–3971. Curran Associates, Inc., 2016. [26] Y. Goldberg, A. Zakai, D. Kushnir, and Y. Ritov. Manifold Learning: The Price of Normalization. Journal of Machine Learning Research, 9:1909–1939, AUG 2008. [27] Guangliang Chen, Anna Little, Mauro Maggioni, and Lorenzo Rosasco. Some recent advances in multiscale geometric analysis of point clouds. In J. Cohen and A. I. Zayed, editors, Wavelets and multiscale analysis: Theory and Applications, Applied and Numerical Harmonic Analysis, chapter 10, pages 199–225. Springer, 2011. [28] O. Chapelle, B. Schölkopf, A. Zien, and editors. Semi-Supervised Learning. the MIT Press, 2006. [29] L. Saul and S. Roweis. Think globally, fit locally: unsupervised learning of low dimensional manifold. Journal of Machine Learning Research, 4:119–155, 2003. [30] Sanjoy Dasgupta and Yoav Freund. Random projection trees and low dimensional manifolds. In Proceedings of the Fortieth Annual ACM Symposium on Theory of Computing, STOC ’08, pages 537–546, New York, NY, USA, 2008. ACM. 10 | 2017 | 249 |
6,729 | Breaking the Nonsmooth Barrier: A Scalable Parallel Method for Composite Optimization Fabian Pedregosa INRIA/ENS∗ Paris, France R´emi Leblond INRIA/ENS∗ Paris, France Simon Lacoste-Julien MILA and DIRO Universit´e de Montr´eal, Canada Abstract Due to their simplicity and excellent performance, parallel asynchronous variants of stochastic gradient descent have become popular methods to solve a wide range of large-scale optimization problems on multi-core architectures. Yet, despite their practical success, support for nonsmooth objectives is still lacking, making them unsuitable for many problems of interest in machine learning, such as the Lasso, group Lasso or empirical risk minimization with convex constraints. In this work, we propose and analyze PROXASAGA, a fully asynchronous sparse method inspired by SAGA, a variance reduced incremental gradient algorithm. The proposed method is easy to implement and significantly outperforms the state of the art on several nonsmooth, large-scale problems. We prove that our method achieves a theoretical linear speedup with respect to the sequential version under assumptions on the sparsity of gradients and block-separability of the proximal term. Empirical benchmarks on a multi-core architecture illustrate practical speedups of up to 12x on a 20-core machine. 1 Introduction The widespread availability of multi-core computers motivates the development of parallel methods adapted for these architectures. One of the most popular approaches is HOGWILD (Niu et al., 2011), an asynchronous variant of stochastic gradient descent (SGD). In this algorithm, multiple threads run the update rule of SGD asynchronously in parallel. As SGD, it only requires visiting a small batch of random examples per iteration, which makes it ideally suited for large scale machine learning problems. Due to its simplicity and excellent performance, this parallelization approach has recently been extended to other variants of SGD with better convergence properties, such as SVRG (Johnson & Zhang, 2013) and SAGA (Defazio et al., 2014). Despite their practical success, existing parallel asynchronous variants of SGD are limited to smooth objectives, making them inapplicable to many problems in machine learning and signal processing. In this work, we develop a sparse variant of the SAGA algorithm and consider its parallel asynchronous variants for general composite optimization problems of the form: arg min x∈Rp f(x) + h(x) , with f(x) := 1 n n i=1 fi(x) , (OPT) where each fi is convex with L-Lipschitz gradient, the average function f is µ-strongly convex and h is convex but potentially nonsmooth. We further assume that h is “simple” in the sense that we have access to its proximal operator, and that it is block-separable, that is, it can be decomposed block coordinate-wise as h(x) = B∈BhB([x]B), where B is a partition of the coefficients into ∗DI ´Ecole normale sup´erieure, CNRS, PSL Research University 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. subsets which will call blocks and hB only depends on coordinates in block B. Note that there is no loss of generality in this last assumption as a unique block covering all coordinates is a valid partition, though in this case, our sparse variant of the SAGA algorithm reduces to the original SAGA algorithm and no gain from sparsity is obtained. This template models a broad range of problems arising in machine learning and signal processing: the finite-sum structure of f includes the least squares or logistic loss functions; the proximal term h includes penalties such as the 1 or group lasso penalty. Furthermore, this term can be extendedvalued, thus allowing for convex constraints through the indicator function. Contributions. This work presents two main contributions. First, in §2 we describe Sparse Proximal SAGA, a novel variant of the SAGA algorithm which features a reduced cost per iteration in the presence of sparse gradients and a block-separable penalty. Like other variance reduced methods, it enjoys a linear convergence rate under strong convexity. Second, in §3 we present PROXASAGA, a lock-free asynchronous parallel version of the aforementioned algorithm that does not require consistent reads. Our main results states that PROXASAGA obtains (under assumptions) a theoretical linear speedup with respect to its sequential version. Empirical benchmarks reported in §4 show that this method dramatically outperforms state-of-the-art alternatives on large sparse datasets, while the empirical speedup analysis illustrates the practical gains as well as its limitations. 1.1 Related work Asynchronous coordinate-descent. For composite objective functions of the form (OPT), most of the existing literature on asynchronous optimization has focused on variants of coordinate descent. Liu & Wright (2015) proposed an asynchronous variant of (proximal) coordinate descent and proved a near-linear speedup in the number of cores used, given a suitable step size. This approach has been recently extended to general block-coordinate schemes by Peng et al. (2016), to greedy coordinatedescent schemes by You et al. (2016) and to non-convex problems by Davis et al. (2016). However, as illustrated by our experiments, in the large sample regime coordinate descent compares poorly against incremental gradient methods like SAGA. Variance reduced incremental gradient and their asynchronous variants. Initially proposed in the context of smooth optimization by Le Roux et al. (2012), variance reduced incremental gradient methods have since been extended to minimize composite problems of the form (OPT) (see table below). Smooth variants of these methods have also recently been extended to the asynchronous setting, where multiple threads run the update rule asynchronously and in parallel. Interestingly, none of these methods achieve both simultaneously, i.e. asynchronous optimization of composite problems. Since variance reduced incremental gradient methods have shown state of the art performance in both settings, this generalization is of key practical interest. Objective Sequential Algorithm Asynchronous Algorithm SVRG (Johnson & Zhang, 2013) SVRG (Reddi et al., 2015) Smooth SDCA (Shalev-Shwartz & Zhang, 2013) PASSCODE (Hsieh et al., 2015, SDCA variant) SAGA (Defazio et al., 2014) ASAGA (Leblond et al., 2017, SAGA variant) PROXSDCA (Shalev-Shwartz et al., 2012) Composite SAGA (Defazio et al., 2014) This work: PROXASAGA ProxSVRG (Xiao & Zhang, 2014) On the difficulty of a composite extension. Two key issues explain the paucity in the development of asynchronous incremental gradient methods for composite optimization. The first issue is related to the design of such algorithms. Asynchronous variants of SGD are most competitive when the updates are sparse and have a small overlap, that is, when each update modifies a small and different subset of the coefficients. This is typically achieved by updating only coefficients for which the partial gradient at a given iteration is nonzero,2 but existing schemes such as the lagged updates technique (Schmidt et al., 2016) are not applicable in the asynchronous setting. The second 2Although some regularizers are sparsity inducing, large scale datasets are often extremely sparse and leveraging this property is crucial for the efficiency of the method. 2 difficulty is related to the analysis of such algorithms. All convergence proofs crucially use the Lipschitz condition on the gradient to bound the noise terms derived from asynchrony. However, in the composite case, the gradient mapping term (Beck & Teboulle, 2009), which replaces the gradient in proximal-gradient methods, does not have a bounded Lipschitz constant. Hence, the traditional proof technique breaks down in this scenario. Other approaches. Recently, Meng et al. (2017); Gu et al. (2016) independently proposed a doubly stochastic method to solve the problem at hand. Following Meng et al. (2017) we refer to it as Async-PROXSVRCD. This method performs coordinate descent-like updates in which the true gradient is replaced by its SVRG approximation. It hence features a doubly-stochastic loop: at each iteration we select a random coordinate and a random sample. Because the selected coordinate block is uncorrelated with the chosen sample, the algorithm can be orders of magnitude slower than SAGA in the presence of sparse gradients. Appendix F contains a comparison of these methods. 1.2 Definitions and notations By convention, we denote vectors and vector-valued functions in lowercase boldface (e.g. x) and matrices in uppercase boldface (e.g. D). The proximal operator of a convex lower semicontinuous function h is defined as proxh(x) := arg minz∈Rp{h(z) + 1 2x −z2}. A function f is said to be L-smooth if it is differentiable and its gradient is L-Lipschitz continuous. A function f is said to be µ-strongly convex if f −µ 2 · 2 is convex. We use the notation κ := L/µ to denote the condition number for an L-smooth and µ-strongly convex function.3 Ip denotes the p-dimensional identity matrix, 1{cond} the characteristic function, which is 1 if cond evaluates to true and 0 otherwise. The average of a vector or matrix is denoted α := 1 n n i=1 αi. We use · for the Euclidean norm. For a positive semi-definite matrix D, we define its associated distance as x2 D := x, Dx. We denote by [ x ]b the b-th coordinate in x. This notation is overloaded so that for a collection of blocks T = {B1, B2, . . .}, [x]T denotes the vector x restricted to the coordinates in the blocks of T. For convenience, when T consists of a single block B we use [x]B as a shortcut of [x]{B}. Finally, we distinguish E, the full expectation taken with respect to all the randomness in the system, from E, the conditional expectation of a random it (the random index sampled at each iteration by SGD-like algorithms) conditioned on all the “past”, which the context will clarify. 2 Sparse Proximal SAGA Original SAGA algorithm. The original SAGA algorithm (Defazio et al., 2014) maintains two moving quantities: the current iterate x and a table (memory) of historical gradients (αi)n i=1. At every iteration, it samples an index i ∈{1, . . . , n} uniformly at random, and computes the next iterate (x+, α+) according to the following recursion: ui = ∇fi(x) −αi + α ; x+ = proxγh x −γui ; α+ i = ∇fi(x) . (1) On each iteration, this update rule requires to visit all coefficients even if the partial gradients ∇fi are sparse. Sparse partial gradients arise in a variety of practical scenarios: for example, in generalized linear models the partial gradients inherit the sparsity pattern of the dataset. Given that large-scale datasets are often sparse,4 leveraging this sparsity is crucial for the success of the optimizer. Sparse Proximal SAGA algorithm. We will now describe an algorithm that leverages sparsity in the partial gradients by only updating those blocks that intersect with the support of the partial gradients. Since in this update scheme some blocks might appear more frequently than others, we will need to counterbalance this undersirable effect with a well-chosen block-wise reweighting of the average gradient and the proximal term. In order to make precise this block-wise reweighting, we define the following quantities. We denote by Ti the extended support of ∇fi, which is the set of blocks that intersect the support of ∇fi, 3Since we have assumed that each individual fi is L-smooth, f itself is L-smooth – but it could have a smaller smoothness constant. Our rates are in terms of this bigger L/µ, as is standard in the SAGA literature. 4For example, in the LibSVM datasets suite, 8 out of the 11 datasets (as of May 2017) with more than a million samples have a density between 10−4 and 10−6. 3 formally defined as Ti := {B : supp(∇fi) ∩B = ∅, B ∈B}. For totally separable penalties such as the 1 norm, the blocks are individual coordinates and so the extended support covers the same coordinates as the support. Let dB := n/nB, where nB := i 1{B ∈Ti} is the number of times that B ∈Ti. For simplicity we assume nB > 0, as otherwise the problem can be reformulated without block B. The update rule in (1) requires computing the proximal operator of h, which involves a full pass on the coordinates. In our proposed algorithm, we replace h in (1) with the function ϕi(x) := B∈Ti dBhB(x), whose form is justified by the following three properties. First, this function is zero outside Ti, allowing for sparse updates. Second, because of the block-wise reweighting dB, the function ϕi is an unbiased estimator of h (i.e., E ϕi = h), property which will be crucial to prove the convergence of the method. Third, ϕi inherits the block-wise structure of h and its proximal operator can be computed from that of h as [proxγϕi(x)]B = [prox(dBγ)hB(x)]B if B ∈Ti and [proxγϕi(x)]B = [x]B otherwise. Following Leblond et al. (2017), we will also replace the dense gradient estimate ui by the sparse estimate vi := ∇fi(x) −αi + Diα, where Di is the diagonal matrix defined block-wise as [Di]B,B = dB1{B ∈Ti}I|B|. It is easy to verify that the vector Diα is a weighted projection onto the support of Ti and E Diα = α, making vi an unbiased estimate of the gradient. We now have all necessary elements to describe the Sparse Proximal SAGA algorithm. As the original SAGA algorithm, it maintains two moving quantities: the current iterate x ∈Rp and a table of historical gradients (αi)n i=1, αi ∈Rp. At each iteration, the algorithm samples an index i ∈{1, . . . , n} and computes the next iterate (x+, α+) as: vi = ∇fi(x) −αi + Diα ; x+ = proxγϕi x −γvi ; α+ i = ∇fi(x) , (SPS) where in a practical implementation the vector α is updated incrementally at each iteration. The above algorithm is sparse in the sense that it only requires to visit and update blocks in the extended support: if B /∈Ti, by the sparsity of vi and proxϕi, we have [x+]B = [x]B. Hence, when the extended support Ti is sparse, this algorithm can be orders of magnitude faster than the naive SAGA algorithm. The extended support is sparse for example when the partial gradients are sparse and the penalty is separable, as is the case of the 1 norm or the indicator function over a hypercube, or when the the penalty is block-separable in a way such that only a small subset of the blocks overlap with the support of the partial gradients. Initialization of variables and a reduced storage scheme for the memory are discussed in the implementation details section of Appendix E. Relationship with existing methods. This algorithm can be seen as a generalization of both the Standard SAGA algorithm and the Sparse SAGA algorithm of Leblond et al. (2017). When the proximal term is not block-separable, then dB = 1 (for a unique block B) and the algorithm defaults to the Standard (dense) SAGA algorithm. In the smooth case (i.e., h = 0), the algorithm defaults to the Sparse SAGA method. Hence we note that the sparse gradient estimate vi in our algorithm is the same as the one proposed in Leblond et al. (2017). However, we emphasize that a straightforward combination of this sparse update rule with the proximal update from the Standard SAGA algorithm results in a nonconvergent algorithm: the block-wise reweighting of h is a surprisingly simple but crucial change. We now give the convergence guarantees for this algorithm. Theorem 1. Let γ = a 5L for any a ≤1 and f be µ-strongly convex (µ > 0). Then Sparse Proximal SAGA converges geometrically in expectation with a rate factor of at least ρ = 1 5 min{ 1 n, a 1 κ}. That is, for xt obtained after t updates, we have the following bound: Ext −x∗2 ≤(1 −ρ)tC0 , with C0 := x0 −x∗2 + 1 5L2 n i=1 α0 i −∇fi(x∗)2 . Remark. For the step size γ = 1/5L, the convergence rate is (1 −1/5 min{1/n, 1/κ}). We can thus identify two regimes: the “big data” regime, n ≥κ, in which the rate factor is bounded by 1/5n, and the “ill-conditioned” regime, κ ≥n, in which the rate factor is bounded by 1/5κ. This rate roughly matches the rate obtained by Defazio et al. (2014). While the step size bound of 1/5L is slightly smaller than the 1/3L one obtained in that work, this can be explained by their stronger assumptions: each fi is strongly convex whereas they are strongly convex only on average in this work. All proofs for this section can be found in Appendix B. 4 Algorithm 1 PROXASAGA (analyzed) 1: Initialize shared variables x and (αi)n i=1 2: keep doing in parallel 3: ˆx = inconsistent read of x 4: ˆα = inconsistent read of α 5: Sample i uniformly in {1, ..., n} 6: Si := support of ∇fi 7: Ti := extended support of ∇fi in B 8: [ α ]Ti = 1/n n j=1[ ˆαj ]Ti 9: [ δα ]Si = [∇fi(ˆx)]Si −[ˆαi]Si 10: [ ˆv ]Ti = [ δα ]Ti + [Diα ]Ti 11: [ δx ]Ti = [proxγϕi(ˆx −γˆv)]Ti −[ˆx]Ti 12: for B in Ti do 13: for b ∈B do 14: [ x ]b ←[ x ]b + [ δx ]b atomic 15: if b ∈Si then 16: [αi]b ←[∇fi(ˆx)]b 17: end if 18: end for 19: end for 20: // (‘←’ denotes shared memory update.) 21: end parallel loop Algorithm 2 PROXASAGA (implemented) 1: Initialize shared variables x, (αi)n i=1, α 2: keep doing in parallel 3: Sample i uniformly in {1, ..., n} 4: Si := support of ∇fi 5: Ti := extended support of ∇fi in B 6: [ ˆx ]Ti = inconsistent read of x on Ti 7: ˆαi = inconsistent read of αi 8: [ α ]Ti = inconsistent read of α on Ti 9: [ δα ]Si = [∇fi(ˆx)]Si −[ˆαi]Si 10: [ ˆv ]Ti = [δα ]Ti + [ Diα ]Ti 11: [ δx ]Ti = [proxγϕi(ˆx −γˆv)]Ti −[ˆx]Ti 12: for B in Ti do 13: for b in B do 14: [ x ]b ←[ x ]b + [ δx ]b atomic 15: if b ∈Si then 16: [ α ]b ←[α]b + 1/n[δα]b atomic 17: end if 18: end for 19: end for 20: αi ←∇fi(ˆx) (scalar update) atomic 21: end parallel loop 3 Asynchronous Sparse Proximal SAGA We introduce PROXASAGA – the asynchronous parallel variant of Sparse Proximal SAGA. In this algorithm, multiple cores update a central parameter vector using the Sparse Proximal SAGA introduced in the previous section, and updates are performed asynchronously. The algorithm parameters are read and written without vector locks, i.e., the vector content of the shared memory can potentially change while a core is reading or writing to main memory coordinate by coordinate. These operations are typically called inconsistent (at the vector level). The full algorithm is described in Algorithm 1 for its theoretical version (on which our analysis is built) and in Algorithm 2 for its practical implementation. The practical implementation differs from the analyzed agorithm in three points. First, in the implemented algorithm, index i is sampled before reading the coefficients to minimize memory access since only the extended support needs to be read. Second, since our implementation targets generalized linear models, the memory αi can be compressed into a single scalar in L20 (see Appendix E). Third, α is stored in memory and updated incrementally instead of recomputed at each iteration. The rest of the section is structured as follows: we start by describing our framework of analysis; we then derive essential properties of PROXASAGA along with a classical delay assumption. Finally, we state our main convergence and speedup result. 3.1 Analysis framework As in most of the recent asynchronous optimization literature, we build on the hardware model introduced by Niu et al. (2011), with multiple cores reading and writing to a shared memory parameter vector. These operations are asynchronous (lock-free) and inconsistent:5 ˆxt, the local copy of the parameters of a given core, does not necessarily correspond to a consistent iterate in memory. “Perturbed” iterates. To handle this additional difficulty, contrary to most contributions in this field, we choose the “perturbed iterate framework” proposed by Mania et al. (2017) and refined by Leblond et al. (2017). This framework can analyze variants of SGD which obey the update rule: xt+1 = xt −γv(xt, it) , where v verifies the unbiasedness condition E v(x, it) = ∇f(x) 5This is an extension of the framework of Niu et al. (2011), where consistent updates were assumed. 5 and the expectation is computed with respect to it. In the asynchronous parallel setting, cores are reading inconsistent iterates from memory, which we denote ˆxt. As these inconsistent iterates are affected by various delays induced by asynchrony, they cannot easily be written as a function of their previous iterates. To alleviate this issue, Mania et al. (2017) choose to introduce an additional quantity for the purpose of the analysis: xt+1 := xt −γv(ˆxt, it) , the “virtual iterate” – which is never actually computed . (2) Note that this equation is the definition of this new quantity xt. This virtual iterate is useful for the convergence analysis and makes for much easier proofs than in the related literature. “After read” labeling. How we choose to define the iteration counter t to label an iterate xt matters in the analysis. In this paper, we follow the “after read” labeling proposed in Leblond et al. (2017), in which we update our iterate counter, t, as each core finishes reading its copy of the parameters (in the specific case of PROXASAGA, this includes both ˆxt and ˆαt). This means that ˆxt is the (t + 1)th fully completed read. One key advantage of this approach compared to the classical choice of Niu et al. (2011) – where t is increasing after each successful update – is that it guarantees both that the it are uniformly distributed and that it and ˆxt are independent. This property is not verified when using the “after write” labeling of Niu et al. (2011), although it is still implicitly assumed in the papers using this approach, see Leblond et al. (2017, Section 3.2) for a discussion of issues related to the different labeling schemes. Generalization to composite optimization. Although the perturbed iterate framework was designed for gradient-based updates, we can extend it to proximal methods by remarking that in the sequential setting, proximal stochastic gradient descent and its variants can be characterized by the following similar update rule: xt+1 = xt −γg(xt, vit, it) , with g(x, v, i) := 1 γ x −proxγϕi(x −γv) , (3) where as before v verifies the unbiasedness condition E v = ∇f(x). The Proximal Sparse SAGA iteration can be easily written within this template by using ϕi and vi as defined in §2. Using this definition of g, we can define PROXASAGA virtual iterates as: xt+1 := xt −γg(ˆxt, ˆvt it, it) , with ˆvt it = ∇fit(ˆxt) −ˆαt it + Ditαt , (4) where as in the sequential case, the memory terms are updated as ˆαt it = ∇fit(ˆxt). Our theoretical analysis of PROXASAGA will be based on this definition of the virtual iterate xt+1. 3.2 Properties and assumptions Now that we have introduced the “after read” labeling for proximal methods in Eq. (4), we can leverage the framework of Leblond et al. (2017, Section 3.3) to derive essential properties for the analysis of PROXASAGA. We describe below three useful properties arising from the definition of Algorithm 1, and then state a central (but standard) assumption that the delays induced by the asynchrony are uniformly bounded. Independence: Due to the “after read” global ordering, ir is independent of ˆxt for all r ≥t. We enforce the independence for r = t by having the cores read all the shared parameters before their iterations. Unbiasedness: The term ˆvt it is an unbiased estimator of the gradient of f at ˆxt. This property is a consequence of the independence between it and ˆxt. Atomicity: The shared parameter coordinate update of [x]b on Line 14 is atomic. This means that there are no overwrites for a single coordinate even if several cores compete for the same resources. Most modern processors have support for atomic operations with minimal overhead. Bounded overlap assumption. We assume that there exists a uniform bound, τ, on the maximum number of overlapping iterations. This means that every coordinate update from iteration t is successfully written to memory before iteration t + τ + 1 starts. Our result will give us conditions on τ to obtain linear speedups. Bounding ˆxt −xt. The delay assumption of the previous paragraph allows to express the difference between real and virtual iterate using the gradient mapping gu := g(ˆxu, ˆvu iu, iu) as: ˆxt−xt = γ t−1 u=(t−τ)+ Gt ugu , where Gt u are p × p diagonal matrices with terms in {0, +1}. (5) 6 0 represents instances where both ˆxu and xu have received the corresponding updates. +1, on the contrary, represents instances where ˆxu has not yet received an update that is already in xu by definition. This bound will prove essential to our analysis. 3.3 Analysis In this section, we state our convergence and speedup results for PROXASAGA. The full details of the analysis can be found in Appendix C. Following Niu et al. (2011), we introduce a sparsity measure (generalized to the composite setting) that will appear in our results. Definition 1. Let Δ := maxB∈B |{i : Ti B}|/n. This is the normalized maximum number of times that a block appears in the extended support. For example, if a block is present in all Ti, then Δ = 1. If no two Ti share the same block, then Δ = 1/n. We always have 1/n ≤Δ ≤1. Theorem 2 (Convergence guarantee of PROXASAGA). Suppose τ ≤ 1 10 √ Δ. For any step size γ = a L with a ≤a∗(τ) := 1 36 min{1, 6κ τ }, the inconsistent read iterates of Algorithm 1 converge in expectation at a geometric rate factor of at least: ρ(a) = 1 5 min 1 n, a 1 κ , i.e. Eˆxt −x∗2 ≤ (1 −ρ)t ˜C0, where ˜C0 is a constant independent of t (≈nκ a C0 with C0 as defined in Theorem ??). This last result is similar to the original SAGA convergence result and our own Theorem ??, with both an extra condition on τ and on the maximum allowable step size. In the best sparsity case, Δ = 1/n and we get the condition τ ≤ √n/10. We now compare the geometric rate above to the one of Sparse Proximal SAGA to derive the necessary conditions under which PROXASAGA is linearly faster. Corollary 1 (Speedup). Suppose τ ≤ 1 10 √ Δ. If κ ≥n, then using the step size γ = 1/36L, PROXASAGA converges geometrically with rate factor Ω( 1 κ). If κ < n, then using the step size γ = 1/36nµ, PROXASAGA converges geometrically with rate factor Ω( 1 n). In both cases, the convergence rate is the same as Sparse Proximal SAGA. Thus PROXASAGA is linearly faster than its sequential counterpart up to a constant factor. Note that in both cases the step size does not depend on τ. Furthermore, if τ ≤6κ, we can use a universal step size of Θ(1/L) to get a similar rate for PROXASAGA than Sparse Proximal SAGA, thus making it adaptive to local strong convexity since the knowledge of κ is not required. These speedup regimes are comparable with the best ones obtained in the smooth case, including Niu et al. (2011); Reddi et al. (2015), even though unlike these papers, we support inconsistent reads and nonsmooth objective functions. The one exception is Leblond et al. (2017), where the authors prove that their algorithm, ASAGA, can obtain a linear speedup even without sparsity in the wellconditioned regime. In contrast, PROXASAGA always requires some sparsity. Whether this property for smooth objective functions could be extended to the composite case remains an open problem. Relative to ASYSPCD, in the best case scenario (where the components of the gradient are uncorrelated, a somewhat unrealistic setting), ASYSPCD can get a near-linear speedup for τ as big as 4√p. Our result states that τ = O(1/ √ Δ) is necessary for a linear speedup. This means in case Δ ≤1/√p our bound is better than the one obtained for ASYSPCD. Recalling that 1/n ≤Δ ≤1, it appears that PROXASAGA is favored when n is bigger than √p whereas ASYSPCD may have a better bound otherwise, though this comparison should be taken with a grain of salt given the assumptions we had to make to arrive at comparable quantities. An extended comparison with the related work can be found in Appendix D. 4 Experiments In this section, we compare PROXASAGA with related methods on different datasets. Although PROXASAGA can be applied more broadly, we focus on 1 +2-regularized logistic regression, a model of particular practical importance. The objective function takes the form 1 n n i=1 log 1 + exp(−bia i x) + λ1 2 x2 2 + λ2x1 , (6) where ai ∈Rp and bi ∈{−1, +1} are the data samples. Following Defazio et al. (2014), we set λ1 = 1/n. The amount of 1 regularization (λ2) is selected to give an approximate 1/10 nonzero 7 Table 1: Description of datasets. Dataset n p density L Δ KDD 2010 (Yu et al., 2010) 19,264,097 1,163,024 10−6 28.12 0.15 KDD 2012 (Juan et al., 2016) 149,639,105 54,686,452 2 × 10−7 1.25 0.85 Criteo (Juan et al., 2016) 45,840,617 1,000,000 4 × 10−5 1.25 0.89
Figure 1: Convergence for asynchronous stochastic methods for 1 + 2-regularized logistic regression. Top: Suboptimality as a function of time for different asynchronous methods using 1 and 10 cores. Bottom: Running time speedup as function of the number of cores. PROXASAGA achieves significant speedups over its sequential version while being orders of magnitude faster than competing methods. ASYSPCD achieves the highest speedups but it also the slowest overall method. coefficients. Implementation details are available in Appendix E. We chose the 3 datasets described in Table 1 Results. We compare three parallel asynchronous methods on the aforementioned datasets: PROXASAGA (this work),6 ASYSPCD, the asynchronous proximal coordinate descent method of Liu & Wright (2015) and the (synchronous) FISTA algorithm (Beck & Teboulle, 2009), in which the gradient computation is parallelized by splitting the dataset into equal batches. We aim to benchmark these methods in the most realistic scenario possible; to this end we use the following step size: 1/2L for PROXASAGA, 1/Lc for ASYSPCD, where Lc is the coordinate-wise Lipschitz constant of the gradient, while FISTA uses backtracking line-search. The results can be seen in Figure 1 (top) with both one (thus sequential) and ten processors. Two main observations can be made from this figure. First, PROXASAGA is significantly faster on these problems. Second, its asynchronous version offers a significant speedup over its sequential counterpart. In Figure 1 (bottom) we present speedup with respect to the number of cores, where speedup is computed as the time to achieve a suboptimality of 10−10 with one core divided by the time to achieve the same suboptimality using several cores. While our theoretical speedups (with respect to the number of iterations) are almost linear as our theory predicts (see Appendix F), we observe a different story for our running time speedups. This can be attributed to memory access overhead, which our model does not take into account. As predicted by our theoretical results, we observe 6A reference C++/Python implementation of is available at https://github.com/fabianp/ProxASAGA 8 a high correlation between the Δ dataset sparsity measure and the empirical speedup: KDD 2010 (Δ = 0.15) achieves a 11x speedup, while in Criteo (Δ = 0.89) the speedup is never above 6x. Note that although competitor methods exhibit similar or sometimes better speedups, they remain orders of magnitude slower than PROXASAGA in running time for large sparse problems. In fact, our method is between 5x and 80x times faster (in time to reach 10−10 suboptimality) than FISTA and between 13x and 290x times faster than ASYSPCD (see Appendix F.3). 5 Conclusion and future work In this work, we have described PROXASAGA, an asynchronous variance reduced algorithm with support for composite objective functions. This method builds upon a novel sparse variant of the (proximal) SAGA algorithm that takes advantage of sparsity in the individual gradients. We have proven that this algorithm is linearly convergent under a condition on the step size and that it is linearly faster than its sequential counterpart given a bound on the delay. Empirical benchmarks show that PROXASAGA is orders of magnitude faster than existing state-of-the-art methods. This work can be extended in several ways. First, we have focused on the SAGA method as the basic iteration loop, but this approach can likely be extended to other proximal incremental schemes such as SGD or ProxSVRG. Second, as mentioned in §3.3, it is an open question whether it is possible to obtain convergence guarantees without any sparsity assumption, as was done for ASAGA. Acknowledgements The authors would like to thank our colleagues Damien Garreau, Robert Gower, Thomas Kerdreux, Geoffrey Negiar, Konstantin Mishchenko and Kilian Fatras for their feedback on this manuscript, and Jean-Baptiste Alayrac for support managing the computational resources. This work was partially supported by a Google Research Award. FP acknowledges support from the chaire ´Economie des nouvelles donn´ees with the data science joint research initiative with the fonds AXA pour la recherche. References Bauschke, Heinz and Combettes, Patrick L. Convex analysis and monotone operator theory in Hilbert spaces. Springer, 2011. Beck, Amir and Teboulle, Marc. Gradient-based algorithms with applications to signal recovery. Convex Optimization in Signal Processing and Communications, 2009. Davis, Damek, Edmunds, Brent, and Udell, Madeleine. The sound of APALM clapping: faster nonsmooth nonconvex optimization with stochastic asynchronous PALM. In Advances in Neural Information Processing Systems 29, 2016. Defazio, Aaron, Bach, Francis, and Lacoste-Julien, Simon. SAGA: A fast incremental gradient method with support for non-strongly convex composite objectives. In Advances in Neural Information Processing Systems, 2014. Gu, Bin, Huo, Zhouyuan, and Huang, Heng. Asynchronous stochastic block coordinate descent with variance reduction. arXiv preprint arXiv:1610.09447v3, 2016. Hsieh, Cho-Jui, Yu, Hsiang-Fu, and Dhillon, Inderjit S. PASSCoDe: parallel asynchronous stochastic dual coordinate descent. In ICML, 2015. Johnson, Rie and Zhang, Tong. Accelerating stochastic gradient descent using predictive variance reduction. In Advances in Neural Information Processing Systems, 2013. Juan, Yuchin, Zhuang, Yong, Chin, Wei-Sheng, and Lin, Chih-Jen. Field-aware factorization machines for CTR prediction. In Proceedings of the 10th ACM Conference on Recommender Systems. ACM, 2016. 9 Le Roux, Nicolas, Schmidt, Mark, and Bach, Francis R. A stochastic gradient method with an exponential convergence rate for finite training sets. In Advances in Neural Information Processing Systems, 2012. Leblond, R´emi, Pedregosa, Fabian, and Lacoste-Julien, Simon. ASAGA: asynchronous parallel SAGA. Proceedings of the 20th International Conference on Artificial Intelligence and Statistics (AISTATS 2017), 2017. Liu, Ji and Wright, Stephen J. Asynchronous stochastic coordinate descent: Parallelism and convergence properties. SIAM Journal on Optimization, 2015. Mania, Horia, Pan, Xinghao, Papailiopoulos, Dimitris, Recht, Benjamin, Ramchandran, Kannan, and Jordan, Michael I. Perturbed iterate analysis for asynchronous stochastic optimization. SIAM Journal on Optimization, 2017. Meng, Qi, Chen, Wei, Yu, Jingcheng, Wang, Taifeng, Ma, Zhi-Ming, and Liu, Tie-Yan. Asynchronous stochastic proximal optimization algorithms with variance reduction. In AAAI, 2017. Nesterov, Yurii. Introductory lectures on convex optimization. Springer Science & Business Media, 2004. Nesterov, Yurii. Gradient methods for minimizing composite functions. Mathematical Programming, 2013. Niu, Feng, Recht, Benjamin, Re, Christopher, and Wright, Stephen. Hogwild: A lock-free approach to parallelizing stochastic gradient descent. In Advances in Neural Information Processing Systems, 2011. Peng, Zhimin, Xu, Yangyang, Yan, Ming, and Yin, Wotao. ARock: an algorithmic framework for asynchronous parallel coordinate updates. SIAM Journal on Scientific Computing, 2016. Reddi, Sashank J, Hefny, Ahmed, Sra, Suvrit, Poczos, Barnabas, and Smola, Alexander J. On variance reduction in stochastic gradient descent and its asynchronous variants. In Advances in Neural Information Processing Systems, 2015. Schmidt, Mark, Le Roux, Nicolas, and Bach, Francis. Minimizing finite sums with the stochastic average gradient. Mathematical Programming, 2016. Shalev-Shwartz, Shai and Zhang, Tong. Stochastic dual coordinate ascent methods for regularized loss minimization. Journal of Machine Learning Research, 2013. Shalev-Shwartz, Shai et al. Proximal stochastic dual coordinate ascent. arXiv preprint arXiv:1211.2717, 2012. Xiao, Lin and Zhang, Tong. A proximal stochastic gradient method with progressive variance reduction. SIAM Journal on Optimization, 2014. You, Yang, Lian, Xiangru, Liu, Ji, Yu, Hsiang-Fu, Dhillon, Inderjit S, Demmel, James, and Hsieh, Cho-Jui. Asynchronous parallel greedy coordinate descent. In Advances In Neural Information Processing Systems, 2016. Yu, Hsiang-Fu, Lo, Hung-Yi, Hsieh, Hsun-Ping, Lou, Jing-Kai, McKenzie, Todd G, Chou, JungWei, Chung, Po-Han, Ho, Chia-Hua, Chang, Chun-Fu, Wei, Yin-Hsuan, et al. Feature engineering and classifier ensemble for KDD cup 2010. In KDD Cup, 2010. Zhao, Tuo, Yu, Mo, Wang, Yiming, Arora, Raman, and Liu, Han. Accelerated mini-batch randomized block coordinate descent method. In Advances in neural information processing systems, 2014. 10 | 2017 | 25 |
6,730 | Generalization Properties of Learning with Random Features Alessandro Rudi ∗ INRIA - Sierra Project-team, ´Ecole Normale Sup´erieure, Paris, 75012 Paris, France alessandro.rudi@inria.fr Lorenzo Rosasco University of Genova, Istituto Italiano di Tecnologia, Massachusetts Institute of Technology. lrosasco@mit.edu Abstract We study the generalization properties of ridge regression with random features in the statistical learning framework. We show for the first time that O(1/√n) learning bounds can be achieved with only O(√n log n) random features rather than O(n) as suggested by previous results. Further, we prove faster learning rates and show that they might require more random features, unless they are sampled according to a possibly problem dependent distribution. Our results shed light on the statistical computational trade-offs in large scale kernelized learning, showing the potential effectiveness of random features in reducing the computational complexity while keeping optimal generalization properties. 1 Introduction Supervised learning is a basic machine learning problem where the goal is estimating a function from random noisy samples [1, 2]. The function to be learned is fixed, but unknown, and flexible non-parametric models are needed for good results. A general class of models is based on functions of the form, f(x) = M X i=1 αi q(x, ωi), (1) where q is a non-linear function, ω1, . . . , ωM ∈Rd are often called centers, α1, . . . , αM ∈R are coefficients, and M = Mn could/should grow with the number of data points n. Algorithmically, the problem reduces to computing from data the parameters ω1, . . . , ωM, α1, . . . , αM and M. Among others, one-hidden layer networks [3], or RBF networks [4], are examples of classical approaches considering these models. Here, parameters are computed by considering a non-convex optimization problem, typically hard to solve and analyze [5]. Kernel methods are another notable example of an approach [6] using functions of the form (1). In this case, q is assumed to be a positive definite function [7] and it is shown that choosing the centers to be the input points, hence M = n, suffices for optimal statistical results [8, 9, 10]. As a by product, kernel methods require only finding the coefficients (αi)i, typically by convex optimization. While theoretically sound and remarkably effective in small and medium size problems, memory requirements make kernel methods unfeasible for large scale problems. Most popular approaches to tackle these limitations are randomized and include sampling the centers at random, either in a data-dependent or in a data-independent way. Notable examples include Nystr¨om [11, 12] and random features [13] approaches. Given random centers, computations still ∗This work was done when A.R. was working at Laboratory of Computational and Statistical Learning (Istituto Italiano di Tecnologia). 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. reduce to convex optimization with potential big memory gains, provided that the centers are fewer than the data-points. In practice, the choice of the number of centers is based on heuristics or memory constraints, and the question arises of characterizing theoretically which choices provide optimal learning bounds. Answering this question allows to understand the statistical and computational trade-offs in using these randomized approximations. For Nystr¨om methods, partial results in this direction were derived for example in [14] and improved in [15], but only for a simplified setting where the input points are fixed. Results in the statistical learning setting were given in [16] for ridge regression, showing in particular that O(√n log n) random centers uniformly sampled from n training points suffices to yield O(1/√n) learning bounds, the same as full kernel ridge regression. A question motivating our study is whether similar results hold for random features approaches. While several papers consider the properties of random features for approximating the kernel function, see [17] and references therein, fewer results consider their generalization properties. Several papers considered the properties of random features for approximating the kernel function, see [17] and references therein, an interesting line of research with connections to sketching [24] and non-linear (one-bit) compressed sensing [18]. However, only a few results consider the generalization properties of learning with random features. An exception is one of the original random features papers, which provides learning bounds for a general class of loss functions [19]. These results show that O(n) random features are needed for O(1/√n) learning bounds and choosing less random features leads to worse bounds. In other words, these results suggest that that computational gains come at the expense of learning accuracy. Later results, see e.g. [20, 21, 22], essentially confirm these considerations, albeit the analysis in [22] suggests that fewer random features could suffice if sampled in a problem dependent way. In this paper, we focus on the least squares loss, considering random features within a ridge regression approach. Our main result shows, under standard assumptions, that the estimator obtained with a number of random features proportional to O(√n log n) achieves O(1/√n) learning error, that is the same prediction accuracy of the exact kernel ridge regression estimator. In other words, there are problems for which random features can allow to drastically reduce computational costs without any loss of prediction accuracy. To the best of our knowledge this is the first result showing that such an effect is possible. Our study improves on previous results by taking advantage of analytic and probabilistic results developed to provide sharp analyses of kernel ridge regression. We further present a second set of more refined results deriving fast convergence rates. We show that indeed fast rates are possible, but, depending on the problem at hand, a larger number of features might be needed. We then discuss how the requirement on the number of random features can be weakened at the expense of typically more complex sampling schemes. Indeed, in this latter case either some knowledge of the data-generating distribution or some potentially data-driven sampling scheme is needed. For this latter case, we borrow and extend ideas from [22, 16] and inspired from the theory of statical leverage scores [23]. Theoretical findings are complemented by numerical simulation validating the bounds. The rest of the paper is organized as follows. In Section 2, we review relevant results on learning with kernels, least squares and learning with random features. In Section 3, we present and discuss our main results, while proofs are deferred to the appendix. Finally, numerical experiments are presented in Section 4. 2 Learning with random features and ridge regression We begin recalling basics ideas in kernel methods and their approximation via random features. Kernel ridge regression Consider the supervised problem of learning a function given a training set of n examples (xi, yi)n i=1, where xi ∈X, X = RD and yi ∈R. Kernel methods are nonparametric approaches defined by a kernel K : X × X →R, that is a symmetric and positive definite (PD) function2. A particular instance is kernel ridge regression given by bfλ(x) = n X i=1 αiK(xi, x), α = (K + λnI)−1y. (2) 2A kernel K is PD if for all x1, . . . , xN the N by N matrix with entries K(xi, xj) is positive semidefinite. 2 Here λ > 0, y = (y1, . . . , yn), α ∈Rn, and K is the n by n matrix with entries Kij = K(xi, xj). The above method is standard and can be derived from an empirical risk minimization perspective [6], and is related to Gaussian processes [3]. While KRR has optimal statistical properties– see later– its applicability to large scale datasets is limited since it requires O(n2) in space, to store K, and roughly O(n3) in time, to solve the linear system in (2). Similar requirements are shared by other kernel methods [6]. To explain the basic ideas behind using random features with ridge regression, it is useful to recall the computations needed to solve KRR when the kernel is linear K(x, x′) = x⊤x′. In this case, Eq. (2) reduces to standard ridge regression and can be equivalenty computed considering, bfλ(x) = x⊤bwλ bwλ = ( b X⊤b X + λnI)−1 b X⊤y. (3) where b X is the n by D data matrix. In this case, the complexity becomes O(nD) in space, and O(nD2 + D3) in time. Beyond the linear case, the above reasoning extends to inner product kernels K(x, x′) = φM(x)⊤φM(x′) (4) where φM : X →RM is a finite dimensional (feature) map. In this case, KRR can be computed considering (3) with the data matrix b X replaced by the n by M matrix bS⊤ M = (φ(x1), . . . , φ(xn)). The complexity is then O(nM) in space, and O(nM 2 + M 3) in time, hence much better than O(n2) and O(n3), as soon as M ≪n. Considering only kernels of the form (4) can be restrictive. Indeed, classic examples of kernels, e.g. the Gaussian kernel e−∥x−x′∥2, do not satisfy (4) with finite M. It is then natural to ask if the above reasoning can still be useful to reduce the computational burden for more complex kernels such as the Gaussian kernel. Random features, that we recall next, show that this is indeed the case. Random features with ridge regression The basic idea of random features [13] is to relax Eq. (4) assuming it holds only approximately, K(x, x′) ≈φM(x)⊤φM(x′). (5) Clearly, if one such approximation exists the approach described in the previous section can still be used. A first question is then for which kernels an approximation of the form (5) can be derived. A simple manipulation of the Gaussian kernel provides one basic example. Example 1 (Random Fourier features [13]). If we write the Gaussian kernel as K(x, x′) = G(x−x′), with G(z) = e− 1 2σ2 ∥z∥2, for a σ > 0, then since the inverse Fourier transform of G is a Gaussian, and using a basic symmetry argument, it is easy to show that G(x −x′) = 1 2πZ Z Z 2π 0 √ 2 cos(w⊤x + b) √ 2 cos(w⊤x′ + b) e−σ2 2 ∥w∥2dw db where Z is a normalizing factor. Then, the Gaussian kernel has an approximation of the form (5) with φM(x) = M −1/2 ( √ 2 cos(w⊤ 1 x + b1), . . . , √ 2 cos(w⊤ Mx + bM)), and w1, . . . , wM and b1, . . . , bM sampled independently from 1 Z e−σ2∥w∥2/2 and uniformly in [0, 2π], respectively. The above example can be abstracted to a general strategy. Assume the kernel K to have an integral representation, K(x, x′) = Z Ω ψ(x, ω)ψ(x′, ω)dπ(ω), ∀x, x′ ∈X, (6) where (Ω, π) is probability space and ψ : X × Ω→R. The random features approach provides an approximation of the form (5) where φM(x) = M −1/2 (ψ(x, ω1), . . . , ψ(x, ωM)), and with ω1, . . . , ωM sampled independently with respect to π. Key to the success of random features is that kernels, to which the above idea apply, abound– see Appendix E for a survey with some details. Remark 1 (Random features, sketching and one-bit compressed sensing). We note that specific examples of random features can be seen as form of sketching [24]. This latter term typically refers to reducing data dimensionality by random projection, e.g. considering ψ(x, ω) = x⊤ω, 3 where ω ∼N(0, I) (or suitable bounded measures). From a random feature perspective, we are defining an approximation of the linear kernel since E[ψ(x, ω)ψ(x′, ω)] = E[x⊤ωω⊤x′] = x⊤E[ωω⊤]x′ = x⊤x′. More general non-linear sketching can also be considered. For example in one-bit compressed sensing [18] the following random features are relevant, ψ(x, ω) = sign(x⊤ω) with w ∼N(0, I) and sign(a) = 1 if a > 0 and −1 otherwise. Deriving the corresponding kernel is more involved and we refer to [25] (see Section E in the appendixes). Back to supervised learning, combining random features with ridge regression leads to, bfλ,M(x) := φM(x)⊤bwλ,M, with bwλ,M := (bS⊤ M bSM + λI)−1 bS⊤ M by, (7) for λ > 0, bS⊤ M := n−1/2 (φM(x1), . . . , φM(xn)) and by := n−1/2 (y1, . . . , yn). Then, random features can be used to reduce the computational costs of full kernel ridge regression as soon as M ≪n (see Sec. 2). However, since random features rely on an approximation (5), the question is whether there is a loss of prediction accuracy. This is the question we analyze in the rest of the paper. 3 Main Results In this section, we present our main results characterizing the generalization properties of random features with ridge regression. We begin considering a basic setting and then discuss fast learning rates and the possible benefits of problem dependent sampling schemes. 3.1 O(√n log n) Random features lead to O(1/√n) learning error We consider a standard statistical learning setting. The data (xi, yi)n i=1 are sampled identically and independently with respect to a probability ρ on X × R, with X a separable space (e.g. X = RD, D ∈N). The goal is to minimize the expected risk E(f) = Z (f(x) −y)2dρ(x, y), since this implies that f will generalize/predict well new data. Since we consider estimators of the form (2), (7) we are potentially restricting the space of possible solutions. Indeed, estimators of this form can be naturally related to the so called reproducing kernel Hilbert space (RKHS) corresponding to the PD kernel K. Recall that, the latter is the function space H defined as as the completion of the linear span of {K(x, ·) : x ∈X} with respect to the inner product ⟨K(x, ·), K(x′, ·)⟩:= K(x, x′) [7]. In this view, the best possible solution is fH solving min f∈H E(f). (8) We will assume throughout that fH exists. We add one technical remark useful in the following. Remark 2. Existence of fH is not ensured, since we consider a potentially infinite dimensional RKHS H, possibly universal [26]. The situation is different if H is replaced by HR = {f ∈H : ∥f∥≤R}, with R fixed a priori. In this case a minimizer of risk E always exists, but R needs to be fixed a priori and HR can’t be universal. Clearly, assuming fH to exist, implies it belongs to a ball of radius Rρ,H. However, our results do not require prior knowledge of Rρ,H and hold uniformly over all finite radii. The following is our first result on the learning properties of random features with ridge regression. Theorem 1. Assume that K is a kernel with an integral representation (6). Assume ψ continuous, such that |ψ(x, ω)| ≤κ almost surely, with κ ∈[1, ∞) and |y| ≤b almost surely, with b > 0. Let δ ∈(0, 1]. If n ≥n0 and λn = n−1/2, then a number of random features Mn equal to Mn = c0 √n log 108κ2√n δ , is enough to guarantee, with probability at least 1 −δ, that E( bfλn,Mn) −E(fH) ≤c1 log2 18 δ √n . In particular the constants c0, c1 do not depend on n, λ, δ, and n0 does not depends on n, λ, fH, ρ. 4 The above result is presented with some simplifications (e.g. the assumption of bounded output) for sake of presentation, while it is proved and presented in full generality in the Appendix. In particular, the values of all the constants are given explicitly. Here, we make a few comments. The learning bound is the same achieved by the exact kernel ridge regression estimator (2) choosing λ = n−1/2, see e.g. [10]. The theorem derives a bound in a worst case situation, where no assumption is made besides existence of fH, and is optimal in a minmax sense [10]. This means that, in this setting, as soon as the number of features is order √n log n, the corresponding ridge regression estimator has optimal generalization properties. This is remarkable considering the corresponding gain from a computational perspective: from roughly O(n3) and O(n2) in time and space for kernel ridge regression to O(n2) and O(n√n) for ridge regression with random features (see Section 2). Consider that taking δ ∝1/n2 changes only the constants and allows to derive bounds in expectation and almost sure convergence (see Cor. 1 in the appendix, for the result in expectation). The above result shows that there is a whole set of problems where computational gains are achieved without having to trade-off statistical accuracy. In the next sections we consider what happens under more benign assumptions, which are standard, but also somewhat more technical. We first compare with previous works since the above setting is the one more closely related. Comparison with [19]. This is one of the original random features paper and considers the question of generalization properties. In particular they study the estimator bfR(x) = φM(x)⊤bβR,∞, bβR,∞= argmin ∥β∥∞≤R 1 n n X i=1 ℓ(φM(xi)⊤β, yi), for a fixed R, a Lipshitz loss function ℓ, and where ∥w∥∞= max{|β1|, · · · , |βM|}. The largest space considered in [19] is GR = Z ψ(·, ω)β(ω)dπ(ω) |β(ω)| < R a.e. , (9) rather than a RKHS, where R is fixed a priori. The best possible solution is f ∗ GR solving minf∈GR E(f), and the main result in [19] provides the bound E( bfR) −E(f ∗ GR) ≲R √n + R √ M , (10) This is the first and still one the main results providing a statistical analysis for an estimator based on random features for a wide class of loss functions. There are a few elements of comparison with the result in this paper, but the main one is that to get O(1/√n) learning bounds, the above result requires O(n) random features, while a smaller number leads to worse bounds. This shows the main novelty of our analysis. Indeed we prove that, considering the square loss, fewer random features are sufficient, hence allowing computational gains without loss of accuracy. We add a few more tehcnical comments explaining : 1) how the setting we consider covers a wider range of problems, and 2) why the bounds we obtain are sharper. First, note that the functional setting in our paper is more general in the following sense. It is easy to see that considering the RKHS H is equivalent to consider H2 = R ψ(·, ω)β(ω)dπ(ω) R |β(ω)|2dπ(ω) < ∞ and the following inclusions hold GR ⊂G∞⊂H2. Clearly, assuming a minimizer of the expected risk to exists in H2 does not imply it belongs to G∞or GR, while the converse is true. In this view, our results cover a wider range of problems. Second, note that, this gap is not easy to bridge. Indeed, even if we were to consider G∞ in place of GR, the results in [19] could be used to derive the bound E E( bfR) −E(f ∗ G∞) ≲R √n + R √ M + A(R), (11) where A(R) := E(f ∗ GR) −E(f ∗ G∞) and f ∗ G∞is a minimizer of the expected risk on G∞. In this case we would have to balance the various terms in (11), which would lead to a worse bound. For example, we could consider R := log n, obtaining a bound n−1/2 log n with an extra logarithmic term, but the result would hold only for n larger than a number of examples n0 at least exponential with respect to the norm of f∞. Moreover, to derive results uniform with respect to f∞, we would have to keep into account the decay rate of A(R) and this would get bounds slower than n−1/2. 5 Figure 1: Random feat. M = O(nc) required for optimal generalization. Left: α = 1. Right: α = γ. Comparison with other results. Several other papers study the generalization properties of random features, see [22] and references therein. For example, generalization bounds are derived in [20] from very general arguments. However, the corresponding generalization bound requires a number of random features much larger than the number of training examples to give O(1/√n) bounds. The basic results in [22] are analogous to those in [19] with the set GR replaced by HR. These results are closer, albeit more restrictive then ours (see Remark 8) and especially like the bounds in [19] suggest O(n) random features are needed for O(1/√n) learning bounds. A novelty in [22] is the introduction of more complex problem dependent sampling that can reduce the number of random features. In Section 3.3, we show that using possibly-data dependent random features can lead to rates much faster than n−1/2, and using much less than √n features. Remark 3 (Sketching and randomized numerical linear algebra (RandLA)). Standard sketching techniques from RandLA [24] can be recovered, when X is a bounded subset of RD, by selecting ψ(x, ω) = x⊤ω and ω sampled from suitable bounded distribution (e.g. ω = (ζ1, . . . , ζd) independent Rademacher random variables). Note however that the final goal of the analysis in the randomized numerical linear algebra community is to minimize the empirical error instead of E. 3.2 Refined Results: Fast Learning Rates Faster rates can be achieved under favorable conditions. Such conditions for kernel ridge regression are standard, but somewhat technical. Roughly speaking they characterize the “size” of the considered RKHS and the regularity of fH. The key quantity needed to make this precise is the integral operator defined by the kernel K and the marginal distribution ρX of ρ on X, that is (Lg)(x) = Z X K(x, z)g(z)dρX(z), ∀g ∈L2(X, ρX), seen as a map from L2(X, ρX) = {f : X →R | ∥f∥2 ρ = R |f(x)|2dρX < ∞} to itself. Under the assumptions of Thm. 1, the integral operator is positive, self-adjoint and trace-class (hence compact) [27]. We next define the conditions that will lead to fast rates, and then comment on their interpretation. Assumption 1 (Prior assumptions). For λ > 0, let the effective dimension be defined as N(λ) := Tr (L + λI)−1L , and assume, there exists Q > 0 and γ ∈[0, 1] such that, N(λ) ≤Q2λ−γ. (12) Moreover, assume there exists r ≥1/2 and g ∈L2(X, ρX) such that fH(x) = (Lrg)(x) a.s. (13) We provide some intuition on the meaning of the above assumptions, and defer the interested reader to [10] for more details. The effective dimension can be seen as a “measure of the size” of the RKHS H. Condition (12) allows to control the variance of the estimator and is equivalent to conditions on covering numbers and related capacity measures [26]. In particular, it holds if the eigenvalues σi’s of L decay as i−1/γ. Intuitively, a fast decay corresponds to a smaller RKHS, whereas a slow decay corresponds to a larger RKHS. The case γ = 0 is the more benign situation, whereas γ = 1 is the worst case, corresponding to the basic setting. A classic example, when X = RD, corresponds to 6 considering kernels of smoothness s, in which case γ = D/(2s) and condition (12) is equivalent to assuming H to be a Sobolev space [26]. Condition (13) allows to control the bias of the estimator and is common in approximation theory [28]. It is a regularity condition that can be seen as form of weak sparsity of fH. Roughly speaking, it requires the expansion of fH, on the the basis given by the the eigenfunctions L, to have coefficients that decay faster than σr i . A large value of r means that the coefficients decay fast and hence many are close to zero. The case r = 1/2 is the worst case, and can be shown to be equivalent to assuming fH exists. This latter situation corresponds to setting considered in the previous section. We next show how these assumptions allow to derive fast rates. Theorem 2. Let δ ∈(0, 1]. Under Asm. 1 and the same assumptions of Thm. 1, if n ≥n0, and λn = n− 1 2r+γ , then a number of random features M equal to Mn = c0 n 1+γ(2r−1) 2r+γ log 108κ2n δ , is enough to guarantee, with probability at least 1 −δ, that E( bfλn,Mn) −E(fH) ≤c1 log2 18 δ n− 2r 2r+γ , for r ≤1, and where c0, c1 do not depend on n, τ, while n0 does not depends on n, fH, ρ. The above bound is the same as the one obtained by the full kernel ridge regression estimator and is optimal in a minimax sense [10]. For large r and small γ it approaches a O(1/n) bound. When γ = 1 and r = 1/2 the worst case bound of the previous section is recovered. Interestingly, the number of random features in different regimes is typically smaller than n but can be larger than O(√n). Figure. 1 provides a pictorial representation of the number of random features needed for optimal rates in different regimes. In particular M ≪n random features are enough when γ > 0 and r > 1/2. For example for r = 1, γ = 0 (higher regularity/sparsity and a small RKHS) O(√n) are sufficient to get a rate O(1/n). But, for example, if r = 1/2, γ = 0 (not too much regularity/sparsity but a small RKHS) O(n) are needed for O(1/n) error. The proof suggests that this effect can be a byproduct of sampling features in a data-independent way. Indeed, in the next section we show how much fewer features can be used considering problem dependent sampling schemes. 3.3 Refined Results: Beyond uniform sampling We show next that fast learning rates can be achieved with fewer random features if they are somewhat compatible with the data distribution. This is made precise by the following condition. Assumption 2 (Compatibility condition). Define the maximum random features dimension as F∞(λ) = sup ω∈Ω ∥(L + λI)−1/2ψ(·, ω)∥2 ρX, λ > 0. (14) Assume there exists α ∈[0, 1], and F > 0 such that F∞(λ) ≤Fλ−α, ∀λ > 0. The above assumption is abstract and we comment on it before showing how it affects the results. The maximum random features dimension (14) relates the random features to the data-generating distribution through the operator L. It is always satisfied for α = 1 ands F = κ2. e.g. considering any random feature satisfying (6). The favorable situation corresponds to random features such that case α = γ. The following theoretical construction borrowed from [22] gives an example. Example 2 (Problem dependent RF). Assume K is a kernel with an integral representation (6). For s(ω) = ∥(L + λI)−1/2ψ(·, ω)∥−2 ρX and Cs := R 1 s(ω)dπ(ω), consider the random features ψs(x, ω) = ψ(x, ω) p Css(ω), with distribution πs(ω) := π(ω) Css(ω). We show in the Appendix that these random features provide an integral representation of K and satisfy Asm. 2 with α = γ. We next show how random features satisfying Asm. 2 can lead to better resuts. Theorem 3. Let δ ∈(0, 1]. Under Asm. 2 and the same assumptions of Thm. 1, 2, if n ≥n0, and λn = n− 1 2r+γ , then a number of random features Mn equal to Mn = c0 n α+(1+γ−α)(2r−1) 2r+γ log 108κ2n δ , 7 Figure 2: Comparison between the number of features M = O(nc) required by Nystr¨om (uniform sampling, left) [16] and Random Features (α = 1, right), for optimal generalization. is enough to guarantee, with probability at least 1 −δ, that E( bfλn,Mn) −E(fH) ≤c1 log2 18 δ n− 2r 2r+γ , where c0, c1 do not depend on n, τ, while n0 does not depends on n, fH, ρ. The above learning bound is the same as Thm. 2, but the number of random features is given by a more complex expression depending on α. In particular, in the slow O(1/√n) rates scenario, that is r = 1/2, γ = 1, we see that O(nα/2) are needed, recovering O(√n), since γ ≤α ≤1. On the contrary, for a small RKHS, that is γ = 0 and random features with α = γ, a constant (!) number of feature is sufficient. A similar trend is seen considering fast rates. For γ > 0 and r > 1/2, if α < 1 then the number of random features is always smaller, and potentially much smaller, then the number of random features sampled in a problem independent way, that is α = 1. For γ = 0 and r = 1/2, the number of number of features is O(nα) and can be again just constant if α = γ. Figure 1 depicts the number of random features required if α = γ. The above result shows the potentially dramatic effect of problem dependent random features. However the construction in Ex. 2 is theoretical. We comment on this in the next remark. Remark 4 (Random features leverage scores). The construction in Ex. 2 is theoretical, however empirical random features leverage scores bs(ω) = bv(ω)⊤(K + λnI)−1bv(ω), with bv(ω) ∈Rn, (bv(ω))i = ψ(xi, ω), can be considered. Statistically, this requires considering an extra estimation step. It seems our proof can be extended to account for this, and we will pursue this in a future work. Computationally, it requires devising approximate numerical strategies, like standard leverage scores [23]. Comparison with Nystr¨om. This question was recently considered in [21] and our results offer new insights. In particular, recalling the results in [16], we see that in the slow rate setting there is essentially no difference between random features and Nystr¨om approaches, neither from a statistical nor from a computational point of view. In the case of fast rates, Nystr¨om methods with uniform sampling requires O(n− 1 2r+γ ) random centers, which compared to Thm. 2, suggests Nystr¨om methods can be advantageous in this regime. While problem dependent random features provide a further improvement, it should be compared with the number of centers needed for Nystr¨om with leverage scores, which is O(n− γ 2r+γ ) and hence again better, see Thm. 3. In summary, both random features and Nystr¨om methods achieve optimal statistical guarantees while reducing computations. They are essentially the same in the worst case, while Nystr¨om can be better for benign problems. Finally we add a few words about the main steps in the proof. Steps of the proof. The proofs are quite technical and long and are collected in the appendices. They use a battery of tools developed to analyze KRR and related methods. The key challenges in the analysis include analyzing the bias of the estimator, the effect of noise in the outputs, the effect of random sampling in the data, the approximation due to random features and a notion of orthogonality between the function space corresponding to random features and the full RKHS. The last two points are the main elements on novelty in the proof. In particular, compared to other studies, we identify and study the quantity needed to assess the effect of the random feature approximation if the goal is prediction rather than the kernel approximation itself. 8 −11 −10.5 −10 −9.5 −9 −8.5 −8 −7.5 −7 −6.5 −6 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000n log error measured error meas ± std predicted error n −9 −8 −7 −6 −5 −4 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 n log λ measured λ meas ± std predicted λ n 1 2 3 4 5 6 7 8 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 n log m measured m meas ± std predicted m n −10 −9.5 −9 −8.5 −8 −7.5 −7 −6.5 −6 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 n log error measured error meas ± std predicted error n −7 −6.5 −6 −5.5 −5 −4.5 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 n log λ measured λ meas ± std predicted λ n 3 4 5 6 7 8 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 n log m measured m meas ± std predicted m n Figure 3: Comparison of theoretical and simulated rates for: excess risk E( bfλ,M) −inff∈H E(f), λ, M, w.r.t. n (100 repetitions). Parameters r = 11/16, γ = 1/8 (top), and r = 7/8, γ = 1/4 (bottom). 4 Numerical results While the learning bounds we present are optimal, there are no lower bounds on the number of random features, hence we present numerical experiments validating our bounds. Consider a spline kernel of order q (see [29] Eq. 2.1.7 when q integer), defined as Λq(x, x′) = P∞ k=−∞e2πikxe−2πikz|k|−q, almost everywhere on [0, 1], with q ∈R, for which we have R 1 0 Λq(x, z)Λq′(x′, z)dz = Λq+q′(x, x′), for any q, q′ ∈R. Let X = [0, 1], and ρX be the uniform distribution. For γ ∈(0, 1) and r ∈[1/2, 1] let, K(x, x′) = Λ 1 γ (x, x′), ψ(ω, x) = Λ 1 2γ (ω, x), f∗(x) = Λ r γ + 1 2 +ϵ(x, x0) with ϵ > 0, x0 ∈X. Let ρ(y|x) be a Gaussian density with variance σ2 and mean f ∗(x). Then Asm 1, 2 are satisfied and α = γ. We compute the KRR estimator for n ∈{103, . . . , 104} and select λ minimizing the excess risk computed analytically. Then we compute the RF-KRR estimator and select the number of features M needed to obtain an excess risk within 5% of the one by KRR. In Figure 3, the theoretical and estimated behavior of the excess risk, λ and M with respect to n are reported together with their standard deviation over 100 repetitions. The experiment shows that the predictions by Thm. 3 are accurate, since the theoretical predictions estimations are within one standard deviation from the values measured in the simulation. 5 Conclusion In this paper, we provide a thorough analyses of the generalization properties of random features with ridge regression. We consider a statistical learning theory setting where data are noisy and sampled at random. Our main results show that there are large classes of learning problems where random features allow to reduce computations while preserving optimal statistical accuracy of exact kernel ridge regression. This in contrast with previous state of the art results suggesting computational gains needs to be traded-off with statistical accuracy. Our results open several venues for both theoretical and empirical work. As mentioned in the paper, it would be interesting to analyze random features with empirical leverage scores. This is immediate if input points are fixed, but our approach should allow to also consider the statistical learning setting. Beyond KRR, it would be interesting to analyze random features together with other approaches, in particular accelerated and stochastic gradient methods, or distributed techniques. It should be possible to extend the results in the paper to consider these cases. A more substantial generalization would be to consider loss functions other than quadratic loss, since this require different techniques from empirical process theory. Acknowledgments The authors gratefully acknowledge the contribution of Raffaello Camoriano who was involved in the initial phase of this project. These preliminary result appeared in the 2016 NIPS workshop “Adaptive and Scalable Nonparametric Methods in ML”. This work is funded by the Air Force project FA955017-1-0390 (European Office of Aerospace Research and Development) and by the FIRB project RBFR12M3AC (Italian Ministry of Education, University and Research). 9 References [1] V. Vapnik. Statistical learning theory, volume 1. Wiley New York, 1998. [2] F. Cucker and S. Smale. On the mathematical foundations of learning. Bulletin of the AMS, 39:1–49, 2002. [3] C. Bishop. Pattern Recognition and Machine Learning. Springer, 2006. [4] T. Poggio and F. Girosi. Networks for approximation and learning. Proceedings of the IEEE, 1990. [5] A. Pinkus. Approximation theory of the mlp model in neural networks. Acta Numerica, 8:143–195, 1999. [6] B. Sch¨olkopf and A. J. Smola. Learning with Kernels: Support Vector Machines, Regularization, Optimization, and Beyond (Adaptive Computation and Machine Learning). MIT Press, 2002. [7] N. Aronszajn. Theory of reproducing kernels. Transactions of the AMS, 68(3):337–404, 1950. [8] G. S. Kimeldorf and G. Wahba. A correspondence between bayesian estimation on stochastic processes and smoothing by splines. The Annals of Mathematical Statistics, 41(2):495–502, 1970. [9] B. Sch¨olkopf, R. Herbrich, and A. J. Smola. A generalized representer theorem. In Computational learning theory, pages 416–426. Springer, 2001. [10] A. Caponnetto and E. De Vito. Optimal rates for the regularized least-squares algorithm. FoCM, 2007. [11] A. J. Smola and B. Sch¨olkopf. Sparse greedy matrix approximation for machine learning. In ICML, 2000. [12] C. Williams and M. Seeger. Using the nystr¨om method to speed up kernel machines. In NIPS, 2000. [13] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In NIPS, 2007. [14] F. Bach. Sharp analysis of low-rank kernel matrix approximations. In COLT, 2013. [15] A. Alaoui and M. Mahoney. Fast randomized kernel ridge regression with statistical guarantees. In NIPS. 2015. [16] A. Rudi, R. Camoriano, and L. Rosasco. Less is more: Nystr¨om computational regularization. In NIPS. 2015. [17] B. K. Sriperumbudur and Z. Szabo. Optimal rates for random fourier features. ArXiv e-prints, June 2015. [18] Yaniv Plan and Roman Vershynin. Dimension reduction by random hyperplane tessellations. Discrete & Computational Geometry, 51(2):438–461, 2014. [19] Ali Rahimi and Benjamin Recht. Weighted sums of random kitchen sinks: Replacing minimization with randomization in learning. In NIPS, 2009. [20] C. Cortes, M. Mohri, and A. Talwalkar. On the impact of kernel approximation on learning accuracy. In AISTATS, 2010. [21] T. Yang, Y. Li, M. Mahdavi, R. Jin, and Z. Zhou. Nystr¨om method vs random fourier features: A theoretical and empirical comparison. In NIPS, pages 485–493, 2012. [22] F. Bach. On the equivalence between quadrature rules and random features. ArXiv e-prints, February 2015. [23] P. Drineas, M. Magdon-Ismail, M. W. Mahoney, and D. P. Woodruff. Fast approximation of matrix coherence and statistical leverage. JMLR, 13:3475–3506, 2012. [24] N. Halko, P. Martinsson, and J. A. Tropp. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM review, 53(2):217–288, 2011. [25] Y. Cho and L. K. Saul. Kernel methods for deep learning. In Y. Bengio, D. Schuurmans, J.D. Lafferty, C.K.I. Williams, and A. Culotta, editors, NIPS, pages 342–350. 2009. [26] I. Steinwart and A. Christmann. Support Vector Machines. Springer New York, 2008. [27] S. Smale and D. Zhou. Learning theory estimates via integral operators and their approximations. Constructive approximation, 26(2):153–172, 2007. [28] S. Smale and D. Zhou. Estimating the approximation error in learning theory. Analysis and Applications, 1(01):17–41, 2003. 10 [29] G. Wahba. Spline Models for Observational Data, volume 59 of CBMS-NSF Regional Conference Series in Applied Mathematics. SIAM, Philadelphia, 1990. [30] E. De Vito, L. Rosasco, A. Caponnetto, U. D. Giovannini, and F. Odone. Learning from examples as an inverse problem. In JMLR, pages 883–904, 2005. [31] S. Boucheron, G. Lugosi, and O. Bousquet. Concentration inequalities. In Advanced Lectures on Machine Learning. 2004. [32] V. V. Yurinsky. Sums and Gaussian vectors. 1995. [33] J. A. Tropp. User-friendly tools for random matrices: An introduction. 2012. [34] S. Minsker. On some extensions of bernstein’s inequality for self-adjoint operators. arXiv, 2011. [35] J. Fujii, M. Fujii, T. Furuta, and R. Nakamoto. Norm inequalities equivalent to heinz inequality. Proceedings of the American Mathematical Society, 118(3), 1993. [36] Andrea Caponnetto and Yuan Yao. Adaptation for regularization operators in learning theory. Technical report, DTIC Document, 2006. [37] Rajendra Bhatia. Matrix analysis, volume 169. Springer Science & Business Media, 2013. [38] M. Raginsky and S. Lazebnik. Locality-sensitive binary codes from shift-invariant kernels. In NIPS, 2009. [39] P. Kar and H. Karnick. Random feature maps for dot product kernels. In AISTATS, 2012. [40] N. Pham and R. Pagh. Fast and scalable polynomial kernels via explicit feature maps. In Proceedings of the 19th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 239–247. ACM, 2013. [41] Q. Le, T. Sarl´os, and A. Smola. Fastfood - computing hilbert space expansions in loglinear time. In ICML, 2013. [42] J. Yang, V. Sindhwani, Q. Fan, H. Avron, and M. Mahoney. Random laplace feature maps for semigroup kernels on histograms. In Computer Vision and Pattern Recognition (CVPR), 2014 IEEE Conference on, pages 971–978. IEEE, 2014. [43] R. Hamid, Y. Xiao, A. Gittens, and D. Decoste. Compact random feature maps. In ICML, pages 19–27, 2014. [44] J. Yang, V. Sindhwani, H. Avron, and M. W. Mahoney. Quasi-monte carlo feature maps for shift-invariant kernels. In ICML, volume 32 of JMLR Proceedings, pages 485–493. JMLR.org, 2014. [45] Ingo Steinwart, Don Hush, and Clint Scovel. An explicit description of the reproducing kernel hilbert spaces of gaussian rbf kernels. IEEE Transactions on Information Theory, 52(10):4635–4643, 2006. [46] A. Vedaldi and A. Zisserman. Efficient additive kernels via explicit feature maps. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 34(3):480–492, 2012. 11 | 2017 | 250 |
6,731 | Predictive-State Decoders: Encoding the Future into Recurrent Networks Arun Venkatraman1∗, Nicholas Rhinehart1∗, Wen Sun1, Lerrel Pinto1, Martial Hebert1, Byron Boots2, Kris M. Kitani1, J. Andrew Bagnell1 1The Robotics Institute, Carnegie-Mellon University, Pittsburgh, PA 2School of Interactive Computing, Georgia Institute of Technology, Atlanta, GA Abstract Recurrent neural networks (RNNs) are a vital modeling technique that rely on internal states learned indirectly by optimization of a supervised, unsupervised, or reinforcement training loss. RNNs are used to model dynamic processes that are characterized by underlying latent states whose form is often unknown, precluding its analytic representation inside an RNN. In the Predictive-State Representation (PSR) literature, latent state processes are modeled by an internal state representation that directly models the distribution of future observations, and most recent work in this area has relied on explicitly representing and targeting sufficient statistics of this probability distribution. We seek to combine the advantages of RNNs and PSRs by augmenting existing state-of-the-art recurrent neural networks with PREDICTIVE-STATE DECODERS (PSDs), which add supervision to the network’s internal state representation to target predicting future observations. PSDs are simple to implement and easily incorporated into existing training pipelines via additional loss regularization. We demonstrate the effectiveness of PSDs with experimental results in three different domains: probabilistic filtering, Imitation Learning, and Reinforcement Learning. In each, our method improves statistical performance of state-of-the-art recurrent baselines and does so with fewer iterations and less data. 1 Introduction Despite their wide success in a variety of domains, recurrent neural networks (RNNs) are often inhibited by the difficulty of learning an internal state representation. Internal state is a unifying characteristic of RNNs, as it serves as an RNN’s memory. Learning these internal states is challenging because optimization is guided by the indirect signal of the RNN’s target task, such as maximizing the cost-to-go for reinforcement learning or maximizing the likelihood of a sequence of words. These target tasks have a latent state sequence that characterizes the underlying sequential data-generating process. Unfortunately, most settings do not afford a parametric model of latent state that is available to the learner. However, recent work has shown that in certain settings, latent states can be characterized by observations alone [8, 24, 26] – which are almost always available to recurrent models. In such partially-observable problems (e.g. Fig. 1a), a single observation is not guaranteed to contain enough information to fully represent the system’s latent state. For example, a single image of a robot is insufficient to characterize its latent velocity and acceleration. While a latent state parametrization may be known in some domains – e.g. a simple pendulum can be sufficiently modeled by its angle and angular velocity (θ, ˙θ) – data from most domains cannot be explicitly parametrized. ∗Contributed equally to this work. Direct correspondence to: {arunvenk,nrhineha}@cs.cmu.edu 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. (a) The process generating sequential data has latent state st which generates the next latent state st+1. st is usually unknown but generates the observations xt which are used to learn a model for the system. (b) An overview of our approach for modelling the process from Fig. 1a. We attach a decoder to the internal state of an RNN to predict statistics of future observations xt to xt+k observed at training time. Figure 1: Data generation process and proposed model In lieu of ground truth access to latent states, recurrent neural networks [32, 47] employ internal states to summarize previous data, serving as a learner’s memory. We avoid the terminology “hidden state" as it refers to the internal state in the RNN literature but refers to the latent state in the HMM, PSR, and related literature. Internal states are modified towards minimizing the target application’s loss, e.g., minimizing observation loss in filtering or cumulative reward in reinforcement learning. The target application’s loss is not directly defined over the internal states: they are updated via the chain rule (backpropagation) through the global loss. Although this modeling is indirect, recurrent networks nonetheless can achieve state-of-the-art results on many robotics [18, 23], vision [34, 50], and natural language tasks [15, 20, 38] when training succeeds. However, recurrent model optimization is hampered by two main difficulties: 1) non-convexity, and 2) the loss does not directly encourage the internal state to model the latent state. A poor internal state representation can yield poor task performance, but rarely does the task objective directly measure the quality of the internal state. Predictive-State Representations (PSRs) [8, 24, 26] offer an alternative internal state representation to that of RNNs in terms of the available observations. Spectral learning methods for PSRs provide theoretical guarantees on discovering the global optimum for the model and internal state parameters under the assumptions of infinite training data and realizability. However, in the non-realizable setting – i.e. model mismatch (e.g., using learned parameters of a linear system model for a non-linear system) – these algorithms lose any performance guarantees on using the learned model for the target inference tasks. Extensions to handle nonlinear systems rely on RKHS embeddings [43], which themselves can be computationally infeasible to use with large datasets. Nevertheless, when these models are trainable, they often achieve strong performance [24, 45]; the structure they impose significantly simplifies the learning problem. We leverage ideas from the both RNN and PSR paradigms, resulting in a marriage of two orthogonal sequential modeling approaches. When training an RNN, PREDICTIVE-STATE DECODERS (Fig. 1b) provide direct supervision on the internal state, aiding the training problem. The proposed method can be viewed as an instance of Multi-Task Learning (MTL) [13] and self-supervision [27], using the inputs to the learner to form a secondary unsupervised objective. Our contribution is a general method that improves performance of learning RNNs for sequential prediction problems. The approach is easy to implement as a regularizer on traditional RNN loss functions with little overhead and can thus be incorporated into a variety of existing recurrent models. In our experiments, we examine three domains where recurrent models are used to model temporal dependencies: probabilistic filtering, where we predict the future observation given past observations; Imitation Learning, where the learner attempts to mimic an expert’s actions; and Reinforcement Learning, where a policy is trained to maximize cumulative reward. We observe that our method improves loss convergence rates and results in higher-quality final objectives in these domains. 2 Latent State Space Models To model sequential prediction problems, it is common to cast the problem into the Markov Process framework. Predictive distributions in this framework satisfy the Markov property: P(st+1|st, st−1, . . . , s0) = P(st+1|st) (1) 2 Figure 2: Learning recurrent models consists of learning a function f that updates the internal state ht given the latest observation xt. The internal state may also be used to predict targets yt, such as control actions for imitation and reinforcement learning. These are then inputs to a loss function ℓ which accumulate as the multi-step loss L over all timesteps. where st is the latent state of the system at timestep t. Intuitively, this property tells us that the future st+1 is only dependent on the current state2 st and does not depend on any previous state s0, . . . , st−1. As st is latent, the learner only has access to observations xt, which are produced by st. For example, in robotics, xt may be joint angles from sensors or a scene observed as an image. A common graphical model representation is shown in Fig. 1a. The machine learning problem is to find a model f that uses the latest observation xt to recursively update an internal state, denoted ht, illustrated in Fig. 2. Note that ht is distinct from st. ht is the learner’s internal state, and st is the underlying configuration of the data-generating Markov Process. For example, the internal state in the Bayesian filtering/POMDP setup is represented as a belief state [49], a “memory" unit in neural networks, or as a distribution over observations for PSRs. Unlike traditional supervised machine learning problems, learning models for latent state problems must be accomplished without ground-truth supervision of the internal states themselves. Two distinct paradigms for latent state modeling exist. The first are discriminative approaches based on RNNs, and the second is a set of theoretically well-studied approaches based on Predictive-State Representations. In the following sections we provide a brief overview of each class of approach. 2.1 Recurrent Models and RNNs A classical supervised machine learning approach for learning internal models involves choosing an explicit parametrization for the internal states and assuming ground-truth access to these states and observations at training time [17, 29, 33, 37]. These models focus on learning only the recursive model f in Fig. 2, assuming access to the st (Fig. 1a) at training time. Another class of approaches drop the assumption of access to ground truth but still assume a parametrization of the internal state. These models set up a multi-step prediction error and use expectation maximization to alternate between optimizing over the model’s parameters and the internal state values [2, 19, 16]. While imposing a fixed representation on the internal state adds structure to the learning problem, it can limit performance. For many problems such as speech recognition [20] or text generation [48], it is difficult to fully represent a latent state inside the model’s internal state. Instead, typical machine learning solutions rely on the Recurrent Neural Network architecture. The RNN model (Fig. 2) uses the internal state to make predictions yt = f(ht, xt) and is trained by minimizing a series of loss functions ℓt over each prediction, as shown in the following optimization problem: min f L = min f X t ℓt(f(ht, xt)) (2) The loss functions ℓt are usually application- and domain-specific. For example, in a probabilistic filtering problem, the objective may be to minimize the negative log-likelihood of the observations [4, 52] or the prediction of the next observation [34]. For imitation learning, this objective function will penalize deviation of the prediction from the expert’s action [39], and for policygradient reinforcement learning methods, the objective includes the log-likelihood of choosing actions weighted by their observed returns. In general, the task objective optimized by the network does not directly specify a loss directly over the values of the internal state ht. 2In Markov Decision Processes (MDPs), P(st+1|st) may depend on an action taken at st. 3 The general difficulty with the objective in Eq. (2) is that the recurrence with f results in a highly non-convex and difficult optimization [2]. RNN models are thus often trained with backpropagation-through-time (BPTT) [55]. BPTT allows future losses incurred at timestep t to be back-propogated and affect the parameter updates to f. These updates to f then change the distribution of internal states computed during the next forward pass through time. The difficulty is then that small updates to f can drastically change the distribution of ht, sometimes resulting in error exponential in the time horizon [53]. This “diffusion problem" can yield an unstable training procedure with exponentially exploding or vanishing gradients [7]. While techniques such as truncated gradients [47] or gradient-clipping [35] can alleviate some of these problems, each of these techniques yields stability by discarding information about how future observations and predictions should backpropagate through the current internal state. A significant innovation in training internal states with long-term dependence was the LSTM [25]. Many variants on LSTMs exist (e.g. GRUs [14]), yet in the domains evaluated by Greff et al. [21], none consistently exhibit statistically significant improvements over LSTMs. In the next section, we discuss a different paradigm for learning temporal models. In contrast with the open-ended internal-state learned by RNNs, Predictive-State methods do not parameterize a specific representation of the internal state but use certain assumptions to construct a mathematical structure in terms of the observations to find a globally optimal representation. 2.2 Predictive-State Models Predictive-State Representations (PSRs) address the problem of finding an internal state by formulating the representation directly in terms of observable quantities. Instead of targeting a prediction loss as with RNNs, PSRs define a belief over the distribution of k future observations, gt = [xT t , ..., xT t+k−1]T ∈Rkn given all the past observations pt = [x0, . . . xt−1] [10]. In the case of linear systems, this k is similar to the rank of the observability matrix [6]. The key assumption in PSRs is that the definition of state is equivalent to having sufficient information to predict everything about gt at time-step t [42], i.e. there is a bijective function that maps P(st|pt−1) – the distribution of latent state given the past – to P(gt|pt−1) – the belief over future observations. Spectral learning approaches were developed to find an globally optimal internal state representation and the transition model f for these Predictive-State models. In the controls literature, these approaches were developed as subspace identification [51], and in the ML literature as spectral approaches for partially-observed systems [9, 8, 26, 56]. A significant improvement in model learning was developed by Boots et al. [10], Hefny et al. [24], where sufficient feature functions φ (e.g., moments) map distributions P(gt|pt) to points in feature space E [φ(gt)|pt]. For example, E [φ(gt)|pt] = E gt, gtgT t |pt are the sufficient statistics for a Gaussian distribution. With this representation, learning latent state prediction models can be reduced to supervised learning. Hefny et al. [24] used this along with Instrumental Variable Regression [11] to develop a procedure that, in the limit of infinite data, and under a linear-system realiziablity assumption, would converge to the globally optimal solution. Sun et al. [45] extended this setup to create a practical algorithm, Predictive-State Inference Machines (PSIMs) [44, 45, 54], based on the concept of inference machines [31, 40]. Unlike in Hefny et al. [24], which attempted to find a generative observation model and transition model, PSIMs directly learned the filter function, an operator f, that can deterministically pass the predictive states forward in time conditioned on the latest observation, by minimizing the following loss over f: ℓp = X t ∥φ(gt+1) −f(ht, xt)∥2 , ht+1 = f(ht, xt) (3) This loss function, which we call the predictive-state loss, forms the basis of our PREDICTIVE-STATE DECODERS. By minimizing this supervised loss function, PSIM assigns statistical meaning to internal states: it forces the internal state ht to match sufficient statistics of future observations E [φ(gt)|pt] at every timestep t. We observe an empirical sample of the future gt = [xt, . . . , xt+k] at each timestep by looking into the future in the training dataset or by waiting for streaming future observations. Whereas [45] primarily studied algorithms for minimizing the predictive-state loss, we adapt it to augment general recurrent models such as LSTMs and for a wider variety of applications such as imitation and reinforcement learning. 4 Figure 3: Predictive-State Decoders Architecture. We augment the RNN from Fig. 2 with an additional objective function R which targets decoding of the internal state through F at each time step to the predictive-state which is represented as statistics over the future observations. 3 Predictive-State Decoders Our PREDICTIVE-STATE DECODERS architecture extends the Predictive-State Representation idea to general recurrent architectures. We hypothesize that by encouraging the internal states to encode information sufficient for reconstructing the predictive state, the resulting internal states better capture the underlying dynamics and learning can be improved. The result is a simple-to-implement objective function which is coupled with the existing RNN loss. To represent arbitrary sizes and values of PSRs with a fixed-size internal state in the recurrent network, we attach a decoding module F(·) to the internal states to produce the resulting PSR estimates. Figure 3 illustrates our approach. Our PSD objective R is the predictive-state loss: R = X t ∥F(ht) −φ([xt+1, xt+2, . . .])∥2 2 , ht = f(ht−1, xt−1), (4) where F is a decoder that maps from the internal state ht to an empirical sample of the predictivestate, computed from a sequence of observed future observations available at training. The network is optimized by minimizing the weighted total loss function L + λR where λ is the weighting on the predictive-state objective R. This penalty encourages the internal states to encode information sufficient for directly predicting sufficient future observations. Unlike more standard regularization techniques, R does not regularize the parameters of the network but instead regularizes the output variables, the internal states predicted by the network. Our method may be interpreted as an instance of Multi-Task Learning (MTL) [13]. MTL has found use in recent deep neural networks [5, 27, 30]. The idea of MTL is to employ a shared representation to perform complementary or similar tasks. When the learner exhibits good performance on one task, some of its understanding can be transferred to a related task. In our case, forcing RNNs to be able to more explicitly reason about the future they will encounter is an intuitive and general method. Endowing RNNs with a theoretically-motivated representation of the future better enables them to serve their purpose of making sequential predictions, resulting in more effective learning. This difference is pronounced in applications such as imitation and reinforcement learning (Sections 4.2 and 4.3) where the primary objective is to find a control policy to maximize accumulated future reward while receiving only observations from the system. MTL with PSDs supervises the network to predict the future and implicitly the consequences of the learned policy. Finally, our PSD objective can be considered an instance of self-supervision [27] as it uses the inputs to the learner to form a secondary unsupervised objective. As discussed in Section 2.1, the purpose of the internal state in recurrent network models (RNNs, LSTMs, deep, or otherwise) is to capture a quantity similar to that of state. Ideally, the learner would be able to back-propagate through the primary objective function L and discover the best representation of the latent state of the system towards minimizing the objective. However, as this problem highly non-convex, BPTT often yields a locally-optimal solution in a basin determined by the initialization of the parameters and the dataset. By introducing R, the space of feasible models is reduced. We observe next how this objective leads our method to find better models. 5 0 100 200 300 400 500 Iteration 100 101 Observation Loss Pendulum GRU Network Baseline k = 2, λ = 1.0 k = 2, λ = 10.0 k = 5, λ = 1.0 k = 5, λ = 10.0 0 100 200 300 400 500 Iteration 101 8 × 100 9 × 100 Observation Loss Helicopter GRU Network Baseline k = 2, λ = 1.0 k = 2, λ = 10.0 k = 5, λ = 1.0 k = 5, λ = 10.0 0 100 200 300 400 500 Iteration 2 × 101 3 × 101 4 × 101 6 × 101 Observation Loss Hopper GRU Network Baseline k = 2, λ = 1.0 k = 5, λ = 5.0 k = 5, λ = 10.0 k = 10, λ = 5.0 0 100 200 300 400 500 Iteration 100 101 Observation Loss Pendulum LSTM Network Baseline k = 2, λ = 1.0 k = 2, λ = 10.0 k = 5, λ = 1.0 k = 5, λ = 10.0 (a) Pendulum 0 100 200 300 400 500 Iteration 101 9 × 100 Observation Loss Helicopter LSTM Network Baseline k = 2, λ = 1.0 k = 2, λ = 10.0 k = 5, λ = 1.0 k = 5, λ = 10.0 (b) Helicopter 0 100 200 300 400 500 Iteration 2 × 101 3 × 101 4 × 101 6 × 101 Observation Loss Hopper LSTM Network Baseline k = 2, λ = 10.0 k = 5, λ = 0.5 k = 5, λ = 10.0 k = 10, λ = 10.0 (c) Hopper Figure 4: Loss over predicting future observations during filtering. For both RNNs with GRU cells (top) and with with LSTM cells (bottom), adding PSDs to the RNN networks can often improve performance and convergence rate. 4 Experiments We present results on problems of increasing complexity for recurrent models: probabilistic filtering, Imitation Learning (IL), and Reinforcement Learning (RL). The first is easiest, as the goal is to predict the next future observation given the current observation and internal state. For imitation learning, the recurrent model is given training-time expert guidance with the goal of choosing actions to maximize the sequence of future rewards. Finally, we analyze the challenging domain of reinforcement learning, where the goal is the same as imitation learning but expert guidance is unavailable. PREDICTIVE-STATE DECODERS require two hyperparameters: k, the number of observations to characterize the predictive state and λ, the regularization trade-off factor. In most cases, we primarily tune λ, and set k to one of {2, . . . , 10}. For each domain, for each k, there were λ values for which the performance was worse than the baseline. However, for many sets of hyperparameters, the performance exceeded the baselines. Most notably, for many experiments, the convergence rate was significantly better using PSDs, implying that PSDs allows for more efficient data utilization for learning recurrent models. PSDs also require a specification of two other parameters in the architecture: the featurization function φ and decoding module F. For simplicity, we use an affine function as the decoder F in Eq. (4). The results presented below use an identity featurization φ for the presented results but include a short discussion of second order featurization. We find that in each domain, we are able to improve the performance of the state-of-the-art baselines. We observe improvements with both GRU and LSTM cells across a range of k and λ. In IL with PSDs, we come significantly closer and occasionally eclipse the expert’s performance, whereas the baselines never do. In our RL experiments, our method achieves statistically significant improvements over the state-of-the-art approach of [18, 41] on the 5 different settings we tested. 4.1 Probabilistic Filtering In the probabilistic filtering problem, the goal is to predict the future from the current internal state. Recurrent models for filtering use a multi-step objective function that maximizes the likelihood of the future observations over the internal states and dynamics model f’s parameters. Under a Gaussian assumption (e.g. like a Kalman filter [22]), the equivalent objective that minimizes the negative log-likelihood is given as L = P t ∥xt+1 −f(xt, ht)∥2. While traditional methods would explicitly solve for parametric internal states ht using an EM style approach, we use BPTT to implicitly find an non-parametric internal state. We optimize the 6 Figure 5: Cumulative rewards for AggreVaTeD and AggreVaTeD+PREDICTIVE-STATE DECODERS on partially observable Acrobot and CartPole with both LSTM cells and GRU cells averaged over 15 runs with different random seeds. end-to-end filtering performance through the PSD joint objective minf,F L + λR. Our experimental results are shown in Fig. 4. The experiments were run with φ as the identity, capturing statistics representing the first moment. We tested φ as second-order statistics and found while the performance improved over the baseline, it was outperformed by the first moment. In all environments, a dataset was collected using a preset control policy. In the Pendulum experiments, we predict the pendulum’s angle θ. The LQR controlled Helicopter experiments [3] use a noisy state as the observation, and the Hopper dataset was generated using the OpenAI simulation [12] with robust policy optimization algorithm [36] as the controller. We test each environment with Tensorflow’s built-in GRU and LSTM cells [1]. We sweep over various k and λ hyperparameters and present the average results and standard deviations from runs with different random seeds. Fig. 4 baselines are recurrent models equivalent to PSDs with λ = 0. 4.2 Imitation Learning We experiment with the partially observable CartPole and Acrobot domains3 from OpenAI Gym [12]. We applied the method of AggreVaTeD [46], a policy-gradient method, to train our expert models. AggreVaTeD uses access to a cost-to-go oracle in order to train a policy that is sensitive to the value of the expert’s actions, providing an advantage over behavior cloning IL approaches. The experts have access to the full state of the robots, unlike the learned recurrent policies. We tune the parameters of LSTM and GRU agents (e.g., learning rate, number of internal units) and afterwards only tune λ for PSDs. In Fig. 5, we observe that PSDs improve performance for both GRUand LSTM-based agents and increasing the predictive-state horizon k yields better results. Notably, PSDs achieves 73% relative improvement over baseline LSTM and 42% over GRU on Cartpole. Difference random seeds were used. The cumulative reward of the current best policy is shown. 4.3 Reinforcement Learning Reinforcement learning (RL) increases the problem complexity from imitation learning by removing expert guidance. The latent state of the system is heavily influenced by the RL agent itself and changes as the policy improves. We use [18]’s implementation of TRPO [41], a Natural Policy 3The observation function only provides positional information (including joint angles), excluding velocities. 7 TRPO TRPO+PSD Figure 6: Walker Cumulative Rewards and Sorted Percentiles. N = 15, 5e4 TRPO steps per iteration. Table 1: Top: Mean Average Returns ± one standard deviation, with N = 15 for Walker2d† and N = 30 otherwise. Bottom: Relative improvement of on the means. ∗indicates p < 0.05 and ∗∗indicates p < 0.005 on Wilcoxon’s signed-rank test for significance of improvement. All runs computed with 5e3 transitions per iteration, except Walker2d†, with 5e4. Swimmer HalfCheetah Hopper Walker2d Walker2d† [41] 91.3 ± 25.5 330 ± 158 1103 ± 264 383 ± 96 1396 ± 396 [41]+PSDs 97.0 ± 19.4 372 ± 143 1195 ± 272 416 ± 88 1611 ± 436 Rel. ∆ 6.30%∗ 13.0%∗ 9.06%∗ 8.59%∗ 15.4%∗∗ Gradient method [28]. Although [41] defines a KL-constraint on policy parameters that affect actions, our implementation of PSDs introduces parameters (those of the decoder) that are unaffected by the constraint, as the decoder does not directly govern the agent’s actions. In these experiments, results are highly stochastic due to both environment randomness and nondeterministic parallelization of rllab [18]. We therefore repeat each experiment at least 15 times with paired random seeds. We use k = 2 for most experiments (k = 4 for Hopper), the identity featurization for φ, and vary λ in 101, 100, . . . , 10−6 , and employ the LSTM cell and other default parameters of TRPO. We report the same metric as [18]: per-TRPO batch average return across learning iterations. Additionally, we report per-run performance by plotting the sorted average TRPO batch returns (each item is a number representing a method’s performance for a single seed). Figs. 6 and 7 demonstrate that our method generally produces higher-quality results than the baseline. These results are further summarized by their means and stds. in Table 1. In Figure 6, 40% of our method’s models are better than the best baseline model. In Figure 7c, 25% of our method’s models are better than the second-best (98th percentile) baseline model. We compare various RNN cells in Table 2, and find our method can improve Basic (linear + tanh nonlinearity), GRU, and LSTM RNNs, and usually reduces the performance variance. We used Tensorflow [1] and passed both the “hidden" and “cell" components of an LSTM’s internal state to the decoder. We also conducted preliminary additional experiments with second order featurization (φ(x) = [x, vec(xxT )]). Corresponding to Tab. 2, column 1 for the inverted pendulum, second order features yielded 861 ± 41, a 4.9% improvement in the mean and a large reduction in variance. 5 Conclusion We introduced a theoretically-motivated method for improving the training of RNNs. Our method stems from previous literature that assigns statistical meaning to a learner’s internal state for modelling latent state of the data-generating processes. Our approach uses the objective in PSIMs and applies it to more complicated recurrent models such as LSTMs and GRUs and to objectives beyond probabilistic filtering such as imitation and reinforcement learning. We show that our straightforward method improves performance across all domains with which we experimented. 8 TRPO TRPO+PSD (a) Swimmer, N=30 (b) HalfCheetah, N=30 (c) Hopper, N=40 Figure 7: Top: Per-iteration average returns for TRPO and TRPO+PREDICTIVE-STATE DECODERS vs. batch iteration, with 5e3 steps per iteration. Bottom: Sorted per-run mean (across iterations) average returns. Our method generally produces better models. Table 2: Variations of RNN units. Mean Average Returns ± one standard deviation, with N = 20. 1e3 transitions per iteration are used. Our method can improve each recurrent unit we tested. InvertedPendulum Swimmer Basic GRU LSTM Basic GRU LSTM [41] 820 ± 139 673 ± 268 640 ± 265 66.0 ± 21.4 64.6 ± 55.3 56.5 ± 23.8 [41]+PSDs 820 ± 118 782 ± 183 784 ± 215 71.4 ± 26.9 75.1 ± 28.8 61.0 ± 23.8 Rel. ∆ −0.08% 20.4% 22.6% 8.21% 16.1% 7.94% Acknowledgements This material is based upon work supported in part by: Office of Naval Research (ONR) contract N000141512365, and National Science Foundation NRI award number 1637758. References [1] Martín Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467, 2016. [2] Pieter Abbeel and Andrew Y Ng. Learning first-order markov models for control. In NIPS, pages 1–8, 2005. [3] Pieter Abbeel and Andrew Y Ng. Exploration and apprenticeship learning in reinforcement learning. In ICML, pages 1–8. ACM, 2005. [4] Pieter Abbeel, Adam Coates, Michael Montemerlo, Andrew Y Ng, and Sebastian Thrun. Discriminative training of kalman filters. In Robotics: Science and Systems (RSS), 2005. [5] Pulkit Agrawal, Ashvin V Nair, Pieter Abbeel, Jitendra Malik, and Sergey Levine. Learning to poke by poking: Experiential learning of intuitive physics. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 5074–5082. Curran Associates, Inc., 2016. [6] Karl Johan Aström and Richard M Murray. Feedback systems: an introduction for scientists and engineers. Princeton university press, 2010. 9 [7] Yoshua Bengio, Patrice Simard, and Paolo Frasconi. Learning long-term dependencies with gradient descent is difficult. Neural Networks, IEEE Transactions on, 5(2):157–166, 1994. [8] Byron Boots. Spectral Approaches to Learning Predictive Representations. PhD thesis, Carnegie Mellon University, December 2012. [9] Byron Boots, Sajid M Siddiqi, and Geoffrey J Gordon. Closing the learning-planning loop with predictive state representations. The International Journal of Robotics Research, 30(7): 954–966, 2011. [10] Byron Boots, Arthur Gretton, and Geoffrey J. Gordon. Hilbert space embeddings of predictive state representations. In UAI-2013, 2013. [11] Roger J Bowden and Darrell A Turkington. Instrumental variables. Number 8. Cambridge University Press, 1990. [12] Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym. arXiv preprint arXiv:1606.01540, 2016. [13] Rich Caruana. Multitask learning. In Learning to learn, pages 95–133. Springer, 1998. [14] Kyunghyun Cho, Bart Van Merriënboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoderdecoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014. [15] Junyoung Chung, Kyle Kastner, Laurent Dinh, Kratarth Goel, Aaron C Courville, and Yoshua Bengio. A recurrent latent variable model for sequential data. In Advances in neural information processing systems, pages 2980–2988, 2015. [16] Adam Coates, Pieter Abbeel, and Andrew Y. Ng. Learning for control from multiple demonstrations. In ICML, pages 144–151, New York, NY, USA, 2008. ACM. [17] Marc Peter Deisenroth, Marco F Huber, and Uwe D Hanebeck. Analytic moment-based gaussian process filtering. In International Conference on Machine Learning, pages 225–232. ACM, 2009. [18] Yan Duan, Xi Chen, Rein Houthooft, John Schulman, and Pieter Abbeel. Benchmarking deep reinforcement learning for continuous control. In Proceedings of the 33rd International Conference on Machine Learning (ICML), 2016. [19] Zoubin Ghahramani and Sam T Roweis. Learning nonlinear dynamical systems using an EM algorithm. pages 431—-437, 1999. [20] Alex Graves and Navdeep Jaitly. Towards end-to-end speech recognition with recurrent neural networks. In ICML, volume 14, pages 1764–1772, 2014. [21] Klaus Greff, Rupesh K Srivastava, Jan Koutník, Bas R Steunebrink, and Jürgen Schmidhuber. Lstm: A search space odyssey. IEEE transactions on neural networks and learning systems, 2016. [22] Tuomas Haarnoja, Anurag Ajay, Sergey Levine, and Pieter Abbeel. Backprop kf: Learning discriminative deterministic state estimators. NIPS, 2016. [23] Matthew Hausknecht and Peter Stone. Deep recurrent q-learning for partially observable mdps. arXiv preprint arXiv:1507.06527, 2015. [24] Ahmed Hefny, Carlton Downey, and Geoffrey J Gordon. Supervised learning for dynamical system learning. In NIPS, 2015. [25] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8): 1735–1780, 1997. [26] Daniel Hsu, Sham M. Kakade, and Tong Zhang. A spectral algorithm for learning hidden markov models. In COLT, 2009. [27] Max Jaderberg, Volodymyr Mnih, Wojciech Marian Czarnecki, Tom Schaul, Joel Z. Leibo, David Silver, and Koray Kavukcuoglu. Reinforcement learning with unsupervised auxiliary tasks. CoRR, abs/1611.05397, 2016. URL http://arxiv.org/abs/1611.05397. [28] Sham Kakade. A natural policy gradient. Advances in neural information processing systems, 2:1531–1538, 2002. [29] J Ko, D J Klein, D Fox, and D Haehnel. GP-UKF: Unscented kalman filters with Gaussian process prediction and observation models. pages 1901–1907, 2007. 10 [30] Iasonas Kokkinos. Ubernet: Training a ’universal’ convolutional neural network for low-, mid-, and high-level vision using diverse datasets and limited memory. CoRR, abs/1609.02132, 2016. [31] John Langford, Ruslan Salakhutdinov, and Tong Zhang. Learning nonlinear dynamic models. In ICML, pages 593–600. ACM, 2009. [32] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521:436–444, 2015. [33] Sergey Levine, Chelsea Finn, Trevor Darrell, and Pieter Abbeel. End-to-end training of deep visuomotor policies. Journal of Machine Learning Research, 17(39):1–40, 2016. [34] Peter Ondruska and Ingmar Posner. Deep tracking: Seeing beyond seeing using recurrent neural networks. In Thirtieth AAAI Conference on Artificial Intelligence, 2016. [35] Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the difficulty of training recurrent neural networks. ICML, 28:1310–1318, 2013. [36] Lerrel Pinto, James Davidson, Rahul Sukthankar, and Abhinav Gupta. Robust adversarial reinforcement learning. arXiv preprint arXiv:1703.02702, 2017. [37] Liva Ralaivola and Florence D’Alche-Buc. Dynamical modeling with kernels for nonlinear time series prediction. NIPS, 2004. [38] Marc’Aurelio Ranzato, Sumit Chopra, Michael Auli, and Wojciech Zaremba. Sequence level training with recurrent neural networks. ICLR, 2016. [39] Stéphane Ross, Geoffrey J Gordon, and J Andrew Bagnell. A reduction of imitation learning and structured prediction to no-regret online learning. AISTATS, 2011. [40] Stephane Ross, Daniel Munoz, Martial Hebert, and J Andrew Bagnell. Learning messagepassing inference machines for structured prediction. In CVPR. IEEE, 2011. [41] John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pages 1889–1897, 2015. [42] Satinder Singh, Michael R. James, and Matthew R. Rudary. Predictive state representations: A new theory for modeling dynamical systems. In UAI, 2004. [43] Le Song, Byron Boots, Sajid M Siddiqi, Geoffrey J Gordon, and Alex J Smola. Hilbert space embeddings of hidden markov models. In ICML, pages 991–998, 2010. [44] Wen Sun, Roberto Capobianco, Geoffrey J. Gordon, J. Andrew Bagnell, and Byron Boots. Learning to smooth with bidirectional predictive state inference machines. In Proceedings of The International Conference on Uncertainty in Artificial Intelligence (UAI), 2016. [45] Wen Sun, Arun Venkatraman, Byron Boots, and J Andrew Bagnell. Learning to filter with predictive state inference machines. In Proceedings of The 33rd International Conference on Machine Learning, pages 1197–1205, 2016. [46] Wen Sun, Arun Venkatraman, Geoffrey J Gordon, Byron Boots, and J Andrew Bagnell. Deeply aggrevated: Differentiable imitation learning for sequential prediction. In ICML, 2017. [47] Ilya Sutskever. Training recurrent neural networks. PhD thesis, University of Toronto, 2013. [48] Ilya Sutskever, James Martens, and Geoffrey E Hinton. Generating text with recurrent neural networks. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pages 1017–1024, 2011. [49] Sebastian Thrun, Wolfram Burgard, and Dieter Fox. Probabilistic robotics. MIT press, 2005. [50] Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016. [51] Peter Van Overschee and BL De Moor. Subspace identification for linear systems: TheoryImplementation-Applications. Springer Science & Business Media, 2012. [52] William Vega-Brown and Nicholas Roy. Cello-em: Adaptive sensor models without ground truth. In 2013 IEEE/RSJ International Conference on Intelligent Robots and Systems, pages 1907–1914. IEEE, 2013. [53] Arun Venkatraman, Martial Hebert, and J Andrew Bagnell. Improving multi-step prediction of learned time series models. In AAAI, pages 3024–3030, 2015. 11 [54] Arun Venkatraman, Wen Sun, Martial Hebert , Byron Boots, and J. Andrew (Drew) Bagnell. Inference machines for nonparametric filter learning. In 25th International Joint Conference on Artificial Intelligence (IJCAI-16), July 2016. [55] Paul J Werbos. Backpropagation through time: what it does and how to do it. Proceedings of the IEEE, 78(10):1550–1560, 1990. [56] David Wingate and Satinder Singh. Kernel predictive linear gaussian models for nonlinear stochastic dynamical systems. In International Conference on Machine Learning, pages 1017– 1024. ACM, 2006. 12 | 2017 | 251 |
6,732 | Federated Multi-Task Learning Virginia Smith Stanford smithv@stanford.edu Chao-Kai Chiang∗ USC chaokaic@usc.edu Maziar Sanjabi∗ USC maziarsanjabi@gmail.com Ameet Talwalkar CMU talwalkar@cmu.edu Abstract Federated learning poses new statistical and systems challenges in training machine learning models over distributed networks of devices. In this work, we show that multi-task learning is naturally suited to handle the statistical challenges of this setting, and propose a novel systems-aware optimization method, MOCHA, that is robust to practical systems issues. Our method and theory for the first time consider issues of high communication cost, stragglers, and fault tolerance for distributed multi-task learning. The resulting method achieves significant speedups compared to alternatives in the federated setting, as we demonstrate through simulations on real-world federated datasets. 1 Introduction Mobile phones, wearable devices, and smart homes are just a few of the modern distributed networks generating massive amounts of data each day. Due to the growing storage and computational power of devices in these networks, it is increasingly attractive to store data locally and push more network computation to the edge. The nascent field of federated learning explores training statistical models directly on devices [37]. Examples of potential applications include: learning sentiment, semantic location, or activities of mobile phone users; predicting health events like low blood sugar or heart attack risk from wearable devices; or detecting burglaries within smart homes [3, 39, 42]. Following [25, 36, 26], we summarize the unique challenges of federated learning below. 1. Statistical Challenges: The aim in federated learning is to fit a model to data, {X1, . . . , Xm}, generated by m distributed nodes. Each node, t ∈[m], collects data in a non-IID manner across the network, with data on each node being generated by a distinct distribution Xt ∼Pt. The number of data points on each node, nt, may also vary significantly, and there may be an underlying structure present that captures the relationship amongst nodes and their associated distributions. 2. Systems Challenges: There are typically a large number of nodes, m, in the network, and communication is often a significant bottleneck. Additionally, the storage, computational, and communication capacities of each node may differ due to variability in hardware (CPU, memory), network connection (3G, 4G, WiFi), and power (battery level). These systems challenges, compounded with unbalanced data and statistical heterogeneity, make issues such as stragglers and fault tolerance significantly more prevalent than in typical data center environments. In this work, we propose a modeling approach that differs significantly from prior work on federated learning, where the aim thus far has been to train a single global model across the network [25, 36, 26]. Instead, we address statistical challenges in the federated setting by learning separate models for each node, {w1, . . . , wm}. This can be naturally captured through a multi-task learning (MTL) framework, where the goal is to consider fitting separate but related models simultaneously [14, 2, 57, 28]. Unfortunately, current multi-task learning methods are not suited to handle the systems challenges that arise in federated learning, including high communication cost, stragglers, and fault tolerance. Addressing these challenges is therefore a key component of our work. ∗Authors contributed equally. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 1.1 Contributions We make the following contributions. First, we show that MTL is a natural choice to handle statistical challenges in the federated setting. Second, we develop a novel method, MOCHA, to solve a general MTL problem. Our method generalizes the distributed optimization method COCOA [22, 31] in order to address systems challenges associated with network size and node heterogeneity. Third, we provide convergence guarantees for MOCHA that carefully consider these unique systems challenges and provide insight into practical performance. Finally, we demonstrate the superior empirical performance of MOCHA with a new benchmarking suite of federated datasets. 2 Related Work Learning Beyond the Data Center. Computing SQL-like queries across distributed, low-powered nodes is a decades-long area of research that has been explored under the purview of query processing in sensor networks, computing at the edge, and fog computing [32, 12, 33, 8, 18, 15]. Recent works have also considered training machine learning models centrally but serving and storing them locally, e.g., this is a common approach in mobile user modeling and personalization [27, 43, 44]. However, as the computational power of the nodes within distributed networks grows, it is possible to do even more work locally, which has led to recent interest in federated learning.2 In contrast to our proposed approach, existing federated learning approaches [25, 36, 26, 37] aim to learn a single global model across the data.3 This limits their ability to deal with non-IID data and structure amongst the nodes. These works also come without convergence guarantees, and have not addressed practical issues of stragglers or fault tolerance, which are important characteristics of the federated setting. The work proposed here is, to the best of our knowledge, the first federated learning framework to consider these challenges, theoretically and in practice. Multi-Task Learning. In multi-task learning, the goal is to learn models for multiple related tasks simultaneously. While the MTL literature is extensive, most MTL modeling approaches can be broadly categorized into two groups based on how they capture relationships amongst tasks. The first (e.g., [14, 4, 11, 24]) assumes that a clustered, sparse, or low-rank structure between the tasks is known a priori. A second group instead assumes that the task relationships are not known beforehand and can be learned directly from the data (e.g., [21, 57, 16]). In this work, we focus our attention on this latter group, as task relationships may not be known beforehand in real-world settings. In comparison to learning a single global model, these MTL approaches can directly capture relationships amongst non-IID and unbalanced data, which makes them particularly well-suited for the statistical challenges of federated learning. We demonstrate this empirically on real-world federated datasets in Section 5. However, although MTL is a natural modeling choice to address the statistical challenges of federated learning, currently proposed methods for distributed MTL (discussed below) do not adequately address the systems challenges associated with federated learning. Distributed Multi-Task Learning. Distributed multi-task learning is a relatively new area of research, in which the aim is to solve an MTL problem when data for each task is distributed over a network. While several recent works [1, 35, 54, 55] have considered the issue of distributed MTL training, the proposed methods do not allow for flexibility of communication versus computation. As a result, they are unable to efficiently handle concerns of fault tolerance and stragglers, the latter of which stems from both data and system heterogeneity. The works of [23] and [7] allow for asynchronous updates to help mitigate stragglers, but do not address fault tolerance. Moreover, [23] provides no convergence guarantees, and the convergence of [7] relies on a bounded delay assumption that is impractical for the federated setting, where delays may be significant and devices may drop out completely. Finally, [30] proposes a method and setup leveraging the distributed framework COCOA [22, 31], which we show in Section 4 to be a special case of the more general approach in this work. However, the authors in [30] do not explore the federated setting, and their assumption that the same amount of work is done locally on each node is prohibitive in federated settings, where unbalance is common due to data and system variability. 2The term on-device learning has been used to describe both the task of model training and of model serving. Due to the ambiguity of this phrase, we exclusively use the term federated learning. 3While not the focus of our work, we note privacy is an important concern in the federated setting, and that the privacy benefits associated with global federated learning (as discussed in [36]) also apply to our approach. 2 3 Federated Multi-Task Learning In federated learning, the aim is to learn a model over data that resides on, and has been generated by, m distributed nodes. As a running example, consider learning the activities of mobile phone users in a cell network based on their individual sensor, text, or image data. Each node (phone), t ∈[m], may generate data via a distinct distribution, and so it is natural to fit separate models, {w1, . . . , wm}, to the distributed data—one for each local dataset. However, structure between models frequently exists (e.g., people may behave similarly when using their phones), and modeling these relationships via multi-task learning is a natural strategy to improve performance and boost the effective sample size for each node [10, 2, 5]. In this section, we suggest a general MTL framework for the federated setting, and propose a novel method, MOCHA, to handle the systems challenges of federated MTL. 3.1 General Multi-Task Learning Setup Given data Xt ∈Rd×nt from m nodes, multi-task learning fits separate weight vectors wt ∈Rd to the data for each task (node) through arbitrary convex loss functions ℓt (e.g., the hinge loss for SVM models). Many MTL problems can be captured via the following general formulation: min W,Ω ( m X t=1 nt X i=1 ℓt(wT t xi t, yi t) + R(W, Ω) ) , (1) where W := [w1, . . . , wm] ∈Rd×m is a matrix whose t-th column is the weight vector for the t-th task. The matrix Ω∈Rm×m models relationships amongst tasks, and is either known a priori or estimated while simultaneously learning task models. MTL problems differ based on their assumptions on R, which takes Ωas input and promotes some suitable structure amongst the tasks. As an example, several popular MTL approaches assume that tasks form clusters based on whether or not they are related [14, 21, 57, 58]. This can be expressed via the following bi-convex formulation: R(W, Ω) = λ1 tr WΩWT + λ2∥W∥2 F , (2) with constants λ1, λ2 > 0, and where the second term performs L2 regularization on each local model. We use a similar formulation (14) in our experiments in Section 5, and provide details on other common classes of MTL models that can be formulated via (1) in Appendix B. 3.2 MOCHA: A Framework for Federated Multi-Task Learning In the federated setting, the aim is to train statistical models directly on the edge, and thus we solve (1) while assuming that the data {X1, . . . , Xm} is distributed across m nodes or devices. Before proposing our federated method for solving (1), we make the following observations: • Observation 1: In general, (1) is not jointly convex in W and Ω, and even in the cases where (1) is convex, solving for W and Ωsimultaneously can be difficult [5]. • Observation 2: When fixing Ω, updating W depends on both the data X, which is distributed across the nodes, and the structure Ω, which is known centrally. • Observation 3: When fixing W, optimizing for Ωonly depends on W and not on the data X. Based on these observations, it is natural to propose an alternating optimization approach to solve problem (1), in which at each iteration we fix either W or Ωand optimize over the other, alternating until convergence is reached. Note that solving for Ωis not dependent on the data and therefore can be computed centrally; as such, we defer to prior work for this step [58, 21, 57, 16]. In Appendix B, we discuss updates to Ωfor several common MTL models. In this work, we focus on developing an efficient distributed optimization method for the W step. In traditional data center environments, the task of distributed training is a well-studied problem, and various communication-efficient frameworks have been recently proposed, including the state-of-theart primal-dual COCOA framework [22, 31]. Although COCOA can be extended directly to update W in a distributed fashion across the nodes, it cannot handle the unique systems challenges of the federated environment, such as stragglers and fault tolerance, as discussed in Section 3.4. To this end, we extend COCOA and propose a new method, MOCHA, for federated multi-task learning. Our method is given in Algorithm 1 and described in detail in Sections 3.3 and 3.4. 3 Algorithm 1 MOCHA: Federated Multi-Task Learning Framework 1: Input: Data Xt from t = 1, . . . , m tasks, stored on one of m nodes, and initial matrix Ω0 2: Starting point α(0) := 0 ∈Rn, v(0) := 0 ∈Rb 3: for iterations i = 0, 1, . . . do 4: Set subproblem parameter σ′ and number of federated iterations, Hi 5: for iterations h = 0, 1, · · · , Hi do 6: for tasks t ∈{1, 2, . . . , m} in parallel over m nodes do 7: call local solver, returning θh t -approximate solution ∆αt of the local subproblem (4) 8: update local variables αt ←αt + ∆αt 9: return updates ∆vt := Xt∆αt 10: reduce: vt ←vt + ∆vt 11: Update Ωcentrally based on w(α) for latest α 12: Central node computes w = w(α) based on the lastest α 13: return: W := [w1, . . . , wm] 3.3 Federated Update of W To update W in the federated setting, we begin by extending works on distributed primal-dual optimization [22, 31, 30] to apply to the generalized multi-task framework (1). This involves deriving the appropriate dual formulation, subproblems, and problem parameters, as we detail below. Dual problem. Considering the dual formulation of (1) will allow us to better separate the global problem into distributed subproblems for federated computation across the nodes. Let n := Pm t=1 nt and X := Diag(X1, · · · , Xm) ∈Rmd×n. With Ωfixed, the dual of problem (1), defined with respect to dual variables α ∈Rn, is given by: min α ( D(α) := m X t=1 nt X i=1 ℓ∗ t (−αi t) + R∗(Xα) ) , (3) where ℓ∗ t and R∗are the conjugate dual functions of ℓt and R, respectively, and αi t is the dual variable for the data point (xi t, yi t). Note that R∗depends on Ω, but for the sake of simplicity, we have removed this in our notation. To derive distributed subproblems from this global dual, we make an assumption described below on the regularizer R. Assumption 1. Given Ω, we assume that there exists a symmetric positive definite matrix M ∈ Rmd×md, depending on Ω, for which the function R is strongly convex with respect to M−1. Note that this corresponds to assuming that R∗will be smooth with respect to matrix M. Remark 1. We can reformulate the MTL regularizer in the form of ¯R(w, ¯Ω) = R(W, Ω), where w ∈Rmd is a vector containing the columns of W and ¯Ω:= Ω⊗Id×d ∈Rmd×md. For example, we can rewrite the regularizer in (2) as ¯R(w, ¯Ω) = tr wT (λ1 ¯Ω+ λ2I)w . Writing the regularizer in this form, it is clear that it is strongly convex with respect to matrix M−1 = λ1 ¯Ω+ λ2I. Data-local quadratic subproblems. To solve (1) across distributed nodes, we define the following data-local subproblems, which are formed via a careful quadratic approximation of the dual problem (3) to separate computation across the nodes. These subproblems find updates ∆αt ∈Rnt to the dual variables in α corresponding to a single node t, and only require accessing data which is available locally, i.e., Xt for node t. The t-th subproblem is given by: min ∆αt Gσ′ t (∆αt; vt, αt) := nt X i=1 ℓ∗ t (−αi t−∆αi t)+⟨wt(α), Xt∆αt⟩+σ′ 2 ∥Xt∆αt∥2 Mt +c(α) , (4) where c(α) := 1 mR∗(Xα), and Mt ∈Rd×d is the t-th diagonal block of the symmetric positive definite matrix M. Given dual variables α, corresponding primal variables can be found via w(α) = ∇R∗(Xα), where wt(α) is the t-th block in the vector w(α). Note that computing w(α) requires the vector v = Xα. The t-th block of v, vt ∈Rd, is the only information that must be communicated between nodes at each iteration. Finally, σ′ > 0 measures the difficulty of the data partitioning, and helps to relate progress made to the subproblems to the global dual problem. It can be easily selected based on M for many applications of interest; we provide details in Lemma 9 of the Appendix. 4 3.4 Practical Considerations During MOCHA’s federated update of W, the central node requires a response from all workers before performing a synchronous update. In the federated setting, a naive execution of this communication protocol could introduce dramatic straggler effects due to node heterogeneity. To avoid stragglers, MOCHA provides the t-th node with the flexibility to approximately solve its subproblem Gσ′ t (·), where the quality of the approximation is controled by a per-node parameter θh t . The following factors determine the quality of the t-th node’s solution to its subproblem: 1. Statistical challenges, such as the size of Xt and the intrinsic difficulty of subproblem Gσ′ t (·). 2. Systems challenges, such as the node’s storage, computational, and communication capacities due to hardware (CPU, memory), network connection (3G, 4G, WiFi), and power (battery level). 3. A global clock cycle imposed by the central node specifying a deadline for receiving updates. We define θh t as a function of these factors, and assume that each node has a controller that may derive θh t from the current clock cycle and statistical/systems setting. θh t ranges from zero to one, where θh t = 0 indicates an exact solution to Gσ′ t (·) and θh t = 1 indicates that node t made no progress during iteration h (which we refer to as a dropped node). For instance, a node may ‘drop’ if it runs out of battery, or if its network bandwidth deteriorates during iteration h and it is thus unable to return its update within the current clock cycle. A formal definition of θh t is provided in (5) of Section 4. MOCHA mitigates stragglers by enabling the t-th node to define its own θh t . On every iteration h, the local updates that a node performs and sends in a clock cycle will yield a specific value for θh t . As discussed in Section 4, MOCHA is additionally robust to a small fraction of nodes periodically dropping and performing no local updates (i.e., θh t := 1) under suitable conditions, as defined in Assumption 2. In contrast, prior work of COCOA may suffer from severe straggler effects in federated settings, as it requires a fixed θh t = θ across all nodes and all iterations while still maintaining synchronous updates, and it does not allow for the case of dropped nodes (θ := 1). Finally, we note that asynchronous updating schemes are an alternative approach to mitigate stragglers. We do not consider these approaches in this work, in part due to the fact that the bounded-delay assumptions associated with most asynchronous schemes limit fault tolerance. However, it would be interesting to further explore the differences and connections between asynchronous methods and approximation-based, synchronous methods like MOCHA in future work. 4 Convergence Analysis MOCHA is based on a bi-convex alternating approach, which is guaranteed to converge [17, 45] to a stationary solution of problem (1). In the case where this problem is jointly convex with respect to W and Ω, such a solution is also optimal. In the rest of this section, we therefore focus on the convergence of solving the W update of MOCHA in the federated setting. Following the discussion in Section 3.4, we first introduce the following per-node, per-round approximation parameter. Definition 1 (Per-Node-Per-Iteration-Approximation Parameter). At each iteration h, we define the accuracy level of the solution calculated by node t to its subproblem (4) as: θh t := Gσ′ t (∆α(h) t ; v(h), α(h) t ) −Gσ′ t (∆α⋆ t ; v(h), α(h) t ) Gσ′ t (0; v(h), α(h) t ) −Gσ′ t (∆α⋆ t ; v(h), α(h) t ) , (5) where ∆α⋆ t is the minimizer of subproblem Gσ′ t (· ; v(h), α(h) t ). We allow this value to vary between [0, 1], with θh t := 1 meaning that no updates to subproblem Gσ′ t are made by node t at iteration h. While the flexible per-node, per-iteration approximation parameter θh t in (5) allows the consideration of stragglers and fault tolerance, these additional degrees of freedom also pose new challenges in providing convergence guarantees for MOCHA. We introduce the following assumption on θh t to provide our convergence guarantees. Assumption 2. Let Hh := (α(h), α(h−1), · · · , α(1)) be the dual vector history until the beginning of iteration h, and define Θh t := E[θh t |Hh]. For all tasks t and all iterations h, we assume ph t := P[θh t = 1] ≤pmax < 1 and ˆΘh t := E[θh t |Hh, θh t < 1] ≤Θmax < 1. 5 This assumption states that at each iteration, the probability of a node sending a result is non-zero, and that the quality of the returned result is, on average, better than the previous iterate. Compared to [49, 30] which assumes θh t = θ < 1, our assumption is significantly less restrictive and better models the federated setting, where nodes are unreliable and may periodically drop out. Using Assumption 2, we derive the following theorem, which characterizes the convergence of the federated update of MOCHA in finite horizon when the losses ℓt in (1) are smooth. Theorem 1. Assume that the losses ℓt are (1/µ)-smooth. Then, under Assumptions 1 and 2, there exists a constant s ∈(0, 1] such that for any given convergence target ϵD, choosing H such that H ≥ 1 (1 −¯Θ)s log n ϵD , (6) will satisfy E[D(α(H)) −D(α⋆)] ≤ϵD . Here, ¯Θ := pmax + (1 −pmax)Θmax < 1. While Theorem 1 is concerned with finite horizon convergence, it is possible to get asymptotic convergence results, i.e., H →∞, with milder assumptions on the stragglers; see Corollary 8 in the Appendix for details. When the loss functions are non-smooth, e.g., the hinge loss for SVM models, we provide the following sub-linear convergence for L-Lipschitz losses. Theorem 2. If the loss functions ℓt are L-Lipschitz, then there exists a constant σ, defined in (24), such that for any given ϵD > 0, if we choose H ≥H0 + 2 (1 −¯Θ) max 1, 2L2σσ′ n2ϵD , (7) with H0 ≥ h0+ 16L2σσ′ (1 −¯Θ)n2ϵD , h0 = 1 + 1 (1 −¯Θ) log 2n2(D(α⋆) −D(α0)) 4L2σσ′ + , then ¯α := 1 H−H0 PH h=H0+1 α(h) will satisfy E[D(¯α) −D(α⋆)] ≤ϵD . These theorems guarantee that MOCHA will converge in the federated setting, under mild assumptions on stragglers and capabilities of the nodes. While these results consider convergence in terms of the dual, we show that they hold analogously for the duality gap. We provide all proofs in Appendix C. Remark 2. Following from the discussion in Section 3.4, our method and theory generalize the results in [22, 31]. In the limiting case that all θh t are identical, our results extend the results of COCOA to the multi-task framework described in (1). Remark 3. Note that the methods in [22, 31] have an aggregation parameter γ ∈(0, 1]. Though we prove our results for a general γ, we simplify the method and results here by setting γ := 1, which has been shown to have the best performance, both theoretically and empirically [31]. 5 Simulations In this section we validate the empirical performance of MOCHA. First, we introduce a benchmarking suite of real-world federated datasets and show that multi-task learning is well-suited to handle the statistical challenges of the federated setting. Next, we demonstrate MOCHA’s ability to handle stragglers, both from statistical and systems heterogeneity. Finally, we explore the performance of MOCHA when devices periodically drop out. Our code is available at: github.com/gingsmith/fmtl. 5.1 Federated Datasets In our simulations, we use several real-world datasets that have been generated in federated settings. We provide additional details in the Appendix, including information about data sizes, nt. • Google Glass (GLEAM)4: This dataset consists of two hours of high resolution sensor data collected from 38 participants wearing Google Glass for the purpose of activity recognition. Following [41], we featurize the raw accelerometer, gyroscope, and magnetometer data into 180 statistical, spectral, and temporal features. We model each participant as a separate task, and predict between eating and other activities (e.g., walking, talking, drinking). 4http://www.skleinberg.org/data/GLEAM.tar.gz 6 • Human Activity Recognition5: Mobile phone accelerometer and gyroscope data collected from 30 individuals, performing one of six activities: {walking, walking-upstairs, walking-downstairs, sitting, standing, lying-down}. We use the provided 561-length feature vectors of time and frequency domain variables generated for each instance [3]. We model each individual as a separate task and predict between sitting and the other activities. • Vehicle Sensor6: Acoustic, seismic, and infrared sensor data collected from a distributed network of 23 sensors, deployed with the aim of classifying vehicles driving by a segment of road [13]. Each instance is described by 50 acoustic and 50 seismic features. We model each sensor as a separate task and predict between AAV-type and DW-type vehicles. 5.2 Multi-Task Learning for the Federated Setting We demonstrate the benefits of multi-task learning for the federated setting by comparing the error rates of a multi-task model to that of a fully local model (i.e., learning a model for each task separately) and a fully global model (i.e., combining the data from all tasks and learning one single model). Work on federated learning thus far has been limited to the study of fully global models [25, 36, 26]. We use a cluster-regularized multi-task model [57], as described in Section 3.1. For each dataset from Section 5.1, we randomly split the data into 75% training and 25% testing, and learn multi-task, local, and global support vector machine models, selecting the best regularization parameter, λ ∈{1e-5, 1e-4, 1e-3, 1e-2, 0.1, 1, 10}, for each model using 5-fold cross-validation. We repeat this process 10 times and report the average prediction error across tasks, averaged across these 10 trials. Table 1: Average prediction error: Means and standard errors over 10 random shuffles. Model Human Activity Google Glass Vehicle Sensor Global 2.23 (0.30) 5.34 (0.26) 13.4 (0.26) Local 1.34 (0.21) 4.92 (0.26) 7.81 (0.13) MTL 0.46 (0.11) 2.02 (0.15) 6.59 (0.21) In Table 1, we see that for each dataset, multi-task learning significantly outperforms the other models in terms of achieving the lowest average error across tasks. The global model, as proposed in [25, 36, 26] performs the worst, particularly for the Human Activity and Vehicle Sensor datasets. Although the datasets are already somewhat unbalanced, we note that a global modeling approach may benefit tasks with a very small number of instances, as information can be shared across tasks. For this reason, we additionally explore the performance of global, local, and multi-task modeling for highly skewed data in Table 4 of the Appendix. Although the performance of the global model improves slightly relative to local modeling in this setting, the global model still performs the worst for the majority of the datasets, and MTL still significantly outperforms both global and local approaches. 5.3 Straggler Avoidance Two challenges that are prevalent in federated learning are stragglers and high communication. Stragglers can occur when a subset of the devices take much longer than others to perform local updates, which can be caused either by statistical or systems heterogeneity. Communication can also exacerbate poor performance, as it can be slower than computation by many orders of magnitude in typical cellular or wireless networks [52, 20, 48, 9, 38]. In our experiments below, we simulate the time needed to run each method by tracking the operations and communication complexities, and scaling the communication cost relative to computation by one, two, or three orders of magnitude, respectively. These numbers correspond roughly to the clock rate vs. network bandwidth/latency (see, e.g., [52]) for modern cellular and wireless networks. Details are provided in Appendix E. 5https://archive.ics.uci.edu/ml/datasets/Human+Activity+Recognition+Using+Smartphones 6http://www.ecs.umass.edu/~mduarte/Software.html 7 0 1 2 3 4 5 6 7 Estimated Time 106 10-3 10-2 10-1 100 101 102 Primal Sub-Optimality Human Activity: Statistical Heterogeneity (WiFi) MOCHA CoCoA Mb-SDCA Mb-SGD 0 1 2 3 4 5 6 7 8 Estimated Time 106 10-3 10-2 10-1 100 101 102 Primal Sub-Optimality Human Activity: Statistical Heterogeneity (LTE) MOCHA CoCoA Mb-SDCA Mb-SGD 0 0.5 1 1.5 2 Estimated Time 107 10-3 10-2 10-1 100 101 102 Primal Sub-Optimality Human Activity: Statistical Heterogeneity (3G) MOCHA CoCoA Mb-SDCA Mb-SGD Figure 1: The performance of MOCHA compared to other distributed methods for the W update of (1). While increasing communication tends to decrease the performance of the mini-batch methods, MOCHA performs well in high communication settings. In all settings, MOCHA with varied approximation values, Θh t , performs better than without (i.e., naively generalizing COCOA), as it avoids stragglers from statistical heterogeneity. Statistical Heterogeneity. We explore the effect of statistical heterogeneity on stragglers for various methods and communication regimes (3G, LTE, WiFi). For a fixed communication network, we compare MOCHA to COCOA, which has a single θ parameter, and to mini-batch stochastic gradient descent (Mb-SGD) and mini-batch stochastic dual coordinate ascent (Mb-SDCA), which have limited communication flexibility depending on the batch size. We tune all compared methods for best performance, as we detail in Appendix E. In Figure 1, we see that while the performance degrades for mini-batch methods in high communication regimes, MOCHA and COCOA are robust to high communication. However, COCOA is significantly affected by stragglers—because θ is fixed across nodes and rounds, difficult subproblems adversely impact convergence. In contrast, MOCHA performs well regardless of communication cost and is robust to statistical heterogeneity. Systems Heterogeneity. MOCHA is also equipped to handle heterogeneity from changing systems environments, such as battery power, memory, or network connection, as we show in Figure 2. In particular, we simulate systems heterogeneity by randomly choosing the number of local iterations for MOCHA or the mini-batch size for mini-batch methods, between 10% and 100% of the minimum number of local data points for high variability environments, to between 90% and 100% for low variability (see Appendix E for full details). We do not vary the performance of COCOA, as the impact from statistical heterogeneity alone significantly reduces performance. However, adding systems heterogeneity would reduce performance even further, as the maximum θ value across all nodes would only increase if additional systems challenges were introduced. 5.4 Tolerance to Dropped Nodes 0 1 2 3 4 5 6 7 8 9 Estimated Time 106 10-3 10-2 10-1 100 101 102 Primal Sub-Optimality Vehicle Sensor: Systems Heterogeneity (Low) MOCHA CoCoA Mb-SDCA Mb-SGD 0 1 2 3 4 5 6 7 8 9 Estimated Time 106 10-3 10-2 10-1 100 101 102 Primal Sub-Optimality Vehicle Sensor: Systems Heterogeneity (High) MOCHA CoCoA Mb-CD Mb-SGD Figure 2: MOCHA can handle variability from systems heterogeneity. 0 2 4 6 8 10 Estimated Time 106 10-3 10-2 10-1 100 101 102 Primal Sub-Optimality Google Glass: Fault Tolerance, W Step 0 1 2 3 4 5 6 7 8 Estimated Time 107 10-3 10-2 10-1 100 101 102 Primal Sub-Optimality Google Glass: Fault Tolerance, Full Method Figure 3: The performance of MOCHA is robust to nodes periodically dropping out (fault tolerance). Finally, we explore the effect of nodes dropping on the performance of MOCHA. We do not draw comparisons to other methods, as to the best of our knowledge, no other methods for distributed multi-task learning directly address fault tolerance. In MOCHA, we incorporate this setting by allowing θh t := 1, as explored theoretically in Section 4. In Figure 3, we look at the performance of MOCHA, either for one fixed W update, or running the entire MOCHA method, as the probability that nodes drop at each iteration (ph t in Assumption 2) increases. We see that the performance of MOCHA is robust to relatively high values of ph t , both during a single update of W and in how this affects the performance of the overall method. However, as intuition would suggest, if one of the nodes never sends updates (i.e., ph 1 := 1 for all h, green dotted line), the method does not converge to the correct solution. This provides validation for our Assumption 2. 8 6 Discussion To address the statistical and systems challenges of the burgeoning federated learning setting, we have presented MOCHA, a novel systems-aware optimization framework for federated multi-task learning. Our method and theory for the first time consider issues of high communication cost, stragglers, and fault tolerance for multi-task learning in the federated environment. While MOCHA does not apply to non-convex deep learning models in its current form, we note that there may be natural connections between this approach and “convexified” deep learning models [6, 34, 51, 56] in the context of kernelized federated multi-task learning. Acknowledgements We thank Brendan McMahan, Chloé Kiddon, Jakub Koneˇcný, Evan Sparks, Xinghao Pan, Lisha Li, and Hang Qi for valuable discussions and feedback. References [1] A. Ahmed, A. Das, and A. J. Smola. Scalable hierarchical multitask learning algorithms for conversion optimization in display advertising. In Conference on Web Search and Data Mining, 2014. [2] R. K. Ando and T. Zhang. A framework for learning predictive structures from multiple tasks and unlabeled data. Journal of Machine Learning Research, 6:1817–1853, 2005. [3] D. Anguita, A. Ghio, L. Oneto, X. Parra, and J. L. Reyes-Ortiz. A public domain dataset for human activity recognition using smartphones. In European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning, 2013. [4] A. Argyriou, T. Evgeniou, and M. Pontil. Multi-task feature learning. In Neural Information Processing Systems, 2007. [5] A. Argyriou, T. Evgeniou, and M. Pontil. Convex multi-task feature learning. Machine Learning, 73(3):243–272, 2008. [6] Ö. Aslan, X. Zhang, and D. Schuurmans. Convex deep learning via normalized kernels. In Advances in Neural Information Processing Systems, 2014. [7] I. M. Baytas, M. Yan, A. K. Jain, and J. Zhou. Asynchronous multi-task learning. In International Conference on Data Mining, 2016. [8] F. Bonomi, R. Milito, J. Zhu, and S. Addepalli. Fog computing and its role in the internet of things. In SIGCOMM Workshop on Mobile Cloud Computing, 2012. [9] A. Carroll and G. Heiser. An analysis of power consumption in a smartphone. In USENIX Annual Technical Conference, 2010. [10] R. Caruana. Multitask learning. Machine Learning, 28:41–75, 1997. [11] J. Chen, J. Zhou, and J. Ye. Integrating low-rank and group-sparse structures for robust multi-task learning. In Conference on Knowledge Discovery and Data Mining, 2011. [12] A. Deshpande, C. Guestrin, S. R. Madden, J. M. Hellerstein, and W. Hong. Model-based approximate querying in sensor networks. VLDB Journal, 14(4):417–443, 2005. [13] M. F. Duarte and Y. H. Hu. Vehicle classification in distributed sensor networks. Journal of Parallel and Distributed Computing, 64(7):826–838, 2004. [14] T. Evgeniou and M. Pontil. Regularized multi-task learning. In Conference on Knowledge Discovery and Data Mining, 2004. [15] P. Garcia Lopez, A. Montresor, D. Epema, A. Datta, T. Higashino, A. Iamnitchi, M. Barcellos, P. Felber, and E. Riviere. Edge-centric computing: Vision and challenges. SIGCOMM Computer Communication Review, 45(5):37–42, 2015. [16] A. R. Gonçalves, F. J. Von Zuben, and A. Banerjee. Multi-task sparse structure learning with gaussian copula models. Journal of Machine Learning Research, 17(33):1–30, 2016. [17] J. Gorski, F. Pfeuffer, and K. Klamroth. Biconvex sets and optimization with biconvex functions: a survey and extensions. Mathematical Methods of Operations Research, 66(3):373–407, 2007. [18] K. Hong, D. Lillethun, U. Ramachandran, B. Ottenwälder, and B. Koldehofe. Mobile fog: A programming model for large-scale applications on the internet of things. In SIGCOMM Workshop on Mobile Cloud Computing, 2013. [19] C.-J. Hsieh, M. A. Sustik, I. S. Dhillon, and P. Ravikumar. Sparse Inverse Covariance Matrix Estimation Using Quadratic Approximation. In Neural Information Processing Systems 27, 2014. 9 [20] J. Huang, F. Qian, Y. Guo, Y. Zhou, Q. Xu, Z. M. Mao, S. Sen, and O. Spatscheck. An in-depth study of lte: Effect of network protocol and application behavior on performance. In ACM SIGCOMM Conference, 2013. [21] L. Jacob, J.-p. Vert, and F. R. Bach. Clustered multi-task learning: A convex formulation. In Neural Information Processing Systems, 2009. [22] M. Jaggi, V. Smith, J. Terhorst, S. Krishnan, T. Hofmann, and M. I. Jordan. Communication-Efficient Distributed Dual Coordinate Ascent. In Neural Information Processing Systems, 2014. [23] X. Jin, P. Luo, F. Zhuang, J. He, and Q. He. Collaborating between local and global learning for distributed online multiple tasks. In Conference on Information and Knowledge Management, 2015. [24] S. Kim and E. P. Xing. Statistical estimation of correlated genome associations to a quantitative trait network. PLoS Genet, 5(8):e1000587, 2009. [25] J. Koneˇcn`y, H. B. McMahan, and D. Ramage. Federated optimization: Distributed optimization beyond the datacenter. arXiv:1511.03575, 2015. [26] J. Koneˇcn`y, H. B. McMahan, F. X. Yu, P. Richtárik, A. T. Suresh, and D. Bacon. Federated learning: Strategies for improving communication efficiency. arXiv:1610.05492, 2016. [27] T. Kuflik, J. Kay, and B. Kummerfeld. Challenges and solutions of ubiquitous user modeling. In Ubiquitous display environments, pages 7–30. Springer, 2012. [28] A. Kumar and H. Daumé. Learning task grouping and overlap in multi-task learning. In International Conference on Machine Learning, 2012. [29] S. L. Lauritzen. Graphical Models, volume 17. Clarendon Press, 1996. [30] S. Liu, S. J. Pan, and Q. Ho. Distributed multi-task relationship learning. Conference on Knowledge Discovery and Data Mining, 2017. [31] C. Ma, V. Smith, M. Jaggi, M. I. Jordan, P. Richtárik, and M. Takáˇc. Adding vs. averaging in distributed primal-dual optimization. In International Conference on Machine Learning, 2015. [32] S. Madden, M. J. Franklin, J. M. Hellerstein, and W. Hong. TAG: A tiny aggregation service for ad-hoc sensor networks. In Symposium on Operating Systems Design and Implementation, 2002. [33] S. Madden, M. J. Franklin, J. M. Hellerstein, and W. Hong. TinyDB: An acquisitional query processing system for sensor networks. ACM Transactions on Database Systems, 30(1):122–173, 2005. [34] J. Mairal, P. Koniusz, Z. Harchaoui, and C. Schmid. Convolutional kernel networks. In Neural Information Processing Systems, 2014. [35] D. Mateos-Núñez and J. Cortés. Distributed optimization for multi-task learning via nuclear-norm approximation. In IFAC Workshop on Distributed Estimation and Control in Networked Systems, 2015. [36] H. B. McMahan, E. Moore, D. Ramage, S. Hampson, and B. A. y Arcas. Communication-efficient learning of deep networks from decentralized data. In Conference on Artificial Intelligence and Statistics, 2017. [37] H. B. McMahan and D. Ramage. http://www.googblogs.com/federated-learningcollaborative-machine-learning-without-centralized-training-data/. Google, 2017. [38] A. P. Miettinen and J. K. Nurminen. Energy efficiency of mobile clients in cloud computing. In USENIX Conference on Hot Topics in Cloud Computing, 2010. [39] A. Pantelopoulos and N. G. Bourbakis. A survey on wearable sensor-based systems for health monitoring and prognosis. IEEE Transactions on Systems, Man, and Cybernetics, 40(1):1–12, 2010. [40] H. Qi, E. R. Sparks, and A. Talwalkar. Paleo: A performance model for deep neural networks. In International Conference on Learning Representations, 2017. [41] S. A. Rahman, C. Merck, Y. Huang, and S. Kleinberg. Unintrusive eating recognition using google glass. In Conference on Pervasive Computing Technologies for Healthcare, 2015. [42] P. Rashidi and D. J. Cook. Keeping the resident in the loop: Adapting the smart home to the user. IEEE Transactions on systems, man, and cybernetics, 39(5):949–959, 2009. [43] M. Rastegari, V. Ordonez, J. Redmon, and A. Farhadi. XNOR-Net: ImageNet classification using binary convolutional neural networks. In European Conference on Computer Vision, 2016. [44] S. Ravi. https://research.googleblog.com/2017/02/on-device-machine-intelligence. html. Google, 2017. [45] M. Razaviyayn, M. Hong, and Z.-Q. Luo. A unified convergence analysis of block successive minimization methods for nonsmooth optimization. SIAM Journal on Optimization, 23(2):1126–1153, 2013. [46] S. Shalev-Shwartz, Y. Singer, and N. Srebro. Pegasos: Primal Estimated sub-GrAdient SOlver for SVM. International Conference on Machine Learning, June 2007. [47] S. Shalev-Shwartz and T. Zhang. Stochastic dual coordinate ascent methods for regularized loss minimization. Journal of Machine Learning Research, 14:567–599, 2013. [48] D. Singelée, S. Seys, L. Batina, and I. Verbauwhede. The communication and computation cost of wireless security. In ACM Conference on Wireless Network Security, 2011. [49] V. Smith, S. Forte, C. Ma, M. Takác, M. I. Jordan, and M. Jaggi. CoCoA: A general framework for communication-efficient distributed optimization. arXiv:1611.02189, 2016. 10 [50] M. Takáˇc, A. Bijral, P. Richtárik, and N. Srebro. Mini-Batch Primal and Dual Methods for SVMs. In International Conference on Machine Learning, 2013. [51] C.-Y. Tsai, A. M. Saxe, and D. Cox. Tensor switching networks. In Neural Information Processing Systems, 2016. [52] C. Van Berkel. Multi-core for mobile phones. In Proceedings of the Conference on Design, Automation and Test in Europe, pages 1260–1265. European Design and Automation Association, 2009. [53] H. Wang, A. Banerjee, C.-J. Hsieh, P. K. Ravikumar, and I. S. Dhillon. Large scale distributed sparse precision estimation. In Neural Information Processing Systems, 2013. [54] J. Wang, M. Kolar, and N. Srebro. Distributed multi-task learning. In Conference on Artificial Intelligence and Statistics, 2016. [55] J. Wang, M. Kolar, and N. Srebro. Distributed multi-task learning with shared representation. arXiv:1603.02185, 2016. [56] Y. Zhang, P. Liang, and M. J. Wainwright. Convexified convolutional neural networks. International Conference on Machine Learning, 2017. [57] Y. Zhang and D.-Y. Yeung. A convex formulation for learning task relationships in multi-task learning. In Conference on Uncertainty in Artificial Intelligence, 2010. [58] J. Zhou, J. Chen, and J. Ye. Clustered multi-task learning via alternating structure optimization. In Neural Information Processing Systems, 2011. 11 | 2017 | 252 |
6,733 | Learning Causal Structures Using Regression Invariance AmirEmad Ghassami⇤†, Saber Salehkaleybar†, Negar Kiyavash⇤†, Kun Zhang‡ ⇤Department of ECE, University of Illinois at Urbana-Champaign, Urbana, USA. †Coordinated Science Laboratory, University of Illinois at Urbana-Champaign, Urbana, USA. ‡Department of Philosophy, Carnegie Mellon University, Pittsburgh, USA. †{ghassam2,sabersk,kiyavash}@illinois.edu, ‡kunz1@cmu.edu Abstract We study causal discovery in a multi-environment setting, in which the functional relations for producing the variables from their direct causes remain the same across environments, while the distribution of exogenous noises may vary. We introduce the idea of using the invariance of the functional relations of the variables to their causes across a set of environments for structure learning. We define a notion of completeness for a causal inference algorithm in this setting and prove the existence of such algorithm by proposing the baseline algorithm. Additionally, we present an alternate algorithm that has significantly improved computational and sample complexity compared to the baseline algorithm. Experiment results show that the proposed algorithm outperforms the other existing algorithms. 1 Introduction Causal structure learning is a fundamental problem in machine learning with applications in multiple fields such as biology, economics, epidemiology, and computer science. When performing interventions in the system is not possible or too expensive (observation-only setting), the main approach to identifying direction of influences and learning the causal structure is to run a constraint-based or a score-based causal discovery algorithm over the data. In this case, a “complete” observational algorithm allows learning the causal structure to the extent possible, which is the Markov equivalence of the ground truth structure. When the experimenter is capable of intervening in the system to see the effect of varying one variable on the other variables (interventional setting), the causal structure could be exactly learned. In this setting, the most common identification procedure considers that the variables whose distributions have varied are the descendants of the intervened variable and hence the causal structure is reconstructed by performing interventions on different variables in the system [4, 11]. However, due to issues such as cost constraints and infeasibility of performing certain interventions, the experimenter is usually not capable of performing arbitrary interventions. In many real-life systems, due to changes in the variables of the environment, the data generating distribution will vary over time. Considering the setup after each change as a new environment, our goal is to exploit the differences across environments to learn the underlying causal structure. In this setting, we do not intervene in the system and only use the observational data taken from environments. We consider a multi-environment setting, in which the functional relations for producing the variables from their parents remain the same across environments, while the distribution of exogenous noises may vary. Note that the standard interventional setting could be viewed as a special case of multienvironment setting in which the location and distribution of the changes across environments are designed by the experimenter. Furthermore, as will be seen in Figure 1(a), there are cases where the ordinary interventional approaches cannot take advantages of changes across environments while these changes could be utilized to learn the causal structure uniquely. The multi-environment setting was also studied in [35, 23, 37]; we will put our work into perspective in relationship to these in the Related Work. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. We focus on the linear structural equation models (SEMs) with additive noise [1] as the underlying data generating model (see Section 2 for details). Note that this model is one of the most problematic models in the literature of causal inference, and if the noises follow a Gaussian distribution, for many structures, none of the existing observational approaches can identify the underlying causal structure uniquely1. The main idea in our proposed approach is to utilize the change of the regression coefficients, resulting from the changes across the environments, to distinguish causes from the effects. X2 (a) X1 (b) X1 X2 X3 Figure 1: Simple examples of identifiable structures using the proposed approach. Our approach is able to identify causal structures that were not identifiable using observational approaches, from information that was not usable in existing interventional approaches. Figure 1 shows two simple examples to illustrate this point. In this figure, a directed edge form variable Xi to Xj implies that Xi is a direct cause of Xj, and change of an exogenous noise across environments is denoted by the flash sign. Consider the structure in Figure 1(a), with equations X1 = N1, and X2 = aX1 + N2, where N1 ⇠N(0, σ2 1) and N2 ⇠N(0, σ2 2) are independent mean-zero Gaussian exogenous noises. Suppose we are interested in finding out which variable is the cause and which is the effect. We are given two environments across which the exogenous noise of both X1 and X2 are varied. Denoting the regression coefficient resulting from regressing Xi on Xj by βXj(Xi), in this case, we have βX2(X1) = Cov(X1,X2) Cov(X2) = aσ2 1 a2σ2 1+σ2 2 , and βX1(X2) = Cov(X1,X2) Cov(X1) = a. Therefore, except for pathological cases for values for the variance of the exogenous noises in two environments, the regression coefficient resulting from regressing the cause variable on the effect variable varies between the two environments, while the regression coefficient from regressing the effect variable on the cause variable remains the same. Hence, the cause is distinguishable from the effect. Note that structures X1 ! X2 and X2 ! X1 are in the same Markov equivalence class and hence, not distinguishable using merely conditional independence tests. Also since the exogenous noises of both variables have changed, ordinary interventional tests are also not capable of using the information of these two environments to distinguish between the two structures [5]. Moreover, as it will be shortly explained (see Related Work), since the exogenous noise of the target variable has changed, the invariant prediction method [23], cannot discern the correct structure either. As another example, consider the structure in Figure 1(b). Suppose the exogenous noise of X1 is varied across the two environments. Similar to the previous example, it can be shown that βX2(X1) varies across the two environments while βX1(X2) remains the same. This implies that the edge between X1 and X2 is from the former to the later. Similarly, βX3(X2) varies across the two environments while βX2(X3) remains the same. This implies that X2 is the parent of X3. Therefore, the structure in Figure 1(b) is distinguishable using the proposed identification approach. Note that the invariant prediction method cannot identify the relation between X2 and X3, and conditional independence tests are also not able to distinguish this structure. Related Work. The main approach to learning the causal structure in observational setting is to run a constraint-based or a score-based algorithm over the data. Constraint-based approach [33, 21] is based on performing statistical tests to learn conditional independencies among the variables along with applying the Meek rules introduced in [36]. IC and IC⇤[21], PC, and FCI [33] algorithms are among the well known examples of this approach. In score-based approach, first a hypothesis space of potential models along with a scoring function is defined. The scoring function measures how well the model fits the observed data. Then the highest-scoring structure is chosen as the output (usually via greedy search). Greedy Equivalence Search (GES) algorithm [20, 2] is an example of scorebased approach. Such purely observational approaches reconstruct the causal graph up to Markov equivalence classes. Thus, directions of some edges may remain unresolved. There are studies which attempt to identify the exact causal structure by restricting the model class [32, 12, 24, 22]. Most of such works consider SEM with independent noise. LiNGAM method [32] is a potent approach capable of structure learning in linear SEM model with additive noise2, as long as the distribution of the noise is not Gaussian. Authors of [12] and [38] showed that a nonlinear SEM with additive noise, 1As noted in [12], “nonlinearities can play a role similar to that of non-Gaussianity”, and both lead to exact structure recovery. 2 There are extensions to LiNGAM beyond linear model [38]. 2 and even the post-nonlinear causal model, along with some mild conditions on the functions and data distributions, are not symmetric in the cause and effect. There is also a line of work on causal structure learning in models where each vertex of the graph represents a random process [26, 34, 25, 6, 7, 16]. In such models, a temporal relationship is considered among the variables and it is usually assumed that there is no instantaneous influence among the processes. In interventional approach for causal structure learning, the experimenter picks specific variables and attempts to learn their relation with other variables, by observing the effect of perturbing that variables on the distribution of others. In recent works, bounds on the required number of interventions for complete discovery of causal relationships as well as passive and adaptive algorithms for minimizing the number of experiments were derived [5, 9, 10, 11, 31]. In this work we assume that the functional relations of the variables to their direct causes across a set of environments are invariant. Similar assumptions have been considered in other work [3, 30, 14, 13, 29, 23]. Specifically, [3] which studied finding causal relation between two variables related to each other by an invertible function, assumes that “ the distribution of the cause and the function mapping cause to effect are independent since they correspond to independent mechanisms of nature”. There is little work on multi-environment setup [35, 23, 37]. In [35], the authors analyzed the classes of structures that are equivalent relative to a stream of distributions and presented algorithms that output graphical representations of these equivalence classes. They assumed that changing the distribution of a variable, varies the marginal distribution of all its descendants. Naturally this also assumes that they have access to enough samples to test each variable for marginal distribution change. This approach cannot identify the causal relations among variables which are affected by environment changes in the same way. The most closely related work to our approach is the invariant prediction method [23], which utilizes different environments to estimate the set of predictors of a target variable. In that work, it is assumed that the exogenous noise of the target variable does not vary among the environments. In fact, the method crucially relies on this assumption as it adds variables to the estimated predictors set only if they are necessary to keep the distribution of the target variable’s noise fixed. Besides high computational complexity, invariant prediction framework may result in a set which does not contain all the parents of the target variable. Additionally, the optimal predictor set (output of the algorithm) is not necessarily unique. We will show that in many cases our proposed approach can overcome both these issues. Recently, the authors of [37] considered the setting in which changes in the mechanism of variables prevents ordinary conditional independence based algorithms from discovering the correct structure. The authors have modeled these changes as multiple environments and proposed a general solution for a non-parametric model which first detects the variables whose mechanism changed and then finds causal relations among variables using conditional independence tests. Due to the generality of the model, this method may require a high number of samples. Contribution. We propose a novel causal structure learning framework, which is capable of uniquely identifying causal structures that were not identifiable using observational approaches, from information that was not usable in existing interventional approaches. The main contribution of this work is to introduce the idea of using the invariance of the functional relations of the variables to their direct causes across a set of environments. This would imply using the invariance of coefficients in the special case of linear SEM for distinguishing the causes from the effects. We define a notion of completeness for a causal inference algorithm in this setting and prove the existence of such algorithm by proposing the baseline algorithm (Section 3). Additionally, we present an alternate algorithm (Section 4) which has significantly improved computational and sample complexity compared to the baseline algorithm. 2 Regression-Based Causal Structure Learning Definition 1. Consider a directed graph G = (V, E) with vertex set V and set of directed edges E. G is a DAG if it is a finite graph with no directed cycles. A DAG G is called causal if its vertices represent random variables V = {X1, ..., Xn} and a directed edges (Xi, Xj) indicates that variable Xi is a direct cause of variable Xj. We consider a linear SEM [1] as the underlying data generating model. In such a model the value of each variable Xj 2 V is determined by a linear combination of the values of its causal parents PA(Xj) plus an additive exogenous noise Nj as follows Xj = X Xi2PA(Xj) bjiXi + Nj, 8j 2 {1, · · · , p}, (1) 3 where Nj’s are jointly independent. This model could be represented by a single matrix equation X = BX + N. Further, we can write X = AN, (2) where A = (I −B)−1. This implies that each variable X 2 V can be written as a linear combination of the exogenous noises in the system. We assume that in our model, all variables are observable. Also, we focus on zero-mean Gaussian exogenous noise; otherwise, the proposed approach could be extended to any arbitrary distribution for the exogenous noise in the system. The following definitions will be used throughout the paper. Definition 2. Graph union of a set G of mixed graphs3 over a skeleton, is a mixed graph with the same skeleton as the members of G which contains directed edge (X, Y ), if 9 G 2 G such that (X, Y ) 2 E(G) and 6 9 G0 2 G such that (Y, X) 2 E(G0). The rest of the edges remain undirected. Definition 3. Causal DAGs G1 and G2 over V are Markov equivalent if every distribution that is compatible with one of the graphs is also compatible with the other. Markov equivalence is an equivalence relationship over the set of all graphs over V [17]. The graph union of all DAGs in the Markov equivalence class of a DAG G is called the essential graph of G and is denoted by Ess(G). We consider a multi-environment setting consisting of N environments E = {E1, ..., EN}. The structure of the causal DAG and the functional relations for producing the variables from their parents (the matrix B), remains the same across all environments, the exogenous noises may vary though. For a pair of environments Ei, Ej 2 E, let Iij be the set of variables whose exogenous noise have changed between the two environments. Given Iij, for any DAG G consistent with the essential graph4 obtained from an observational algorithm, define the regression invariance set as follows R(G, Iij) := {(X, S) : X 2 V, S ✓V \{X}, β(i) S (X) = β(j) S (X)}, where β(i) S (X) and β(j) S (X) are the regression coefficients of regressing variable X on S in environments Ei and Ej, respectively. In words, R(G, Iij) contains all pairs (X, S), X 2 V , S ✓V \{X} that if we regress X on S, the regression coefficients do not change across Ei and Ej. Definition 4. Given I, the set of variables whose exogenous noise has changed between two environments, DAGs G1 and G2 are called I-distinguishable if R(G1, I) 6= R(G2, I). We make the following assumption on the distributions of the exogenous noises. Assumption 1 (Regression Stability Assumption). For a given set I and structure G, there exists ✏0 > 0 such that for all 0 < ✏✏0 perturbing the variance of the exogenous noises by ✏does not change the regression invariance set R(G, I). The purpose of Assumption 1 is to rule out pathological cases for values of the variance of the exogenous noises in two environments which make special regression relations. For instance, in Example 1, β(1) X2(X1) = β(2) X2(X1) only if σ2 1˜σ2 2 = σ2 2˜σ2 1 where σ2 i and ˜σ2 i are the variances of the exogenous noise of Xi in the environments E1 and E2, respectively. Note that this special relation between σ2 1, ˜σ2 1, σ2 2, and ˜σ2 2 has Lebesgue measure zero in the set of all possible values for the variances. We give the following examples as applications of our approach. X1 X3 X2 X1 X3 X2 (a) (b) Figure 2: DAGs related to Example 3. Example 1. Consider DAGs G1 : X1 ! X2 and G2 : X1 X2. For I = {X1}, I = {X2} or I = {X1, X2}, calculating the regression coefficients as explained in Section 1, we see that (X1, {X2}) 62 R(G1, I) but (X1, {X2}) 2 R(G2, I). Hence G1 and G2 are Idistinguishable. As mentioned in Section 1, structures G1 and G2 are not distinguishable using the observational tests. Also, in the case of I = {X1, X2}, the invariant prediction approach and the ordinary interventional tests - in which the experimenter expects that a change in the distribution of the effect would not perturb the marginal distribution of the cause variable - are not capable of distinguishing the two structures either. 3A mixed graph contains both directed and undirected edges. 4DAG G is consistent with mixed graph M, if they have the same skeleton and G does not contain edge (X, Y ) while M contains (Y, X). 4 Example 2. Consider the DAG G in Figure 1(b) with I = {X1}. Consider an alternative DAG G0 in which compared to G the directed edge (X1, X2) is replaced by (X2, X1), and DAG G00 in which compared to G the directed edge (X2, X3) is replaced by (X3, X2). Since (X2, {X1}) 2 R(G, I) while this pair is not in R(G0, I), and (X2, {X3}) 62 R(G, I) while this pair belongs to R(G00, I), the structure of G is also distinguishable using the proposed identification approach. Note that the direction of the edges of G is not distinguishable using an observational test as it has two other DAGs in its equivalence class. Also, the invariant prediction method cannot identify the relation between X2 and X3, since it can keep the variance of the noise of X3 fixed by setting the predictor set as {X2} or {X1}, which have empty intersection. Example 3. Consider the structure in Figure 2(a) with I = {X2}. Among the six possible triangle DAGs, all of them are I-distinguishable from this structure and hence, with two environments differing in the exogenous noise of X2, this triangle DAG could be identified. Note that all the triangle DAGs are in the same Markov equivalence class and hence, using the information of one environment alone, observation only setting cannot lead to identification, which makes this structure challenging to deal with [8]. For I = {X1}, the structure in Figure 2(b) is not I-distinguishable from a triangle DAG in which the direction of the edge (X2, X3) is flipped. These two DAGs are also not distinguishable using the invariant prediction method and usual interventional approaches with intervention on X1. Let the structure G⇤be the ground truth DAG structure. Define G(G⇤, I) := {G : R(G, I) = R(G⇤, I)}, which is the set of all DAGs which are not I-distinguishable from G⇤. Using this set, we form the mixed graph M(G⇤, I) over V as the graph union of members of G(G⇤, I). Definition 5. Let Pi be the joint distribution over the set of variables V in environment Ei 2 E. An algorithm A : ({Pi}N i=1) ! M which gets the joint distribution over V in environments E = {Ei}N i=1 as the input and returns a mixed graph, is regression invariance complete if for any pair of environments Ei and Ej with Iij as the set of variables whose exogenous noise has changed between Ei and Ej, the set of directed edges of M(G⇤, Iij) be a subset of the set of directed edges of the output of A . In Section 3 we will introduce a structure learning algorithm which is complete in the sense of Definition 5. 3 Existence of Complete Algorithms In this section we show the existence of complete algorithm (in the sense of Definition 5) for learning the causal structure among a set of variables V whose dynamics satisfy the SEM in (1). The pseudo-code of the algorithm is presented in Algorithm 1. Algorithm 1 The Baseline Algorithm Input: Joint distribution over V in environments E = {Ei}N i=1. Obtain Ess(G⇤) by running a complete observational algorithm. for each pair of environments {Ei, Ej} ✓E do Obtain Rij = {(Y, S) : Y 2 V, S ✓ V \{Y }, β(i) S (Y ) = β(j) S (Y )}. Iij = ChangeFinder(Ei, Ej). Gij = ConsistentFinder(Ess(G⇤), Rij, Iij). Mij = S G2Gij G. end for ME = S 1i,jN Mij. Apply Meek rules on ME to get ˆ M. Output: Mixed graph ˆ M. Suppose G⇤is the ground truth structure. The algorithm first runs a complete observational algorithm to obtain the essential graph Ess(G⇤). For each pair of environments {Ei, Ej} 2 E, first the algorithm calculates the regression coefficients β(i) S (Y ) and β(j) S (Y ), for all Y 2 V and S ✓V \{Y }, and forms the regression invariance set Rij, which contains the pairs (Y, S) for which the regression coefficients did not change between Ei and Ej. Note that ideally Rij is equal to R(G⇤, Iij). Next, using the function ChangeFinder(·), we discover the set Iij which is the set of variables whose exogenous noises have varied between the two environments Ei and Ej. Then using the function ConsistantFinder(·), we find Gij which is the set of all possible DAGs, G that are consistent with Ess(G⇤) and R(G, Iij) = Rij. That is, this set is ideally equal to G(G⇤, Iij). After taking the union of graphs in Gij, we form Mij, which is the mixed graph containing all causal relations distinguishable from the given regression information between the two environments. This graph is ideally equal to M(G⇤, Iij). After obtaining Mij for all pairs of environments, the algorithm forms a mixed graph ME by taking graph union of Mij’s. We apply the Meek rules on ME to find all extra orientations and output ˆ M. Since for each pair of environments we are searching over all DAGs, and we take the graph union of Mij’s, the baseline algorithm is complete in the sense of Definition 5. 5 Obtaining the set Rij: In this part, for a given significance level ↵, we will show how the set Rij can be obtained to have total probability of false-rejection less than ↵. For given Y 2 V and S ✓V \{Y } in the environments Ei and Ej, we define the null hypothesis Hij 0,Y,S as follows: Hij 0,Y,S : 9β 2 R|S| such that β(i) S (Y ) = β and β(j) S (Y ) = β. (3) Let ˆβ(i) S (Y ) and ˆβ(j) S (Y ) be the estimations of β(i) S (Y ) and β(j) S (Y ), respectively, obtained using the ordinary least squares estimator, and define the test statistic ˆT := (ˆβ(i) S (Y ) −ˆβ(j) S (Y ))T (s2 i ˆ⌃−1 i + s2 j ˆ⌃−1 j )−1(ˆβ(i) S (Y ) −ˆβ(j) S (Y ))/|S|, (4) where s2 i and s2 j are unbiased estimates of variance of Y −(XS)T β(i) S (Y ) and Y −(XS)T β(j) S (Y ) in environments Ei and Ej, respectively, and ˆ⌃i and ˆ⌃j are sample covariance matrices of E[XS(XS)T ] in environments Ei and Ej, respectively. If the null hypothesis holds, then ˆT ⇠F(|S|, n −|S|), where F(·, ·) is the F-distribution (see supplementary material for details). We set the p-value of our test to be less than ↵/(p ⇥(2p−1 −1)). Hence, by testing all null hypotheses Hij 0,Y,S for any Y 2 V and S ✓V \{Y }, we can obtain the set Rij with total probability of false-rejection less than ↵. Function ChangeFinder(·): We use Lemma 1 to find the set Iij. Lemma 1. Given environments Ei and Ej, for a variable Y 2 V , if E[(Y −(XS)T β(i) S (Y ))2|Ei] 6= E[(Y −(XS)T β(j) S (Y ))2|Ej] for all S ✓N(Y ), where N(Y ) is the set of neighbors of Y , then the variance of exogenous noise NY is changed between the two environments. Otherwise, the variance of NY is unchanged. See the supplementary material for the proof. Based on Lemma 1, for any variable Y , we try to find a set S ✓N(Y ) for which the variance of Y −(XS)T βS(Y ) remains fixed between Ei and Ej by testing the following null hypothesis: ¯Hij 0,Y,S : 9σ 2 R s.t. E[(Y −(XS)T β(i) S (Y ))2|Ei] = σ2 and E[(Y −(XS)T β(j) S (Y ))2|Ej] = σ2. In order to test the above null hypothesis, we can compute the variance of Y −(XS)T β(i) S in Ei and Y −(XS)T β(j) S in Ej and test whether these variances are equal using an F-test. If the p-value of the test for the set S is less than ↵/(p ⇥2∆), then we will reject the null hypothesis ¯Hij 0,Y,S, where ∆ is the maximum degree of the causal graph. If we reject all hypothesis tests ¯Hij 0,Y,S for all S 2 N(Y ), then we will add Y to set Iij. Since we are performing at most p ⇥2∆(for each variable, at most 2∆ tests), we can obtain the set Iij with total probability of false-rejection less than ↵. Function ConsistentFinder(·): Let Dst be the set of all directed paths from variable Xs to variable Xt. For any directed path d 2 Dst, we define the weight of d as wd := ⇧(u,v)2dbvu where bvu are coefficients in (1). By this definition, it can be seen that the entry (t, s) of matrix A in (2) is equal to [A]ts = P d2Dst wd. Thus, the entries of matrix A are multivariate polynomials of entries of B. Furthermore, β(i) S (Y ) = E[XS(XS)T |Ei]−1E[XSY |Ei] = (AS⇤iAT S)−1AS⇤iAT Y , (5) where AS and AY are the rows corresponding to set S and Y in matrix A, respectively, and matrix ⇤i is a diagonal matrix where [⇤i]kk = E[(Nk)2|Ei]. Therefore, the entries of vector β(i) S (Y ) are rational functions of entries in B and ⇤i. Hence, the entries of Jacobian matrix of β(i) S (Y ) with respect to the diagonal entries of ⇤i are also rational expression of these parameters. In function ConsistentFinder(·), we select any directed graph G consistent with Ess(G⇤) and set bvu = 0 if (u, v) 62 G. In order to check whether G is in Gij, we initially set R(G, Iij) = ;. Then, we compute the Jacobian matrix of β(i) S (Y ) parametrically for any Y 2 V and S 2 V \{Y }. As noted above, the entries of Jacobian matrix can be obtained as rational expressions of entries in B and ⇤i. If all columns of Jacobian matrix corresponding to the elements of Iij are zero, β(i) S (Y ) is not changing by varying the variances of exogenous noises in Iij and hence, we add (Y, S) to set R(G, Iij). After checking all Y 2 V and S 2 V \{Y }, we add the graph G in Gij if R(G, Iij) = Rij. 6 Algorithm 2 LRE Algorithm Input: Joint distribution over V in environments E = {Ei}N i=1. Stage 1: Obtain Ess(G⇤) by running a complete observational algorithm, and for all X 2 V , form PA(X), CH(X), UK(X). Stage 2: for each pair of environments {Ei, Ej} ✓E do for all Y 2 V do for each X 2 UK(Y ) do Compute β(i) X (Y ), β(j) X (Y ), β(i) Y (X), and β(j) Y (X). if β(i) X (Y ) 6= β(j) X (Y ), but β(i) Y (X) = β(j) Y (X) then Set X as a child of Y and set Y as a parent of X. else if β(i) X (Y ) = β(j) X (Y ), but β(i) Y (X) 6= β(j) Y (X) then Set X as a parent of Y and set Y as a child of X. else if β(i) X (Y ) 6= β(j) X (Y ), and β(i) Y (X) 6= β(j) Y (X) then Find minimum set S ✓N(Y )\{X} such that β(i) S[{X}(Y ) = β(j) S[{X}(Y ). if S does not exist then Set X as a child of Y and set Y as a parent of X. else if β(i) S (Y ) 6= β(j) S (Y ) then 8W 2 {X} [ S, set W as a parent of Y and set Y as a child of W. else 8W 2 S, set W as a parent of Y and set Y as a child of W. end if end if end for end for end for Stage 3: Apply Meek rules on the resulted mixed graph to obtain ˆ M. Output: Mixed graph ˆ M. 4 LRE Algorithm The baseline algorithm of Section 3 is presented to prove the existence of complete algorithms, but that algorithm is not practical due to its high computational and sample complexity. In this section we present the Local Regression Examiner (LRE) algorithm, which is an alternative much more efficient algorithm for learning the causal structure among a set of variables V . The pseudo-code of the algorithm is presented in Algorithm 2. We make use of the following result in this algorithm. Lemma 2. Consider adjacent variables X, Y 2 V in causal structure G. For a pair of environments Ei and Ej, if (X, {Y }) 2 R(G, Iij), but (Y, {X}) 62 R(G, Iij), then Y is a parent of X. See the supplementary material for the proof. LRE algorithm consists of three stages. In the first stage, similar to the baseline algorithm, it runs a complete observational algorithm to obtain the essential graph. Then for each variable X 2 V , it forms the set of X’s discovered parents PA(X), and discovered children CH(X), and leaves the remaining neighbors as unknown in UK(X). In the second stage, the goal is that for each variable Y 2 V , we find Y ’s relation with its neighbors in UK(Y ) based on the invariance of its regression on its neighbors across each pair of environments. To do so, for each pair of environments, after fixing a target variable Y and for each of its neighbors in UK(Y ), the regression coefficients of X on Y and Y on X are calculated. We will face one of the following cases: • If neither is changing, we do not make any decisions about the relationship of X and Y . This case is similar to having only one environment, similar to the setup in [32]. • If one is changing and the other is unchanged, Lemma 2 implies that the variable which fixes the coefficient as the regressor is the parent. • If both are changing, we look for an auxiliary set S among Y ’s neighbors with minimum number of elements, for which β(i) S[{X}(Y ) = β(j) S[{X}(Y ). If no such S is found, it implies that X is a child of Y . Otherwise, if S and X are both required in the regressors set to fix the coefficient, we set {X} [ S as parents of Y ; otherwise, if X is not required in the regressors set to fix the 7 (a) Error ratio (b) CW ratio (c) CU ratio Figure 3: Comparsion of performance of LRE, PC, IP, and LiNGAM algorithms. coefficient, although we still set S as parents of Y , we do not make any decisions regarding the relationship between X and Y (Example 3 when I = {X1}, is an instance of this case). After adding the discovered relationships to the initial mixed graph, in the third stage, we apply the Meek rules on the resulting mixed graph to find all extra possible orientations and output ˆ M. Analysis of LRE Algorithm. We can use the hypothesis testing in (3) to test whether two vectors β(i) S (Y ) and β(j) S (Y ) are equal for any Y 2 V and S ✓N(Y ). If the p-value for the set S is less than ↵/(p ⇥(2∆−1)), then we will reject the null hypothesis Hij 0,Y,S. By doing so, we obtain the output with total probability of false-rejection less than ↵. Regarding the computational complexity, since for each pair of environments, in the worse case we perform ∆(2∆−1) hypothesis tests for each variable Y 2 V , and considering that we have $N 2 % pairs of environments, the computational complexity of LRE algorithm is in the order of $N 2 % p∆(2∆−1). Therefore, the bottleneck in the complexity of LRE is the requirement of running a complete observational algorithm in its first stage. 5 Experiments We evaluate the performance of LRE algorithm by testing it on both synthetic and real data. As seen in the pseudo-code in Algorithm 2, LRE has three stages where in the first stage, a complete observational algorithm is run. In our simulations, we used the PC algorithm5 [33], which is known to have a complexity of order O(p∆) when applied to a graph of order p with degree bound ∆. Synthetic Data. We generated 100 DAGs of order p = 10 by first selecting a causal order for variables and then connecting each pair of variables with probability 0.25. We generated data from a linear Gaussian SEM with coefficients drawn uniformly at random from [0.1, 2], and the variance of each exogenous noise was drawn uniformly at random from [0.1, 4]. For each variable of each structure, 105 samples were generated. In our simulation, we only considered a scenario in which we have two environments E1 and E2, where in the second environment, the exogenous noise of |I12| variables were varied. The perturbed variables were chosen uniformly at random. Figure 3 shows the performance of LRE algorithm. Define a link to be any directed or undirected edge. The error ratio is calculated as follows: Error ratio := (|miss-detected links|+|extra detected links|+ |correctly detected wrongly directed edges|)/ $p 2 % . Among the correctly detected links, define C := |correctly directed edges|, W := |wrongly directed edges|, and U := |undirected edges|. CW and DU ratios, are obtained as follows: CW ratio := (C)/(C + W), CU ratio := (C)/(C + U). As seen in Figure 3, only one change in the second environment (i.e., |I12| = 1), increases the CU ratio of LRE by 8 percent compared to the PC algorithm. Also, the main source of error in LRE algorithm results from the application of the PC algorithm. We also compared the Error ratio and CW ratio of LRE algorithm with the Invariant Prediction (IP) [23] and LiNGAM [32] (since there is no undirected edges in the output of IP and LiNGAM, the CU ratio of both would be one). For LiNGAM, we combined the data from two environments as the input. Therefore, the distribution of the exogenous noise of variables in I12 is not Guassian anymore. As it can be seen in Figure 3(a), the Error ratio of IP increases as the size of I12 increases. This is mainly due to the fact that in IP approach it is assumed that the distribution of exogenous noise of the target variable should not change, which may be violated by increasing |I12|. The result of simulations shows that the Error ratio of LiNGAM is 5We use the pcalg package [15] to run the PC algorithm on a set of random variables. 8 Figure 4: Performance of LRE algorithm in GRNs from DREAM 3 challenge. All five networks have 10 genes and total number of edges in each network (from left to right) is 11, 15, 10, 25, and 22, respectively. approximately twice of those of LRE and PC. We also see that LRE performed better compared to LiNGAM and IP in terms of CW ratio. Real Data a) We considered dataset of educational attainment of teenagers [27]. The dataset was collected from 4739 pupils from about 1100 US high schools with 13 attributes including gender, race, base year composite test score, family income, whether the parent attended college, and county unemployment rate. We split the dataset into two parts where the first part includes data from all pupils who live closer than 10 miles to some 4-year college. In our experiment, we tried to identify the potential causes that influence the years of education the pupils received. We ran LRE algorithm on the two parts of data as two environments with a significance level of 0.01 and obtained the following attributes as a possible set of parents of the target variable: base year composite test score, whether father was a college graduate, race, and whether school was in urban area. The IP method [23] also showed that the first two attributes have significant effects on the target variable. b) We evaluated the performance of LRE algorithm in gene regulatory networks (GRN). GRN is a collection of biological regulators that interact with each other. In GRN, the transcription factors are the main players to activate genes. The interactions between transcription factors and regulated genes in a species genome can be presented by a directed graph. In this graph, links are drawn whenever a transcription factor regulates a gene’s expression. Moreover, some of vertices have both functions, i.e., are both transcription factor and regulated gene. We considered GRNs in “DREAM 3 In Silico Network" challenge, conducted in 2008 [19]. The networks in this challenge were extracted from known biological interaction networks. The structures of these networks are available in the open-source tool “GeneNetWeaver (GNW)" [28]. Since we knew the true causal structures in these GRNs, we obtained Ess(G⇤) and gave it as an input to LRE algorithm. Furthermore, we used GNW tool to get 10000 measurements of steady state levels for every gene in the networks. In order to obtain measurements from the second environment, we increased coefficients of exogneous noise terms from 0.05 to 0.2 in GNW tool. Figure 4 depicts the performance of LRE algorithm in five networks extracted from GRNs of E-coli and Yeast bacteria. The green, red, and yellow bar for each network shows the number of correctly directed edges, wrongly directed edges, and undirected edges, respectively. Note that since we know the correct Ess(G⇤), there is no miss-detected links or extra detected links. As it can be seen, LRE algorithm has a fairly good accuracy (84% on average over all five networks) when it decides to orient an edge. 6 Conclusion We studied the problem of causal structure learning in a multi-environment setting, in which the functional relations for producing the variables from their parents remain the same across environments, while the distribution of exogenous noises may vary. We defined a notion of completeness for a causal discovery algorithm in this setting and proved the existence of such algorithm. We proposed an efficient algorithm with low computational and sample complexity and evaluated the performance of this algorithm by testing it on synthetic and real data. The results show the efficacy of the proposed algorithm. 9 Acknowledgments This work was supported in part by ARO grant W911NF-15-1-0281 and ONR grant W911NF-151-0479. Also, KZ acknowledges the support from NIH-1R01EB022858-01 FAIN-R01EB022858, NIH-1R01LM012087, and NIH-5U54HG008540-02 FAINU54HG008540. The content is solely the responsibility of the authors and does not necessarily represent the official views of the NIH. References [1] K. A. Bollen. Structural equations with latent variables. Wiley series in probability and mathematical statistics. Applied probability and statistics section. Wiley, 1989. [2] D. M. Chickering. Optimal structure identification with greedy search. Journal of machine learning research, 3(Nov):507–554, 2002. [3] P. Daniusis, D. Janzing, J. Mooij, J. Zscheischler, B. Steudel, K. Zhang, and B. Schölkopf. Distinguishing causes from effects using nonlinear acyclic causal models. In Proc. 26th Conference on Uncertainty in Artificial Intelligence (UAI2010), 2010. [4] F. Eberhardt. Causation and intervention. Unpublished doctoral dissertation, Carnegie Mellon University, 2007. [5] F. Eberhardt, C. Glymour, and R. Scheines. On the number of experiments sufficient and in the worst case necessary to identify all causal relations among n variables. In Proceedings of the 21st Conference on Uncertainty and Artificial Intelligence (UAI-05), pages 178–184, 2005. [6] J. Etesami and N. Kiyavash. Directed information graphs: A generalization of linear dynamical graphs. In American Control Conference (ACC), pages 2563–2568. IEEE, 2014. [7] J. Etesami, N. Kiyavash, and T. Coleman. Learning minimal latent directed information polytrees. Neural computation, 2016. [8] A. Ghassami and N. Kiyavash. Interaction information for causal inference: The case of directed triangle. In IEEE International Symposium on Information Theory (ISIT), 2017. [9] A. Ghassami, S. Salehkaleybar, and N. Kiyavash. Optimal experiment design for causal discovery from fixed number of experiments. arXiv preprint arXiv:1702.08567, 2017. [10] A. Ghassami, S. Salehkaleybar, N. Kiyavash, and E. Bareinboim. Budgeted experiment design for causal structure learning. arXiv preprint arXiv:1709.03625, 2017. [11] A. Hauser and P. Bühlmann. Two optimal strategies for active learning of causal models from interventional data. International Journal of Approximate Reasoning, 55(4):926–939, 2014. [12] P. O. Hoyer, D. Janzing, J. M. Mooij, J. Peters, and B. Schölkopf. Nonlinear causal discovery with additive noise models. In Advances in neural information processing systems, pages 689–696, 2009. [13] D. Janzing, J. Mooij, K. Zhang, J. Lemeire, J. Zscheischler, P. Daniušis, B. Steudel, and B. Schölkopf. Information-geometric approach to inferring causal directions. Artificial Intelligence, 182:1–31, 2012. [14] D. Janzing and B. Scholkopf. Causal inference using the algorithmic markov condition. IEEE Transactions on Information Theory, 56(10):5168–5194, 2010. [15] M. Kalisch, M. Mächler, D. Colombo, M. H. Maathuis, P. Bühlmann, et al. Causal inference using graphical models with the R package pcalg. Journal of Statistical Software, 47(11):1–26, 2012. [16] S. Kim, C. J. Quinn, N. Kiyavash, and T. P. Coleman. Dynamic and succinct statistical analysis of neuroscience data. Proceedings of the IEEE, 102(5):683–698, 2014. [17] D. Koller and N. Friedman. Probabilistic graphical models: principles and techniques. MIT press, 2009. 10 [18] H. Lütkepohl. New introduction to multiple time series analysis. Springer Science & Business Media, 2005. [19] D. Marbach, T. Schaffter, C. Mattiussi, and D. Floreano. Generating realistic in silico gene networks for performance assessment of reverse engineering methods. Journal of computational biology, 16(2):229–239, 2009. [20] C. Meek. Graphical models: Selecting causal and statistical models. 1997. [21] J. Pearl. Causality. Cambridge university press, 2009. [22] J. Peters and P. Bühlmann. Identifiability of gaussian structural equation models with equal error variances. Biometrika, 101, pages 219–228, 2014. [23] J. Peters, P. Bühlmann, and N. Meinshausen. Causal inference by using invariant prediction: identification and confidence intervals. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 78(5):947–1012, 2016. [24] J. Peters, J. M. Mooij, D. Janzing, B. Schölkopf, et al. Causal discovery with continuous additive noise models. Journal of Machine Learning Research, 15(1):2009–2053, 2014. [25] C. J. Quinn, N. Kiyavash, and T. P. Coleman. Efficient methods to compute optimal tree approximations of directed information graphs. IEEE Transactions on Signal Processing, 61(12):3173–3182, 2013. [26] C. J. Quinn, N. Kiyavash, and T. P. Coleman. Directed information graphs. IEEE Transactions on information theory, 61(12):6887–6909, 2015. [27] C. E. Rouse. Democratization or diversion? the effect of community colleges on educational attainment. Journal of Business & Economic Statistics, 13(2):217–224, 1995. [28] T. Schaffter, D. Marbach, and D. Floreano. Genenetweaver: in silico benchmark generation and performance profiling of network inference methods. Bioinformatics, 27(16):2263–2270, 2011. [29] B. Schölkopf, D. Janzing, J. Peters, E. Sgouritsa, K. Zhang, and J. Mooij. On causal and anticausal learning. In Proceedings of the 29th International Conference on Machine Learning (ICML), pages 1255–1262, 2012. [30] E. Sgouritsa, D. Janzing, P. Hennig, and B. Schölkopf. Inference of cause and effect with unsupervised inverse regression. In AISTATS, 2015. [31] K. Shanmugam, M. Kocaoglu, A. G. Dimakis, and S. Vishwanath. Learning causal graphs with small interventions. In Advances in Neural Information Processing Systems, pages 3195–3203, 2015. [32] S. Shimizu, P. O. Hoyer, A. Hyvärinen, and A. Kerminen. A linear non-gaussian acyclic model for causal discovery. Journal of Machine Learning Research, 7(Oct):2003–2030, 2006. [33] P. Spirtes, C. N. Glymour, and R. Scheines. Causation, prediction, and search. MIT press, 2000. [34] J. Sun, D. Taylor, and E. M. Bollt. Causal network inference by optimal causation entropy. SIAM Journal on Applied Dynamical Systems, 14(1):73–106, 2015. [35] J. Tian and J. Pearl. Causal discovery from changes. In Proceedings of the Seventeenth conference on Uncertainty in artificial intelligence, pages 512–521. Morgan Kaufmann Publishers Inc., 2001. [36] T. Verma and J. Pearl. An algorithm for deciding if a set of observed independencies has a causal explanation. In Proceedings of the Eighth international conference on uncertainty in artificial intelligence, pages 323–330. Morgan Kaufmann Publishers Inc., 1992. [37] K. Zhang, B. Huang, J. Zhang, C. Glymour, and B. Schölkopf. Causal discovery in the presence of distribution shift: Skeleton estimation and orientation determination. In Proc. International Joint Conference on Artificial Intelligence (IJCAI 2017), 2017. [38] K. Zhang and A. Hyvärinen. On the identifiability of the post-nonlinear causal model. In Proc. 25th Conference on Uncertainty in Artificial Intelligence (UAI 2009), Montreal, Canada, 2009. 11 | 2017 | 253 |
6,734 | Practical Hash Functions for Similarity Estimation and Dimensionality Reduction Søren Dahlgaard University of Copenhagen / SupWiz s.dahlgaard@supwiz.com Mathias Bæk Tejs Knudsen University of Copenhagen / SupWiz m.knudsen@supwiz.com Mikkel Thorup University of Copenhagen mthorup@di.ku.dk Abstract Hashing is a basic tool for dimensionality reduction employed in several aspects of machine learning. However, the perfomance analysis is often carried out under the abstract assumption that a truly random unit cost hash function is used, without concern for which concrete hash function is employed. The concrete hash function may work fine on sufficiently random input. The question is if they can be trusted in the real world where they may be faced with more structured input. In this paper we focus on two prominent applications of hashing, namely similarity estimation with the one permutation hashing (OPH) scheme of Li et al. [NIPS’12] and feature hashing (FH) of Weinberger et al. [ICML’09], both of which have found numerous applications, i.e. in approximate near-neighbour search with LSH and large-scale classification with SVM. We consider the recent mixed tabulation hash function of Dahlgaard et al. [FOCS’15] which was proved theoretically to perform like a truly random hash function in many applications, including the above OPH. Here we first show improved concentration bounds for FH with truly random hashing and then argue that mixed tabulation performs similar when the input vectors are not too dense. Our main contribution, however, is an experimental comparison of different hashing schemes when used inside FH, OPH, and LSH. We find that mixed tabulation hashing is almost as fast as the classic multiply-modprime scheme (ax + b) mod p. Mutiply-mod-prime is guaranteed to work well on sufficiently random data, but here we demonstrate that in the above applications, it can lead to bias and poor concentration on both real-world and synthetic data. We also compare with the very popular MurmurHash3, which has no proven guarantees. Mixed tabulation and MurmurHash3 both perform similar to truly random hashing in our experiments. However, mixed tabulation was 40% faster than MurmurHash3, and it has the proven guarantee of good performance (like fully random) on all possible input making it more reliable. 1 Introduction Hashing is a standard technique for dimensionality reduction and is employed as an underlying tool in several aspects of machine learning including search [22, 31, 32, 3], classification [24, 22], duplicate detection [25], computer vision and information retrieval [30]. The need for dimensionality reduction techniques such as hashing is becoming further important due to the huge growth in data sizes. As an example, already in 2010, Tong [36] discussed data sets with 1011 data points and 109 features. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Furthermore, when working with text, data points are often stored as w-shingles (i.e. w contiguous words or bytes) with w ≥5. This further increases the dimension from, say, 105 common english words to 105w. Two particularly prominent applications are set similarity estimation as initialized by the MinHash algorithm of Broder, et al. [8, 9] and feature hashing (FH) of Weinberger, et al. [37]. Both applications have in common that they are used as an underlying ingredient in many other applications. While both MinHash and FH can be seen as hash functions mapping an entire set or vector, they are perhaps better described as algorithms implemented using what we will call basic hash functions. A basic hash function h maps a given key to a hash value, and any such basic hash function, h, can be used to implement Minhash, which maps a set of keys, A, to the smallest hash value mina∈A h(a). A similar case can be made for other locality-sensitive hash functions such as SimHash [12], One Permutation Hashing (OPH) [22, 31, 32], and cross-polytope hashing [2, 33, 20], which are all implemented using basic hash functions. 1.1 Importance of understanding basic hash functions In this paper we analyze the basic hash functions needed for the applications of similarity estimation and FH. This is important for two reasons: 1) As mentioned in [22], dimensionality reduction is often a time bottle-neck and using a fast basic hash function to implement it may improve running times significantly, and 2) the theoretical guarantees of hashing schemes such as Minhash and FH rely crucially on the basic hash functions used to implement it, and this is further propagated into applications of these schemes such as approximate similarity search with the seminal LSH framework of Indyk and Motwani [19]. To fully appreciate this, consider LSH for approximate similarity search implemented with MinHash. We know from [19] that this structure obtains provably sub-linear query time and provably subquadratic space, where the exponent depends on the probability of hash collisions for “similar” and “not-similar” sets. However, we also know that implementing MinHash with a poorly chosen hash function leads to constant bias in the estimation [28], and this constant then appears in the exponent of both the space and the query time of the search structure leading to worse theoretical guarantees. Choosing the right basic hash function is an often overlooked aspect, and many authors simply state that any (universal) hash function “is usually sufficient in practice” (see e.g. [22, page 3]). While this is indeed the case most of the time (and provably if the input has enough entropy [26]), many applications rely on taking advantage of highly structured data to perform well (such as classification or similarity search). In these cases a poorly chosen hash function may lead to very systematic inconsistensies. Perhaps the most famous example of this is hashing with linear probing which was deemed very fast but unrealiable in practice until it was fully understood which hash functions to employ (see [35] for discussion and experiments). Other papers (see e.g. [31, 32] suggest using very powerful machinery such as the seminal pseudorandom generator of Nisan [27]. However, such a PRG does not represent a hash function and implementing it as such would incur a huge computational overhead. Meanwhile, some papers do indeed consider which concrete hash functions to use. In [15] it was considered to use 2-independent hashing for bottom-k sketches, which was proved in [34] to work for this application. However, bottom-k sketches do not work for SVMs and LSH. Closer to our work, [23] considered the use of 2-independent (and 4-independent) hashing for large-scale classification and online learning with b-bit minwise hashing. Their experiments indicate that 2-independent hashing often works, and they state that “the simple and highly efficient 2-independent scheme may be sufficient in practice”. However, no amount of experiments can show that this is the case for all input. In fact, we demonstrate in this paper – for the underlying FH and OPH – that this is not the case, and that we cannot trust 2-independent hashing to work in general. As noted, [23] used hashing for similarity estimation in classification, but without considering the quality of the underlying similarity estimation. Due to space restrictions, we do not consider classification in this paper, but instead focus on the quality of the underlying similarity estimation and dimensionality reduction sketches as well as considering these sketches in LSH as the sole applicaton (see also the discussion below). 2 1.2 Our contribution We analyze the very fast and powerful mixed tabulation scheme of [14] comparing it to some of the most popular and widely employed hash functions. In [14] it was shown that implementing OPH with mixed tabulation gives concentration bounds “essentially as good as truly random”. For feature hashing, we first present new concentration bounds for the truly random case improving on [37, 16]. We then argue that mixed tabulation gives essentially as good concentration bounds in the case where the input vectors are not too dense, which is a very common case for applying feature hashing. Experimentally, we demonstrate that mixed tabulation is almost as fast as the classic multiply-modprime hashing scheme. This classic scheme is guaranteed to work well for the considered applications when the data is sufficiently random, but we demonstrate that bias and poor concentration can occur on both synthetic and real-world data. We verify on the same experiments that mixed tabulation has the desired strong concentration, confirming the theory. We also find that mixed tabulation is roughly 40% faster than the very popular MurmurHash3 and CityHash. In our experiments these hash functions perform similar to mixed tabulation in terms of concentration. They do, however, not have the same theoretical guarantees making them harder to trust. We also consider different basic hash functions for implementing LSH with OPH. We demonstrate that the bias and poor concentration of the simpler hash functions for OPH translates into poor concentration for e.g. the recall and number of retrieved data points of the corresponding LSH search structure. Again, we observe that this is not the case for mixed tabulation, which systematically out-performs the faster hash functions. We note that [23] suggests that 2-independent hashing only has problems with dense data sets, but both the real-world and synthetic data considered in this work are sparse or, in the case of synthetic data, can be generalized to arbitrarily sparse data. While we do not consider b-bit hashing as in [23], we note that applying the b-bit trick to our experiments would only introduce a bias from false positives for all basic hash functions and leave the conclusion the same. It is important to note that our results do not imply that standard hashing techniques (i.e. multiply-mod prime) never work. Rather, they show that there does exist practical scenarios where the theoretical guarantees matter, making mixed tabulation more consistent. We believe that the very fast evaluation time and consistency of mixed tabulation makes it the best choice for the applications considered in this paper. 2 Preliminaries As mentioned we focus on similarity estimation and feature hashing. Here we briefly describe the methods used. We let [m] = {0, . . . , m −1}, for some integer m, denote the output range of the hash functions considered. 2.1 Similarity estimation In similarity estimation we are given two sets, A and B belonging to some universe U and are tasked with estimating the Jaccard similarity J(A, B) = |A ∩B|/|A ∪B|. As mentioned earlier, this can be solved using k independent repetitions of the MinHash algorithm, however this requires O(k · |A|) running time. In this paper we instead use the faster OPH of Li et al. [22] with the densification scheme of Shrivastava and Li [32]. This scheme works as follows: Let k be a parameter with k being a divisor of m, and pick a random hash function h : U →[m]. for each element x split h(x) into two parts b(x), v(x), where b(x) : U →[k] is given by h(x) mod k and v(x) is given by ⌊h(x)/k⌋. To create the sketch SOP H(A) of size k we simply let SOP H(A)[i] = mina∈A,b(a)=i v(a). To estimate the similarity of two sets A and B we simply take the fraction of indices, i, where SOP H(A)[i] = SOP H(B)[i]. This is, however, not an unbiased estimator, as there may be empty bins. Thus, [31, 32] worked on handling empty bins. They showed that the following addition gives an unbiased estimator with good variance. For each index i ∈[k] let bi be a random bit. Now, for a given sketch SOP H(A), if the ith bin is empty we copy the value of the closest non-empty bin going left (circularly) if bi = 0 and going right if bi = 1. We also add j · C to this copied value, where j is the distance to the copied bin and C is some sufficiently large offset parameter. The entire construction is illustrated in Figure 1 3 Hash value 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 Bin 0 1 2 3 4 Value 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 h(A) 0 0 1 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 1 0 S_OPH(A) 2 1 0 2 Bin 0 1 2 3 4 5 Direction 0 1 1 0 0 1 S_OPH(A) 3+C 2 1+2C 2+2C 1 3 Figure 1: Left: Example of one permutation sketch creation of a set A with |U| = 20 and k = 5. For each of the 20 possible hash value the corresponding bin and value is displayed. The hash values of A, h(A), are displayed as an indicator vector with the minimal value per bin marked in red. Note that the 3rd bin is empty. Right: Example of the densification from [32] (right). 2.2 Feature hashing Feature hashing (FH) introduced by Weinberger et al. [37] takes a vector v of dimension d and produces a vector v′ of dimension d′ ≪d preserving (roughly) the norm of v. More precisely, let h : [d] →[d′] and sgn : [d] →{−1, +1} be random hash functions, then v′ is defined as v′ i = P j,h(j)=i sgn(j)vj. Weinberger et al. [37] (see also [16]) showed exponential tail bounds on ∥v′∥2 2 when ∥v∥∞is sufficiently small and d′ is sufficiently large. 2.3 Locality-sensitive hashing The LSH framework of [19] is a solution to the approximate near neighbour search problem: Given a giant collection of sets C = A1, . . . , An, store a data structure such that, given a query set Aq, we can, loosely speaking, efficiently find a Ai with large J(Ai, Aq). Clearly, given the potential massive size of C it is infeasible to perform a linear scan. With LSH parameterized by positive integers K, L we create a size K sketch Soph(Ai) (or using another method) for each Ai ∈C. We then store the set Ai in a large table indexed by this sketch T[Soph(Ai)]. For a given query Aq we then go over all sets stored in T[Soph(Aq)] returning only those that are “sufficiently similar”. By picking K large enough we ensure that very distinct sets (almost) never end up in the same bucket, and by repeating the data structure L independent times (creating L such tables) we ensure that similar sets are likely to be retrieved in at least one of the tables. Recently, much work has gone into providing theoretically optimal [5, 4, 13] LSH. However, as noted in [2], these solutions require very sophisticated locality-sensitive hash functions and are mainly impractical. We therefore choose to focus on more practical variants relying either on OPH [31, 32] or FH [12, 2]. 2.4 Mixed tabulation Mixed tabulation was introduced by [14]. For simplicity assume that we are hashing from the universe [2w] and fix integers c, d such that c is a divisor of w. Tabulation-based hashing views each key x as a list of c characters x0, . . . , xc−1, where xi consists of the ith w/c bits of x. We say that the alphabet Σ = [2w/c]. Mixed tabulation uses x to derive d additional characters from Σ. To do this we choose c tables T1,i : Σ →Σd uniformly at random and let y = ⊕c i=0T1,i[xi] (here ⊕denotes the XOR operation). The d derived characters are then y0, . . . , yd−1. To create the final hash value we additionally choose c + d random tables T2,i : Σ →[m] and define h(x) = M i∈[c] T2,i[xi] M i∈[d] T2,i+c[yi] . Mixed Tabulation is extremely fast in practice due to the word-parallelism of the XOR operation and the small table sizes which fit in fast cache. It was proved in [14] that implementing OPH with mixed tabulation gives Chernoff-style concentration bounds when estimating Jaccard similarity. Another advantage of mixed tabulation is when generating many hash values for the same key. In this case, we can increase the output size of the tables T2,i, and then whp. over the choice of T1,i the resulting output bits will be independent. As an example, assume that we want to map each key to two 32-bit hash values. We then use a mixed tabulation hash function as described above mapping keys to one 64-bit hash value, and then split this hash value into two 32-bit values, which would be 4 independent of each other with high probability. Doing this with e.g. multiply-mod-prime hashing would not work, as the output bits are not independent. Thereby we significantly speed up the hashing time when generating many hash values for the same keys. A sample implementation with c = d = 4 and 32-bit keys and values can be found below. uint64_t mt_T1[256][4]; // Filled with random bits uint32_t mt_T2[256][4]; // Filled with random bits uint32_t mixedtab(uint32_t x) { uint64_t h=0; // This will be the final hash value for(int i = 0;i < 4;++i, x >>= 8) h ^= mt_T1[(uint8_t)x][i]; uint32_t drv=h >> 32; for(int i = 0;i < 4;++i, drv >>= 8) h ^= mt_T2[(uint8_t)drv][i]; return (uint32_t)h; } The main drawback to mixed tabulation hashing is that it needs a relatively large random seed to fill out the tables T1 and T2. However, as noted in [14] for all the applications we consider here it suffices to fill in the tables using a Θ(log |U|)-independent hash function. 3 Feature Hashing with Mixed Tabulation As noted, Weinberger et al. [37] showed exponential tail bounds for feature hashing. Here, we first prove improved concentration bounds, and then, using techniques from [14] we argue that these bounds still hold (up to a small additive factor polynomial in the universe size) when implementing FH with mixed tabulation. The concentration bounds we show are as follows (proved in the full version). Theorem 1. Let v ∈Rd with ∥v∥2 = 1 and let v′ be the d′-dimensional vector obtained by applying feature hashing implemented with truly random hash functions. Let ε, δ ∈(0, 1). Assume that d′ ≥16ε−2 lg(1/δ) and ∥v∥∞≤ √ ε log(1+ 4 ε ) 6√ log(1/δ) log(d′/δ). Then it holds that Pr 1 −ε < ∥v′∥2 2 < 1 + ε ≥1 −4δ . (1) Theorem 1 is very similar to the bounds on feature hashing by Weinberger et al. [37] and Dasgupta et al. [16], but improves on the requirement on the size of ∥v∥∞. Weinberger et al. [37] show that (1) holds if ∥v∥∞is bounded by ε 18√ log(1/δ) log(d′/δ), and Dasgupta et al. [16] show that (1) holds if ∥v∥∞is bounded by q ε 16 log(1/δ) log2(d′/δ). We improve on these results factors of Θ q 1 ε log(1/ε) and Θ p log(1/ε) log(d′/δ) respectively. We note that if we use feature hashing with a preconditioner (as in e.g. [16, Theorem 1]) these improvements translate into an improved running time. Using [14, Theorem 1] we get the following corollary. Corollary 1. Let v, ε, δ and d′ be as in Theorem 1, and let v′ be the d′-dimensional vector obtained using feature hashing on v implemented with mixed tabulation hashing. Then, if supp(v) ≤|Σ|/(1 + Ω(1)) it holds that Pr 1 −ε < ∥v′∥2 2 < 1 + ε ≥1 −4δ −O |Σ|1−⌊d/2⌋ . In fact Corollary 1 holds even if both h and sgn from Section 2.2 are implemented using the same hash function. I.e., if h⋆: [d] →{−1, +1} × [d′] is a mixed tabulation hash function as described in Section 2.4. We note that feature hashing is often applied on very high dimensional, but sparse, data (e.g. in [2]), and thus the requirement supp(v) ≤|Σ|/(1 + Ω(1)) is not very prohibitive. Furthermore, the target 5 dimension d′ is usually logarithmic in the universe, and then Corollary 1 still works for vectors with polynomial support giving an exponential decrease. 4 Experimental evaluation We experimentally evaluate several different basic hash functions. We first perform an evaluation of running time. We then evaluate the fastest hash functions on synthetic data confirming the theoretical results of Section 3 and [14]. Finally, we demonstrate that even on real-world data, the provable guarantees of mixed tabulation sometimes yields systematically better results. Due to space restrictions, we only present some of our experiments here, and refer to the full version for more details. We consider some of the most popular and fast hash functions employed in practice in k-wise PolyHash [10], Multiply-shift [17], MurmurHash3 [6], CityHash [29], and the cryptographic hash function Blake2 [7]. Of these hash functions only mixed tabulation (and very high degree PolyHash) provably works well for the applications we consider. However, Blake2 is a cryptographic function which provides similar guarantees conditioned on certain cryptographic assumptions being true. The remaining hash functions have provable weaknesses, but often work well (and are widely employed) in practice. See e.g. [1] who showed how to break both MurmurHash3 and Cityhash64. All experiments are implemented in C++11 using a random seed from http://www.random.org. The seed for mixed tabulation was filled out using a random 20-wise PolyHash function. All keys and hash outputs were 32-bit integers to ensure efficient implementation of multiply-shift and PolyHash using Mersenne prime p = 261 −1 and GCC’s 128-bit integers. We perform two time experiments, the results of which are presented in Table 1. Namely, we evaluate each hash function on the same 107 randomly chosen integers and use each hash function to implement FH on the News20 dataset (discussed later). We see that the only two functions faster than mixed tabulation are the very simple multiply-shift and 2-wise PolyHash. MurmurHash3 and CityHash were roughly 30-70% slower than mixed tabulation. This even though we used the official implementations of MurmurHash3, CityHash and Blake2 which are highly optimized to the x86 and x64 architectures, whereas mixed tabulation is just standard, portable C++11 code. The cryptographic hash function, Blake2, is orders of magnitude slower as we would expect. Table 1: Time taken to evaluate different hash functions to 1) hash 107 random numbers, and 2) perform feature hashing with d′ = 128 on the entire News20 data set. Hash function time (1..107) time (News20) Multiply-shift 7.72 ms 55.78 ms 2-wise PolyHash 17.55 ms 82.47 ms 3-wise PolyHash 42.42 ms 120.19 ms MurmurHash3 59.70 ms 159.44 ms CityHash 59.06 ms 162.04 ms Blake2 3476.31 ms 6408.40 ms Mixed tabulation 42.98 ms 90.55 ms Based on Table 1 we choose to compare mixed tabulation to multiply-shift, 2-wise PolyHash and MurmurHash3. We also include results for 20-wise PolyHash as a (cheating) way to “simulate” truly random hashing. 4.1 Synthetic data For a parameter, n, we generate two sets A, B as follows. The intersection A ∩B is created by sampling each integer from [2n] independently at random with probability 1/2. The symmetric difference is generated by sampling n numbers greater than 2n (distributed evenly to A and B). Intuitively, with a hash function like (ax + b) mod p, the dense subset of [2n] will be mapped very systematically and is likely (i.e. depending on the choice of a) to be spread out evenly. When using 6 OPH, this means that elements from the intersection is more likely to be the smallest element in each bucket, leading to an over-estimation of J(A, B). We use OPH with densification as in [32] implemented with different basic hash functions to estimate J(A, B). We generate one instance of A and B and perform 2000 independent repetitions for each different hash function on these A and B. Figure 2 shows the histogram and mean squared error (MSE) of estimates obtained with n = 2000 and k = 200. The figure confirms the theory: Both multiply-shift and 2-wise PolyHash exhibit bias and bad concentration whereas both mixed tabulation and MurmurHash3 behaves essentially as truly random hashing. We also performed experiments with k = 100 and k = 500 and considered the case of n = k/2, where we expect many empty bins and the densification of [32] kicks in. All experiments obtained similar results as Figure 2. 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 100 200 300 400 500 MSE=0.0058 Multiply-shift 0.2 0.3 0.4 0.5 0.6 0.7 0.8 MSE=0.0049 2-wise PolyHash 0.2 0.3 0.4 0.5 0.6 0.7 0.8 MSE=0.0012 Mixed Tabulation 0.2 0.3 0.4 0.5 0.6 0.7 0.8 MSE=0.0012 MurmurHash3 0.2 0.3 0.4 0.5 0.6 0.7 0.8 MSE=0.0011 "Random" Figure 2: Histograms of set similarity estimates obtained using OPH with densification of [32] on synthetic data implemented with different basic hash families and k = 200. The mean squared error for each hash function is displayed in the top right corner. For FH we obtained a vector v by taking the indicator vector of a set A generated as above and normalizing the length. For each hash function we perform 2000 independent repetitions of the following experiment: Generate v′ using FH and calculate ∥v′∥2 2. Using a good hash function we should get good concentration of this value around 1. Figure 3 displays the histograms and MSE we obtained for d′ = 200. Again we see that multiply-shift and 2-wise PolyHash give poorly concentrated results, and while the results are not biased this is only because of a very heavy tail of large values. We also ran experiments with d′ = 100 and d′ = 500 which were similar. 0.0 0.5 1.0 1.5 2.0 2.5 3.0 0 100 200 300 400 500 MSE=0.6066 Multiply-shift 0.0 0.5 1.0 1.5 2.0 2.5 3.0 MSE=0.305 2-wise PolyHash 0.0 0.5 1.0 1.5 2.0 2.5 3.0 MSE=0.0099 Mixed Tabulation 0.0 0.5 1.0 1.5 2.0 2.5 3.0 MSE=0.0097 MurmurHash3 0.0 0.5 1.0 1.5 2.0 2.5 3.0 MSE=0.01 "Random" Figure 3: Histograms of the 2-norm of the vectors output by FH on synthetic data implemented with different basic hash families and d′ = 200. The mean squared error for each hash function is displayed in the top right corner. We briefly argue that this input is in fact quite natural: When encoding a document as shingles or bag-of-words, it is quite common to let frequent words/shingles have the lowest identifier (using fewest bits). In this case the intersection of two sets A and B will likely be a dense subset of small identifiers. This is also the case when using Huffman Encoding [18], or if identifiers are generated on-the-fly as words occur. Furthermore, for images it is often true that a pixel is more likely to have a non-zero value if its neighbouring pixels have non-zero values giving many consecutive non-zeros. Additional synthetic results We also considered the following synthetic dataset, which actually showed even more biased and poorly concentrated results. For similarity estimation we used elements from [4n], and let the symmetric difference be uniformly random sampled elements from {0 . . . , n − 1} ∪{3n, . . . , 4n −1} with probability 1/2 and the intersection be the same but for {n, . . . , 3n −1}. This gave an MSE that was rougly 6 times larger for multiply-shift and 4 times larger for 2-wise 7 PolyHash compared to the other three. For feature hashing we sampled the numbers from 0 to 3n −1 independently at random with probability 1/2 giving an MSE that was 20 times higher for multiply-shift and 10 times higher for 2-wise PolyHash. We also considered both datasets without the sampling, which showed an even wider gap between the hash functions. 4.2 Real-world data We consider the following real-world data sets • MNIST [21] Standard collection of handwritten digits. The average number of non-zeros is roughly 150 and the total number of features is 728. We use the standard partition of 60000 database points and 10000 query points. • News20 [11] Collection of newsgroup documents. The average number of non-zeros is roughly 500 and the total number of features is roughly 1.3 · 106. We randomly split the set into two sets of roughly 10000 database and query points. These two data sets cover both the sparse and dense regime, as well as the cases where each data point is similar to many other points or few other points. For MNIST this number is roughly 3437 on average and for News20 it is roughly 0.2 on average for similarity threshold above 1/2. Feature hashing We perform the same experiment as for synthetic data by calculating ∥v′∥2 2 for each v in the data set with 100 independent repetitions of each hash function (i.e. getting 6, 000, 000 estimates for MNIST). Our results are shown in Figure 4 for output dimension d′ = 128. Results with d′ = 64 and d′ = 256 were similar. The results confirm the theory and show that mixed tabulation 0.0 0.5 1.0 1.5 2.0 0 100000 200000 300000 400000 500000 600000 700000 800000 MSE=0.144 Multiply-shift 0.0 0.5 1.0 1.5 2.0 MSE=0.1655 PolyHash 2-wise 0.0 0.5 1.0 1.5 2.0 MSE=0.0155 Mixed Tabulation 0.0 0.5 1.0 1.5 2.0 MSE=0.016 MurmurHash3 0.0 0.5 1.0 1.5 2.0 MSE=0.0163 "random" 0.0 0.5 1.0 1.5 2.0 0 50000 100000 150000 200000 250000 MSE=0.1106 Multiply-shift 0.0 0.5 1.0 1.5 2.0 MSE=0.0474 PolyHash 2-wise 0.0 0.5 1.0 1.5 2.0 MSE=0.0176 Mixed Tabulation 0.0 0.5 1.0 1.5 2.0 MSE=0.0176 MurmurHash3 0.0 0.5 1.0 1.5 2.0 MSE=0.0177 "random" Figure 4: Histograms of the norm of vectors output by FH on the MNIST (top) and News20 (bottom) data sets implemented with different basic hash families and d′ = 128. The mean squared error for each hash function is displayed in the top right corner. performs essentially as well as a truly random hash function clearly outperforming the weaker hash functions, which produce poorly concentrated results. This is particularly clear for the MNIST data set, but also for the News20 dataset, where e.g. 2-wise Polyhash resulted in ∥v′∥2 2 as large as 16.671 compared to 2.077 with mixed tabulation. Similarity search with LSH We perform a rigorous evaluation based on the setup of [31]. We test all combinations of K ∈{8, 10, 12} and L ∈{8, 10, 12}. For readability we only provide results for multiply-shift and mixed tabulation and note that the results obtained for 2-wise PolyHash and MurmurHash3 are essentially identical to those for multiply-shift and mixed tabulation respectively. Following [31] we evaluate the results based on two metrics: 1) The fraction of total data points retrieved per query, and 2) the recall at a given threshold T0 defined as the ratio of retrieved data 8 points having similarity at least T0 with the query to the total number of data points having similarity at least T0 with the query. Since the recall may be inflated by poor hash functions that just retrieve many data points, we instead report #retrieved/recall-ratio, i.e. the number of data points that were retrieved divided by the percentage of recalled data points. The goal is to minimize this ratio as we want to simultaneously retrieve few points and obtain high recall. Due to space restrictions we only report our results for K = L = 10. We note that the other results were similar. Our results can be seen in Figure 5. The results somewhat echo what we found on synthetic data. Namely, 1) Using multiply-shift overestimates the similarities of sets thus retrieving more points, and 2) Multiply-shift gives very poorly concentrated results. As a consequence of 1) Multiply-shift does, however, achieve slightly higher recall (not visible in the figure), but despite recalling slightly more points, the #retrieved / recall-ratio of multiply-shift is systematically worse. 200 400 600 800 1000 Ratio 0 5 10 15 20 25 30 35 Frequency MNIST, Thr=0.8 4000 5000 6000 7000 8000 9000 10000 Ratio 0 5 10 15 20 25 30 Frequency MNIST, Thr=0.5 0.89 0.90 0.91 0.92 0.93 Ratio 0 5 10 15 20 Frequency news20, Thr=0.8 0.99 1.00 1.01 1.02 1.03 Ratio 0 5 10 15 20 25 30 Frequency news20, Thr=0.5 Figure 5: Experimental evaluation of LSH with OPH and different hash functions with K = L = 10. The hash functions used are multiply-shift (blue) and mixed tabulation (green). The value studied is the retrieved / recall-ratio (lower is better). 5 Conclusion In this paper we consider mixed tabulation for computational primitives in computer vision, information retrieval, and machine learning. Namely, similarity estimation and feature hashing. It was previously shown [14] that mixed tabulation provably works essentially as well as truly random for similarity estimation with one permutation hashing. We complement this with a similar result for FH when the input vectors are sparse, even improving on the concentration bounds for truly random hashing found by [37, 16]. Our empirical results demonstrate this in practice. Mixed tabulation significantly outperforms the simple hashing schemes and is not much slower. Meanwhile, mixed tabulation is 40% faster than both MurmurHash3 and CityHash, which showed similar performance as mixed tabulation. However, these two hash functions do not have the same theoretical guarantees as mixed tabulation. We believe that our findings make mixed tabulation the best candidate for implementing these applications in practice. Acknowledgements The authors gratefully acknowledge support from Mikkel Thorup’s Advanced Grant DFF-060202499B from the Danish Council for Independent Research as well as the DABAI project. Mathias Bæk Tejs Knudsen gratefully acknowledges support from the FNU project AlgoDisc. References [1] Breaking murmur: Hash-flooding dos reloaded, 2012. URL: https://emboss.github.io/ blog/2012/12/14/breaking-murmur-hash-flooding-dos-reloaded/. 9 [2] Alexandr Andoni, Piotr Indyk, Thijs Laarhoven, Ilya P. Razenshteyn, and Ludwig Schmidt. Practical and optimal LSH for angular distance. In Proc. 28th Advances in Neural Information Processing Systems, pages 1225–1233, 2015. [3] Alexandr Andoni, Piotr Indyk, Huy L. Nguyen, and Ilya Razenshteyn. Beyond locality-sensitive hashing. In Proc. 25th ACM/SIAM Symposium on Discrete Algorithms (SODA), pages 1018– 1028, 2014. [4] Alexandr Andoni, Thijs Laarhoven, Ilya P. Razenshteyn, and Erik Waingarten. Optimal hashing-based time-space trade-offs for approximate near neighbors. In Proc. 28th ACM/SIAM Symposium on Discrete Algorithms (SODA), pages 47–66, 2017. [5] Alexandr Andoni and Ilya P. Razenshteyn. Optimal data-dependent hashing for approximate near neighbors. In Proc. 47th ACM Symposium on Theory of Computing (STOC), pages 793–801, 2015. [6] Austin Appleby. Murmurhash3, 2016. URL: https://github.com/aappleby/smhasher/ wiki/MurmurHash3. [7] Jean-Philippe Aumasson, Samuel Neves, Zooko Wilcox-O’Hearn, and Christian Winnerlein. BLAKE2: simpler, smaller, fast as MD5. In Proc. 11th International Conference on Applied Cryptography and Network Security, pages 119–135, 2013. [8] Andrei Z. Broder. On the resemblance and containment of documents. In Proc. Compression and Complexity of Sequences (SEQUENCES), pages 21–29, 1997. [9] Andrei Z. Broder, Steven C. Glassman, Mark S. Manasse, and Geoffrey Zweig. Syntactic clustering of the web. Computer Networks, 29:1157–1166, 1997. [10] Larry Carter and Mark N. Wegman. Universal classes of hash functions. Journal of Computer and System Sciences, 18(2):143–154, 1979. See also STOC’77. [11] Chih-Chung Chang and Chih-Jen Lin. LIBSVM: A library for support vector machines. ACM TIST, 2(3):27:1–27:27, 2011. [12] Moses Charikar. Similarity estimation techniques from rounding algorithms. In Proc. 34th ACM Symposium on Theory of Computing (STOC), pages 380–388, 2002. [13] Tobias Christiani. A framework for similarity search with space-time tradeoffs using localitysensitive filtering. In Proc. 28th ACM/SIAM Symposium on Discrete Algorithms (SODA), pages 31–46, 2017. [14] Søren Dahlgaard, Mathias Bæk Tejs Knudsen, Eva Rotenberg, and Mikkel Thorup. Hashing for statistics over k-partitions. In Proc. 56th IEEE Symposium on Foundations of Computer Science (FOCS), pages 1292–1310, 2015. [15] Søren Dahlgaard, Christian Igel, and Mikkel Thorup. Nearest neighbor classification using bottom-k sketches. In IEEE BigData Conference, pages 28–34, 2013. [16] Anirban Dasgupta, Ravi Kumar, and Tamás Sarlós. A sparse johnson: Lindenstrauss transform. In Proc. 42nd ACM Symposium on Theory of Computing (STOC), pages 341–350, 2010. [17] Martin Dietzfelbinger, Torben Hagerup, Jyrki Katajainen, and Martti Penttonen. A reliable randomized algorithm for the closest-pair problem. Journal of Algorithms, 25(1):19–51, 1997. [18] David A. Huffman. A method for the construction of minimum-redundancy codes. Proceedings of the Institute of Radio Engineers, 40(9):1098–1101, September 1952. [19] Piotr Indyk and Rajeev Motwani. Approximate nearest neighbors: Towards removing the curse of dimensionality. In Proc. 13th ACM Symposium on Theory of Computing (STOC), pages 604–613, 1998. [20] Christopher Kennedy and Rachel Ward. Fast cross-polytope locality-sensitive hashing. CoRR, abs/1602.06922, 2016. [21] Yann LeCun, Corinna Cortes, and Christopher J.C. Burges. The MNIST database of handwritten digits, 1998. URL: http://yann.lecun.com/exdb/mnist/. [22] Ping Li, Art B. Owen, and Cun-Hui Zhang. One permutation hashing. In Proc. 26th Advances in Neural Information Processing Systems, pages 3122–3130, 2012. 10 [23] Ping Li, Anshumali Shrivastava, and Arnd Christian König. b-bit minwise hashing in practice: Large-scale batch and online learning and using gpus for fast preprocessing with simple hash functions. CoRR, abs/1205.2958, 2012. URL: http://arxiv.org/abs/1205.2958. [24] Ping Li, Anshumali Shrivastava, Joshua L. Moore, and Arnd Christian König. Hashing algorithms for large-scale learning. In Proc. 25th Advances in Neural Information Processing Systems, pages 2672–2680, 2011. [25] Gurmeet Singh Manku, Arvind Jain, and Anish Das Sarma. Detecting near-duplicates for web crawling. In Proc. 10th WWW, pages 141–150, 2007. [26] Michael Mitzenmacher and Salil P. Vadhan. Why simple hash functions work: exploiting the entropy in a data stream. In Proc. 19th ACM/SIAM Symposium on Discrete Algorithms (SODA), pages 746–755, 2008. [27] Noam Nisan. Pseudorandom generators for space-bounded computation. Combinatorica, 12(4):449–461, 1992. See also STOC’90. [28] Mihai Patrascu and Mikkel Thorup. On the k-independence required by linear probing and minwise independence. ACM Transactions on Algorithms, 12(1):8:1–8:27, 2016. See also ICALP’10. [29] Geoff Pike and Jyrki Alakuijala. Introducing cityhash, 2011. URL: https://opensource. googleblog.com/2011/04/introducing-cityhash.html. [30] Gregory Shakhnarovich, Trevor Darrell, and Piotr Indyk. Nearest-neighbor methods in learning and vision. IEEE Trans. Neural Networks, 19(2):377, 2008. [31] Anshumali Shrivastava and Ping Li. Densifying one permutation hashing via rotation for fast near neighbor search. In Proc. 31th International Conference on Machine Learning (ICML), pages 557–565, 2014. [32] Anshumali Shrivastava and Ping Li. Improved densification of one permutation hashing. In Proceedings of the Thirtieth Conference on Uncertainty in Artificial Intelligence, UAI 2014, Quebec City, Quebec, Canada, July 23-27, 2014, pages 732–741, 2014. [33] Kengo Terasawa and Yuzuru Tanaka. Spherical LSH for approximate nearest neighbor search on unit hypersphere. In Proc. 10th Workshop on Algorithms and Data Structures (WADS), pages 27–38, 2007. [34] Mikkel Thorup. Bottom-k and priority sampling, set similarity and subset sums with minimal independence. In Proc. 45th ACM Symposium on Theory of Computing (STOC), 2013. [35] Mikkel Thorup and Yin Zhang. Tabulation-based 5-independent hashing with applications to linear probing and second moment estimation. SIAM Journal on Computing, 41(2):293–331, 2012. Announced at SODA’04 and ALENEX’10. [36] Simon Tong. Lessons learned developing a practical large scale machine learning system, April 2010. URL: https://research.googleblog.com/2010/04/ lessons-learned-developing-practical.html. [37] Kilian Q. Weinberger, Anirban Dasgupta, John Langford, Alexander J. Smola, and Josh Attenberg. Feature hashing for large scale multitask learning. In Proc. 26th International Conference on Machine Learning (ICML), pages 1113–1120, 2009. 11 | 2017 | 254 |
6,735 | Gaussian Quadrature for Kernel Features Tri Dao Department of Computer Science Stanford University Stanford, CA 94305 trid@stanford.edu Christopher De Sa Department of Computer Science Cornell University Ithaca, NY 14853 cdesa@cs.cornell.edu Christopher Ré Department of Computer Science Stanford University Stanford, CA 94305 chrismre@cs.stanford.edu Abstract Kernel methods have recently attracted resurgent interest, showing performance competitive with deep neural networks in tasks such as speech recognition. The random Fourier features map is a technique commonly used to scale up kernel machines, but employing the randomized feature map means that O(ϵ−2) samples are required to achieve an approximation error of at most ϵ. We investigate some alternative schemes for constructing feature maps that are deterministic, rather than random, by approximating the kernel in the frequency domain using Gaussian quadrature. We show that deterministic feature maps can be constructed, for any γ > 0, to achieve error ϵ with O(eeγ + ϵ−1/γ) samples as ϵ goes to 0. Our method works particularly well with sparse ANOVA kernels, which are inspired by the convolutional layer of CNNs. We validate our methods on datasets in different domains, such as MNIST and TIMIT, showing that deterministic features are faster to generate and achieve accuracy comparable to the state-of-the-art kernel methods based on random Fourier features. 1 Introduction Kernel machines are frequently used to solve a wide variety of problems in machine learning [26]. They have gained resurgent interest and have recently been shown [13, 18, 21, 19, 22] to be competitive with deep neural networks in some tasks such as speech recognition on large datasets. A kernel machine is one that handles input x1, . . . , xn, represented as vectors in Rd, only in terms of some kernel function k : Rd × Rd →R of pairs of data points k(xi, xj). This representation is attractive for classification problems because one can learn non-linear decision boundaries directly on the input without having to extract features before training a linear classifier. One well-known downside of kernel machines is the fact that they scale poorly to large datasets. Naive kernel methods, which operate on the Gram matrix Gi,j = k(xi, xj) of the data, can take a very long time to run because the Gram matrix itself requires O(n2) space and many operations on it (e.g., the singular value decomposition) take up to O(n3) time. Rahimi and Recht [23] proposed a solution to this problem: approximating the kernel with an inner product in a higher-dimensional space. Specifically, they suggest constructing a feature map z : Rd →RD such that k(x, y) ≈⟨z(x), z(y)⟩. This approximation enables kernel machines to use scalable linear methods for solving classification problems and to avoid the pitfalls of naive kernel methods by not materializing the Gram matrix. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. In the case of shift-invariant kernels, one technique that was proposed for constructing the function z is random Fourier features [23]. This data-independent method approximates the Fourier transform integral (1) of the kernel by averaging Monte-Carlo samples, which allows for arbitrarily-good estimates of the kernel function k. Rahimi and Recht [23] proved that if the feature map has dimension D = ˜Ω d ϵ2 then, with constant probability, the approximation ⟨z(x), z(y)⟩is uniformly ϵ-close to the true kernel on a bounded set. While the random Fourier features method has proven to be effective in solving practical problems, it comes with some caveats. Most importantly, the accuracy guarantees are only probabilistic and there is no way to easily compute, for a particular random sample, whether the desired accuracy is achieved. Our aim is to understand to what extent randomness is necessary to approximate a kernel. We thus propose a fundamentally different scheme for constructing the feature map z. While still approximating the kernel’s Fourier transform integral (1) with a discrete sum, we select the sample points and weights deterministically. This gets around the issue of probabilistic-only guarantees by removing the randomness from the algorithm. For small dimension, deterministic maps yield significantly lower error. As the dimension increases, some random sampling may become necessary, and our theoretical insights provide a new approach to sampling. Moreover, for a particular class of kernels called sparse ANOVA kernels (also known as convolutional kernels as they are similar to the convolutional layer in CNNs) which have shown state-of-the-art performance in speech recognition [22], deterministic maps require fewer samples than random Fourier features, both in terms of the desired error and the kernel size. We make the following contributions: • In Section 3, we describe how to deterministically construct a feature map z for the class of subgaussian kernels (which can approximate any kernel well) that has exponentially small (in D) approximation error. • In Section 4, for sparse ANOVA kernels, we show that our method produces good estimates using only O(d) samples, whereas random Fourier features requires O(d3) samples. • In Section 5, we validate our results experimentally. We demonstrate that, for real classification problems on MNIST and TIMIT datasets, our method combined with random sampling yields up to 3 times lower kernel approximation error. With sparse ANOVA kernels, our method slightly improves classification accuracy compared to the state-of-the-art kernel methods based on random Fourier features (which are already shown to match the performance of deep neural networks), all while speeding up the feature generation process. 2 Related Work Much work has been done on extracting features for kernel methods. The random Fourier features method has been analyzed in the context of several learning algorithms, and its generalization error has been characterized and compared to that of other kernel-based algorithms [24]. It has also been compared to the Nyström method [35], which is data-dependent and thus can sometimes outperform random Fourier features. Other recent work has analyzed the generalization performance of the random Fourier features algorithm [17], and improved the bounds on its maximum error [29, 31]. While we focus here on deterministic approximations to the Fourier transform integral and compare them to Monte Carlo estimates, these are not the only two methods available to us. A possible middle-ground method is quasi-Monte Carlo estimation, in which low-discrepancy sequences, rather than the fully-random samples of Monte Carlo estimation, are used to approximate the integral. This approach was analyzed in Yang et al. [34] and shown to achieves an asymptotic error of ϵ = O D−1 (log(D))d . While this is asymptotically better than the random Fourier features method, the complexity of the quasi-Monte Carlo method coupled with its larger constant factors prevents it from being strictly better than its predecessor. Our method still requires asymptotically fewer samples as ϵ goes to 0. Our deterministic approach here takes advantage of a long line of work on numerical quadrature for estimating integrals. Bach [1] analyzed in detail the connection between quadrature and random feature expansions, thus deriving bounds for the number of samples required to achieve a given average approximation error (though they did not present complexity results regarding maximum error nor suggested new feature maps). This connection allows us to leverage longstanding deterministic numerical integration methods such as Gaussian quadrature [6, 33] and sparse grids [2]. 2 Unlike many other kernels used in machine learning, such as the Gaussian kernel, the sparse ANOVA kernel allows us to encode prior information about the relationships among the input variables into the kernel itself. Sparse ANOVA kernels have been shown [30] to work well for many classification tasks, especially in structural modeling problems that benefit from both the good generalization of a kernel machine and the representational advantage of a sparse model [9]. 3 Kernels and Quadrature We start with a brief overview of kernels. A kernel function k: Rd × Rd →R encodes the similarity between pairs of examples. In this paper, we focus on shift invariant kernels (those which satisfy k(x, y) = k(x −y), where we overload the definition of k to also refer to a function k : Rd →R) that are positive definite and properly scaled. A kernel is positive definite if its Gram matrix is always positive definite for all non-trivial inputs, and it is properly-scaled if k(x, x) = 1 for all x. In this setting, our results make use of a theorem [25] that also provides the “key insight” behind the random Fourier features method. Theorem 1 (Bochner’s theorem). A continuous shift-invariant properly-scaled kernel k : Rd ×Rd → R is positive definite if and only if k is the Fourier transform of a proper probability distribution. We can then write k in terms of its Fourier transform Λ (which is a proper probability distribution): k(x −y) = Z Rd Λ(ω) exp(jω⊤(x −y)) dω. (1) For ω distributed according to Λ, this is equivalent to writing k(x −y) = E exp(jω⊤(x −y)) = E ⟨exp(jω⊤x), exp(jω⊤y)⟩ , where we use the usual Hermitian inner product ⟨x, y⟩= P i xiyi. The random Fourier features method proceeds by estimating this expected value using Monte Carlo sampling averaged across D random selections of ω. Equivalently, we can think of this as approximating (1) with a discrete sum at randomly selected sample points. Our objective is to choose some points ωi and weights ai to uniformly approximate the integral (1) with ˜k(x −y) = PD i=1 ai exp(jω⊤ j (x −y)). To obtain a feature map z : Rd →CD where ˜k(x −y) = PD i=1 aizi(x)zi(y), we can define z(x) = √a1 exp(jω⊤ 1 x) . . . √aD exp(jω⊤ Dx) ⊤. We aim to bound the maximum error for x, y in a region M with diameter M = supx,y∈M ∥x −y∥: ϵ = sup (x,y)∈M k(x −y) −˜k(x −y) = sup ∥u∥≤M Z Rd Λ(ω)ejω⊤u dω − D X i=1 aiejω⊤ i u . (2) A quadrature rule is a choice of ωi and ai to minimize this maximum error. To evaluate a quadrature rule, we are concerned with the sample complexity (for a fixed diameter M). Definition 1. For any ϵ > 0, a quadrature rule has sample complexity DSC(ϵ) = D, where D is the smallest value such that the rule, when instantiated with D samples, has maximum error at most ϵ. We will now examine ways to construct deterministic quadrature rules and their sample complexities. 3.1 Gaussian Quadrature Gaussian quadrature is one of the most popular techniques in one-dimensional numerical integration. The main idea is to approximate integrals of the form R Λ(ω)f(ω) dω ≈PD i=1 aif(ωi) such that the approximation is exact for all polynomials below a certain degree; D points are sufficient for polynomials of degree up to 2D −1. While the points and weights used by Gaussian quadrature depend both on the distribution Λ and the parameter D, they can be computed efficiently using orthogonal polynomials [10, 32]. Gaussian quadrature produces accurate results when integrating functions that are well-approximated by polynomials, which include all subgaussian densities. 3 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 Estimated max error Region diameter (M) Error of Polynomially-Exact Quadrature vs RFFs Polynomially-exact Random Fourier (a) Polynomially-exact 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 Region diameter (M) Error of Sparse Grid Quadrature vs RFFs Sparse grid Random Fourier (b) Sparse grid 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0 0.5 1 1.5 2 2.5 3 Region diameter (M) Error of Subsampled Dense Grid vs RFFs Subsampled Dense Grid Random Fourier (c) Subsampled dense grid Figure 1: Error comparison (empirical maximum over 106 uniformly-distributed samples) of different quadrature schemes and the random Fourier features method. Definition 2 (Subgaussian Distribution). We say that a distribution Λ : Rd →R is subgaussian with parameter b if for X ∼Λ and for all t ∈Rd, E [exp(⟨t, X⟩)] ≤exp 1 2b2 ∥t∥2 . We subsequently assume that the distribution Λ is subgaussian, which is a technical restriction compared to random Fourier features. Many of the kernels encountered in practice have subgaussian spectra, including the ubiquitous Gaussian kernel. More importantly, we can approximate any kernel by convolving it with the Gaussian kernel, resulting in a subgaussian kernel. The approximation error can be made much smaller than the inherent noise in the data generation process. 3.2 Polynomially-Exact Rules Since Gaussian quadrature is so successful in one dimension, as commonly done in the numerical analysis literature [14], we might consider using quadrature rules that are multidimensional analogues of Gaussian quadrature — rules that are accurate for all polynomials up to a certain degree R. In higher dimensions, this is equivalent to saying that our quadrature rule satisfies Z Rd Λ(ω) d Y l=1 (e⊤ l ω)rl dω = D X i=1 ai d Y l=1 (e⊤ l ωi)rl for all r ∈Nd such that X l rl ≤R, (3) where el are the standard basis vectors. To test the accuracy of polynomially-exact quadrature, we constructed a feature map for a Gaussian kernel, Λ(ω) = (2π)−d 2 exp −1 2 ∥ω∥2 , in d = 25 dimensions with D = 1000 and accurate for all polynomials up to degree R = 2. In Figure 1a, we compared this to a random Fourier features rule with the same number of samples, over a range of region diameters M that captures most of the data points in practice (as the kernel is properly scaled). For small regions in particular, a polynomially-exact scheme can have a significantly lower error than a random Fourier feature map. This experiment motivates us to investigate theoretical bounds on the behavior of this method. For subgaussian kernels, it is straightforward to bound the maximum error of a polynomially-exact feature map using the Taylor series approximation of the exponential function in (2). Theorem 2. Let k be a kernel with b-subgaussian spectrum, and let ˜k be its estimation under some quadrature rule with non-negative weights that is exact up to some even degree R. Let M ⊂Rd be some region of diameter M. Then, for all x, y ∈M, the error of the quadrature features approximation is bounded by k(x −y) −˜k(x −y) ≤3 eb2M 2 R R 2 . All the proofs are found in the Appendix. To bound the sample complexity of polynomially-exact quadrature, we need to determine how many quadrature samples we will need to satisfy the conditions of Theorem 2. There are d+R d constraints in (3), so a series of polynomially-exact quadrature rules that use only about this many sample points can yield a bound on the sample complexity of this quadrature rule. 4 Corollary 1. Assume that we are given a class of feature maps that satisfy the conditions of Theorem 2, and that all have a number of samples D ≤β d+R d for some fixed constant β. Then, for any γ > 0, the sample complexity of features maps in this class can be bounded by D(ϵ) ≤β2d max exp e2γ+1b2M 2 , 3 ϵ 1 γ ! . In particular, for a fixed dimension d, this means that for any γ, D(ϵ) = O ϵ−1 γ . The result of this corollary implies that, in terms of the desired error ϵ, the sample complexity increases asymptotically slower than any negative power of ϵ. Compared to the result for random Fourier features which had D(ϵ) = O(ϵ−2), this has a much weaker dependence on ϵ. While this weaker dependence does come at the cost of an additional factor of 2d, it is a constant cost of operating in dimension d, and is not dependent on the error ϵ. The more pressing issue, when comparing polynomially-exact features to random Fourier features, is the fact that we have no way of efficiently constructing quadrature rules that satisfy the conditions of Theorem 2. One possible construction involves selecting random sample points ωi, and then solving (3) for the values of ai using a non-negative least squares (NNLS) algorithm. While this construction works in low dimensions — it is the method we used for the experiment in Figure 1a — it rapidly becomes infeasible to solve for higher values of d and R. We will now show how to overcome this issue by introducing quadrature rules that can be rapidly constructed using grid-based quadrature rules. These rules are constructed directly from products of a one-dimensional quadrature rule, such as Gaussian quadrature, and so avoid the construction-difficulty problems encountered in this section. Although grid-based quadrature rules can be constructed for any kernel function [2], they are easier to conceptualize when the kernel k factors along the dimensions, as k(u) = Qd i=1 ki(ui). For simplicity we will focus on this factorizable case. 3.3 Dense Grid Quadrature The simplest way to do this is with a dense grid (also known as tensor product) construction. A dense grid construction starts by factoring the integral (1) into k(u) = Qd i=1 R ∞ −∞Λi(ω) exp(jωe⊤ i u) dω , where ei are the standard basis vectors. Since each of the factors is an integral over a single dimension, we can approximate them all with a one-dimensional quadrature rule. In this paper, we focus on Gaussian quadrature, although we could also use other methods such as Clenshaw-Curtis [3]. Taking tensor products of the points and weights results in the dense grid quadrature. The detailed construction is given in Appendix A. The individual Gaussian quadrature rules are exact for all polynomials up to degree 2L −1, so the dense grid is also accurate for all such polynomials. Theorem 2 then yields a bound on its sample complexity. Corollary 2. Let k be a kernel with a spectrum that is subgaussian with parameter b. Then, for any γ > 0, the sample complexity of dense grid features can be bounded by D(ϵ) ≤max exp deγd eb2M 2 2 , 3 ϵ 1 γ ! . In particular, as was the case with polynomially-exact features, for a fixed d, D(ϵ) = O ϵ−1 γ . Unfortunately, this scheme suffers heavily from the curse of dimensionality, since the sample complexity is doubly-exponential in d. This means that, even though they are easy to compute, the dense grid method does not represent a useful solution to the issue posed in Section 3.2. 3.4 Sparse Grid Quadrature The curse of dimensionality for quadrature in high dimensions has been studied in the numerical integration setting for decades. One of the more popular existing techniques for getting around 5 the curse is called sparse grid or Smolyak quadrature [28], originally developed to solve partial differential equations. Instead of taking the tensor product of the one-dimensional quadrature rule, we only include points up to some fixed total level A, thus constructing a linear combination of dense grid quadrature rules that achieves a similar error with exponentially fewer points than a single larger quadrature rule. The detailed construction is given in Appendix B. Compared to polynomially-exact rules, sparse grid quadrature can be computed quickly and easily (see Algorithm 4.1 from Holtz [12]). To measure the performance of sparse grid quadrature, we constructed a feature map for the same Gaussian kernel analyzed in the previous section, with d = 25 dimensions and up to level A = 2. We compared this to a random Fourier features rule with the same number of samples, D = 1351, and plot the results in Figure 1b. As was the case with polynomially-exact quadrature, this sparse grid scheme has tiny error for small-diameter regions, but this error unfortunately increases to be even larger than that of random Fourier features as the region diameter increases. The sparse grid construction yields a bound on the sample count: D ≤3A d+A A , where A is the bound on the total level. By extending known bounds on the error of Gaussian quadrature, we can similarly bound the error of the sparse grid feature method. Theorem 3. Let k be a kernel with a spectrum that is subgaussian with parameter b, and let ˜k be its estimation under the sparse grid quadrature rule up to level A. Let M ⊂Rd be some region of diameter M, and assume that A ≥24eb2M 2. Then, for all x, y ∈M, the error of the quadrature features approximation is bounded by k(x −y) −˜k(x −y) ≤2d 12eb2M 2 A A . This, along with our above upper bound on the sample count, yields a bound on the sample complexity. Corollary 3. Let k be a kernel with a spectrum that is subgaussian with parameter b. Then, for any γ > 0, the sample complexity of sparse grid features can be bounded by D(ϵ) ≤2d max exp 24e2γ+1b2M 2 , 2 d γ ϵ−1 γ . As was the case with all our previous deterministic features maps, for a fixed d, D(ϵ) = O ϵ−1 γ . Subsampled grids One of the downsides of the dense/sparse grids analyzed above is the difficulty of tuning the number of samples extracted in the feature map. As the only parameter we can typically set is the degree of polynomial exactness, even a small change in this (e.g., from 2 to 4) can produce a significant increase in the number of features. However, we can always subsample the grid points according to the distribution determined by their weights to both tame the curse of dimensionality and to have fine-grained control over the number of samples. For simplicity, we focus on subsampling the dense grid. In Figure 1c, we compare the empirical errors of subsampled dense grid and random Fourier features, noting that they are essentially the same across all diameters. 3.5 Reweighted Grid Quadrature Both random Fourier features and dense/sparse grid quadratures are data-independent. We now describe a data-adaptive method to choose a quadrature for a pre-specified number of samples: reweighting the grid points to minimize the difference between the approximate and the exact kernel on a small subset of data. Adjusting the grid to the data distribution yields better kernel approximation. We approximate the kernel k(x −y) with ˜k(x −y) = D X i=1 ai exp(jω⊤ i (x −y)) = D X i=1 ai cos(ω⊤ i (x −y)), where ai ≥0, as k is real-valued. We first choose the set of potential grid points ω1, . . . , ωD by sampling from a dense grid of Gaussian quadrature points. To solve for the weights a1, . . . , aD, we independently sample n pairs (x1, y1), . . . , (xn, yn) from the dataset, then minimize the empirical mean squared error (with variable a1, . . . , aD): minimize 1 n n X l=1 k(xl −yl) −˜k(xl −yl) 2 subject to ai ≥0, for i = 1, . . . , D. 6 For appropriately defined matrix M and vector b, this is an NNLS problem of minimizing 1 n ∥Ma −b∥2 subject to a ≥0, with variable a ∈RD. The solution is often sparse, due to the active elementwise constraints a ≥0. Hence we can pick a larger set of potential grid points ω1, . . . , ωD′ (with D′ > D) and solve the above problem to obtain a smaller set of grid points (those with aj > 0). To get even sparser solution, we add an ℓ1-penalty term with parameter λ ≥0: minimize 1 n ∥Ma −b∥2 + λ 1⊤a subject to ai ≥0, for i = 1, . . . , D′. Bisecting on λ yields the desired number of grid points. As this is a data-dependent quadrature, we empirically evaluate its performance on the TIMIT dataset, which we will describe in more details in Section 5. In Figure 2b, we compare the estimated root mean squared error on the dev set of different feature generation schemes against the number of features D (mean and standard deviation over 10 runs). Random Fourier features, Quasi-Monte Carlo (QMC) with Halton sequence, and subsampled dense grid have very similar approximation error, while reweighted quadrature has much lower approximation error. Reweighted quadrature achieves 2–3 times lower error for the same number of features and requiring 3–5 times fewer features for a fixed threshold of approximation error compared to random Fourier features. Moreover, reweighted features have extremely low variance, even though the weights are adjusted based only on a very small fraction of the dataset (500 samples out of 1 million data points). Faster feature generation Not only does grid-based quadrature yield better statistical performance to random Fourier features, it also has some notable systems benefits. Generating quadrature features requires a much smaller number of multiplies, as the grid points only take on a finite set of values for all dimensions (assuming an isotropic kernel). For example, a Gaussian quadrature that is exact up to polynomials of degree 21 only requires 11 grid points for each dimension. To generate the features, we multiply the input with these 11 numbers before adding the results to form the deterministic features. The save in multiples may be particularly significant in architectures such as application-specific integrated circuits (ASICs). In our experiment on the TIMIT dataset in Section 5, this specialized matrix multiplication procedure (on CPU) reduces the feature generation time in half. 4 Sparse ANOVA Kernels One type of kernel that is commonly used in machine learning, for example in structural modeling, is the sparse ANOVA kernels [11, 8]. They are also called convolutional kernels, as they operate similarly to the convolutional layer in CNNs. These kernels have achieved state-of-the-art performance on large real-world datasets [18, 22], as we will see in Section 5. A kernel of this type can be written as k(x, y) = X S∈S Y i∈S k1(xi −yi), where S is a set of subsets of the variables in {1, . . . , d}, and k1 is a one-dimensional kernel. (Straightforward extensions, which we will not discuss here, include using different one-dimensional kernels for each element of the products, and weighting the sum.) Sparse ANOVA kernels are used to encode sparse dependencies among the variables: two variables are related if they appear together in some S ∈S. These sparse dependencies are typically problem-specific: each S could correspond to a factor in the graph if we are analyzing a distribution modeled with a factor graph. Equivalently, we can think of the set S as a hypergraph, where each S ∈S corresponds to a hyperedge. Using this notion, we define the rank of an ANOVA kernel to be r = maxS∈S |S|, the degree as ∆= maxi∈{1,...,d} |{S ∈S|i ∈S}|, and the size of the kernel to be the number of hyperedges m = |S|. For sparse models, it is common for both the rank and the degree to be small, even as the number of dimensions d becomes large, so m = O(d). This is the case we focus on in this section. It is straightforward to apply the random Fourier features method to construct feature maps for ANOVA kernels: construct feature maps for each of the (at most r-dimensional) sub-kernels kS(x − y) = Q i∈S k1(xi −yi) individually, and then combine the results. To achieve overall error ϵ, it suffices for each of the sub-kernel feature maps to have error ϵ/m; this can be achieved by random Fourier features using DS = ˜Ω r(ϵm−1)−2 = ˜Ω rm2ϵ−2 samples each, where the notation ˜Ωhides the log 1/ϵ factor. Summed across all the m sub-kernels, this means that the random 7 Fourier features map can achieve error ϵ with constant probability with a sample complexity of D(ϵ) = ˜Ω rm3ϵ−2 samples. While it is nice to be able to tackle this problem using random features, the cubic dependence on m in this expression is undesirable: it is significantly larger than the D = ˜Ω(dϵ−2) we get in the non-ANOVA case. Can we construct a deterministic feature map that has a better error bound? It turns out that we can. Theorem 4. Assume that we use polynomially-exact quadrature to construct features for each of the sub-kernels kS, under the conditions of Theorem 2, and then combine the resulting feature maps to produce a feature map for the full ANOVA kernel. For any γ > 0, the sample complexity of this method is D(ϵ) ≤βm2r max exp e2γ+1b2M 2 , (3∆) 1 γ ϵ−1 γ . Compared to the random Fourier features, this rate depends only linearly on m. For fixed parameters β, b, M, ∆, r, and for any γ > 0, we can bound the sample complexity D(ϵ) = O(mϵ−1 γ ), which is better than random Fourier features both in terms of the kernel size m and the desired error ϵ. 5 Experiments To evaluate the performance of deterministic feature maps, we analyzed the accuracy of a sparse ANOVA kernel on the MNIST digit classification task [16] and the TIMIT speech recognition task [5]. Digit classification on MNIST This task consists of 70, 000 examples (60, 000 in the training dataset and 10, 000 in the test dataset) of hand-written digits which need to be classified. Each example is a 28 × 28 gray-scale image. Clever kernel-based SVM techniques are known to achieve very low error rates (e.g., 0.79%) on this problem [20]. We do not attempt to compare ourselves with these rates; rather, we compare random Fourier features and subsampled dense grid features that both approximate the same ANOVA kernel. The ANOVA kernel we construct is designed to have a similar structure to the first layer of a convolutional neural network [27]. Just as a filter is run on each 5 × 5 square of the image, for our ANOVA kernel, each of the sub-kernels is chosen to run on a 5 × 5 square of the original image (note that there are many, (28 −5 + 1)2 = 576, such squares). We choose the simple Gaussian kernel as our one-dimensional kernel. Figure 2a compares the dense grid subsampling method to random Fourier features across a range of feature counts. The deterministic feature map with subsampling performs better than the random Fourier feature map across most large feature counts, although its performance degrades for very small feature counts. The deterministic feature map is also somewhat faster to compute, taking—for the 28800-features—320 seconds vs. 384 seconds for the random Fourier features, a savings of 17%. Speech recognition on TIMIT This task requires producing accurate transcripts from raw audio recordings of conversations in English, involving 630 speakers, for a total of 5.4 hours of speech. We use the kernel features in the acoustic modeling step of speech recognition. Each data point corresponds to a frame (10ms) of audio data, preprocessed using the standard feature space Maximum Likelihood Linear Regression (fMMLR) [4]. The input x has dimension 40. After generating kernel features z(x) from this input, we model the corresponding phonemes y by a multinomial logistic regression model. Again, we use a sparse ANOVA kernel, which is a sum of 50 sub-kernels of the form exp(−γ ∥xS −yS∥2), each acting on a subset S of 5 indices. These subsets are randomly chosen a priori. To reweight the quadrature features, we sample 500 data points out of 1 million. We plot the phone error rates (PER) of a speech recognizer trained based on different feature generation schemes against the number of features D in Figure 2c (mean and standard deviation over 10 runs). Again, subsampled dense grid performs similarly to random Fourier features, QMC yields slightly higher error, while reweighted features achieve slightly lower phone error rates. All four methods have relatively high variability in their phone error rates due to the stochastic nature of the training and decoding steps in the speech recognition pipeline. The quadrature-based features (subsampled dense grids and reweighted quadrature) are about twice as fast to generate, compared to random Fourier features, due to the small number of multiplies required. We use the same setup as May et al. [22], and the performance here matches both that of random Fourier features and deep neural networks in May et al. [22]. 8 0.945 0.95 0.955 0.96 0.965 0.97 0.975 0.98 0.985 0 5000 10000 15000 20000 25000 30000 Test accuracy Number of features Test Accuracy on MNIST Random Fourier Subsampled dense grid (a) Test accuracy on MNIST 0 0.5 1 1.5 2 2.5 10000 20000 30000 40000 50000 RMS approximation error Number of features Kernel RMS approximation error on TIMIT Random Fourier Quasi-Monte Carlo Subsampled dense grid Reweighted quadrature (b) Kernel approx. error on TIMIT 18.3 18.4 18.5 18.6 18.7 18.8 18.9 19 10000 15000 20000 25000 30000 Phone error rate Number of features Phone error rate on TIMIT Random Fourier Quasi-Monte Carlo Subsampled dense grid Reweighted quadrature (c) Phone error rate on TIMIT Figure 2: Performance of different feature generation schemes on MNIST and TIMIT. 6 Conclusion We presented deterministic feature maps for kernel machines. We showed that we can achieve better scaling in the desired accuracy ϵ compared to the state-of-the-art method, random Fourier features. We described several ways to construct these feature maps, including polynomially-exact quadrature, dense grid construction, sparse grid construction, and reweighted grid construction. Our results apply well to the case of sparse ANOVA kernels, achieving significant improvements (in the dependency on the dimension d) over random Fourier features. Finally, we evaluated our results experimentally, and showed that ANOVA kernels with deterministic feature maps can produce comparable accuracy to the state-of-the-art methods based on random Fourier features on real datasets. ANOVA kernels are an example of how structure can be used to define better kernels. Resembling the convolutional layers of convolutional neural networks, they induce the necessary inductive bias in the learning process. Given CNNs’ recent success in other domains beside images, such as sentence classification [15] and machine translation [7], we hope that our work on deterministic feature maps will enable kernel methods such as ANOVA kernels to find new areas of application. Acknowledgments This material is based on research sponsored by Defense Advanced Research Projects Agency (DARPA) under agreement number FA8750-17-2-0095. We gratefully acknowledge the support of the DARPA SIMPLEX program under No. N66001-15-C-4043, DARPA FA8750-12-2-0335 and FA8750-13-2-0039, DOE 108845, National Institute of Health (NIH) U54EB020405, the National Science Foundation (NSF) under award No. CCF-1563078, the Office of Naval Research (ONR) under awards No. N000141210041 and No. N000141310129, the Moore Foundation, the Okawa Research Grant, American Family Insurance, Accenture, Toshiba, and Intel. This research was supported in part by affiliate members and other supporters of the Stanford DAWN project: Intel, Microsoft, Teradata, and VMware. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright notation thereon. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of DARPA or the U.S. Government. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of DARPA, AFRL, NSF, NIH, ONR, or the U.S. government. 9 References [1] Francis Bach. On the equivalence between quadrature rules and random features. arXiv preprint arXiv:1502.06800, 2015. [2] Hans-Joachim Bungartz and Michael Griebel. Sparse grids. Acta numerica, 13:147–269, 2004. [3] Charles W Clenshaw and Alan R Curtis. A method for numerical integration on an automatic computer. Numerische Mathematik, 2(1):197–205, 1960. [4] Mark JF Gales. Maximum likelihood linear transformations for HMM-based speech recognition. Computer speech & language, 12(2):75–98, 1998. [5] J. S. Garofolo, L. F. Lamel, W. M. Fisher, J. G. Fiscus, D. S. Pallett, and N. L. Dahlgren. DARPA TIMIT acoustic phonetic continuous speech corpus CDROM, 1993. URL http: //www.ldc.upenn.edu/Catalog/LDC93S1.html. [6] Carl Friedrich Gauss. Methodus nova integralium valores per approximationem inveniendi. apvd Henricvm Dieterich, 1815. [7] Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N Dauphin. Convolutional sequence to sequence learning. arXiv preprint arXiv:1705.03122, 2017. [8] S. R. Gunn and J. S. Kandola. Structural Modelling with Sparse Kernels. Machine Learning, 48(1-3):137–163, July 2002. ISSN 0885-6125, 1573-0565. doi: 10.1023/A:1013903804720. URL https://link.springer.com/article/10.1023/A:1013903804720. [9] Steve R. Gunn and Jaz S. Kandola. Structural modelling with sparse kernels. Machine learning, 48(1-3):137–163, 2002. [10] Nicholas Hale and Alex Townsend. Fast and accurate computation of Gauss–Legendre and Gauss–Jacobi quadrature nodes and weights. SIAM Journal on Scientific Computing, 35(2): A652–A674, 2013. [11] Thomas Hofmann, Bernhard Schölkopf, and Alexander J Smola. Kernel methods in machine learning. The annals of statistics, pages 1171–1220, 2008. [12] Markus Holtz. Sparse grid quadrature in high dimensions with applications in finance and insurance, volume 77. Springer Science & Business Media, 2010. [13] Po-Sen Huang, Haim Avron, Tara N Sainath, Vikas Sindhwani, and Bhuvana Ramabhadran. Kernel methods match deep neural networks on TIMIT. In Acoustics, Speech and Signal Processing (ICASSP), 2014 IEEE International Conference on, pages 205–209. IEEE, 2014. [14] Eugene Isaacson and Herbert Bishop Keller. Analysis of numerical methods. Courier Corporation, 1994. [15] Yoon Kim. Convolutional neural networks for sentence classification. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1746–1751. [16] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. [17] Ming Lin, Shifeng Weng, and Changshui Zhang. On the sample complexity of random Fourier features for online learning: How many random Fourier features do we need? ACM Trans. Knowl. Discov. Data, 2014. [18] Zhiyun Lu, Avner May, Kuan Liu, Alireza Bagheri Garakani, Dong Guo, Aurélien Bellet, Linxi Fan, Michael Collins, Brian Kingsbury, Michael Picheny, and Fei Sha. How to scale up kernel methods to be as good as deep neural nets. arXiv:1411.4000 [cs, stat], November 2014. URL http://arxiv.org/abs/1411.4000. arXiv: 1411.4000. 10 [19] Zhiyun Lu, Dong Quo, Alireza Bagheri Garakani, Kuan Liu, Avner May, Aurélien Bellet, Linxi Fan, Michael Collins, Brian Kingsbury, Michael Picheny, et al. A comparison between deep neural nets and kernel acoustic models for speech recognition. In Acoustics, Speech and Signal Processing (ICASSP), 2016 IEEE International Conference on, pages 5070–5074. IEEE, 2016. [20] Subhransu Maji and Jitendra Malik. Fast and accurate digit classification. EECS Department, University of California, Berkeley, Tech. Rep. UCB/EECS-2009-159, 2009. [21] Avner May, Michael Collins, Daniel Hsu, and Brian Kingsbury. Compact kernel models for acoustic modeling via random feature selection. In Acoustics, Speech and Signal Processing (ICASSP), 2016 IEEE International Conference on, pages 2424–2428. IEEE, 2016. [22] Avner May, Alireza Bagheri Garakani, Zhiyun Lu, Dong Guo, Kuan Liu, Aurélien Bellet, Linxi Fan, Michael Collins, Daniel Hsu, Brian Kingsbury, et al. Kernel approximation methods for speech recognition. arXiv preprint arXiv:1701.03577, 2017. [23] Ali Rahimi and Benjamin Recht. Random features for large-scale kernel machines. In Advances in neural information processing systems, pages 1177–1184, 2007. [24] Ali Rahimi and Benjamin Recht. Weighted sums of random kitchen sinks: Replacing minimization with randomization in learning. In Advances in neural information processing systems, pages 1313–1320, 2009. [25] Walter Rudin. Fourier analysis on groups. Number 12. John Wiley & Sons, 1990. [26] Bernhard Schölkopf and Alexander J Smola. Learning with kernels: Support vector machines, regularization, optimization, and beyond. MIT press, 2002. [27] Patrice Y Simard, Dave Steinkraus, and John C Platt. Best practices for convolutional neural networks applied to visual document analysis. In ICDAR, page 958. IEEE, 2003. [28] S. A. Smolyak. Quadrature and interpolation formulas for tensor products of certain class of functions. Dokl. Akad. Nauk SSSR, 148(5):1042–1053, 1963. Transl.: Soviet Math. Dokl. 4:240-243, 1963. [29] Bharath Sriperumbudur and Zoltan Szabo. Optimal rates for random Fourier features. In C. Cortes, N.D. Lawrence, D.D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems 28, pages 1144–1152. Curran Associates, Inc., 2015. [30] M Stitson, Alex Gammerman, Vladimir Vapnik, Volodya Vovk, Chris Watkins, and Jason Weston. Support vector regression with anova decomposition kernels. Advances in kernel methods—Support vector learning, pages 285–292, 1999. [31] Dougal J. Sutherland and Jeff Schneider. On the error of random Fourier features. In Proceedings of the 31th Annual Conference on Uncertainty in Artificial Intelligence (UAI-15). AUAI Press, 2015. [32] Alex Townsend, Thomas Trogdon, and Sheehan Olver. Fast computation of Gauss quadrature nodes and weights on the whole real line. IMA Journal of Numerical Analysis, page drv002, 2015. [33] Lloyd N Trefethen. Is Gauss quadrature better than Clenshaw–Curtis? SIAM review, 50(1): 67–87, 2008. [34] Jiyan Yang, Vikas Sindhwani, Haim Avron, and Michael Mahoney. Quasi-Monte Carlo feature maps for shift-invariant kernels. In Proceedings of The 31st International Conference on Machine Learning (ICML-14), pages 485–493, 2014. [35] Tianbao Yang, Yu-Feng Li, Mehrdad Mahdavi, Rong Jin, and Zhi-Hua Zhou. Nyström method vs random Fourier features: A theoretical and empirical comparison. In Advances in neural information processing systems, pages 476–484, 2012. 11 | 2017 | 255 |
6,736 | Multi-Modal Imitation Learning from Unstructured Demonstrations using Generative Adversarial Nets Karol Hausman∗†, Yevgen Chebotar∗†‡, Stefan Schaal†‡, Gaurav Sukhatme†, Joseph J. Lim† †University of Southern California, Los Angeles, CA, USA ‡Max-Planck-Institute for Intelligent Systems, Tübingen, Germany {hausman, ychebota, sschaal, gaurav, limjj}@usc.edu Abstract Imitation learning has traditionally been applied to learn a single task from demonstrations thereof. The requirement of structured and isolated demonstrations limits the scalability of imitation learning approaches as they are difficult to apply to real-world scenarios, where robots have to be able to execute a multitude of tasks. In this paper, we propose a multi-modal imitation learning framework that is able to segment and imitate skills from unlabelled and unstructured demonstrations by learning skill segmentation and imitation learning jointly. The extensive simulation results indicate that our method can efficiently separate the demonstrations into individual skills and learn to imitate them using a single multi-modal policy. The video of our experiments is available at http://sites.google.com/view/nips17intentiongan. 1 Introduction One of the key factors to enable deployment of robots in unstructured real-world environments is their ability to learn from data. In recent years, there have been multiple examples of robot learning frameworks that present promising results. These include: reinforcement learning [31] - where a robot learns a skill based on its interaction with the environment and imitation learning [2, 5] - where a robot is presented with a demonstration of a skill that it should imitate. In this work, we focus on the latter learning setup. Traditionally, imitation learning has focused on using isolated demonstrations of a particular skill [29]. The demonstration is usually provided in the form of kinesthetic teaching, which requires the user to spend sufficient time to provide the right training data. This constrained setup for imitation learning is difficult to scale to real world scenarios, where robots have to be able to execute a combination of different skills. To learn these skills, the robots would require a large number of robot-tailored demonstrations, since at least one isolated demonstration has to be provided for every individual skill. In order to improve the scalability of imitation learning, we propose a framework that can learn to imitate skills from a set of unstructured and unlabeled demonstrations of various tasks. As a motivating example, consider a highly unstructured data source, e.g. a video of a person cooking a meal. A complex activity, such as cooking, involves a set of simpler skills such as grasping, reaching, cutting, pouring, etc. In order to learn from such data, three components are required: i) the ability to map the image stream to state-action pairs that can be executed by a robot, ii) the ability to segment the data into simple skills, and iii) the ability to imitate each of the segmented skills. In this work, we tackle the latter two components, leaving the first one for future work. We believe that the capability proposed here of learning from unstructured, unlabeled demonstrations is an important step towards scalable robot learning systems. ∗Equal contribution In this paper, we present a novel imitation learning method that learns a multi-modal stochastic policy, which is able to imitate a number of automatically segmented tasks using a set of unstructured and unlabeled demonstrations. Our results indicate that the presented technique can separate the demonstrations into sensible individual skills and imitate these skills using a learned multi-modal policy. We show applications of the presented method to the tasks of skill segmentation, hierarchical reinforcement learning and multi-modal policy learning. 2 Related Work Imitation learning is concerned with learning skills from demonstrations. Approaches that are suitable for this setting can be split into two categories: i) behavioral cloning [27], and ii) inverse reinforcement learning (IRL) [24]. While behavioral cloning aims at replicating the demonstrations exactly, it suffers from the covariance shift [28]. IRL alleviates this problem by learning a reward function that explains the behavior shown in the demonstrations. The majority of IRL works [16, 35, 1, 12, 20] introduce algorithms that can imitate a single skill from demonstrations thereof but they do not readily generalize to learning a multi-task policy from a set of unstructured demonstrations of various tasks. More recently, there has been work that tackles a problem similar to the one presented in this paper, where the authors consider a setting where there is a large set of tasks with many instantiations [10]. In their work, the authors assume a way of communicating a new task through a single demonstration. We follow the idea of segmenting and learning different skills jointly so that learning of one skill can accelerate learning to imitate the next skill. In our case, however, the goal is to separate the mix of expert demonstrations into single skills and learn a policy that can imitate all of them, which eliminates the need of new demonstrations at test time. The method presented here belongs to the field of multi-task inverse reinforcement learning. Examples from this field include [9] and [4]. In [9], the authors present a Bayesian approach to the problem, while the method in [4] is based on an EM approach that clusters observed demonstrations. Both of these methods show promising results on relatively low-dimensional problems, whereas our approach scales well to higher dimensional domains due to the representational power of neural networks. There has also been a separate line of work on learning from demonstration, which is then iteratively improved through reinforcement learning [17, 6, 23]. In contrast, we do not assume access to the expert reward function, which is required to perform reinforcement learning in the later stages of the above algorithms. There has been much work on the problem of skill segmentation and option discovery for hierarchical tasks. Examples include [25, 19, 14, 33, 13]. In this work, we consider a possibility to discover different skills that can all start from the same initial state, as opposed to hierarchical reinforcement learning where the goal is to segment a task into a set of consecutive subtasks. We demonstrate, however, that our method may be used to discover the hierarchical structure of a task similarly to the hierarchical reinforcement learning approaches. In [13], the authors explore similar ideas to discover useful skills. In this work, we apply some of these ideas to the imitation learning setup as opposed to the reinforcement learning scenario. Generative Adversarial Networks (GANs) [15] have enjoyed success in various domains including image generation [8], image-image translation [34, 18] and video prediction [22]. More recently, there have been works connecting GANs and other reinforcement learning and IRL methods [26, 11, 16]. In this work, we expand on some of the ideas presented in these works and provide a novel framework that exploits this connection. The works that are most closely related to this paper are [16], [7] and [21]. In [7], the authors show a method that is able to learn disentangled representations and apply it to the problem of image generation. In this work, we provide an alternative derivation of our method that extends their work and applies it to multi-modal policies. In [16], the authors present an imitation learning GAN approach that serves as a basis for the development of our method. We provide an extensive evaluation of the hereby presented approach compared to the work in [16], which shows that our method, as opposed to [16], can handle unstructured demonstrations of different skills. A concurrent work [21] introduces a method similar to ours and applies it to detecting driving styles from unlabelled human data. 2 3 Preliminaries Let M = (S, A, P, R, p0, γ, T) be a finite-horizon Markov Decision Process (MDP), where S and A are state and action spaces, P : S × A × S →R+ is a state-transition probability function or system dynamics, R : S × A →R a reward function, p0 : S →R+ an initial state distribution, γ a reward discount factor, and T a horizon. Let τ = (s0, a0, . . . , sT , aT ) be a trajectory of states and actions and R(τ) = PT t=0 γtR(st, at) the trajectory reward. The goal of reinforcement learning methods is to find parameters θ of a policy πθ(a|s) that maximizes the expected discounted reward over trajectories induced by the policy: Eπθ[R(τ)] where s0 ∼p0, st+1 ∼P(st+1|st, at) and at ∼πθ(at|st). In an imitation learning scenario, the reward function is unknown. However, we are given a set of demonstrated trajectories, which presumably originate from some optimal expert policy distribution πE1 that optimizes an unknown reward function RE1. Thus, by trying to estimate the reward function RE1 and optimizing the policy πθ with respect to it, we can recover the expert policy. This approach is known as inverse reinforcement learning (IRL) [1]. In order to model a variety of behaviors, it is beneficial to find a policy with the highest possible entropy that optimizes RE1. We will refer to this approach as the maximum-entropy IRL [35] with the optimization objective min R max πθ H(πθ) + EπθR(s, a) −EπE1 R(s, a), (1) where H(πθ) is the entropy of the policy πθ. Ho and Ermon [16] showed that it is possible to redefine the maximum-entropy IRL problem with multiple demonstrations sampled from a single expert policy πE1 as an optimization of GANs [15]. In this framework, the policy πθ(a|s) plays the role of a generator, whose goal is to make it difficult for a discriminator network Dw(s, a) (parameterized by w) to differentiate between imitated samples from πθ (labeled 0) and demonstrated samples from πE1 (labeled 1). Accordingly, the joint optimization goal can be defined as max θ min w E(s,a)∼πθ[log(Dw(s, a))] + E(s,a)∼πE1 [log(1 −Dw(s, a))] + λHH(πθ). (2) The discriminator and the generator policy are both represented as neural networks and optimized by repeatedly performing alternating gradient updates. The discriminator is trained on the mixed set of expert and generator samples and outputs probabilities that a particular sample has originated from the generator or the expert policies. This serves as a reward signal for the generator policy that tries to maximize the probability of the discriminator confusing it with an expert policy. The generator can be trained using the trust region policy optimization (TRPO) algorithm [30] with the cost function log(Dw(s, a)). At each iteration, TRPO takes the following gradient step: E(s,a)∼πθ[∇θ log πθ(a|s) log(Dw(s, a))] + λH∇θH(πθ), (3) which corresponds to minimizing the objective in Eq. (2) with respect to the policy πθ. 4 Multi-modal Imitation Learning The traditional imitation learning scenario described in Sec. 3 considers a problem of learning to imitate one skill from demonstrations. The demonstrations represent samples from a single expert policy πE1. In this work, we focus on an imitation learning setup where we learn from unstructured and unlabelled demonstrations of various tasks. In this case, the demonstrations come from a set of expert policies πE1, πE2, . . . , πEk, where k can be unknown, that optimize different reward functions/tasks. We will refer to this set of unstructured expert policies as a mixture of policies πE. We aim to segment the demonstrations of these policies into separate tasks and learn a multi-modal policy that will be able to imitate all of the segmented tasks. In order to be able to learn multi-modal policy distributions, we augment the policy input with a latent intention i distributed by a categorical or uniform distribution p(i), similar to [7]. The goal of the intention variable is to select a specific mode of the policy, which corresponds to one of the skills presented in the demonstrations. The resulting policy can be expressed as: π(a|s, i) = p(i|s, a)π(a|s) p(i) . (4) 3 We augment the trajectory to include the latent intention as τi = (s0, a0, i0, ...sT , aT , iT ). The resulting reward of the trajectory with the latent intention is R(τi) = PT t=0 γtR(st, at, it). R(a, s, i) is a reward function that depends on the latent intention i as we have multiple demonstrations that optimize different reward functions for different tasks. The expected discounted reward is equal to: Eπθ[R(τi)] = R R(τi)πθ(τi)dτi where πθ(τi) = p0(s0) QT −1 t=0 P(st+1|st, at)πθ(at|st, it)p(it). Here, we show an extension of the derivation presented in [16] (Eqs. (1, 2)) for a policy π(a|s, i) augmented with the latent intention variable i, which uses demonstrations from a set of expert policies πE, rather than a single expert policy πE1. We are aiming at maximum entropy policies that can be determined from the latent intention variable i. Accordingly, we transform the original IRL problem to reflect this goal: min R max π H(π(a|s)) −H(π(a|s, i)) + EπR(s, a, i) −EπER(s, a, i), (5) where π(a|s) = P i π(a|s, i)p(i), which results in the policy averaged over intentions (since the p(i) is constant). This goal reflects our objective: we aim to obtain a multi-modal policy that has a high entropy without any given intention, but it collapses to a particular task when the intention is specified. Analogously to the solution for a single expert policy, this optimization objective results in the optimization goal of the generative adversarial imitation learning network, with the exception that the state-action pairs (s, a) are sampled from a set of expert policies πE: max θ min w Ei∼p(i),(s,a)∼πθ[log(Dw(s, a))] + E(s,a)∼πE[1 −log(Dw(s, a))] (6) +λHH(πθ(a|s)) −λIH(πθ(a|s, i)), where λI, λH correspond to the weighting parameters on the respective objectives. The resulting entropy H(πθ(a|s, i)) term can be expressed as: H(πθ(a|s, i)) = Ei∼p(i),(s,a)∼πθ(−log(πθ(a|s, i)) (7) = −Ei∼p(i),(s,a)∼πθ log p(i|s, a)πθ(a|s) p(i) = −Ei∼p(i),(s,a)∼πθ log(p(i|s, a)) −Ei∼p(i),(s,a)∼πθ log πθ(a|s) + Ei∼p(i) log p(i) = −Ei∼p(i),(s,a)∼πθ log(p(i|s, a)) + H(πθ(a|s)) −H(i), which results in the final objective: max θ min w Ei∼p(i),(s,a)∼πθ[log(Dw(s, a))] + E(s,a)∼πE[1 −log(Dw(s, a))] (8) +(λH −λI)H(πθ(a|s)) + λIEi∼p(i),(s,a)∼πθ log(p(i|s, a)) + λIH(i), where H(i) is a constant that does not influence the optimization. This results in the same optimization objective as for the single expert policy (see Eq. (2)) with an additional term λIEi∼p(i),(s,a)∼πθ log(p(i|s, a)) responsible for rewarding state-action pairs that make the latent intention inference easier. We refer to this cost as the latent intention cost and represent p(i|s, a) with a neural network. The final reward function for the generator is: Ei∼p(i),(s,a)∼πθ[log(Dw(s, a))] + λIEi∼p(i),(s,a)∼πθ log(p(i|s, a)) + λH′H(πθ(a|s)). (9) 4.1 Relation to InfoGAN In this section, we provide an alternative derivation of the optimization goal in Eq. (8) by extending the InfoGAN approach presented in [7]. Following [7], we introduce the latent variable c as a means to capture the semantic features of the data distribution. In this case, however, the latent variables are used in the imitation learning scenario, rather than the traditional GAN setup, which prevents us from using additional noise variables (z in the InfoGAN approach) that are used as noise samples to generate the data from. Similarly to [7], to prevent collapsing to a single mode, the policy optimization objective is augmented with mutual information I(c; G(πc θ, c)) between the latent variable and the state-action pairs generator G dependent on the policy distribution πc θ. This encourages the policy to produce behaviors that are 4 interpretable from the latent code, and given a larger number of possible latent code values leads to an increase in the diversity of policy behaviors. The corresponding generator goal can be expressed as: Ec∼p(c),(s,a)∼πc θ[log(Dw(s, a))] + λII(c; G(πc θ, c)) + λHH(πc θ) (10) In order to compute I(c; G(πc θ, c)), we follow the derivation from [7] that introduces a lower bound: I(c; G(πc θ, c)) = H(c) −H(c|G(πc θ, c)) (11) = E(s,a)∼G(πc θ,c)[Ec′∼P (c|s,a)[log P(c′|s, a)]] + H(c) = E(s,a)∼G(πc θ,c)[DKL(P(·|s, a)||Q(·|s, a)) + Ec′∼P (c|s,a)[log Q(c′|s, a)]] + H(c) ≥E(s,a)∼G(πc θ,c)[Ec′∼P (c|s,a)[log Q(c′|s, a)]] + H(c) = Ec∼P (c),(s,a)∼G(πc θ,c)[log Q(c|s, a)] + H(c) By maximizing this lower bound we maximize I(c; G(πc θ, c)). The auxiliary distribution Q(c|s, a) can be parametrized by a neural network. The resulting optimization goal is max θ min w Ec∼p(c),(s,a)∼πc θ[log(Dw(s, a))] + E(s,a)∼πE[1 −log(Dw(s, a))] (12) + λIEc∼P (c),(s,a)∼G(πc θ,c)[log Q(c|s, a)] + λHH(πc θ) which results in the generator reward function: Ec∼p(c),(s,a)∼πc θ[log(Dw(s, a))] + λIEc∼P (c),(s,a)∼G(πc θ,c)[log Q(c|s, a)] + λHH(πc θ). (13) This corresponds to the same objective that was derived in Section 4. The auxiliary distribution over the latent variables Q(c|s, a) is analogous to the intention distribution p(i|s, a). 5 Implementation In this section, we discuss implementation details that can alleviate instability of the training procedure of our model. The first indicator that the training has become unstable is a high classification accuracy of the discriminator. In this case, it is difficult for the generator to produce a meaningful policy as the reward signal from the discriminator is flat and the TRPO gradient of the generator vanishes. In an extreme case, the discriminator assigns all the generator samples to the same class and it is impossible for TRPO to provide a useful gradient as all generator samples receive the same reward. Previous work suggests several ways to avoid this behavior. These include leveraging the Wasserstein distance metric to improve the convergence behavior [3] and adding instance noise to the inputs of the discriminator to avoid degenerate generative distributions [32]. We find that adding the Gaussian noise helped us the most to control the performance of the discriminator and to produce a smooth reward signal for the generator policy. During our experiments, we anneal the noise similar to [32], as the generator policy improves towards the end of the training. An important indicator that the generator policy distribution has collapsed to a uni-modal policy is a high or increasing loss of the intention-prediction network p(i|s, a). This means that the prediction of the latent variable i is difficult and consequently, the policy behavior can not be categorized into separate skills. Hence, the policy executes the same skill for different values of the latent variable. To prevent this, one can increase the weight of the latent intention cost λI in the generator loss or add more instance noise to the discriminator, which makes its reward signal relatively weaker. In this work, we employ both categorical and continuous latent variables to represent the latent intention. The advantage of using a continuous variable is that we do not have to specify the number of possible values in advance as with the categorical variable and it leaves more room for interpolation between different skills. We use a softmax layer to represent categorical latent variables, and use a uniform distribution for continuous latent variables as proposed in [7]. 6 Experiments Our experiments aim to answer the following questions: (1) Can we segment unstructured and unlabelled demonstrations into skills and learn a multi-modal policy that imitates them? (2) What 5 Figure 1: Left: Walker-2D running forwards, running backwards, jumping. Right: Humanoid running forwards, running backwards, balancing. Figure 2: Left: Reacher with 2 targets: random initial state, reaching one target, reaching another target. Right: Gripper-pusher: random initial state, grasping policy, pushing (when grasped) policy. is the influence of the introduced intention-prediction cost on the resulting policies? (3) Can we autonomously discover the number of skills presented in the demonstrations, and even accomplish them in different ways? (4) Does the presented method scale to high-dimensional policies? (5) Can we use the proposed method for learning hierarchical policies? We evaluate our method on a series of challenging simulated robotics tasks described below. We would like to emphasize that the demonstrations consist of shuffled state-action pairs such that no temporal information or segmentation is used during learning. The performance of our method can be seen in our supplementary video2. 6.1 Task setup Reacher The Reacher environment is depicted in Fig. 2 (left). The actuator is a 2-DoF arm attached at the center of the scene. There are several targets placed at random positions throughout the environment. The goal of the task is, given a data set of reaching motions to random targets, to discover the dependency of the target selection on the intention and learn a policy that is capable of reaching different targets based on the specified intention input. We evaluate the performance of our framework on environments with 1, 2 and 4 targets. Walker-2D The Walker-2D (Fig. 1 left) is a 6-DoF bipedal robot consisting of two legs and feet attached to a common base. The goal of this task is to learn a policy that can switch between three different behaviors dependent on the discovered intentions: running forward, running backward and jumping. We use TRPO to train single expert policies and create a combined data set of all three behaviors that is used to train a multi-modal policy using our imitation framework. Humanoid Humanoid (Fig. 1 right) is a high-dimensional robot with 17 degrees of freedom. Similar to Walker-2D the goal of the task is to be able to discover three different policies: running forward, running backward and balancing, from the combined expert demonstrations of all of them. Gripper-pusher This task involves controlling a 4-DoF arm with an actuated gripper to push a sliding block to a specified goal area (Fig. 2 right). We provide separate expert demonstrations of grasping the object, and pushing it towards the goal starting from the object already being inside the hand. The initial positions of the arm, block and the goal area are randomly sampled at the beginning of each episode. The goal of our framework is to discover both intentions and the hierarchical structure of the task from a combined set of demonstrations. 6.2 Multi-Target Imitation Learning Our goal here is to analyze the ability of our method to segment and imitate policies that perform the same task for different targets. To this end, we first evaluate the influence of the latent intention cost on the Reacher task with 2 and 4 targets. For both experiments, we use either a categorical intention distribution with the number of categories equal to the number of targets or a continuous, 2http://sites.google.com/view/nips17intentiongan 6 Figure 3: Results of the imitation GAN with (top row) and without (bottom row) the latent intention cost. Left: Reacher with 2 targets(crosses): final positions of the reacher (circles) for categorical (1) and continuous (2) latent intention variable. Right: Reacher with 4 targets(crosses): final positions of the reacher (circles) for categorical (3) and continuous (4) latent intention variable. Figure 4: Left: Rewards of different Reacher policies for 2 targets for different intention values over the training iterations with (1) and without (2) the latent intention cost. Right: Two examples of a heatmap for 1 target Reacher using two latent intentions each. uniformly-distributed intention variable, which means that the network has to discover the number of intentions autonomously. Fig. 3 top shows the results of the reaching tasks using the latent intention cost for 2 and 4 targets with different latent intention distributions. For the continuous latent variable, we show a span of different intentions between -1 and 1 in the 0.2 intervals. The colors indicate the intention “value”. In the categorical distribution case, we are able to learn a multi-modal policy that can reach all the targets dependent on the given latent intention (Fig. 3-1 and Fig. 3-3 top). The continuous latent intention is able to discover two modes in case of two targets (Fig. 3-2 top) but it collapses to only two modes in the four targets case (Fig. 3-4 top) as this is a significantly more difficult task. As a baseline, we present the results of the Reacher task achieved by the standard GAN imitation learning presented in [16] without the latent intention cost. The obtained results are presented in Fig. 3 bottom. Since the network is not encouraged to discover different skills through the intention learning cost, it collapses to a single target for 2 targets in both the continuous and discrete latent intention variables. In the case of 4 targets, the network collapses to 2 modes, which can be explained by the fact that even without the latent intention cost the imitation network tries to imitate most of the presented demonstrations. Since the demonstration set is very diverse in this case, the network learned two modes without the explicit instruction (latent intention cost) to do so. To demonstrate the development of different intentions, in Fig. 4 (left) we present the Reacher rewards over training iterations for different intention variables. When the latent intention cost is included, (Fig. 4-1), the separation of different skills for different intentions starts to emerge around the 1000-th iteration and leads to a multi-modal policy that, given the intention value, consistently reaches the target associated with that intention. In the case of the standard imitation learning GAN setup (Fig. 4-2), the network learns how to imitate reaching only one of the targets for both intention values. In order to analyze the ability to discover different ways to accomplish the same task, we use our framework with the categorical latent intention in the Reacher environment with a single target. 7 Figure 5: Top: Rewards of Walker-2D policies for different intention values over the training iterations with (left) and without (right) the latent intention cost. Bottom: Rewards of Humanoid policies for different intention values over the training iterations with (left) and without (right) the latent intention cost. Since we only have a single set of expert trajectories that reach the goal in one, consistent manner, we subsample the expert state-action pairs to ease the intention learning process for the generator. Fig. 4 (right) shows two examples of a heatmap of the visited end-effector states accumulated for two different values of the intention variable. For both cases, the task is executed correctly, the robot reaches the target, but it achieves it using different trajectories. These trajectories naturally emerged through the latent intention cost as it encourages different behaviors for different latent intentions. It is worth noting that the presented behavior can be also replicated for multiple targets if the number of categories in the categorical distribution of the latent intention exceeds the number of targets. 6.3 Multi-Task Imitation Learning We also seek to further understand whether our model extends to segmenting and imitating policies that perform different tasks. In particular, we evaluate whether our framework is able to learn a multi-modal policy on the Walker-2D task. We mix three different policies – running backwards, running forwards, and jumping – into one expert policy πE and try to recover all of them through our method. The results are depicted in Fig. 5 (top). The additional latent intention cost results in a policy that is able to autonomously segment and mimic all three behaviors and achieve a similar performance to the expert policies (Fig. 5 top-left). Different intention variable values correspond to different expert policies: 0 - running forwards, 1 - jumping, and 2 - running backwards. The imitation learning GAN method is shown as a baseline in Fig. 5 (top-right). The results show that the policy collapses to a single mode, where all different intention variable values correspond to the jumping behavior, ignoring the demonstrations of the other two skills. To test if our multi-modal imitation learning framework scales to high-dimensional tasks, we evaluate it in the Humanoid environment. The expert policy is constructed using three expert policies: running backwards, running forwards, and balancing while standing upright. Fig. 5 (bottom) shows the rewards obtained for different values of the intention variable. Similarly to Walker-2D, the latent 8 Figure 6: Time-lapse of the learned Gripper-pusher policy. The intention variable is changed manually in the fifth screenshot, once the grasping policy has grasped the block. intention cost enables the neural network to segment the tasks and learn a multi-modal imitation policy. In this case, however, due to the high dimensionality of the task, the resulting policy is able to mimic running forwards and balancing policies almost as well as the experts, but it achieves a suboptimal performance on the running backwards task (Fig. 5 bottom-left). The imitation learning GAN baseline collapses to a uni-modal policy that maps all the intention values to a balancing behavior (Fig. 5 bottom-right). Finally, we evaluate the ability of our method to discover options in hierarchical IRL tasks. In order to test this, we collect expert policies in the Gripper-pusher environment that consist of grasping and pushing when the object is grasped demonstrations. The goal of this task is to check whether our method will be able to segment the mix of expert policies into separate grasping and pushing-whengrasped skills. Since the two sub-tasks start from different initial conditions, we cannot present the results in the same form as for the previous tasks. Instead, we present a time-lapse of the learned multi-modal policy (see Fig. 6) that presents the ability to change in the intention during the execution. The categorical intention variable is manually changed after the block is grasped. The intention change results in switching to a pushing policy that brings the block into the goal region. We present this setup as an example of extracting different options from the expert policies that can be further used in an hierarchical reinforcement learning task to learn the best switching strategy. 7 Conclusions We present a novel imitation learning method that learns a multi-modal stochastic policy, which is able to imitate a number of automatically segmented tasks using a set of unstructured and unlabeled demonstrations. The presented approach learns the notion of intention and is able to perform different tasks based on the policy intention input. We evaluated our method on a set of simulation scenarios where we show that it is able to segment the demonstrations into different tasks and to learn a multi-modal policy that imitates all of the segmented skills. We also compared our method to a baseline approach that performs imitation learning without explicitly separating the tasks. In the future work, we plan to focus on autonomous discovery of the number of tasks in the given pool of demonstrations as well as evaluating this method on real robots. We also plan to learn an additional hierarchical policy over the discovered intentions as an extension of this work. Acknowledgements This research was supported in part by National Science Foundation grants IIS-1205249, IIS-1017134, EECS-0926052, the Office of Naval Research, the Okawa Foundation, and the Max-Planck-Society. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the funding organizations. References [1] Pieter Abbeel and Andrew Y. Ng. Apprenticeship learning via inverse reinforcement learning. In Proc. ICML, 2004. [2] Brenna D Argall, Sonia Chernova, Manuela Veloso, and Brett Browning. A survey of robot learning from demonstration. Robotics and autonomous systems, 57(5):469–483, 2009. [3] Martín Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein gan. CoRR, abs/1701.07875, 2017. 9 [4] Monica Babes, Vukosi Marivate, Kaushik Subramanian, and Michael L Littman. Apprenticeship learning about multiple intentions. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pages 897–904, 2011. [5] Aude Billard, Sylvain Calinon, Ruediger Dillmann, and Stefan Schaal. Robot programming by demonstration. In Springer handbook of robotics, pages 1371–1394. Springer, 2008. [6] Yevgen Chebotar, Mrinal Kalakrishnan, Ali Yahya, Adrian Li, Stefan Schaal, and Sergey Levine. Path integral guided policy search. arXiv preprint arXiv:1610.00529, 2016. [7] Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets, 2016. [8] Emily L Denton, Soumith Chintala, Rob Fergus, et al. Deep generative image models using a laplacian pyramid of adversarial networks. In Advances in neural information processing systems, pages 1486–1494, 2015. [9] Christos Dimitrakakis and Constantin A Rothkopf. Bayesian multitask inverse reinforcement learning. In European Workshop on Reinforcement Learning, pages 273–284. Springer, 2011. [10] Yan Duan, Marcin Andrychowicz, Bradly Stadie, Jonathan Ho, Jonas Schneider, Ilya Sutskever, Pieter Abbeel, and Wojciech Zaremba. One-shot imitation learning. arXiv preprint arXiv:1703.07326, 2017. [11] Chelsea Finn, Paul Christiano, Pieter Abbeel, and Sergey Levine. A connection between generative adversarial networks, inverse reinforcement learning, and energy-based models. arXiv preprint arXiv:1611.03852, 2016. [12] Chelsea Finn, Sergey Levine, and Pieter Abbeel. Guided cost learning: Deep inverse optimal control via policy optimization. In Proceedings of the 33rd International Conference on Machine Learning, volume 48, 2016. [13] Carlos Florensa, Yan Duan, and Pieter Abbeel. Stochastic neural networks for hierarchical reinforcement learning. arXiv preprint arXiv:1704.03012, 2017. [14] Roy Fox, Sanjay Krishnan, Ion Stoica, and Ken Goldberg. Multi-level discovery of deep options. arXiv preprint arXiv:1703.08294, 2017. [15] Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron C. Courville, and Yoshua Bengio. Generative adversarial nets. In Zoubin Ghahramani, Max Welling, Corinna Cortes, Neil D. Lawrence, and Kilian Q. Weinberger, editors, NIPS, pages 2672–2680, 2014. [16] Jonathan Ho and Stefano Ermon. Generative adversarial imitation learning. CoRR, abs/1606.03476, 2016. [17] Mrinal Kalakrishnan, Ludovic Righetti, Peter Pastor, and Stefan Schaal. Learning force control policies for compliant manipulation. In Intelligent Robots and Systems (IROS), 2011 IEEE/RSJ International Conference on, pages 4639–4644. IEEE, 2011. [18] Taeksoo Kim, Moonsu Cha, Hyunsoo Kim, Jung Kwon Lee, and Jiwon Kim. Learning to discover cross-domain relations with generative adversarial networks. In Doina Precup and Yee Whye Teh, editors, Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 1857–1865, International Convention Centre, Sydney, Australia, 06–11 Aug 2017. PMLR. [19] Oliver Kroemer, Christian Daniel, Gerhard Neumann, Herke Van Hoof, and Jan Peters. Towards learning hierarchical skills for multi-phase manipulation tasks. In Robotics and Automation (ICRA), 2015 IEEE International Conference on, pages 1503–1510. IEEE, 2015. [20] Sergey Levine, Zoran Popovic, and Vladlen Koltun. Nonlinear inverse reinforcement learning with gaussian processes. In Advances in Neural Information Processing Systems, pages 19–27, 2011. 10 [21] Yunzhu Li, Jiaming Song, and Stefano Ermon. Inferring the latent structure of human decisionmaking from raw visual inputs. CoRR, abs/1703.08840, 2017. [22] Michael Mathieu, Camille Couprie, and Yann LeCun. Deep multi-scale video prediction beyond mean square error. arXiv preprint arXiv:1511.05440, 2015. [23] Katharina Mülling, Jens Kober, Oliver Kroemer, and Jan Peters. Learning to select and generalize striking movements in robot table tennis. The International Journal of Robotics Research, 32(3):263–279, 2013. [24] Andrew Y Ng, Stuart J Russell, et al. Algorithms for inverse reinforcement learning. In Icml, pages 663–670, 2000. [25] Scott Niekum, Sachin Chitta, Andrew G Barto, Bhaskara Marthi, and Sarah Osentoski. Incremental semantically grounded learning from demonstration. In Robotics: Science and Systems, volume 9, 2013. [26] David Pfau and Oriol Vinyals. Connecting generative adversarial networks and actor-critic methods. arXiv preprint arXiv:1610.01945, 2016. [27] Dean A Pomerleau. Efficient training of artificial neural networks for autonomous navigation. Neural Computation, 3(1):88–97, 1991. [28] Stéphane Ross and Drew Bagnell. Efficient reductions for imitation learning. In AISTATS, volume 3, pages 3–5, 2010. [29] Stefan Schaal. Is imitation learning the route to humanoid robots? Trends in cognitive sciences, 3(6):233–242, 1999. [30] John Schulman, Sergey Levine, Pieter Abbeel, Michael I. Jordan, and Philipp Moritz. Trust region policy optimization. In Francis R. Bach and David M. Blei, editors, ICML, volume 37 of JMLR Workshop and Conference Proceedings, pages 1889–1897. JMLR.org, 2015. [31] Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction, 1998. [32] Casper Kaae Sønderby, Jose Caballero, Lucas Theis, Wenzhe Shi, and Ferenc Huszár. Amortised map inference for image super-resolution. CoRR, abs/1610.04490, 2016. [33] Alexander Sasha Vezhnevets, Simon Osindero, Tom Schaul, Nicolas Heess, Max Jaderberg, David Silver, and Koray Kavukcuoglu. Feudal networks for hierarchical reinforcement learning. arXiv preprint arXiv:1703.01161, 2017. [34] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. arXiv preprint arXiv:1703.10593, 2017. [35] Brian D. Ziebart, Andrew L. Maas, J. Andrew Bagnell, and Anind K. Dey. Maximum entropy inverse reinforcement learning. In Dieter Fox and Carla P. Gomes, editors, AAAI, pages 1433–1438. AAAI Press, 2008. 11 | 2017 | 256 |
6,737 | Greedy Algorithms for Cone Constrained Optimization with Convergence Guarantees Francesco Locatello MPI for Intelligent Systems - ETH Zurich locatelf@ethz.ch Michael Tschannen ETH Zurich michaelt@nari.ee.ethz.ch Gunnar Rätsch ETH Zurich raetsch@inf.ethz.ch Martin Jaggi EPFL martin.jaggi@epfl.ch Abstract Greedy optimization methods such as Matching Pursuit (MP) and Frank-Wolfe (FW) algorithms regained popularity in recent years due to their simplicity, effectiveness and theoretical guarantees. MP and FW address optimization over the linear span and the convex hull of a set of atoms, respectively. In this paper, we consider the intermediate case of optimization over the convex cone, parametrized as the conic hull of a generic atom set, leading to the first principled definitions of non-negative MP algorithms for which we give explicit convergence rates and demonstrate excellent empirical performance. In particular, we derive sublinear (O(1/t)) convergence on general smooth and convex objectives, and linear convergence (O(e−t)) on strongly convex objectives, in both cases for general sets of atoms. Furthermore, we establish a clear correspondence of our algorithms to known algorithms from the MP and FW literature. Our novel algorithms and analyses target general atom sets and general objective functions, and hence are directly applicable to a large variety of learning settings. 1 Introduction In recent years, greedy optimization algorithms have attracted significant interest in the domains of signal processing and machine learning thanks to their ability to process very large data sets. Arguably two of the most popular representatives are Frank-Wolfe (FW) [12, 21] and Matching Pursuit (MP) algorithms [34], in particular Orthogonal MP (OMP) [9, 49]. While the former targets minimization of a convex function over bounded convex sets, the latter apply to minimization over a linear subspace. In both cases, the domain is commonly parametrized by a set of atoms or dictionary elements, and in each iteration, both algorithms rely on querying a so-called linear minimization oracle (LMO) to find the direction of steepest descent in the set of atoms. The iterate is then updated as a linear or convex combination, respectively, of previous iterates and the newly obtained atom from the LMO. The particular choice of the atom set allows to encode structure such as sparsity and non-negativity (of the atoms) into the solution. This enables control of the trade-off between the amount of structure in the solution and approximation quality via the number of iterations, which was found useful in a large variety of use cases including structured matrix and tensor factorizations [50, 53, 54, 18]. In this paper, we target an important “intermediate case” between the two domain parameterizations given by the linear span and the convex hull of an atom set, namely the parameterization of the optimization domain as the conic hull of a possibly infinite atom set. In this case, the solution can be represented as a non-negative linear combination of the atoms, which is desirable in many 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. applications, e.g., due to the physics underlying the problem at hand, or for the sake of interpretability. Concrete examples include unmixing problems [11, 16, 3], model selection [33], and matrix and tensor factorizations [4, 24]. However, existing convergence analyses do not apply to the currently used greedy algorithms. In particular, all existing MP variants for the conic hull case [5, 38, 52] are not guaranteed to converge and may get stuck far away from the optimum (this can be observed in the experiments in Section 6). From a theoretical perspective, this intermediate case is of paramount interest in the context of MP and FW algorithms. Indeed, the atom set is not guaranteed to contain an atom aligned with a descent direction for all possible suboptimal iterates, as is the case when the optimization domain is the linear span or the convex hull of the atom set [39, 32]. Hence, while conic constraints have been widely studied in the context of a manifold of different applications, none of the existing greedy algorithms enjoys explicit convergence rates. We propose and analyze new MP algorithms tailored for the minimization of smooth convex functions over the conic hull of an atom set. Specifically, our key contributions are: • We propose the first (non-orthogonal) MP algorithm for optimization over conic hulls guaranteed to converge, and prove a corresponding sublinear convergence rate with explicit constants. Surprisingly, convergence is achieved without increasing computational complexity compared to ordinary MP. • We propose new away-step, pairwise, and fully corrective MP variants, inspired by variants of FW [28] and generalized MP [32], respectively, that allow for different degrees of weight corrections for previously selected atoms. We derive corresponding sublinear and linear (for strongly convex objectives) convergence rates that solely depend on the geometry of the atom set. • All our algorithms apply to general smooth convex functions. This is in contrast to all prior work on non-negative MP, which targets quadratic objectives [5, 38, 52]. Furthermore, if the conic hull of the atom set equals its linear span, we recover both algorithms and rates derived in [32] for generalized MP variants. • We make no assumptions on the atom set which is simply a subset of a Hilbert space, in particular we do not assume the atom set to be finite. Before presenting our algorithms (Section 3) along with the corresponding convergence guarantees (Section 4), we briefly review generalized MP variants. A detailed discussion of related work can be found in Section 5 followed by illustrative experiments on a least squares problem on synthetic data, and non-negative matrix factorization as well as non-negative garrote logistic regression as applications examples on real data (numerical evaluations of more applications and the dependency between constants in the rate and empirical convergence can be found in the supplementary material). Notation. Given a non-empty subset A of some Hilbert space, let conv(A) be the convex hull of A, and let lin(A) denote its linear span. Given a closed set A, we call its diameter diam(A) = maxz1,z2∈A ∥z1 −z2∥and its radius radius(A) = maxz∈A ∥z∥. ∥x∥A := inf{c > 0: x ∈ c · conv(A)} is the atomic norm of x over a set A (also known as the gauge function of conv(A)). We call a subset A of a Hilbert space symmetric if it is closed under negation. 2 Review of Matching Pursuit Variants Let H be a Hilbert space with associated inner product ⟨x, y⟩, ∀x, y ∈H. The inner product induces the norm ∥x∥2 := ⟨x, x⟩, ∀x ∈H. Let A ⊂H be a compact set (the “set of atoms” or dictionary) and let f : H →R be convex and L-smooth (L-Lipschitz gradient in the finite dimensional case). If H is an infinite-dimensional Hilbert space, then f is assumed to be Fréchet differentiable. The generalized MP algorithm studied in [32], presented in Algorithm 1, solves the following optimization problem: min x∈lin(A) f(x). (1) In each iteration, MP queries a linear minimization oracle (LMO) solving the following linear problem: LMOA(y) := arg min z∈A ⟨y, z⟩ (2) for a given query y ∈H. The MP update step minimizes a quadratic upper bound gxt(x) = f(xt) + ⟨∇f(xt), x −xt⟩+ L 2 ∥x −xt∥2 of f at xt, where L is an upper bound on the smoothness 2 constant of f with respect to a chosen norm ∥· ∥. Optimizing this norm problem instead of f directly allows for substantial efficiency gains in the case of complicated f. For symmetric A and for f(x) = 1 2∥y −x∥2, y ∈H, Algorithm 1 recovers MP (Variant 0) [34] and OMP (Variant 1) [9, 49], see [32] for details. Algorithm 1 Norm-Corrective Generalized Matching Pursuit 1: init x0 ∈lin(A), and S := {x0} 2: for t = 0 . . . T 3: Find zt := (Approx-)LMOA(∇f(xt)) 4: S := S ∪{zt} 5: Let b := xt −1 L∇f(xt) 6: Variant 0: Update xt+1 := arg min z:=xt+γzt γ∈R ∥z −b∥2 7: Variant 1: Update xt+1 := arg min z∈lin(S) ∥z −b∥2 8: Optional: Correction of some/all atoms z0...t 9: end for Approximate linear oracles. Solving the LMO defined in (2) exactly is often hard in practice, in particular when applied to matrix (or tensor) factorization problems, while approximate versions can be much more efficient. Algorithm 1 allows for an approximate LMO. For given quality parameter δ ∈(0, 1] and given direction d ∈H, the approximate LMO for Algorithm 1 returns a vector ˜z ∈A such that ⟨d, ˜z⟩≤δ⟨d, z⟩, (3) relative to z = LMOA(d) being an exact solution. Discussion and limitations of MP. The analysis of the convergence of Algorithm 1 in [32] critically relies on the assumption that the origin is in the relative interior of conv(A) with respect to its linear span. This assumption originates from the fact that the convergence of MP- and FW-type algorithms fundamentally depends on an alignment assumption of the search direction returned by the LMO (i.e., zt in Algorithm 1) and the gradient of the objective at the current iteration (see third premise in [39]). Specifically, for Algorithm 1, the LMO is assumed to select a descent direction, i.e., ⟨∇f(xt), zt⟩< 0, so that the resulting weight (i.e., γ for Variant 0) is always positive. In this spirit, Algorithm 1 is a natural candidate to minimize f over the conic hull of A. However, if the optimization domain is a cone, the alignment assumption does not hold as there may be non-stationary points x in the conic hull of A for which minz∈A⟨∇f(x), z⟩= 0. Algorithm 1 is therefore not guaranteed to converge when applied to conic problems. The same issue arises for essentially all existing non-negative variants of MP, see, e.g., Alg. 2 in [38] and in Alg. 2 in [52]. We now present modifications corroborating this issue along with the resulting MP-type algorithms for conic problems and corresponding convergence guarantees. 3 Greedy Algorithms on Conic Hulls The cone cone(A −y) tangent to the convex set conv(A) at a point y is formed by the half-lines emanating from y and intersecting conv(A) in at least one point distinct from y. Without loss of generality we consider 0 ∈A and assume the set cone(A) (i.e., y = 0) to be closed. If A is finite the cone constraint can be written as cone(A) := {x : x = P|A| i=1 αiai s.t. ai ∈A, αi ≥0 ∀i}. We consider conic optimization problems of the form: min x∈cone(A) f(x). (4) Note that if the set A is symmetric or if the origin is in the relative interior of conv(A) w.r.t. its linear span then cone(A) = lin(A). We will show later how our results recover known MP rates when the origin is in the relative interior of conv(A). As a first algorithm to solve problems of the form (4), we present the Non-Negative Generalized Matching Pursuit (NNMP) in Algorithm 2 which is an extension of MP to general f and non-negative weights. Discussion: Algorithm 2 differs from Algorithm 1 (Variant 0) in line 4, adding the iterationdependent atom − xt ∥xt∥A to the set of possible search directions1. We use the atomic norm for the 1This additional direction makes sense only if xt ̸= 0. Therefore, we set − xt ∥xt∥A = 0 if xt = 0, i.e., no direction is added. 3 Algorithm 2 Non-Negative Matching Pursuit 1: init x0 = 0 ∈A 2: for t = 0 . . . T 3: Find ¯zt := (Approx-)LMOA(∇f(xt)) 4: zt = arg minz∈ n ¯zt, −xt ∥xt∥A o⟨∇f(xt), z⟩ 5: γ := ⟨−∇f(xt),zt⟩ L∥zt∥2 6: Update xt+1 := xt + γzt 7: end for Figure 1: Two dimensional example for TA(xt) where A = {a1, a2}, for three different iterates x0, x1 and x2. The shaded area corresponds to TA(xt) and the white area to lin(A) \ TA(xt). normalization because it yields the best constant in the convergence rate. In practice, one can replace it with the Euclidean norm, which is often much less expensive to compute. This iteration-dependent additional search direction allows to reduce the weights of the atoms that were previously selected, thus admitting the algorithm to “move back” towards the origin while maintaining the cone constraint. This idea is informally explained here and formally studied in Section 4.1. Recall the alignment assumption of the search direction and the gradient of the objective at the current iterate discussed in Section 2 (see also [39]). Algorithm 2 obeys this assumption. The intuition behind this is the following. Whenever xt is not a minimizer of (4) and minz∈A⟨∇f(xt), z⟩= 0, the vector − xt ∥xt∥A is aligned with ∇f(xt) (i.e., ⟨∇f(xt), − xt ∥xt∥A ⟩< 0), preventing the algorithm from stopping at a suboptimal iterate. To make this intuition more formal, let us define the set of feasible descent directions of Algorithm 2 at a point x ∈cone(A) as: TA(x) := d ∈H: ∃z ∈A ∪ n − x ∥x∥A o s.t. ⟨d, z⟩< 0 . (5) If at some iteration t = 0, 1, . . . the gradient ∇f(xt) is not in TA(xt) Algorithm 2 terminates as minz∈A⟨d, z⟩= 0 and ⟨d, −xt⟩≥0 (which yields zt = 0). Even though, in general, not every direction in H is a feasible descent direction, ∇f(xt) /∈TA only occurs if xt is a constrained minimum of Equation 4: Lemma 1. If ˜x ∈cone(A) and ∇f(˜x) ̸∈TA then ˜x is a solution to minx∈cone(A) f(x). Initializing Algorithm 2 with x0 = 0 guarantees that the iterates xt always remain inside cone(A) even though this is not enforced explicitly (by convexity of f, see proof of Theorem 2 in Appendix D for details). Limitations of Algorithm 2: Let us call active the atoms which have nonzero weights in the representation of xt = Pt−1 i=0 αizi computed by Algorithm 2. Formally, the set of active atoms is defined as S := {zi : αi > 0, i = 0, 1, . . . , t −1}. The main drawback of Algorithm 2 is that when the direction − xt ∥xt∥A is selected, the weight of all active atoms is reduced. This can lead to the algorithm alternately selecting − xt ∥xt∥A and an atom from A, thereby slowing down convergence in a similar manner as the zig-zagging phenomenon well-known in the Frank-Wolfe framework [28]. In order to achieve faster convergence we introduce the corrective variants of Algorithm 2. 3.1 Corrective Variants To achieve faster (linear) convergence (see Section 4.2) we introduce variants of Algorithm 2, termed Away-steps MP (AMP) and Pairwise MP (PWMP), presented in Algorithm 3. Here, inspired by the away-steps and pairwise variants of FW [12, 28], instead of reducing the weights of the active atoms uniformly as in Algorithm 2, the LMO is queried a second time on the active set S to identify the direction of steepest ascent in S. This allows, at each iteration, to reduce the weight of a previously selected atom (AMP) or swap weight between atoms (PWMP). This selective “reduction” or “swap of weight” helps to avoid the zig-zagging phenomenon which prevent Algorithm 2 from converging linearly. At each iteration, Algorithm 3 updates the weights of zt and vt as αzt = αzt + γ and αvt = αvt −γ, respectively. To ensure that xt+1 ∈cone(A), γ has to be clipped according to the weight which is currently on vt, i.e., γmax = αvt. If γ = γmax, we set αvt = 0 and remove vt from S as the atom vt is no longer active. If dt ∈A (i.e., we take a regular MP step and not an away step), the line search is unconstrained (i.e., γmax = ∞). 4 For both algorithm variants, the second LMO query increases the computational complexity. Note that an exact search on S is feasible in practice as |S| has at most t elements at iteration t. Taking an additional computational burden allows to update the weights of all active atoms in the spirit of OMP. This approach is implemented in the Fully Corrective MP (FCMP), Algorithm 4. Algorithm 3 Away-steps (AMP) and Pairwise (PWMP) Non-Negative Matching Pursuit 1: init x0 = 0 ∈A, and S := {x0} 2: for t = 0 . . . T 3: Find zt := (Approx-)LMOA(∇f(xt)) 4: Find vt := (Approx-)LMOS(−∇f(xt)) 5: S = S ∪zt 6: AMP: dt =arg mind∈{zt,−vt}⟨∇f(xt), d⟩ 7: PWMP: dt = zt −vt 8: γ := min n ⟨−∇f(xt),dt⟩ L∥dt∥2 , γmax o (γmax see text) 9: Update αzt, αvt and S according to γ (γ see text) 10: Update xt+1 := xt + γdt 11: end for Algorithm 4 Fully Corrective Non-Negative Matching Pursuit (FCMP) 1: init x0 = 0 ∈A, S = {x0} 2: for t = 0 . . . T 3: Find zt := (Approx-)LMOA(∇f(xt)) 4: S := S ∪{zt} 5: Variant 0: xt+1 = arg min x∈cone(S) ∥x−(xt−1 L∇f(xt))∥2 6: Variant 1: xt+1 = arg minx∈cone(S) f(x) 7: Remove atoms with zero weights from S 8: end for At each iteration, Algorithm 4 maintains the set of active atoms S by adding zt and removing atoms with zero weights after the update. In Variant 0, the algorithm minimizes the quadratic upper bound gxt(x) on f at xt (see Section 2) imitating a gradient descent step with projection onto a “varying” target, i.e., cone(S). In Variant 1, the original objective f is minimized over cone(S) at each iteration, which is in general more efficient than minimizing f over cone(A) using a generic solver for cone constrained problems. For f(x) = 1 2∥y −x∥2, y ∈H, Variant 1 recovers Algorithm 1 in [52] and the OMP variant in [5] which both only apply to this specific objective f. 3.2 Computational Complexity algorithm cost per iteration convergence k(t) NNMP C + O(d) O(1/t) PWMP C + O(d + td) O e−βk(t) t 3|A|!+1 AMP C + O(d + td) O e−β 2 k(t) t/2 FCMP v. 0 C + O(d) + h0 O e−βk(t) t 3|A|!+1 FCMP v. 1 C + O(d) + h1 O e−βk(t) t Table 1: Computational complexity versus convergence rate (see Section 4) for strongly convex objectives We briefly discuss the computational complexity of the algorithms we introduced. For H = Rd, sums and inner products have cost O(d). Let us assume that each call of the LMO has cost C on the set A and O(td) on S. The variants 0 and 1 of FCMP solve a cone problem at each iteration with cost h0 and h1, respectively. In general, h0 can be much smaller than h1. In Table 1 we report the cost per iteration for every algorithm along with the asymptotic convergence rates derived in Section 4. 4 Convergence Rates In this section, we present convergence guarantees for Algorithms 2, 3, and 4. All proofs are deferred to the Appendix in the supplementary material. We write x⋆∈arg minx∈cone(A) f(x) for an optimal solution. Our rates will depend on the atomic norm of the solution and the iterates of the respective algorithm variant: ρ = max {∥x⋆∥A, ∥x0∥A . . . , ∥xT ∥A} . (6) If the optimum is not unique, we consider x⋆to be one of largest atomic norm. A more intuitive and looser notion is to simply upper-bound ρ by the diameter of the level set of the initial iterate x0 measured by the atomic norm. Then, boundedness follows since the presented method is a descent method (due to Lemma 1 and line search on the quadratic upper bound, each iteration strictly 5 decreases the objective and our method stops only at the optimum). This justifies the statement f(xt) ≤f(x0). Hence, ρ must be bounded for any sequence of iterates produced by the algorithm, and the convergence rates presented in this section are valid as T goes to infinity. A similar notion to measure the convergence of MP was established in [32]. All of our algorithms and rates can be made affine invariant. We defer this discussion to Appendix B. 4.1 Sublinear Convergence We now present the convergence results for the non-negative and Fully-Corrective Matching Pursuit algorithms. Sublinear convergence of Algorithm 3 is addressed in Theorem 3. Theorem 2. Let A ⊂H be a bounded set with 0 ∈A, ρ := max {∥x⋆∥A, ∥x0∥A, . . . , ∥xT ∥A, } and f be L-smooth over ρ conv(A ∪−A). Then, Algorithms 2 and 4 converge for t ≥0 as f(xt) −f(x⋆) ≤4 2 δ Lρ2 radius(A)2 + ε0 δt + 4 , where δ ∈(0, 1] is the relative accuracy parameter of the employed approximate LMO (see Equation (3)). Relation to FW rates. By rescaling A by a large enough factor τ > 0, FW with τA as atom set could in principle be used to solve (4). In fact, for large enough τ, only the constraints of (4) become active when minimizing f over conv(τA). The sublinear convergence rate obtained with this approach is up to constants identical to that in Theorem 2 for our MP variants, see [21]. However, as the correct scaling is unknown, one has to either take the risk of choosing τ too small and hence failing to recover an optimal solution of (4), or to rely on too large τ which can result in slow convergence. In contrast, knowledge of ρ is not required to run our MP variants. Relation to MP rates. If A is symmetric, we have that lin(A) = cone(A) and it is easy to show that the additional direction −xt ∥xt∥in Algorithm 2 is never selected. Therefore, Algorithm 2 becomes equivalent to Variant 0 of Algorithm 1, while Variant 1 of Algorithm 1 is equivalent to Variant 0 of Algorithm 4. The rate specified in Theorem 2 hence generalizes the sublinear rate in [32, Theorem 2] for symmetric A. 4.2 Linear Convergence We start by recalling some of the geometric complexity quantities that were introduced in the context of FW and are adapted here to the optimization problem we aim to solve (minimization over cone(A) instead of conv(A)). Directional Width. The directional width of a set A w.r.t. a direction r ∈H is defined as: dirW(A, r) := max s,v∈A r ∥r∥, s −v (7) Pyramidal Directional Width [28]. The Pyramidal Directional Width of a set A with respect to a direction r and a reference point x ∈conv(A) is defined as: PdirW(A, r, x) := min S∈Sx dirW(S ∪{s(A, r)}, r), (8) where Sx := {S | S ⊂A and x is a proper convex combination of all the elements in S} and s(A, r) := maxs∈A⟨r ∥r∥, s⟩. Inspired by the notion of pyramidal width in [28], which is the minimal pyramidal directional width computed over the set of feasible directions, we now define the cone width of a set A where only the generating faces (g-faces) of cone(A) (instead of the faces of conv(A)) are considered. Before doing so we introduce the notions of face, generating face, and feasible direction. Face of a convex set. Let us consider a set K with a k−dimensional affine hull along with a point x ∈K. Then, K is a k−dimensional face of conv(A) if K = conv(A) ∩{y: ⟨r, y −x⟩= 0} for some normal vector r and conv(A) is contained in the half-space determined by r, i.e., ⟨r, y −x⟩≤0, ∀y ∈conv(A). Intuitively, given a set conv(A) one can think of conv(A) being a dim(conv(A))−dimensional face of itself, an edge on the border of the set a 1-dimensional face and a vertex a 0-dimensional face. 6 Face of a cone and g-faces. Similarly, a k−dimensional face of a cone is an open and unbounded set cone(A) ∩{y: ⟨r, y −x⟩= 0} for some normal vector r and cone(A) is contained in the half space determined by r. We can define the generating faces of a cone as: g-faces(cone(A)):={B ∩conv(A): B ∈faces(cone(A))} . Note that g-faces(cone(A)) ⊂faces(conv(A)) and conv(A) ∈g-faces(cone(A)). Furthermore, for each K ∈g-faces(cone(A)), cone(K) is a k−dimensional face of cone(A). We now introduce the notion of feasible directions. A direction d is feasible from x ∈cone(A) if it points inwards cone(A), i.e., if ∃ε > 0 s.t. x + εd ∈cone(A). Since a face of the cone is itself a cone, if a direction is feasible from x ∈cone(K) \ 0, it is feasible from every positive rescaling of x. We therefore can consider only the feasible directions on the generating faces (which are closed and bounded sets). Finally, we define the cone width of A. Cone Width. CWidth(A) := min K∈g-faces(cone(A)) x∈K r∈cone(K−x)\{0} PdirW(K ∩A, r, x) (9) We are now ready to show the linear convergence of Algorithms 3 and 4. Theorem 3. Let A ⊂H be a bounded set with 0 ∈A and let the objective function f : H →R be both L-smooth and µ-strongly convex over ρ conv(A ∪−A). Then, the suboptimality of the iterates of Algorithms 3 and 4 decreases geometrically at each step in which γ < αvt (henceforth referred to as “good steps”) as: εt+1 ≤(1 −β) εt, (10) where β := δ2 µ CWidth(A)2 L diam(A)2 ∈(0, 1], εt := f(xt)−f(x⋆) is the suboptimality at step t and δ ∈(0, 1] is the relative accuracy parameter of the employed approximate LMO (3). For AMP (Algorithm 3), βAMP = β/2. If µ = 0 Algorithm 3 converges with rate O(1/k(t)) where k(t) is the number of “good steps” up to iteration t. Discussion. To obtain a linear convergence rate, one needs to upper-bound the number of “bad steps” t−k(t) (i.e., steps with γ ≥αvt). We have that k(t) = t for Variant 1 of FCMP (Algorithm 4), k(t) ≥t/2 for AMP (Algorithm 3) and k(t) ≥t/(3|A|! + 1) for PWMP (Algorithm 3) and Variant 0 of FCMP (Algorithm 4). This yields a global linear convergence rate of εt ≤ε0 exp (−βk(t)). The bound for PWMP is very loose and only meaningful for finite sets A. However, it can be observed in the experiments in the supplementary material (Appendix A) that only a very small fraction of iterations result in bad PWMP steps in practice. Further note that Variant 1 of FCMP (Algorithm 4) does not produce bad steps. Also note that the bounds on the number of good steps given above are the same as for the corresponding FW variants and are obtained using the same (purely combinatorial) arguments as in [28]. Relation to previous MP rates. The linear convergence of the generalized (not non-negative) MP variants studied in [32] crucially depends on the geometry of the set which is characterized by the Minimal Directional Width mDW(A): mDW(A) := min d∈lin(A) d̸=0 max z∈A⟨d ∥d∥, z⟩. (11) The following Lemma relates the Cone Width with the minimal directional width. Lemma 4. If the origin is in the relative interior of conv(A) with respect to its linear span, then cone(A) = lin(A) and CWidth(A) = mDW(A). Now, if the set A is symmetric or, more generally, if cone(A) spans the linear space lin(A) (which implies that the origin is in the relative interior of conv(A)), there are no bad steps. Hence, by Lemma 4, the linear rate obtained in Theorem 3 for non-negative MP variants generalizes the one presented in [32, Theorem 7] for generalized MP variants. 7 Relation to FW rates. Optimization over conic hulls with non-negative MP is more similar to FW than to MP itself in the following sense. For MP, every direction in lin(A) allows for unconstrained steps, from any iterate xt. In contrast, for our non-negative MPs, while some directions allow for unconstrained steps from some iterate xt, others are constrained, thereby leading to the dependence of the linear convergence rate on the cone width, a geometric constant which is very similar in spirit to the Pyramidal Width appearing in the linear convergence bound in [28] for FW. Furthermore, as for Algorithm 3, the linear rate of Away-steps and Pairwise FW holds only for good steps. We finally relate the cone width with the Pyramidal Width [28]. The Pyramidal Width is defined as PWidth(A) := min K∈faces(conv(A)) x∈K r∈cone(K−x)\{0} PdirW(K ∩A, r, x). We have CWidth(A) ≥PWidth(A) as the minimization in the definition (9) of CWidth(A) is only over the subset g-faces(cone(A)) of faces(conv(A)). As a consequence, the decrease per iteration characterized in Theorem 3 is larger than what one could obtain with FW on the rescaled convex set τA (see Section 4.1 for details about the rescaling). Furthermore, the decrease characterized in [28] scales as 1/τ 2 due to the dependence on 1/ diam(conv(A))2. 5 Related Work The line of recent works by [44, 46, 47, 48, 37, 32] targets the generalization of MP from the least-squares objective to general smooth objectives and derives corresponding convergence rates (see [32] for a more in-depth discussion). However, only little prior work targets MP variants with non-negativity constraint [5, 38, 52]. In particular, the least-squares objective was addressed and no rigorous convergence analysis was carried out. [5, 52] proposed an algorithm equivalent to our Algorithm 4 for the least-squares case. More specifically, [52] then developed an acceleration heuristic, whereas [5] derived a coherence-based recovery guarantee for sparse linear combinations of atoms. Apart from MP-type algorithms, there is a large variety of non-negative least-squares algorithms, e.g., [30], in particular also for matrix and tensor spaces. The gold standard in factorization problems is projected gradient descent with alternating minimization, see [43, 4, 45, 23]. Other related works are [40], which is concerned with the feasibility problem on symmetric cones, and [19], which introduces a norm-regularized variant of problem (4) and solves it using FW on a rescaled convex set. To the best of our knowledge, in the context of MP-type algorithms, we are the first to combine general convex objectives with conic constraints and to derive corresponding convergence guarantees. Boosting: In an earlier line of work, a flavor of the generalized MP became popular in the context of boosting, see [35]. The literature on boosting is vast, we refer to [42, 35, 7] for a general overview. Taking the optimization perspective given in [42], boosting is an iterative greedy algorithm minimizing a (strongly) convex objective over the linear span of a possibly infinite set called hypothesis class. The convergence analysis crucially relies on the assumption of the origin being in the relative interior of the hypothesis class, see Theorem 1 in [17]. Indeed, Algorithm 5.2 of [35] might not converge if the [39] alignment assumption is violated. Here, we managed to relax this assumption while preserving essentially the same asymptotic rates in [35, 17]. Our work is therefore also relevant in the context of (non-negative) boosting. 6 Illustrative Experiments We illustrate the performance of the presented algorithms on three different exemplary tasks, showing that our algorithms are competitive with established baselines across a wide range of objective functions, domains, and data sets while not being specifically tailored to any of these tasks (see Section 3.2 for a discussion of the computational complexity of the algorithms). Additional experiments targeting KL divergence NMF, non-negative tensor factorization, and hyperspectral image unmixing can be found in the appendix. Synthetic data. We consider minimizing the least squares objective on the conic hull of 100 unit-norm vectors sampled at random in the first orthant of R50. We compare the convergence of Algorithms 2, 3, and 4 with the Fast Non-Negative MP (FNNOMP) of [52], and Variant 3 (line-search) of the FW algorithm in [32] on the atom set rescaled by τ = 10∥y∥(see Section 4.1), observing linear convergence for our corrective variants. 8 0 10 20 30 40 50 Iteration 10-4 10-2 100 102 104 Suboptimality Synthetic data PWMP (Alg. 3) NNMP (Alg. 2) FCMP (Alg. 4) FW AMP (Alg. 3) FNNOMP Figure 2: Synthetic data experiment. Figure 2 shows the suboptimality εt, averaged over 20 realizations of A and y, as a function of the iteration t. As expected, FCMP achieves fastest convergence followed by PWMP, AMP and NNMP. The FNNOMP gets stuck instead. Indeed, [52] only show that the algorithm terminates and not its convergence. Non-negative matrix factorization. The second task consists of decomposing a given matrix into the product of two non-negative matrices as in Equation (1) of [20]. We consider the intersection of the positive semidefinite cone and the positive orthant. We parametrize the set A as the set of matrices obtained as an outer product of vectors from A1 = {z ∈Rk : zi ≥0 ∀i} and A2 = {z ∈Rd : zi ≥0 ∀i}. The LMO is approximated using a truncated power method [55], and we perform atom correction with greedy coordinate descent see, e.g., [29, 18], to obtain a better objective value while maintaining the same (small) number of atoms. We consider three different datasets: The Reuters Corpus2, the CBCL face dataset3 and the KNIX dataset4. The subsample of the Reuters corpus we used is a term frequency matrix of 7,769 documents and 26,001 words. The CBCL face dataset is composed of 2,492 images of 361 pixels each, arranged into a matrix. The KNIX dataset contains 24 MRI slices of a knee, arranged in a matrix of size 262, 144 × 24. Pixels are divided by their overall mean intensity. For interpretability reasons, there is interest to decompose MRI data into non-negative factorizations [25]. We compare PWMP and FCMP against the multiplicative (mult) and the alternating (als) algorithm of [4], and the greedy coordinate descent (GCD) of [20]. Since the Reuters corpus is much larger than the CBCL and the KNIX dataset we only used the GCD for which a fast implementation in C is available. We report the objective value for fixed values of the rank in Table 2, showing that FCMP outperform all the baselines across all the datasets. PWMP achieves smallest error on the Reuters corpus. Non-negative garrote. We consider the non-negative garrote which is a common approach to model order selection [6]. We evaluate NNMP, PWMP, and FCMP in the experiment described in [33], where the non-negative garrote is used to perform model order selection for logistic regression (i.e., for a non-quadratic objective function). We evaluated training and test accuracy on 100 random splits of the sonar dataset from the UCI machine learning repository. In Table 3 we compare the median classification accuracy of our algorithms with that of the cyclic coordinate descent algorithm (NNG) from [33]. algorithm Reuters K = 10 CBCL K = 10 CBCL K = 50 KNIX K = 10 mult 2.4241e3 1.1405e3 2.4471e03 als 2.73e3 3.84e3 2.7292e03 GCD 5.9799e5 2.2372e3 806 2.2372e03 PWMP 5.9591e5 2.2494e3 789.901 2.2494e03 FCMP 5.9762e5 2.2364e3 786.15 2.2364e03 Table 2: Objective value for least-squares non-negative matrix factorization with rank K. training accuracy test accuracy NNMP 0.8345 ± 0.0242 0.7419 ± 0.0389 PWMP 0.8379 ± 0.0240 0.7419 ± 0.0392 FCMP 0.8345 ± 0.0238 0.7419 ± 0.0403 NNG 0.8069 ± 0.0518 0.7258 ± 0.0602 Table 3: Logistic Regression with non-negative Garrote, median ± std. dev. 7 Conclusion In this paper, we considered greedy algorithms for optimization over the convex cone, parametrized as the conic hull of a generic atom set. We presented a novel formulation of NNMP along with a comprehensive convergence analysis. Furthermore, we introduced corrective variants with linear convergence guarantees, and verified this convergence rate in numerical applications. We believe that the generality of our novel analysis will be useful to design new, fast algorithms with convergence guarantees, and to study convergence of existing heuristics, in particular in the context of non-negative matrix and tensor factorization. 2http://www.nltk.org/book/ch02.html 3http://cbcl.mit.edu/software-datasets/FaceData2.html 4http://www.osirix-viewer.com/resources/dicom-image-library/ 9 References [1] Animashree Anandkumar, Rong Ge, Daniel J Hsu, Sham M Kakade, and Matus Telgarsky. Tensor decompositions for learning latent variable models. Journal of Machine Learning Research, 15(1):2773–2832, 2014. [2] Mário César Ugulino Araújo, Teresa Cristina Bezerra Saldanha, Roberto Kawakami Harrop Galvao, Takashi Yoneyama, Henrique Caldas Chame, and Valeria Visani. The successive projections algorithm for variable selection in spectroscopic multicomponent analysis. Chemometrics and Intelligent Laboratory Systems, 57(2):65–73, 2001. [3] Jonas Behr, André Kahles, Yi Zhong, Vipin T Sreedharan, Philipp Drewe, and Gunnar Rätsch. Mitie: Simultaneous rna-seq-based transcript identification and quantification in multiple samples. Bioinformatics, 29(20):2529–2538, 2013. [4] Michael W Berry, Murray Browne, Amy N Langville, V Paul Pauca, and Robert J Plemmons. Algorithms and applications for approximate nonnegative matrix factorization. Computational statistics & data analysis, 52(1):155–173, 2007. [5] Alfred M Bruckstein, Michael Elad, and Michael Zibulevsky. On the uniqueness of nonnegative sparse solutions to underdetermined systems of equations. IEEE Transactions on Information Theory, 54(11):4813–4820, 2008. [6] P Bühlmann and B Yu. Boosting, model selection, lasso and nonnegative garrote. Technical Report 127, Seminar für Statistik ETH Zürich, 2005. [7] Peter Bühlmann and Bin Yu. Boosting. Wiley Interdisciplinary Reviews: Computational Statistics, 2(1):69–74, 2010. [8] Martin Burger. Infinite-dimensional optimization and optimal design. 2003. [9] Sheng Chen, Stephen A Billings, and Wan Luo. Orthogonal least squares methods and their application to non-linear system identification. International Journal of control, 50(5):1873– 1896, 1989. [10] Andrzej Cichocki and PHAN Anh-Huy. Fast local algorithms for large scale nonnegative matrix and tensor factorizations. IEICE transactions on fundamentals of electronics, communications and computer sciences, 92(3):708–721, 2009. [11] Ernie Esser, Yifei Lou, and Jack Xin. A method for finding structured sparse solutions to nonnegative least squares problems with applications. SIAM Journal on Imaging Sciences, 6(4):2010–2046, 2013. [12] M Frank and P Wolfe. An algorithm for quadratic programming. Naval research logistics quarterly, 1956. [13] Nicolas Gillis. Successive nonnegative projection algorithm for robust nonnegative blind source separation. SIAM Journal on Imaging Sciences, 7(2):1420–1450, 2014. [14] Nicolas Gillis and François Glineur. Accelerated multiplicative updates and hierarchical als algorithms for nonnegative matrix factorization. Neural Computation, 24(4):1085–1105, 2012. [15] Nicolas Gillis, Da Kuang, and Haesun Park. Hierarchical clustering of hyperspectral images using rank-two nonnegative matrix factorization. IEEE Transactions on Geoscience and Remote Sensing, 53(4):2066–2078, 2015. [16] Nicolas Gillis and Robert Luce. A fast gradient method for nonnegative sparse regression with self dictionary. arXiv preprint arXiv:1610.01349, 2016. [17] Alexander Grubb and J Andrew Bagnell. Generalized boosting algorithms for convex optimization. arXiv preprint arXiv:1105.2054, 2011. [18] Xiawei Guo, Quanming Yao, and James T Kwok. Efficient sparse low-rank tensor completion using the Frank-Wolfe algorithm. In AAAI Conference on Artificial Intelligence, 2017. [19] Zaid Harchaoui, Anatoli Juditsky, and Arkadi Nemirovski. Conditional gradient algorithms for norm-regularized smooth convex optimization. Mathematical Programming, 152(1-2):75–112, 2015. [20] Cho-Jui Hsieh and Inderjit S Dhillon. Fast coordinate descent methods with variable selection for non-negative matrix factorization. In Proceedings of the 17th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 1064–1072. ACM, 2011. [21] Martin Jaggi. Revisiting Frank-Wolfe: Projection-Free Sparse Convex Optimization. In ICML 2013 - Proceedings of the 30th International Conference on Machine Learning, 2013. 10 [22] Hyunsoo Kim, Haesun Park, and Lars Elden. Non-negative tensor factorization based on alternating large-scale non-negativity-constrained least squares. In Bioinformatics and Bioengineering, 2007. BIBE 2007. Proceedings of the 7th IEEE International Conference on, pages 1147–1151. IEEE, 2007. [23] Jingu Kim, Yunlong He, and Haesun Park. Algorithms for nonnegative matrix and tensor factorizations: A unified view based on block coordinate descent framework. Journal of Global Optimization, 58(2):285–319, 2014. [24] Jingu Kim and Haesun Park. Fast nonnegative tensor factorization with an active-set-like method. In High-Performance Scientific Computing, pages 311–326. Springer, 2012. [25] Ivica Kopriva and Andrzej Cichocki. Nonlinear band expansion and 3d nonnegative tensor factorization for blind decomposition of magnetic resonance image of the brain. In International Conference on Latent Variable Analysis and Signal Separation, pages 490–497. Springer, 2010. [26] Abhishek Kumar, Vikas Sindhwani, and Prabhanjan Kambadur. Fast conical hull algorithms for near-separable non-negative matrix factorization. In ICML (1), pages 231–239, 2013. [27] Simon Lacoste-Julien and Martin Jaggi. An Affine Invariant Linear Convergence Analysis for Frank-Wolfe Algorithms. In NIPS 2013 Workshop on Greedy Algorithms, Frank-Wolfe and Friends, December 2013. [28] Simon Lacoste-Julien and Martin Jaggi. On the Global Linear Convergence of Frank-Wolfe Optimization Variants. In NIPS 2015, pages 496–504, 2015. [29] Sören Laue. A Hybrid Algorithm for Convex Semidefinite Optimization. In ICML, 2012. [30] Charles L Lawson and Richard J Hanson. Solving least squares problems, volume 15. SIAM, 1995. [31] Daniel D Lee and H Sebastian Seung. Algorithms for non-negative matrix factorization. In Advances in neural information processing systems, pages 556–562, 2001. [32] Francesco Locatello, Rajiv Khanna, Michael Tschannen, and Martin Jaggi. A unified optimization view on generalized matching pursuit and frank-wolfe. In Proc. International Conference on Artificial Intelligence and Statistics (AISTATS), 2017. [33] Enes Makalic and Daniel F Schmidt. Logistic regression with the nonnegative garrote. In Australasian Joint Conference on Artificial Intelligence, pages 82–91. Springer, 2011. [34] Stéphane Mallat and Zhifeng Zhang. Matching pursuits with time-frequency dictionaries. IEEE Transactions on Signal Processing, 41(12):3397–3415, 1993. [35] Ron Meir and Gunnar Rätsch. An introduction to boosting and leveraging. In Advanced lectures on machine learning, pages 118–183. Springer, 2003. [36] José MP Nascimento and José MB Dias. Vertex component analysis: A fast algorithm to unmix hyperspectral data. IEEE transactions on Geoscience and Remote Sensing, 43(4):898–910, 2005. [37] Hao Nguyen and Guergana Petrova. Greedy strategies for convex optimization. Calcolo, pages 1–18, 2014. [38] Robert Peharz, Michael Stark, and Franz Pernkopf. Sparse nonnegative matrix factorization using l0-constraints. In IEEE, editor, Proceedings of MLSP, pages 83 – 88, Aug 2010. [39] Javier Pena and Daniel Rodriguez. Polytope conditioning and linear convergence of the frankwolfe algorithm. arXiv preprint arXiv:1512.06142, 2015. [40] Javier Pena and Negar Soheili. Solving conic systems via projection and rescaling. Mathematical Programming, pages 1–25, 2016. [41] Aleksei Pogorelov. Extrinsic geometry of convex surfaces, volume 35. American Mathematical Soc., 1973. [42] Gunnar Rätsch, Sebastian Mika, Manfred K Warmuth, et al. On the convergence of leveraging. In NIPS, pages 487–494, 2001. [43] F Sha, LK Saul, and Daniel D Lee. Multiplicative updates for nonnegative quadratic programming in support vector machines. Advances in Neural Information Processing Systems, 15, 2002. [44] Shai Shalev-Shwartz, Nathan Srebro, and Tong Zhang. Trading Accuracy for Sparsity in Optimization Problems with Sparsity Constraints. SIAM Journal on Optimization, 20:2807– 2832, 2010. 11 [45] Amnon Shashua and Tamir Hazan. Non-negative tensor factorization with applications to statistics and computer vision. In Proceedings of the 22nd international conference on Machine learning, pages 792–799. ACM, 2005. [46] Vladimir Temlyakov. Chebushev Greedy Algorithm in convex optimization. arXiv.org, December 2013. [47] Vladimir Temlyakov. Greedy algorithms in convex optimization on Banach spaces. In 48th Asilomar Conference on Signals, Systems and Computers, pages 1331–1335. IEEE, 2014. [48] VN Temlyakov. Greedy approximation in convex optimization. Constructive Approximation, 41(2):269–296, 2015. [49] Joel A Tropp. Greed is good: algorithmic results for sparse approximation. IEEE Transactions on Information Theory, 50(10):2231–2242, 2004. [50] Zheng Wang, Ming jun Lai, Zhaosong Lu, Wei Fan, Hasan Davulcu, and Jieping Ye. Rank-one matrix pursuit for matrix completion. In ICML, pages 91–99, 2014. [51] Max Welling and Markus Weber. Positive tensor factorization. Pattern Recognition Letters, 22(12):1255–1261, 2001. [52] Mehrdad Yaghoobi, Di Wu, and Mike E Davies. Fast non-negative orthogonal matching pursuit. IEEE Signal Processing Letters, 22(9):1229–1233, 2015. [53] Yuning Yang, Siamak Mehrkanoon, and Johan A K Suykens. Higher order Matching Pursuit for Low Rank Tensor Learning. arXiv.org, March 2015. [54] Quanming Yao and James T Kwok. Greedy learning of generalized low-rank models. In IJCAI, 2016. [55] Xiao-Tong Yuan and Tong Zhang. Truncated power method for sparse eigenvalue problems. J. Mach. Learn. Res., 14(1):899–925, April 2013. 12 | 2017 | 257 |
6,738 | On the Fine-Grained Complexity of Empirical Risk Minimization: Kernel Methods and Neural Networks Arturs Backurs CSAIL MIT backurs@mit.edu Piotr Indyk CSAIL MIT indyk@mit.edu Ludwig Schmidt CSAIL MIT ludwigs@mit.edu Abstract Empirical risk minimization (ERM) is ubiquitous in machine learning and underlies most supervised learning methods. While there is a large body of work on algorithms for various ERM problems, the exact computational complexity of ERM is still not understood. We address this issue for multiple popular ERM problems including kernel SVMs, kernel ridge regression, and training the final layer of a neural network. In particular, we give conditional hardness results for these problems based on complexity-theoretic assumptions such as the Strong Exponential Time Hypothesis. Under these assumptions, we show that there are no algorithms that solve the aforementioned ERM problems to high accuracy in sub-quadratic time. We also give similar hardness results for computing the gradient of the empirical loss, which is the main computational burden in many non-convex learning tasks. 1 Introduction Empirical risk minimization (ERM) has been highly influential in modern machine learning [37]. ERM underpins many core results in statistical learning theory and is one of the main computational problems in the field. Several important methods such as support vector machines (SVM), boosting, and neural networks follow the ERM paradigm [34]. As a consequence, the algorithmic aspects of ERM have received a vast amount of attention over the past decades. This naturally motivates the following basic question: What are the computational limits for ERM algorithms? In this work, we address this question both in convex and non-convex settings. Convex ERM problems have been highly successful in a wide range of applications, giving rise to popular methods such as SVMs and logistic regression. Using tools from convex optimization, the resulting problems can be solved in polynomial time. However, the exact time complexity of many important ERM problems such as kernel SVMs is not yet well understood. As the size of data sets in machine learning continues to grow, this question is becoming increasingly important. For ERM problems with millions of high-dimensional examples, even quadratic time algorithms can become painfully slow (or expensive) to run. Non-convex ERM problems have also attracted extensive research interest, e.g., in the context of deep neural networks. First order methods that follow the gradient of the empirical loss are not guaranteed to find the global minimizer in this setting. Nevertheless, variants of gradient descent are by far the most common method for training large neural networks. Here, the computational bottleneck is to compute a number of gradients, not necessarily to minimize the empirical loss globally. Although we 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. can compute gradients in polynomial time, the large number of parameters and examples in modern deep learning still makes this a considerable computational challenge. Unfortunately, there are only few existing results concerning the exact time complexity of ERM or gradient computations. Since the problems have polynomial time algorithms, the classical machinery from complexity theory (such as NP hardness) is too coarse to apply. Oracle lower bounds from optimization offer useful guidance for convex ERM problems, but the results only hold for limited classes of algorithms. Moreover, they do not account for the cost of executing the oracle calls, as they simply lower bound their number. Overall, we do not know if common ERM problems allow for algorithms that compute a high-accuracy solution in sub-quadratic or even nearly-linear time for all instances.1 Furthermore, we do not know if there are more efficient techniques for computing (mini-)batch gradients than simply treating each example in the batch independently.2 We address both questions for multiple well-studied ERM problems. Hardness of ERM. First, we give conditional hardness results for minimizing the empirical risk in several settings, including kernel SVMs, kernel ridge regression (KRR), and training the top layer of a neural network. Our results give evidence that no algorithms can solve these problems to high accuracy in strongly sub-quadratic time. Moreover, we provide similar conditional hardness results for kernel PCA. All of these methods are popular learning algorithms due to the expressiveness of the kernel or network embedding. Our results show that this expressiveness also leads to an expensive computational problem. Hardness of gradient computation in neural networks. Second, we address the complexity of computing a gradient for the empirical risk of a neural network. In particular, we give evidence that computing (or even approximating, up to polynomially large factors) the norm of the gradient of the top layer in a neural network takes time that is “rectangular”. The time complexity cannot be significantly better than O(n · m), where m is the number of examples and n is the number of units in the network. Hence, there are no algorithms that compute batch gradients faster than handling each example individually, unless common complexity-theoretic assumptions fail. Our hardness results for gradient computation apply to common activation functions such as ReLU or sigmoid units. We remark that for polynomial activation functions (for instance, studied in [24]), significantly faster algorithms do exist. Thus, our results can be seen as mapping the “efficiency landscape” of basic machine learning sub-routines. They distinguish between what is possible and (likely) impossible, suggesting further opportunities for improvement. Our hardness results are based on recent advances in fine-grained complexity and build on conjectures such as the Strong Exponential Time Hypothesis (SETH) [23, 22, 38]. SETH concerns the classic satisfiability problem for formulas in Conjunctive Normal Form (CNF). Informally, the conjecture states that there is no algorithm for checking satisfiability of a formula with n variables and m clauses in time less than O(cn · poly(m)) for some c < 2.3 While our results are conditional, SETH has been employed in many recent hardness results. Its plausibility stems from the fact that, despite 60 years of research on satisfiability algorithms, no such improvement has been discovered. Our results hold for a significant range of the accuracy parameter. For kernel methods, our bounds hold for algorithms approximating the empirical risk up to a factor of 1+ε, for log(1/ε) = ω(log2 n)). Thus, they provide conditional quadratic lower bounds for algorithms with, say, a log 1/ε runtime dependence on the approximation error ε. A (doubly) logarithmic dependence on 1/ε is generally seen as the ideal rate of convergence in optimization, and algorithms with this property have been studied extensively in the machine learning community (cf. [12].). At the same time, approximate 1More efficient algorithms exist if the running time is allowed to be polynomial in the accuracy parameter, e.g., [35] give such an algorithm for the kernel SVM problem that we consider as well. See also the discussion at the end of this section. 2Consider a network with one hidden layer containing n units and a training set with m examples, for simplicity in small dimension d = O(log n). No known results preclude an algorithm that computes a full gradient in time O((n+m) log n). This would be significantly faster than the standard O(n·m·log n) approach of computing the full gradient example by example. 3Note that SETH can be viewed as a significant strengthening of the P ̸= NP conjecture, which only postulates that there is no polynomial time algorithm for CNF satisfiability. The best known algorithms for CNF satisfiability have running times of the form O(2(1−o(1))n · poly(m)). 2 solutions to ERM problems can be sufficient for good generalization in learning tasks. Indeed, stochastic gradient descent (SGD) is often advocated as an efficient learning algorithm despite its polynomial dependence on 1/ε in the optimization error [35, 15]. Our results support this viewpoint since SGD sidesteps the quadratic time complexity of our lower bounds. For other problems, our assumptions about the accuracy parameter are less stringent. In particular, for training the top layer of the neural network, we only need to assume that ε ≈1/n. Finally, our lower bounds for approximating the norm of the gradient in neural networks hold even if ε = nO(1), i.e., for polynomial approximation factors (or alternatively, a constant additive factor for ReLU and sigmoid activation functions). Finally, we note that our results do not rule out algorithms that achieve a sub-quadratic running time for well-behaved instances, e.g., instances with low-dimensional structure. Indeed, many such approaches have been investigated in the literature, for instance the Nyström method or random features for kernel problems [40, 30]. Our results offer an explanation for the wide variety of techniques. The lower bounds are evidence that there is no “silver bullet” algorithm for solving the aforementioned ERM problems in sub-quadratic time, to high accuracy, and for all instances. 2 Background Fine-grained complexity. We obtain our conditional hardness results via reductions from two well-studied problems: Orthogonal Vectors and Bichromatic Hamming Close Pair. Definition 1 (Orthogonal Vectors problem (OVP)). Given two sets A = {a1, . . . , an} ⊆{0, 1}d and B = {b1, . . . , bn} ⊆{0, 1}d of n binary vectors, decide if there exists a pair a ∈A and b ∈B such that aTb = 0. For OVP, we can assume without loss of generality that all vectors in B have the same number of 1s. This can be achieved by appending d entries to every bi and setting the necessary number of them to 1 and the rest to 0. We then append d entries to every ai and set all of them to 0. Definition 2 (Bichromatic Hamming Close Pair (BHCP) problem). Given two sets A = {a1, . . . , an} ⊆{0, 1}d and B = {b1, . . . , bn} ⊆{0, 1}d of n binary vectors and an integer t ∈{2, . . . , d}, decide if there exists a pair a ∈A and b ∈B such that the number of coordinates in which they differ is less than t (formally, Hamming(a, b) := ||a −b||1 < t). If there is such a pair (a, b), we call it a close pair. It is known that both OVP and BHCP require almost quadratic time (i.e., n2−o(1)) for any d = ω(log n) assuming SETH [5].4 Furthermore, if we allow the sizes |A| = n and |B| = m to be different, both problems require (nm)1−o(1) time assuming SETH, as long as m = nα for some constant α ∈(0, 1) [17]. Our proofs will proceed by embedding OVP and BHCP instances into ERM problems. Such a reduction then implies that the ERM problem requires almost quadratic time if the SETH is true. If we could solve the ERM problem faster, we would also obtain a faster algorithm for the satisfiability problem. 3 Our contributions 3.1 Kernel ERM problems We provide hardness results for multiple kernel problems. In the following, let x1, . . . , xn ∈Rd be the n input vectors, where d = ω(log n). We use y1, . . . , yn ∈R as n labels or target values. Finally, let k(x, x′) denote a kernel function and let K ∈Rn×n be the corresponding kernel matrix, defined as Ki,j := k(xi, xj) [33]. Concretely, we focus on the Gaussian kernel k(x, x′) := exp −C∥x −x′∥2 2 for some C > 0. We note that our results can be generalized to any kernel with exponential tail. 4We use ω(g(n)) to denote any function f such that limn→∞f(n)/g(n) = ∞. Similarly, we use o(g(n)) to denote any function f such that limn→∞f(n)/g(n) = 0. Consequently, we will refer to functions of the form ω(1) as super-constant and to nω(1) as super-polynomial. 3 Kernel SVM. For simplicity, we present our result for hard-margin SVMs without bias terms. This gives the following optimization problem. Definition 3 (Hard-margin SVM). A (primal) hard-margin SVM is an optimization problem of the following form: minimize α1,...,αn≥0 1 2 n X i,j=1 αi αj yi yj k(xi, xj) subject to yif(xi) ≥1, i = 1, . . . , n, (1) where f(x) := Pn i=1 αiyik(xi, x). The following theorem is our main result for SVMs, described in more detail in Section 4. In Sections B, C, and D of the supplementary material we provide similar hardness results for other common SVM variants, including the soft-margin version. Theorem 4. Let k(a, a′) be the Gaussian kernel with C = 100 log n and let ε = exp(−ω(log2 n)). Then approximating the optimal value of Equation (1) within a multiplicative factor 1 + ε requires almost quadratic time assuming SETH. Kernel Ridge Regression. Next we consider Kernel Ridge Regression, which is formally defined as follows. Definition 5 (Kernel ridge regression). Given a real value λ ≥0, the goal of kernel ridge regression is to output arg min α∈Rn 1 2||y −Kα||2 2 + λ 2 αTKα. This problem is equivalent to computing the vector (K + λI)−1y. We focus on the special case where λ = 0 and the vector y has all equal entries y1 = . . . = yn = 1. In this case, the entrywise sum of K−1y is equal to the sum of the entries in K−1. Thus, we show hardness for computing the latter quantity (see Section F in the supplementary material for the proof). Theorem 6. Let k(a, a′) be the Gaussian kernel for any parameter C = ω(log n) and let ε = exp(−ω(log2 n)). Then computing the sum of the entries in K−1 up to a multiplicative factor of 1 + ε requires almost quadratic time assuming SETH. Kernel PCA. Finally, we turn to the Kernel PCA problem, which we define as follows [26]. Definition 7 (Kernel Principal Component Analysis (PCA)). Let 1n be an n × n matrix where each entry takes value 1/n, and define K′ := (I −1n)K(I −1n). The goal of the kernel PCA problem is to output the n eigenvalues of the matrix K′. In the above definition, the output only consists of the eigenvalues, not the eigenvectors. This is because computing all n eigenvectors trivially takes at least quadratic time since the output itself has quadratic size. Our hardness proof applies to the potentially simpler problem where only the eigenvalues are desired. Specifically, we show that computing the sum of the eigenvalues (i.e., the trace of the matrix) is hard. See Section E in the supplementary material for the proof. Theorem 8. Let k(a, a′) be the Gaussian kernel with C = 100 log n and let ε = exp(−ω(log2 n)). Then approximating the sum of the eigenvalues of K′ = (I −1n)K(I −1n) within a multiplicative factor of 1 + ε requires almost quadratic time assuming SETH. We note that the argument in the proof shows that even approximating the sum of the entries of K is hard. This provides an evidence of hardness of the kernel density estimation problem for Gaussian kernels, complementing recent upper bounds of [20]. 3.2 Neural network ERM problems We now consider neural networks. We focus on the problem of optimizing the top layer while keeping lower layers unchanged. An instance of this problem is transfer learning with large networks that would take a long time and many examples to train from scratch [31]. We consider neural networks of depth 2, with the sigmoid or ReLU activation function. Our hardness result holds for a more general class of “nice” activation functions S as described later (see Definition 12). 4 Given n weight vectors w1, . . . , wn ∈Rd and n weights α1, . . . , αn ∈R, consider the function f : Rd →R using a non-linearity S : R →R: f(u) := n X j=1 αj · S(uTwj) . This function can be implemented as a neural net that has d inputs, n nonlinear activations (units), and one linear output. To complete the ERM problem, we also require a loss function. Our hardness results hold for a large class of “nice” loss functions, which includes the hinge loss and the logistic loss.5 Given a nice loss function and m input vectors a1, . . . , am ∈Rd with corresponding labels yi, we consider the following problem: minimize α1,...,αn∈R m X i=1 loss(yi, f(ui)). (2) Our main result is captured by the following theorem (see Section 5 for the proof). For simplicity, we set m = n. Theorem 9. For any d = ω(log n), approximating the optimal value in Equation (2) up to a multiplicative factor of 1 + 1 4n requires almost quadratic time assuming SETH. 3.3 Hardness of gradient computation Finally, we consider the problem of computing the gradient of the loss function for a given set of examples. We focus on the network architecture from the previous section. Formally, we obtain the following result: Theorem 10. Consider the empirical risk in Equation (2) under the following assumptions: (i) The function f is represented by a neural network with n units, n · d parameters, and the ReLU activation function. (ii) We have d = ω(log n). (iii) The loss function is the logistic loss or hinge loss. Then approximating the ℓp-norm (for any p ≥1) of the gradient of the empirical risk for m examples within a multiplicative factor of nC for any constant C > 0 takes at least O (nm)1−o(1) time assuming SETH. See Section 6 for the proof. We also prove a similar statement for the sigmoid activation function. At the same time, we remark that for polynomial activation functions, significantly faster algorithms do exist, using the polynomial lifting argument. Specifically, for the polynomial activation function of the form xr for some integer r ≥2, all gradients can be computed in O((n + m)dr) time. Note that the running time of the standard backpropagation algorithm is O(dnm) for networks with this architecture. Thus one can improve over backpropagation for a non-trivial range of parameters, especially for quadratic activation function when r = 2. See Section H in the supplementary material for more details. 3.4 Related work Recent work has demonstrated conditional quadratic hardness results for many combinatorial optimization problems over graphs and sequences. These results include computing diameter in sparse graphs [32, 21], Local Alignment [2], Fréchet distance [16], Edit Distance [13], Longest Common Subsequence, and Dynamic Time Warping [1, 17]. In the machine learning literature, [14] recently showed a tight lower bound for the problem of inferring the most likely path in a Hidden Markov Model, matching the upper bound achieved by the Viterbi algorithm [39]. As in our paper, the SETH and related assumptions underlie these lower bounds. To the best of our knowledge, our paper is the first application of this methodology to continuous (as opposed to combinatorial) optimization problems. There is a long line of work on the oracle complexity of optimization problems, going back to [28]. We refer the reader to [29] for these classical results. The oracle complexity of ERM problems is still 5In the binary setting we consider, the logistic loss is equivalent to the softmax loss commonly employed in deep learning. 5 subject of active research, e.g., see [3, 19, 41, 9, 10]. The work closest to ours is [19], which gives quadratic time lower bounds for ERM algorithms that access the kernel matrix through an evaluation oracle or a low-rank approximation. The oracle results are fundamentally different from the lower bounds presented in our paper. Oracle lower bounds are typically unconditional, but inherently apply only to a limited class of algorithms due to their information-theoretic nature. Moreover, they do not account for the cost of executing the oracle calls, as they merely lower bound their number. In contrast, our results are conditional (based on the SETH and related assumptions), but apply to any algorithm and account for the total computational cost. This significantly broadens the reach of our results. We show that the hardness is not due to the oracle abstraction but instead inherent in the computational problem. 4 Overview of the hardness proof for kernel SVMs Let A = {a1, . . . , an} ⊆{0, 1}d and B = {b1, . . . , bn} ⊆{0, 1}d be the two sets of binary vectors from a BHCP instance with d = ω(log n). Our goal is to determine whether there is a close pair of vectors. We show how to solve this BHCP instance by reducing it to three computations of SVM, defined as follows: 1. We take the first set A of binary vectors, assign label 1 to all vectors, and solve the corresponding SVM on the n vectors: minimize α1,...,αn≥0 1 2 n X i,j=1 αiαjk(ai, aj) subject to n X j=1 αjk(ai, aj) ≥1, i = 1, . . . , n. (3) Note that we do not have yi in the expressions because all labels are 1. 2. We take the second set B of binary vectors, assign label −1 to all vectors, and solve the corresponding SVM on the n vectors: minimize β1,...,βn≥0 1 2 n X i,j=1 βiβjk(bi, bj) subject to − n X j=1 βjk(bi, bj) ≤−1, i = 1, . . . , n. (4) 3. We take both sets A and B of binary vectors, assign label 1 to all vectors from the first set A and label −1 to all vectors from the second set B. We then solve the corresponding SVM on the 2n vectors: minimize α1,...,αn≥0 β1,...,βn≥0 1 2 n X i,j=1 αiαjk(ai, aj) + 1 2 n X i,j=1 βiβjk(bi, bj) − n X i,j=1 αiβjk(ai, bj) subject to n X j=1 αjk(ai, aj) − n X j=1 βjk(ai, bj) ≥1, i = 1, . . . , n , − n X j=1 βjk(bi, bj) + n X j=1 αjk(bi, aj) ≤−1, i = 1, . . . , n . (5) Intuition behind the construction. To show a reduction from the BHCP problem to SVM computation, we have to consider two cases: • The YES case of the BHCP problem when there are two vectors that are close in Hamming distance. That is, there exist ai ∈A and bj ∈B such that Hamming(ai, bj) < t. • The NO case of the BHCP problem when there is no close pair of vectors. That is, for all ai ∈A and bj ∈B, we have Hamming(ai, bj) ≥t. 6 We show that we can distinguish between these two cases by comparing the objective value of the first two SVM instances above to the objective value of the third. Intuition for the NO case. We have Hamming(ai, bj) ≥t for all ai ∈A and bj ∈B. The Gaussian kernel then gives the inequality k(ai, bj) = exp(−100 log n · ∥ai −bj∥2 2) ≤exp(−100 log n · t) for all ai ∈A and bj ∈B. This means that the value k(ai, bj) is very small. For simplicity, assume that it is equal to 0, i.e., k(ai, bj) = 0 for all ai ∈A and bj ∈B. Consider the third SVM (5). It contains three terms involving k(ai, bj): the third term in the objective function, the second term in the inequalities of the first type, and the second term in the inequalities of the second type. We assumed that these terms are equal to 0 and we observe that the rest of the third SVM is equal to the sum of the first SVM (3) and the second SVM (4). Thus we expect that the optimal value of the third SVM is approximately equal to the sum of the optimal values of the first and the second SVMs. If we denote the optimal value of the first SVM (3) by value(A), the optimal value of the second SVM (4) by value(B), and the optimal value of the third SVM (5) by value(A, B), then we can express our intuition in terms of the approximate equality value(A, B) ≈value(A) + value(B) . Intuition for the YES case. In this case, there is a close pair of vectors ai ∈A and bj ∈B such that Hamming(ai, bj) ≤t −1. Since we are using the Gaussian kernel we have the following inequality for this pair of vectors: k(ai, bj) = exp(−100 log n · ∥ai −bj∥2 2) ≥exp(−100 log n · (t −1)) . We therefore have a large summand in each of the three terms from the above discussion. Thus the three terms do not (approximately) disappear and there is no reason for us to expect that the approximate equality holds. We can thus expect value(A, B) ̸≈value(A) + value(B) . Thus, by computing value(A, B) and comparing it to value(A) + value(B) we can distinguish between the YES and NO instances of BHCP. This completes the reduction. The full proofs are given in Section B of the supplementary material. 5 Overview of the hardness proof for training the final layer of a neural network We start by formally defining the class of “nice” loss functions and “nice” activation functions. Definition 11. For a label y ∈{−1, 1} and a prediction w ∈R, we call the loss function loss(y, w) : {−1, 1} × R →R≥0 nice if the following three properties hold: • loss(y, w) = l(yw) for some convex function l : R →R≥0. • For some sufficiently large constant K > 0, we have that (i) l(x) ≤o(1) for all x ≥nK, (ii) l(x) ≥ω(n) for all x ≤−nK, and (iii) l(x) = l(0) ± o(1/n) for all x ∈±O(n−K). • l(0) > 0 is some constant strictly larger than 0. We note that the hinge loss function loss(y, x) = max(0, 1 −y · x) and the logistic loss function loss(y, x) = 1 ln 2 ln (1 + e−y·x) are nice loss functions according to the above definition. Definition 12. A non-decreasing activation functions S : R →R≥0 is “nice” if it satisfies the following property: for all sufficiently large constants T > 0 there exist v0 > v1 > v2 such that S(v0) = Θ(1), S(v1) = 1/nT , S(v2) = 1/nω(1) and v1 = (v0 + v2)/2. The ReLU activation S(z) = max(0, z) satisfies these properties since we can choose v0 = 1, v1 = 1/nT , and v2 = −1 + 2/nT . For the sigmoid function S(z) = 1 1+e−z , we can choose 7 v1 = −log(nT −1), v0 = v1 + C, and v2 = v1 −C for some C = ω(log n). In the rest of the proof we set T = 1000K, where K is the constant from Definition 11. We now describe the proof of Theorem 9. We use the notation α := (α1, . . . , αn)T. Invoking the first property from Definition 11, we observe that the optimization problem (2) is equivalent to the following optimization problem: minimize α∈Rn m X i=1 l(yi · (Mα)i), (6) where M ∈Rm×n is the matrix defined as Mi,j := S(uT i wj) for i = 1, . . . , m and j = 1, . . . n. For the rest of the section we will use m = Θ(n).6 Let A = {a1, . . . , an} ⊆{0, 1}d and B = {b1, . . . , bn} ⊆{0, 1}d with d = ω(log n) be the input to the Orthogonal Vectors problem. To show hardness we define a matrix M as a vertical concatenation of 3 smaller matrices: M1, M2 and M2 (repeated). Both matrices M1, M2 ∈Rn×n are of size n × n. Thus the number of rows of M (equivalently, the number of training examples) is m = 3n. Reduction overview. We select the input examples and weights so that the matrices M1 and M2, have the following properties: • M1: if two vectors ai and bj are orthogonal, then the corresponding entry (M1)i,j = S(v0) = Θ(1) and otherwise (M1)i,j ≈0.7 • M2: (M2)i,i = S(v1) = 1/n1000K and (M2)i,j ≈0 for all i ̸= j To complete the description of the optimization problem (6), we assign labels to the inputs corresponding to the rows of the matrix M. We assign label 1 to all inputs corresponding to rows of the matrix M1 and the first copy of the matrix M2. We assign label −1 to all remaining rows of the matrix M corresponding to the second copy of matrix M2. The proof of the theorem is completed by the following two lemmas. See Section G in the supplementary material for the proofs. Lemma 13. If there is a pair of orthogonal vectors, then the optimal value of (6) is upper bounded by (3n −1) · l(0) + o(1). Lemma 14. If there is no pair of orthogonal vectors, then the optimal value of (6) is lower bounded by 3n · l(0) −o(1). 6 Hardness proof for gradient computation Finally, we consider the problem of computing the gradient of the loss function for a given set of examples. We focus on the network architecture as in the previous section. Specifically, let Fα,B(a) := Pn j=1 αjS(a, bj) be the output of a neural net with activation function S, where: (1) a is an input vector from the set A := {a1, . . . , am} ⊆{0, 1}d; (2) B := {b1, . . . , bn} ⊆{0, 1}d is a set of binary vectors; (3) α = {α1, . . . , αn}T ∈Rn is an n-dimensional real-valued vector. We first prove the following lemma. Lemma 15. For some loss function l : R →R, let l(Fα,B(a)) be the loss for input a when the label of the input a is +1. Consider the gradient of the total loss lα,A,B := P a∈A l(Fα,B(a)) at α1 = . . . = αn = 0 with respect to α1, . . . , αn. The sum of the entries of the gradient is equal to l′(0) · P a∈A,b∈B S(a, b), where l′(0) is the derivative of the loss function l at 0. For the hinge loss function, we have that the loss function is l(x) = max(0, 1 −x) if the label is +1. Thus, l′(0) = −1. For the logistic loss function, we have that the loss function is l(x) = 1 ln 2 ln (1 + e−x) if the label is +1. Thus, l′(0) = − 1 2 ln 2 in this case. 6Note that our reduction does not explicitly construct M. Instead, the values of the matrix are induced by the input examples and weights. 7We write x ≈y if x = y up to an inversely superpolynomial additive factor, i.e., |x −y| ≤n−ω(1). 8 Proof of Theorem 10. Since all ℓp-norms are within a polynomial factor, it suffices to show the statement for ℓ1-norm. We set S(a, b) := max(0, 1 −2aTb). Using Lemma 15, we get that the ℓ1-norm of the gradient of the total loss function is equal to |l′(0)| · P a∈A,b∈B 1aTb=0. Since l′(0) ̸= 0, this reduces OV to the gradient computation problem. Note that if there is no orthogonal pair, then the ℓ1-norm is 0 and otherwise it is a constant strictly greater than 0. Thus approximating the ℓ1-norm within any finite factor allows us to distinguish the cases. See Section H in the supplementary material for other results. 7 Conclusions We have shown that a range of kernel problems require quadratic time for obtaining a high accuracy solution unless the Strong Exponential Time Hypothesis is false. These problems include variants of kernel SVM, kernel ridge regression, and kernel PCA. We also gave a similar hardness result for training the final layer of a depth-2 neural network. This result is general and applies to multiple loss and activation functions. Finally, we proved that computing the empirical loss gradient for such networks takes time that is essentially “rectangular”, i.e., proportional to the product of the network size and the number of examples. We note that our quadratic (rectangular) hardness results hold for general inputs. There is a long line of research on algorithms for kernel problems with running times depending on various input parameters, such as its statistical dimension [42], degrees of freedom [11] or effective dimensionality [27]. It would be interesting to establish lower bounds on the complexity of kernel problems as a function of the aforementioned input parameters. Our quadratic hardness results for kernel problems apply to kernels with exponential tails. A natural question is whether similar results can be obtained for “heavy-tailed” kernels, e.g., the Cauchy kernel. We note that similar results for the linear kernel do not seem achievable using our techniques.8 Several of our results are obtained by a reduction from the (exact) Bichromatic Hamming Closest Pair problem or the Orthogonal Vectors problem. This demonstrates a strong connection between kernel methods and similarity search, and suggests that perhaps a reverse reduction is also possible. Such a reduction could potentially lead to faster approximate algorithms for kernel methods: although the exact closest pair problem has no known sub-quadratic solution, efficient and practical sub-quadratic time algorithms for the approximate version of the problem exist (see e.g., [6, 36, 8, 7, 4]). Acknowledgements Ludwig Schmidt is supported by a Google PhD fellowship. Arturs Backurs is supported by an IBM Research fellowship. This research was supported by grants from NSF and Simons Foundation. References [1] A. Abboud, A. Backurs, and V. V. Williams. Tight hardness results for LCS and other sequence similarity measures. In Symposium on Foundations of Computer Science (FOCS), 2015. [2] A. Abboud, V. V. Williams, and O. Weimann. Consequences of faster alignment of sequences. In International Colloquium on Automata, Languages, and Programming (ICALP), 2014. [3] A. Agarwal and L. Bottou. A lower bound for the optimization of finite sums. In International Conference on Machine Learning (ICML), 2015. 8In particular, assuming a certain strengthening of SETH, known as the “non-deterministic SETH” [18], it is provably impossible to prove SETH hardness for any of the linear variants of the studied ERM problems, at least via deterministic reductions. This is due to the fact that these problems have short certificates of optimality via duality arguments. Also, it should be noted that linear analogs of some of the problems considered in this paper (e.g., linear ridge regression) can be solved in O(nd2) time using SVD methods. 9 [4] J. Alman, T. M. Chan, and R. Williams. Polynomial Representations of Threshold Functions and Algorithmic Applications. 2016. [5] J. Alman and R. Williams. Probabilistic polynomials and hamming nearest neighbors. In Symposium on Foundations of Computer Science (FOCS), 2015. [6] A. Andoni and P. Indyk. Near-optimal hashing algorithms for approximate nearest neighbor in high dimensions. In Symposium on Foundations of Computer Science (FOCS), 2006. [7] A. Andoni, P. Indyk, T. Laarhoven, I. Razenshteyn, and L. Schmidt. Practical and optimal lsh for angular distance. In Advances in Neural Information Processing Systems (NIPS). 2015. [8] A. Andoni and I. Razenshteyn. Optimal data-dependent hashing for approximate near neighbors. In Symposium on Theory of Computing (STOC), 2015. [9] Y. Arjevani and O. Shamir. Dimension-free iteration complexity of finite sum optimization problems. In Advances in Neural Information Processing Systems (NIPS). 2016. [10] Y. Arjevani and O. Shamir. Oracle complexity of second-order methods for finite-sum problems. CoRR, abs/1611.04982, 2016. [11] F. Bach. Sharp analysis of low-rank kernel matrix approximations. In Conference on Learning Theory (COLT), 2013. [12] F. Bach and S. Sra. Stochastic optimization: Beyond stochastic gradients and convexity. NIPS Tutorial, 2016. http://suvrit.de/talks/vr_nips16_bach.pdf. [13] A. Backurs and P. Indyk. Edit distance cannot be computed in strongly subquadratic time (unless SETH is false). In Symposium on Theory of Computing (STOC), 2015. [14] A. Backurs and C. Tzamos. Improving viterbi is hard: Better runtimes imply faster clique algorithms. International Conference on Machine Learning (ICML), 2017. [15] L. Bottou and O. Bousquet. The tradeoffs of large scale learning. In Advances in Neural Information Processing Systems (NIPS), 2007. [16] K. Bringmann. Why walking the dog takes time: Frechet distance has no strongly subquadratic algorithms unless SETH fails. In Symposium on Foundations of Computer Science (FOCS), 2014. [17] K. Bringmann and M. Künnemann. Quadratic conditional lower bounds for string problems and dynamic time warping. In Symposium on Foundations of Computer Science (FOCS), 2015. [18] M. L. Carmosino, J. Gao, R. Impagliazzo, I. Mihajlin, R. Paturi, and S. Schneider. Nondeterministic extensions of the strong exponential time hypothesis and consequences for non-reducibility. In Proceedings of the 2016 ACM Conference on Innovations in Theoretical Computer Science, pages 261–270. ACM, 2016. [19] N. Cesa-Bianchi, Y. Mansour, and O. Shamir. On the complexity of learning with kernels. In Conference On Learning Theory (COLT), 2015. [20] M. Charikar and P. Siminelakis. Hashing-based-estimators for kernel density in high dimensions. FOCS, 2017. [21] S. Chechik, D. H. Larkin, L. Roditty, G. Schoenebeck, R. E. Tarjan, and V. V. Williams. Better approximation algorithms for the graph diameter. In Symposium on Discrete Algorithms (SODA), 2014. [22] R. Impagliazzo and R. Paturi. On the complexity of k-sat. Journal of Computer and System Sciences, 62(2):367–375, 2001. [23] R. Impagliazzo, R. Paturi, and F. Zane. Which problems have strongly exponential complexity? Journal of Computer and System Sciences, 63:512–530, 2001. 10 [24] R. Livni, S. Shalev-Shwartz, and O. Shamir. On the computational efficiency of training neural networks. In Advances in Neural Information Processing Systems, pages 855–863, 2014. [25] K.-R. Müller, S. Mika, G. Rätsch, K. Tsuda, and B. Schölkopf. An introduction to kernel-based learning algorithms. IEEE transactions on neural networks, 12(2):181–201, 2001. [26] K. P. Murphy. Machine Learning: A Probabilistic Perspective. The MIT Press, 2012. [27] C. Musco and C. Musco. Recursive sampling for the Nyström method. Advances in Neural Information Processing Systems (NIPS), 2016. [28] A. S. Nemirovski and D. B. Yudin. Problem Complexity and Method Efficiency in Optimization. Wiley Interscience, 1983. [29] Y. Nesterov. Introductory Lectures on Convex Optimization: A Basic Course. Kluwer Academic Publishers, 2004. [30] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In Advances in Neural Information Processing Systems (NIPS). 2008. [31] A. S. Razavian, H. Azizpour, J. Sullivan, and S. Carlsson. Cnn features off-the-shelf: An astounding baseline for recognition. In Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), 2014. [32] L. Roditty and V. Vassilevska Williams. Fast approximation algorithms for the diameter and radius of sparse graphs. In Symposium on Theory of Computing (STOC), 2013. [33] B. Schölkopf and A. J. Smola. Learning with kernels: support vector machines, regularization, optimization, and beyond. MIT press, 2001. [34] S. Shalev-Shwartz and S. Ben-David. Understanding Machine Learning: From Theory to Algorithms. Cambridge University Press, 2014. [35] S. Shalev-Shwartz, Y. Singer, and N. Srebro. Pegasos: Primal estimated sub-gradient solver for SVM. In International Conference on Machine Learning (ICML), 2007. [36] G. Valiant. Finding correlations in subquadratic time, with applications to learning parities and juntas. In Symposium on Foundations of Computer Science (FOCS), 2012. [37] V. Vapnik. Statistical learning theory. Wiley, 1998. [38] V. Vassilevska Williams. Hardness of easy problems: Basing hardness on popular conjectures such as the Strong Exponential Time Hypothesis (invited talk). In LIPIcs-Leibniz International Proceedings in Informatics, volume 43. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, 2015. [39] A. Viterbi. Error bounds for convolutional codes and an asymptotically optimum decoding algorithm. IEEE transactions on Information Theory, 13(2):260–269, 1967. [40] C. K. Williams and M. Seeger. Using the nyström method to speed up kernel machines. In Advances in Neural Information Processing Systems (NIPS). 2001. [41] B. E. Woodworth and N. Srebro. Tight complexity bounds for optimizing composite objectives. In Advances in Neural Information Processing Systems (NIPS), 2016. [42] Y. Yang, M. Pilanci, M. J. Wainwright, et al. Randomized sketches for kernels: Fast and optimal nonparametric regression. The Annals of Statistics, 45(3):991–1023, 2017. 11 | 2017 | 258 |
6,739 | Acceleration and Averaging In Stochastic Descent Dynamics Walid Krichene Google, Inc. walidk@google.com Peter Bartlett U.C. Berkeley bartlett@cs.berkeley.edu Abstract We formulate and study a general family of (continuous-time) stochastic dynamics for accelerated first-order minimization of smooth convex functions. Building on an averaging formulation of accelerated mirror descent, we propose a stochastic variant in which the gradient is contaminated by noise, and study the resulting stochastic differential equation. We prove a bound on the rate of change of an energy function associated with the problem, then use it to derive estimates of convergence rates of the function values (almost surely and in expectation), both for persistent and asymptotically vanishing noise. We discuss the interaction between the parameters of the dynamics (learning rate and averaging rates) and the covariation of the noise process. In particular, we show how the asymptotic rate of covariation affects the choice of parameters and, ultimately, the convergence rate. 1 Introduction We consider the constrained convex minimization problem min x∈X f(x), where X is a closed, convex, compact subset of Rn, and f is a proper closed convex function, assumed to be differentiable with Lipschitz gradient, and we denote X ⋆⊂X the set of its minimizers. First-order methods play an important role in minimizing such functions, in particular in large-scale machine learning applications, in which the dimensionality (number of features) and size (number of samples) in typical datasets makes higher-order methods intractable. Many such algorithms can be viewed as a discretization of continuous-time dynamics. The simplest example is gradient descent, which can be viewed as the discretization of the gradient flow dynamics ˙x(t) = −∇f(x(t)), where ˙x(t) denotes the time derivative of a C1 trajectory x(t). An important generalization of gradient descent was developed by Nemirovsky and Yudin [1983], and termed mirror descent: it couples a dual variable z(t) and its “mirror” primal variable x(t). More specifically, the dynamics are given by MD ˙z(t) = −∇f(x(t)) x(t) = ∇ψ∗(z(t)), (1) where ∇ψ∗: Rn →X is a Lipschitz function defined on the entire dual space Rn, with values in the feasible set X; it is often referred to as a mirror map, and we will recall its definition and properties in Section 2. Mirror descent can be viewed as a generalization of projected gradient descent, where the Euclidean projection is replaced by the mirror map ∇ψ∗[Beck and Teboulle, 2003]. This makes it possible to adapt the choice of the mirror map to the geometry of the problem, leading to better dependence on the dimension n, see [Ben-Tal and Nemirovski, 2001], [Ben-Tal et al., 2001]. Continuous-time dynamics Although optimization methods are inherently discrete, the continuous-time point of view can help in their design and analysis, since it can leverage the 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. rich literature on dynamical systems, control theory, and mechanics, see [Helmke and Moore, 1994], [Bloch, 1994], and the references therein. Continuous-time models are also commonly used in financial applications, such as option pricing [Black and Scholes, 1973], even though the actions are taken in discrete time. In convex optimization, beyond simplifying the analysis, continuous-time models have also motivated new algorithms: mirror descent is one such example, since it was originally motivated in continuous time (Chapter 3 in [Nemirovsky and Yudin, 1983]). In a more recent line of work ([Su et al., 2014], [Krichene et al., 2015], [Wibisono et al., 2016]), Nesterov’s accelerated method [Nesterov, 1983] was shown to be the discretization of a second-order ordinary differential equation (ODE), which, in the unconstrained case, can be interpreted as a damped non-linear oscillator [Cabot et al., 2009, Attouch et al., 2015]. This motivated a restarting heuristic [O’Donoghue and Candès, 2015], which aims at further dissipating the energy. Krichene et al. [2015] generalized this ODE to mirror descent, and gave an averaging interpretation of accelerated dynamics by writing it as two coupled first-order ODEs. This is the starting point of this paper, in which we introduce and study a stochastic variant of accelerated mirror descent. Stochastic dynamics and related work The dynamics that we have discussed so far are deterministic first-order dynamics, since they use the exact gradient ∇f. However, in many machine learning applications, evaluating the exact gradient ∇f can be prohibitively expensive, e.g. in regularized empirical risk minimization problems, where the objective function f involves the sum of loss functions over a training set, of the form f(x) = 1 |I| P i∈I fi(x) + g(x), where I indexes the training samples, and g is a regularization function1. Instead of computing the exact gradient ∇f(x) = 1 |I| P i∈I ∇fi(x) + ∇g(x), a common approach is to compute an unbiased, stochastic estimate of the gradient, given by 1 |˜I| P i∈˜I ∇fi(x) + ∇g(x), where ˜I is a uniformly random subset of I, indexing a random batch of samples from the training set. This approach motivates the study of stochastic dynamics for convex optimization. But despite an extensive literature on stochastic gradient and mirror descent in discrete time, e.g. [Nemirovski et al., 2009], [Duchi et al., 2010], [Lan, 2012], [Johnson and Zhang, 2013], [Xiao and Zhang, 2014], and many others, few results are known for stochastic mirror descent in continuous-time. To the best of our knowledge, the only published results are by Raginsky and Bouvrie [2012] and Mertikopoulos and Staudigl [2016]. In its simplest form, the stochastic gradient dynamics can be described by the (underdamped) Langevin equation dX(t) = −∇f(X(t)) + σdB(t), where B(t) denotes a standard Wiener process (Brownian motion). It has a long history in optimization [Chiang et al., 1987], dating back to simulated annealing, and it is known to have a unique invariant measure with density proportional to the Gibbs distribution e−2f(x) σ (see, e.g., [Pavliotis, 2014]). Langevin dynamics have recently played an important role in the analysis of sampling methods [Dalalyan, 2017, Bubeck et al., 2015, Durmus and Moulines, 2016, Cheng and Bartlett, 2017, Eberle et al., 2017, Cheng et al., 2017], where f is taken to be proportional to the logarithm of a target density. It has also been used to derive convergence rates for smooth, non-convex optimization where the objective is dissipative [Raginsky et al., 2017]. For mirror descent dynamics, Raginsky and Bouvrie [2012] were the first to propose a stochastic variant of the mirror descent ODE (1), given by the SDE: SMD dZ(t) = −∇f(X(t)) + σdB(t) X(t) = ∇ψ∗(Z(t)), (2) where σ is a constant volatility. They argued that the function values f(X(t)) along sample trajectories do not converge to the minimum value of f due to the persistent noise, but the optimality gap is bounded by a quantity proportional to σ2. They also proposed a method to reduce the variance by simultaneously sampling multiple trajectories and linearly coupling them. Mertikopoulos and Staudigl [2016] extended the analysis in some important directions: they replaced the constant σ with a general volatility matrix σ(x, t) which can be space and time dependent, and studied two regimes: the small noise limit (σ(x, t) vanishes at a O(1/√log t) rate), in which case they prove almost sure convergence; and the persistent noise regime (σ(x, t) is uniformly bounded), in which case they define 1In statistical learning, one seeks to minimize the expected risk (with respect to the true, unknown data distribution). A common approach is to minimize the empirical risk (observed on a given training set) then bound the distance between empirical and expected risk. Here we only focus on the optimization part. 2 a rectified variant of SMD, obtained by replacing the second equation by X(t) = ∇ψ∗(Z(t)/s(t)), where 1/s(t) is a sensitivity parameter (intuitively, decreasing the sensitivity reduces the impact of accumulated noise). In particular, they prove that with s(t) = √ t, the expected function values converge at a O(1/ √ t) rate. While these recent results paint a broad picture of mirror descent dynamics, they leave many questions open: in particular, they do not provide estimates for convergence rates in the vanishing noise limit, which is an important regime in machine learning applications, since one can often control the variance of the gradient estimate, for example by gradually increasing the batch size, as done by Xiao and Zhang [2014]. Besides, they do not study accelerated dynamics, and the interaction between acceleration and noise remains unexplored in continuous time. Our contributions In this paper, we answer many of the questions left open in previous works. We formulate and study a family of stochastic accelerated mirror descent dynamics, and we characterize the interaction between its different parameters: the volatility of the noise, the (primal and dual) learning rates, and the sensitivity of the mirror map. More specifically: • In Theorem 1, we give sufficient conditions for almost sure convergence of solution trajectories to the set of minimizers X ⋆. In particular, we show that it is possible to guarantee almost sure convergence even when the volatility grows unbounded asymptotically. • In Theorem 2, we derive a bound on the expected function values. In particular, we can prove that in the vanishing noise regime, acceleration (with appropriate averaging) achieves a faster rate, see Corollary 2 and the discussion in Remark 3. • In Theorem 3, we provide estimates of sample trajectory convergence rates. The rest of the paper is organized as follows: We review the building blocks of our construction in Section 2, then formulate the stochastic dynamics in Section 3, and prove two instrumental lemmas. Section 4 is dedicated to the convergence results. We conclude with a brief discussion in Section 5. 2 Accelerated Mirror Descent Dynamics 2.1 Smooth mirror map We start by reviewing some definitions and preliminaries. Let (E, ∥· ∥), be a normed vector space, and (E∗, ∥· ∥∗) be its dual space equipped with the dual norm, and denote by ⟨x, z⟩the pairing between x ∈E, z ∈E∗. To simplify, both E and E∗can be identified with Rn, but we make the distinction for clarity. We say that a map F : E →E∗is Lipschitz continuous on X ⊂E with constant L if for all x, x′ ∈X, ∥F(x) −F(x′)∥∗≤L∥x −x′∥. Let ψ : E →R ∪{+∞} be a convex function with effective domain X (i.e. X = {x ∈E : ψ(x) < ∞}). Its convex conjugate ψ∗ is defined on E∗by ψ∗(z) = supx∈X ⟨z, x⟩−ψ(x). One can show that if ψ is strongly convex, then ψ∗is differentiable on all of E∗, and its gradient ∇ψ∗is a Lipschitz function that maps E∗to X (see the supplementary material). This map is often called a mirror map [Nemirovsky and Yudin, 1983]. To give a concrete example, take ψ to be the squared Euclidean norm, ψ(x) = 1 2∥x∥2 2. Then one can show ψ∗(z) = arg minx∈X ∥z −x∥2 2, and the mirror map reduces to the Euclidean projection on X. For additional examples, see e.g. Banerjee et al. [2005]. We make the following assumptions throughout the paper: Assumption 1. X is closed, convex and compact, the set of minimizers X ⋆is contained in the relative interior of X, ψ is non-negative (without loss of generality), ψ∗is twice differentiable with a Lipschitz gradient, and f is differentiable with a Lipschitz gradient. We denote by Lψ∗the Lipschitz constant of ∇ψ∗, and by Lf the Lipschitz constant of ∇f. 2.2 Averaging formulation of accelerated mirror descent We start from the averaging formulation of Krichene et al. [2015], and include a sensitivity parameter similar to Mertikopoulos and Staudigl [2016]. This results in the following ODE: AMDη,a,s ˙z(t) = −η(t)∇f(x(t)) ˙x(t) = a(t)(∇ψ∗(z(t)/s(t)) −x(t)), (3) 3 with initial conditions2 (x(t0), z(t0)) = (x0, z0). The ODE system is parameterized by the following functions, all assumed to be positive and continuous on [t0, ∞) (see Figure 1 for an illustration): • s(t) is a non-decreasing, inverse sensitivity parameter. As we will see, s(t) will be helpful in the stochastic case in scaling the noise term, in order to reduce its impact. • η(t) is a learning rate in the dual space. • a(t) is an averaging rate in the primal space. Indeed, the second ODE in (3) can be written in integral form as a weighted average of the mirror trajectory as follows: let w(t) = e R t t0 a(τ)dτ (equivalently, a(t) = ˙w(t) w(t)), then the ODE is equivalent to w(t) ˙x(t) + ˙w(t)x(t) = ˙w(t)∇ψ∗(z(t)/s(t)), and integrating and rearranging, x(t) = x(t0)w(t0) + R t t0 ˙w(τ)∇ψ∗(Z(τ)/s(τ))dτ w(t) . There are other, different ways of formulating the accelerated dynamics: instead of two first-order ODEs, one can write one second-order ODE (such as in Su et al. [2014], Wibisono et al. [2016]), which has interesting interpretations related to Lagrangian dynamics. The averaging formulation given in Equation (3) is better suited to our analysis. 2.3 Energy function The analysis of continuous-time dynamics often relies on a Lyapunov argument (in reference to Lyapunov [1892]): one starts by defining a non-negative energy function, then bounding its rate of change along solution trajectories. This bound can then be used to prove convergence to the set of minimizers X ⋆. We will consider a modified version of the energy function used in Krichene et al. [2016]: given a positive, C1 function r(t), and a pair of optimal primal-dual points (x⋆, z⋆) such that3 x⋆∈X ⋆and ∇ψ∗(z⋆) = x⋆, let L(x, z, t) = r(t)(f(x) −f(x⋆)) + s(t)Dψ⋆(z(t)/s(t), z⋆). (4) Here, Dψ∗is the Bregman divergence associated with ψ∗, defined by Dψ∗(z′, z) = ψ∗(z′) −ψ∗(z) −⟨∇ψ∗(z), z′ −z⟩, for all z, z′ ∈E∗. Then we can prove a bound on the time derivative of L along solution trajectories of AMDη,a,s, given in the following proposition. To keep the equations compact, we will occasionally omit explicit dependence on time, and write, e.g. η/r instead of η(t)/r(t). Lemma 1. Suppose that a = η/r. Then under AMDη,η/r,s, for all t ≥t0, d dtL(x(t), z(t), t) ≤(f(x(t)) −f(x⋆))( ˙r(t) −η(t)) + ψ(x⋆) ˙s(t). (5) Proof. We start by bounding the rate of change of the Bregman divergence term: d dts(t)Dψ∗(z(t)/s(t), z⋆) = ˙sDψ∗(z/s, z⋆) + s ∇ψ∗(z/s) −∇ψ∗(z⋆), ˙z/s −˙sz/s2 = ⟨∇ψ∗(z/s) −x⋆, ˙z⟩+ ˙s(Dψ∗(z/s, z⋆) −⟨∇ψ∗(z/s) −∇ψ∗(z⋆), z/s⟩) = ⟨∇ψ∗(z/s) −x⋆, ˙z⟩+ ˙s(ψ(x⋆) −ψ(∇ψ∗(z/s))) ≤⟨∇ψ∗(z/s) −x⋆, ˙z⟩+ ˙sψ(x⋆), where the third equality can be proved using the fact that ψ(x) + ψ∗(z) = ⟨x, z⟩⇔x ∈∂ψ∗(z) ⇔ z ∈∂ψ(x) (Theorem 23.5 in Rockafellar [1970]), and the last inequality follows from the assumption that s is non-decreasing, and that ψ is non-negative. Using this expression, we can then compute d dtL(x(t), z(t), t) ≤˙r(f(x) −f(x⋆)) + r ⟨∇f(x), ˙x⟩+ ⟨∇ψ∗(z/s) −x⋆, ˙z⟩+ ψ(x⋆) ˙s = ˙r(f(x) −f(x⋆)) + r ⟨∇f(x), ˙x⟩+ ⟨˙x/a + x −x⋆, −η∇f(x)⟩+ ψ(x⋆) ˙s ≤(f(x) −f(x⋆))( ˙r −η) + ⟨∇f(x), ˙x⟩(r −η/a) + ψ(x⋆) ˙s, 2The initial conditions typically satisfy ∇ψ∗(z0) = x0 which ensures that the trajectory starts with zero velocity, but this is not necessary in general. 3Such a z⋆exists whenever x⋆is in the relative interior of X (hence the condition X ⋆⊂relint X in Assumption 1). The analysis can be extended to minimizers that are on the relative boundary by replacing the Bregman divergence term in L by the Fenchel coupling defined by Mertikopoulos and Staudigl [2016]. 4 where we plugged in the expression of ˙z and ∇ψ∗(z/s) from AMDη,a,s in the second equality, and used convexity of f in the last inequality. The assumption a = η/r ensures that the middle term vanishes, which concludes the proof. As a consequence of the previous proposition, we can prove the following convergence rate: Corollary 1. Suppose that a = η/r and that η ≥˙r. Then under AMDη,η/r,s, for all t ≥t0 f(x(t)) −f(x⋆) ≤ψ(x⋆)(s(t) −s(t0)) + L(x0, z0, t0) r(t) . Proof. Starting from the bound (5), the first term is non-positive by the assumption that η ≥˙r. Integrating, we have L(x(t), z(t), t) −L(x0, z0, t0) ≤ψ(x⋆)(s(t) −s(t0)), thus, f(x(t) −f(x⋆)) ≤L(x(t), z(t), t) r(t) ≤ψ(x⋆)(s(t) −s(t0)) + L(x0, z0, t0) r(t) . Remark 1. Corollary 1 can be interpreted as follows: given a desired convergence rate r(t), one can choose parameters a, η, s that satisfy the conditions of the corollary (e.g. by first setting η = ˙r, then choosing a = η/r). This defines an ODE, the solutions of which are guaranteed to converge at the rate r(t). While the convergence rate can seemingly be arbitrary for continuous time dynamics, discretizing the ODE does not always preserve the convergence rate. Wibisono et al. [2016], Wilson et al. [2016] give sufficient conditions on the discretization scheme to preserve polynomial rates, for example, a first-order discretization can preserve quadratic rates, and a higher-order discretization (using cubic-regularized Newton updates) can preserve cubic rates. Remark 2. As a special case, one can recover Nesterov’s ODE by taking r(t) = t2, η(t) = βt, a(t) = β/t (i.e. w(t) = w(t0)(t/t0)β), and s(t) = 1 (see the supplement for additional details). It is worth observing that in this case, both the primal and dual rates η(t) and w(t) are increasing. A different choice of parameters leads to dynamics similar to Nesterov’s but with different weights. 3 Stochastic dynamics We now formulate the stochastic variant of accelerated mirror descent dynamics (SAMD). Intuitively, we would like to replace the gradient term ∇f(x) in AMDη,a,s by a noisy gradient. Writing the noisy dynamics as an Itô SDE [Øksendal, 2003], we consider the system SAMDη,a,s dZ(t) = −η(t)[∇f(X(t))dt + σ(X(t), t)dB(t)] dX(t) = a(t)[∇ψ∗(Z(t)/s(t)) −X(t)]dt, (6) with initial condition (X(t0), Z(t0)) = (x0, z0) (we assume deterministic initial conditions for simplicity). Here, B(t) ∈Rn is a standard Wiener process with respect to a given filtered probability space (Ω, F, {Ft}t≥t0, P), and σ : (x, t) 7→σ(x, t) ∈Rn×n is a volatility matrix assumed measurable and Lipschitz in x (uniformly in t), and continuous in t for all x. The drift term in SAMDη,a,s is identical to the deterministic case, and the volatility term −η(t)σ(X(t), t)dB(t) represents the noise in the gradient. In particular, we note that the learning rate η(t) multiplies σ(X(t), t)dB(t), to capture the fact that the gradient noise is scaled by the learning rate η. This formulation is fairly general, and does not assume, in particular, that the different components of the noise are independent, as we can see in the quadratic covariation of the dual process Z(t): d[Zi(t), Zj(t)] = η(t)2(σ(X(t), t)σ(X(t), t)T )i,jdt = η(t)2Σij(X(t), t)dt, (7) where we defined the infinitesimal covariance matrix Σ(x, t) = σ(x, t)σ(x, t)T ∈Rn×n. In our analysis, we will focus on different noise regimes, which can be characterized using4 σ2 ∗(t) = sup x∈X ∥Σ(x, t)∥i, (8) where ∥Σ∥i = sup∥z∥∗≤1 ∥Σz∥is the induced matrix norm. Since Σ(x, t) is Lipschitz in x and continuous in t, and X is compact, σ∗(t) is finite for all t, and continuous. Contrary to [Raginsky and Bouvrie, 2012, Mertikopoulos and Staudigl, 2016], we do not assume that σ∗(t) is uniformly bounded in t. We give an illustration of the stochastic dynamics in Figure 1 (see the supplement for details). 4In our model, we focus on the time dependence of the volatility. Note that in some settings, the variance of the gradient estimates scales with the squared norm of the gradient, see [Bottou et al., 2016] in the discrete case. Thus one can consider a model where σ(x, t) scales with ∥∇f(x)∥∗, which may lead to different rates. 5 X E∗ ∇ψ∗ Z(t) s(t) X(t) ∇ψ∗ Z(t) s(t) Figure 1: Illustration of the SAMD dynamics. The dual variable Z(t) cumulates gradients. It is scaled by the sensitivity 1/s(t) then mapped to the primal space via the mirror map, resulting in ∇ψ∗(Z/s) (dotted line). The primal variable is then a weighted average of the mirror trajectory. Existence and uniqueness First, we give the following existence and uniqueness result: Proposition 1. For all T > t0, SAMDη,a,s has a unique (up to redefinition on a P-null set) solution (X(t), Z(t)) continuous on [0, T], with the property that (X(t), Z(t)) is adapted to the filtration {Ft}, and R T t0 ∥X(t)∥2dt, R T t0 ∥Z(t)∥2 ∗dt have finite expectations. Proof. By assumption, ∇ψ∗and ∇f are Lipschitz continuous, thus the function (x, z) 7→ (−η(t)∇f(x), a(t)[∇ψ∗(z/s(t)) −x]) is Lipschitz on [t0, T] (since a, η, s are positive continuous). Additionally, the function x 7→σ(x, t) is also Lipschitz. Therefore, we can invoke the existence and uniqueness theroem for stochastic differential equations [Øksendal, 2003, Theorem 5.2.1]. Since T is arbitrary, we can conclude that there exists a unique continuous solution on [t0, ∞). Energy decay Next, in order to analyze the convergence properties of the solution trajectories (X(t), Z(t)), we will need to bound the time-derivative of the energy function L. Lemma 2. Suppose that the primal rate a = η/r, and let (X(t), Z(t)) be the unique solution to SAMDη,η/r,s. Then for all t ≥t0, dL(X(t), Z(t), t) ≤ (f(X(t)) −f(x⋆))( ˙r(t) −η(t)) + ψ(x⋆) ˙s(t) + nLψ∗ 2 η2(t)σ2 ∗(t) s(t) dt+⟨V (t), dB(t)⟩, where V (t) is the continuous process given by V (t) = −η(t)σ(X(t), t)T (∇ψ∗(Z(t)/s(t)) −∇ψ∗(z⋆)). (9) Proof. By definition of the energy function L, ∇xL(x, z, t) = r(t)∇f(x) and ∇zL(x, z, t) = ∇ψ∗(z/s(t)) −∇ψ∗(z⋆), which are Lipschitz continuous in (x, z) (uniformly in t on any bounded interval, since s, r are continuous positive functions of t). Thus by the Itô formula for functions with Lipschitz continuous gradients [Errami et al., 2002], we have dL = ∂tLdt + ⟨∇xL, dX⟩+ ⟨∇zL, dZ⟩+ 1 2 tr ησT ∇2 zzLση dt = ∂tLdt + ⟨∇xL, dX⟩+ ⟨∇zL, −η∇f(X)⟩dt + ⟨∇zL, −ησdB⟩+ η2 2 tr Σ∇2 zzL dt. The first three terms correspond exactly to the deterministic case, and we can bound them by (5) from Lemma 1. The last two terms are due to the stochastic noise, and consist of a volatility term −η ⟨∇zL(X, Z, t), σdB⟩= −η ⟨∇ψ∗(Z/s) −∇ψ∗(z⋆), σdB⟩= ⟨V, dB⟩, and the Itô correction term η2 2 tr Σ(X, t)∇2 zzL(X, Z, t) dt = η2 2s tr Σ(X, t)∇2ψ∗(Z/s) dt. 6 We can bound the last term using the fact that ∇ψ∗is, by assumption, Lψ∗-Lipschitz, and the definition (8) of σ∗: for all x ∈E, z ∈E∗, and t ≥t0, tr(Σ(x, t)∇2ψ∗(z)) ≤nLψ∗σ2 ∗(t). Combining the previous inequalities, we obtain the desired bound. Integrating the bound of Lemma 2 will allow us to bound changes in energy. This bound will involve the Itô martingale term R t t0 ⟨V (τ), dB(τ)⟩, and in order to control this term, we give, in the following lemma, an asymptotic envelope (a consequence of the law of the iterated logarithm). Lemma 3. Let b(t) = R t t0 η2(τ)σ2 ∗(τ)dτ. Then Z t t0 ⟨V (τ), dB(τ)⟩= O( p b(t) log log b(t)) a.s. as t →∞. (10) Proof. Let us denote the Itô martingale by V(t) = R t t0 ⟨V (τ), dB(τ)⟩= Pn i=1 R t t0 Vi(τ)dBi(τ), and its quadratic variation by β(t) = [V(t), V(t)]. By definition of V, we have dβ = n X i=1 n X j=1 ViVjd[Bi, Bj] = n X i=1 V 2 i dt = ⟨V, V ⟩dt. By the Dambis-Dubins-Schwartz time change theorem (e.g. Corollary 8.5.4 in [Øksendal, 2003]), there exists a Wiener process ˆB such that V(t) = ˆB(β(t)). (11) We now proceed to bound β(t). Using the expression (9) of V , we have ⟨V, V ⟩ = η2(t)∆T (t)Σ(X, t)∆(t), where ∆(t) = ∇ψ∗(Z(t)/s(t)) −∇ψ∗(z⋆). Since the mirror map has values in X and X is assumed compact, the diameter D = supx,x′∈X ∥x −x′∥is finite, and ∆(t) ≤D for all t. Thus, dβ(t) ≤D2η(t)2σ2 ∗(t)dt, and integrating, β(t) ≤D2b(t) a.s. (12) Since β(t) is a non-decreasing process, two cases are possible: if limt→∞β(t) is finite, then lim supt→∞|V(t)| is a.s. finite and the result follows immediately. If limt→∞β(t) = ∞, then lim sup t→∞ V(t) p b(t) log log b(t) ≤lim sup t→∞ ˆB(β(t)) q β(t) D2 log log β(t) D2 = D √ 2 a.s. where the inequality combines (11) and (12), and the equality is by the law of the iterated logarithm. 4 Convergence results Equipped with Lemma 2 and Lemma 3, which bound, respectively, the rate of change of the energy and the asymptotic growth of the martingale term, we are now ready to prove our convergence results. Theorem 1. Suppose that η(t)σ∗(t) = o(1/√log t), and that R t t0 η(τ)dτ dominates b(t) and p b(t) log log b(t) (where b(t) = R t t0 η2(τ)σ2 ∗(τ)dτ as defined in Lemma 3). Consider SAMD dynamics with r = s = 1. Let (X(t), Z(t)) be the unique continuous solution of SAMDη,η,1. Then lim t→∞f(X(t)) −f(x⋆) = 0 a.s. Proof sketch. We give a sketch of the proof here (the full argument is deferred to the supplement). i) The first step is to prove that under the conditions of the theorem, the continuous solution of SAMDη,η,1, (X(t), Z(t)), is an asymptotic pseudo trajectory (a notion defined and studied by Benaïm and Hirsch [1996] and Benaïm [1999]) of the deterministic flow AMDη,η,1. The rigorous definition is given in the supplementary material, but intuitively, this means that for large enough times, the sample paths of the process (X(t), Z(t)) get arbitrarily close to (x(t), z(t)), the solution trajectories of the deterministic dynamics. 7 ii) The second step is to show that under the deterministic flow, the energy L decreases enough for large enough times. iii) The third step is to prove that under the stochastic process, f(X(t)) cannot stay bounded away from f(x⋆) for all t. Note that under the conditions of the theorem, integrating the bound of Lemma 2, and using the asymptotic envelope of Lemma 3, gives L(X(t), Z(t), t)−L(x0, z0, t0) ≤− Z t t0 (f(X(τ))−f(x⋆))η(τ)dτ+O(b(t))+O( p b(t) log log b(t)), and if say f(X(t)) −f(x⋆) ≥c > 0 for all t, then the first term dominates the bound, and the energy would decrease to −∞, a contradiction. Combining these steps, we argue that f(X(t)) eventually becomes close to f(x⋆) by (iii), then stays close by virtue of (i) and (ii). The result of Theorem 1 makes it possible to guarantee almost sure convergence (albeit without guaranteeing a convergence rate) when the noise is persistent (σ∗(t) is constant, or even increasing). To give a concrete example, suppose σ∗(t) = O(tα) (with α < 1 2 but can be positive), and let η(t) = t−α−1 2 . Then η(t)σ∗(t) = O(t−1 2 ), R t t0 η(τ)dτ = Ω(t−α+ 1 2 ), b(t) = O(log t), and p b(t) log log b(t) = O(√log t log log log t), and the conditions of the theorem are satisfied. Therefore, with the appropriate choice of learning rate η(t) (and the corresponding averaging in the primal space given by a(t) = η(t)), one can guarantee almost sure convergence. Next, we derive explicit bounds on convergence rates. We start by bounding expected function values. Theorem 2. Suppose that a = η/r and η ≥˙r. Let (X(t), Z(t)) be the unique continuous solution to SAMDη,η/r,s. Then for all t ≥t0, E[f(X(t))] −f(x⋆) ≤ L(x0, z0, t0) + ψ(x⋆)(s(t) −s(t0)) + nLψ∗ 2 R t t0 η2(τ)σ2 ∗(τ) s(τ) dτ r(t) . Proof. Integrating the bound of Lemma 2, and using the fact that (f(X(t)) −f(x⋆))( ˙r −η) ≤0 by assumption on η, we have L(X(t), Z(t), t) −L(x0, z0, t0) ≤ψ(x⋆)(s(t) −s(t0)) + nLψ∗ 2 Z t t0 η2(τ)σ2 ∗(τ) s(τ) dτ + Z t t0 ⟨V (τ), dB(τ)⟩, (13) Taking expectations, the last term vanishes since it is an Itô martingale, and we conclude by observing that E[f(X(t))] −f(x⋆) ≤E[L(X(t), Z(t), t)]/r(t). To give a concrete example, suppose that σ∗(t) = O(tα) is given, and let r(t) = tβ and s(t) = tγ, β, γ > 0. To simplify, we will take η(t) = ˙r(t) = βtβ−1. Then the bound of Theorem 2 shows that E[f(X(t))] −f(x⋆) = O(tγ−β + tβ+2α−γ−1). To minimize the asymptotic rate, we can choose γ −β = β + 2α −γ −1, i.e. β + α −γ −1 2 = 0, and the resulting rate is O(tα−1 2 ). In particular, we have: Corollary 2. Suppose that σ∗(t) = O(tα), α < 1 2. Then with η(t) = (1 −α)t−α, a(t) = 1−α t , and s(t) = t 1 2 , we have E[f(X(t))] −f(x⋆) = O(tα−1 2 ). Remark 3. Corollary 2 can be interpreted as follows: Given a polynomial bound σ∗(t) = O(tα) on the volatility of the noise process, one can adapt the choice of primal and dual averaging rates (a(t) and η(t)), which leads to an O(tα−1 2 ) convergence rate. - In the persistent noise regime (α = 0), the dynamics use a constant η, and result in a O(1/ √ t) rate. This rate is similar to the rectified dynamics proposed by Mertikopoulos and Staudigl [2016], but while they show convergence of the ergodic average ˜X(t) = 1 t R t 0 X(τ)dτ, we can show convergence of the original process X(t) under acceleration. - In the vanishing noise regime (α < 0), we can take advantage of the decreasing volatility by making η(t) increasing. With the appropriate averaging rate a(t), this leads to the improved rate O(tα−1 2 ). It is worth observing here that when α ≥−1 2, the same rate can be obtained for the ergodic average, without acceleration: one can show that the rectified SMD with s(t) = tmax(0,α+ 1 2 ) achieves a O(tmax(α−1 2 ,−1)). However for α < −1 2, acceleration improves the rate from O(t−1) to O(tα−1 2 ). 8 - In the increasing noise regime (α > 0), as long as the volatility does not increase too fast (α < 1 2), one can still guarantee convergence by decreasing η(t) with the appropriate rate. Finally, we give an estimate of the asymptotic convergence rate along solution trajectories. Theorem 3. Suppose that a = η/r and η ≥˙r. Let (X(t), Z(t)) be the unique continuous solution to SAMDη,η/r,s. Then f(X(t)) −f(x⋆) = O s(t) + n R t t0 η2(τ)σ2 ∗(τ) s(τ) + p b(t) log log b(t) r(t) a.s. as t →∞, where b(t) = R t t0 η2(τ)σ2 ∗(τ)dτ. Proof. Integrating the bound of Lemma 2 once again, we get inequality (13), where we can bound the Itô martingale term R t t0 ⟨V (τ), dB(τ)⟩using Lemma 3. This concludes the proof. Comparing the last bound to that of Theorem 2, we have the additional p b(t) log log b(t)/r(t) term due to the envelope of the martingale term. This results in a slower a.s. convergence rate. Suppose again that σ∗(t) = O(tα), and that r(t) = tβ and η(t) = ˙r(t) = βtβ−1 to simplify. Then b(t) = R t t0 η2(τ)σ2 ∗(τ)dτ = O(t2β+2α−1), and the martingale term becomes O( p b(t) log log b(t)/r(t)) = O(tα−1 2 √log log t). Remarkably, the asymptotic rate of sample trajectories is, up to a √log log t factor, the same as the asymptotic rate in expectation; one should observe, however, that the constant in the O notation is trajectory-dependent. Corollary 3. Suppose that σ∗(t) = O(tα), α < 1 2. Then with η(t) = (1 −α)t−α, a(t) = 1−α t , and s(t) = t 1 2 , we have f(X(t)) −f(x⋆) = O(tα−1 2 √log log t) a.s. 5 Conclusion Starting from the averaging formulation of accelerated mirror descent in continuous-time, and motivated by stochastic optimization, we formulated a stochastic variant and studied the resulting SDE. We discussed the role played by each parameter: the dual learning rate η(t), the inverse sensitivity parameter s(t), and the noise covariation bound σ∗(t). Our results show that in the persistent noise regime, thanks to averaging, it is possible to guarantee a.s. convergence, remarkably even when σ∗(t) is increasing (as long as σ∗(t) = o( √ t)). In the vanishing noise regime, adapting the choice of η(t) to the rate of σ∗(t) (with the appropriate averaging) leads to improved convergence rates, e.g. to O(tα−1 2 ) in expectation and O(tα−1 2 √log log t) almost surely, when σ∗(t) = O(tα). These asymptotic bounds in continuous-time can provide guidelines in setting the different parameters of accelerated stochastic mirror descent. It is also worth observing that in the deterministic case, one can theoretically obtain arbitrarily fast convergence, through a time change as observed by Wibisono et al. [2016] – a time-change would simply result in using different weights η(t) and a(t); this can also be seen in Corollary 1, where the rate r(t) can be arbitrarily fast. In the stochastic dynamics, such a time-change would also lead to re-scaling the noise covariation, and does not lead to a faster rate. To some extent, adding the noise prevents us from “artificially” accelerating convergence using a simple time-change. Finally, we believe this continuous-time analysis can be extended in several directions. For instance, it will be interesting to carry out a similar analysis for strongly convex functions, for which we expect faster convergence rates. Acknowledgments We gratefully acknowledge the support of the NSF through grant IIS-1619362 and of the Australian Research Council through an Australian Laureate Fellowship (FL110100281) and through the Australian Research Council Centre of Excellence for Mathematical and Statistical Frontiers (ACEMS). We thank the anonymous reviewers for their insightful comments and suggestions. 9 References H. Attouch, J. Peypouquet, and P. Redont. Fast convergence of an inertial gradient-like system with vanishing viscosity. CoRR, abs/1507.04782, 2015. A. Banerjee, S. Merugu, I. S. Dhillon, and J. Ghosh. Clustering with Bregman divergences. J. Mach. Learn. Res., 6:1705–1749, Dec. 2005. A. Beck and M. Teboulle. Mirror descent and nonlinear projected subgradient methods for convex optimization. Oper. Res. Lett., 31(3):167–175, May 2003. A. Ben-Tal and A. Nemirovski. Lectures on Modern Convex Optimization. SIAM, 2001. A. Ben-Tal, T. Margalit, and A. Nemirovski. The ordered subsets mirror descent optimization method with applications to tomography. SIAM J. on Optimization, 12(1):79–108, Jan. 2001. M. Benaïm. Dynamics of stochastic approximation algorithms. In Séminaire de probabilités XXXIII, pages 1–68. Springer, 1999. M. Benaïm and M. W. Hirsch. Asymptotic pseudotrajectories and chain recurrent flows, with applications. Journal of Dynamics and Differential Equations, 8(1):141–176, 1996. F. Black and M. Scholes. The pricing of options and corporate liabilities. Journal of Political Economy, 81(3):637–654, 1973. A. Bloch, editor. Hamiltonian and gradient flows, algorithms, and control. American Mathematical Society, 1994. L. Bottou, F. E. Curtis, and J. Nocedal. Optimization methods for large-scale machine learning. CoRR, abs/1606.04838, 2016. S. Bubeck, R. Eldan, and J. Lehec. Finite-time analysis of projected Langevin Monte Carlo. In Advances in Neural Information Processing Systems (NIPS) 28, pages 1243–1251, 2015. A. Cabot, H. Engler, and S. Gadat. On the long time behavior of second order differential equations with asymptotically small dissipation. Transactions of the American Mathematical Society, 361: 5983–6017, 2009. X. Cheng and P. Bartlett. Convergence of Langevin MCMC in KL-divergence. CoRR, abs/1705.09048, 2017. X. Cheng, N. S. Chatterji, P. L. Bartlett, and M. I. Jordan. Underdamped Langevin MCMC: A non-asymptotic analysis. CoRR, abs/1707.03663, 2017. T.-S. Chiang, C.-R. Hwang, and S. J. Sheu. Diffusion for global optimization in Rn. SIAM Journal on Control and Optimization, 25(3):737–753, 1987. A. S. Dalalyan. Theoretical guarantees for approximate sampling from smooth and log-concave densities. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 79(3): 651–676, 2017. J. C. Duchi, A. Agarwal, M. Johansson, and M. Jordan. Ergodic mirror descent. SIAM Journal on Optimization (SIOPT), 22(4):1549–1578, 2010. A. Durmus and E. Moulines. Sampling from strongly log-concave distributions with the unadjusted Langevin algorithm. CoRR, 2016. A. Eberle, A. Guillin, and R. Zimmer. Quantitative contraction rates for Langevin dynamics. CoRR, 2017. M. Errami, F. Russo, and P. Vallois. Itô’s formula for C1,λ-functions of a càdlàg process and related calculus. Probability Theory and Related Fields, 122(2):191–221, 2002. U. Helmke and J. Moore. Optimization and dynamical systems. Communications and control engineering series. Springer-Verlag, 1994. 10 R. Johnson and T. Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In Proceedings of the 26th International Conference on Neural Information Processing Systems (NIPS), pages 315–323, 2013. W. Krichene, A. Bayen, and P. Bartlett. Accelerated mirror descent in continuous and discrete time. In NIPS, 2015. W. Krichene, A. Bayen, and P. Bartlett. Adaptive averaging in accelerated descent dynamics. In NIPS, 2016. G. Lan. An optimal method for stochastic composite optimization. Mathematical Programming, 133 (1):365–397, 2012. A. Lyapunov. General Problem of the Stability Of Motion. Doctoral thesis, 1892. P. Mertikopoulos and M. Staudigl. On the convergence of gradient-like flows with noisy gradient input. CoRR, abs/1611.06730, 2016. A. Nemirovski, A. Juditsky, G. Lan, and A. Shapiro. Robust stochastic approximation approach to stochastic programming. SIAM Journal on Optimization, 19(4):1574–1609, 2009. A. S. Nemirovsky and D. B. Yudin. Problem Complexity and Method Efficiency in Optimization. Wiley-Interscience series in discrete mathematics. Wiley, 1983. Y. Nesterov. A method of solving a convex programming problem with convergence rate o(1/k2). Soviet Mathematics Doklady, 27(2):372–376, 1983. B. O’Donoghue and E. Candès. Adaptive restart for accelerated gradient schemes. Foundations of Computational Mathematics, 15(3):715–732, 2015. ISSN 1615-3375. B. Øksendal. Stochastic Differential Equations: An Introduction with Applications. Hochschultext / Universitext. Springer, 2003. G. Pavliotis. Stochastic Processes and Applications: Diffusion Processes, the Fokker-Planck and Langevin Equations. Texts in Applied Mathematics. Springer New York, 2014. M. Raginsky and J. Bouvrie. Continuous-time stochastic mirror descent on a network: Variance reduction, consensus, convergence. In CDC 2012, pages 6793–6800, 2012. M. Raginsky, A. Rakhlin, and M. Telgarsky. Non-convex learning via stochastic gradient Langevin dynamics: a nonasymptotic analysis. CoRR, abs/1702.03849, 2017. R. Rockafellar. Convex Analysis. Princeton University Press, 1970. W. Su, S. Boyd, and E. Candès. A differential equation for modeling Nesterov’s accelerated gradient method: Theory and insights. In NIPS, 2014. A. Wibisono, A. C. Wilson, and M. I. Jordan. A variational perspective on accelerated methods in optimization. CoRR, abs/1603.04245, 2016. A. C. Wilson, B. Recht, and M. I. Jordan. A lyapunov analysis of momentum methods in optimization. CoRR, abs/1611.02635, 2016. L. Xiao and T. Zhang. A proximal stochastic gradient method with progressive variance reduction. SIAM Journal on Optimization, 24(4):2057–2075, 2014. 11 | 2017 | 259 |
6,740 | A New Theory for Matrix Completion Guangcan Liu∗ Qingshan Liu† Xiao-Tong Yuan‡ B-DAT, School of Information & Control, Nanjing Univ Informat Sci & Technol NO 219 Ningliu Road, Nanjing, Jiangsu, China, 210044 {gcliu,qsliu,xtyuan}@nuist.edu.cn Abstract Prevalent matrix completion theories reply on an assumption that the locations of the missing data are distributed uniformly and randomly (i.e., uniform sampling). Nevertheless, the reason for observations being missing often depends on the unseen observations themselves, and thus the missing data in practice usually occurs in a nonuniform and deterministic fashion rather than randomly. To break through the limits of random sampling, this paper introduces a new hypothesis called isomeric condition, which is provably weaker than the assumption of uniform sampling and arguably holds even when the missing data is placed irregularly. Equipped with this new tool, we prove a series of theorems for missing data recovery and matrix completion. In particular, we prove that the exact solutions that identify the target matrix are included as critical points by the commonly used nonconvex programs. Unlike the existing theories for nonconvex matrix completion, which are built upon the same condition as convex programs, our theory shows that nonconvex programs have the potential to work with a much weaker condition. Comparing to the existing studies on nonuniform sampling, our setup is more general. 1 Introduction Missing data is a common occurrence in modern applications such as computer vision and image processing, reducing significantly the representativeness of data samples and therefore distorting seriously the inferences about data. Given this pressing situation, it is crucial to study the problem of recovering the unseen data from a sampling of observations. Since the data in reality is often organized in matrix form, it is of considerable practical significance to study the well-known problem of matrix completion [1] which is to fill in the missing entries of a partially observed matrix. Problem 1.1 (Matrix Completion). Denote the (i, j)th entry of a matrix as [·]ij. Let L0 ∈Rm×n be an unknown matrix of interest. In particular, the rank of L0 is unknown either. Given a sampling of the entries in L0 and a 2D index set Ω⊆{1, 2, · · · , m} × {1, 2, · · · , n} consisting of the locations of the observed entries, i.e., given {[L0]ij|(i, j) ∈Ω} and Ω, can we restore the missing entries whose indices are not included in Ω, in an exact and scalable fashion? If so, under which conditions? Due to its unique role in a broad range of applications, e.g., structure from motion and magnetic resonance imaging, matrix completion has received extensive attentions in the literatures, e.g., [2–13]. ∗The work of Guangcan Liu is supported in part by national Natural Science Foundation of China (NSFC) under Grant 61622305 and Grant 61502238, in part by Natural Science Foundation of Jiangsu Province of China (NSFJPC) under Grant BK20160040. †The work of Qingshan Liu is supported by NSFC under Grant 61532009. ‡The work of Xiao-Tong Yuan is supported in part by NSFC under Grant 61402232 and Grant 61522308, in part by NSFJPC under Grant BK20141003. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Figure 1: Left and Middle: Typical configurations for the locations of the observed entries. Right: A real example from the Oxford motion database. The black areas correspond to the missing entries. In general, given no presumption about the nature of matrix entries, it is virtually impossible to restore L0 as the missing entries can be of arbitrary values. That is, some assumptions are necessary for solving Problem 1.1. Based on the high-dimensional and massive essence of today’s data-driven community, it is arguable that the target matrix L0 we wish to recover is often low rank [23]. Hence, one may perform matrix completion by seeking a matrix with the lowest rank that also satisfies the constraints given by the observed entries: min L rank (L) , s.t. [L]ij = [L0]ij, ∀(i, j) ∈Ω. (1) Unfortunately, this idea is of little practical because the problem above is NP-hard and cannot be solved in polynomial time [15]. To achieve practical matrix completion, Candès and Recht [4] suggested to consider an alternative that minimizes instead the nuclear norm which is a convex envelope of the rank function [12]. Namely, min L ∥L∥∗, s.t. [L]ij = [L0]ij, ∀(i, j) ∈Ω, (2) where ∥· ∥∗denotes the nuclear norm, i.e., the sum of the singular values of a matrix. Rather surprisingly, it is proved in [4] that the missing entries, with high probability, can be exactly restored by the convex program (2), as long as the target matrix L0 is low rank and incoherent and the set Ωof locations corresponding to the observed entries is a set sampled uniformly at random. This pioneering work provides people several useful tools to investigate matrix completion and many other related problems. Those assumptions, including low-rankness, incoherence and uniform sampling, are now standard and widely used in the literatures, e.g., [14, 17, 22, 24, 28, 33, 34, 36]. In particular, the analyses in [17, 33, 36] show that, in terms of theoretical completeness, many nonconvex optimization based methods are as powerful as the convex program (2). Unfortunately, these theories still depend on the assumption of uniform sampling, and thus they cannot explain why there are many nonconvex methods which often do better than the convex program (2) in practice. The missing data in practice, however, often occurs in a nonuniform and deterministic fashion instead of randomly. This is because the reason for an observation being missing usually depends on the unseen observations themselves. For example, in structure from motion and magnetic resonance imaging, typically the locations of the observed entries are concentrated around the main diagonal of a matrix4, as shown in Figure 1. Moreover, as pointed out by [19, 21, 23], the incoherence condition is indeed not so consistent with the mixture structure of multiple subspaces, which is also a ubiquitous phenomenon in practice. There has been sparse research in the direction of nonuniform sampling, e.g., [18, 25–27, 31]. In particular, Negahban and Wainwright [26] studied the case of weighted entrywise sampling, which is more general than the setup of uniform sampling but still a special form of random sampling. Király et al. [18] considered deterministic sampling and is most related to this work. However, they had only established conditions to decide whether a particular entry of the matrix can be restored. In other words, the setup of [18] may not handle well the dependence among the missing entries. In summary, matrix completion still starves for practical theories and methods, although has attained considerable improvements in these years. To break through the limits of the setup of random sampling, in this paper we introduce a new hypothesis called isomeric condition, which is a mixed concept that combines together the rank and coherence of L0 with the locations and amount of the observed entries. In general, isomerism (noun 4This statement means that the observed entries are concentrated around the main diagonal after a permutation of the sampling pattern Ω. 2 of isomeric) is a very mild hypothesis and only a little bit more strict than the well-known oracle assumption; that is, the number of observed entries in each row and column of L0 is not smaller than the rank of L0. It is arguable that the isomeric condition can hold even when the missing entries have irregular locations. In particular, it is provable that the widely used assumption of uniform sampling is sufficient to ensure isomerism, not necessary. Equipped with this new tool, isomerism, we prove a set of theorems pertaining to missing data recovery [35] and matrix completion. For example, we prove that, under the condition of isomerism, the exact solutions that identify the target matrix are included as critical points by the commonly used bilinear programs. This result helps to explain the widely observed phenomenon that there are many nonconvex methods performing better than the convex program (2) on real-world matrix completion tasks. In summary, the contributions of this paper mainly include: ⋄We invent a new hypothesis called isomeric condition, which provably holds given the standard assumptions of uniform sampling, low-rankness and incoherence. In addition, we also exemplify that the isomeric condition can hold even if the target matrix L0 is not incoherent and the missing entries are placed irregularly. Comparing to the existing studies about nonuniform sampling, our setup is more general. ⋄Equipped with the isomeric condition, we prove that the exact solutions that identify L0 are included as critical points by the commonly used bilinear programs. Comparing to the existing theories for nonconvex matrix completion, our theory is built upon a much weaker assumption and can therefore partially reveal the superiorities of nonconvex programs over the convex methods based on (2). ⋄We prove that the isomeric condition is sufficient and necessary for the column and row projectors of L0 to be invertible given the sampling pattern Ω. This result implies that the isomeric condition is necessary for ensuring that the minimal rank solution to (1) can identify the target L0. The rest of this paper is organized as follows. Section 2 summarizes the mathematical notations used in the paper. Section 3 introduces the proposed isomeric condition, along with some theorems for matrix completion. Section 4 shows some empirical results and Section 5 concludes this paper. The detailed proofs to all the proposed theorems are presented in the Supplementary Materials. 2 Notations Capital and lowercase letters are used to represent matrices and vectors, respectively, except that the lowercase letters, i, j, k, m, n, l, p, q, r, s and t, are used to denote some integers, e.g., the location of an observation, the rank of a matrix, etc. For a matrix M, [M]ij is its (i, j)th entry, [M]i,: is its ith row and [M]:,j is its jth column. Let ω1 and ω2 be two 1D index sets; namely, ω1 = {i1, i2, · · · , ik} and ω2 = {j1, j2, · · · , js}. Then [M]ω1,: denotes the submatrix of M obtained by selecting the rows with indices i1, i2, · · · , ik, [M]:,ω2 is the submatrix constructed by choosing the columns j1, j2, · · · , js, and similarly for [M]ω1,ω2. For a 2D index set Ω⊆{1, 2, · · · , m} × {1, 2, · · · , n}, we imagine it as a sparse matrix and, accordingly, define its “rows”, “columns” and “transpose” as follows: The ith row Ωi = {j1|(i1, j1) ∈Ω, i1 = i}, the jth column Ωj = {i1|(i1, j1) ∈Ω, j1 = j} and the transpose ΩT = {(j1, i1)|(i1, j1) ∈Ω}. The special symbol (·)+ is reserved to denote the Moore-Penrose pseudo-inverse of a matrix. More precisely, for a matrix M with Singular Value Decomposition (SVD)5 M = UMΣMV T M, its pseudoinverse is given by M + = VMΣ−1 M U T M. For convenience, we adopt the conventions of using span{M} to denote the linear space spanned by the columns of a matrix M, using y ∈span{M} to denote that a vector y belongs to the space span{M}, and using Y ∈span{M} to denote that all the column vectors of a matrix Y belong to span{M}. Capital letters U, V , Ωand their variants (complements, subscripts, etc.) are reserved for left singular vectors, right singular vectors and index set, respectively. For convenience, we shall abuse the notation U (resp. V ) to denote the linear space spanned by the columns of U (resp. V ), i.e., the column space (resp. row space). The orthogonal projection onto the column space U, is denoted by PU and given by PU(M) = UU T M, and similarly for the row space PV (M) = MV V T . The same 5In this paper, SVD always refers to skinny SVD. For a rank-r matrix M ∈Rm×n, its SVD is of the form UMΣMV T M, where UM ∈Rm×r, ΣM ∈Rr×r and VM ∈Rn×r. 3 notation is also used to represent a subspace of matrices (i.e., the image of an operator), e.g., we say that M ∈PU for any matrix M which satisfies PU(M) = M. We shall also abuse the notation Ω to denote the linear space of matrices supported on Ω. Then the symbol PΩdenotes the orthogonal projection onto Ω, namely, [PΩ(M)]ij = [M]ij, if (i, j) ∈Ω, 0, otherwise. Similarly, the symbol P⊥ Ωdenotes the orthogonal projection onto the complement space of Ω. That is, PΩ+ P⊥ Ω= I, where I is the identity operator. Three types of matrix norms are used in this paper, and they are all functions of the singular values: 1) The operator norm or 2-norm (i.e., largest singular value) denoted by ∥M∥, 2) the Frobenius norm (i.e., square root of the sum of squared singular values) denoted by ∥M∥F and 3) the nuclear norm or trace norm (i.e., sum of singular values) denoted by ∥M∥∗. The only used vector norm is the ℓ2 norm, which is denoted by ∥· ∥2. The symbol | · | is reserved for the cardinality of an index set. 3 Isomeric Condition and Matrix Completion This section introduces the proposed isomeric condition and a set of theorems for matrix completion. But most of the detailed proofs are deferred until the Supplementary Materials. 3.1 Isomeric Condition In general cases, as aforementioned, matrix completion is an ill-posed problem. Thus, some assumptions are necessary for studying Problem 1.1. To eliminate the disadvantages of the setup of random sampling, we define and investigate a so-called isomeric condition. 3.1.1 Definitions For the ease of understanding, we shall begin with a concept called k-isomerism (or k-isomeric in adjective form), which could be regarded as an extension of low-rankness. Definition 3.1 (k-isomeric). A matrix M ∈Rm×l is called k-isomeric if and only if any k rows of M can linearly represent all rows in M. That is, rank ([M]ω,:) = rank (M) , ∀ω ⊆{1, 2, · · · , m}, |ω| = k, where | · | is the cardinality of an index set. In general, k-isomerism is somewhat similar to Spark [37] which defines the smallest linearly dependent subset of the rows of a matrix. For a matrix M to be k-isomeric, it is necessary that rank (M) ≤k, not sufficient. In fact, k-isomerism is also somehow related to the concept of coherence [4, 21]. When the coherence of a matrix M ∈Rm×l is not too high, the rows of M will sufficiently spread, and thus M could be k-isomeric with a small k, e.g., k = rank (M). Whenever the coherence of M is very high, one may need a large k to satisfy the k-isomeric property. For example, consider an extreme case where M is a rank-1 matrix with one row being 1 and everywhere else being 0. In this case, we need k = m to ensure that M is k-isomeric. While Definition 3.1 involves all 1D index sets of cardinality k, we often need the isomeric property to be associated with a certain 2D index set Ω. To this end, we define below a concept called Ω-isomerism (or Ω-isomeric in adjective form). Definition 3.2 (Ω-isomeric). Let M ∈Rm×l and Ω⊆{1, 2, · · · , m} × {1, 2, · · · , n}. Suppose that Ωj ̸= ∅(empty set), ∀1 ≤j ≤n. Then the matrix M is called Ω-isomeric if and only if rank [M]Ωj,: = rank (M) , ∀j = 1, 2, · · · , n. Note here that only the number of rows in M is required to coincide with the row indices included in Ω, and thereby l ̸= n is allowable. Generally, Ω-isomerism is less strict than k-isomerism. Provided that |Ωj| ≥k, ∀1 ≤j ≤n, a matrix M is k-isomeric ensures that M is Ω-isomeric as well, but not vice versa. For the extreme example where M is nonzero at only one row, interestingly, M can be Ω-isomeric as long as the locations of the nonzero elements are included in Ω. With the notation of ΩT = {(j1, i1)|(i1, j1) ∈Ω}, the isomeric property could be also defined on the column vectors of a matrix, as shown in the following definition. 4 Definition 3.3 (Ω/ΩT -isomeric). Let M ∈Rm×n and Ω⊆{1, 2, · · · , m}×{1, 2, · · · , n}. Suppose Ωi ̸= ∅and Ωj ̸= ∅, ∀i = 1, · · · , m, j = 1, · · · , n. Then the matrix M is called Ω/ΩT -isomeric if and only if M is Ω-isomeric and M T is ΩT -isomeric as well. To solve Problem 1.1 without the imperfect assumption of missing at random, as will be shown later, we need to assume that L0 is Ω/ΩT -isomeric. This condition has excluded the unidentifiable cases where any rows or columns of L0 are wholly missing. In fact, whenever L0 is Ω/ΩT -isomeric, the number of observed entries in each row and column of L0 has to be greater than or equal to the rank of L0; this is consistent with the results in [20]. Moreover, Ω/ΩT -isomerism has actually well treated the cases where L0 is of high coherence. For example, consider an extreme case where L0 is 1 at only one element and 0 everywhere else. In this case, L0 cannot be Ω/ΩT -isomeric unless the nonzero element is observed. So, generally, it is possible to restore the missing entries of a highly coherent matrix, as long as the Ω/ΩT -isomeric condition is obeyed. 3.1.2 Basic Properties While its definitions are associated with a certain matrix, the isomeric condition is actually characterizing some properties of a space, as shown in the lemma below. Lemma 3.1. Let L0 ∈Rm×n and Ω⊆{1, 2, · · · , m} × {1, 2, · · · , n}. Denote the SVD of L0 as U0Σ0V T 0 . Then we have: 1. L0 is Ω-isomeric if and only if U0 is Ω-isomeric. 2. LT 0 is ΩT -isomeric if and only if V0 is ΩT -isomeric. Proof. It could be manipulated that [L0]Ωj,: = ([U0]Ωj,:)Σ0V T 0 , ∀j = 1, · · · , n. Since Σ0V T 0 is row-wisely full rank, we have rank [L0]Ωj,: = rank [U0]Ωj,: , ∀j = 1, · · · , n. As a result, L0 is Ω-isomeric is equivalent to U0 is Ω-isomeric. In a similar way, the second claim is proved as well. It is easy to see that the above lemma is still valid even when the condition of Ω-isomerism is replaced by k-isomerism. Thus, hereafter, we may say that a space is isomeric (k-isomeric, Ω-isomeric or ΩT -isomeric) as long as its basis matrix is isomeric. In addition, the isomeric property is subspace successive, as shown in the next lemma. Lemma 3.2. Let Ω⊆{1, 2, · · · , m} × {1, 2, · · · , n} and U0 ∈Rm×r be the basis matrix of a Euclidean subspace embedded in Rm. Suppose that U is a subspace of U0, i.e., U = U0U T 0 U. If U0 is Ω-isomeric then U is Ω-isomeric as well. Proof. By U = U0U T 0 U and U0 is Ω-isomeric, rank [U]Ωj,: = rank ([U0]Ωj,:)U T 0 U = rank U T 0 U = rank U0U T 0 U = rank (U) , ∀1 ≤j ≤n. The above lemma states that, in one word, the subspace of an isomeric space is isomeric. 3.1.3 Important Properties As aforementioned, the isometric condition is actually necessary for ensuring that the minimal rank solution to (1) can identify L0. To see why, let’s assume that U0 ∩Ω⊥̸= {0}, where we denote by U0Σ0V T 0 the SVD of L0. Then one could construct a nonzero perturbation, denoted as ∆∈U0 ∩Ω⊥, and accordingly, obtain a feasible solution ˜L0 = L0 + ∆to the problem in (1). Since ∆∈U0, we have rank(˜L0) ≤rank (L0). Even more, it is entirely possible that rank(˜L0) < rank (L0). Such a case is unidentifiable in nature, as the global optimum to problem (1) cannot identify L0. Thus, 5 to ensure that the global minimum to (1) can identify L0, it is essentially necessary to show that U0 ∩Ω⊥= {0} (resp. V0 ∩Ω⊥= {0}), which is equivalent to the operator PU0PΩPU0 (resp. PV0PΩPV0) is invertible (see Lemma 6.8 of the Supplementary Materials). Interestingly, the isomeric condition is indeed a sufficient and necessary condition for the operators PU0PΩPU0 and PV0PΩPV0 to be invertible, as shown in the following theorem. Theorem 3.1. Let L0 ∈Rm×n and Ω⊆{1, 2, · · · , m} × {1, 2, · · · , n}. Let the SVD of L0 be U0Σ0V T 0 . Denote PU0(·) = U0U T 0 (·) and PV0(·) = (·)V0V T 0 . Then we have the following: 1. The linear operator PU0PΩPU0 is invertible if and only if U0 is Ω-isomeric. 2. The linear operator PV0PΩPV0 is invertible if and only if V0 is ΩT -isomeric. The necessity stated above implies that the isomeric condition is actually a very mild hypothesis. In general, there are numerous reasons for the target matrix L0 to be isomeric. Particularly, the widely used assumptions of low-rankness, incoherence and uniform sampling are indeed sufficient (but not necessary) to ensure isomerism, as shown in the following theorem. Theorem 3.2. Let L0 ∈Rm×n and Ω⊆{1, 2, · · · , m} × {1, 2, · · · , n}. Denote n1 = max(m, n) and n2 = min(m, n). Suppose that L0 is incoherent and Ωis a 2D index set sampled uniformly at random, namely Pr((i, j) ∈Ω) = ρ0 and Pr((i, j) /∈Ω) = 1 −ρ0. For any δ > 0, if ρ0 > δ is obeyed and rank (L0) < δn2/(c log n1) holds for some numerical constant c then, with high probability at least 1 −n−10 1 , L0 is Ω/ΩT -isomeric. It is worth noting that the isomeric condition can be obeyed in numerous circumstances other than the case of uniform sampling plus incoherence. For example, Ω= {(1, 1), (1, 2), (1, 3), (2, 1), (3, 1)} and L0 = " 1 0 0 0 0 0 0 0 0 # , where L0 is a 3×3 matrix with 1 at (1, 1) and 0 everywhere else. In this example, L0 is not incoherent and the sampling is not uniform either, but it could be verified that L0 is Ω/ΩT -isomeric. 3.2 Results In this subsection, we shall show how the isomeric condition can take effect in the context of nonuniform sampling, establishing some theorems pertaining to missing data recovery [35] as well as matrix completion. 3.2.1 Missing Data Recovery Before exploring the matrix completion problem, for the ease of understanding, we would like to consider a missing data recovery problem studied by Zhang [35], which could be described as follows: Let y0 ∈Rm be a data vector drawn form some low-dimensional subspace, denoted as y0 ∈S0 ⊂Rm. Suppose that y0 contains some available observations in yb ∈Rk and some missing entries in yu ∈Rm−k. Namely, after a permutation, y0 = yb yu , yb ∈Rk, yu ∈Rm−k. (3) Given the observations in yb, we seek to restore the unseen entries in yu. To do this, we consider the prevalent idea that represents a data vector as a linear combination of the bases in a given dictionary: y0 = Ax0, (4) where A ∈Rm×p is a dictionary constructed in advance and x0 ∈Rp is the representation of y0. Utilizing the same permutation used in (3), we can partition the rows of A into two parts according to the indices of the observed and missing entries, respectively: A = Ab Au , Ab ∈Rk×p, Au ∈R(m−k)×p. (5) In this way, the equation in (4) gives that yb = Abx0 and yu = Aux0. 6 As we now can see, the unseen data yu could be restored, as long as the representation x0 is retrieved by only accessing the available observations in yb. In general cases, there are infinitely many representations that satisfy y0 = Ax0, e.g., x0 = A+y0, where (·)+ is the pseudo-inverse of a matrix. Since A+y0 is the representation of minimal ℓ2 norm, we revisit the traditional ℓ2 program: min x 1 2 ∥x∥2 2 , s.t. yb = Abx, (6) where ∥· ∥2 is the ℓ2 norm of a vector. Under some verifiable conditions, the above ℓ2 program is indeed consistently successful in a sense as in the following: For any y0 ∈S0 with an arbitrary partition y0 = [yb; yu] (i.e., arbitrarily missing), the desired representation x0 = A+y0 is the unique minimizer to the problem in (6). That is, the unseen data yu is exactly recovered by firstly computing the minimizer x∗to problem (6) and then calculating yu = Aux∗. Theorem 3.3. Let y0 = [yb; yu] ∈Rm be an authentic sample drawn from some low-dimensional subspace S0 embedded in Rm, A ∈Rm×p be a given dictionary and k be the number of available observations in yb. Then the convex program (6) is consistently successful, provided that S0 ⊆ span{A} and the dictionary A is k-isomeric. Unlike the theory in [35], the condition of which is unverifiable, our k-isomeric condition could be verified in finite time. Notice, that the problem of missing data recovery is closely related to matrix completion, which is actually to restore the missing entries in multiple data vectors simultaneously. Hence, Theorem 3.3 can be naturally generalized to the case of matrix completion, as will be shown in the next subsection. 3.2.2 Matrix Completion The spirits of the ℓ2 program (6) can be easily transferred to the case of matrix completion. Following (6), one may consider Frobenius norm minimization for matrix completion: min X 1 2 ∥X∥2 F , s.t. PΩ(AX −L0) = 0, (7) where A ∈Rm×p is a dictionary assumed to be given. As one can see, the problem in (7) is equivalent to (6) if L0 is consisting of only one column vector. The same as (6), the convex program (7) can also exactly recover the desired representation matrix A+L0, as shown in the theorem below. The difference is that we here require Ω-isomerism instead of k-isomerism. Theorem 3.4. Let L0 ∈Rm×n and Ω⊆{1, 2, · · · , m} × {1, 2, · · · , n}. Suppose that A ∈Rm×p is a given dictionary. Provided that L0 ∈span{A} and A is Ω-isomeric, the desired representation X0 = A+L0 is the unique minimizer to the problem in (7). Theorem 3.4 tells us that, in general, even when the locations of the missing entries are interrelated and nonuniformly distributed, the target matrix L0 can be restored as long as we have found a proper dictionary A. This motivates us to consider the commonly used bilinear program that seeks both A and X simultaneously: min A,X 1 2 ∥A∥2 F + 1 2 ∥X∥2 F , s.t. PΩ(AX −L0) = 0, (8) where A ∈Rm×p and X ∈Rp×n. The problem above is bilinear and therefore nonconvex. So, it would be hard to obtain a strong performance guarantee as done in the convex programs, e.g., [4, 21]. Interestingly, under a very mild condition, the problem in (8) is proved to include the exact solutions that identify the target matrix L0 as the critical points. Theorem 3.5. Let L0 ∈Rm×n and Ω⊆{1, 2, · · · , m} × {1, 2, · · · , n}. Denote the rank and SVD of L0 as r0 and U0Σ0V T 0 , respectively. If L0 is Ω/ΩT -isomeric then the exact solution, denoted by (A0, X0) and given by A0 = U0Σ 1 2 0 QT , X0 = QΣ 1 2 0 V T 0 , ∀Q ∈Rp×r0, QT Q = I, is a critical point to the problem in (8). To exhibit the power of program (8), however, the parameter p, which indicates the number of columns in the dictionary matrix A, must be close to the true rank of the target matrix L0. This is 7 convex (nonuniform) rank(L0) observed entries (%) 1 15 35 55 75 95 95 75 55 35 15 1 nonconvex (nonuniform) rank(L0) 1 15 35 55 75 95 95 75 55 35 15 1 convex (uniform) rank(L0) 1 15 35 55 75 95 95 75 55 35 15 1 nonconvex (uniform) rank(L0) 1 15 35 55 75 95 95 75 55 35 15 1 Figure 2: Comparing the bilinear program (9) (p = m) with the convex method (2). The numbers plotted on the above figures are the success rates within 20 random trials. The white and black points mean “succeed” and “fail”, respectively. Here the success is in a sense that PSNR ≥40dB, where PSNR standing for peak signal-to-noise ratio. impractical in the cases where the rank of L0 is unknown. Notice, that the Ω-isomeric condition imposed on A requires rank (A) ≤|Ωj|, ∀j = 1, 2, · · · , n. This, together with the condition of L0 ∈span{A}, essentially need us to solve a low rank matrix recovery problem [14]. Hence, we suggest to combine the formulation (7) with the popular idea of nuclear norm minimization, resulting in a bilinear program that jointly estimates both the dictionary matrix A and the representation matrix X by min A,X ∥A∥∗+ 1 2 ∥X∥2 F , s.t. PΩ(AX −L0) = 0, (9) which, by coincidence, has been mentioned in a paper about optimization [32]. Similar to (8), the program in (9) has the following theorem to guarantee its performance. Theorem 3.6. Let L0 ∈Rm×n and Ω⊆{1, 2, · · · , m} × {1, 2, · · · , n}. Denote the rank and SVD of L0 as r0 and U0Σ0V T 0 , respectively. If L0 is Ω/ΩT -isomeric then the exact solution, denoted by (A0, X0) and given by A0 = U0Σ 2 3 0 QT , X0 = QΣ 1 3 0 V T 0 , ∀Q ∈Rp×r0, QT Q = I, is a critical point to the problem in (9). Unlike (8), which possesses superior performance only if p is close to rank (L0) and the initial solution is chosen carefully, the bilinear program in (9) can work well by simply choosing p = m and using A = I as the initial solution. To see why, one essentially needs to figure out the conditions under which a specific optimization procedure can produce an optimal solution that meets an exact solution. This requires extensive justifications and we leave it as future work. 4 Simulations To verify the superiorities of the nonconvex matrix completion methods over the convex program (2), we would like to experiment with randomly generated matrices. We generate a collection of m × n (m = n = 100) target matrices according to the model of L0 = BC, where B ∈Rm×r0 and C ∈Rr0×n are N(0, 1) matrices. The rank of L0, i.e., r0, is configured as r0 = 1, 5, 10, · · · , 90, 95. Regarding the index set Ωconsisting of the locations of the observed entries, we consider two settings: One is to create Ωby using a Bernoulli model to randomly sample a subset from {1, · · · , m} × {1, · · · , n} (referred to as “uniform”), the other is as in Figure 1 that makes the locations of the observed entries be concentrated around the main diagonal of a matrix (referred to as “nonuniform”). The observation fraction is set to be |Ω|/(mn) = 0.01, 0.05, · · · , 0.9, 0.95. For each pair of (r0, |Ω|/(mn)), we run 20 trials, resulting in 8000 simulations in total. When p = m and the identity matrix is used to initialize the dictionary A, we have empirically found that program (8) has the same performance as (2). This is not strange, because it has been proven in [16] that ∥L∥∗= minA,X 1 2(∥A∥2 F + ∥X∥2 F ), s.t. L = AX. Figure 2 compares the bilinear 8 program (9) to the convex method (2). It can be seen that (9) works distinctly better than (2). Namely, while handling the nonuniformly missing data, the number of matrices successfully restored by the bilinear program (9) is 102% more than the convex program (2). Even for dealing with the missing entries chosen uniformly at random, in terms of the number of successfully restored matrices, the bilinear program (9) can still outperform the convex method (2) by 44%. These results illustrate that, even in the cases where the rank of L0 is unknown, the bilinear program (9) can do much better than the convex optimization based method (2). 5 Conclusion and Future Work This work studied the problem of matrix completion with nonuniform sampling, a significant setting not extensively studied before. To figure out the conditions under which exact recovery is possible, we proposed a so-called isomeric condition, which provably holds when the standard assumptions of low-rankness, incoherence and uniform sampling arise. In addition, we also exemplified that the isomeric condition can be obeyed in the other cases beyond the setting of uniform sampling. Even more, our theory implies that the isomeric condition is indeed necessary for making sure that the minimal rank completion can identify the target matrix L0. Equipped with the isomeric condition, finally, we mathematically proved that the widely used bilinear programs can include the exact solutions that recover the target matrix L0 as the critical points; this guarantees the recovery performance of bilinear programs to some extend. However, there still remain several problems for future work. In particular, it is unknown under which conditions a specific optimization procedure for (9) can produce an optimal solution that exactly restores the target matrix L0. To do this, one needs to analyze the convergence property as well as the recovery performance. Moreover, it is unknown either whether the isomeric condition suffices for ensuring that the minimal rank completion can identify the target L0. These require extensive justifications and we leave them as future work. Acknowledgment We would like to thanks the anonymous reviewers and meta-reviewers for providing us many valuable comments to refine this paper. References [1] Emmanuel Candès and Terence Tao. The power of convex relaxation: Near-optimal matrix completion. IEEE Transactions on Information Theory, 56(5):2053–2080, 2009. [2] Emmanuel Candès and Yaniv Plan. Matrix completion with noise. In IEEE Proceeding, volume 98, pages 925–936, 2010. [3] William E. Bishop and Byron M. Yu. Deterministic symmetric positive semidefinite matrix completion. In Neural Information Processing Systems, pages 2762–2770, 2014. [4] Emmanuel Candès and Benjamin Recht. Exact matrix completion via convex optimization. Foundations of Computational Mathematics, 9(6):717–772, 2009. [5] Eyal Heiman, Gideon Schechtman, and Adi Shraibman. Deterministic algorithms for matrix completion. Random Structures and Algorithms, 45(2):306–317, 2014. [6] Raghunandan H. Keshavan, Andrea Montanari, and Sewoong Oh. Matrix completion from a few entries. IEEE Transactions on Information Theory, 56(6):2980–2998, 2010. [7] Raghunandan H. Keshavan, Andrea Montanari, and Sewoong Oh. Matrix completion from noisy entries. Journal of Machine Learning Research, 11:2057–2078, 2010. [8] Akshay Krishnamurthy and Aarti Singh. Low-rank matrix and tensor completion via adaptive sampling. In Neural Information Processing Systems, pages 836–844, 2013. [9] Troy Lee and Adi Shraibman. Matrix completion from any given set of observations. In Neural Information Processing Systems, pages 1781–1787, 2013. [10] Rahul Mazumder, Trevor Hastie, and Robert Tibshirani. Spectral regularization algorithms for learning large incomplete matrices. Journal of Machine Learning Research, 11:2287–2322, 2010. [11] Karthik Mohan and Maryam Fazel. New restricted isometry results for noisy low-rank recovery. In IEEE International Symposium on Information Theory, pages 1573–1577, 2010. 9 [12] B. Recht, W. Xu, and B. Hassibi. Necessary and sufficient conditions for success of the nuclear norm heuristic for rank minimization. Technical report, CalTech, 2008. [13] Markus Weimer, Alexandros Karatzoglou, Quoc V. Le, and Alex J. Smola. Cofirank - maximum margin matrix factorization for collaborative ranking. In Neural Information Processing Systems, 2007. [14] Emmanuel J. Candès, Xiaodong Li, Yi Ma, and John Wright. Robust principal component analysis? Journal of the ACM, 58(3):1–37, 2011. [15] Alexander L. Chistov and Dima Grigoriev. Complexity of quantifier elimination in the theory of algebraically closed fields. In Proceedings of the Mathematical Foundations of Computer Science, pages 17–31, 1984. [16] Maryam Fazel, Haitham Hindi, and Stephen P. Boyd. A rank minimization heuristic with application to minimum order system approximation. In American Control Conference, pages 4734–4739, 2001. [17] Rong Ge, Jason D. Lee, and Tengyu Ma. Matrix completion has no spurious local minimum. In Neural Information Processing Systems, pages 2973–2981, 2016. [18] Franz J. Király, Louis Theran, and Ryota Tomioka. The algebraic combinatorial approach for low-rank matrix completion. J. Mach. Learn. Res., 16(1):1391–1436, January 2015. [19] Guangcan Liu and Ping Li. Recovery of coherent data via low-rank dictionary pursuit. In Neural Information Processing Systems, pages 1206–1214, 2014. [20] Daniel L. Pimentel-Alarcón and Robert D. Nowak. The Information-theoretic requirements of subspace clustering with missing data. In International Conference on Machine Learning, 48:802–810, 2016. [21] Guangcan Liu and Ping Li. Low-rank matrix completion in the presence of high coherence. IEEE Transactions on Signal Processing, 64(21):5623–5633, 2016. [22] Guangcan Liu, Zhouchen Lin, Shuicheng Yan, Ju Sun, Yong Yu, and Yi Ma. Robust recovery of subspace structures by low-rank representation. IEEE Transactions on Pattern Recognition and Machine Intelligence, 35(1):171–184, 2013. [23] Guangcan Liu, Qingshan Liu, and Ping Li. Blessing of dimensionality: Recovering mixture data via dictionary pursuit. IEEE Transactions on Pattern Recognition and Machine Intelligence, 39(1):47–60, 2017. [24] Guangcan Liu, Huan Xu, Jinhui Tang, Qingshan Liu, and Shuicheng Yan. A deterministic analysis for LRR. IEEE Transactions on Pattern Recognition and Machine Intelligence, 38(3):417–430, 2016. [25] Raghu Meka, Prateek Jain, and Inderjit S. Dhillon. Matrix completion from power-law distributed samples. In Neural Information Processing Systems, pages 1258–1266, 2009. [26] Sahand Negahban and Martin J. Wainwright. Restricted strong convexity and weighted matrix completion: Optimal bounds with noise. Journal of Machine Learning Research, 13:1665–1697, 2012. [27] Yudong Chen, Srinadh Bhojanapalli, Sujay Sanghavi, and Rachel Ward. Completing any low-rank matrix, provably. Journal of Machine Learning Research, 16: 2999-3034, 2015. [28] Praneeth Netrapalli, U. N. Niranjan, Sujay Sanghavi, Animashree Anandkumar, and Prateek Jain. Nonconvex robust PCA. In Neural Information Processing Systems, pages 1107–1115, 2014. [29] Yuzhao Ni, Ju Sun, Xiaotong Yuan, Shuicheng Yan, and Loong-Fah Cheong. Robust low-rank subspace segmentation with semidefinite guarantees. In International Conference on Data Mining Workshops, pages 1179–1188, 2013. [30] R. Rockafellar. Convex Analysis. Princeton University Press, Princeton, NJ, USA, 1970. [31] Ruslan Salakhutdinov and Nathan Srebro. Collaborative filtering in a non-uniform world: Learning with the weighted trace norm. In Neural Information Processing Systems, pages 2056–2064, 2010. [32] Fanhua Shang, Yuanyuan Liu, and James Cheng. Scalable algorithms for tractable schatten quasi-norm minimization. In AAAI Conference on Artificial Intelligence, pages 2016–2022, 2016. [33] Ruoyu Sun and Zhi-Quan Luo. Guaranteed matrix completion via non-convex factorization. IEEE Transactions on Information Theory, 62(11):6535–6579, 2016. [34] Huan Xu, Constantine Caramanis, and Sujay Sanghavi. Robust PCA via outlier pursuit. IEEE Transactions on Information Theory, 58(5):3047–3064, 2012. [35] Yin Zhang. When is missing data recoverable? CAAM Technical Report TR06-15, 2006. [36] Tuo Zhao, Zhaoran Wang, and Han Liu. A nonconvex optimization framework for low rank matrix estimation. In Neural Information Processing Systems, pages 559–567, 2015. [37] David L. Donoho and Michael Elad. Optimally sparse representation in general (nonorthogonal) dictionaries via ℓ1 minimization. Proceedings of the National Academy of Sciences, 100(5): 2197-2202, 2003. 10 | 2017 | 26 |
6,741 | LightGBM: A Highly Efficient Gradient Boosting Decision Tree Guolin Ke1, Qi Meng2, Thomas Finley3, Taifeng Wang1, Wei Chen1, Weidong Ma1, Qiwei Ye1, Tie-Yan Liu1 1Microsoft Research 2Peking University 3 Microsoft Redmond 1{guolin.ke, taifengw, wche, weima, qiwye, tie-yan.liu}@microsoft.com; 2qimeng13@pku.edu.cn; 3tfinely@microsoft.com; Abstract Gradient Boosting Decision Tree (GBDT) is a popular machine learning algorithm, and has quite a few effective implementations such as XGBoost and pGBRT. Although many engineering optimizations have been adopted in these implementations, the efficiency and scalability are still unsatisfactory when the feature dimension is high and data size is large. A major reason is that for each feature, they need to scan all the data instances to estimate the information gain of all possible split points, which is very time consuming. To tackle this problem, we propose two novel techniques: Gradient-based One-Side Sampling (GOSS) and Exclusive Feature Bundling (EFB). With GOSS, we exclude a significant proportion of data instances with small gradients, and only use the rest to estimate the information gain. We prove that, since the data instances with larger gradients play a more important role in the computation of information gain, GOSS can obtain quite accurate estimation of the information gain with a much smaller data size. With EFB, we bundle mutually exclusive features (i.e., they rarely take nonzero values simultaneously), to reduce the number of features. We prove that finding the optimal bundling of exclusive features is NP-hard, but a greedy algorithm can achieve quite good approximation ratio (and thus can effectively reduce the number of features without hurting the accuracy of split point determination by much). We call our new GBDT implementation with GOSS and EFB LightGBM. Our experiments on multiple public datasets show that, LightGBM speeds up the training process of conventional GBDT by up to over 20 times while achieving almost the same accuracy. 1 Introduction Gradient boosting decision tree (GBDT) [1] is a widely-used machine learning algorithm, due to its efficiency, accuracy, and interpretability. GBDT achieves state-of-the-art performances in many machine learning tasks, such as multi-class classification [2], click prediction [3], and learning to rank [4]. In recent years, with the emergence of big data (in terms of both the number of features and the number of instances), GBDT is facing new challenges, especially in the tradeoff between accuracy and efficiency. Conventional implementations of GBDT need to, for every feature, scan all the data instances to estimate the information gain of all the possible split points. Therefore, their computational complexities will be proportional to both the number of features and the number of instances. This makes these implementations very time consuming when handling big data. To tackle this challenge, a straightforward idea is to reduce the number of data instances and the number of features. However, this turns out to be highly non-trivial. For example, it is unclear how to perform data sampling for GBDT. While there are some works that sample data according to their weights to speed up the training process of boosting [5, 6, 7], they cannot be directly applied to GBDT 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. since there is no sample weight in GBDT at all. In this paper, we propose two novel techniques towards this goal, as elaborated below. Gradient-based One-Side Sampling (GOSS). While there is no native weight for data instance in GBDT, we notice that data instances with different gradients play different roles in the computation of information gain. In particular, according to the definition of information gain, those instances with larger gradients1 (i.e., under-trained instances) will contribute more to the information gain. Therefore, when down sampling the data instances, in order to retain the accuracy of information gain estimation, we should better keep those instances with large gradients (e.g., larger than a pre-defined threshold, or among the top percentiles), and only randomly drop those instances with small gradients. We prove that such a treatment can lead to a more accurate gain estimation than uniformly random sampling, with the same target sampling rate, especially when the value of information gain has a large range. Exclusive Feature Bundling (EFB). Usually in real applications, although there are a large number of features, the feature space is quite sparse, which provides us a possibility of designing a nearly lossless approach to reduce the number of effective features. Specifically, in a sparse feature space, many features are (almost) exclusive, i.e., they rarely take nonzero values simultaneously. Examples include the one-hot features (e.g., one-hot word representation in text mining). We can safely bundle such exclusive features. To this end, we design an efficient algorithm by reducing the optimal bundling problem to a graph coloring problem (by taking features as vertices and adding edges for every two features if they are not mutually exclusive), and solving it by a greedy algorithm with a constant approximation ratio. We call the new GBDT algorithm with GOSS and EFB LightGBM2. Our experiments on multiple public datasets show that LightGBM can accelerate the training process by up to over 20 times while achieving almost the same accuracy. The remaining of this paper is organized as follows. At first, we review GBDT algorithms and related work in Sec. 2. Then, we introduce the details of GOSS in Sec. 3 and EFB in Sec. 4. Our experiments for LightGBM on public datasets are presented in Sec. 5. Finally, we conclude the paper in Sec. 6. 2 Preliminaries 2.1 GBDT and Its Complexity Analysis GBDT is an ensemble model of decision trees, which are trained in sequence [1]. In each iteration, GBDT learns the decision trees by fitting the negative gradients (also known as residual errors). The main cost in GBDT lies in learning the decision trees, and the most time-consuming part in learning a decision tree is to find the best split points. One of the most popular algorithms to find split points is the pre-sorted algorithm [8, 9], which enumerates all possible split points on the pre-sorted feature values. This algorithm is simple and can find the optimal split points, however, it is inefficient in both training speed and memory consumption. Another popular algorithm is the histogram-based algorithm [10, 11, 12], as shown in Alg. 13. Instead of finding the split points on the sorted feature values, histogram-based algorithm buckets continuous feature values into discrete bins and uses these bins to construct feature histograms during training. Since the histogram-based algorithm is more efficient in both memory consumption and training speed, we will develop our work on its basis. As shown in Alg. 1, the histogram-based algorithm finds the best split points based on the feature histograms. It costs O(#data × #feature) for histogram building and O(#bin × #feature) for split point finding. Since #bin is usually much smaller than #data, histogram building will dominate the computational complexity. If we can reduce #data or #feature, we will be able to substantially speed up the training of GBDT. 2.2 Related Work There have been quite a few implementations of GBDT in the literature, including XGBoost [13], pGBRT [14], scikit-learn [15], and gbm in R [16] 4. Scikit-learn and gbm in R implements the presorted algorithm, and pGBRT implements the histogram-based algorithm. XGBoost supports both 1When we say larger or smaller gradients in this paper, we refer to their absolute values. 2The code is available at GitHub: https://github.com/Microsoft/LightGBM. 3Due to space restriction, high level pseudo code is used. The details could be found in our open-source code. 4There are some other works speed up GBDT training via GPU [17, 18], or parallel training [19]. However, they are out of the scope of this paper. 2 the pre-sorted algorithm and histogram-based algorithm. As shown in [13], XGBoost outperforms the other tools. So, we use XGBoost as our baseline in the experiment section. To reduce the size of the training data, a common approach is to down sample the data instances. For example, in [5], data instances are filtered if their weights are smaller than a fixed threshold. SGB [20] uses a random subset to train the weak learners in every iteration. In [6], the sampling ratio are dynamically adjusted in the training progress. However, all these works except SGB [20] are based on AdaBoost [21], and cannot be directly applied to GBDT since there are no native weights for data instances in GBDT. Though SGB can be applied to GBDT, it usually hurts accuracy and thus it is not a desirable choice. Similarly, to reduce the number of features, it is natural to filter weak features [22, 23, 7, 24]. This is usually done by principle component analysis or projection pursuit. However, these approaches highly rely on the assumption that features contain significant redundancy, which might not always be true in practice (features are usually designed with their unique contributions and removing any of them may affect the training accuracy to some degree). The large-scale datasets used in real applications are usually quite sparse. GBDT with the pre-sorted algorithm can reduce the training cost by ignoring the features with zero values [13]. However, GBDT with the histogram-based algorithm does not have efficient sparse optimization solutions. The reason is that the histogram-based algorithm needs to retrieve feature bin values (refer to Alg. 1) for each data instance no matter the feature value is zero or not. It is highly preferred that GBDT with the histogram-based algorithm can effectively leverage such sparse property. To address the limitations of previous works, we propose two new novel techniques called Gradientbased One-Side Sampling (GOSS) and Exclusive Feature Bundling (EFB). More details will be introduced in the next sections. Algorithm 1: Histogram-based Algorithm Input: I: training data, d: max depth Input: m: feature dimension nodeSet ←{0} ▷tree nodes in current level rowSet ←{{0, 1, 2, ...}} ▷data indices in tree nodes for i = 1 to d do for node in nodeSet do usedRows ←rowSet[node] for k = 1 to m do H ←new Histogram() ▷Build histogram for j in usedRows do bin ←I.f[k][j].bin H[bin].y ←H[bin].y + I.y[j] H[bin].n ←H[bin].n + 1 Find the best split on histogram H. ... Update rowSet and nodeSet according to the best split points. ... Algorithm 2: Gradient-based One-Side Sampling Input: I: training data, d: iterations Input: a: sampling ratio of large gradient data Input: b: sampling ratio of small gradient data Input: loss: loss function, L: weak learner models ←{}, fact ←1−a b topN ←a × len(I) , randN ←b × len(I) for i = 1 to d do preds ←models.predict(I) g ←loss(I, preds), w ←{1,1,...} sorted ←GetSortedIndices(abs(g)) topSet ←sorted[1:topN] randSet ←RandomPick(sorted[topN:len(I)], randN) usedSet ←topSet + randSet w[randSet] × = fact ▷Assign weight fact to the small gradient data. newModel ←L(I[usedSet], −g[usedSet], w[usedSet]) models.append(newModel) 3 Gradient-based One-Side Sampling In this section, we propose a novel sampling method for GBDT that can achieve a good balance between reducing the number of data instances and keeping the accuracy for learned decision trees. 3.1 Algorithm Description In AdaBoost, the sample weight serves as a good indicator for the importance of data instances. However, in GBDT, there are no native sample weights, and thus the sampling methods proposed for AdaBoost cannot be directly applied. Fortunately, we notice that the gradient for each data instance in GBDT provides us with useful information for data sampling. That is, if an instance is associated with a small gradient, the training error for this instance is small and it is already well-trained. A straightforward idea is to discard those data instances with small gradients. However, the data distribution will be changed by doing so, which will hurt the accuracy of the learned model. To avoid this problem, we propose a new method called Gradient-based One-Side Sampling (GOSS). 3 GOSS keeps all the instances with large gradients and performs random sampling on the instances with small gradients. In order to compensate the influence to the data distribution, when computing the information gain, GOSS introduces a constant multiplier for the data instances with small gradients (see Alg. 2). Specifically, GOSS firstly sorts the data instances according to the absolute value of their gradients and selects the top a × 100% instances. Then it randomly samples b × 100% instances from the rest of the data. After that, GOSS amplifies the sampled data with small gradients by a constant 1−a b when calculating the information gain. By doing so, we put more focus on the under-trained instances without changing the original data distribution by much. 3.2 Theoretical Analysis GBDT uses decision trees to learn a function from the input space X s to the gradient space G [1]. Suppose that we have a training set with n i.i.d. instances {x1, · · · , xn}, where each xi is a vector with dimension s in space X s. In each iteration of gradient boosting, the negative gradients of the loss function with respect to the output of the model are denoted as {g1, · · · , gn}. The decision tree model splits each node at the most informative feature (with the largest information gain). For GBDT, the information gain is usually measured by the variance after splitting, which is defined as below. Definition 3.1 Let O be the training dataset on a fixed node of the decision tree. The variance gain of splitting feature j at point d for this node is defined as Vj|O(d) = 1 nO (P {xi∈O:xij≤d} gi)2 nj l|O(d) + (P {xi∈O:xij>d} gi)2 nj r|O(d) ! , where nO = P I[xi ∈O], nj l|O(d) = P I[xi ∈O : xij ≤d] and nj r|O(d) = P I[xi ∈O : xij > d]. For feature j, the decision tree algorithm selects d∗ j = argmaxdVj(d) and calculates the largest gain Vj(d∗ j). 5 Then, the data are split according feature j∗at point dj∗into the left and right child nodes. In our proposed GOSS method, first, we rank the training instances according to their absolute values of their gradients in the descending order; second, we keep the top-a × 100% instances with the larger gradients and get an instance subset A; then, for the remaining set Ac consisting (1 −a) × 100% instances with smaller gradients, we further randomly sample a subset B with size b × |Ac|; finally, we split the instances according to the estimated variance gain ˜Vj(d) over the subset A ∪B, i.e., ˜Vj(d) = 1 n (P xi∈Al gi + 1−a b P xi∈Bl gi)2 nj l (d) + (P xi∈Ar gi + 1−a b P xi∈Br gi)2 nj r(d) ! , (1) where Al = {xi ∈A : xij ≤d},Ar = {xi ∈A : xij > d},Bl = {xi ∈B : xij ≤d},Br = {xi ∈B : xij > d}, and the coefficient 1−a b is used to normalize the sum of the gradients over B back to the size of Ac. Thus, in GOSS, we use the estimated ˜Vj(d) over a smaller instance subset, instead of the accurate Vj(d) over all the instances to determine the split point, and the computation cost can be largely reduced. More importantly, the following theorem indicates that GOSS will not lose much training accuracy and will outperform random sampling. Due to space restrictions, we leave the proof of the theorem to the supplementary materials. Theorem 3.2 We denote the approximation error in GOSS as E(d) = | ˜Vj(d) −Vj(d)| and ¯gj l (d) = P xi∈(A∪Ac)l |gi| nj l (d) , ¯gj r(d) = P xi∈(A∪Ac)r |gi| nj r(d) . With probability at least 1 −δ, we have E(d) ≤C2 a,b ln 1/δ · max ( 1 nj l (d) , 1 nj r(d) ) + 2DCa,b r ln 1/δ n , (2) where Ca,b = 1−a √ b maxxi∈Ac |gi|, and D = max(¯gj l (d), ¯gj r(d)). According to the theorem, we have the following discussions: (1) The asymptotic approximation ratio of GOSS is O 1 nj l (d) + 1 nj r(d) + 1 √n . If the split is not too unbalanced (i.e., nj l (d) ≥O(√n) and nj r(d) ≥O(√n)), the approximation error will be dominated by the second term of Ineq.(2) which 5Our following analysis holds for arbitrary node. For simplicity and without confusion, we omit the sub-index O in all the notations. 4 decreases to 0 in O(√n) with n →∞. That means when number of data is large, the approximation is quite accurate. (2) Random sampling is a special case of GOSS with a = 0. In many cases, GOSS could outperform random sampling, under the condition C0,β > Ca,β−a, which is equivalent to αa √β > 1−a √β−a with αa = maxxi∈A∪Ac |gi|/ maxxi∈Ac |gi|. Next, we analyze the generalization performance in GOSS. We consider the generalization error in GOSS EGOSS gen (d) = | ˜Vj(d) −V∗(d)|, which is the gap between the variance gain calculated by the sampled training instances in GOSS and the true variance gain for the underlying distribution. We have EGOSS gen (d) ≤| ˜Vj(d) −Vj(d)| + |Vj(d) −V∗(d)| ∆= EGOSS(d) + Egen(d). Thus, the generalization error with GOSS will be close to that calculated by using the full data instances if the GOSS approximation is accurate. On the other hand, sampling will increase the diversity of the base learners, which potentially help to improve the generalization performance [24]. 4 Exclusive Feature Bundling In this section, we propose a novel method to effectively reduce the number of features. Algorithm 3: Greedy Bundling Input: F: features, K: max conflict count Construct graph G searchOrder ←G.sortByDegree() bundles ←{}, bundlesConflict ←{} for i in searchOrder do needNew ←True for j = 1 to len(bundles) do cnt ←ConflictCnt(bundles[j],F[i]) if cnt + bundlesConflict[i] ≤K then bundles[j].add(F[i]), needNew ←False break if needNew then Add F[i] as a new bundle to bundles Output: bundles Algorithm 4: Merge Exclusive Features Input: numData: number of data Input: F: One bundle of exclusive features binRanges ←{0}, totalBin ←0 for f in F do totalBin += f.numBin binRanges.append(totalBin) newBin ←new Bin(numData) for i = 1 to numData do newBin[i] ←0 for j = 1 to len(F) do if F[j].bin[i] ̸= 0 then newBin[i] ←F[j].bin[i] + binRanges[j] Output: newBin, binRanges High-dimensional data are usually very sparse. The sparsity of the feature space provides us a possibility of designing a nearly lossless approach to reduce the number of features. Specifically, in a sparse feature space, many features are mutually exclusive, i.e., they never take nonzero values simultaneously. We can safely bundle exclusive features into a single feature (which we call an exclusive feature bundle). By a carefully designed feature scanning algorithm, we can build the same feature histograms from the feature bundles as those from individual features. In this way, the complexity of histogram building changes from O(#data × #feature) to O(#data × #bundle), while #bundle << #feature. Then we can significantly speed up the training of GBDT without hurting the accuracy. In the following, we will show how to achieve this in detail. There are two issues to be addressed. The first one is to determine which features should be bundled together. The second is how to construct the bundle. Theorem 4.1 The problem of partitioning features into a smallest number of exclusive bundles is NP-hard. Proof: We will reduce the graph coloring problem [25] to our problem. Since graph coloring problem is NP-hard, we can then deduce our conclusion. Given any instance G = (V, E) of the graph coloring problem. We construct an instance of our problem as follows. Take each row of the incidence matrix of G as a feature, and get an instance of our problem with |V | features. It is easy to see that an exclusive bundle of features in our problem corresponds to a set of vertices with the same color, and vice versa. □ For the first issue, we prove in Theorem 4.1 that it is NP-Hard to find the optimal bundling strategy, which indicates that it is impossible to find an exact solution within polynomial time. In order to find a good approximation algorithm, we first reduce the optimal bundling problem to the graph coloring problem by taking features as vertices and adding edges for every two features if they are not mutually exclusive, then we use a greedy algorithm which can produce reasonably good results 5 (with a constant approximation ratio) for graph coloring to produce the bundles. Furthermore, we notice that there are usually quite a few features, although not 100% mutually exclusive, also rarely take nonzero values simultaneously. If our algorithm can allow a small fraction of conflicts, we can get an even smaller number of feature bundles and further improve the computational efficiency. By simple calculation, random polluting a small fraction of feature values will affect the training accuracy by at most O([(1 −γ)n]−2/3)(See Proposition 2.1 in the supplementary materials), where γ is the maximal conflict rate in each bundle. So, if we choose a relatively small γ, we will be able to achieve a good balance between accuracy and efficiency. Based on the above discussions, we design an algorithm for exclusive feature bundling as shown in Alg. 3. First, we construct a graph with weighted edges, whose weights correspond to the total conflicts between features. Second, we sort the features by their degrees in the graph in the descending order. Finally, we check each feature in the ordered list, and either assign it to an existing bundle with a small conflict (controlled by γ), or create a new bundle. The time complexity of Alg. 3 is O(#feature2) and it is processed only once before training. This complexity is acceptable when the number of features is not very large, but may still suffer if there are millions of features. To further improve the efficiency, we propose a more efficient ordering strategy without building the graph: ordering by the count of nonzero values, which is similar to ordering by degrees since more nonzero values usually leads to higher probability of conflicts. Since we only alter the ordering strategies in Alg. 3, the details of the new algorithm are omitted to avoid duplication. For the second issues, we need a good way of merging the features in the same bundle in order to reduce the corresponding training complexity. The key is to ensure that the values of the original features can be identified from the feature bundles. Since the histogram-based algorithm stores discrete bins instead of continuous values of the features, we can construct a feature bundle by letting exclusive features reside in different bins. This can be done by adding offsets to the original values of the features. For example, suppose we have two features in a feature bundle. Originally, feature A takes value from [0, 10) and feature B takes value [0, 20). We then add an offset of 10 to the values of feature B so that the refined feature takes values from [10, 30). After that, it is safe to merge features A and B, and use a feature bundle with range [0, 30] to replace the original features A and B. The detailed algorithm is shown in Alg. 4. EFB algorithm can bundle many exclusive features to the much fewer dense features, which can effectively avoid unnecessary computation for zero feature values. Actually, we can also optimize the basic histogram-based algorithm towards ignoring the zero feature values by using a table for each feature to record the data with nonzero values. By scanning the data in this table, the cost of histogram building for a feature will change from O(#data) to O(#non_zero_data). However, this method needs additional memory and computation cost to maintain these per-feature tables in the whole tree growth process. We implement this optimization in LightGBM as a basic function. Note, this optimization does not conflict with EFB since we can still use it when the bundles are sparse. 5 Experiments In this section, we report the experimental results regarding our proposed LightGBM algorithm. We use five different datasets which are all publicly available. The details of these datasets are listed in Table 1. Among them, the Microsoft Learning to Rank (LETOR) [26] dataset contains 30K web search queries. The features used in this dataset are mostly dense numerical features. The Allstate Insurance Claim [27] and the Flight Delay [28] datasets both contain a lot of one-hot coding features. And the last two datasets are from KDD CUP 2010 and KDD CUP 2012. We directly use the features used by the winning solution from NTU [29, 30, 31], which contains both dense and sparse features, and these two datasets are very large. These datasets are large, include both sparse and dense features, and cover many real-world tasks. Thus, we can use them to test our algorithm thoroughly. Our experimental environment is a Linux server with two E5-2670 v3 CPUs (in total 24 cores) and 256GB memories. All experiments run with multi-threading and the number of threads is fixed to 16. 5.1 Overall Comparison We present the overall comparisons in this subsection. XGBoost [13] and LightGBM without GOSS and EFB (called lgb_baselline) are used as baselines. For XGBoost, we used two versions, xgb_exa (pre-sorted algorithm) and xgb_his (histogram-based algorithm). For xgb_his, lgb_baseline, and LightGBM, we used the leaf-wise tree growth strategy [32]. For xgb_exa, since it only supports layer-wise growth strategy, we tuned the parameters for xgb_exa to let it grow similar trees like other 6 Table 1: Datasets used in the experiments. Name #data #feature Description Task Metric Allstate 12 M 4228 Sparse Binary classification AUC Flight Delay 10 M 700 Sparse Binary classification AUC LETOR 2M 136 Dense Ranking NDCG [4] KDD10 19M 29M Sparse Binary classification AUC KDD12 119M 54M Sparse Binary classification AUC Table 2: Overall training time cost comparison. LightGBM is lgb_baseline with GOSS and EFB. EFB_only is lgb_baseline with EFB. The values in the table are the average time cost (seconds) for training one iteration. xgb_exa xgb_his lgb_baseline EFB_only LightGBM Allstate 10.85 2.63 6.07 0.71 0.28 Flight Delay 5.94 1.05 1.39 0.27 0.22 LETOR 5.55 0.63 0.49 0.46 0.31 KDD10 108.27 OOM 39.85 6.33 2.85 KDD12 191.99 OOM 168.26 20.23 12.67 Table 3: Overall accuracy comparison on test datasets. Use AUC for classification task and NDCG@10 for ranking task. SGB is lgb_baseline with Stochastic Gradient Boosting, and its sampling ratio is the same as LightGBM. xgb_exa xgb_his lgb_baseline SGB LightGBM Allstate 0.6070 0.6089 0.6093 0.6064 ± 7e-4 0.6093 ± 9e-5 Flight Delay 0.7601 0.7840 0.7847 0.7780 ± 8e-4 0.7846 ± 4e-5 LETOR 0.4977 0.4982 0.5277 0.5239 ± 6e-4 0.5275 ± 5e-4 KDD10 0.7796 OOM 0.78735 0.7759 ± 3e-4 0.78732 ± 1e-4 KDD12 0.7029 OOM 0.7049 0.6989 ± 8e-4 0.7051 ± 5e-5 methods. And we also tuned the parameters for all datasets towards a better balancing between speed and accuracy. We set a = 0.05, b = 0.05 for Allstate, KDD10 and KDD12, and set a = 0.1, b = 0.1 for Flight Delay and LETOR. We set γ = 0 in EFB. All algorithms are run for fixed iterations, and we get the accuracy results from the iteration with the best score.6 0 200 400 600 800 1000 Time(s) 0.73 0.74 0.75 0.76 0.77 0.78 0.79 AUC LightGBM lgb_baseline xgb_his xgb_exa Figure 1: Time-AUC curve on Flight Delay. 0 50 100 150 200 250 300 350 400 Time(s) 0.40 0.42 0.44 0.46 0.48 0.50 0.52 NDCG@10 LightGBM lgb_baseline xgb_his xgb_exa Figure 2: Time-NDCG curve on LETOR. The training time and test accuracy are summarized in Table 2 and Table 3 respectively. From these results, we can see that LightGBM is the fastest while maintaining almost the same accuracy as baselines. The xgb_exa is based on the pre-sorted algorithm, which is quite slow comparing with histogram-base algorithms. By comparing with lgb_baseline, LightGBM speed up 21x, 6x, 1.6x, 14x and 13x respectively on the Allstate, Flight Delay, LETOR, KDD10 and KDD12 datasets. Since xgb_his is quite memory consuming, it cannot run successfully on KDD10 and KDD12 datasets due to out-of-memory. On the remaining datasets, LightGBM are all faster, up to 9x speed-up is achieved on the Allstate dataset. The speed-up is calculated based on training time per iteration since all algorithms converge after similar number of iterations. To demonstrate the overall training process, we also show the training curves based on wall clock time on Flight Delay and LETOR in the Fig. 1 6Due to space restrictions, we leave the details of parameter settings to the supplementary material. 7 Table 4: Accuracy comparison on LETOR dataset for GOSS and SGB under different sampling ratios. We ensure all experiments reach the convergence points by using large iterations with early stopping. The standard deviations on different settings are small. The settings of a and b for GOSS can be found in the supplementary materials. Sampling ratio 0.1 0.15 0.2 0.25 0.3 0.35 0.4 SGB 0.5182 0.5216 0.5239 0.5249 0.5252 0.5263 0.5267 GOSS 0.5224 0.5256 0.5275 0.5284 0.5289 0.5293 0.5296 and Fig. 2, respectively. To save space, we put the remaining training curves of the other datasets in the supplementary material. On all datasets, LightGBM can achieve almost the same test accuracy as the baselines. This indicates that both GOSS and EFB will not hurt accuracy while bringing significant speed-up. It is consistent with our theoretical analysis in Sec. 3.2 and Sec. 4. LightGBM achieves quite different speed-up ratios on these datasets. The overall speed-up comes from the combination of GOSS and EFB, we will break down the contribution and discuss the effectiveness of GOSS and EFB separately in the next sections. 5.2 Analysis on GOSS First, we study the speed-up ability of GOSS. From the comparison of LightGBM and EFB_only (LightGBM without GOSS) in Table 2, we can see that GOSS can bring nearly 2x speed-up by its own with using 10% - 20% data. GOSS can learn trees by only using the sampled data. However, it retains some computations on the full dataset, such as conducting the predictions and computing the gradients. Thus, we can find that the overall speed-up is not linearly correlated with the percentage of sampled data. However, the speed-up brought by GOSS is still very significant and the technique is universally applicable to different datasets. Second, we evaluate the accuracy of GOSS by comparing with Stochastic Gradient Boosting (SGB) [20]. Without loss of generality, we use the LETOR dataset for the test. We tune the sampling ratio by choosing different a and b in GOSS, and use the same overall sampling ratio for SGB. We run these settings until convergence by using early stopping. The results are shown in Table 4. We can see the accuracy of GOSS is always better than SGB when using the same sampling ratio. These results are consistent with our discussions in Sec. 3.2. All the experiments demonstrate that GOSS is a more effective sampling method than stochastic sampling. 5.3 Analysis on EFB We check the contribution of EFB to the speed-up by comparing lgb_baseline with EFB_only. The results are shown in Table 2. Here we do not allow the confliction in the bundle finding process (i.e., γ = 0).7 We find that EFB can help achieve significant speed-up on those large-scale datasets. Please note lgb_baseline has been optimized for the sparse features, and EFB can still speed up the training by a large factor. It is because EFB merges many sparse features (both the one-hot coding features and implicitly exclusive features) into much fewer features. The basic sparse feature optimization is included in the bundling process. However, the EFB does not have the additional cost on maintaining nonzero data table for each feature in the tree learning process. What is more, since many previously isolated features are bundled together, it can increase spatial locality and improve cache hit rate significantly. Therefore, the overall improvement on efficiency is dramatic. With above analysis, EFB is a very effective algorithm to leverage sparse property in the histogram-based algorithm, and it can bring a significant speed-up for GBDT training process. 6 Conclusion In this paper, we have proposed a novel GBDT algorithm called LightGBM, which contains two novel techniques: Gradient-based One-Side Sampling and Exclusive Feature Bundling to deal with large number of data instances and large number of features respectively. We have performed both theoretical analysis and experimental studies on these two techniques. The experimental results are consistent with the theory and show that with the help of GOSS and EFB, LightGBM can significantly outperform XGBoost and SGB in terms of computational speed and memory consumption. For the future work, we will study the optimal selection of a and b in Gradient-based One-Side Sampling and continue improving the performance of Exclusive Feature Bundling to deal with large number of features no matter they are sparse or not. 7We put our detailed study on γ tuning in the supplementary materials. 8 References [1] Jerome H Friedman. Greedy function approximation: a gradient boosting machine. Annals of statistics, pages 1189–1232, 2001. [2] Ping Li. Robust logitboost and adaptive base class (abc) logitboost. arXiv preprint arXiv:1203.3491, 2012. [3] Matthew Richardson, Ewa Dominowska, and Robert Ragno. Predicting clicks: estimating the click-through rate for new ads. In Proceedings of the 16th international conference on World Wide Web, pages 521–530. ACM, 2007. [4] Christopher JC Burges. From ranknet to lambdarank to lambdamart: An overview. Learning, 11(23-581):81, 2010. [5] Jerome Friedman, Trevor Hastie, Robert Tibshirani, et al. Additive logistic regression: a statistical view of boosting (with discussion and a rejoinder by the authors). The annals of statistics, 28(2):337–407, 2000. [6] Charles Dubout and François Fleuret. Boosting with maximum adaptive sampling. In Advances in Neural Information Processing Systems, pages 1332–1340, 2011. [7] Ron Appel, Thomas J Fuchs, Piotr Dollár, and Pietro Perona. Quickly boosting decision trees-pruning underachieving features early. In ICML (3), pages 594–602, 2013. [8] Manish Mehta, Rakesh Agrawal, and Jorma Rissanen. Sliq: A fast scalable classifier for data mining. In International Conference on Extending Database Technology, pages 18–32. Springer, 1996. [9] John Shafer, Rakesh Agrawal, and Manish Mehta. Sprint: A scalable parallel classi er for data mining. In Proc. 1996 Int. Conf. Very Large Data Bases, pages 544–555. Citeseer, 1996. [10] Sanjay Ranka and V Singh. Clouds: A decision tree classifier for large datasets. In Proceedings of the 4th Knowledge Discovery and Data Mining Conference, pages 2–8, 1998. [11] Ruoming Jin and Gagan Agrawal. Communication and memory efficient parallel decision tree construction. In Proceedings of the 2003 SIAM International Conference on Data Mining, pages 119–129. SIAM, 2003. [12] Ping Li, Christopher JC Burges, Qiang Wu, JC Platt, D Koller, Y Singer, and S Roweis. Mcrank: Learning to rank using multiple classification and gradient boosting. In NIPS, volume 7, pages 845–852, 2007. [13] Tianqi Chen and Carlos Guestrin. Xgboost: A scalable tree boosting system. In Proceedings of the 22Nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 785–794. ACM, 2016. [14] Stephen Tyree, Kilian Q Weinberger, Kunal Agrawal, and Jennifer Paykin. Parallel boosted regression trees for web search ranking. In Proceedings of the 20th international conference on World wide web, pages 387–396. ACM, 2011. [15] Fabian Pedregosa, Gaël Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier Grisel, Mathieu Blondel, Peter Prettenhofer, Ron Weiss, Vincent Dubourg, et al. Scikit-learn: Machine learning in python. Journal of Machine Learning Research, 12(Oct):2825–2830, 2011. [16] Greg Ridgeway. Generalized boosted models: A guide to the gbm package. Update, 1(1):2007, 2007. [17] Huan Zhang, Si Si, and Cho-Jui Hsieh. Gpu-acceleration for large-scale tree boosting. arXiv preprint arXiv:1706.08359, 2017. [18] Rory Mitchell and Eibe Frank. Accelerating the xgboost algorithm using gpu computing. PeerJ Preprints, 5:e2911v1, 2017. [19] Qi Meng, Guolin Ke, Taifeng Wang, Wei Chen, Qiwei Ye, Zhi-Ming Ma, and Tieyan Liu. A communication-efficient parallel algorithm for decision tree. In Advances in Neural Information Processing Systems, pages 1271–1279, 2016. [20] Jerome H Friedman. Stochastic gradient boosting. Computational Statistics & Data Analysis, 38(4):367–378, 2002. [21] Michael Collins, Robert E Schapire, and Yoram Singer. Logistic regression, adaboost and bregman distances. Machine Learning, 48(1-3):253–285, 2002. [22] Ian Jolliffe. Principal component analysis. Wiley Online Library, 2002. [23] Luis O Jimenez and David A Landgrebe. Hyperspectral data analysis and supervised feature reduction via projection pursuit. IEEE Transactions on Geoscience and Remote Sensing, 37(6):2653–2667, 1999. [24] Zhi-Hua Zhou. Ensemble methods: foundations and algorithms. CRC press, 2012. [25] Tommy R Jensen and Bjarne Toft. Graph coloring problems, volume 39. John Wiley & Sons, 2011. [26] Tao Qin and Tie-Yan Liu. Introducing LETOR 4.0 datasets. CoRR, abs/1306.2597, 2013. [27] Allstate claim data, https://www.kaggle.com/c/ClaimPredictionChallenge. [28] Flight delay data, https://github.com/szilard/benchm-ml#data. [29] Hsiang-Fu Yu, Hung-Yi Lo, Hsun-Ping Hsieh, Jing-Kai Lou, Todd G McKenzie, Jung-Wei Chou, Po-Han Chung, Chia-Hua Ho, Chun-Fu Chang, Yin-Hsuan Wei, et al. Feature engineering and classifier ensemble for kdd cup 2010. In KDD Cup, 2010. [30] Kuan-Wei Wu, Chun-Sung Ferng, Chia-Hua Ho, An-Chun Liang, Chun-Heng Huang, Wei-Yuan Shen, Jyun-Yu Jiang, Ming-Hao Yang, Ting-Wei Lin, Ching-Pei Lee, et al. A two-stage ensemble of diverse models for advertisement ranking in kdd cup 2012. In KDDCup, 2012. [31] Libsvm binary classification data, https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary.html. [32] Haijian Shi. Best-first decision tree learning. PhD thesis, The University of Waikato, 2007. 9 | 2017 | 260 |
6,742 | The Neural Hawkes Process: A Neurally Self-Modulating Multivariate Point Process Hongyuan Mei Jason Eisner Department of Computer Science, Johns Hopkins University 3400 N. Charles Street, Baltimore, MD 21218 U.S.A {hmei,jason}@cs.jhu.edu Abstract Many events occur in the world. Some event types are stochastically excited or inhibited—in the sense of having their probabilities elevated or decreased—by patterns in the sequence of previous events. Discovering such patterns can help us predict which type of event will happen next and when. We model streams of discrete events in continuous time, by constructing a neurally self-modulating multivariate point process in which the intensities of multiple event types evolve according to a novel continuous-time LSTM. This generative model allows past events to influence the future in complex and realistic ways, by conditioning future event intensities on the hidden state of a recurrent neural network that has consumed the stream of past events. Our model has desirable qualitative properties. It achieves competitive likelihood and predictive accuracy on real and synthetic datasets, including under missing-data conditions. 1 Introduction Some events in the world are correlated. A single event, or a pattern of events, may help to cause or prevent future events. We are interested in learning the distribution of sequences of events (and in future work, the causal structure of these sequences). The ability to discover correlations among events is crucial to accurately predict the future of a sequence given its past, i.e., which events are likely to happen next and when they will happen. We specifically focus on sequences of discrete events in continuous time (“event streams”). Modeling such sequences seems natural and useful in many applied domains: • Medical events. Each patient has a sequence of acute incidents, doctor’s visits, tests, diagnoses, and medications. By learning from previous patients what sequences tend to look like, we could predict a new patient’s future from their past. • Consumer behavior. Each online consumer has a sequence of online interactions. By modeling the distribution of sequences, we can learn purchasing patterns. Buying cookies may temporarily depress purchases of all desserts, yet increase the probability of buying milk. • “Quantified self” data. Some individuals use cellphone apps to record their behaviors— eating, traveling, working, sleeping, waking. By anticipating behaviors, an app could perform helpful supportive actions, including issuing reminders and placing advance orders. • Social media actions. Previous posts, shares, comments, messages, and likes by a set of users are predictive of their future actions. • Other event streams arise in news, animal behavior, dialogue, music, etc. A basic model for event streams is the Poisson process (Palm, 1943), which assumes that events occur independently of one another. In a non-homogenous Poisson process, the (infinitesimal) probability of an event happening at time t may vary with t, but it is still independent of other events. A Hawkes process (Hawkes, 1971; Liniger, 2009) supposes that past events can temporarily raise the probability of future events, assuming that such excitation is x positive, y additive over the past events, and z exponentially decaying with time. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Type-1 Type-2 Intensity-1 Intensity-2 BaseRate-1 BaseRate-2 LSTM-Unit Figure 1: Drawing an event stream from a neural Hawkes process. An LSTM reads the sequence of past events (polygons) to arrive at a hidden state (orange). That state determines the future “intensities” of the two types of events—that is, their time-varying instantaneous probabilities. The intensity functions are continuous parametric curves (solid lines) determined by the most recent LSTM state, with dashed lines showing the steady-state asymptotes that they would eventually approach. In this example, events of type 1 excite type 1 but inhibit type 2. Type 2 excites itself, and excites or inhibits type 1 according to whether the count of type 2 events so far is odd or even. Those are immediate effects, shown by the sudden jumps in intensity. The events also have longer-timescale effects, shown by the shifts in the asymptotic dashed lines. However, real-world patterns often seem to violate these assumptions. For example, x is violated if one event inhibits another rather than exciting it: cookie consumption inhibits cake consumption. y is violated when the combined effect of past events is not additive. Examples abound: The 20th advertisement does not increase purchase rate as much as the first advertisement did, and may even drive customers away. Market players may act based on their own complex analysis of market history. Musical note sequences follow some intricate language model that considers melodic trajectory, rhythm, chord progressions, repetition, etc. z is violated when, for example, a past event has a delayed effect, so that the effect starts at 0 and increases sharply before decaying. We generalize the Hawkes process by determining the event intensities (instantaneous probabilities) from the hidden state of a recurrent neural network. This state is a deterministic function of the past history. It plays the same role as the state of a deterministic finite-state automaton. However, the recurrent network enjoys a continuous and infinite state space (a high-dimensional Euclidean space), as well as a learned transition function. In our network design, the state is updated discontinuously with each successive event occurrence and also evolves continuously as time elapses between events. Our main motivation is that our model can capture effects that the Hawkes process misses. The combined effect of past events on future events can now be superadditive, subadditive, or even subtractive, and can depend on the sequential ordering of the past events. Recurrent neural networks already capture other kinds of complex sequential dependencies when applied to language modeling—that is, generative modeling of linguistic word sequences, which are governed by syntax, semantics, and habitual usage (Mikolov et al., 2010; Sundermeyer et al., 2012; Karpathy et al., 2015). We wish to extend their success (Chelba et al., 2013) to sequences of events in continuous time. Another motivation for a more expressive model than the Hawkes process is to cope with missing data. Even in a domain where Hawkes might be appropriate, it is hard to apply Hawkes when sequences are only partially observed. Real datasets may systematically omit some types of events (e.g., illegal drug use, or offline purchases) which, in the true generative model, would have a strong influence on the future. They may also have stochastically missing data, where the missingness mechanism—the probability that an event is not recorded—can be complex and data-dependent (MNAR). In this setting, we can fit our model directly to the observation sequences, and use it to predict observation sequences that were generated in the same way (using the same complete-data distribution and the same missingness mechanism). Note that if one knew the true complete-data distribution—perhaps Hawkes—and the true missingness mechanism, one would optimally predict the incomplete future from the incomplete past in Bayesian fashion, by integrating over possible completions (imputing the missing events and considering their influence on the future). Our hope is that the neural model is expressive enough that it can learn to approximate this true predictive distribution. Its hidden state after observing the past should implicitly encode the Bayesian posterior, and its update rule for this hidden state should emulate the “observable operator” that updates the posterior upon each new observation. See Appendix A.4 for further discussion. 2 A final motivation is that one might wish to intervene in a medical, economic, or social event stream so as to improve the future course of events. Appendix D discusses our plans to deploy our model family as an environment model within reinforcement learning, where an agent controls some events. 2 Notation We are interested in constructing distributions over event streams (k1, t1), (k2, t2), . . ., where each ki ∈{1, 2, . . . , K} is an event type and 0 < t1 < t2 < · · · are times of occurrence.1 That is, there are K types of events, tokens of which are observed to occur in continuous time. For any distribution P in our proposed family, an event stream is almost surely infinite. However, when we observe the process only during a time interval [0, T], the number I of observed events is almost surely finite. The log-likelihood ℓof the model P given these I observations is I X i=1 log P((ki, ti) | Hi) + log P(tI+1 > T | HI) (1) where the history Hi is the prefix sequence (k1, t1), (k2, t2), . . . , (ki−1, ti−1), and P((ki, ti) | Hi) is the probability density that the next event occurs at time ti and has type ki. Throughout the paper, the subscript i usually denotes quantities that affect the distribution of the next event (ki, ti). These quantities depend only on the history Hi. We use (lowercase) Greek letters for parameters related to the classical Hawkes process, and Roman letters for other quantities, including hidden states and affine transformation parameters. We denote vectors by bold lowercase letters such as s and µ, and matrices by bold capital Roman letters such as U. Subscripted bold letters denote distinct vectors or matrices (e.g., wk). Scalar quantities, including vector and matrix elements such as sk and αj,k, are written without bold. Capitalized scalars represent upper limits on lowercase scalars, e.g., 1 ≤k ≤K. Function symbols are notated like their return type. All R →R functions are extended to apply elementwise to vectors and matrices. 3 The Model In this section, we first review Hawkes processes, and then introduce our model one step at a time. Formally, generative models of event streams are multivariate point processes. A (temporal) point process is a probability distribution over {0, 1}-valued functions on a given time interval (for us, [0, ∞)). A multivariate point process is formally a distribution over K-tuples of such functions. The kth function indicates the times at which events of type k occurred, by taking value 1 at those times. 3.1 Hawkes Process: A Self-Exciting Multivariate Point Process (SE-MPP) A basic model of event streams is the non-homogeneous multivariate Poisson process. It assumes that an event of type k occurs at time t—more precisely, in the infinitesimally wide interval [t, t + dt)—with probability λk(t)dt. The value λk(t) ≥0 can be regarded as a rate per unit time, just like the parameter λ of an ordinary Poisson process. λk is known as the intensity function, and the total intensity of all event types is given by λ(t) = PK k=1 λk(t). A well-known generalization that captures interactions is the self-exciting multivariate point process (SE-MPP), or Hawkes process (Hawkes, 1971; Liniger, 2009), in which past events h from the history conspire to raise the intensity of each type of event. Such excitation is positive, additive over the past events, and exponentially decaying with time: λk(t) = µk + X h:th<t αkh,k exp(−δkh,k(t −th)) (2) where µk ≥0 is the base intensity of event type k, αj,k ≥0 is the degree to which an event of type j initially excites type k, and δj,k > 0 is the decay rate of that excitation. When an event occurs, all intensities are elevated to various degrees, but then will decay toward their base rates µ. 1More generally, one could allow 0 ≤t1 ≤t2 ≤· · · , where ti is a immediate event if ti−1 = ti and a delayed event if ti−1 < ti. It is not too difficult to extend our model to assign positive probability to immediate events, but we will disallow them here for simplicity. 3 3.2 Self-Modulating Multivariate Point Processes The positivity constraints in the Hawkes process limit its expressivity. First, the positive interaction parameters αj,k fail to capture inhibition effects, in which past events reduce the intensity of future events. Second, the positive base rates µ fail to capture the inherent inertia of some events, which are unlikely until their cumulative excitation by past events crosses some threshold. To remove such limitations, we introduce two self-modulating models. Here the intensities of future events are stochastically modulated by the past history, where the term “modulation” is meant to encompass both excitation and inhibition. The intensity λk(t) can even fluctuate non-monotonically between successive events, because the competing excitatory and inhibitory influences may decay at different rates. 3.2.1 Hawkes Process with Inhibition: A Decomposable Self-Modulating MPP (D-SM-MPP) Our first move is to enrich the Hawkes model’s expressiveness while still maintaining its decomposable structure. We relax the positivity constraints on αj,k and µk, allowing them to range over R, which allows inhibition (αj,k < 0) and inertia (µk < 0). However, the resulting total activation could now be negative. We therefore pass it through a non-linear transfer function fk : R →R+ to obtain a positive intensity function as required: λk(t) = fk(˜λk(t)) (3a) ˜λk(t) = µk + X h:th<t αkh,k exp(−δkh,k(t −th)) (3b) As t increases between events, the intensity λk(t) may both rise and fall, but eventually approaches the base rate f(µk+0), as the influence of each previous event still decays toward 0 at a rate δj,k > 0. What non-linear function fk should we use? The ReLU function f(x) = max(x, 0) is not strictly positive as required. A better choice is the scaled “softplus” function f(x) = s log(1 + exp(x/s)), which approaches ReLU as s →0. We learn a separate scale parameter sk for each event type k, which adapts to the rate of that type. So we instantiate (3a) as λk(t) = fk(˜λk(t)) = sk log(1 + exp(˜λk(t)/sk)). Appendix A.1 graphs this and motivates the “softness” and the scale parameter. 3.2.2 Neural Hawkes Process: A Neurally Self-Modulating MPP (N-SM-MPP) Our second move removes the restriction that the past events have independent, additive influence on ˜λk(t). Rather than predict ˜λk(t) as a simple summation (3b), we now use a recurrent neural network. This allows learning a complex dependence of the intensities on the number, order, and timing of past events. We refer to our model as a neural Hawkes process. Just as before, each event type k has an time-varying intensity λk(t), which jumps discontinuously at each new event, and then drifts continuously toward a baseline intensity. In the new process, however, these dynamics are controlled by a hidden state vector h(t) ∈(−1, 1)D, which in turn depends on a vector c(t) ∈RD of memory cells in a continuous-time LSTM.2 This novel recurrent neural network architecture is inspired by the familiar discrete-time LSTM (Hochreiter and Schmidhuber, 1997; Graves, 2012). The difference is that in the continuous interval following an event, each memory cell c exponentially decays at some rate δ toward some steady-state value ¯c. At each time t > 0, we obtain the intensity λk(t) by (4a), where (4b) defines how the hidden states h(t) are continually obtained from the memory cells c(t) as the cells decay: λk(t) = fk(w⊤ k h(t)) (4a) h(t) = oi ⊙(2σ(2c(t)) −1) for t ∈(ti−1, ti] (4b) This says that on the interval (ti−1, ti]—in other words, after event i−1 up until event i occurs at some time ti—the h(t) defined by equation (4b) determines the intensity functions via equation (4a). So for t in this interval, according to the model, h(t) is a sufficient statistic of the history (Hi, t − ti−1) with respect to future events (see equation (1)). h(t) is analogous to hi in an LSTM language model (Mikolov et al., 2010), which summarizes the past event sequence k1, . . . , ki−1. But in our decay architecture, it will also reflect the interarrival times t1 −0, t2 −t1, . . . , ti−1 −ti−2, t−ti−1. This interval (ti−1, ti] ends when the next event ki stochastically occurs at some time ti. At this point, the continuous-time LSTM reads (ki, ti) and updates the current (decayed) hidden cells c(t) to new initial values ci+1, based on the current (decayed) hidden state h(ti). 2We use one-layer LSTMs with D hidden units in our present experiments, but a natural extension is to use multi-layer (“deep”) LSTMs (Graves et al., 2013), in which case h(t) is the hidden state of the top layer. 4 How does the continuous-time LSTM make those updates? Other than depending on decayed values h(ti), the update formulas resemble the discrete-time case:3 ii+1 ←σ (Wiki + Uih(ti) + di) (5a) f i+1 ←σ (Wfki + Ufh(ti) + df) (5b) zi+1 ←2σ (Wzki + Uzh(ti) + dz) −1 (5c) oi+1 ←σ (Woki + Uoh(ti) + do) (5d) ci+1 ←f i+1 ⊙c(ti) + ii+1 ⊙zi+1 (6a) ¯ci+1 ←¯f i+1 ⊙¯ci +¯ıi+1 ⊙zi+1 (6b) δi+1 ←f (Wdki + Udh(ti) + dd) (6c) The vector ki ∈{0, 1}K is the ith input: a one-hot encoding of the new event ki, with non-zero value only at the entry indexed by ki. The above formulas will make a discrete update to the LSTM state. They resemble the discrete-time LSTM, but there are two differences. First, the updates do not depend on the “previous” hidden state from just after time ti−1, but rather its value h(ti) at time ti, after it has decayed for a period of ti −ti−1. Second, equations (6b)–(6c) are new. They define how in future, as t > ti increases, the elements of c(t) will continue to deterministically decay (at different rates) from ci+1 toward targets ¯ci+1. Specifically, c(t) is given by (7), which continues to control h(t) and thus λk(t) (via (4), except that i has now increased by 1). c(t) def= ¯ci+1 + (ci+1 −¯ci+1) exp (−δi+1 (t −ti)) for t ∈(ti, ti+1] (7) In short, not only does (6a) define the usual cell values ci+1, but equation (7) defines c(t) on R>0. On the interval (ti, ti+1], c(t) follows an exponential curve that begins at ci+1 (in the sense that limt→t+ i c(t) = ci+1) and decays toward ¯ci+1 (which it would approach as t →∞, if extrapolated). A schematic example is shown in Figure 1. As in the previous models, λk(t) drifts deterministically between events toward some base rate. But the neural version is different in three ways: x The base rate is not a constant µk, but shifts upon each event.4 y The drift can be non-monotonic, because the excitatory and inhibitory influences on λk(t) from different elements of h(t) may decay at different rates. z The sigmoidal transfer function means that the behavior of h(t) itself is a little more interesting than exponential decay. Suppose that ci is very negative but increases toward a target ¯ci > 0. Then h(t) will stay close to −1 for a while and then will rapidly rise past 0. This usefully lets us model a delayed response (e.g. the last green segment in Figure 1). We point out two behaviors that are naturally captured by our LSTM’s “forget” and “input” gates: • if f i+1 ≈1 and ii+1 ≈0, then ci+1 ≈c(ti). So c(t) and h(t) will be continuous at ti. There is no jump due to event i, though the steady-state target may change. • if ¯f i+1 ≈1 and ¯ıi+1 ≈0, then ¯ci+1 ≈¯ci. So although there may be a jump in activation, it is temporary. The memory cells will decay toward the same steady states as before. Among other benefits, this lets us fit datasets in which (as is common) some pairs of event types do not influence one another. Appendix A.3 explains why all the models in this paper have this ability. The drift of c(t) between events controls how the system’s expectations about future events change as more time elapses with no event having yet occured. Equation (7) chooses a moderately flexible parametric form for this drift function (see Appendix D for some alternatives). Equation (6a) was designed so that c in an LSTM could learn to count past events with discrete-time exponential discounting; and (7) can be viewed as extending that to continuous-time exponential discounting. Our memory cell vector c(t) is a deterministic function of the past history (Hi, t −ti).5 Thus, the event intensities at any time are also deterministic via equation (4). The stochastic part of the model is the random choice—based on these intensities—of which event happens next and when it happens. The events are in competition: an event with high intensity is likely to happen sooner than an event with low intensity, and whichever one happens first is fed back into the LSTM. If no event type has high intensity, it may take a long time for the next event to occur. Training the model means learning the LSTM parameters in equations (5) and (6c) along with the other parameters mentioned in this section, namely sk ∈R and wk ∈RD for k ∈{1, 2, . . . , K}. 3The upright-font subscripts i, f, z and o are not variables, but constant labels that distinguish different W, U and d tensors. The ¯f and¯ı in equation (6b) are defined analogously to f and i but with different weights. 4Equations (4b) and (7) imply that after event i −1, the base rate jumps to fk(w⊤(oi ⊙(2σ(2¯ci) −1))). 5Appendix A.2 explains how our LSTM handles the start and end of the sequence. 5 4 Algorithms For the proposed models, the log-likelihood (1) of the parameters turns out to be given by a simple formula—the sum of the log-intensities of the events that happened, at the times they happened, minus an integral of the total intensities over the observation interval [0, T]: ℓ= X i:ti≤T log λki(ti) − Z T t=0 λ(t)dt | {z } call this Λ (8) The full derivation is given in Appendix B.1. Intuitively, the −Λ term (which is ≤0) sums the log-probabilities of infinitely many non-events. Why? The probability that there was not an event of any type in the infinitesimally wide interval [t, t + dt) is 1 −λ(t)dt, whose log is −λ(t)dt. We can locally maximize ℓusing any stochastic gradient method. A detailed recipe is given in Appendix B.2, including the Monte Carlo trick we use to handle the integral in equation (8). If we wish to draw random sequences from the model, we can adopt the thinning algorithm (Lewis and Shedler, 1979; Liniger, 2009) that is commonly used for the Hawkes process. See Appendix B.3. Given an event stream prefix (k1, t1), (k2, t2), ..., (ki−1, ti−1), we may wish to predict the time and type of the single next event. The next event’s time ti has density pi(t) = P(ti = t | Hi) = λ(t) exp − R t ti−1 λ(s)ds . To predict a single time whose expected L2 loss is as low as possible, we should choose ˆti = E[ti | Hi] = R ∞ ti−1 tpi(t)dt. Given the next event time ti, the most likely type would be argmaxk λk(ti)/λ(ti), but the most likely next event type without knowledge of ti is ˆki = argmaxk R ∞ ti−1 λk(t) λ(t) pi(t)dt. The integrals in the preceding equations can be estimated by Monte Carlo sampling much as before (Appendix B.2). For event type prediction, we recommend a paired comparison that uses the same sample of t values for each k in the argmax; this reduces sampling variance and also lets us share the λ(t) and pi(t) computations across all k. 5 Related Work The Hawkes process has been widely used to model event streams, including for topic modeling and clustering of text document streams (He et al., 2015; Du et al., 2015a), constructing and inferring network structure (Yang and Zha, 2013; Choi et al., 2015; Etesami et al., 2016), personalized recommendations based on users’ temporal behavior (Du et al., 2015b), discovering patterns in social interaction (Guo et al., 2015; Lukasik et al., 2016), learning causality (Xu et al., 2016), and so on. Recent interest has focused on expanding the expressivity of Hawkes processes. Zhou et al. (2013) describe a self-exciting process that removes the assumption of exponentially decaying influence (as we do). They replace the scaled-exponential summands in equation (2) with learned positive functions of time (the choice of function again depends on ki, k). Lee et al. (2016) generalize the constant excitation parameters αj,k to be stochastic, which increases expressivity. Our model also allows non-constant interactions between event types, but arranges these via deterministic, instead of stochastic, functions of continuous-time LSTM hidden states. Wang et al. (2016) consider non-linear effects of past history on the future, by passing the intensity functions of the Hawkes process through a non-parametric isotonic link function g, which is in the same place as our non-linear function fk. In contrast, our fk has a fixed parametric form (learning only the scale parameter), and is approximately linear when x is large. This is because we model non-linearity (and other complications) with a continuous-time LSTM, and use fk only to ensure positivity of the intensity functions. Du et al. (2016) independently combined Hawkes processes with recurrent neural networks (and Xiao et al. (2017a) propose an advanced way of estimating the parameters of that model). However, Du et al.’s architecture is different in several respects. They use standard discrete-time LSTMs without our decay innovation, so they must encode the intervals between past events as explicit numerical inputs to the LSTM. They have only a single intensity function λ(t), and it simply decays exponentially toward 0 between events, whereas our more modular model creates separate (potentially transferrable) functions λk(t), each of which allows complex and non-monotonic dynamics en route to a non-zero steady state intensity. Some structural limitations of their design are that ti and ki are conditionally independent given h (they are determined by separate distributions), and that their model cannot avoid a positive probability of extinction at all times. Finally, since they take 6 f = exp, the effect of their hidden units on intensity is effectively multiplicative, whereas we take f = softplus to get an approximately additive effect inspired by the classical Hawkes process. Our rationale is that additivity is useful to capture independent (disjunctive) causes; at the same time, the hidden units that our model adds up can each capture a complex joint (conjunctive) cause. 6 Experiments6 We fit our various models on several simulated and real-world datasets, and evaluated them in each case by the log-probability that they assigned to held-out data. We also compared our approach with that of Du et al. (2016) on their prediction task. The datasets that we use in this paper range from one extreme with only K = 2 event types but mean sequence length > 2000, to the other extreme with K = 5000 event types but mean sequence length 3. Dataset details can be found in Table 1 in Appendix C.1. Training details (e.g., hyperparameter selection) can be found in Appendix C.2. 6.1 Synthetic Datasets In a pilot experiment with synthetic data (Appendix C.4), we confirmed that the neural Hawkes process generates data that is not well modeled by training an ordinary Hawkes process, but that ordinary Hawkes data can be successfully modeled by training an neural Hawkes process. In this experiment, we were not limited to measuring the likelihood of the models on the stochastic event sequences. We also knew the true latent intensities of the generating process, so we were able to directly measure whether the trained models predicted these intensities accurately. The pattern of results was similar. 6.2 Real-World Media Datasets Retweets Dataset (Zhao et al., 2015). On Twitter, novel tweets are generated from some distribution, which we do not model here. Each novel tweet serves as the beginning-of-stream event (see Appendix A.2) for a subsequent stream of retweet events. We model the dynamics of these streams: how retweets by various types of users (K = 3) predict later retweets by various types of users. Details of the dataset and its preparation are given in Appendix C.5. The dataset is interesting for its temporal pattern. People like to retweet an interesting post soon after it is created and retweeted by others, but may gradually lose interest, so the intervals between retweets become longer over time. In other words, the stream begins in a self-exciting state, in which previous retweets increase the intensities of future retweets, but eventually interest dies down and events are less able to excite one another. The decomposable models are essentially incapable of modeling such a phase transition, but our neural model should have the capacity to do so. We generated learning curves (Figure 2) by training our models on increasingly long prefixes of the training set. As we can see, our self-modulating processes significantly outperform the Hawkes process at all training sizes. There is no obvious a priori reason to expect inhibition or even inertia in this application domain, which explains why the D-SM-MPP makes only a small improvement over the Hawkes process when the latter is well-trained. But D-SM-MPP requires much less data, and also has more stable behavior (smaller error bars) on small datasets. Our neural model is even better. Not only does it do better on the average stream, but its consistent superiority over the other two models is shown by the per-stream scatterplots in Figure 3, demonstrating the importance of our model’s neural component even with large datasets. MemeTrack Dataset (Leskovec and Krevl, 2014). This dataset is similar in conception to Retweets, but with many more event types (K = 5000). It considers the reuse of fixed phrases, or “memes,” in online media. It contains time-stamped instances of meme use in articles and posts from 1.5 million different blogs and news sites. We model how the future occurrence of a meme is affected by its past trajectory across different websites—that is, given one meme’s past trajectory across websites, when and where it will be mentioned again. On this dataset,7 the advantage of our full neural models was dramatic, yielding cross-entropy per event of around −8 relative to the −15 of D-SM-MPP—which in turn is far above the −800 of the 6Our code and data are available at https://github.com/HMEIatJHU/neurawkes. 7Data preparation details are given in Appendix C.6. 7 125 250 500 1000 2000 4000 8000 16000 number of training sequences 40 30 20 10 0 log-likelihood per event N-SM-MPP D-SM-MPP SE-MPP 125 250 500 1000 2000 4000 8000 16000 number of training sequences 9 8 7 6 5 log-likelihood per event N-SM-MPP D-SM-MPP SE-MPP 1000 2000 4000 8000 16000 32000 number of training sequences 2000 1500 1000 500 0 500 log-likelihood per event N-SM-MPP D-SM-MPP SE-MPP 4000 8000 16000 32000 number of training sequences 60 50 40 30 20 10 0 10 log-likelihood per event N-SM-MPP D-SM-MPP Figure 2: Learning curve (with 95% error bars) of all three models on the Retweets (left two) and MemeTrack (right two) datasets. Our neural model significantly outperforms our decomposable model (right graph of each pair), and both significantly outperform the Hawkes process (left of each pair—same graph zoomed out). 10 8 6 4 2 0 2 N-SM-MPP 10 8 6 4 2 0 2 SE-MPP 10 8 6 4 2 0 2 N-SM-MPP 10 8 6 4 2 0 2 D-SM-MPP Figure 3: Scatterplots of N-SM-MPP vs. SE-MPP (left) and N-SM-MPP vs. D-SM-MPP (right), comparing the held-out log-likelihood of the two models (when trained on our full Retweets training set) with respect to each of the 2000 test sequences. Nearly all points fall to the right of y = x, since N-SM-MPP (the neural Hawkes process) is consistently more predictive than our non-neural model and the Hawkes process. 2.0 1.8 1.6 1.4 1.2 1.0 N-SM-MPP 2.0 1.8 1.6 1.4 1.2 1.0 SE-MPP Figure 4: Scatterplot of N-SMMPP vs. SE-MPP, comparing their log-likelihoods with respect to each of the 31 incomplete sequences’ test sets. All 31 points fall to the right of y = x. Hawkes process. Figure 2 illustrates the persistent gaps among the models. A scatterplot similar to Figure 3 is given in Figure 13 of Appendix C.6. We attribute the poor performance of the Hawkes process to its failure to capture the latent properties of memes, such as their topic, political stance, or interestingness. This is a form of missing data (section 1), as we now discuss. As the table in Appendix C.1 indicates, most memes in MemeTrack are uninteresting and give rise to only a short sequence of mentions. Thus the base mention probability is low. An ideal analysis would recognize that if a specific meme has been mentioned several times already, it is a posteriori interesting and will probably be mentioned in future as well. The Hawkes process cannot distinguish the interesting memes from the others, except insofar as they appear on more influential websites. By contrast, our D-SM-MPP can partly capture this inferential pattern by using negative base rates µ to create “inertia” (section 3.2.1). Indeed, all 5000 of its learned µk parameters were negative, with values ranging from −10 to −30, which numerically yields 0 intensity and is hard to excite. An ideal analysis would also recognize that if a specific meme has appeared mainly on conservative websites, it is a posteriori conservative and unlikely to appear on liberal websites in the future. The D-SM-MPP, unlike the Hawkes process, can again partly capture this, by having conservative websites inhibit liberal ones. Indeed, 24% of its learned α parameters were negative. (We re-emphasize that this inhibition is merely a predictive effect—probably not a direct causal mechanism.) And our N-SM-MPP process is even more powerful. The LSTM state aims to learn sufficient statistics for predicting the future, so it can learn hidden dimensions (which fall in (−1, 1)) that encode useful posterior beliefs in boolean properties of the meme such as interestingness, conservativeness, timeliness, etc. The LSTM’s “long short-term memory” architecture explicitly allows these beliefs to persist indefinitely through time in the absence of new evidence, without having to be refreshed by redundant new events as in the decomposable models. Also, the LSTM’s hidden dimensions are computed by sigmoidal activation rather than softplus activation, and so can be used implicitly to perform logistic regression. The flat left side of the sigmoid resembles softplus and can model inertia as we saw above: it takes several mentions to establish interestingness. Symmetrically, the flat right side can model saturation: once the posterior probability of interestingness is at 80%, it cannot climb much farther no matter how many more mentions are observed. A final potential advantage of the LSTM is that in this large-K setting, it has fewer parameters than the other models (Appendix C.3), sharing statistical strength across event types (websites) to generalize better. The learning curves in Figure 2 suggest that on small data, the decomposable 8 (non-neural) models may overfit their O(K2) interaction parameters αj,k. Our neural model only has to learn O(D2) pairwise interactions among its D hidden nodes (where D ≪K), as well as O(KD) interactions between the hidden nodes and the K event types. In this case, K = 5000 but D = 64. This reduction by using latent hidden nodes is analogous to nonlinear latent factor analysis. 6.3 Modeling Streams With Missing Data We set up an artificial experiment to more directly investigate the missing-data setting of section 1, where we do not observe all events during [0, T], but train and test our model just as if we had. We sampled synthetic event sequences from a standard Hawkes process (just as in our pilot experiment from 6.1), removed all the events of selected types, and then compared the neural Hawkes process (N-SM-MPP) with the Hawkes process (SE-MPP) as models of these censored sequences. Since we took K = 5, there were 25 −1 = 31 ways to construct a dataset of censored sequences. As shown in Figure 4, for each of the 31 resulting datasets, training a neural Hawkes model achieves better generalization. Appendix A.4 discusses why this kind of behavior is to be expected. 6.4 Prediction Tasks—Medical, Social and Financial To compare with Du et al. (2016), we evaluate our model on the prediction tasks and datasets that they proposed. The Financial Transaction dataset contains long streams of high frequency stock transactions for a single stock, with the two event types “buy” and “sell.” The electrical medical records (MIMIC-II) dataset is a collection of de-identified clinical visit records of Intensive Care Unit patients for 7 years. Each patient has a sequence of hospital visit events, and each event records its time stamp and disease diagnosis. The Stack Overflow dataset represents two years of user awards on a question-answering website: each user received a sequence of badges (of 22 different types). We follow Du et al. (2016) and attempt to predict every held-out event (ki, ti) from its history Hi, evaluating the prediction ˆki with 0-1 loss (yielding an error rate, or ER) and evaluating the prediction ˆti with L2 loss (yielding a root-mean-squared error, or RMSE). We make minimum Bayes risk predictions as explained in section 4. Figure 8 in Appendix C.7 shows that our model consistently outperforms that of Du et al. (2016) on event type prediction on all the datasets, although for time prediction neither model is consistently better. 6.5 Sensitivity to Number of Parameters Does our method do well because of its flexible nonlinearities or just because it has more parameters? The answer is both. We experimented on the Retweets data with reducing the number of hidden units D. Our N-SM-MPP substantially outperformed SE-MPP (the Hawkes process) on held-out data even with very few parameters, although more parameters does even better: number of hidden units Hawkes 1 2 4 8 16 32 256 number of parameters 21 31 87 283 1011 3811 14787 921091 log-likelihood -7.19 -6.51 -6.41 -6.36 -6.24 -6.18 -6.16 -6.10 We also tried halving D across several datasets, which had negligible effect, always decreasing held-out log-likelihood by < 0.2% relative. More information about model sizes is given in Appendix C.3. Note that the neural Hawkes process does not always have more parameters. When K is large, we can greatly reduce the number of params below that of a Hawkes process, by choosing D ≪K, as for MemeTrack in section 6.2. 7 Conclusion We presented two extensions to the multivariate Hawkes process, a popular generative model of streams of typed, timestamped events. Past events may now either excite or inhibit future events. They do so by sequentially updating the state of a novel continuous-time recurrent neural network (LSTM). Whereas Hawkes sums the time-decaying influences of past events, we instead sum the time-decaying influences of the LSTM nodes. Our extensions to Hawkes aim to address real-world phenomena, missing data, and causal modeling. Empirically, we have shown that both extensions yield a significantly improved ability to predict the course of future events. There are several exciting avenues for further improvements (discussed in Appendix D), including embedding our model within a reinforcement learner to discover causal structure and learn an intervention policy. 9 Acknowledgments We are grateful to Facebook for enabling this work through a gift to the second author. Nan Du kindly helped us by making his code public and answering questions, and the NVIDIA Corporation kindly donated two Titan X Pascal GPUs. We also thank our lab group at Johns Hopkins University’s Center for Language and Speech Processing for helpful comments. The first version of this work appeared on arXiv in December 2016. References Ciprian Chelba, Tomas Mikolov, Mike Schuster, Qi Ge, Thorsten Brants, Phillipp Koehn, and Tony Robinson. One billion word benchmark for measuring progress in statistical language modeling. Computing Research Repository, arXiv:1312.3005, 2013. URL http://arxiv.org/abs/ 1312.3005. Edward Choi, Nan Du, Robert Chen, Le Song, and Jimeng Sun. Constructing disease network and temporal progression model via context-sensitive Hawkes process. In Data Mining (ICDM), 2015 IEEE International Conference on, pages 721–726. IEEE, 2015. Nan Du, Mehrdad Farajtabar, Amr Ahmed, Alexander J Smola, and Le Song. Dirichlet-Hawkes processes with applications to clustering continuous-time document streams. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 219–228. ACM, 2015a. Nan Du, Yichen Wang, Niao He, Jimeng Sun, and Le Song. Time-sensitive recommendation from recurrent user activities. In Advances in Neural Information Processing Systems (NIPS), pages 3492–3500, 2015b. Nan Du, Hanjun Dai, Rakshit Trivedi, Utkarsh Upadhyay, Manuel Gomez-Rodriguez, and Le Song. Recurrent marked temporal point processes: Embedding event history to vector. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 1555–1564. ACM, 2016. Jalal Etesami, Negar Kiyavash, Kun Zhang, and Kushagra Singhal. Learning network of multivariate Hawkes processes: A time series approach. arXiv preprint arXiv:1603.04319, 2016. Manuel Gomez Rodriguez, Jure Leskovec, and Bernhard Sch¨olkopf. Structure and dynamics of information pathways in online media. In Proceedings of the Sixth ACM International Conference on Web Search and Data Mining, pages 23–32. ACM, 2013. Alex Graves. Supervised Sequence Labelling with Recurrent Neural Networks. Springer, 2012. URL http://www.cs.toronto.edu/˜graves/preprint.pdf. Alex Graves, Navdeep Jaitly, and Abdel-rahman Mohamed. Hybrid speech recognition with deep bidirectional LSTM. In Automatic Speech Recognition and Understanding (ASRU), 2013 IEEE Workshop on, pages 273–278. IEEE, 2013. Fangjian Guo, Charles Blundell, Hanna Wallach, and Katherine Heller. The Bayesian echo chamber: Modeling social influence via linguistic accommodation. In Proceedings of the Eighteenth International Conference on Artificial Intelligence and Statistics, pages 315–323, 2015. Alan G Hawkes. Spectra of some self-exciting and mutually exciting point processes. Biometrika, 58(1):83–90, 1971. Xinran He, Theodoros Rekatsinas, James Foulds, Lise Getoor, and Yan Liu. Hawkestopic: A joint model for network inference and topic modeling from text-based cascades. In Proceedings of the International Conference on Machine Learning (ICML), pages 871–880, 2015. Sepp Hochreiter and J¨urgen Schmidhuber. Long short-term memory. Neural computation, 9(8): 1735–1780, 1997. Andrej Karpathy, Justin Johnson, and Li Fei-Fei. Visualizing and understanding recurrent networks. arXiv preprint arXiv:1506.02078, 2015. 10 Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceedings of the International Conference on Learning Representations (ICLR), 2015. Young Lee, Kar Wai Lim, and Cheng Soon Ong. Hawkes processes with stochastic excitations. In Proceedings of the International Conference on Machine Learning (ICML), 2016. Jure Leskovec and Andrej Krevl. SNAP Datasets: Stanford large network dataset collection. http: //snap.stanford.edu/data, June 2014. Peter A Lewis and Gerald S Shedler. Simulation of nonhomogeneous Poisson processes by thinning. Naval Research Logistics Quarterly, 26(3):403–413, 1979. Thomas Josef Liniger. Multivariate Hawkes processes. Diss., Eidgen¨ossische Technische Hochschule ETH Z¨urich, Nr. 18403, 2009, 2009. Michal Lukasik, PK Srijith, Duy Vu, Kalina Bontcheva, Arkaitz Zubiaga, and Trevor Cohn. Hawkes processes for continuous time sequence classification: An application to rumour stance classification in Twitter. In Proceedings of 54th Annual Meeting of the Association for Computational Linguistics, pages 393–398, 2016. Tomas Mikolov, Martin Karafi´at, Luk´as Burget, Jan Cernock´y, and Sanjeev Khudanpur. Recurrent neural network based language model. In INTERSPEECH 2010, 11th Annual Conference of the International Speech Communication Association, Makuhari, Chiba, Japan, September 26-30, 2010, pages 1045–1048, 2010. C. Palm. Intensit¨atsschwankungen im Fernsprechverkehr. Ericsson technics, no. 44. L. M. Ericcson, 1943. URL https://books.google.com/books?id=5cy2NQAACAAJ. Judea Pearl. Causal inference in statistics: An overview. Statistics Surveys, 3:96–146, 2009. Martin Sundermeyer, Hermann Ney, and Ralf Schluter. LSTM neural networks for language modeling. Proceedings of INTERSPEECH, 2012. Yichen Wang, Bo Xie, Nan Du, and Le Song. Isotonic Hawkes processes. In Proceedings of the International Conference on Machine Learning (ICML), 2016. Shuai Xiao, Mehrdad Farajtabar, Xiaojing Ye, Junchi Yan, Xiaokang Yang, Le Song, and Hongyuan Zha. Wasserstein learning of deep generative point process models. In Advances in Neural Information Processing Systems 30, 2017a. Shuai Xiao, Junchi Yan, Mehrdad Farajtabar, Le Song, Xiaokang Yang, and Hongyuan Zha. Joint modeling of event sequence and time series with attentional twin recurrent neural networks. arXiv preprint arXiv:1703.08524, 2017b. Hongteng Xu, Mehrdad Farajtabar, and Hongyuan Zha. Learning Granger causality for Hawkes processes. In Proceedings of the International Conference on Machine Learning (ICML), 2016. Shuang-hong Yang and Hongyuan Zha. Mixture of mutually exciting processes for viral diffusion. In Proceedings of the International Conference on Machine Learning (ICML), pages 1–9, 2013. Omar F. Zaidan and Jason Eisner. Modeling annotators: A generative approach to learning from annotator rationales. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 31–40, 2008. Qingyuan Zhao, Murat A Erdogdu, Hera Y He, Anand Rajaraman, and Jure Leskovec. Seismic: A self-exciting point process model for predicting tweet popularity. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 1513–1522. ACM, 2015. Ke Zhou, Hongyuan Zha, and Le Song. Learning triggering kernels for multi-dimensional Hawkes processes. In Proceedings of the International Conference on Machine Learning (ICML), pages 1301–1309, 2013. 11 | 2017 | 261 |
6,743 | Bayesian Optimization with Gradients Jian Wu 1 Matthias Poloczek 2 Andrew Gordon Wilson 1 Peter I. Frazier 1 1 Cornell University, 2 University of Arizona Abstract Bayesian optimization has been successful at global optimization of expensiveto-evaluate multimodal objective functions. However, unlike most optimization methods, Bayesian optimization typically does not use derivative information. In this paper we show how Bayesian optimization can exploit derivative information to find good solutions with fewer objective function evaluations. In particular, we develop a novel Bayesian optimization algorithm, the derivative-enabled knowledgegradient (d-KG), which is one-step Bayes-optimal, asymptotically consistent, and provides greater one-step value of information than in the derivative-free setting. d-KG accommodates noisy and incomplete derivative information, comes in both sequential and batch forms, and can optionally reduce the computational cost of inference through automatically selected retention of a single directional derivative. We also compute the d-KG acquisition function and its gradient using a novel fast discretization-free technique. We show d-KG provides state-of-the-art performance compared to a wide range of optimization procedures with and without gradients, on benchmarks including logistic regression, deep learning, kernel learning, and k-nearest neighbors. 1 Introduction Bayesian optimization [3, 17] is able to find global optima with a remarkably small number of potentially noisy objective function evaluations. Bayesian optimization has thus been particularly successful for automatic hyperparameter tuning of machine learning algorithms [10, 11, 35, 38], where objectives can be extremely expensive to evaluate, noisy, and multimodal. Bayesian optimization supposes that the objective function (e.g., the predictive performance with respect to some hyperparameters) is drawn from a prior distribution over functions, typically a Gaussian process (GP), maintaining a posterior as we observe the objective in new places. Acquisition functions, such as expected improvement [15, 17, 28], upper confidence bound [37], predictive entropy search [14] or the knowledge gradient [32], determine a balance between exploration and exploitation, to decide where to query the objective next. By choosing points with the largest acquisition function values, one seeks to identify a global optimum using as few objective function evaluations as possible. Bayesian optimization procedures do not generally leverage derivative information, beyond a few exceptions described in Sect. 2. By contrast, other types of continuous optimization methods [36] use gradient information extensively. The broader use of gradients for optimization suggests that gradients should also be quite useful in Bayesian optimization: (1) Gradients inform us about the objective’s relative value as a function of location, which is well-aligned with optimization. (2) In d-dimensional problems, gradients provide d distinct pieces of information about the objective’s relative value in each direction, constituting d + 1 values per query together with the objective value itself. This advantage is particularly significant for high-dimensional problems. (3) Derivative information is available in many applications at little additional cost. Recent work [e.g., 23] makes gradient information available for hyperparameter tuning. Moreover, in the optimization of engineering systems modeled by partial differential equations, which pre-dates most hyperparameter tuning applications [8], adjoint 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. methods provide gradients cheaply [16, 29]. And even when derivative information is not readily available, we can compute approximative derivatives in parallel through finite differences. In this paper, we explore the “what, when, and why” of Bayesian optimization with derivative information. We also develop a Bayesian optimization algorithm that effectively leverages gradients in hyperparameter tuning to outperform the state of the art. This algorithm accommodates incomplete and noisy gradient observations, can be used in both the sequential and batch settings, and can optionally reduce the computational overhead of inference by selecting the single most valuable directional derivatives to retain. For this purpose, we develop a new acquisition function, called the derivative-enabled knowledge-gradient (d-KG). d-KG generalizes the previously proposed batch knowledge gradient method of Wu and Frazier [44] to the derivative setting, and replaces its approximate discretization-based method for calculating the knowledge-gradient acquisition function by a novel faster exact discretization-free method. We note that this discretization-free method is also of interest beyond the derivative setting, as it can be used to improve knowledge-gradient methods for other problem settings. We also provide a theoretical analysis of the d-KG algorithm, showing (1) it is one-step Bayes-optimal by construction when derivatives are available; (2) that it provides one-step value greater than in the derivative-free setting, under mild conditions; and (3) that its estimator of the global optimum is asymptotically consistent. In numerical experiments we compare with state-of-the-art batch Bayesian optimization algorithms with and without derivative information, and the gradient-based optimizer BFGS with full gradients. We assume familiarity with GPs and Bayesian optimization, for which we recommend Rasmussen and Williams [31] and Shahriari et al. [34] as a review. In Section 2 we begin by describing related work. In Sect. 3 we describe our Bayesian optimization algorithm exploiting derivative information. In Sect. 4 we compare the performance of our algorithm with several competing methods on a collection of synthetic and real problems. The code for this paper is available at https://github.com/wujian16/Cornell-MOE. 2 Related Work Osborne et al. [26] proposes fully Bayesian optimization procedures that use derivative observations to improve the conditioning of the GP covariance matrix. Samples taken near previously observed points use only the derivative information to update the covariance matrix. Unlike our current work, derivative information does not affect the acquisition function. We directly compare with Osborne et al. [26] within the KNN benchmark in Sect. 4.2. Lizotte [22, Sect. 4.2.1 and Sect. 5.2.4] incorporates derivatives into Bayesian optimization, modeling the derivatives of a GP as in Rasmussen and Williams [31, Sect. 9.4]. Lizotte [22] shows that Bayesian optimization with the expected improvement (EI) acquisition function and complete gradient information at each sample can outperform BFGS. Our approach has six key differences: (i) we allow for noisy and incomplete derivative information; (ii) we develop a novel acquisition function that outperforms EI with derivatives; (iii) we enable batch evaluations; (iv) we implement and compare batch Bayesian optimization with derivatives across several acquisition functions, on benchmarks and new applications such as kernel learning, logistic regression, deep learning and k-nearest neighbors, further revealing empirically where gradient information will be most valuable; (v) we provide a theoretical analysis of Bayesian optimization with derivatives; (vi) we develop a scalable implementation. Very recently, Koistinen et al. [19] uses GPs with derivative observations for minimum energy path calculations of atomic rearrangements and Ahmed et al. [1] studies expected improvement with gradient observations. In Ahmed et al. [1], a randomly selected directional derivative is retained in each iteration for computational reasons, which is similar to our approach of retaining a single directional derivative, though differs in its random selection in contrast with our value-of-informationbased selection. Our approach is complementary to these works. For batch Bayesian optimization, several recent algorithms have been proposed that choose a set of points to evaluate in each iteration [5, 6, 12, 18, 24, 33, 35, 39]. Within this area, our approach to handling batch observations is most closely related to the batch knowledge gradient (KG) of Wu and Frazier [44]. We generalize this approach to the derivative setting, and provide a novel exact method for computing the knowledge-gradient acquisition function that avoids the discretization used in Wu 2 and Frazier [44]. This generalization improves speed and accuracy, and is also applicable to other knowledge gradient methods in continuous search spaces. Recent advances improving both access to derivatives and computational tractability of GPs make Bayesian optimization with gradients increasingly practical and timely for discussion. 3 Knowledge Gradient with Derivatives Sect. 3.1 reviews a general approach to incorporating derivative information into GPs for Bayesian optimization. Sect. 3.2 introduces a novel acquisition function d-KG, based on the knowledge gradient approach, which utilizes derivative information. Sect. 3.3 computes this acquisition function and its gradient efficiently using a novel fast discretization-free approach. Sect. 3.4 shows that this algorithm provides greater value of information than in the derivative-free setting, is one-step Bayes-optimal, and is asymptotically consistent when used over a discretized feasible space. 3.1 Derivative Information Given an expensive-to-evaluate function f, we wish to find argminx∈Af(x), where A ⊂Rd is the domain of optimization. We place a GP prior over f : A →R, which is specified by its mean function µ: A →R and kernel function K : A × A →R. We first suppose that for each sample of x we observe the function value and all d partial derivatives, possibly with independent normally distributed noise, and then later discuss relaxation to observing only a single directional derivative. Since the gradient is a linear operator, the gradient of a GP is also a GP (see also Sect. 9.4 in Rasmussen and Williams [31]), and the function and its gradient follow a multi-output GP with mean function ˜µ and kernel function ˜K defined below: ˜µ(x) = (µ(x), ∇µ(x))T , ˜K(x, x′) = K(x, x′) J(x, x′) J(x′, x)T H(x, x′) (3.1) where J(x, x′) = ∂K(x,x′) ∂x′ 1 , · · · , ∂K(x,x′) ∂x′ d and H(x, x′) is the d × d Hessian of K(x, x′). When evaluating at a point x, we observe the noise-obscured function value y(x) and gradient ∇y(x). Jointly, these observations form a (d + 1)-dimensional vector with conditional distribution (y(x), ∇y(x))T f(x), ∇f(x) ∼N (f(x), ∇f(x))T , diag(σ2(x)) , (3.2) where σ2 : A →Rd+1 ≥0 gives the variance of the observational noise. If σ2 is not known, we may estimate it from data. The posterior distribution is again a GP. We refer to the mean function of this posterior GP after n samples as ˜µ(n)(·) and its kernel function as ˜K(n)(·, ·). Suppose that we have sampled at n points X := {x(1), x(2), · · · , x(n)} and observed (y, ∇y)(1:n), where each observation consists of the function value and the gradient at x(i). Then ˜µ(n)(·) and ˜K(n)(·, ·) are given by ˜µ(n)(x) = ˜µ(x) + ˜K(x, X) ˜K(X, X) + diag{σ2(x(1)), · · · , σ2(x(n))} −1 (y, ∇y)(1:n) −˜µ(X) ˜K(n)(x, x′) = ˜K(x, x′) −˜K(x, X) ˜K(X, X) + diag{σ2(x(1)), · · · , σ2(x(n))} −1 ˜K(X, x′). (3.3) If our observations are incomplete, then we remove the rows and columns in (y, ∇y)(1:n), ˜µ(X), ˜K(·, X), ˜K(X, X) and ˜K(X, ·) of Eq. (3.3) corresponding to partial derivatives (or function values) that were not observed. If we can observe directional derivatives, then we add rows and columns corresponding to these observations, where entries in ˜µ(X) and ˜K(·, ·) are obtained by noting that a directional derivative is a linear transformation of the gradient. 3.2 The d-KG Acquisition Function We propose a novel Bayesian optimization algorithm to exploit available derivative information, based on the knowledge gradient approach [9]. We call this algorithm the derivative-enabled knowledge gradient (d-KG). 3 The algorithm proceeds iteratively, selecting in each iteration a batch of q points in A that has a maximum value of information (VOI). Suppose we have observed n points, and recall from Section 3.1 that ˜µ(n)(x) is the (d + 1)-dimensional vector giving the posterior mean for f(x) and its d partial derivatives at x. Sect. 3.1 discusses how to remove the assumption that all d + 1 values are provided. The expected value of f(x) under the posterior distribution is ˜µ(n) 1 (x). If after n samples we were to make an irrevocable (risk-neutral) decision now about the solution to our overarching optimization problem and receive a loss equal to the value of f at the chosen point, we would choose argminx∈A˜µ(n) 1 (x) and suffer conditional expected loss minx∈A ˜µ(n) 1 (x). Similarly, if we made this decision after n + q samples our conditional expected loss would be minx∈A ˜µ(n+q) 1 (x). Therefore, we define the d-KG factor for a given set of q candidate points z(1:q) as d-KG(z(1:q)) = min x∈A ˜µ(n) 1 (x) −En min x∈A ˜µ(n+q) 1 (x) x((n+1):(n+q)) = z(1:q) , (3.4) where En [·] is the expectation taken with respect to the posterior distribution after n evaluations, and the distribution of ˜µ(n+q) 1 (·) under this posterior marginalizes over the observations y(z(1:q)), ∇y(z(1:q)) = y(z(i)), ∇y(z(i)) : i = 1, . . . , q upon which it depends. We subsequently refer to Eq. (3.4) as the inner optimization problem. The d-KG algorithm then seeks to evaluate the batch of points next that maximizes the d-KG factor, max z(1:q)⊂A d-KG(z(1:q)). (3.5) We refer to Eq. (3.5) as the outer optimization problem. d-KG solves the outer optimization problem using the method described in Section 3.3. The d-KG acquisition function differs from the batch knowledge gradient acquisition function in Wu and Frazier [44] because here the posterior mean ˜µ(n+q) 1 (x) at time n+q depends on ∇y(z(1:q)). This in turn requires calculating the distribution of these gradient observations under the time-n posterior and marginalizing over them. Thus, the d-KG algorithm differs from KG not just in that gradient observations change the posterior, but also in that the prospect of future gradient observations changes the acquisition function. An additional major distinction from Wu and Frazier [44] is that d-KG employs a novel discretization-free method for computing the acquisition function (see Section 3.3). Fig. 1 illustrates the behavior of d-KG and d-EI on a 1-d example. d-EI generalizes expected improvement (EI) to batch acquisition with derivative information [22]. d-KG clearly chooses a better point to evaluate than d-EI. Including all d partial derivatives can be computationally prohibitive since GP inference scales as O(n3(d + 1)3). To overcome this challenge while retaining the value of derivative observations, we can include only one directional derivative from each iteration in our inference. d-KG can naturally decide which derivative to include, and can adjust our choice of where to best sample given that we observe more limited information. We define the d-KG acquisition function for observing only the function value and the derivative with direction θ at z(1:q) as d-KG(z(1:q), θ) = min x∈A ˜µ(n) 1 (x) −En min x∈A ˜µ(n+q) 1 (x) x((n+1):(n+q)) = z(1:q); θ . (3.6) where conditioning on θ is here understood to mean that ˜µ(n+q) 1 (x) is the conditional mean of f(x) given y(z(1:q)) and θT ∇y(z(1:q)) = (θT ∇y(z(i)) : i = 1, . . . , q). The full algorithm is as follows. Algorithm 1 d-KG with Relevant Directional Derivative Detection 1: for t = 1 to N do 2: (z(1:q)∗, θ∗) = argmaxz(1:q),θd-KG(z(1:q), θ) 3: Augment data with y(z(1:q)∗) and θ∗T ∇y(z(1:q)∗). Update our posterior on (f(x), ∇f(x)). 4: end for Return x∗= argminx∈A˜µNq 1 (x) 4 2 1 0 1 2 0.0 0.1 0.2 0.3 KG EI 2 1 0 1 2 0.0 0.2 0.4 0.6 dKG dEI Figure 1: KG [44] and EI [39] refer to acquisition functions without gradients. d-KG and d-EI refer to the counterparts with gradients. The topmost plots show (1) the posterior surfaces of a function sampled from a one dimensional GP without and with incorporating observations of the gradients. The posterior variance is smaller if the gradients are incorporated; (2) the utility of sampling each point under the value of information criteria of KG (d-KG) and EI (d-EI) in both settings. If no derivatives are observed, both KG and EI will query a point with high potential gain (i.e. a small expected function value). On the other hand, when gradients are observed, d-KG makes a considerably better sampling decision, whereas d-EI samples essentially the same location as EI. The plots in the bottom row depict the posterior surface after the respective sample. Interestingly, KG benefits more from observing the gradients than EI (the last two plots): d-KG’s observation yields accurate knowledge of the optimum’s location, while d-EI’s observation leaves substantial uncertainty. 3.3 Efficient Exact Computation of d-KG Calculating and maximizing d-KG is difficult when A is continuous because the term minx∈A ˜µ(n+q) 1 (x) in Eq. (3.6) requires optimizing over a continuous domain, and then we must integrate this optimal value through its dependence on y(z(1:q)) and θT ∇y(z(1:q)). Previous work on the knowledge gradient in continuous domains [30, 32, 44] approaches this computation by taking minima within expectations not over the full domain A but over a discretized finite approximation. This approach supports analytic integration in Scott et al. [32] and Poloczek et al. [30], and a sampling-based scheme in Wu and Frazier [44]. However, the discretization in this approach introduces error and scales poorly with the dimension of A. Here we propose a novel method for calculating an unbiased estimator of the gradient of d-KG which we then use within stochastic gradient ascent to maximize d-KG. This method avoids discretization, and thus is exact. It also improves speed significantly over a discretization-based scheme. In Section A of the supplement we show that the d-KG factor can be expressed as d-KG(z(1:q), θ) = En min x∈A ˆµ(n) 1 (x) −min x∈A ˆµ(n) 1 (x) + ˆσ(n) 1 (x, θ, z(1:q))W , (3.7) where ˆµ(n) is the mean function of (f(x), θT ∇f(x)) after n evaluations, W is a 2q dimensional standard normal random column vector and ˆσ(n) 1 (x, θ, z(1:q)) is the first row of a 2 × 2q dimensional matrix, which is related to the kernel function of (f(x), θT ∇f(x)) after n evaluations with an exact form specified in (A.2) of the supplement. Under sufficient regularity conditions [21], one can interchange the gradient and expectation operators, ∇d-KG(z(1:q), θ) = −En ∇min x∈A ˆµ(n) 1 (x) + ˆσ(n) 1 (x, θ, z(1:q))W , where here the gradient is with respect to z(1:q) and θ. If (x, z(1:q), θ) 7→ ˆµ(n) 1 (x) + ˆσ(n) 1 (x, θ, z(1:q))W is continuously differentiable and A is compact, the envelope theorem [25] implies ∇d-KG(z(1:q), θ) = −En h ∇ ˆµ(n) 1 (x∗(W)) + ˆσ(n) 1 (x∗(W), θ, z(1:q))W i , (3.8) where x∗(W) ∈arg minx∈A ˆµ(n) 1 (x) + ˆσ(n) 1 (x, θ, z(1:q))W . To find x∗(W), one can utilize a multi-start gradient descent method since the gradient is analytically available for the objective 5 ˆµ(n) 1 (x) + ˆσ(n) 1 (x, θ, z(1:q))W. Practically, we find that the learning rate of linner t = 0.03/t0.7 is robust for finding x∗(W). The expression (3.8) implies that ∇ ˆµ(n) 1 (x∗(W)) + ˆσ(n) 1 (x∗(W), θ, z(1:q))W is an unbiased estimator of ∇d-KG(z(1:q), θ, A), when the regularity conditions it assumes hold. We can use this unbiased gradient estimator within stochastic gradient ascent [13], optionally with multiple starts, to solve the outer optimization problem argmaxz(1:q),θd-KG(z(1:q), θ) and can use a similar approach when observing full gradients to solve (3.5). For the outer optimization problem, we find that the learning rate of louter t = 10linner t performs well over all the benchmarks we tested. Bayesian Treatment of Hyperparameters. We adopt a fully Bayesian treatment of hyperparameters similar to Snoek et al. [35]. We draw M samples of hyperparameters φ(i) for 1 ≤i ≤M via the emcee package [7] and average our acquisition function across them to obtain d-KGIntegrated(z(1:q), θ) = 1 M M X i=1 d-KG(z(1:q), θ; φ(i)), (3.9) where the additional argument φ(i) in d-KG indicates that the computation is performed conditioning on hyperparameters φ(i). In our experiments, we found this method to be computationally efficient and robust, although a more principled treatment of unknown hyperparameters within the knowledge gradient framework would instead marginalize over them when computing ˜µ(n+q)(x) and ˜µ(n). 3.4 Theoretical Analysis Here we present three theoretical results giving insight into the properties of d-KG, with proofs in the supplementary material. For the sake of simplicity, we suppose all partial derivatives are provided to d-KG. Similar results hold for d-KG with relevant directional derivative detection. We begin by stating that the value of information (VOI) obtained by d-KG exceeds the VOI that can be achieved in the derivative-free setting. Proposition 1. Given identical posteriors ˜µ(n), d-KG(z(1:q)) ≥KG(z(1:q)), where KG is the batch knowledge gradient acquisition function without gradients proposed by Wu and Frazier [44]. This inequality is strict under mild conditions (see Sect. B in the supplement). Next, we show that d-KG is one-step Bayes-optimal by construction. Proposition 2. If only one iteration is left and we can observe both function values and partial derivatives, then d-KG is Bayes-optimal among all feasible policies. As a complement to the one-step optimality, we show that d-KG is asymptotically consistent if the feasible set A is finite. Asymptotic consistency means that d-KG will choose the correct solution when the number of samples goes to infinity. Theorem 1. If the function f(x) is sampled from a GP with known hyperparameters, the d-KG algorithm is asymptotically consistent, i.e. lim N→∞f(x∗(d-KG, N)) = min x∈A f(x) almost surely, where x∗(d-KG, N) is the point recommended by d-KG after N iterations. 4 Experiments We evaluate the performance of the proposed algorithm d-KG with relevant directional derivative detection (Algorithm 1) on six standard synthetic benchmarks (see Fig. 2). Moreover, we examine its ability to tune the hyperparameters for the weighted k-nearest neighbor metric, logistic regression, deep learning, and for a spectral mixture kernel (see Fig. 3). We provide an easy-to-use Python package with the core written in C++, available at https:// github.com/wujian16/Cornell-MOE. 6 We compare d-KG to several state-of-the-art methods: (1) The batch expected improvement method (EI) of Wang et al. [39] that does not utilize derivative information and an extension of EI that incorporates derivative information denoted d-EI. d-EI is similar to Lizotte [22] but handles incomplete gradients and supports batches. (2) The batch GP-UCB-PE method of Contal et al. [5] that does not utilize derivative information, and an extension that does. (3) The batch knowledge gradient algorithm without derivative information (KG) of Wu and Frazier [44]. Moreover, we generalize the method of Osborne et al. [26] to batches and evaluate it on the KNN benchmark. All of the above algorithms allow incomplete gradient observations. In benchmarks that provide the full gradient, we additionally compare to the gradient-based method L-BFGS-B provided in scipy. We suppose that the objective function f is drawn from a Gaussian process GP(µ, Σ), where µ is a constant mean function and Σ is the squared exponential kernel. We sample M = 10 sets of hyperparameters by the emcee package [7]. Recall that the immediate regret is defined as the loss with respect to a global optimum. The plots for synthetic benchmark functions, shown in Fig. 2, report the log10 of immediate regret of the solution that each algorithm would pick as a function of the number of function evaluations. Plots for other experiments report the objective value of the solution instead of the immediate regret. Error bars give the mean value plus and minus one standard deviation. The number of replications is stated in each benchmark’s description. 4.1 Synthetic Test Functions We evaluate all methods on six test functions chosen from Bingham [2]. To demonstrate the ability to benefit from noisy derivative information, we sample additive normally distributed noise with zero mean and standard deviation σ = 0.5 for both the objective function and its partial derivatives. σ is unknown to the algorithms and must be estimated from observations. We also investigate how incomplete gradient observations affect algorithm performance. We also experiment with two different batch sizes: we use a batch size q = 4 for the Branin, Rosenbrock, and Ackley functions; otherwise, we use a batch size q = 8. Fig. 2 summarizes the experimental results. Functions with Full Gradient Information. For 2d Branin on domain [−5, 15] × [0, 15], 5d Ackley on [−2, 2]5, and 6d Hartmann function on [0, 1]6, we assume that the full gradient is available. Looking at the results for the Branin function in Fig. 2, d-KG outperforms its competitors after 40 function evaluations and obtains the best solution overall (within the limit of function evaluations). BFGS makes faster progress than the Bayesian optimization methods during the first 20 evaluations, but subsequently stalls and fails to obtain a competitive solution. On the Ackley function d-EI makes fast progress during the first 50 evaluations but also fails to make subsequent progress. Conversely, d-KG requires about 50 evaluations to improve on the performance of d-EI, after which d-KG achieves the best overall performance again. For the Hartmann function d-KG clearly dominates its competitors over all function evaluations. Functions with Incomplete Derivative Information. For the 3d Rosenbrock function on [−2, 2]3 we only provide a noisy observation of the third partial derivative. Both EI and d-EI get stuck early. d-KG on the other hand finds a near-optimal solution after ∼50 function evaluations; KG, without derivatives, catches up after ∼75 evaluations and performs comparably afterwards. The 4d Levy benchmark on [−10, 10]4, where the fourth partial derivative is observable with noise, shows a different ordering of the algorithms: EI has the best performance, beating even its formulation that uses derivative information. One explanation could be that the smoothness and regular shape of the function surface benefits this acquisition criteria. For the 8d Cosine mixture function on [−1, 1]8 we provide two noisy partial derivatives. d-KG and UCB with derivatives perform better than EI-type criterion, and achieve the best performances, with d-KG beating UCB with derivatives slightly. In general, we see that d-KG successfully exploits noisy derivative information and has the best overall performance. 4.2 Real-World Test Functions Weighted k-Nearest Neighbor. Suppose a cab company wishes to predict the duration of trips. Clearly, the duration not only depends on the endpoints of the trip, but also on the day and time. 7 Figure 2: The average performance of 100 replications (the log10 of the immediate regret vs. the number of function evaluations). d-KG performs significantly better than its competitors for all benchmarks except Levy funcion. In Branin and Hartmann, we also plot black lines, which is the performance of BFGS. In this benchmark we tune a weighted k-nearest neighbor (KNN) metric to optimize predictions of these durations, based on historical data. A trip is described by the pick-up time t, the pick-up location (p1, p2), and the drop-off point (d1, d2). Then the estimate of the duration is obtained as a weighted average over all trips Dm,t in our database that happened in the time interval t ± m minutes, where m is a tunable hyperparameter: Prediction(t, p1, p2, d1, d2) = (P i∈Dm,t durationi × weight(i))/(P i∈Dm,t weight(i)). The weight of trip i ∈Dm,t in this prediction is given by weight(i) = (t −ti)2/l2 1 + (p1 −pi 1)2/l2 2 + (p2 −pi 2)2/l2 3 + (d1 −di 1)2/l2 4 + (d2 −di 2)2/l2 5 −1, where (ti, pi 1, pi 2, di 1, di 2) are the respective parameter values for trip i, and (l1, l2, l3, l4, l5) are tunable hyperparameters. Thus, we have 6 hyperparameters to tune: (m, l1, l2, l3, l4, l5). We choose m in [30, 200], l2 1 in [101, 108], and l2 2, l2 3, l2 4, l2 5 each in [10−8, 10−1]. We use the yellow cab NYC public data set from June 2016, sampling 10000 records from June 1 – 25 as training data and 1000 trip records from June 26 – 30 as validation data. Our test criterion is the root mean squared error (RMSE), for which we compute the partial derivatives on the validation dataset with respect to the hyperparameters (l1, l2, l3, l4, l5), while the hyperparameter m is not differentiable. In Fig. 3 we see that d-KG overtakes the alternatives, and that UCB and KG acquisition functions also benefit from exploiting derivative information. Kernel Learning. Spectral mixture kernels [40] can be used for flexible kernel learning to enable long-range extrapolation. These kernels are obtained by modeling a spectral density by a mixture of Gaussians. While any stationary kernel can be described by a spectral mixture kernel with a particular setting of its hyperparameters, initializing and learning these parameters can be difficult. Although we have access to an analytic closed form of the (marginal likelihood) objective, this function is (i) expensive to evaluate and (ii) highly multimodal. Moreover, (iii) derivative information is available. Thus, learning flexible kernel functions is a perfect candidate for our approach. The task is to train a 2-component spectral mixture kernel on an airline data set [40]. We must determine the mixture weights, means, and variances, for each of the two Gaussians. Fig. 3 summarizes performance for batch size q = 8. BFGS is sensitive to its initialization and human intervention and is often trapped in local optima. d-KG, on other hand, more consistently finds a good solution, and obtains the best solution of all algorithms (within the step limit). Overall, we observe that gradient information is highly valuable in performing this kernel learning task. 8 Logistic Regression and Deep Learning. We tune logistic regression and a feedforward neural network with 2 hidden layers on the MNIST dataset [20], a standard classification task for handwritten digits. The training set contains 60000 images, the test set 10000. We tune 4 hyperparameters for logistic regression: the ℓ2 regularization parameter from 0 to 1, learning rate from 0 to 1, mini batch size from 20 to 2000 and training epochs from 5 to 50. The first derivatives of the first two parameters can be obtained via the technique of Maclaurin et al. [23]. For the neural network, we additionally tune the number of hidden units in [50, 500]. Fig. 3 reports the mean and standard deviation of the mean cross-entropy loss (or its log scale) on the test set for 20 replications. d-KG outperforms the other approaches, which suggests that derivative information is helpful. Our algorithm proves its value in tuning a deep neural network, which harmonizes with research computing the gradients of hyperparameters [23, 27]. Figure 3: Results for the weighted KNN benchmark, the spectral mixture kernel benchmark, logistic regression and deep neural network (from left to right), all with batch size 8 and averaged over 20 replications. 5 Discussion Bayesian optimization is successfully applied to low dimensional problems where we wish to find a good solution with a very small number of objective function evaluations. We considered several such benchmarks, as well as logistic regression, deep learning, kernel learning, and k-nearest neighbor applications. We have shown that in this context derivative information can be extremely useful: we can greatly decrease the number of objective function evaluations, especially when building upon the knowledge gradient acquisition function, even when derivative information is noisy and only available for some variables. Bayesian optimization is increasingly being used to automate parameter tuning in machine learning, where objective functions can be extremely expensive to evaluate. For example, the parameters to learn through Bayesian optimization could even be the hyperparameters of a deep neural network. We expect derivative information with Bayesian optimization to help enable such promising applications, moving us towards fully automatic and principled approaches to statistical machine learning. In the future, one could combine derivative information with flexible deep projections [43], and recent advances in scalable Gaussian processes for O(n) training and O(1) test time predictions [41, 42]. These steps would help make Bayesian optimization applicable to a much wider range of problems, wherever standard gradient based optimizers are used – even when we have analytic objective functions that are not expensive to evaluate – while retaining faster convergence and robustness to multimodality. Acknowledgments Wilson was partially supported by NSF IIS-1563887. Frazier, Poloczek, and Wu were partially supported by NSF CAREER CMMI-1254298, NSF CMMI-1536895, NSF IIS-1247696, AFOSR FA9550-12-1-0200, AFOSR FA9550-15-1-0038, and AFOSR FA9550-16-1-0046. References [1] M. O. Ahmed, B. Shahriari, and M. Schmidt. Do we need “harmless” bayesian optimization and “first-order” bayesian optimization? In NIPS BayesOpt, 2016. 9 [2] D. Bingham. Optimization test problems. http://www.sfu.ca/~ssurjano/optimization. html, 2015. [3] E. Brochu, V. M. Cora, and N. De Freitas. A tutorial on bayesian optimization of expensive cost functions, with application to active user modeling and hierarchical reinforcement learning. arXiv preprint arXiv:1012.2599, 2010. [4] N. T. . L. Commission. NYC Trip Record Data. http://www.nyc.gov/html/tlc/, June 2016. Last accessed on 2016-10-10. [5] E. Contal, D. Buffoni, A. Robicquet, and N. Vayatis. Parallel gaussian process optimization with upper confidence bound and pure exploration. In Machine Learning and Knowledge Discovery in Databases, pages 225–240. Springer, 2013. [6] T. Desautels, A. Krause, and J. W. Burdick. Parallelizing exploration-exploitation tradeoffs in gaussian process bandit optimization. The Journal of Machine Learning Research, 15(1): 3873–3923, 2014. [7] D. Foreman-Mackey, D. W. Hogg, D. Lang, and J. Goodman. emcee: the mcmc hammer. Publications of the Astronomical Society of the Pacific, 125(925):306, 2013. [8] A. Forrester, A. Sobester, and A. Keane. Engineering design via surrogate modelling: a practical guide. John Wiley & Sons, 2008. [9] P. Frazier, W. Powell, and S. Dayanik. The knowledge-gradient policy for correlated normal beliefs. INFORMS Journal on Computing, 21(4):599–613, 2009. [10] J. R. Gardner, M. J. Kusner, Z. E. Xu, K. Q. Weinberger, and J. Cunningham. Bayesian optimization with inequality constraints. In International Conference on Machine Learning, pages 937–945, 2014. [11] M. Gelbart, J. Snoek, and R. Adams. Bayesian optimization with unknown constraints. In International Conference on Machine Learning, pages 250–259, Corvallis, Oregon, 2014. [12] J. Gonzalez, Z. Dai, P. Hennig, and N. Lawrence. Batch bayesian optimization via local penalization. In AISTATS, pages 648–657, 2016. [13] J. Harold, G. Kushner, and G. Yin. Stochastic approximation and recursive algorithm and applications. Springer, 2003. [14] J. M. Hernández-Lobato, M. W. Hoffman, and Z. Ghahramani. Predictive entropy search for efficient global optimization of black-box functions. In Advances in Neural Information Processing Systems, pages 918–926, 2014. [15] D. Huang, T. T. Allen, W. I. Notz, and N. Zeng. Global Optimization of Stochastic Black-Box Systems via Sequential Kriging Meta-Models. Journal of Global Optimization, 34(3):441–466, 2006. [16] A. Jameson. Re-engineering the design process through computation. Journal of Aircraft, 36 (1):36–50, 1999. [17] D. R. Jones, M. Schonlau, and W. J. Welch. Efficient global optimization of expensive black-box functions. Journal of Global optimization, 13(4):455–492, 1998. [18] T. Kathuria, A. Deshpande, and P. Kohli. Batched gaussian process bandit optimization via determinantal point processes. In Advances in Neural Information Processing Systems, pages 4206–4214, 2016. [19] O.-P. Koistinen, E. Maras, A. Vehtari, and H. Jónsson. Minimum energy path calculations with gaussian process regression. Nanosystems: Physics, Chemistry, Mathematics, 7(6), 2016. [20] Y. LeCun, C. Cortes, and C. J. Burges. The mnist database of handwritten digits, 1998. [21] P. L’Ecuyer. Note: On the interchange of derivative and expectation for likelihood ratio derivative estimators. Management Science, 41(4):738–747, 1995. 10 [22] D. J. Lizotte. Practical bayesian optimization. PhD thesis, University of Alberta, 2008. [23] D. Maclaurin, D. Duvenaud, and R. P. Adams. Gradient-based hyperparameter optimization through reversible learning. In International Conference on Machine Learning, pages 2113– 2122, 2015. [24] S. Marmin, C. Chevalier, and D. Ginsbourger. Efficient batch-sequential bayesian optimization with moments of truncated gaussian vectors. arXiv preprint arXiv:1609.02700, 2016. [25] P. Milgrom and I. Segal. Envelope theorems for arbitrary choice sets. Econometrica, 70(2): 583–601, 2002. [26] M. A. Osborne, R. Garnett, and S. J. Roberts. Gaussian processes for global optimization. In 3rd International Conference on Learning and Intelligent Optimization (LION3), pages 1–15. Citeseer, 2009. [27] F. Pedregosa. Hyperparameter optimization with approximate gradient. In International Conference on Machine Learning, pages 737–746, 2016. [28] V. Picheny, D. Ginsbourger, Y. Richet, and G. Caplin. Quantile-based optimization of noisy computer experiments with tunable precision. Technometrics, 55(1):2–13, 2013. [29] R.-É. Plessix. A review of the adjoint-state method for computing the gradient of a functional with geophysical applications. Geophysical Journal International, 167(2):495–503, 2006. [30] M. Poloczek, J. Wang, and P. I. Frazier. Multi-information source optimization. In Advances in Neural Information Processing Systems, 2017. Accepted for publication. ArXiv preprint 1603.00389. [31] C. E. Rasmussen and C. K. I. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. ISBN 0-262-18253-X. [32] W. Scott, P. Frazier, and W. Powell. The correlated knowledge gradient for simulation optimization of continuous parameters using gaussian process regression. SIAM Journal on Optimization, 21(3):996–1026, 2011. [33] A. Shah and Z. Ghahramani. Parallel predictive entropy search for batch global optimization of expensive objective functions. In Advances in Neural Information Processing Systems, pages 3312–3320, 2015. [34] B. Shahriari, K. Swersky, Z. Wang, R. P. Adams, and N. de Freitas. Taking the human out of the loop: A review of bayesian optimization. Proceedings of the IEEE, 104(1):148–175, 2016. [35] J. Snoek, H. Larochelle, and R. P. Adams. Practical bayesian optimization of machine learning algorithms. In Advances in Neural Information Processing Systems, pages 2951–2959, 2012. [36] J. Snyman. Practical mathematical optimization: an introduction to basic optimization theory and classical and new gradient-based algorithms, volume 97. Springer Science & Business Media, 2005. [37] N. Srinivas, A. Krause, M. Seeger, and S. M. Kakade. Gaussian process optimization in the bandit setting: No regret and experimental design. In International Conference on Machine Learning, pages 1015–1022, 2010. [38] K. Swersky, J. Snoek, and R. P. Adams. Multi-task bayesian optimization. In Advances in Neural Information Processing Systems, pages 2004–2012, 2013. [39] J. Wang, S. C. Clark, E. Liu, and P. I. Frazier. Parallel bayesian global optimization of expensive functions. arXiv preprint arXiv:1602.05149, 2016. [40] A. G. Wilson and R. P. Adams. Gaussian process kernels for pattern discovery and extrapolation. In International Conference on Machine Learning, pages 1067–1075, 2013. [41] A. G. Wilson and H. Nickisch. Kernel interpolation for scalable structured gaussian processes (kiss-gp). In International Conference on Machine Learning, pages 1775–1784, 2015. 11 [42] A. G. Wilson, C. Dann, and H. Nickisch. Thoughts on massively scalable gaussian processes. arXiv preprint arXiv:1511.01870, 2015. [43] A. G. Wilson, Z. Hu, R. Salakhutdinov, and E. P. Xing. Deep kernel learning. In Proceedings of the 19th International Conference on Artificial Intelligence and Statistics, pages 370–378, 2016. [44] J. Wu and P. Frazier. The parallel knowledge gradient method for batch bayesian optimization. In Advances in Neural Information Processing Systems, pages 3126–3134, 2016. 12 | 2017 | 262 |
6,744 | Visual Reference Resolution using Attention Memory for Visual Dialog Paul Hongsuck Seo† Andreas Lehrmann§ Bohyung Han† Leonid Sigal§ †POSTECH §Disney Research {hsseo, bhhan}@postech.ac.kr {andreas.lehrmann, lsigal}@disneyresearch.com Abstract Visual dialog is a task of answering a series of inter-dependent questions given an input image, and often requires to resolve visual references among the questions. This problem is different from visual question answering (VQA), which relies on spatial attention (a.k.a. visual grounding) estimated from an image and question pair. We propose a novel attention mechanism that exploits visual attentions in the past to resolve the current reference in the visual dialog scenario. The proposed model is equipped with an associative attention memory storing a sequence of previous (attention, key) pairs. From this memory, the model retrieves the previous attention, taking into account recency, which is most relevant for the current question, in order to resolve potentially ambiguous references. The model then merges the retrieved attention with a tentative one to obtain the final attention for the current question; specifically, we use dynamic parameter prediction to combine the two attentions conditioned on the question. Through extensive experiments on a new synthetic visual dialog dataset, we show that our model significantly outperforms the state-of-the-art (by ≈16 % points) in situations, where visual reference resolution plays an important role. Moreover, the proposed model achieves superior performance (≈2 % points improvement) in the Visual Dialog dataset [1], despite having significantly fewer parameters than the baselines. 1 Introduction In recent years, advances in the design and optimization of deep neural network architectures have led to tremendous progress across many areas of computer vision (CV) and natural language processing (NLP). This progress, in turn, has enabled a variety of multi-modal applications spanning both domains, including image captioning [2–4], language grounding [5, 6], image generation from captions [7,8], and visual question answering (VQA) on images [9–21] and videos [22–24]. The VQA task, in particular, has received broad attention because its formulation requires a universal understanding of image content. Most state-of-the-art methods [10,13,15] address this inherently challenging problem through an attention mechanism [3] that allows to visually ground linguistic expressions; they identify the region of visual interest referred to by the question and predict the answer based on the visual information in that region. More recently, Visual Dialog [1] has been introduced as a generalization of the VQA task. Unlike VQA, where every question is asked independently, a visual dialog system needs to answer a sequence of questions about an input image. The sequential and inter-dependent property of questions in a dialog presents additional challenges. Consider the simple image and partial dialog in Figure 1. Some questions (e.g., #1: ‘How many 9’s are there in the image?’) contain the full information needed to attend to the regions within the image and answer the question accurately. Other questions (e.g., #6: ‘What is the number of the blue digit?’) are ambiguous on their own and require knowledge obtained from the prior questions (1, 2, 3, and 5 in particular) in order to resolve attention to the specific region 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. # Question Answer 1 How many 9’s are there in the image? four 2 How many brown digits are there among them? one 3 What is the background color of the digit at the left of it? white 4 What is the style of the digit? flat 5 What is the color of the digit at the left of it? blue 6 What is the number of the blue digit? 4 7 Are there other blue digits? two Figure 1: Example from MNIST Dialog. Each pair consists of an image (left) and a set of sequential questions with answers (right). the expression (‘the blue digit’) is referring to. This process of visual reference resolution1 is the key component required to localize attention accurately in the presence of ambiguous expressions and thus plays a crucial role in extending VQA approaches to the visual dialog task. We perform visual reference resolution relying on a novel attention mechanism that employs an associative memory to obtain a visual reference for an ambiguous expression. The proposed model utilizes two types of intermediate attentions: tentative and retrieved ones. The tentative attention is calculated solely based on the current question (and, optionally, the dialog history), and is capable of focusing on an appropriate region when the question is unambiguous. The retrieved attention, used for visual reference resolution, is the most relevant previous attention available in the associative memory. The final attention for the current question is obtained by combining the two attention maps conditioned on the question; this is similar to neural module networks [12,14], which dynamically combine discrete attention modules, based on a question, to produce the final attention. For this task, our model adopts a dynamic parameter layer [9] that allows us to work with continuous space of dynamic parametrizations, as opposed to the discrete set of parametrizations in [12,14]. Contributions We make the following contributions. (1) We introduce a novel attention process that, in addition to direct attention, resolves visual references by modeling the sequential dependency of the current question on previous attentions through an associative attention memory; (2) We perform a comprehensive analysis of the capacity of our model for the visual reference resolution task using a synthetic visual dialog dataset (MNIST dialog) and obtain superior performance compared to all baseline models. (3) We test the proposed model in a visual dialog benchmark (VisDial [1]) and show state-of-the-art performance with significantly fewer parameters. 2 Related Work Visual Dialog Visual dialogs were recently proposed in [1] and [25], focusing on different aspects of a dialog. While the conversations in the former contain free-form questions about arbitrary objects, the dialogs in the latter aim at object discovery through a series of yes/no questions. Reinforcement learning (RL) techniques were built upon those works in [26] and [27]. Das et al. [26] train two agents by playing image guessing games and show that they establish their own communication protocol and style of speech. In [27], RL is directly used to improve the performance of agents in terms of the task completion rate of goal-oriented dialogs. However, the importance of previous references has not yet been explored in the visual dialog task. Attention for Visual Reference Resolution While visual dialog is a recent task, VQA has been studied extensively and attention models have been known to be beneficial for answering independent questions [10–16]. However, none of those methods incorporate visual reference resolution, which is neither necessary nor possible in VQA but essential in visual dialog. Beyond VQA, attention models are used to find visual groundings of linguistic expressions in a variety of other multi-modal tasks, such as image captioning [3,4], VQA in videos [22], and visual attributes prediction [28]. Common to most of these works, an attention is obtained from a single embedding of all linguistic inputs. Instead, we propose a model that embeds each question in a dialog separately and calculates the current question’s attention by resolving its sequential dependencies through an attention memory and a dynamic attention combination process. We calculate an attention through a dynamic composition 1We coin this term by borrowing nomenclature, partially, from NLP, where coreference resolution attempts to solve the corresponding problem in language; the visual in visual reference resolution implies that we want to do both resolve and visually ground the reference used in the question. 2 (a) RNN question 𝑞 (d) fc 𝒄𝑡 (b) HRNN history 𝐻 (c) CNN image 𝐼 (e) attention process 𝒇 attention memory 𝒇𝑡 att 𝒌𝑡 mem 𝜶𝑡 𝒄𝑡 (f) fc (g) answer decoder 𝒆𝑡 (h) key generation 𝑦𝑡 𝒄𝑡 𝒌𝑡 Figure 2: Architecture of the proposed network. The gray box represents the proposed attention process. Refer to Section 3 for the detailed description about individual modules (a)-(f). process taking advantage of a question’s semantic structure, which is similar to [12] and [14]. However, the proposed method still differs in that our attention process is designed to deal with ambiguous expressions in dialogs by dynamically analyzing the dependencies of questions at each time step. In contrast, [12] and [14] obtain the attention for a question based on its compositional semantics that is completely given at the time of the network structure prediction. Memory for Question Answering Another line of closely related works is the use of a memory component to question answering models. Memory networks with end-to-end training are first introduced in [29], extending the original memory network [30]. The memories in these works are used to store some factoids in a given story and the supporting facts for answering questions are selectively retrieved through memory addressing. A memory network with an episodic memory was proposed in [31] and applied to VQA by storing the features at different locations of the memory [32]. While these memories use the contents themselves for addressing, [33] proposes associative memories that have a key-value pair at each entry and use the keys for addressing the value to be retrieved. Finally, the memory component is also utilized for visual dialog in [1] to actively select the previous question in the history. Memories in these previous memory networks store given factoids to retrieve a supporting fact. In contrast, our attention memory stores previous attentions, which represent grounded references for previous questions, to resolve the current reference based on the sequential dependency of the referring expressions. Moreover, we adopt an associative memory to use the semantics of QA pairs for addressing. 3 Visual Dialog Model with Attention Memory-based Reference Resolution Visual dialog is the task of building an agent capable of answering a sequence of questions presented in the form of a dialog. Formally, we need to predict an answer yt ∈Y, where Y is a set of discrete answers or a set of natural language phrases/sentences, at time t given input image I, current question qt, and dialog history H = {hτ| hτ = (qτ, yτ) , 0 ≤τ < t}. We utilize the encoder-decoder architecture recently introduced in [1], which is illustrated in Figure 2. Specifically, we represent a triplet (q, H, I) with et by applying three different encoders, based on recurrent (RNN with long-short term memory units), hierarchical recurrent (HRNN)2 and convolutional (CNN) neural networks, followed by attention and fusion units (Figure 2 (a)-(f)). Our model then decodes the answer yt from the encoded representation et (Figure 2 (g)). Note that, to obtain the encoded representation et, the CNN image feature map f computed from I undergoes a soft spatial attention process guided by the combination of qt and H as follows: ct = fc(RNN(qt), HRNN(H)) (1) f att t = [αt(ct)]⊤· f = N X n=1 αt,n(ct) · fn, (2) where fc (Figure 2 (d)) denotes a fully connected layer, αn(ct) is the attention map conditioned on a fused encoding of qt and H, n is the location index in the feature map, and N is the size of the spatial grid of the feature map. This attention mechanism is the critical component that allows the decoder to focus on relevant regions of the input image; it is also the main focus of this paper. 2The questions and the answers of a history are independently embedded using LSTMs and then fused by a fc layer with concatenation to form QA encodings. The fused QA embedding at each time step is finally fed to another LSTM and the final output is used for the history encoding. 3 … … attention retrieval 𝜶𝜏 𝒌𝜏 𝒄𝑡 𝜶𝑡 mem 𝒌𝑡 mem tentative attention 𝒇 𝜶𝑡 tent 𝑾DPL 𝒄𝑡 𝜶𝑡 dynamic combination 𝒄𝑡 (a) Dynamic combination of attentions … 𝒌0 𝒌1 𝒌𝑡−1 … … 𝜶0 𝜶1 𝜶𝑡−1 𝜷𝑡 ∑ ∑ 𝑾mem𝒄𝑡 𝜶𝑡 mem 𝒌𝑡 mem keys attentions (b) Attention retrieval from memory Figure 3: Attention process for visual dialog task. (a) The tentative and relevant attentions are first obtained independently and then dynamically combined depending on the question embedding. (b) Two boxes represent memory containing attentions and corresponding keys. Question embedding ct is projected by W mem and compared with keys using inner products, denoted by crossed circles, to generate address vector βt. The address vector is then used as weights for computing a weighted average of all memory entries, denoted by Σ within circle, to retrieve memory entry (αmem t , kmem t ). We make the observation that, for certain questions, attention can be resolved directly from ct. This is called tentative attention and denoted by αtent t . This works well for questions like #1 in Figure 1, which are free from dialog referencing. For other questions like #6, resolving reference linguistically would be difficult (e.g., linguistic resolution may look like: ‘What number of the digit to the left to the left of the brown 9’). That said, #6 is straightforward to answer if the attention utilized to answer #5 is retrieved. This process of visual reference resolution gives rise to attention retrieval αmem t from the memory. The final attention αt(ct) is computed using dynamic parameter layer, where the parameters are conditioned on ct. To summarize, an attention is composed of three steps in the proposed model: tentative attention, relevant attention retrieval, and dynamic attention fusion as illustrated in Figure 3a. We describe the details of each step below. 3.1 Tentative Attention We calculate the tentative attention by computing similarity, in the joint embedding space, of the encoding of the question and history, ct, and each feature vector, fn, in the image feature grid f: st,n = Wtent c ct ⊤ Wtent f fn (3) αtent t = softmax ({st,n, 1 < n < N}) , (4) where Wtent c and Wtent f are projection matrices for the question and history encoding and the image feature vector, respectively, and st,n is an attention score for a feature at the spatial location n. 3.2 Relevant Attention Retrieval from Attention Memory As a reminder, in addition to the tentative attention, our model obtains the most relevant previous attention using an attention memory for visual reference resolution. Associative Attention Memory The proposed model is equipped with an associative memory, called an attention memory, to store previous attentions. The attention memory Mt = {(α0, k0) , (α1, k1) , . . . , (αt−1, kt−1)} stores all the previous attention maps ατ with their corresponding keys kτ for associative addressing. Note that α0 is NULL attention and set to all zeros. The NULL attention can be used when no previous attention reference is required for the current reference resolution. 4 The most relevant previous attention is retrieved based on the key comparison as illustrated in Figure 3b. Formally, the proposed model addresses the memory given the embedding of the current question and history ct using mt,τ = (W memct)⊤kτ and βt = softmax ({mt,τ, 0 < τ < t −1}) , (5) where W mem projects the question and history encoding onto the semantic space of the memory keys. The relevant attention αmem t and key kmem t are then retrieved from the attention memory using the computed addressing vector βt by αmem t = t−1 X τ=0 βt,τατ and kmem t = t−1 X τ=0 βt,τkτ. (6) This relevant attention retrieval allows the proposed model to resolve the visual reference by indirectly resolving coreferences [34–36] through the memory addressing process. Incorporating Sequential Dialog Structure While the associative addressing is effective in retrieving the most relative attention based on the question semantics, we can improve the performance by incorporating sequential structure of the questions in a dialog. Considering that more recent attentions are more likely to be referred again, we add an extra term to Eq. (5) that allows preference for sequential addressing, i.e., m′ t,τ = (W memct)⊤kτ + θ (t −τ) where θ is a learnable parameter weighting the relative time distance (t −τ) from the current time step. 3.3 Dynamic Attention Combination After obtaining both attentions, the proposed model combines them. The two attention maps αtent t and αmem t are first stacked and fed to a convolution layer to locally combine the attentions. After generating the locally combined attention features, it is flattened and fed to a fully connected (fc) layer with softmax generating the final attention map. However, a fc layer with fixed weights would always result in the same type of combination although the merging process should, as we argued previously, depend on the question. Therefore, we adopt the dynamic parameter layer introduced in [9] to adapt the weights of the fc layer conditioned on the question at test time. Formally, the final attention map αt(ct) for time t is obtained by αt(ct) = softmax W DPL (ct) · γ(αtent t , αmem t ) , (7) where W DPL(ct) are the dynamically determined weights and γ(αtent t , αmem t ) is the flattened output of the convolution obtained from the stacked attention maps. As in [9], we use a hashing technique to predict the dynamic parameters without explosive increase of network size. 3.4 Additional Components and Implementation In addition to the attended image feature, we find other information useful for answering the question. Therefore, for the final encoding et at time step t, we fuse the attended image feature embedding f att t with the context embedding ct, the attention map αt and the retrieved key kmem t from the memory, by a fc layer after concatenation (Figure 2f). Finally, when we described the associative memory in Section 3, we did not specify the memory key generation procedure. In particular, after answering the current question, we append the computed attention map to the memory. When storing the current attention into memory, the proposed model generates a key kt by fusing the context embedding ct with the current answer embedding at through a fc layer (Figure 2h). Note that an answer embedding at is obtained using LSTM. Learning Since all the modules of the proposed network are fully differentiable, the entire network can be trained end-to-end by standard gradient-based learning algorithms. 4 Experiments We conduct two sets of experiments to verify the proposed model. To highlight the model’s ability to resolve visual references, we first perform experiment with a synthetic dataset that is explicitly designed to contain ambiguous expressions and strong inter-dependency among questions in the visual dialog. We then show that the model also works well in the real VisDial [1] benchmark. 5 Basemodel +H +SEQ Accuracy I – – 20.18 Q – – 36.58 ✓ – 37.58 LF [1] ✓ – 45.06 HRE [1] ✓ – 49.10 MN [1] ✓ – 48.51 ATT – – 62.62 ✓ – 79.72 AMEM – – 87.53 ✓ – 89.20 – ✓ 90.05 ✓ ✓ 96.39 2 4 6 8 10 dialog step ID 0.6 0.7 0.8 0.9 1.0 accuracy ATT ATT+H AMEM AMEM+H+SEQ Figure 4: Results on MNIST Dialog. Answer prediction accuracy [%] of all models for all questions (left) and accuracy curves of four models at different dialog steps (right). +H and +SEQ represent the use of history embeddings in models and addressing with sequential preference, respectively. 4.1 MNIST Dialog Dataset Experimental Setting We create a synthetic dataset, called MNIST Dialog3, which is designed for the analysis of models in the task of visual reference resolution with ambiguous expressions. Each image in MNIST Dialog contains a 4 × 4 grid of MNIST digits and each MNIST digit in the grid has four randomly sampled attributes, i.e., color = {red, blue, green, purple, brown}, bgcolor = {cyan, yellow, white, silver, salmon}, number = {x|0 ≤x ≤9} and style = {flat, stroke}, as illustrated in Figure 1. Given the generated image from MNIST Dialog, we automatically generate questions and answers about a subset of the digits in the grid that focus on visual reference resolution. There are two types of questions: (i) counting questions and (ii) attribute questions that refer to a single target digit. During question generation, the target digits for a question is selected based on a subset of the previous targets referred to by ambiguous expressions, as shown in Figure 1. For ease of evaluation, we generate a single word answer rather than a sentence for each question and there are a total of 38 possible answers ( 1 38 chance performance). We generated 30K / 10K / 10K images for training / validation / testing, respectively, and three ten-question dialogs for each image. The dimensionality of the word embedding and the hidden state in the LSTMs are set to 32 and 64, respectively. All LSTMs are single-layered. Since answers are single words, the answer embedding RNN is replaced with a word embedding layer in both the history embedding module and the memory key generation module. The image feature extraction module is formed by stacking four 3 × 3 convolutional layers with a subsequent 2 × 2 pooling layer. The first two convolutional layers have 32 channels, while there are 64 channels in the last two. Finally, we use 512 weight candidates to hash the dynamic parameters of the attention combination process. The entire network is trained end-to-end by minimizing the cross entropy of the predicted answer distribution at every step of the dialogs. We compare our model (AMEM) with three different groups of baselines. The simple baselines show the results of using statistical priors, where answers are obtained using image (I) or question (Q) only. We also implement the late fusion model (LF), the hierarchical recurrent encoder with attention (HREA) and the memory network encoder (MN) introduced in [1]. Additionally, an attention-based model (ATT), which directly uses tentative attention, without memory access, is implemented as a strong baseline. For some models, two variants are implemented: one using history embeddings and the other one not. These variations give us insights on the effect of using history contexts and are distinguished by +H. Finally, another two versions of the proposed model, orthogonal to the previous ones, are implemented with and without the sequential preference in memory addressing (see above), which is denoted by +SEQ. Results Figure 4 shows the results on MNIST Dialog. The answer prediction accuracy over all questions of dialogs is presented in the table on the left. It is noticeable that the models using attention mechanisms (AMEM and ATT) significantly outperform the previous baseline models (LF, HRE and MN) introduced in [1], while these baselines still perform better than the simple baseline models. This signifies the importance of attention in answering questions, consistent with previous works [10–14]. 3The dataset is available at http://cvlab.postech.ac.kr/research/attmem 6 2 4 6 8 10 relative time distance (t ) 0.0 0.1 0.2 0.3 0.4 coefficient t AMEM AMEM+SEQ Figure 5: Memory addressing coefficients with and without sequential preference. Both models put large weights on recent elements (smaller relative time difference) to deal with the sequential structure of dialogs. 40 20 0 20 40 40 20 0 20 40 attribute counting 40 20 0 20 40 40 20 0 20 40 no_relation left right below above 40 20 0 20 40 40 20 0 20 40 targets sub_targets Figure 6: Characteristics of dynamically predicted weights for attention combination. Dynamic weights are computed from 1,500 random samples at dialog step 3 and plotted by t-SNE. Each figure presents clusters formed by different semantics of questions. (left) Clusters generated by different question types. (middle) Subclusters formed by types of spatial relationships in attribute questions. (right) Subclusters formed by ways of specifying targets in counting questions; cluster sub_targets contains questions whose current target digits are included in the targets of the previous question. Extending ATT to incorporate history embeddings during attention map estimation increases the accuracy by about 17%, resulting in a strong baseline model. However, even the simplest version of the proposed model, which does not use history embeddings or addressing with sequential preference, already outperforms the strong baseline by a large margin. Note that this model still has indirect access to the history through the attention memory, although it does not have direct access to the encodings of past question/answer pairs when computing the attention. This signifies that the use of the attention memory is more helpful in resolving the current reference (and computing attention), compared to a method that uses more traditional tentative attention informed by the history encoding. Moreover, the proposed model with history embeddings further increases the accuracy by 1.7%. The proposed model reaches >96% accuracy when the sequential structure of dialogs is taken into account by the sequential preference in memory addressing. We also present the accuracies of the answers at each dialog step for four models that use attentions in Figure 4 (right). Notably, the accuracy of ATT drops very fast as the dialog progresses and reference resolution is needed. Adding history embeddings to the tentative attention calculation somewhat reduces the degradation. The use of the attention memory gives a very significant improvement, particularly at later steps in the dialog when complex reference resolution is needed. Parameter Analysis When we observed the learned parameter θ for the sequential preference, it is consistently negative in all experiments; it means that all models prefer recent elements. A closer look at the addressing coefficients βt with and without the sequential preference reveals that both variants have a clear preferences for recent elements, as depicted in Figure 5. It is interesting that the case without the bias term shows a stronger preference for recent information, but its final accuracy is lower than the version with the bias term. It seems that W mem without bias puts too much weight on recent elements, resulting in worse performance. Based on this observation, we learn W mem and θ jointly to find better coefficients than W mem alone. The dynamically predicted weights form clusters with respect to the semantics of the input questions as illustrated in Figure 6, where 1,500 random samples at step 3 of dialogs are visualized using t-SNE. In Figure 6 (left), the two question types (attribute and counting) create distinct clusters. Each of 7 History: Are there any 9's in the image ? three How many digits in a yellow background are there among them ? one What is the color of the digit ? red What is the color of the digit at the right of it ? blue What is the style of the blue digit ? flat Current QA: What is the color of the digit at the right of it ? violet Retrieved attention from memory Final attention Manually modified retrieved attention Final attention Predicted answer: violet Input image Predicted answer: green Figure 7: Qualitative analysis on MNIST Dialog. Given an input image and a series of questions with their visual grounding history, we present the memory retrieved and final attentions for the current question in the second and third columns, respectively. The proposed network correctly attends to target reference and predicts correct answer. The last two columns present the manually modified attention and the final attention obtained from the modified attention, respectively. Experiment shows consistency of transformation between attentions and semantic interpretability of our model. these, in turn, contains multiple sub-clusters formed by other semantics, as presented in Figure 6 (middle) and (right). In the cluster of attribute questions, sub-clusters are mainly made by types of spatial relationship used to specify the target digit (e.g., #3 in Figure 1), whereas sub-clusters in counting questions are based on whether the target digits of the question are selected from the targets of the previous question or not (e.g., #1 vs. #2 in Figure 1). Figure 7 illustrates qualitative results. Based on the history of attentions stored in the attention memory, the proposed model retrieves the previous reference as presented in the second column. The final attention for the current question is then calculated by manipulating the retrieved attention based on the current question. For example, the current question in Figure 7 refers to the right digit of the previous reference, and the model identifies the target reference successfully (column 3) as the previous reference (column 2) is given accurately by the retrieved attention. To investigate consistency with respect to attention manipulation, we move the region of the retrieved attention manually (column 4) and observe the final attention map calculated from the modified attention (column 5). It is clear that our reference resolution procedure works consistently even with the manipulated attention and responds to the question accordingly. This shows a level of semantic interpretability of our model. See more qualitative results in Section A of our supplementary material. 4.2 Visual Dialog (VisDial) Dataset Experimental Setting In the VisDial [1] dataset4, the dialogs are collected from MS-COCO [37] images and their captions. Each dialog is composed of an image, a caption, and a sequence of ten QA pairs. Unlike in MNIST Dialog, answers to questions in VisDial are in free form text. Since each dialog always starts with an initial caption annotated in MS-COCO, the initial history is always constructed using the caption. The dataset provides 100 answer candidates for each question and accuracy of a question is measured by the rank of the matching ground-truth answer. Note that this dataset is less focused on visual reference resolution and contains fewer ambiguous expressions compared to MNIST Dialog. We estimate the portion of questions containing ambiguous expressions to be 94% and 52% in MNIST Dial and VisDial, respectively5. While we compare our model with various encoders introduced in [1], we fix the decoder to a discriminative decoder that directly ranks the answer candidates through their embeddings. Our baselines include three visual dialog models, i.e., late fusion model (LF), hierarchical recurrent encoder (HRE) and memory network encoder (MN), and two attention based VQA models (SAN and 4We use recently released VisDial v0.9 with the benchmark splits [1]. 5We consider pronouns and definite noun phrases as ambiguous expressions and count them using a POS tagger in NLTK (http://www.nltk.org/). 8 Table 1: Experimental results on VisDial. We show the number of parameters, mean reciprocal rank (MRR), recall@k and mean rank (MR). +H and ATT indicate use of history embeddings in prediction and attention mechanism, respectively. Model +H ATT # of params MRR R@1 R@5 R@10 MR Answer prior [1] – – n/a 0.3735 23.55 48.52 53.23 26.50 LF-Q [1] – – 8.3 M (3.6x) 0.5508 41.24 70.45 79.83 7.08 LF-QH [1] ✓ – 12.4 M (5.4x) 0.5578 41.75 71.45 80.94 6.74 LF-QI [1] – – 10.4 M (4.6x) 0.5759 43.33 74.27 83.68 5.87 LF-QIH [1] ✓ – 14.5 M (6.3x) 0.5807 43.82 74.68 84.07 5.78 HRE-QH [1] ✓ – 15.0 M (6.5x) 0.5695 42.70 73.25 82.97 6.11 HRE-QIH [1] ✓ – 16.8 M (7.3x) 0.5846 44.67 74.50 84.22 5.72 HREA-QIH [1] ✓ – 16.8 M (7.3x) 0.5868 44.82 74.81 84.36 5.66 MN-QH [1] ✓ – 12.4 M (5.4x) 0.5849 44.03 75.26 84.49 5.68 MN-QIH [1] ✓ – 14.7 M (6.4x) 0.5965 45.55 76.22 85.37 5.46 SAN-QI [10] – ✓ n/a 0.5764 43.44 74.26 83.72 5.88 HieCoAtt-QI [15] – ✓ n/a 0.5788 43.51 74.49 83.96 5.84 AMEM-QI – ✓ 1.7 M (0.7x) 0.6196 48.24 78.33 87.11 4.92 AMEM-QIH ✓ ✓ 2.3 M (1.0x) 0.6192 48.05 78.39 87.12 4.88 AMEM+SEQ-QI – ✓ 1.7 M (0.7x) 0.6227 48.53 78.66 87.43 4.86 AMEM+SEQ-QIH ✓ ✓ 2.3 M (1.0x) 0.6210 48.40 78.39 87.12 4.92 HieCoAtt) with the same decoder. The three visual dialog baselines are trained with different valid combinations of inputs, which are denoted by Q, I and H in the model names. We perform the same ablation study of our model with the one for MNIST Dialog dataset. The conv5 layer in VGG-16 [38] trained on ImageNet [39] is used to extract the image feature map. Similar to [1], all word embedding layers share their weights and an LSTM is used for embedding the current question. For the models with history embedding, we use additional LSTMs for the questions, the answers, and the captions in the history. Based on our empirical observation, we share the parameters of the question and caption LSTMs while having a separate set of weights for the answer LSTM. Every LSTM embedding sentences is two-layered, but the history LSTM of HRNN has a single layer. We employ 64 dimensional word embedding vectors and 128 dimensional hidden state for every LSTM. Note that the the dimensionality of our word embeddings and hidden state representations in LSTMs are significantly lower than the baselines (300 and 512 respectively). We train the network using Adam [40] with the initial learning rate of 0.001 and weight decaying factor 0.0001. Note that we do not update the feature extraction network based on VGG-16. Results Table 1 presents mean reciprocal rank (MRR), mean rank (MR), and recall@k of the models. Note that lower is better for MRs but higher is better for all other evaluation metrics. All variants of the proposed model outperform the baselines in all metrics, achieving the state-of-theart performance. As observed in the experiments on MNIST Dialog, the models with sequential preference (+SEQ) show better performances compared to the ones without it. However, we do not see additional benefits from using a history embedding on VisDial, in contrast to MNIST Dialog. The proposed algorithm also has advantage over existing methods in terms of the number of parameters. Our full model only requires approximately 15% of parameters compared to the best baseline model without counting the parameters in the common feature extraction module based on VGG-16. In VisDial, the attention based VQA techniques with (near) state-of-the-art performances are not as good as the baseline models of [1] because they treat each question independently. The proposed model improves the performance on VisDial by facilitating the visual reference resolution process. Qualitative results for VisDial dataset are presented in Section B of the supplementary material. 5 Conclusion We proposed a novel algorithm for answering questions in visual dialog. Our algorithm resolves visual references in dialog questions based on a new attention mechanism with an attention memory, where the model indirectly resolves coreferences of expressions through the attention retrieval process. We employ the dynamic parameter prediction technique to adaptively combine the tentative and retrieved attentions based on the question. We tested on both synthetic and real datasets and illustrated improvements. 9 Acknowledgments This work was supported in part by the IITP grant funded by the Korea government (MSIT) [2017-001778, Development of Explainable Human-level Deep Machine Learning Inference Framework; 2017-0-01780, The Technology Development for Event Recognition/Relational Reasoning and Learning Knowledge based System for Video Understanding; 2016-0-00563, Research on Adaptive Machine Learning Technology Development for Intelligent Autonomous Digital Companion]. References [1] Das, A., Kottur, S., Gupta, K., Singh, A., Yadav, D., Moura, J.M., Parikh, D., Batra, D.: Visual Dialog. In CVPR. (2017) [2] Vinyals, O., Toshev, A., Bengio, S., Erhan, D.: Show and tell: A neural image caption generator. In CVPR. (2015) [3] Xu, K., Ba, J., Kiros, R., Courville, A., Salakhutdinov, R., Zemel, R., Bengio, Y.: Show, attend and tell: Neural image caption generation with visual attention. In ICML. (2015) [4] Mun, J., Cho, M., Han, B.: Text-guided attention model for image captioning. AAAI (2016) [5] Huang, D.A., Lim, J.J., Fei-Fei, L., Niebles, J.C.: Unsupervised visual-linguistic reference resolution in instructional videos. In CVPR. (2017) [6] Rohrbach, A., Rohrbach, M., Hu, R., Darrell, T., Schiele, B.: Grounding of textual phrases in images by reconstruction. In ECCV. (2016) [7] Mansimov, E., Parisotto, E., Ba, J., Salakhutdinov, R.: Generating images from captions with attention. In ICLR. (2016) [8] Reed, S., Akata, Z., Yan, X., Logeswaran, L., Schiele, B., Lee, H.: Generative adversarial text to image synthesis. In ICML. (2016) [9] Noh, H., Seo, P.H., Han, B.: Image question answering using convolutional neural network with dynamic parameter prediction. In CVPR. (2016) [10] Yang, Z., He, X., Gao, J., Deng, L., Smola, A.: Stacked attention networks for image question answering. In CVPR. (2016) [11] Xu, H., Saenko, K.: Ask, attend and answer: Exploring question-guided spatial attention for visual question answering. In ECCV. (2016) [12] Andreas, J., Rohrbach, M., Darrell, T., Klein, D.: Deep compositional question answering with neural module networks. In CVPR. (2016) [13] Kim, J.H., On, K.W., Lim, W., Kim, J., Ha, J.W., Zhang, B.T.: Hadamard Product for Low-rank Bilinear Pooling. In ICLR. (2017) [14] Andreas, J., Rohrbach, M., Darrell, T., Klein, D.: Neural module networks. In CVPR. (2016) [15] Lu, J., Yang, J., Batra, D., Parikh, D.: Hierarchical question-image co-attention for visual question answering. In NIPS. (2016) [16] Fukui, A., Park, D.H., Yang, D., Rohrbach, A., Darrell, T., Rohrbach, M.: Multimodal compact bilinear pooling for visual question answering and visual grounding. In EMNLP. (2016) [17] Noh, H., Han, B.: Training recurrent answering units with joint loss minimization for vqa. arXiv preprint arXiv:1606.03647 (2016) [18] Antol, S., Agrawal, A., Lu, J., Mitchell, M., Batra, D., Zitnick, C.L., Parikh, D.: VQA: Visual Question Answering. In ICCV. (2015) [19] Goyal, Y., Khot, T., Summers-Stay, D., Batra, D., Parikh, D.: Making the V in VQA matter: Elevating the role of image understanding in Visual Question Answering. In CVPR. (2017) [20] Zhang, P., Goyal, Y., Summers-Stay, D., Batra, D., Parikh, D.: Yin and Yang: Balancing and answering binary visual questions. In CVPR. (2016) [21] Malinowski, M., Rohrbach, M., Fritz, M.: Ask your neurons: A neural-based approach to answering questions about images. In ICCV. (2015) [22] Mun, J., Seo, P.H., Jung, I., Han, B.: MarioQA: Answering questions by watching gameplay videos. arXiv preprint arXiv:1612.01669 (2016) 10 [23] Zhu, L., Xu, Z., Yang, Y., Hauptmann, A.G.: Uncovering temporal context for video question and answering. arXiv preprint arXiv:1511.04670 (2015) [24] Tapaswi, M., Zhu, Y., Stiefelhagen, R., Torralba, A., Urtasun, R., Fidler, S.: Movieqa: Understanding stories in movies through question-answering. In CVPR. (2016) [25] de Vries, H., Strub, F., Chandar, S., Pietquin, O., Larochelle, H., Courville, A.: Guesswhat?! visual object discovery through multi-modal dialogue. In CVPR. (2017) [26] Das, A., Kottur, S., Moura, J.M., Lee, S., Batra, D.: Learning cooperative visual dialog agents with deep reinforcement learning. arXiv preprint arXiv:1703.06585 (2017) [27] Strub, F., de Vries, H., Mary, J., Piot, B., Courville, A., Pietquin, O.: End-to-end optimization of goal-driven and visually grounded dialogue systems. arXiv preprint arXiv:1703.05423 (2017) [28] Seo, P.H., Lin, Z., Cohen, S., Shen, X., Han, B.: Progressive attention networks for visual attribute prediction. arXiv preprint arXiv:1606.02393 (2016) [29] Sukhbaatar, S., Weston, J., Fergus, R., et al.: End-to-end memory networks. In NIPS. (2015) [30] Weston, J., Chopra, S., Bordes, A.: Memory networks. In ICLR. (2015) [31] Kumar, A., Irsoy, O., Ondruska, P., Iyyer, M., Bradbury, J., Gulrajani, I., Zhong, V., Paulus, R., Socher, R.: Ask me anything: Dynamic memory networks for natural language processing. In ICML. (2016) [32] Xiong, C., Merity, S., Socher, R.: Dynamic memory networks for visual and textual question answering. In ICML. (2016) [33] Miller, A., Fisch, A., Dodge, J., Karimi, A.H., Bordes, A., Weston, J.: Key-value memory networks for directly reading documents. In EMNLP. (2016) [34] Clark, K., Manning, C.D.: Deep reinforcement learning for mention-ranking coreference models. In EMNLP. (2016) [35] Clark, K., Manning, C.D.: Improving coreference resolution by learning entity-level distributed representations. In ACL. (2016) [36] Clark, K., Manning, C.D.: Entity-centric coreference resolution with model stacking. In ACL. (2015) [37] Lin, T.Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollár, P., Zitnick, C.L.: Microsoft coco: Common objects in context. In ECCV. (2014) [38] Simonyan, K., Zisserman, A.: Very deep convolutional networks for large-scale image recognition. ICLR (2015) [39] Deng, J., Dong, W., Socher, R., Li, L.J., Li, K., Fei-Fei, L.: Imagenet: A large-scale hierarchical image database. In CVPR. (2009) [40] Kingma, D., Ba, J.: Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980 (2014) 11 | 2017 | 263 |
6,745 | Straggler Mitigation in Distributed Optimization Through Data Encoding Can Karakus UCLA Los Angeles, CA karakus@ucla.edu Yifan Sun Technicolor Research Los Altos, CA Yifan.Sun@technicolor.com Suhas Diggavi UCLA Los Angeles, CA suhasdiggavi@ucla.edu Wotao Yin UCLA Los Angeles, CA wotaoyin@math.ucla.edu Abstract Slow running or straggler tasks can significantly reduce computation speed in distributed computation. Recently, coding-theory-inspired approaches have been applied to mitigate the effect of straggling, through embedding redundancy in certain linear computational steps of the optimization algorithm, thus completing the computation without waiting for the stragglers. In this paper, we propose an alternate approach where we embed the redundancy directly in the data itself, and allow the computation to proceed completely oblivious to encoding. We propose several encoding schemes, and demonstrate that popular batch algorithms, such as gradient descent and L-BFGS, applied in a coding-oblivious manner, deterministically achieve sample path linear convergence to an approximate solution of the original problem, using an arbitrarily varying subset of the nodes at each iteration. Moreover, this approximation can be controlled by the amount of redundancy and the number of nodes used in each iteration. We provide experimental results demonstrating the advantage of the approach over uncoded and data replication strategies. 1 Introduction Solving large-scale optimization problems has become feasible through distributed implementations. However, the efficiency can be significantly hampered by slow processing nodes, network delays or node failures. In this paper we develop an optimization framework based on encoding the dataset, which mitigates the effect of straggler nodes in the distributed computing system. Our approach can be readily adapted to the existing distributed computing infrastructure and software frameworks, since the node computations are oblivious to the data encoding. In this paper, we focus on problems of the form min w∈Rp f(w) := 1 2n min w∈Rp ∥Xw −y∥2, (1) where X ∈Rn×p, y ∈Rn×1 represent the data matrix and vector respectively. The function f(w) is mapped onto a distributed computing setup depicted in Figure 1, consisting of one central server and m worker nodes, which collectively store the row-partitioned matrix X and vector y. We focus on batch, synchronous optimization methods, where the delayed or failed nodes can significantly slow down the overall computation. Note that asynchronous methods are inherently robust to delays caused 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. by stragglers, although their convergence rates can be worse than their synchronous counterparts. Our approach consists of adding redundancy by encoding the data X and y into e X = SX and ey = Sy, respectively, where S ∈R(βn)×n is an encoding matrix with redundancy factor β ≥1, and solving the effective problem min w∈Rp ef(w) := min w∈Rp 1 2βn∥S (Xw −y) ∥2 = min w∈Rp 1 2βn∥e Xw −ey∥2 (2) instead. In doing so, we proceed with the computation in each iteration without waiting for the stragglers, with the idea that the inserted redundancy will compensate for the lost data. The goal is to design the matrix S such that, when the nodes obliviously solve the problem (2) without waiting for the slowest (m −k) nodes (where k is a design parameter) the achieved solution approximates the original solution w∗= arg minw f(w) sufficiently closely. Since in large-scale machine learning and data analysis tasks one is typically not interested in the exact optimum, but rather a “sufficiently" good solution that achieves a good generalization error, such an approximation could be acceptable in many scenarios. Note also that the use of such a technique does not preclude the use of other, non-coding straggler-mitigation strategies (see [24] and references therein), which can still be implemented on top of the redundancy embedded in the system, to potentially further improve performance. Focusing on gradient descent and L-BFGS algorithms, we show that under a spectral condition on S, one can achieve an approximation of the solution of (1), by solving (2), without waiting for the stragglers. We show that with sufficient redundancy embedded, and with updates from a sufficiently large, yet strict subset of the nodes in each iteration, it is possible to deterministically achieve linear convergence to a neighborhood of the solution, as opposed to convergence in expectation (see Fig. 4). Further, one can adjust the approximation guarantee by increasing the redundancy and number of node updates waited for in each iteration. Another potential advantage of this strategy is privacy, since the nodes do not have access to raw data itself, but can still perform the optimization task over the jumbled data to achieve an approximate solution. Although in this paper we focus on quadratic objectives and two specific algorithms, in principle our approach can be generalized to more general, potentially non-smooth objectives and constrained optimization problems, as we discuss in Section 4 ( adding a regularization term is also a simple generalization). Our main contributions are as follows. (i) We demonstrate that gradient descent (with constant step size) and L-BFGS (with line search) applied in a coding-oblivious manner on the encoded problem, achieves (universal) sample path linear convergence to an approximate solution of the original problem, using only a fraction of the nodes at each iteration. (ii) We present three classes of coding matrices; namely, equiangular tight frames (ETF), fast transforms, and random matrices, and discuss their properties. (iii) We provide experimental results demonstrating the advantage of the approach over uncoded (S = I) and data replication strategies, for ridge regression using synthetic data on an AWS cluster, as well as matrix factorization for the Movielens 1-M recommendation task. Related work. Use of data replication to aid with the straggler problem has been proposed and studied in [22, 1], and references therein. Additionally, use of coding in distributed computing has been explored in [13, 7]. However, these works exclusively focused on using coding at the computation level, i.e., certain linear computational steps are performed in a coded manner, and explicit encoding/decoding operations are performed at each step. Specifically, [13] used MDS-coded distributed matrix multiplication and [7] focused on breaking up large dot products into shorter dot products, and perform redundant copies of the short dot products to provide resilience against stragglers. [21] considers a gradient descent method on an architecture where each data sample is replicated across nodes, and designs a code such that the exact gradient can be recovered as long as fewer than a certain number of nodes fail. However, in order to recover the exact gradient under any potential set of stragglers, the required redundancy factor is on the order of the number of straggling nodes, which could mean a large amount of overhead for a large-scale system. In contrast, we show that one can converge to an approximate solution with a redundancy factor independent of network size or problem dimensions (e.g., 2 as in Section 5). Our technique is also closely related to randomized linear algebra and sketching techniques [14, 6, 17], used for dimensionality reduction of large convex optimization problems. The main difference between this literature and the proposed coding technique is that the former focuses on reducing the problem dimensions to lighten the computational load, whereas coding increases the dimensionality 2 ∥X1w −y1∥2 ∥X2w −y2∥2 ∥Xmw −ym∥2 N1 N2 Nm M ∥S1(Xw −y)∥2 ∥S2(Xw −y)∥2 ∥Sm(Xw −y)∥2 N1 N2 Nm M Figure 1: Left: Uncoded distributed optimization with partitioning, where X and y are partitioned as X = X⊤ 1 X⊤ 2 . . . X⊤ m ⊤and y = y⊤ 1 y⊤ 2 . . . y⊤ m ⊤. Right: Encoded distributed optimization, where node i stores (SiX, Siy), instead of (Xi, yi). The uncoded case corresponds to S = I. of the problem to provide robustness. As a result of the increased dimensions, coding can provide a much closer approximation to the original solution compared to sketching techniques. A longer version of this paper is available on [12]. 2 Encoded Optimization Framework Figure 1 shows a typical data-distributed computational model in large-scale optimization (left), as well as our proposed encoded model (right). Our computing network consists of m machines, where machine i stores e Xi, eyi = (SiX, Siy) and S = S⊤ 1 S⊤ 2 . . . S⊤ m ⊤. The optimization process is oblivious to the encoding, i.e., once the data is stored at the nodes, the optimization algorithm proceeds exactly as if the nodes contained uncoded, raw data (X, y). In each iteration t, the central server broadcasts the current estimate wt, and each worker machine computes and sends to the server the gradient terms corresponding to its own partition gi(wt) := e X⊤ i ( e Xiwt −eyi). Note that this framework of distributed optimization is typically communication-bound, where communication over a few slow links constitute a significant portion of the overall computation time. We consider a strategy where at each iteration t, the server only uses the gradient updates from the first k nodes to respond in that iteration, thereby preventing such slow links and straggler nodes from stalling the overall computation: egt = 1 2βηn X i∈At gi(wt) = 1 βηn e X⊤ A ( e XAwt −eyA), where At ⊆[m], |At| = k are the indices of the first k nodes to respond at iteration t, η := k m and e XA = [SiX]i∈At. (Similarly, SA = [Si]i∈At.) Given the gradient approximation, the central server then computes a descent direction dt through the history of gradients and parameter estimates. For the remaining nodes i ̸∈At, the server can either send an interrupt signal, or simply drop their updates upon arrival, depending on the implementation. Next, the central server chooses a step size αt, which can be chosen as constant, decaying, or through exact line search 1 by having the workers compute e Xdt that is needed to compute the step size. We again assume the central server only hears from the fastest k nodes, denoted by Dt ⊆[m], where Dt ̸= At in general, to compute αt = −ν d⊤ t egt d⊤ t e X⊤ D e XDdt , (3) where e XD = [SiX]i∈Dt, and 0 < ν < 1 is a back-off factor of choice. Our goal is to especially focus on the case k < m, and design an encoding matrix S such that, for any sequence of sets {At}, {Dt}, f(wt) universally converges to a neighborhood of f(w∗). Note that in general, this scheme with k < m is not guaranteed to converge for traditionally batch methods like L-BFGS. Additionally, although the algorithm only works with the encoded function ef, our goal is to provide a convergence guarantee in terms of the original function f. 1Note that exact line search is not more expensive than backtracking line search for a quadratic loss, since it only requires a single matrix-vector multiplication. 3 3 Algorithms and Convergence Analysis Let the smallest and largest eigenvalues of X⊤X be denoted by µ > 0 and M > 0, respectively. Let η with 1 β < η ≤1 be given. In order to prove convergence,we will consider a family of matrices S(β) where β is the aspect ratio (redundancy factor), such that for any ϵ > 0, and any A ⊆[m] with |A| = ηm, (1 −ϵ)I ⪯S⊤ ASA ⪯(1 + ϵ)I, (4) for sufficiently large β ≥1, where SA = [Si]i∈A is the submatrix associated with subset A (we drop dependence on β for brevity). Note that this is similar to the restricted isometry property (RIP) used in compressed sensing [4], except that (4) is only required for submatrices of the form SA. Although this condition is needed to prove worst-case convergence results, in practice the proposed encoding scheme can work well even when it is not exactly satisfied, as long as the bulk of the eigenvalues of S⊤ ASA lie within a small interval [1 −ϵ, 1 + ϵ]. We will discuss several specific constructions and their relation to property (4) in Section 4. Gradient descent. We consider gradient descent with constant step size, i.e., wt+1 = wt + αdt = wt −αegt. The following theorem characterizes the convergence of the encoded problem under this algorithm. Theorem 1. Let ft = f(wt), where wt is computed using gradient descent with updates from a set of (fastest) workers At, with constant step size αt ≡α = 2ζ M(1+ϵ) for some 0 < ζ ≤1, for all t. If S satisfies (4) with ϵ > 0, then for all sequences of {At} with cardinality |At| = k, ft ≤(κγ1)t f0 + κ2(κ −γ1) 1 −κγ1 f (w∗) , t = 1, 2, . . . , where κ = 1+ϵ 1−ϵ, and γ1 = 1 −4µζ(1−ζ) M(1+ϵ) , and f0 = f(w0) is the initial objective value. The proof is provided in Appendix B of [12], which relies on the fact that the solution to the effective “instantaneous" problem corresponding to the subset At lies in the set {w : f(w) ≤κ2f(w∗)}, and therefore each gradient descent step attracts the estimate towards a point in this set, which must eventually converge to this set. Note that in order to guarantee linear convergence, we need κγ1 < 1, which can be ensured by property (4). Theorem 1 shows that gradient descent over the encoded problem, based on updates from only k < m nodes, results in deterministically linear convergence to a neighborhood of the true solution w∗, for sufficiently large k, as opposed to convergence in expectation. Note that by property (4), by controlling the redundancy factor β and the number of nodes k waited for in each iteration, one can control the approximation guarantee. For k = m and S designed properly (see Section 4), then κ = 1 and the optimum value of the original function f (w∗) is reached. Limited-memory-BFGS. Although L-BFGS is originally a batch method, requiring updates from all nodes, its stochastic variants have also been proposed recently [15, 3]. The key modification to ensure convergence is that the Hessian estimate must be computed via gradient components that are common in two consecutive iterations, i.e., from the nodes in At ∩At−1. We adapt this technique to our scenario. For t > 0, define ut := wt −wt−1, and rt := m 2βn |At ∩At−1| X i∈At∩At−1 (gi(wt) −gi(wt−1)) . Then once the gradient terms {gt}i∈At are collected, the descent direction is computed by dt = −Btegt, where Bt is the inverse Hessian estimate for iteration t, which is computed by B(ℓ+1) t = V ⊤ jℓB(ℓ) t Vjℓ+ ρjℓujℓu⊤ jℓ, ρk = 1 r⊤ k uk , Vk = I −ρkrku⊤ k 4 with jℓ= t −eσ + ℓ, B(0) t = r⊤ t rt r⊤ t ut I, and Bt := B(eσ) t with eσ := min {t, σ}, where σ is the L-BFGS memory length. Once the descent direction dt is computed, the step size is determined through exact line search, using (3), with back-off factor ν = 1−ϵ 1+ϵ, where ϵ is as in (4). For our convergence result for L-BFGS, we need another assumption on the matrix S, in addition to (4). Defining ˘St = [Si]i∈At∩At−1 for t > 0, we assume that for some δ > 0, δI ⪯˘S⊤ t ˘St (5) for all t > 0. Note that this requires that one should wait for sufficiently many nodes to finish so that the overlap set At ∩At−1 has more than a fraction 1 β of all nodes, and thus the matrix ˘St can be full rank. This is satisfied if η ≥1 2 + 1 2β in the worst-case, and under the assumption that node delays are i.i.d., it is satisfied in expectation if η ≥ 1 √β . However, this condition is only required for a worst-case analysis, and the algorithm may perform well in practice even when this condition is not satisfied. The following lemma shows the stability of the Hessian estimate. Lemma 1. If (5) is satisfied, then there exist constants c1, c2 > 0 such that for all t, the inverse Hessian estimate Bt satisfies c1I ⪯Bt ⪯c2I. The proof, provided in Appendix A of [12], is based on the well-known trace-determinant method. Using Lemma 1, we can show the following result. Theorem 2. Let ft = f(wt), where wt is computed using L-BFGS as described above, with gradient updates from machines At, and line search updates from machines Dt. If S satisfies (4) and (5), for all sequences of {At}, {Dt} with |At| = |Dt| = k, ft ≤(κγ2)t f0 + κ2(κ −γ2) 1 −κγ2 f (w∗) , where κ = 1+ϵ 1−ϵ, and γ2 = 1 − 4µc1c2 M(c1+c2)2 , and f0 = f(w0) is the initial objective value. The proof is provided in Appendix B of [12]. Similar to Theorem 1, the proof is based on the observation that the solution of the effective problem at time t lies in a bounded set around the true solution w∗. As in gradient descent, coding enables linear convergence deterministically, unlike the stochastic and multi-batch variants of L-BFGS [15, 3]. Generalizations. Although we focus on quadratic cost functions and two specific algorithms, our approach can potentially be generalized for objectives of the form ∥Xw −y∥2 + h(w) for a simple convex function h, e.g., LASSO; or constrained optimization minw∈C ∥Xw −y∥2 (see [11]); as well as other first-order algorithms used for such problems, e.g., FISTA [2]. In the next section we demonstrate that the codes we consider have desirable properties that readily extend to such scenarios. 4 Code Design We consider three classes of coding matrices: tight frames, fast transforms, and random matrices. Tight frames. A unit-norm frame for Rn is a set of vectors F = {φi}nβ i=1 with ∥φi∥= 1, where β ≥1, such that there exist constants ξ1 ≥ξ2 > 0 such that, for any u ∈Rn, ξ1∥u∥2 ≤ nβ X i=1 |⟨u, φi⟩|2 ≤ξ2∥u∥2. The frame is tight if the above satisfied with ξ1 = ξ2. In this case, it can be shown that the constants are equal to the redundancy factor of the frame, i.e., ξ1 = ξ2 = β. If we form S ∈R(βn)×n by rows that are a tight frame, then we have S⊤S = βI, which ensures ∥Xw −y∥2 = 1 β ∥SXw −Sy∥2. Then for any solution ew∗to the encoded problem (with k = m), ∇ef( ew∗) = X⊤S⊤S(X ew∗−y) = β(X ew∗−y)⊤X = β∇f( ew∗). 5 Figure 2: Sample spectrum of S⊤ ASA for various constructions with high redundancy, and relatively small k (normalized). Figure 3: Sample spectrum of S⊤ ASA for various constructions with low redundancy, and large k (normalized). Therefore, the solution to the encoded problem satisfies the optimality condition for the original problem as well: ∇ef( ew∗) = 0, ⇔ ∇f( ew∗) = 0, and if f is also strongly convex, then ew∗= w∗is the unique solution. Note that since the computation is coding-oblivious, this is not true in general for an arbitrary full rank matrix, and this is, in addition to property (4), a desired property of the encoding matrix. In fact, this equivalency extends beyond smooth unconstrained optimization, in that D ∇ef( ew∗), w −ew∗E ≥0, ∀w ∈C ⇔ ⟨∇f( ew∗), w −ew∗⟩≥0, ∀w ∈C for any convex constraint set C, as well as −∇ef( ew∗) ∈∂h( ew∗), ⇔ −∇f( ew∗) ∈∂h( ew∗), for any non-smooth convex objective term h(x), where ∂h is the subdifferential of h. This means that tight frames can be promising encoding matrix candidates for non-smooth and constrained optimization too. In [11], it was shown that when {At} is static, equiangular tight frames allow for a close approximation of the solution for constrained problems. A tight frame is equiangular if |⟨φi, φj⟩| is constant across all pairs (i, j) with i ̸= j. Proposition 1 (Welch bound [23]). Let F = {φi}nβ i=1 be a tight frame. Then ω(F) ≥ q β−1 2nβ−1. Moreover, equality is satisfied if and only if F is an equiangular tight frame. Therefore, an ETF minimizes the correlation between its individual elements, making each submatrix S⊤ ASA as close to orthogonal as possible, which is promising in light of property (4). We specifically evaluate Paley [16, 10] and Hadamard ETFs [20] (not to be confused with Hadamard matrix, which is discussed next) in our experiments. We also discuss Steiner ETFs [8] in Appendix D of [12], which enable efficient implementation. Fast transforms. Another computationally efficient method for encoding is to use fast transforms: Fast Fourier Transform (FFT), if S is chosen as a subsampled DFT matrix, and the Fast WalshHadamard Transform (FWHT), if S is chosen as a subsampled real Hadamard matrix. In particular, one can insert rows of zeroes at random locations into the data pair (X, y), and then take the FFT or FWHT of each column of the augmented matrix. This is equivalent to a randomized Fourier or Hadamard ensemble, which is known to satisfy the RIP with high probability [5]. Random matrices. A natural choice of encoding is using i.i.d. random matrices. Although such random matrices do not have the computational advantages of fast transforms or the optimalitypreservation property of tight frames, their eigenvalue behavior can be characterized analytically. In particular, using the existing results on the eigenvalue scaling of large i.i.d. Gaussian matrices [9, 19] and union bound, it can be shown that P max A:|A|=k λmax 1 βηnS⊤ ASA > 1 + r 1 βη 2! →0, (6) P min A:|A|=k λmin 1 βηnS⊤ ASA < 1 − r 1 βη 2! →0, (7) 6 Figure 4: Left: Sample evolution of uncoded, replication, and Hadamard (FWHT)-coded cases, for k = 12, m = 32. Right: Runtimes of the schemes for different values of η, for the same number of iterations for each scheme. Note that this essentially captures the delay profile of the network, and does not reflect the relative convergence rates of different methods. as n →∞, where σi denotes the ith singular value. Hence, for sufficiently large redundancy and problem dimension, i.i.d. random matrices are good candidates for encoding as well. However, for finite β, even if k = m, in general for this encoding scheme the optimum of the original problem is not recovered exactly. Property (4) and redundancy requirements. Using the analytical bounds (6)–(7) on i.i.d. Gaussian matrices, one can see that such matrices satisfy (4) with ϵ = O 1 √βη , independent of problem dimensions or number of nodes m. Although we do not have tight eigenvalue bounds for subsampled ETFs, numerical evidence (Figure 2) suggests that they may satisfy (4) with smaller ϵ than random matrices, and thus we believe that the required redundancy in practice is even smaller for ETFs. Note that our theoretical results focus on the extreme eigenvalues due to a worst-case analysis; in practice, most of the energy of the gradient will be on the eigen-space associated with the bulk of the eigenvalues, which the following proposition suggests can be mostly 1 (also see Figure 3), which means even if (4) is not satisfied, the gradient (and the solution) can be approximated closely for a modest redundancy, such as β = 2. The following result is a consequence of the Cauchy interlacing theorem, and the definition of tight frames. Proposition 2. If the rows of S are chosen to form an ETF with redundancy β, then for η ≥1 −1 β , 1 β S⊤ ASA has n(1 −βη) eigenvalues equal to 1. 5 Numerical Results Ridge regression with synthetic data on AWS EC2 cluster. We generate the elements of matrix X i.i.d. ∼N(0, 1), the elements of y i.i.d. ∼N(0, p), for dimensions (n, p) = (4096, 6000), and solve the problem minw 1 2βn
e Xw −ey
2 + λ 2 ∥w∥2, for regularization parameter λ = 0.05. We evaluate column-subsampled Hadamard matrix with redundancy β = 2 (encoded using FWHT for fast encoding), data replication with β = 2, and uncoded schemes. We implement distributed L-BFGS as described in Section 3 on an Amazon EC2 cluster using the mpi4py Python package, over m = 32 m1.small worker node instances, and a single c3.8xlarge central server instance. We assume the central server encodes and sends the data variables to the worker nodes (see Appendix D of [12] for a discussion of how to implement this more efficiently). Figure 4 shows the result of our experiments, which are aggregated over 20 trials. As baselines, we consider the uncoded scheme, as well as a replication scheme, where each uncoded partition is replicated β = 2 times across nodes, and the server uses the faster copy in each iteration. It can be seen from the right figure that one can speed up computation by reducing η from 1 to, for instance, 0.375, resulting in more than 40% reduction in the runtime. Note that in this case, uncoded L-BFGS fails to converge, whereas the Hadamard-coded case stably converges. We also observe that the data replication scheme converges on average, but in the worst case, the convergence is much less smooth, since the performance may deteriorate if both copies of a partition are delayed. 7 Figure 5: Test RMSE for m = 8 (left) and m = 24 (right) nodes, where the server waits for k = m/8 (top) and k = m/2 (bottom) responses. “Perfect" refers to the case where k = m. Figure 6: Total runtime with m = 8 and m = 24 nodes for different values of k, under fixed 100 iterations for each scheme. Matrix factorization on Movielens 1-M dataset. We next apply matrix factorization on the MovieLens-1M dataset [18] for the movie recommendation task. We are given R, a sparse matrix of movie ratings 1–5, of dimension #users × #movies, where Rij is specified if user i has rated movie j. We withhold randomly 20% of these ratings to form an 80/20 train/test split. The goal is to recover user vectors xi ∈Rp and movie vectors yi ∈Rp (where p is the embedding dimension) such that Rij ≈xT i yj + ui + vj + µ, where ui, vj, and µ are user, movie, and global biases, respectively. The optimization problem is given by min xi,yj,ui,vj X i,j: observed (Rij −ui −vj −xT i yj −µ)2 + λ X i ∥xi∥2 2 + ∥u∥2 2 + X j ∥yj∥2 2 + ∥v∥2 2 . (8) We choose µ = 3, p = 15, and λ = 10, which achieves a test RMSE 0.861, close to the current best test RMSE on this dataset using matrix factorization2. Problem (8) is often solved using alternating minimization, minimizing first over all (xi, ui), and then all (yj, vj), in repetition. Each such step further decomposes by row and column, made smaller by the sparsity of R. To solve for (xi, ui), we first extract Ii = {j | rij is observed}, and solve the resulting sequence of regularized least squares problems in the variables wi = [x⊤ i , ui]⊤distributedly using coded L-BFGS; and repeat for w = [y⊤ j , vj]⊤, for all j. As in the first experiment, distributed coded L-BFGS is solved by having the master node encoding the data locally, and distributing the encoded data to the worker nodes (Appendix D of [12] discusses how to implement this step more efficiently). The overhead associated with this initial step is included in the overall runtime in Figure 6. The Movielens experiment is run on a single 32-core machine with 256 GB RAM. In order to simulate network latency, an artificial delay of ∆∼exp(10 ms) is imposed each time the worker completes a task. Small problem instances (n < 500) are solved locally at the central server, using the built-in function numpy.linalg.solve. Additionally, parallelization is only done for the ridge regression instances, in order to isolate speedup gains in the L-BFGS distribution. To reduce overhead, we create a bank of encoding matrices {Sn} for Paley ETF and Hadamard ETF, for n = 100, 200, . . . , 3500, and then given a problem instance, subsample the columns of the appropriate matrix Sn to match the dimensions. Overall, we observe that encoding overhead is amortized by the speed-up of the distributed optimization. Figure 5 gives the final performance of our distributed L-BFGS for various encoding schemes, for each of the 5 epochs, which shows that coded schemes are most robust for small k. A full table of results is given in Appendix C of [12]. 2http://www.mymedialite.net/examples/datasets.html 8 Acknowledgments This work was supported in part by NSF grants 1314937 and 1423271. References [1] G. Ananthanarayanan, A. Ghodsi, S. Shenker, and I. Stoica. Effective straggler mitigation: Attack of the clones. In NSDI, volume 13, pages 185–198, 2013. [2] A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM Journal on Imaging Sciences, 2(1):183–202, 2009. [3] A. S. Berahas, J. Nocedal, and M. Takác. A multi-batch l-bfgs method for machine learning. In Advances in Neural Information Processing Systems, pages 1055–1063, 2016. [4] E. J. Candes and T. Tao. Decoding by linear programming. IEEE Transactions on Information Theory, 51 (12):4203–4215, 2005. [5] E. J. Candes and T. Tao. Near-optimal signal recovery from random projections: Universal encoding strategies? IEEE Transactions on Information Theory, 52(12):5406–5425, 2006. [6] P. Drineas, M. W. Mahoney, S. Muthukrishnan, and T. Sarlós. Faster least squares approximation. Numerische mathematik, 117(2):219–249, 2011. [7] S. Dutta, V. Cadambe, and P. Grover. Short-dot: Computing large linear transforms distributedly using coded short dot products. In Advances In Neural Information Processing Systems, pages 2092–2100, 2016. [8] M. Fickus, D. G. Mixon, and J. C. Tremain. Steiner equiangular tight frames. Linear Algebra and Its Applications, 436(5):1014–1027, 2012. [9] S. Geman. A limit theorem for the norm of random matrices. The Annals of Probability, pages 252–261, 1980. [10] J. Goethals and J. J. Seidel. Orthogonal matrices with zero diagonal. Canad. J. Math, 1967. [11] C. Karakus, Y. Sun, and S. Diggavi. Encoded distributed optimization. In 2017 IEEE International Symposium on Information Theory (ISIT), pages 2890–2894. IEEE, 2017. [12] C. Karakus, Y. Sun, S. Diggavi, and W. Yin. Straggler mitigation in distributed optimization through data encoding. Arxiv.org, https://arxiv.org/abs/1711.04969, 2017. [13] K. Lee, M. Lam, R. Pedarsani, D. Papailiopoulos, and K. Ramchandran. Speeding up distributed machine learning using codes. In Information Theory (ISIT), 2016 IEEE International Symposium on, pages 1143–1147. IEEE, 2016. [14] M. W. Mahoney et al. Randomized algorithms for matrices and data. Foundations and Trends R⃝in Machine Learning, 3(2):123–224, 2011. [15] A. Mokhtari and A. Ribeiro. Global convergence of online limited memory BFGS. Journal of Machine Learning Research, 16:3151–3181, 2015. [16] R. E. Paley. On orthogonal matrices. Studies in Applied Mathematics, 12(1-4):311–320, 1933. [17] M. Pilanci and M. J. Wainwright. Randomized sketches of convex programs with sharp guarantees. IEEE Transactions on Information Theory, 61(9):5096–5115, 2015. [18] J. Riedl and J. Konstan. Movielens dataset, 1998. [19] J. W. Silverstein. The smallest eigenvalue of a large dimensional wishart matrix. The Annals of Probability, pages 1364–1368, 1985. [20] F. Szöll˝osi. Complex hadamard matrices and equiangular tight frames. Linear Algebra and its Applications, 438(4):1962–1967, 2013. [21] R. Tandon, Q. Lei, A. G. Dimakis, and N. Karampatziakis. Gradient coding. ML Systems Workshop (MLSyS), NIPS, 2016. [22] D. Wang, G. Joshi, and G. Wornell. Using straggler replication to reduce latency in large-scale parallel computing. ACM SIGMETRICS Performance Evaluation Review, 43(3):7–11, 2015. [23] L. Welch. Lower bounds on the maximum cross correlation of signals (corresp.). IEEE Transactions on Information theory, 20(3):397–399, 1974. [24] N. J. Yadwadkar, B. Hariharan, J. Gonzalez, and R. H. Katz. Multi-task learning for straggler avoiding predictive job scheduling. Journal of Machine Learning Research, 17(4):1–37, 2016. 9 | 2017 | 264 |
6,746 | Using Options and Covariance Testing for Long Horizon Off-Policy Policy Evaluation Zhaohan Daniel Guo Carnegie Mellon University Pittsburgh, PA 15213 zguo@cs.cmu.edu Philip S. Thomas University of Massachusetts Amherst Amherst, MA 01003 pthomas@cs.umass.edu Emma Brunskill Stanford University Stanford, CA 94305 ebrun@cs.stanford.edu Abstract Evaluating a policy by deploying it in the real world can be risky and costly. Off-policy policy evaluation (OPE) algorithms use historical data collected from running a previous policy to evaluate a new policy, which provides a means for evaluating a policy without requiring it to ever be deployed. Importance sampling is a popular OPE method because it is robust to partial observability and works with continuous states and actions. However, the amount of historical data required by importance sampling can scale exponentially with the horizon of the problem: the number of sequential decisions that are made. We propose using policies over temporally extended actions, called options, and show that combining these policies with importance sampling can significantly improve performance for long-horizon problems. In addition, we can take advantage of special cases that arise due to options-based policies to further improve the performance of importance sampling. We further generalize these special cases to a general covariance testing rule that can be used to decide which weights to drop in an IS estimate, and derive a new IS algorithm called Incremental Importance Sampling that can provide significantly more accurate estimates for a broad class of domains. 1 Introduction One important problem for many high-stakes sequential decision making under uncertainty domains, including robotics, health care, education, and dialogue systems, is estimating the performance of a new policy without requiring it to be deployed. To address this, off-policy policy evaluation (OPE) algorithms use historical data collected from executing one policy (called the behavior policy), to predict the performance of a new policy (called the evaluation policy). Importance sampling (IS) is one powerful approach that can be used to evaluate the potential performance of a new policy [12]. In contrast to model based approaches to OPE [5], importance sampling provides an unbiased estimate of the performance of the evaluation policy. In particular, importance sampling is robust to partial observability, which is often prevalent in real-world domains. Unfortunately, importance sampling estimates of the performance of the evaluation policy can be inaccurate when the horizon of the problem is long: the variance of IS estimators can grow exponentially with the number of sequential decisions made in an episode. This is a serious limitation for applications that involve decisions made over tens or hundreds of steps, like dialogue systems where a conversation might 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. require dozens of responses, or intelligent tutoring systems that make dozens of decisions about how to sequence the content shown to a student. Due to the importance of OPE, there have been many recent efforts to improve the accuracy of importance sampling. For example, Dudík et al. [4] and Jiang and Li [7] proposed doubly robust importance sampling estimators that can greatly reduce the variance of predictions when an approximate model of the environment is available. Thomas and Brunskill [16] proposed an estimator that further integrates importance sampling and model-based approaches, and which can greatly reduce mean squared error. These approaches trade-off between the bias and variance of model-based and importance sampling approaches, and result in strongly consistent estimators. Unfortunately, in long horizon settings, these approaches will either create estimates that suffer from high variance or exclusively rely on the provided approximate model, which can have high bias. Other recent efforts that estimate a value function using off-policy data rather than just the performance of a policy [6, 11, 19] also suffer from bias if the input state description is not Markovian (such as if the domain description induces partial observability). To provide better off policy estimates in long horizon domains, we propose leveraging temporal abstraction. In particular, we analyze using options-based policies (policies with temporally extended actions) [14] instead of policies over primitive actions. We prove that the we can obtain an exponential reduction in the variance of the resulting estimates, and in some cases, cause the variance to be independent of the horizon. We also demonstrate this benefit with simple simulations. Crucially, our results can be equivalently viewed as showing that using options can drastically reduce the amount of historical data required to obtain an accurate estimate of a new evaluation policy’s performance. We also show that using options-based policies can result in special cases which can lead to significant reduction in estimation error through dropping importance sampling weights. Furthermore, we generalize the idea of dropping weights and derive a covariance test that can be used to automatically determine which weights to drop. We demonstrate the potential of this approach by constructing a new importance sampling algorithm called Incremental Importance Sampling (INCRIS) and show empirically that it can significantly reduce estimation error. 2 Background We consider an agent interacting with a Markov decision process (MDP) for a finite sequence of time steps. At each time step the agent executes an action, after which the MDP transitions to a new state and returns a real valued reward. Let s ∈S be a discrete state, a ∈A be a discrete action, and r be the reward bounded in [0, Rmax]). The transition and reward dynamics are unknown and are denoted by the transition probability T(s′|s, a) and reward density R(r|s, a). A primitive policy maps histories to action probabilities, i.e., π(at|s1, a1, r1, . . . , st) is the probability of executing action at at time step t after encountering history s1, a1, r1, . . . , st. The return of a trajectory τ of H steps is simply the sum of the rewards G(τ) = PH t=1 rt. Note we consider the undiscounted setting where γ = 1. The value of policy π is the expected return when running that policy: Vπ = Eπ(G(τ)). Temporal abstraction can reduce the computational complexity of planning and online learning [2, 9, 10, 14]. One popular form of temporal abstraction is to use sub-policies, in particular options [14]. Let Ωbe the space of trajectories. o, an option, consists of π, a primitive policy (a policy over primitive actions), β : Ω→[0, 1], a termination condition where β(τ) is the probability of stopping the option given the current partial trajectory τ ∈Ωfrom when this option began, and I ⊂S, an input set where s ∈I denotes the states where o is allowed to start. Primitive actions can be considered as a special case of options, where the options always terminate after a single step. µ(ot|s1, a1, . . . , st) denotes the probability of picking option ot given history (s1, a1, . . . , st) when the previous option has terminated, according to options-based policy µ. A high-level trajectory of length k is denoted by T = (s1, o1, v1, s2, o2, v2, . . . , sk, ok, vk) where vt is the sum of the rewards accumulated when executing option ot. In this paper we will consider batch, offline, off-policy evaluation of policies for sequential decision making domains using both primitive action policies and options-based policies. We will now introduce the general OPE problem using primitive policies: in a later section we will combine this with options-based policies. 2 In OPE we assume access to historical data, D, generated by an MDP, and a behavior policy ,πb. D consists of n trajectories, {τ (i)}n i=1. A trajectory has length H, and is denoted by τ (i) = (s(i) 1 , a(i) 1 , r(i) 1 , s(i) 2 , a(i) 2 , r(i) 2 , . . . , s(i) H , a(i) H , r(i) H ). In off-policy evaluation, the goal is to use the data D to estimate the value of an evaluation policy πe: Vπe. As D was generated from running the behavior policy πb, we cannot simply use the Monte Carlo estimate. An alternative is to use importance sampling to reweight the data in D to give greater weight to samples that are likely under πe and lesser weight to unlikely ones. We consider per-decision importance sampling (PDIS) [12], which gives the following estimate of the value of πe: PDIS(D) = 1 n n X i=1 H X t=1 ρ(i) t r(i) t ! , ρ(i) t = tY u=1 πe(a(i) u |s(i) u ) πb(a(i) u |s(i) u ) , (1) where ρ(i) t is the weight given to the rewards to correct due to the difference in distribution. This estimator is an unbiased estimator of the value of πe: Eπe(G(τ)) = Eπb(PDIS(τ)), (2) where Eπ(. . . ) is the expected value given that the trajectories τ are generated by π. For simplicity, hereafter we assume that primitive and options-based policies are a function only of the current state, but our results apply also when the they are a function of the history. Note that importance sampling does not assume that the states in the trajectory are Markovian, and is thus robust to error in the state representation, and in general, robust to partial observability as well. 3 Importance Sampling and Long Horizons We now show how the amount of data required for importance sampling to obtain a good off-policy estimate can scale exponentially with the problem horizon. Notice that in the standard importance sampling estimator, the weight is the product of the ratio of action probabilities. We now prove that this can cause the variance of the policy estimate to be exponential in H.1 Theorem 1. The mean squared error of the PDIS estimator can be Ω(2H). Proof. See appendix. Equivalently, this means that achieving a desired mean squared error of ϵ can require a number of trajectories that scales exponentially with the horizon. A natural question is whether this issue also arises in a weighted importance sampling [13], a popular (biased) approach to OPE that has lower variance. We show below that the long horizon problem still persists. Theorem 2. It can take Ω(2H) trajectories to shrink the MSE of weighted importance sampling (WIS) by a constant. Proof. See appendix. 4 Combining Options and Importance Sampling We will show that one can leverage the advantage of options to mitigate the long horizon problem. If the behavior and evaluation policies are both options-based policies, then the PDIS estimator can be exponentially more data efficient compared to using primitive behavior and evaluation policies. Due to the structure in options-based policies, we can decompose the difference between the behavior policy and the evaluation policy in a natural way. Let µb be the options-based behavior policy and µe be the options-based evaluation policy. First, we examine the probabilities over the options. The probabilities µb(ot|st) and µe(ot|st) can differ and contribute a ratio of probabilities as an importance sampling weight. Second, the underlying policy, π, for an option, ot, present in both µb and µe may differ, and this also contributes to the importance sampling weights. Finally, additional or missing options can be expressed by setting the probabilities over missing options to be zero for either µb or µe. Using this decomposition, we can easily apply PDIS to options-based policies. Theorem 3. Let O be the set of options that have the same underlying policies between µb and µe. Let O be the set of options that have changed underlying policies. Let k(i) be the length of the i-th high level trajectory from data set D. Let j(i) t be the length of the sub-trajectory produced by option o(i) t . The PDIS estimator applied to D is 1These theorems can be seen as special case instantiations of Theorem 6 in [8] with simpler, direct proofs. 3 PDIS(D) = 1 n n X i=1 k(i) X t=1 w(i) t y(i) t w(i) t = tY u=1 µe(o(i) u |s(i) u ) µb(o(i) u |s(i) u ) , (3) y(i) t = ( v(i) t if o(i) t ∈O Pj(i) t b=1 ρ(i) t,br(i) t,b if o(i) t ∈O ρ(i) t,b = j(i) tY c=1 πe(a(i) t,c|s(i) t,c, o(i) t ) πb(a(i) t,c|s(i) t,c, o(i) t ) , (4) where r(i) t,b is the b-th reward in the sub-trajectory of option o(i) t and similarly for s and a. Proof. This is a straightforward application of PDIS to the options-based policies using the decomposition mentioned. Theorem 3 expresses the weights in two parts: one part comes from the probabilities over options which is expressed as w(i) t , and another part comes from the underlying primitive policies of options that have changed with ρ(i) t,b. We can immediately make some interesting observations below. Corollary 1. If no underlying policies for options are changed between µb and µe, and all options have length at least J steps, then the worst case variance of PDIS is exponentially reduced from Ω(2H) to Ω(2(H/J)) Corollary 1 follows from Theorem 3. Since no underlying policies are changed, then the only importance sampling weights left are w(i) t . Thus we can focus our attention only on the high-level trajectory which has length at most H/J. Effectively, the horizon has shrunk from H to H/J, which results in an exponential reduction of the worst case variance of PDIS. Corollary 2. If the probabilities over options are the same between µb and µe, and a subset of options O have changed their underlying policies, then the worst case variance of PDIS is reduced from Ω(2H) to Ω(2K) where K is an upper bound on the sum of the lengths of the options. Corollary 2 follows from Theorem 3. The options whose underlying policies are the same between behavior and evaluation can effectively be ignored, and cut out of the trajectories in the data. This leaves only options whose underlying policies have changed, shrinking down the horizon from H to the length of the leftover options. For example, if only a single option of length 3 is changed, and the option appears once in a trajectory, then the horizon can be effectively reduced to just 3. This result can be very powerful, as the reduced variance becomes independent of the horizon H. 5 Experiment 1: Options-based Policies This experiment illustrates how using options-based policies can significantly improve the accuracy of importance-sampling-based estimators for long horizon domains. Since importance sampling is particularly useful when a good model of the domain is unknown and/or the domain involves partial observability, we introduce a partially observable variant of the popular Taxi domain [3] called NoisyTaxi for our simulations (see figure 1). 5.1 Partially Observable Taxi Figure 1: Taxi Domain [3]. It is a 5×5 gridworld (Figure 1). There are 4 special locations: R,G,B,Y. A passenger starts randomly at one of the 4 locations, and its destination is randomly chosen from one of the 4 locations. The taxi starts randomly on any square. The taxi can move one step in any of the 4 cardinal directions N,S,E,W, as well as attempt to pickup or drop off the passenger. Each step has a reward of −1. An invalid pickup or dropoff has a −10 reward and a successful dropoff has a reward of 20. In NoisyTaxi, the location of the taxi and the location of the passenger is partially observable. If the row location of the taxi is c, the agent observes c with probability 0.85, c + 1 with probability 0.075 4 and c −1 with probability 0.075 (if adding or subtracting 1 would cause the location to be outside the grid, the resulting location is constrained to still lie in the grid). The column location of the taxis is observed with the same noisy distribution. Before the taxi successfully picks up the passenger, the observation of the location of the passenger has a probability of 0.15 of switching randomly to one of the four designated locations. After the passenger is picked up, the passenger is observed to be in the taxi with 100% probability (e.g. no noise while in the taxi). 5.2 Experimental Results We consider ϵ-greedy option policies, where with probability 1 −ϵ the policy samples the optimal option, and probability ϵ the policy samples a random option. Options in this case are n-step policies, where “optimal” options involve taking n-steps of the optimal (primitive action) policy, and “random” options involve taking n random primitive actions.2 Our behavior policies πb will use ϵ = 0.3 and our evaluation policies πe use ϵ = 0.05. We investigate how the accuracy of estimating πe varies as a function both of the number of trajectories and the length of the options n = 1, 2, 3. Note n = 1 corresponds to having a primitive action policy. Empirically, all behavior policies have essentially the same performance. Similarly all evaluation policies have essentially the same performance. We first collect data using the behavior policies, and then use PDIS to evaluate their respective evaluation policies. Figure 2 compares the MSE (log scale) of the PDIS estimators for the evaluation policies. Figure 2: Comparing the MSE of PDIS between primitive and options-based behavior and evaluation policy pairs. Note the y-axis is a log scale. Our results show that PDIS for the options-based evaluation policies are an order of magnitude better than PDIS for the primitive evaluation policy. Indeed, Corollary 1 shows that the n-step options policies are effectively reducing the horizon by a factor of n over the primitive policy. As expected, the options-based policies that use 3-step options have the lowest MSE. 6 Going Further with Options Often options are used to achieve a specific sub-task in a domain. For example in a robot navigation task, there may be an option to navigate to a special fixed location. However one may realize that there is a faster way to navigate to that location, so one may change that option and try to evaluate the new policy to see whether it is actually better. In this case the old and new option are both always able to reach the special location; the only difference is that the new option could get there faster. In such a case we can further reduce the variance of PDIS. We now formally define this property. Definition 1. Given behavior policy µb and evaluation policy µe, an option o is called stationary, if the distribution of the states on which o terminates is always the same for µb and µe. The underlying policy for option o can differ for µb and µe; only the termination state distribution is important. A stationary option may not always arise due to solving a sub-task. It can also be the case that a stationary option is used as a way to perform a soft reset. For example, a robotic manipulation task may want to reset arm and hand joints to a default configuration in order to minimize sensor/motor error, before trying to grasp a new object. Stationary options allows us to point to a step in a trajectory where we know the state distribution is fixed. Because the state distribution is fixed, we can partition the trajectory into two parts. The beginning of the second partition would then have state distribution that is independent of the actions 2We have also tried using more standard options that navigate to a specific destination, and the experiment results closely mirror those shown here. 5 chosen in the first partition. We can then independently apply PDIS to each partition, and sum up the estimates. This is powerful because it can halve the effective horizon of the problem. Theorem 4. Let µb be an options-based behavior policy. Let µe be an options-based evaluation policy. Let O be the set of options that µb and µe use. The underlying policies of the options in µe may be arbitrarily different from µb. Let o1 be a stationary option. We can decompose the expected value as follows. Let τ1 be the first part of a trajectory up until and including the first occurrence of o1. Let τ2 be the part of the trajectory after the first occurrence of o1 up to and including the first occurrence of o2. Then Eµe(G(τ)) = Eµb(PDIS(τ)) = Eµb(PDIS(τ1)) + Eµb(PDIS(τ2)) (5) Proof. See appendix. Note that there are no conditions on how the probabilities over options may differ, nor on how the underlying policies of the non-stationary options may differ. This means that, regardless of these differences, the trajectories can be partitioned and PDIS can be independently applied. Furthermore, Theorem 3 can still be applied to each of the independent applications of PDIS. Combining Theorem 4 and Theorem 3 can lead to more ways of designing a desired evaluation policy that will result in a low variance PDIS estimate. 7 Experiment 2: Stationary Options We now demonstrate Theorem 4 empirically on NoisyTaxi. In NoisyTaxi, we know that a primitive ϵ-greedy policy will eventually pick up the passenger (though it may take a very long time depending on ϵ). Since the starting location of the passenger is uniformly random, the location of the taxi immediately after picking up the passenger is also uniformly random, but over the four pickup locations. This implies that, regardless of the ϵ value in an ϵ-greedy policy, we can view executing that ϵ-greedy policy until the passenger is picked up as a new "PickUp-ϵ" option that always terminates in the same state distribution. Given this argument, we can use Theorem 4 to decompose any NoisyTaxi trajectory into the part before the passenger is picked up, and the part after the passenger is picked up, estimate the expected reward for each, and then sum. As picking up the passenger is often the halfway point in a trajectory (depending on the locations of the passenger and the destination), we can perform importance sampling over two, approximately half length, trajectories. More concretely, we consider two n = 1 options (e.g. primitive action) ϵ-greedy policies. Like in the prior subsection, the behavior policy has ϵ = 0.3 and the evaluation policy has ϵ = 0.05. We compare performing normal PDIS to estimate the value of the evaluation policy to estimating it using partitioned-PDIS using Theorem 4. See Figure 3 for results. Figure 3: Comparing MSE of Normal PDIS and PDIS that uses Theorem 4. We gain an order of an order of magnitude reduction in MSE (labeled PartitionedPDIS). Note this did not require that the primitive policy used options: we merely used the fact that if there are subgoals in the domain where the agent is likely to go through with a fixed state distribution, we can leverage that to decompose the value of a long horizon into the sum over multiple shorter ones. Options is one common way this will occur, but as we see in this example, this can also occur in other ways. 8 Covariance Testing The special case of stationary options can be viewed as a form of dropping certain importance sampling weights from the importance sampling estimator. With stationary options, the weights before the stationary options are dropped when estimating the rewards thereafter. By considering 6 the bias incurred when dropping weights, we derive a general rule involving covariances as follows. Let W1W2r be the ordinary importance sampling estimator for reward r where the product of the importance sampling weights are partitioned into two products W1 and W2 using some general partitioning scheme such that E(W1) = 1. Note that this condition is satisfied when W1, W2 are chosen according to commonly used schemes such as fixed timesteps (not necessarily consecutive) or fixed states, but can be satisfied by more general schemes as well. Then we can consider dropping the product of weights W1 and simply output the estimate W2r: E(W1W2r) = E(W1)E(W2r) + Cov(W1, W2r) (6) = E(W2r) + Cov(W1, W2r) (7) This means that if Cov(W1, W2r) = 0, then we can drop the weights W1 with no bias. Otherwise, the bias incurred is Cov(W1, W2r). Then we are free to choose W1, W2 to balance the reduction in variance and the increase in bias. 8.1 Incremental Importance Sampling (INCRIS) Using the Covariance Test (eqn 7) idea, we propose a new importance sampling algorithm called Incremental Importance Sampling (INCRIS). This is a variant of PDIS where for a reward rt, we try to drop all but the most recent k importance sampling weights, using the covariance test to optimize k in order to lower MSE. Let πb and πe be the behavior and evaluation policies respectively (they may or may not be optionsbased policies). Let D = {τ (1), τ (2), . . . , τ (n)} be our historical data set generated from πb with n trajectories of length H. Let ρt = πe(at|st) πb(at|st). Let ρ(i) t be the same but computed from the i-th trajectory. Suppose we are given estimators for covariance and variance. See algorithm 1 for details. Algorithm 1 INCRIS 1: Input: D 2: for t = 1 to H do 3: for k = 0 to t do 4: Ak = Qt−k j=1 ρj 5: Bk = Qt j=t−k+1 ρj 6: Estimate Cov(Ak, Bkrt) and denote bCk 7: Estimate Var(Bkrt) and denote bVk 8: Estimate MSE with \ MSEk = bC2 k + bVk 9: end for 10: k′ = argmink \ MSEk 11: Let brt = 1 n Pn i=1 B(i) k rt 12: end for 13: Return PH t=1 brt 8.2 Strong Consistency In the appendix, we provide a proof that INCRIS is strongly consistent. We now give a brief intuition for the proof. As n goes to infinity, the estimates for the MSE get better and better and converge to the bias. We know that if we do not drop any weights, we get an unbiased estimate and thus the smallest MSE estimate will go to zero. Thus we get more and more likely to pick k that correspond to unbiased estimates. 9 Experiment 3: Incremental Importance Sampling To evaluate INCRIS, we constructed a simple MDP that exemplifies to properties of domains for which we expect INCRIS to be useful. Specifically, we were motivated by the applications of reinforcement learning methods to type 1 diabetes treatments [1, 17] and digital marketing applications [15]. In these applications there is a natural place where one might divide data into episodes: for type 1 7 diabetes treatment, one might treat each day as an independent episode, and for digital marketing, one might treat each user interaction as an independent episode. However, each day is not actually independent in diabetes treatment—a person’s blood sugar in the morning depends on their blood sugar at the end of the previous day. Similarly, in digital marketing applications, whether or not a person clicks on an ad might depend on which ads they were shown previously (e.g., someone might be less likely to click an ad that they were shown before and did not click on then). So, although this division into episodes is reasonable, it does not result in episodes that are completely independent, and so importance sampling will not produce consistent estimates (or estimates that can be trusted for high-confidence off-policy policy evaluation [18]). To remedy this, we might treat all of the data from a single individual (many days, and many page visits) as a single episode, which contains nearly-independent subsequences of decisions. To model this property, we constructed an MDP with three states, s1, s2, and s3 and two actions, a1 and a2. The agent always begins in s1, where taking action a1 causes a transition to s2 with a reward of +1 and taking action a2 causes a transition to s3 with a reward of −1. In s2, both actions lead to a terminal absorbing state with reward −2 + ϵ, and in s3 both actions lead to a terminal absorbing state with reward +2. For now, let ϵ = 0. This simple MDP has a horizon of 2 time steps—after two actions the agent is always in a terminal absorbing state. To model the aforementioned examples, we modified this simple MDP so that whenever the agent would transition to the terminal absorbing state, it instead transitions back to s1. After visiting s1 fifty times, the agent finally transitions to a terminal absorbing state. Furthermore, to model the property that the fifty sub-episodes within the larger episode are not completely independent, we set ϵ = 0 initially, and ϵ = ϵ + 0.01 whenever the agent enters s2. This creates a slight dependence across the sub-episodes. For this illustrative domain, we would like an importance sampling estimator that assumes that subepisodes are independent when there is little data in order to reduce variance. However, once there is enough data for the variances of estimates to be sufficiently small relative to the bias introduced by assuming that sub-episodes are independent, the importance sampling estimator should automatically begin considering longer sequences of actions, as INCRIS does. We compared INCRIS to ordinary importance sampling (IS), per-decision importance sampling (PDIS), weighted importance sampling (WIS), and consistent weighted per-decision importance sampling (CWPDIS). The behavior policy selects actions randomly, while the evaluation policy selects action a1 with a higher probability than a2. In Figure 4 we report the mean squared errors of the different estimators using different amounts of data. 1 10 100 1000 10000 100000 1 10 100 1000 10000 MSE Amount of Historical Data, n IS PDIS WIS CWPDIS INCRIS Figure 4: Performance of different estimators on the simple MDP that models properties of the diabetes treatment and digital marketing applications. The reported mean squared errors are the sample mean squared errors from 128 trials. Notice that INCRIS achieves an order of magnitude lower mean squared error than all of the other estimators, and for some n it achieves two orders of magnitude improvement over the unweighted importance sampling estimators. 10 Conclusion We have shown that using options-based behavior and evaluation policies allow for lower mean squared error when using importance sampling due to their structure. Furthermore, special cases may naturally arise when using options, such as when options terminate in a fixed state distribution, and lead to greater reduction of the mean squared error. We examined options as a first step, but in the future these results may be extended to full hierarchical policies (like the MAX-Q framework). We also generalized naturally occurring special cases with covariance testing that leads to dropping out weights in order to improve importance sampling predictions. We showed an instance of covariance testing in the algorithm INCRIS, which can greatly improve estimation accuracy for a general class of domains, and hope to derive more powerful estimators based on covariance testing that can apply to even more domains in the future. 8 Acknowledgements The research reported here was supported in part by an ONR Young Investigator award, an NSF CAREER award, and by the Institute of Education Sciences, U.S. Department of Education. The opinions expressed are those of the authors and do not represent views of NSF, IES or the U.S. Dept. of Education. References [1] M. Bastani. Model-free intelligent diabetes management using machine learning. Master’s thesis, Department of Computing Science, University of Alberta, 2014. [2] Emma Brunskill and Lihong Li. Pac-inspired option discovery in lifelong reinforcement learning. In ICML, pages 316–324, 2014. [3] Thomas G Dietterich. Hierarchical reinforcement learning with the maxq value function decomposition. J. Artif. Intell. Res.(JAIR), 13:227–303, 2000. [4] M. Dudík, J. Langford, and L. Li. Doubly robust policy evaluation and learning. In Proceedings of the Twenty-Eighth International Conference on Machine Learning, pages 1097–1104, 2011. [5] Assaf Hallak, François Schnitzler, Timothy Arthur Mann, and Shie Mannor. Off-policy modelbased learning under unknown factored dynamics. In ICML, pages 711–719, 2015. [6] Assaf Hallak, Aviv Tamar, Rémi Munos, and Shie Mannor. Generalized emphatic temporal difference learning: Bias-variance analysis. arXiv preprint arXiv:1509.05172, 2015. [7] Nan Jiang and Lihong Li. Doubly robust off-policy value evaluation for reinforcement learning. In Proceedings of The 33rd International Conference on Machine Learning, pages 652–661, 2016. [8] Lihong Li, Remi Munos, and Csaba Szepesvari. Toward Minimax Off-policy Value Estimation. In Guy Lebanon and S. V. N. Vishwanathan, editors, Proceedings of the Eighteenth International Conference on Artificial Intelligence and Statistics, volume 38 of Proceedings of Machine Learning Research, pages 608–616, San Diego, California, USA, 09–12 May 2015. PMLR. URL http://proceedings.mlr.press/v38/li15b.html. [9] Daniel J Mankowitz, Timothy A Mann, and Shie Mannor. Time regularized interrupting options. In Internation Conference on Machine Learning, 2014. [10] Timothy A Mann and Shie Mannor. The advantage of planning with options. RLDM 2013, page 9, 2013. [11] Rémi Munos, Tom Stepleton, Anna Harutyunyan, and Marc Bellemare. Safe and efficient off-policy reinforcement learning. In Advances in Neural Information Processing Systems, pages 1046–1054, 2016. [12] Doina Precup. Eligibility traces for off-policy policy evaluation. Computer Science Department Faculty Publication Series, page 80, 2000. [13] Doina Precup, Richard S Sutton, and Sanjoy Dasgupta. Off-policy temporal-difference learning with function approximation. In ICML, pages 417–424, 2001. [14] Richard S Sutton, Doina Precup, and Satinder Singh. Between MDPs and semi-MDPsmdps: A framework for temporal abstraction in reinforcement learning. Artificial intelligence, 112(1-2): 181–211, 1999. [15] G. Theocharous, P. S. Thomas, and M. Ghavamzadeh. Personalized ad recommendation systems for life-time value optimization with guarantees. In Proceedings of the International Joint Conference on Artificial Intelligence, 2015. [16] P. S. Thomas and E. Brunskill. Data-efficient off-policy policy evaluation for reinforcement learning. In International Conference on Machine Learning, 2016. [17] P. S. Thomas and E. Brunskill. Importance sampling with unequal support. AAAI, 2017. [18] P. S. Thomas, G. Theocharous, and M. Ghavamzadeh. High confidence off-policy evaluation. In Proceedings of the Twenty-Ninth Conference on Artificial Intelligence, 2015. 9 [19] Philip S Thomas, Scott Niekum, Georgios Theocharous, and George Konidaris. Policy evaluation using the Ω-return. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems 28, pages 334–342. Curran Associates, Inc., 2015. URL http://papers.nips.cc/paper/ 5807-policy-evaluation-using-the-return.pdf. 10 | 2017 | 265 |
6,747 | Attentional Pooling for Action Recognition Rohit Girdhar Deva Ramanan The Robotics Institute, Carnegie Mellon University http://rohitgirdhar.github.io/AttentionalPoolingAction Abstract We introduce a simple yet surprisingly powerful model to incorporate attention in action recognition and human object interaction tasks. Our proposed attention module can be trained with or without extra supervision, and gives a sizable boost in accuracy while keeping the network size and computational cost nearly the same. It leads to significant improvements over state of the art base architecture on three standard action recognition benchmarks across still images and videos, and establishes new state of the art on MPII dataset with 12.5% relative improvement. We also perform an extensive analysis of our attention module both empirically and analytically. In terms of the latter, we introduce a novel derivation of bottom-up and top-down attention as low-rank approximations of bilinear pooling methods (typically used for fine-grained classification). From this perspective, our attention formulation suggests a novel characterization of action recognition as a fine-grained recognition problem. 1 Introduction Human action recognition is a fundamental and well studied problem in computer vision. Traditional approaches to action recognition relied on object detection [11, 19, 57], articulated pose [29, 34, 35, 55, 57], dense trajectories [52, 53] and part-based/structured models [9, 56, 58]. However, more recently these methods have been surpassed by deep CNN-based representations [18, 30, 42, 47]. Interestingly, even video based action recognition has benefited greatly from advancements in imagebased CNN models [20, 22, 43, 46]. With the exception of a few 3D-conv-based methods [33, 47, 49], most approaches [12, 14, 15, 17, 54], including the current state of the art [54], use a variant of discriminatively trained 2D-CNN [22] over the appearance (frames) and in some cases motion (optical flow) modalities of the input video. Attention: While using standard deep networks over the full image have shown great promise for the task [54], it raises the question of whether action recognition can be considered as a general classification problem. Some recent works have tried to generate more fine-grained representations by extracting features around human pose keypoints [8] or on object/person bounding boxes [18, 30]. This form of ‘hard-coded attention’ helps improve performance, but requires labeling (or detecting) objects or human pose. Moreover, these methods assume that focusing on the human or its parts is always useful for discriminating actions. This might not necessarily be true for all actions; some actions might be easier to distinguish using the background and context, like a ‘basketball shoot’ vs a ‘throw’; while others might require paying close attention to objects being interacted by the human, like in case of ‘drinking from mug’ vs ‘drinking from water bottle’. Our work: In this work, we propose a simple yet surprisingly powerful network modification that learns attention maps which focus computation on specific parts of the input relevant to the task at hand. Our attention maps can be learned without any additional supervision and automatically lead to significant improvements over the baseline architecture. Our formulation is simple-to-implement, and can be seen as a natural extension of average pooling into a “weighted” average pooling with image-specific weights. Our formulation also provides a novel factorization of attentional processing 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. into bottom-up saliency combined with top-down attention. We further experiment with adding human pose as an intermediate supervision to train our attention module, which encourages the network to look for human object interactions. While this makes little difference to the performance of image-based recognition models, it leads to a larger improvement on video datasets as videos consist of large number of ‘non-iconic’ frames where the subject of object of actions may not be at the center of focus. Our contributions: (1) An easy-to-use extension of state-of-the-art base architectures that incorporates attention to give significant improvement in action recognition performance at virtually negligible increase in computation cost; (2) Extensive analysis of its performance on three action recognition datasets across still images and videos, obtaining state of the art on MPII and HMDB-51 (RGB, single-frame models) and competitive on HICO; (3) Analysis of different base architectures for applicability of our attention module; and (4) Mathematical analysis of our proposed attention module and showing its equivalence to a rank-1 approximation of second order or bilinear pooling (typically used in fine grained recognition methods [16, 26, 28]) suggesting a novel characterization of action recognition as a fine grained recognition problem. 2 Related Work Human action recognition is a well studied problem with various standard benchmarks spanning across still images [7, 13, 34, 36, 58] and videos [24, 27, 41, 45]. The newer image based datasets such as HICO [7] and MPII [34] are large and highly diverse, containing 600 and 393 classes respectively. In contrast, collecting such diverse video based action datasets is hard, and hence existing popular benchmarks like UCF101 [45] or HMDB51 [27] contain only 101 and 51 categories each. This in turn has lead to much higher baseline performance on videos, eg. ∼94% [54] classification accuracy on UCF101, compared to images, eg. ∼32% [30] mean average precision (mAP) on MPII. Features: Video based action recognition methods focus on two main problems: action classification and (spatio-)temporal detection. While image based recognition problems, including action recognition, have seen a large boost with the recent advancements in deep learning (e.g., MPII performance went up from 5% mAP [34] to 27% mAP [18]), video based recognition still relies on hand crafted features such as iDT [53] to obtain competitive performance. These features are computed by extracting appearance and motion features along densely sampled point trajectories in the video, aggregated into a fixed length representation by using fisher vectors [32]. Convolutional neural network (CNN) based approaches to video action recognition have broadly followed two main paradigms: (1) Multi-stream networks [42, 54] which split the input video into multiple modalities such as RGB, optical flow, warped flow etc, train standard image based CNNs on top of those, and late-fuse the predictions from each of the CNNs; and (2) 3D Conv Networks [47, 49] which represent the video as a spatio-temporal blob and train a 3D convolutional model for action prediction. In terms of performance, 3D conv based methods have been harder to scale and multi-stream methods [54] currently hold state of the art performance on standard benchmarks. Our approach is complementary to these paradigms and the attention module can be applied on top of either. We show results on improving action classification over state of the art multi-stream model [54] in experiments. Pose: There have also been previous works in incorporating human pose into action recognition [8, 10, 60]. In particular, P-CNN [8] computes local appearance and motion features along the pose keypoints and aggregates those over the video for action prediction, but is not end-to-end trainable. More recent work [60] adds pose as an additional stream in chained multi-stream fashion and shows significant improvements. Our approach is complementary to these approaches as we use pose as a regularizer in learning spatial attention maps to weight regions of the RGB frame. Moreover, our method is not constrained by pose labels, and as we show in experiments, can show effective performance with pose predicted by existing methods [4] or even without using pose. Hard attention: Previous works in image based action recognition have shown impressive performance by incorporating evidence from the human, context and pose keypoint bounding boxes [8, 18, 30]. Gkioxari el al. [18] modified R-CNN pipeline to propose R*CNN, where they choose an auxiliary box to encode context apart from the human bounding box. Mallya and Lazebnik [30] improve upon it by using the full image as the context and using multiple instance learning (MIL) to reason over all humans present in the image to predict an action label for the image. Our approach gets rid of the bounding box detection step and improves over both these methods by automatically learning to attend to the most informative parts of the image for the task. 2 Soft attention: There has been relatively little work that explores unconstrained ‘soft’ attention for action recognition, with the exception of [39, 44] for spatio-temporal and [40] for temporal attention. Importantly, all these consider a video setting, where a LSTM network predicts a spatial attention map for the current frame. Our method, however, uses a single frame to both predict and apply spatial attention, making it amenable to both single image and video based use cases. [44] also uses pose keypoints labeled in 3D videos to drive attention to parts of the body. In contrast, we learn an unconstrained attention model that frequently learns to look around the human body for objects that make it easier to classify the action. Second-order pooling: Because our model uses a single set of appearance features to both predict and apply an attention map, this makes the output quadratic in the features (Sec. 3.1). This observation allows us to implement attention through second-order or bilinear pooling operations [28], made efficient through low-rank approximations [16, 25, 26]. Our work is most related to [26], who point out when efficiently implemented, low-rank approximations avoid explicitly computing second-order features. We point out that a rank-1 approximation of second-order features is equivalent to an attentional model sometimes denoted as “self attention” [50]. Exposing this connection allows us to explore several extensions, including variations of bottom-up and top-down attention, as well as regularized attention maps that make use of additional supervised pose labels. 3 Approach Our attentional pooling module is a trainable layer that plugs in as a replacement for a pooling operation in any standard CNN. As most contemporary architectures [20, 22, 46] are fully convolutional with an average pooling operation at the end, our module can be used to replace that operation with an attention-weighted pooling. We now derive the pooling layer as an efficient low-rank approximation to second order pooling (Sec. 3.1). Then, we describe our network architecture that incorporates this attention module and explore a pose-regularized variant of the same (Sec. 3.2). 3.1 Attentional pooling as low-rank approximation of second-order pooling Let us write the layer to be pooled as X ∈Rn×f, where n is the number of spatial locations (e.g., n = 16 × 16 = 256) and f is the number of channels (e.g., 2048). Standard sum (or max) pooling would reduce this to vector in Rf×1, which could then be processed by a “fully-connected” weight vector w ∈Rf×1 to generate a classification score. We will denote matrices with upper case letters, and vectors with lower-case bold letters. For the moment, assume we are training a binary classifier (we generalize to more classes later in the derivation). We can formalize this pipeline with the following notation: scorepool(X) = 1T Xw, where X ∈Rn×f, 1 ∈Rn×1, w ∈Rf×1 (1) where 1 is a vector of all ones and x = 1T X ∈R1×f is the (transposed) sum-pooled feature. Second-order pooling: Following past work on second-order pooling [5], let us construct the feature XT X ∈Rf×f. Prior work has demonstrated that such second-order statistics can be useful for fine-grained classification [28]. Typically, one then “vectorizes” this feature, and learns a f 2 vector of weights to generate a score. If we write the vector of weights as a f × f matrix, the inner product between the two vectorized quantities can be succinctly written using the trace operator1. The key identity, Tr(ABT ) = dot(A(:), B(:)) (using matlab notation), can easily be verified by plugging in the definition of a trace operator. This allows us to write the classification score as follows: scoreorder2(X) = Tr(XT XW T ), where X ∈Rn×f, W ∈Rf×f (2) Low-rank second-order pooling: Let us approximate matrix W with a rank-1 approximation, W = abT where a, b ∈Rf×1. Plugging this into the above yields a novel formulation of attentional 1https://en.wikipedia.org/wiki/Trace_(linear_algebra) 3 pooling: scoreattention(X) = Tr(XT XbaT ), where X ∈Rn×f, a, b ∈Rf×1 (3) = Tr(aT XT Xb) (4) = aT XT Xb (5) = aT XT (Xb) (6) where (4) makes use of the trace identity that Tr(ABC) = Tr(CAB) and (5) uses the fact that the trace of a scalar is simply the scalar. The last line (6) gives efficient implementation of attentional pooling: given a feature map X, compute an attention map over all n spatial locations with h = Xb ∈Rn×1, that is then used to compute a weighted average of features x = XT h ∈Rf×1. This weighted-average feature is then pushed through a linear model aT x to produce the final score. Interestingly, (6) can also be written as the following: scoreattention(X) = (Xa)T X b (7) = (Xa)T (Xb) (8) The first line illustrates that the attentional heatmap can also be seen as Xa ∈Rn×1, with b being the classifier of the attentionally-pooled feature. The second line illustrates that our formulation is in fact symmetric, where the final score can be seen as the inner product between two attentional heatmaps defined over all n spatial locations. Fig. 1a illustrates our approach. Top-down attention: To generate prediction for multiple classes, we replace the weight matrix from (2) with class-specific weights: scoreorder2(X, k) = Tr(XT XW T k ), where X ∈Rn×f, Wk ∈Rf×f (9) One could apply a similar derivation to produce class-specific vectors ak and bk, each of them generating a class-specific attention map. Instead, we choose to distinctly model class-specific “top-down” attention [3, 48, 59] from bottom-up visual saliency that is class-agnostic [37]. We do so by forcing one of the attention parameter vectors to be class-agnostic - e.g., bk = b. This makes our final low-rank attentional model scoreattention(X, k) = tT k h, where tk = Xak, h = Xb (10) equivalent to an inner product between top-down (class-specific) tk and bottom-up (saliency-based) h attention maps. Our approach of combining top-down and botom-up attentional maps is reminiscent of biologically-motivated schemes that modulate saliency maps with top-down cues [31]. This suggests that our attentional model can also be implemented using a single, combined attention map defined over all n spatial locations: scoreattention(X, k) = 1T ck, where ck = tk ◦h, (11) where ◦denotes element-wise multiplication and 1 is defined as before. We visualize the combined, top-down, and bottom-up attention maps ck, tk, h ∈Rn×1 in our experimental results. Average pooling (revisited): The above derivation allows us to revisit our average pooling formulation from (1), replacing weights w with class-specific weights wk as follows: scoretop−down(X, k) = 1T Xwk = 1T tk where tk = Xwk (12) From this perspective, the above derivation gives the ability to generate top-down attentional maps from existing average-pooling networks. While similar observations have been pointed out before [59], it naturally emerges as a special case of our bottom-up and top-down formulation of attention. 3.2 Network Architecture We now describe our network architecture to implement the attentional pooling described above. We start from a state of the art base architecture, ResNet-101 [20]. It consists of a stack of ‘modules’, each of which contains multiple convolutional, pooling or identity mapping streams. It finally generates a n1 × n2 × f spatial feature map, which is average pooled to get a f-dimensional vector and is then classified using a linear classifier. 4 ℎ 𝑤 𝑓 𝑓 𝑓 𝑓 𝑓∗ ≅ ∗ 𝑓 𝑓 = 2() order pooling ∗ ∗ Bottom-up Saliency = 𝑤 ℎ Top-down Attention ∗ (a) Visualization of our approach to attentional pooling as a rank-1 approximation of 2nd order pooling. By judicious ordering of the matrix multiplications, one can avoid computing the second order feature XT X and instead compute the product of two attention maps. The top-down attentional map is computed using class-specific weights ak, while the bottom-up map is computed using class-agnostic weights b. We visualize the top-down and bottom-up attention maps learned by our approach in Fig. 2. ∗ Pose 𝑙# loss Method 1 Attention softmax x-entropy loss Method 2 Pose Reg. Attention (b) We explore two architectures in our work, explained in Sec. 3.2. Figure 1: Visualization of our derivation and final network architectures. Our attention module plugs in at the last layer, after the spatial feature map. As shown in Fig. 1b (Method 1), we predict a single channel bottom-up saliency map of same spatial resolution as the last feature map, using a linear classifier on top of it (Xb). Similarly, we also generate the n1 × n2 × K dimensional top-down attention map Xa, where K is number of classes. The two attention maps are multiplied and spatially averaged to generate the K-dimensional output predictions ((Xa)T (Xb)). These operations are equivalent to first multiplying the features with saliency (XT (Xb)) and then passing through a classifier (a(XT (Xb))). Pose: While this unconstrained attention module automatically learns to focus on relevant parts and gives a sizable boost in accuracy, we take inspiration from previous work [8] and use human pose keypoints to guide the attention. As shown in Fig. 1b (Method 2), we use a two-layer MLP on top of the last layer to predict a 17 channel heatmap. The first 16 channels correspond to human pose keypoints and incur a l2 loss against labeled (or detected, using [4]) pose) The final channel is used as an unconstrained bottom-up attention map, as before. We refer to this method as pose-regularized attention, and it can be thought of as a non-linear extension of previous attention map. 4 Experiments Datasets: We experiment with three recent, large scale action recognition datasets, across still images and videos, namely MPII, HICO and HMDB51. MPII Human Pose Dataset [34] contains 15205 images labeled with up to 16 human body keypoints, and classified into one of 393 action classes. It is split into train, val (from authors of [18]) and test sets, with 8218, 6987 and 5708 images each. We use the val set to compare with [18] and for ablative analysis while the final test results are obtained by emailing our results to authors of [34]. The dataset is highly imbalanced and the evaluation is performed using mean average precision (mAP) to equally weight all classes. HICO [7] is a recently introduced dataset with labels for 600 human object interactions (HOI) combining 117 actions with 80 objects. It contains 38116 training and 9658 test images, with each image labeled with all the HOIs active for that image (multi-label setting). Like MPII, this dataset is also highly unbalanced and evaluation is performed using mAP over classes. Finally, to verify our method’s applicability to video based action recognition, we experiment with a challenging trimmed action classification dataset, HMDB51 [27]. It contains 6766 realistic and varied video clips from 51 action classes. Evaluation is performed using average classification accuracy over three train/test splits from [23], each with 3570 train and 1530 test videos. Baselines: Throughout the following sections, we compare our approach first to the standard base architecture, mostly ResNet-101 [20], without the attention-weighted pooling. Then we compare to other reported methods and previous state of the art on the respective datasets. MPII: We train our models for 393-way action classification on MPII with softmax cross-entropy loss for both the baseline ResNet and our attentional model. We compare our performance in Tab. 1. Our unconstrained attention model clearly out-performs the base ResNet model, as well as previous state of the art methods involving detection of multiple contextual bounding boxes [18] and fusion of full image with human bounding box features [30]. Our pose-regularized model performs best, though the improvement is small. We visualize the attention maps learned in Fig. 2. HICO: We train our model on HICO similar to MPII, and compare our performance in Tab. 2. Again, we see a significant 5% boost over our base ResNet model. Moreover, we out-perform all 5 GT Class Other Class Test Image Bottom Up Top Down Combined Top Down Combined playing with animals playing with animals standing, talking in church standing, talking in church garbage collector, walking, ... garbage collector, walking, ... travelling in vehicle travelling in vehicle forestry forestry chopping wood chopping wood violin, sitting violin, sitting guitar, classical, folk, sit... guitar, classical, folk, sit... marching band marching band frisbee frisbee basketball basketball playing musical instruments,... playing musical instruments,... chopping wood chopping wood NZ native physical activity NZ native physical activity calisthenics calisthenics race walking race walking Figure 2: Auto-generated (not hand-picked) visualization of bottom-up (Xb), top-down (Xak) and combined ((Xak) ◦(Xb)) attention on validation images in MPII, that see largest improvement in softmax score for correct class when trained with attention. Since the top-down/combined maps are class specific, we mention the class name for which they are generated for on top left of those heatmaps. We consider 2 classes, the ground truth (GT) for the image, and the class on which it gets lowest softmax score. The attention maps for GT class focus on the objects most useful for distinguishing the class. Though the top-down and combined maps look similar in many cases, they do capture different information. For example, for a garbage collector action (second row), top-down also focuses on the vehicles in background, while the combined map narrows focus down to the garbage bags. (Best viewed zoomed-in on screen) suitcase donut bird hotdog sports ball laptop Figure 3: We crop a 100px patch around the attention peak for all images containing an HOI involving a given object, and show 5 randomly picked patches for 6 object classes here. This suggests our attention model learns to look for objects to improve HOI detection. 6 Table 1: Action classification performance on MPII dataset. Validation (Val) performance is reported on train set split shared by authors of [18]. Test performance obtained from training on complete train set and submitting our output file to authors of [34]. Note that even though our pose regularized model uses pose labels at training time for regularizing attention, it does not require any pose input at test time. The top-half corresponds to a diagnostic analysis of our approach with different base networks. Attention provides a strong 4% improvement for baseline networks with larger spatial resolution (e.g., ResNet). Please see text for additional discussion. The bottom-half reports prior work that makes use of object bounding boxes/pose. Our method performs slightly better with pose annotations (on training data), but even without any pose or detection annotations, we outperform all prior work. Method Full Img Bbox Pose MIL Val (mAP) Test (mAP) Inception-V2 (ours) ✓ 25.2 ResNet101 (ours) ✓ 26.2 Attn. Pool. (I-V2) (ours) ✓ 24.3 Attn. Pool. (R-101) (ours) ✓ 30.3 36.0 Dense Trajectory + Pose [34] ✓ ✓ 5.5 VGG16, RCNN [18] ✓ 16.5 VGG16, R*CNN [18] ✓ 21.7 26.7 VGG16, Fusion (best) [30] ✓ ✓ 32.2 VGG16, Fusion+MIL (best) [30] ✓ ✓ ✓ 31.9 Pose Reg. Attn. Pooling (R-101) (ours) ✓ ✓ 30.6 36.1 Table 2: Multi-label HOI classification performance on HICO dataset. The top-half compares our performance to other full image-based methods. The bottom-half reports methods that use object bounding boxes/pose. Our model out-performs various approaches that need bounding boxes, multi-instance learning (MIL) or specialized losses, and achieves performance competitive to state of the art. Note that even though our pose regularized model uses computed pose labels at training time, it does not require any pose input at test time. Method Full Im. Bbox/Pose MIL Wtd Loss mAP AlexNet+SVM [7] ✓ 19.4 VGG16, full image [30] ✓ 29.4 ResNet101, full image (ours) ✓ 30.2 ResNet101 with CBP [16] (impl. from [1]) ✓ 26.8 Attentional Pooling (R-101) (ours) ✓ 35.0 R*CNN [18] (reported in [30]) ✓ ✓ 28.5 Scene-RCNN [18] (reported in [30]) ✓ ✓ ✓ 29.0 Fusion (best reported) [30] ✓ ✓ ✓ 33.8 Pose Regularized Attentional Pooling (R101) (ours) ✓ ✓ 34.6 Fusion, weighted loss (best reported) [30] ✓ ✓ ✓ ✓ 36.1 previous methods, including ones that use detection bounding boxes at test time except one [30], when that is trained with a specialized weighted loss for this dataset. It is also worth noting that the full image-only performance of VGG and ResNet were comparable in our experiments (29.4% and 30.2%), suggesting that our approach shows larger relative improvement over a similar starting baseline. Though we did not experiment with the same optimization setting as [30], we believe it will give similar improvements there as well. Since this dataset also comes with labels decomposed into actions and objects, we visualize what our attention model looks for, given images containing interactions with a specific object. As Fig. 3 shows, the attention peak is typically close to the object of interest, showing the importance of detecting objects in HOI detection tasks. Moreover, this suggests that our attention maps can also function as weak-supervision for object detection. HMDB51: Next, we apply our attentional method to the RGB stream of the current state of the art single-frame deep model on this dataset, TSN [54]. TSN extends the standard two-stream [42] architecture by using a much deeper base architecture [22] along with enforcing consensus over multiple frames from the video at training time. For the purpose of this work, we focus on the RGB stream only but our method is applicable to flow/warped-flow streams as well. We first train a TSN model using ResNet-101 as base architecture after re-sizing input frames to 450px. This ensures larger spatial dimensions of the output (14 × 14), hence ensuring the last-layer features are amenable to attention. Though our base ResNet model does worse than BN-inception TSN model, as Tab. 3 shows, using our attention module improves the base model to do comparably well. Interestingly, on this dataset regularizing the attention through pose gives a significant boost in 7 Table 3: Action classification performance on HMDB51 dataset using only the RGB stream of a two-stream model. Our base ResNet stream training is done over 480px rescaled images, same as used in our attention model for comparison purposes. Our pose based attention model out-performs the base network by large margin, as well as the previous RGB stream (single-frame) state-of-the-art, TSN [54]. Method Split 1 Split 2 Split 3 Avg TSN, BN-inception (RGB) [54] (Via email with authors) 54.4 49.5 49.2 51.0 ActionVLAD [17] 51.2 49.8 RGB Stream, ResNet50 (RGB) [14] (reported at [2]) 48.9 RGB Stream, ResNet152 (RGB) [14] (reported at [2]) 46.7 TSN, ResNet101 (RGB) (ours) 48.2 46.5 46.7 47.1 Linear Attentional Pooling (ours) 51.1 51.6 49.7 50.8 Pose regularized Attentional Pooling (ours) 54.4 51.1 50.9 52.2 Attention Pose Reg. Attention Figure 4: Attention maps with linear attention and pose regularized attention on a video from HMDB. Note the pose-guided attention is better able to focus on regions of interest in the non-iconic frames. performance, out-performing TSN and establishing new state of the art on the RGB-only single-frame model for HMDB. We visualize the attention maps with normal and pose-regularized attention in Fig. 4. The pose regularized attention are more peaky near the human than their linear counterparts. This potentially explains the improvement using pose on HMDB while it does not help as much on HICO or MPII; HICO and MPII, being image based datasets typically have ‘iconic’ images, with the subjects and objects of action typically in the center and focus of the image. Video frames in HMDB, on the other hand, may have the subject move all across the frame throughout the video, and hence additional supervision through pose at training time helps focus the attention at the right spot. Full-rank pooling: Given our formulation of attention as low-rank second-order pooling, a natural question is what would be the performance of a full-rank model? Explicitly computing the secondorder features of size f × f for f = 2048 (and learning the associated classifier) is cumbersome. Instead, we make use of the compact bilinear approach (CBP) of [16], which generates a lowdimensional approximation of full bilinear pooling [28] using the TensorSketch algorithm. To keep the final output comparable to our attentional-pooled model, we project to f = 2048 dimensions. We find it performs slightly worse than simple average pooling in Table 2. Note that we use an existing implementation [1] with minimal hyper-parameter optimization, and leave a more rigorous comparison to future work. Rank-P approximation: While a full-rank model is cumbersome, we can still explore the effect of using a higher, P-rank approximation. Essentially, a rank-P approximation generates P (1-channel) bottom-up and (C channel) top-down attention maps, and the final prediction is the product of corresponding heatmaps, summed over P. On MPII, we obtain mAP of 30.3, 29.9, 30.0 for P=1, 2 and 5 respectively, showing that the validation performance is relatively stable with P. We do observe a drop in training loss with a higher P, indicating that a higher-rank approximation could be useful for harder datasets and tasks. Per-class attention maps: As we described in Sec. 3.1, our inspiration for combining class-specific and class-agnostic classifiers (i.e. top-down and bottom-up attention respectively), came from the Neuroscience literature on integrating top-down and bottom-up attention [31]. However, our model 8 can also be extended to learn completely class-specific attention maps, by predicting C bottom-up attention maps, and combining each map with the corresponding softmax classifier for that class. We experiment with this idea on MPII and obtain a mAP of 27.9 with 393 (=num-classes) attention maps, compared to 30.3% with 1 map, and 26.2% without attention. On further analysis we observe that both models achieve near perfect mAP on training data, implying that adding more parameters with multiple attention maps leads to over-fitting on the relatively small MPII trainset. However, this may be a viable approach for larger datasets. Diagnostics: It is natural to consider variants of our model that only consider the bottom-up or top-down attentional map. As derived in (12), baseline models with average pooling are equivalent to “top-down-only” attention models, which are resoundingly outperformed by our joint bottom-up and top-down model. It is not clear how to construct a bottom-up only model, since it is class-agnostic, making it difficult to produce class-specific scores. Rather, a reasonable approximation might be applying an off-the-shelf (bottom-up) saliency method used to limit the spatial region that features are averaged over. Our initial experiments with existing saliency-based methods [21] were not promising. Base Network: Finally, we analyze the choice of base architecture for the effectiveness of our proposed attentional pooling module. In Tab. 1, we compare the improvement using attention over ResNet-101 (R-101) [20] and an BN-Inception (I-V2) [22]. Both models perform comparably when trained for full image, however, while we see a 4% improvement on R-101 on using attention, we do not see similar improvements for I-V2. This points to an important distinction in the two architectures, i.e., Inception-style models are designed to be faster in inference and training by rapidly down sampling input images in initial layers through max-pooling. While this reduces the computational cost for later layers, it leads to most layers having very large receptive fields, and hence later neurons have effective access to all of the image pixels. This suggests that all the spatial features at the last layer could be highly similar. In contrast, R-101 downscales the spatial resolution gradually, allowing the last layer features to specialize to different parts of the image, hence benefiting more from attentional pooling. This effect was further corroborated by our experiments on HMDB, where using the standard 224px input resolution showed no improvement with attention, while the same image resized to 450px at input time did. This initial resize ensures the last-layer features are sufficiently distinct to benefit from attentional pooling. 5 Discussion and Conclusion An important distinction of our model from some previous works [18, 30] is that it does not explicitly model action at an instance or bounding-box level. This, in fact, is a strength of our model; making it capable of attending to objects outside of any person-instance bounding box (such as bags of garbage for “garbage collecting”, in Fig 2). In theory, our model can also be applied to instance-level action recognition by applying attentional pooling over an instance’s RoI features. Such a model would learn to look at different parts of human body and its interactions with nearby objects. However, it’s notable that most existing action datasets, including [6, 7, 27, 34, 41, 45], come with only frame or video level labels; and though [18, 30] are designed for instance-level recognition, they are not applied as such. They either copy image level labels to instances or use multiple-instance learning, either of which can be used in conjunction with our model. Another interesting connection that emerges from our work is the relation between second-order pooling and attention. The two communities are traditionally seen as distinct, and our work strongly suggests that they should mix: as newer action datasets become more fine-grained, we should explore second-order pooling techniques for action recognition. Similarly, second-order pooling can serve as a simple but strong baseline for the attention community, which tends to focus on more complex sequential attention networks (based on RNNs or LSTMs). It is also worth noting that similar ideas involving self attention and bilinear models have recently also shown significant improvements in other tasks like image classification [51], language translation [50] and visual question answering [38]. Conclusion: We have introduced a simple formulation of attention as low-rank second-order pooling, and illustrate it on the task of action classification from single (RGB) images. Our formulation allows for explicit integration of bottom-up saliency and top-down attention, and can take advantage of additional supervision when needed (through pose labels). Our model produces competitive or state-of-the-art results on widely benchmarked datasets, by learning where to look when pooling features across an image. Finally, it is easy to implement and requires few additional parameters, making it an attractive alternative to standard pooling, which is a ubiquitous operation in nearly all contemporary deep networks. 9 Acknowledgements: Authors would like to thank Olga Russakovsky for initial review. This research was supported in part by the National Science Foundation (NSF) under grant numbers CNS-1518865 and IIS-1618903, and the Defense Advanced Research Projects Agency (DARPA) under Contract No. HR001117C0051. Additional support was provided by the Intel Science and Technology Center for Visual Cloud Systems (ISTC-VCS). Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the view(s) of their employers or the above-mentioned funding sources. References [1] Compact bilinear pooling implementation. https://github.com/ronghanghu/tensorflow_ compact_bilinear_pooling. [2] Convolutional two-stream network fusion for video action recognition. http://www.robots.ox.ac. uk/~vgg/software/two_stream_action/. [3] F. Baluch and L. Itti. Mechanisms of top-down attention. Trends in Neurosciences, 2011. [4] Z. Cao, T. Simon, S.-E. Wei, and Y. Sheikh. Realtime multi-person 2d pose estimation using part affinity fields. In CVPR, 2017. [5] J. Carreira, R. Caseiro, J. Batista, and C. Sminchisescu. Semantic segmentation with second-order pooling. In ECCV, 2012. [6] J. Carreira and A. Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In CVPR, 2017. [7] Y.-W. Chao, Z. Wang, Y. He, J. Wang, and J. Deng. Hico: A benchmark for recognizing human-object interactions in images. In ICCV, 2015. [8] G. Chéron, I. Laptev, and C. Schmid. P-CNN: Pose-based CNN Features for Action Recognition. In ICCV, 2015. [9] V. Delaitre, I. Laptev, and J. Sivic. Recognizing human actions in still images: a study of bag-of-features and part-based representations. In BMVC, 2010. [10] V. Delaitre, J. Sivic, and I. Laptev. Learning person-object interactions for action recognition in still images. In NIPS, 2011. [11] C. Desai, D. Ramanan, and C. Fowlkes. Discriminative models for static human-object interactions. In CVPR-Workshops, 2010. [12] J. Donahue, L. A. Hendricks, S. Guadarrama, S. V. M. Rohrbach, K. Saenko, and T. Darrell. Long-term recurrent convolutional networks for visual recognition and description. In CVPR, 2015. [13] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The pascal visual object classes (voc) challenge. IJCV, 2010. [14] C. Feichtenhofer, A. Pinz, and R. Wildes. Spatiotemporal residual networks for video action recognition. In NIPS, 2016. [15] C. Feichtenhofer, A. Pinz, and A. Zisserman. Convolutional two-stream network fusion for video action recognition. In CVPR, 2016. [16] Y. Gao, O. Beijbom, N. Zhang, and T. Darrell. Compact bilinear pooling. In CVPR, 2016. [17] R. Girdhar, D. Ramanan, A. Gupta, J. Sivic, and B. Russell. ActionVLAD: Learning spatio-temporal aggregation for action classification. In CVPR, 2017. [18] G. Gkioxari, R. Girshick, and J. Malik. Contextual action recognition with R*CNN. In ICCV, 2015. [19] A. Gupta, A. Kembhavi, and L. S. Davis. Observing human-object interactions: Using spatial and functional compatibility for recognition. PAMI, 2009. [20] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. CVPR, 2016. [21] X. Huang, C. Shen, X. Boix, and Q. Zhao. SALICON: Reducing the semantic gap in saliency prediction by adapting deep neural networks. In ICCV, 2015. [22] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. ICML, 2015. [23] Y. Jiang, J. Liu, A. Roshan Zamir, I. Laptev, M. Piccardi, M. Shah, and R. Sukthankar. THUMOS challenge: Action recognition with a large number of classes. http://www.thumos.info/, 2013. [24] W. Kay, J. Carreira, K. Simonyan, B. Zhang, C. Hillier, S. Vijayanarasimhan, F. Viola, T. Green, T. Back, P. Natsev, et al. The kinetics human action video dataset. arXiv preprint arXiv:1705.06950, 2017. 10 [25] J.-H. Kim, K. W. On, W. Lim, J. Kim, J.-W. Ha, and B.-T. Zhang. Hadamard Product for Low-rank Bilinear Pooling. In ICLR, 2017. [26] S. Kong and C. Fowlkes. Low-rank bilinear pooling for fine-grained classification. In CVPR, 2017. [27] H. Kuehne, H. Jhuang, E. Garrote, T. Poggio, and T. Serre. HMDB: a large video database for human motion recognition. In ICCV, 2011. [28] T.-Y. Lin, A. RoyChowdhury, and S. Maji. Bilinear CNN models for fine-grained visual recognition. In ICCV, 2015. [29] S. Maji, L. Bourdev, and J. Malik. Action recognition from a distributed representation of pose and appearance. In CVPR, 2011. [30] A. Mallya and S. Lazebnik. Learning models for actions and person-object interactions with transfer to question answering. In ECCV, 2016. [31] V. Navalpakkam and L. Itti. An integrated model of top-down and bottom-up attention for optimizing detection speed. In CVPR, 2006. [32] F. Perronnin and C. Dance. Fisher kernels on visual vocabularies for image categorization. In CVPR, 2007. [33] A. Piergiovanni, C. Fan, and M. S. Ryoo. Learning latent sub-events in activity videos using temporal attention filters. In AAAI, 2017. [34] L. Pishchulin, M. Andriluka, and B. Schiele. Fine-grained activity recognition with holistic and pose based features. In GCPR, 2014. [35] D. Ramanan and D. A. Forsyth. Automatic annotation of everyday movements. In NIPS, 2003. [36] M. Ronchi and P. Perona. Describing common human visual actions in images. In BMVC, 2015. [37] U. Rutishauser, D. Walther, C. Koch, and P. Perona. Is bottom-up attention useful for object recognition? In CVPR, 2004. [38] A. Santoro, D. Raposo, D. G. Barrett, M. Malinowski, R. Pascanu, P. Battaglia, and T. Lillicrap. A simple neural network module for relational reasoning. arXiv preprint arXiv:1706.01427, 2017. [39] S. Sharma, R. Kiros, and R. Salakhutdinov. Action recognition using visual attention. ICLR-Workshops, 2016. [40] Y. Shi, Y. Tian, Y. Wang, and T. Huang. Joint network based attention for action recognition. arXiv preprint arXiv:1611.05215, 2016. [41] G. A. Sigurdsson, G. Varol, X. Wang, A. Farhadi, I. Laptev, and A. Gupta. Hollywood in homes: Crowdsourcing data collection for activity understanding. In ECCV, 2016. [42] K. Simonyan and A. Zisserman. Two-stream convolutional networks for action recognition in videos. In NIPS, 2014. [43] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. [44] S. Song, C. Lan, J. Xing, W. Zeng, and J. Liu. An end-to-end spatio-temporal attention model for human action recognition from skeleton data. In AAAI, 2017. [45] K. Soomro, A. R. Zamir, and M. Shah. UCF101: A dataset of 101 human actions classes from videos in the wild. CRCV-TR-12-01, 2012. [46] C. Szegedy, S. Ioffe, and V. Vanhoucke. Inception-v4, inception-resnet and the impact of residual connections on learning. 2016. [47] D. Tran, L. Bourdev, R. Fergus, L. Torresani, and M. Paluri. Learning spatiotemporal features with 3d convolutional networks. In ICCV, 2015. [48] S. Ullman. Visual routines. Cognition, 1984. [49] G. Varol, I. Laptev, and C. Schmid. Long-term temporal convolutions for action recognition. CoRR, abs/1604.04494, 2016. [50] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin. Attention is all you need. In NIPS, 2017. [51] F. Wang, M. Jiang, C. Qian, S. Yang, C. Li, H. Zhang, X. Wang, and X. Tang. Residual attention network for image classification. In CVPR, 2017. [52] H. Wang, A. Kläser, C. Schmid, and L. Cheng-Lin. Action Recognition by Dense Trajectories. In CVPR, 2011. [53] H. Wang and C. Schmid. Action recognition with improved trajectories. In ICCV, 2013. [54] L. Wang, Y. Xiong, Z. Wang, Y. Qiao, D. Lin, X. Tang, and L. Van Gool. Temporal segment networks: Towards good practices for deep action recognition. In ECCV, 2016. 11 [55] W. Yang, Y. Wang, and G. Mori. Recognizing human actions from still images with latent poses. In CVPR, 2010. [56] B. Yao and L. Fei-Fei. Grouplet: A structured image representation for recognizing human and object interactions. In CVPR, 2010. [57] B. Yao and L. Fei-Fei. Modeling mutual context of object and human pose in human-object interaction activities. In CVPR, 2010. [58] B. Yao, X. Jiang, A. Khosla, A. Lin, L. Guibas, and L. Fei-Fei. Human action recognition by learning bases of action attributes and parts. In ICCV, 2011. [59] B. Zhou, A. Khosla, A. Lapedriza, A. Oliva, and A. Torralba. Learning deep features for discriminative localization. In CVPR, 2016. [60] M. Zolfaghari, G. L. Oliveira, N. Sedaghat, and T. Brox. Chained Multi-stream Networks Exploiting Pose, Motion, and Appearance for Action Classification and Detection. In ICCV, 2017. 12 | 2017 | 266 |
6,748 | Testing and Learning on Distributions with Symmetric Noise Invariance Ho Chung Leon Law Department of Statistics University Of Oxford hlaw@stats.ox.ac.uk Christopher Yau Centre for Computational Biology University of Birmingham c.yau@bham.ac.uk Dino Sejdinovic Department of Statistics University Of Oxford dino.sejdinovic@stats.ox.ac.uk Abstract Kernel embeddings of distributions and the Maximum Mean Discrepancy (MMD), the resulting distance between distributions, are useful tools for fully nonparametric two-sample testing and learning on distributions. However, it is rare that all possible differences between samples are of interest – discovered differences can be due to different types of measurement noise, data collection artefacts or other irrelevant sources of variability. We propose distances between distributions which encode invariance to additive symmetric noise, aimed at testing whether the assumed true underlying processes differ. Moreover, we construct invariant features of distributions, leading to learning algorithms robust to the impairment of the input distributions with symmetric additive noise. 1 Introduction There are many sources of variability in data, and not all of them are pertinent to the questions that a data analyst may be interested in. Consider, for example, a nonparametric two-sample testing problem, which has recently been attracting significant research interest, especially in the context of kernel embeddings of distributions [2, 5, 7]. We observe samples {X1j}N1 j=1 and {X2j}N2 j=1 from two data generating processes P1 and P2, respectively, and would like to test the null hypothesis that P1 = P2 without making any parametric assumptions on these distributions. With a large sample-size, the minutiae of the two data generating processes are uncovered (e.g. slightly different calibration of the data collecting equipment, different numerical precision), and we ultimately reject the null hypothesis, even if the sources of variation across the two samples may be irrelevant for the analysis. Similarly, we may be interested in learning on distributions [14, 23, 24], where the appropriate level of granularity in the data is distributional. For example, each label yi in supervised learning is associated to a whole bag of observations Bi = {Xij}Ni j=1 – assumed to come from a probability distribution Pi, or we may be interested in clustering such bags of observations. Again, nonparametric distances used in such contexts to facilitate a learning algorithm on distributions, such as Maximum Mean Discrepancy (MMD) [5], can be sensitive to irrelevant sources of variation and may lead to suboptimal or even misleading results, in which case building predictors which are invariant to noise is of interest. While it may be tempting to revert back to a parametric setup and work with simple, easy to interpret models, we argue that a different approach is possible: we stay within a nonparametric framework, exploit the irregular and complicated nature of real life distributions and encode invariances to sources of variation assumed to be irrelevant. In this contribution, we focus on invariances to symmetric additive noise on each of the data generating distributions. Namely, assume that the i-th sample {Xij}Ni j=1 we observe does not follow the distribution Pi of interest but instead its convolution Pi ⋆Ei with some unknown noise distributions Ei assumed to be symmetric about 0 (we also require that it has a positive characteristic function). We would like to assess the differences between Pi and Pi′ while allowing Ei and Ei′ to differ in an arbitrary way. We investigate two approaches to this problem: (1) measuring the degree of asymmetry of the paired differences {Xij −Xi′j}, and (2) comparing the phase functions of the corresponding samples. While the first approach is simpler and presents a sensible solution for the two-sample testing problem, we demonstrate that phase functions give a much better gauge on the relative comparisons between bags of observations, as required for learning on distributions. The paper is outlined as follows. In section 2, we provide an overview of the background. In section 3, we provide details of the construction and implementation of phase features. In section 4, we discuss the approach based on asymmetry in paired differences for two sample testing with invariances. Section 5 provides experiments on synthetic and real data, before concluding in section 6. 2 Background and Setup We will say that a random vector E on Rd is a symmetric positive definite (SPD) component if its characteristic function is positive, i.e. ϕE(ω) = EX∼E exp(iω⊤E) > 0, ∀ω ∈Rd. This means that E is (1) symmetric about zero, i.e. E and −E have the same distribution and (2) if it has a density, this density must be a positive definite function [20]. Note that many distributions used to model additive noise, including the spherical zero-mean Gaussian distribution, as well as multivariate Laplace, Cauchy or Student’s t (but not uniform), are all SPD components. Following the terminology similar to that of [3], we will say that a random vector X on Rd is decomposable if its characteristic function can be written as ϕX = ϕX0ϕE, with ϕE > 0. Thus, if X can be written in the form X = X0 + E, where X0 and E are independent and E is an SPD noise component, then X is decomposable. We will say that X is indecomposable if it is not decomposable. In this paper, we will assume that mostly the indecomposable components of distributions are of interest and will construct tools to directly measure differences between these indecomposable components, encoding invariance to other sources of variability. The class of Borel Probability measures on Rd will be denoted M1 +(Rd), while the class of indecomposable probability measures will be denoted by I(Rd) ⊆M1 +(Rd). 2.1 Kernel Embeddings, Fourier Features and learning on distributions For any positive definite function k: X × X 7→R, there exists a unique reproducing kernel Hilbert space (RKHS) Hk of real-valued functions on X. Function k(·, x) is an element of Hk and represents evaluation at x, i.e. ⟨f, k(·, x)⟩H = f(x), ∀f ∈Hk, ∀x ∈X. The kernel mean embedding (cf. [15] for a recent review) of a probability measure P is defined by µP = EX∼P [k(·, X)] = R X k(·, x)dP(x). The Maximum Mean Discrepancy (MMD) between probability measures P and Q is then given by ∥µP −µQ∥Hk. For shift-invariant kernels on Rd, using Bochner’s characterisation of positive definiteness [26, 6.2], the squared MMD can be written as a weighted L2-distance between characteristic functions [22, Corollary 4] ∥µP −µQ∥2 Hk = Z Rd |ϕP (ω) −ϕQ (ω)|2 dΛ (ω) , (1) where Λ is the non-negative spectral measure (inverse Fourier transform) of kernel k as a function of x −y, while ϕP (ω) and ϕQ(ω) are the characteristic functions of probability measures P and Q. Bochner’s theorem is also used to construct random Fourier features (RFF) [19] for fast approximations to kernel methods in order to approximate a pre-specified shift-invariant kernel by a finite dimensional explicit feature map. If we can draw samples from its spectral measure Λ, we can 2 approximate k by1 ˆk(x, y) = 1 m m X j=1 cos(ωT j x) cos(ωT j y) + sin(ωT j x) sin(ωT j y) = ⟨φ(x), φ(y)⟩R2m where ω1, . . . , ωm ∼Λ and φ(x) := q 1 m cos ω⊤ 1 x , sin ω⊤ 1 x . . . , cos ω⊤ mx , sin ω⊤ mx . Thus, the explicit computation of the kernel matrix is not needed and the computational complexity is reduced. This also allows computation with the approximate, finite-dimensional embeddings ˜µP = Φ(P) = EX∼P φ(X) ∈R2m, which can be understood as the evaluations (real and complex part stacked together) of the characteristic function ϕP at frequencies ω1, . . . , ωm. We will refer to the approximate embeddings Φ(P) as Fourier features of distribution P. Kernel embeddings can be used for supervised learning on distributions. Assume we have a training set {Bi, yi}n i=1, where input Bi = {xij}Ni j=1 is a bag of samples taking values in X, and yi is a response. Given a kernel k: X × X →R, we first map each Bi to the empirical embedding µ ˆ Pi = 1 Ni PNi j=1 k(·, xij) ∈Hk and then can apply any positive definite kernel on Hk as the kernel on bag inputs, e.g. linear kernel ˜K(Bi, B′ i) = ⟨µ ˆ Pi, µ ˆ Pi′ ⟩Hk, in order to perform classification [14] or regression [24]. Approximate kernel embeddings have also been applied in this context [23]. 3 Phase Discrepancy and Phase Features While MMD and kernel embeddings are related to characteristic functions, and indeed the same connection forms a basis for fast approximations to kernel methods using random Fourier features [19], the relevant notion in our context is the phase function of a probability measure, recently used for nonparametric deconvolution by [3]. In this section, we overview this formalism. Based on the empirical phase functions, we will then derive and investigate hypothesis testing and learning framework using phase features of distributions. In nonparametric deconvolution [3], the goal is to estimate the density function f0 of a univariate r.v. X0, but in general we only have noisy data samples X1, . . . , Xn iid ∼X = X0 + E, where E denotes an independent noise term. Even though the distribution of E is unknown, making the assumption that E is an SPD noise component, and that X0 is indecomposable, i.e. X0 itself does not contain any SPD noise components, [3] show that it is possible to obtain consistent estimates of f0. They distinguish between the symmetric noise and the underlying indecomposable component by matching phase functions, defined as ρX (ω) = ϕX (ω) |ϕX (ω)| where ϕX (ω) denotes the characteristic function of X. Observe that |ρX (ω)| = 1, and thus we are effectively removing the amplitude information from the characteristic function. For a SPD noise component E, the phase function is ρE(ω) ≡1. But then since ϕX = ϕX0ϕE, we have that ρX0 = ρX = ϕX/|ϕX|, i.e. the phase function is invariant to additive SPD noise components. This motivates us to construct explicit feature maps of distributions with the same property and similarly to the motivation of [3], we argue that real-world distributions of interest often exhibit certain amount of irregularity and it is exactly this irregularity which is exploited in our methodology. In analogy to the MMD, we first define the phase discrepancy (PhD) as a weighted L2-distances between the phase functions: PhD(X, Y ) = Z Rd |ρX (ω) −ρY (ω)|2 dΛ (ω) (2) for some non-negative measure Λ (w.l.o.g. a probability measure). Now suppose we write X = X0 + U, Y = Y0 + V , where U and V are SPD noise components. This then implies ρX = ρX0 and ρY = ρY0 Λ-everywhere, so that PhD(X, Y ) = PhD(X0, Y0). It is clear then that the PhD is 1a complex feature map φ(x) = q 1 m exp iω⊤ 1 x , . . . , exp iω⊤ mx can also be used, but we follow the convention of real-valued Fourier features, since kernels of interest are typically real-valued. 3 not affected by additive SPD noise components, so it captures desired invariance. However, the PhD for Λ supported everywhere is in fact not a proper metric on the indecomposable probability measures I(Rd), as one can find indecomposable random variables X and Y s.t. ρX = ρY and thus PhD(X, Y ) = 0. An example is given in Appendix A. While such cases appear contrived, we hence restrict attention to a subset of indecomposable probability measures P(Rd) ⊂I(Rd), which are uniquely determined by phase functions, i.e. ∀P, Q ∈P(Rd) : ρP = ρQ ⇒P = Q. We now have the two following propositions (proofs are given in Appendix B). Proposition 1. PhD(X, Y ) = 2 −2 R Eξω(X) ∥Eξω(X)∥ ⊤ Eξω(Y ) ∥Eξω(Y )∥ dΛ(ω) where ξω (x) = cos ω⊤x , sin ω⊤x ⊤and ∥· ∥denotes the standard L2 norm. Proposition 2. K (PX, PY ) = R Eξω(X) ∥Eξω(X)∥ ⊤ Eξω(Y ) ∥Eξω(Y )∥ dΛ(ω) is a positive definite kernel on probability measures. Now, we can construct an approximate explicit feature map for kernel K. Taking a sample {ωi}m i=1 ∼ Λ, we define Ψ : PX 7→R2m given by Ψ(PX) = q 1 m Eξω1(X) ∥Eξω1(X)∥, . . . , Eξωm(X) ∥Eξωm(X)∥ . We will refer to Ψ(·) as the phase features. Note that these are very similar to Fourier features, but the cos, sin-pair corresponding to each frequency is normalised to have unit L2 norm. In other words, Ψ(·) can be thought of as evaluations of the phase function at the selected frequencies. By construction, phase features are invariant to additive SPD noise components. For an empirical measure, we simply have the following: Ψ( ˆPX) = q 1 m ˆEξω1(X) ∥ˆEξω1(X)∥, . . . , ˆEξωm(X) ∥ˆEξωm(X)∥ (3) where we have replaced the expectations by their empirical estimates. Because
Ψ( ˆPX)
= 1, we can construct d PhD( ˆPX, ˆPY ) =
Ψ( ˆPX) −Ψ( ˆPY )
2 = 2 −2Ψ( ˆPX)⊤Ψ( ˆPY ), (4) which is a Monte Carlo estimator of PhD( ˆPX, ˆPY ). In summary, Ψ( ˆP) ∈R2m is an explicit feature vector of the empirical distribution which encodes invariance to additive SPD noise components present in P 2, as demonstrated in Figure F.1 in the Appendix. It can now be directly applied to (1) two-sample testing up to SPD components, where the distance between the phase features, i.e. an estimate (4) of the PhD, can be used as a test statistic, with details given in section 5.1 and (2) learning on distributions, where we use phase features as the explicit feature map for a bag of samples. Although we have assumed an indecomposable underlying distribution so far, this assumption is not strict. For distribution regression, if the indecomposable assumption is invalid, given that the underlying distribution is irregular, it may still be useful to encode invariance as long as the benefit of removing the SPD components irrelevant for learning outweighs the signal in the SPD part of the distribution, i.e. there is a trade off between SPD noise and SPD signal. In practice, the phase features we propose can be used to encode such invariance where appropriate or in conjunction with other features which do not encode invariance. In order to construct the approximate mean embeddings for learning, we first compute an explicit feature map by taking averages of the Fourier features, as given by Φ( ˆPX) = q 1 m h ˆEξω1(X), . . . , ˆEξωm(X) i . For phase features, we need to compute an additional normalisation term over each frequency as in (3). To obtain the set of frequencies {wi}m i=1, we can draw 2Note that, unlike the population expression Ψ(P), the empirical estimator Ψ( ˆP) will in general have a distribution affected by the noise components and is thus only approximately invariant, but we observe that it captures invariance very well as long as the signal-to-noise regime remains relatively high (Section 5.1). 4 samples from a probability measure Λ corresponding to an inverse Fourier transform of a shiftinvariant kernel, e.g. Gaussian Kernel. However, given a supervised signal, we can also optimise a set of frequencies {wi}m i=1 that will give us a useful representation and good discriminative performance. In other words, we no longer focus on a specific shift-invariant kernel k, but are learning discriminative Fourier/phase features. To do this, we can construct a neural network (NN) with special activation functions, pooling layers as shown in Algorithm D.1 and Figure D.1 in the Appendix. 4 Asymmetry in Paired Differences We now consider a separate approach to nonparametric two-sample test, where we wish to test the null hypothesis that H0 : P d=Q vs. the general alternative, but we only have iid samples arising from X ∼P ⋆E1 and Y ∼Q ⋆E2. i.e. X = X0 + U Y = Y0 + V where X0 ∼P, Y0 ∼Q lie in the space of P(Rd) of indecomposable distributions uniquely determined by phase functions and U and V are SPD noise components. With this setting (proof in Appendix B): Proposition 3. Under the null hypothesis H0, X −Y is SPD ⇐⇒X0 d=Y0. This motivates us to simply perform a two-sample test on X −Y and Y −X since its rejection would imply rejection of X0 d=Y0, as it tests for symmetry. However, note that this is a test for symmetry only and that for consistency against all alternatives, positivity of characteristic function would need to be checked separately. Now, given two i.i.d. samples {Xi}n i=1 and {Yi}n i=1 with n even, we split the two samples into two halves and compute Wi = Xi −Yi on one half and Zi = Yi −Xi on the other half, and perform a nonparametric two sample test on W and Z (which are, by construction, independent of each other). The advantage of this regime is that we can use any two-sample test – in particular in this paper, we will focus on the linear time mean embedding (ME) test [7], which was found to have performance similar to or better than the original MMD two-sample test [5], and explicitly formulates a criterion which maximises the test power. We will refer to the resulting test on paired differences as the Symmetric Mean Embedding (SME). Although we have assumed here that X0, Y0 lie in the space P(Rd) of indecomposable distributions, in practice, the SME test would not reject if the underlying distributions of interest differ only in the symmetric components (or in the SPD components for the PhD test). We argue this to be unlikely due to real life distributions being complex in nature with interesting differences often having a degree of asymmetry. In practice, we recommend the use of the ME and SME or PhD test together to provide an exploratory tool to understand the underlying differences, as demonstrated in the Higgs Data experiment in section 5.1. It is tempting to also consider learning on distributions with invariances using this formalism. However note that the MMD on paired differences is not invariant to the additive SPD noise components under the alternative, i.e. in general MMD(X −Y, Y −X) ̸= MMD(X0 −Y0, Y0 −X0). This means that the paired differences approach to learning is sensitive to the actual type and scale of the additive SPD noise components, hence not suitable for learning. The mathematical details and empirical experiments to show this are presented in Appendix C and F.1. 5 Experimental Results 5.1 Two-Sample Tests with Invariances In this section, we demonstrate the performance of the SME test and the PhD test on both artificial and real-world data for testing the hypothesis H0 : X0 d=Y0 based on samples {Xi}N i=1 from X0 + U and {Yi}N i=1 from Y0 + V , where U and V are arbitrary SPD noise components (we assume the same number of samples for simplicity). SME test follows the setup in [7] but applied to {Xi −Yi}N/2 i=1 and {Yi −Xi}N i=N/2+1. For the PhD test, we use as the test statistic the estimate d PhD( ˆPX, ˆPY ) of (2). It is unclear what the exact form of the null distribution is, so we use a permutation test, by recomputing this statistic on the samples which are first merged and then randomly split in the original proportions. 5 1000 2000 3000 4000 5000 6000 7000 8000 Sample Size 0.0 0.2 0.4 0.6 0.8 1.0 Rejection Ratio ME n11 = 0. 01, n12 = 0. 05 PhD n11 = 0. 01, n12 = 0. 05 SME n11 = 0. 01, n12 = 0. 05 ME n11 = 0. 25, n12 = 0. 5 PhD n11 = 0. 25, n12 = 0. 5 SME n11 = 0. 25, n12 = 0. 5 0 1000 2000 3000 4000 5000 6000 7000 8000 Sample Size 0.0 0.2 0.4 0.6 0.8 1.0 Power ME All levels PhD n1 = 0. 0, n2 = 0. 0 SME n1 = 0. 0, n2 = 0. 0 PhD n1 = 0. 01, n2 = 0. 05 SME n1 = 0. 01, n2 = 0. 05 SME n1 = 0. 1, n2 = 0. 1 SME n1 = 0. 25, n2 = 0. 25 Figure 1: Type I error and Power under various additional symmetric noise in the synthetic χ2 dataset. Dashed line is the 99% Wald interval here. Left: Type I error, n11 denotes the noise to signal ratio for the first set of samples and n12 for the second set. Right: Power, n1 denotes the noise to signal ratio for the X set of samples and n2 denotes the noise to signal ratio for the Y set of samples. While we are combining samples with different distributions, the permutation test is still justified since, under the null hypothesis X0 d=Y0, the resulting characteristic function ϕnull of the mixture can be written as ϕnull = 1 2ϕX0ϕU + 1 2ϕX0ϕV = ϕX0(1 2ϕU + 1 2ϕV ) and since the mixture of the SPD noise terms is also SPD, we have that ρnull = ρX0 = ρY0. For our experiments, we denote by N the sample size, d the dimension of the samples, and we take α = 0.05 to be the significance level. In the SME test, we take the number of test locations J to be 10, and use 20% of the samples to optimise the test locations. All experimental results are averaged over 1000 runs, where each run repeats the simulation or randomly samples without replacement from the dataset. 5.1.1 Synthetic example: Noisy χ2 We start by demonstrating our tests with invariances on a simulated dataset where X0 and Y0 are random vectors with d = 5, each dimension is the same in distribution and follows χ2(4)/4 and χ2(8)/8 respectively, i.e. chi-squared random variables, with different degrees of freedom, rescaled to have the same mean 1 (but have different variances, 1/2 and 1/4 respectively). An illustration of the true and empirical phase and characteristic function with noise for these two distributions can be found in Appendix F.2. We construct samples {Xn1,i}N i=1 and {Yn2,i}N i=1 such that Xn1 ∼X0 + U, where U ∼N(0, σ2 1I) and similarly Yn2 ∼Y0 + V , where V ∼N(0, σ2 2I), ni denotes the noise-to-signal ratio given by the ratio of variances in each dimension, i.e. n1 = 2σ2 1 and n2 = 4σ2 2. We first verify that Type I error is indeed controlled at our design level of α = 0.05 up to various additive SPD noise components. This is shown in Figure 1 (left), where X0 d=Y0, both constructed using χ2(4)/4, with the noiseless case found in Figure F.6 in the Appendix. It is noted here that the ME test rejects the null hypothesis for even a small difference in noise levels, hence it is unable to let us target the underlying distributions we are concerned with. This is unlike the SME test which controls the Type I error even for large differences in noise levels. The PhD test, on the other hand, while correctly controlling Type I at small noise levels, was found to have inflated Type I error rates for large noise, with more results and explanation provided in Figure F.6 in the Appendix. Namely, the test relies on the invariance to SPD of the population expression of PhD, but the estimator of the null distribution of the corresponding test statistic will in general be affected by the differing noise levels. Next, we investigate the power, shown in Figure 1 (right). For a fair comparison, we have included the PhD test power only for small noise levels, in which the Type I error is controlled at the design level. In these cases, the PhD test has better power than the SME test. This is not surprising, as for the SME we have to halve the sample size in order to construct a valid test. However, recall that the PhD test has an inflated Type I error for large noises, which means that its results should be considered with caution in practice. ME test rejects at all levels at all sample sizes as it picks up all possible 6 Figure 2: Rejection ratio vs. sample size for extremely low level features for Higgs dataset. Dashed line is the 99% Wald interval for 1000 repetitions for α = 0.05. Note PhD is not used here, due to its expensive computational cost. Figure 3: RMSE on the Aerosol test set, corrupted by various levels of noise averaged over 100 runs, with the 5th and the 95th percentile. The noiseless case is shown with one run. RMSE from mean is 0.206. differences. SME and PhD are by construction more conservative tests whose rejection provides a much stronger statement: two samples differ even when all arbitrary additive SPD components have been stripped off. 5.1.2 Higgs Dataset The UCI Higgs dataset [1, 11] is a dataset with 11 million observations, where the problem is to distinguish between the signal process where Higgs bosons are found, versus the background process that do not produce Higgs bosons. In particular, we will consider a two-sample test with the ME and SME test on the high level features derived by physicists, as well as a two-sample test on four extremely low level features (azimuthal angular momentum φ measured by four particle jets in the detector). The high level features here (in R7) have been shown to have good discriminative properties in [1]. Thus, we expect them to have different distributions across two processes. Denoting by X the high level features of the process without Higgs Boson, and Y as the corresponding distribution for the processes where Higgs bosons are produced, we test the null hypothesis that the indecomposable parts of X and Y agree. The results can be found in Table F.1 in the Appendix, which shows that the high level features differ even up to additive SPD components, with a high power for the SME and ME test even at small sample sizes (rejection rate of 0.94 at N = 500). Now we perform the same experiment, but with the low level features ∈R4, commented in [1] to carry very little discriminating information, using the setup from [2]. The results for the ME and SME test can be found in Figure 2. Here we observe that while ME test clearly rejects and finds the difference between the two distributions, there is no evidence that the indecomposable parts of the joint distributions of the angular momentum actually differ. In fact, the test rejection rate remains around the chosen design level of α = 0.05 for all sample sizes. This highlights the significance in using the SME test, suggesting that the nature of the difference between the two processes can potentially be explained by some additive symmetric noise components which may be irrelevant for discrimination, providing an insight into the dataset. Furthermore, this also highlights the argument that given two samples from complex data collection and generation processes, a nonparametric two sample test like ME will likely reject given sufficient sample sizes, even if the discovered difference may not be of interest. With the SME test however, we can ask a much more subtle question about the differences between the assumed true underlying processes. Figures showing that the Type I error is controlled at the design level of α = 0.05 for both low and high level features can be found in Figure F.7 in the Appendix. 5.2 Learning with Phase Features 5.2.1 Aerosol Dataset To demonstrate the phase features invariance to SPD noise component, we use the Aerosol MISR1 dataset also studied by [24] and [25] and consider a situation with covariate shift [18] on distribution inputs: the testing data is impaired by additive SPD components different to that in the training data. 7 Table 1: Mean Square Error (MSE) on dark matter dataset for 500 runs with 5th and 95th percentile. Algorithm MSE Mean 0.16 PLRR 0.021 (0.018, 0.024) GLRR 0.033 (0.030, 0.037) LGRR 0.032 (0.028, 0.036) PGRR 0.021 (0.017, 0.024) GGRR 0.018 (0.015, 0.019) Figure 4: MSE with various levels of noise added on test set, with 5th and 95th percentile. Here, we have an aerosol optical depth (AOD) multi-instance learning problem with 800 bags, where each bag contains 100 randomly selected multispectral (potentially cloudy) pixels within 20km radius around an AOD sensor. The label yi for each bag is given by the AOD sensor measurements and each sample xi is 16-dimensional. This can be understood as a distribution regression problem where each bag is treated as a set of samples from some distribution. We use 640 bags for training and 160 bags for testing. Here in the bags for testing only, we add varying levels of Gaussian noise ϵ ∼N(0, Z) to each bag, where Z is a diagonal matrix with diagonal components zi ∼U[0, σvi] with vi being the empirical variance in dimension i across all samples, accounting for different scales across dimensions. For comparisons, we consider linear ridge regression on embeddings with respect to a Gaussian kernel, approximated with RFF (GLRR) as described in section 2.1 (i.e. a linear kernel is applied on approximate embeddings), linear ridge regression on phase features (PLRR) (i.e. normalisation step is applied to obtain (3)), and also the phase and Fourier neural networks (NN), described in Appendix D, tuning all hyperparameters with 3-fold cross validation. With the same model, we now measure Root Mean Square Error (RMSE) 100 times with various noise-corrupted test sets and results are shown in figure 3. It is also noted that a second level non-linear kernel ˜K does not improve performance significantly on this problem [24]. We see that GLRR and PLRR are competitive (see Appendix Table F.2) in the noiseless case, and these clearly outperform both the Fourier NN and Phase NN (likely due to the small size of the dataset). For increasing noise, the performance of GLRR degrades significantly, and while the performance of PLRR degrades also, the model is much more robust under additional SPD noise. In comparison, the Phase NN implementation is almost insensitive to covariate shift in the test sets, unlike the performance of PLRR, highlighting the importance of learning discriminative frequencies w in a very low signal-to-noise setting. It is noted that the Fourier NN performs similarly to that of the Phase NN on this example. Interestingly, discriminative frequencies learnt on the training data correspond to Fourier features that are nearly normalised (i.e. they are close to unit norm - see Figure F.8 in the Appendix). This means that the Fourier NN has learned to be approximately invariant based on training data, indicating that the original Aerosol data potentially has irrelevant SPD noise components. This is reinforced by the nature of the dataset (each bag contains 100 randomly selected potentially cloudy pixels, known to be noisy [25]) and no loss of performance from going from GLRR to PLRR. The results highlights that phase features are stable under additive SPD noise. 5.2.2 Dark Matter Dataset We now study the use of phase features on the dark matter dataset, composing of a catalog of galaxy clusters. In this setting, we would like to predict the total mass of galaxy clusters, using the dispersion of velocities in the direction along our line of sight. In particular, we will use the ‘ML1’ dataset, as obtained from the authors of [16, 17], who constructed a catalog of massive halos from the MultiDark mdpl simulation [9]. The dataset contains 5028 bags, with each sample consisting of its sub-object velocity and its mass label in R. By viewing each galaxy cluster at multiple lines of sights, we obtain 15 000 bags, using the same experimental setup as in [10]. For experiments, we use approximately 9000 bags for training, and 3000 bags each for validation and testing, keeping those of multiple lines of sight in the same set. As before, we use GLRR and PLRR and we also include 8 in comparisons methods with a second level Gaussian kernel (with RFF) applied to phase features (PGRR) and to approximate embeddings (GGRR). For a baseline, we also include a first level linear kernel (equivalent to representing each bag with its mean), before applying a second level gaussian kernel (LGRR). We use the same set of randomly sampled frequencies across the methods, tuning for the scale of the frequencies and for regularisation parameters. Table 1 shows the results of the methods across 10 different data splits, with 50 sets of randomised frequencies for each data split. We see that PLRR is significantly better than GLRR. This suggests that under this model structure, by removing SPD components from each bag, we can target the underlying signal and obtain superior performance, highlighting the applicability of phase features. Considering a second level gaussian kernel, we see that the GGRR has a slight advantage over PGRR, with PGRR performing similar to PLRR. This suggests that the SPD components of the distribution of sub-object velocity may be useful for predicting the mass of a galaxy cluster if an additional nonlinearity is applied to embeddings – whereas the benefits of removing them outweigh the signal present in them without this additional nonlinearity. To show that indeed the phase features are robust to SPD components, we perform the same covariate shift experiment as in the aerosol dataset, with results given in Figure 4. Note that LGRR is robust to noise, as each bag is represented by its mean. 6 Conclusion No dataset is immune from measurement noise and often this noise differs across different data generation and collection processes. When measuring distances between distributions, can we disentangle the differences in noise from the differences in the signal? We considered two different ways to encode invariances to additive symmetric noise in those distances, each with different strengths: a nonparametric measure of asymmetry in paired sample differences and a weighted distance between the empirical phase functions. The former was used to construct a hypothesis test on whether the difference between the two generating processes can be explained away by the difference in postulated noise, whereas the latter allowed us to introduce a flexible framework for invariant feature construction and learning algorithms on distribution inputs which are robust to measurement noise and target underlying signal distributions. Acknowledgements We thank Dougal Sutherland for suggesting the use of of the dark matter dataset, Michelle Ntampaka for providing the catalog, as well as Ricardo Silva, Hyunjik Kim and Kaspar Martens for useful discussions. This work was supported by the EPSRC and MRC through the OxWaSP CDT programme (EP/L016710/1). C.Y. and H.C.L.L. also acknowledge the support of the MRC Grant No. MR/L001411/1. The CosmoSim database used in this paper is a service by the Leibniz-Institute for Astrophysics Potsdam (AIP). The MultiDark database was developed in cooperation with the Spanish MultiDark Consolider Project CSD2009-00064. The authors gratefully acknowledge the Gauss Centre for Supercomputing e.V. (www.gauss-centre.eu) and the Partnership for Advanced Supercomputing in Europe (PRACE, www.prace-ri.eu) for funding the MultiDark simulation project by providing computing time on the GCS Supercomputer SuperMUC at Leibniz Supercomputing Centre (LRZ, www.lrz.de). 9 References [1] Pierre Baldi, Peter Sadowski, and Daniel Whiteson. Searching for exotic particles in high-energy physics with deep learning. Nature communications, 5, 2014. [2] Kacper P Chwialkowski, Aaditya Ramdas, Dino Sejdinovic, and Arthur Gretton. Fast twosample testing with analytic representations of probability measures. In Advances in Neural Information Processing Systems, pages 1981–1989, 2015. [3] Aurore Delaigle and Peter Hall. Methodology for non-parametric deconvolution when the error distribution is unknown. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 78(1):231–252, 2016. [4] Paul Fearnhead and Dennis Prangle. Constructing summary statistics for approximate bayesian computation: semi-automatic approximate bayesian computation. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 74(3):419–474, 2012. [5] Arthur Gretton, Karsten M Borgwardt, Malte J Rasch, Bernhard Schölkopf, and Alexander Smola. A kernel two-sample test. Journal of Machine Learning Research, 13(Mar):723–773, 2012. [6] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning (ICML), pages 448–456, 2015. [7] Wittawat Jitkrittum, Zoltán Szabó, Kacper P Chwialkowski, and Arthur Gretton. Interpretable distribution features with maximum testing power. In Advances in Neural Information Processing Systems 29, pages 181–189. 2016. [8] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [9] Anatoly Klypin, Gustavo Yepes, Stefan Gottlober, Francisco Prada, and Steffen Hess. MultiDark simulations: the story of dark matter halo concentrations and density profiles. 2014. arXiv:1411.4001. [10] Ho Chung Leon Law, Dougal J. Sutherland, Dino Sejdinovic, and Seth Flaxman. Bayesian approaches to distribution regression. arXiv preprint arXiv:1705.04293, 2017. [11] M. Lichman. UCI machine learning repository, 2013. [12] Yu V Linnik and IV Ostrovskii. Decomposition of random variables and vectors. 1977. [13] J. Mitrovic, D. Sejdinovic, and Y.W. Teh. DR-ABC: Approximate Bayesian Computation with Kernel-Based Distribution Regression. In International Conference on Machine Learning (ICML), pages 1482–1491, 2016. [14] Krikamol Muandet, Kenji Fukumizu, Francesco Dinuzzo, and Bernhard Schölkopf. Learning from distributions via support measure machines. In Advances in Neural Information Processing Systems 25, pages 10–18. 2012. [15] Krikamol Muandet, Kenji Fukumizu, Bharath Sriperumbudur, and Bernhard Schölkopf. Kernel mean embedding of distributions: A review and beyonds. arXiv preprint arXiv:1605.09522, 2016. [16] Michelle Ntampaka, Hy Trac, Dougal J. Sutherland, Nicholas Battaglia, Barnabás Póczos, and Jeff Schneider. A machine learning approach for dynamical mass measurements of galaxy clusters. The Astrophysical Journal, 803(2):50, 2015. arXiv:1410.0686. [17] Michelle Ntampaka, Hy Trac, Dougal J. Sutherland, S. Fromenteau, B. Poczos, and Jeff Schneider. Dynamical mass measurements of contaminated galaxy clusters using machine learning. The Astrophysical Journal, 831(2):135, 2016. arXiv:1509.05409. [18] Joaquin Quinonero-Candela, Masashi Sugiyama, Anton Schwaighofer, and Neil D. Lawrence. Dataset Shift in Machine Learning. The MIT Press, 2009. 10 [19] Ali Rahimi and Benjamin Recht. Random features for large-scale kernel machines. In Advances in Neural Information Processing Systems, pages 1177–1184, 2007. [20] H-J Rossberg. Positive definite probability densities and probability distributions. Journal of Mathematical Sciences, 76(1):2181–2197, 1995. [21] Le Song, Kenji Fukumizu, and Arthur Gretton. Kernel embeddings of conditional distributions: A unified kernel framework for nonparametric inference in graphical models. IEEE Signal Processing Magazine, 30(4):98–111, 2013. [22] Bharath K. Sriperumbudur, Arthur Gretton, Kenji Fukumizu, Bernhard Schölkopf, and Gert R.G. Lanckriet. Hilbert space embeddings and metrics on probability measures. J. Mach. Learn. Res., 11:1517–1561, August 2010. [23] Dougal J. Sutherland, Junier B. Oliva, Barnabás Póczos, and Jeff G. Schneider. Linear-time learning on distributions with approximate kernel embeddings. In Proc. AAAI Conference on Artificial Intelligence, pages 2073–2079, 2016. [24] Zoltán Szabó, Arthur Gretton, Barnabás Póczos, and Bharath K. Sriperumbudur. Two-stage sampled learning theory on distributions. In Proc. International Conference on Artificial Intelligence and Statistics, AISTATS 2015, 2015. [25] Z. Wang, L. Lan, and S. Vucetic. Mixture model for multiple instance regression and applications in remote sensing. IEEE Transactions on Geoscience and Remote Sensing, 50(6):2226–2237, June 2012. [26] H. Wendland. Scattered Data Approximation. Cambridge University Press, Cambridge, UK, 2004. 11 | 2017 | 267 |
6,749 | Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results Antti Tarvainen The Curious AI Company tarvaina@cai.fi Harri Valpola The Curious AI Company harri@cai.fi Abstract The recently proposed Temporal Ensembling has achieved state-of-the-art results in several semi-supervised learning benchmarks. It maintains an exponential moving average of label predictions on each training example, and penalizes predictions that are inconsistent with this target. However, because the targets change only once per epoch, Temporal Ensembling becomes unwieldy when learning large datasets. To overcome this problem, we propose Mean Teacher, a method that averages model weights instead of label predictions. As an additional benefit, Mean Teacher improves test accuracy and enables training with fewer labels than Temporal Ensembling. Without changing the network architecture, Mean Teacher achieves an error rate of 4.35% on SVHN with 250 labels, outperforming Temporal Ensembling trained with 1000 labels. We also show that a good network architecture is crucial to performance. Combining Mean Teacher and Residual Networks, we improve the state of the art on CIFAR-10 with 4000 labels from 10.55% to 6.28%, and on ImageNet 2012 with 10% of the labels from 35.24% to 9.11%. 1 Introduction Deep learning has seen tremendous success in areas such as image and speech recognition. In order to learn useful abstractions, deep learning models require a large number of parameters, thus making them prone to over-fitting (Figure 1a). Moreover, adding high-quality labels to training data manually is often expensive. Therefore, it is desirable to use regularization methods that exploit unlabeled data effectively to reduce over-fitting in semi-supervised learning. When a percept is changed slightly, a human typically still considers it to be the same object. Correspondingly, a classification model should favor functions that give consistent output for similar data points. One approach for achieving this is to add noise to the input of the model. To enable the model to learn more abstract invariances, the noise may be added to intermediate representations, an insight that has motivated many regularization techniques, such as Dropout [27]. Rather than minimizing the classification cost at the zero-dimensional data points of the input space, the regularized model minimizes the cost on a manifold around each data point, thus pushing decision boundaries away from the labeled data points (Figure 1b). Since the classification cost is undefined for unlabeled examples, the noise regularization by itself does not aid in semi-supervised learning. To overcome this, the Γ model [20] evaluates each data point with and without noise, and then applies a consistency cost between the two predictions. In this case, the model assumes a dual role as a teacher and a student. As a student, it learns as before; as a teacher, it generates targets, which are then used by itself as a student for learning. Since the model itself generates targets, they may very well be incorrect. If too much weight is given to the generated targets, the cost of inconsistency outweighs that of misclassification, preventing the learning of new 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Figure 1: A sketch of a binary classification task with two labeled examples (large blue dots) and one unlabeled example, demonstrating how the choice of the unlabeled target (black circle) affects the fitted function (gray curve). (a) A model with no regularization is free to fit any function that predicts the labeled training examples well. (b) A model trained with noisy labeled data (small dots) learns to give consistent predictions around labeled data points. (c) Consistency to noise around unlabeled examples provides additional smoothing. For the clarity of illustration, the teacher model (gray curve) is first fitted to the labeled examples, and then left unchanged during the training of the student model. Also for clarity, we will omit the small dots in figures d and e. (d) Noise on the teacher model reduces the bias of the targets without additional training. The expected direction of stochastic gradient descent is towards the mean (large blue circle) of individual noisy targets (small blue circles). (e) An ensemble of models gives an even better expected target. Both Temporal Ensembling and the Mean Teacher method use this approach. information. In effect, the model suffers from confirmation bias (Figure 1c), a hazard that can be mitigated by improving the quality of targets. There are at least two ways to improve the target quality. One approach is to choose the perturbation of the representations carefully instead of barely applying additive or multiplicative noise. Another approach is to choose the teacher model carefully instead of barely replicating the student model. Concurrently to our research, Miyato et al. [15] have taken the first approach and shown that Virtual Adversarial Training can yield impressive results. We take the second approach and will show that it too provides significant benefits. To our understanding, these two approaches are compatible, and their combination may produce even better outcomes. However, the analysis of their combined effects is outside the scope of this paper. Our goal, then, is to form a better teacher model from the student model without additional training. As the first step, consider that the softmax output of a model does not usually provide accurate predictions outside training data. This can be partly alleviated by adding noise to the model at inference time [4], and consequently a noisy teacher can yield more accurate targets (Figure 1d). This approach was used in Pseudo-Ensemble Agreement [2] and has lately been shown to work well on semi-supervised image classification [13, 22]. Laine & Aila [13] named the method the ⇧model; we will use this name for it and their version of it as the basis of our experiments. The ⇧model can be further improved by Temporal Ensembling [13], which maintains an exponential moving average (EMA) prediction for each of the training examples. At each training step, all the EMA predictions of the examples in that minibatch are updated based on the new predictions. Consequently, the EMA prediction of each example is formed by an ensemble of the model’s current version and those earlier versions that evaluated the same example. This ensembling improves the quality of the predictions, and using them as the teacher predictions improves results. However, since each target is updated only once per epoch, the learned information is incorporated into the training process at a slow pace. The larger the dataset, the longer the span of the updates, and in the case of on-line learning, it is unclear how Temporal Ensembling can be used at all. (One could evaluate all the targets periodically more than once per epoch, but keeping the evaluation span constant would require O(n2) evaluations per epoch where n is the number of training examples.) 2 Mean Teacher To overcome the limitations of Temporal Ensembling, we propose averaging model weights instead of predictions. Since the teacher model is an average of consecutive student models, we call this the Mean Teacher method (Figure 2). Averaging model weights over training steps tends to produce a 2 3 θ θ’ η classification cost consistency cost 3 prediction label input exponential moving average student model teacher model η’ 3 prediction Figure 2: The Mean Teacher method. The figure depicts a training batch with a single labeled example. Both the student and the teacher model evaluate the input applying noise (⌘, ⌘0) within their computation. The softmax output of the student model is compared with the one-hot label using classification cost and with the teacher output using consistency cost. After the weights of the student model have been updated with gradient descent, the teacher model weights are updated as an exponential moving average of the student weights. Both model outputs can be used for prediction, but at the end of the training the teacher prediction is more likely to be correct. A training step with an unlabeled example would be similar, except no classification cost would be applied. more accurate model than using the final weights directly [18]. We can take advantage of this during training to construct better targets. Instead of sharing the weights with the student model, the teacher model uses the EMA weights of the student model. Now it can aggregate information after every step instead of every epoch. In addition, since the weight averages improve all layer outputs, not just the top output, the target model has better intermediate representations. These aspects lead to two practical advantages over Temporal Ensembling: First, the more accurate target labels lead to a faster feedback loop between the student and the teacher models, resulting in better test accuracy. Second, the approach scales to large datasets and on-line learning. More formally, we define the consistency cost J as the expected distance between the prediction of the student model (with weights ✓and noise ⌘) and the prediction of the teacher model (with weights ✓0 and noise ⌘0). J(✓) = Ex,⌘0,⌘ h kf(x, ✓0, ⌘0) −f(x, ✓, ⌘)k2i The difference between the ⇧model, Temporal Ensembling, and Mean teacher is how the teacher predictions are generated. Whereas the ⇧model uses ✓0 = ✓, and Temporal Ensembling approximates f(x, ✓0, ⌘0) with a weighted average of successive predictions, we define ✓0 t at training step t as the EMA of successive ✓weights: ✓0 t = ↵✓0 t−1 + (1 −↵)✓t where ↵is a smoothing coefficient hyperparameter. An additional difference between the three algorithms is that the ⇧model applies training to ✓0 whereas Temporal Ensembling and Mean Teacher treat it as a constant with regards to optimization. We can approximate the consistency cost function J by sampling noise ⌘, ⌘0 at each training step with stochastic gradient descent. Following Laine & Aila [13], we use mean squared error (MSE) as the consistency cost in most of our experiments. 3 Table 1: Error rate percentage on SVHN over 10 runs (4 runs when using all labels). We use exponential moving average weights in the evaluation of all our models. All the methods use a similar 13-layer ConvNet architecture. See Table 5 in the Appendix for results without input augmentation. 250 labels 73257 images 500 labels 73257 images 1000 labels 73257 images 73257 labels 73257 images GAN [24] 18.44 ± 4.8 8.11 ± 1.3 ⇧model [13] 6.65 ± 0.53 4.82 ± 0.17 2.54 ± 0.04 Temporal Ensembling [13] 5.12 ± 0.13 4.42 ± 0.16 2.74 ± 0.06 VAT+EntMin [15] 3.86 3.86 3.86 Supervised-only 27.77 ± 3.18 16.88 ± 1.30 12.32 ± 0.95 2.75 ± 0.10 ⇧model 9.69 ± 0.92 6.83 ± 0.66 4.95 ± 0.26 2.50 ± 0.07 Mean Teacher 4.35 ± 0.50 4.35 ± 0.50 4.35 ± 0.50 4.18 ± 0.27 4.18 ± 0.27 4.18 ± 0.27 3.95 ± 0.19 2.50 ± 0.05 2.50 ± 0.05 2.50 ± 0.05 Table 2: Error rate percentage on CIFAR-10 over 10 runs (4 runs when using all labels). 1000 labels 50000 images 2000 labels 50000 images 4000 labels 50000 images 50000 labels 50000 images GAN [24] 18.63 ± 2.32 ⇧model [13] 12.36 ± 0.31 5.56 ± 0.10 Temporal Ensembling [13] 12.16 ± 0.31 5.60 ± 0.10 5.60 ± 0.10 5.60 ± 0.10 VAT+EntMin [15] 10.55 10.55 10.55 Supervised-only 46.43 ± 1.21 33.94 ± 0.73 20.66 ± 0.57 5.82 ± 0.15 ⇧model 27.36 ± 1.20 18.02 ± 0.60 13.20 ± 0.27 6.06 ± 0.11 Mean Teacher 21.55 ± 1.48 21.55 ± 1.48 21.55 ± 1.48 15.73 ± 0.31 15.73 ± 0.31 15.73 ± 0.31 12.31 ± 0.28 5.94 ± 0.15 3 Experiments To test our hypotheses, we first replicated the ⇧model [13] in TensorFlow [1] as our baseline. We then modified the baseline model to use weight-averaged consistency targets. The model architecture is a 13-layer convolutional neural network (ConvNet) with three types of noise: random translations and horizontal flips of the input images, Gaussian noise on the input layer, and dropout applied within the network. We use mean squared error as the consistency cost and ramp up its weight from 0 to its final value during the first 80 epochs. The details of the model and the training procedure are described in Appendix B.1. 3.1 Comparison to other methods on SVHN and CIFAR-10 We ran experiments using the Street View House Numbers (SVHN) and CIFAR-10 benchmarks [16]. Both datasets contain 32x32 pixel RGB images belonging to ten different classes. In SVHN, each example is a close-up of a house number, and the class represents the identity of the digit at the center of the image. In CIFAR-10, each example is a natural image belonging to a class such as horses, cats, cars and airplanes. SVHN contains of 73257 training samples and 26032 test samples. CIFAR-10 consists of 50000 training samples and 10000 test samples. Tables 1 and 2 compare the results against recent state-of-the-art methods. All the methods in the comparison use a similar 13-layer ConvNet architecture. Mean Teacher improves test accuracy over the ⇧model and Temporal Ensembling on semi-supervised SVHN tasks. Mean Teacher also improves results on CIFAR-10 over our baseline ⇧model. The recently published version of Virtual Adversarial Training by Miyato et al. [15] performs even better than Mean Teacher on the 1000-label SVHN and the 4000-label CIFAR-10. As discussed in the introduction, VAT and Mean Teacher are complimentary approaches. Their combination may yield better accuracy than either of them alone, but that investigation is beyond the scope of this paper. 4 Table 3: Error percentage over 10 runs on SVHN with extra unlabeled training data. 500 labels 73257 images 500 labels 173257 images 500 labels 573257 images ⇧model (ours) 6.83 ± 0.66 4.49 ± 0.27 3.26 ± 0.14 Mean Teacher 4.18 ± 0.27 4.18 ± 0.27 4.18 ± 0.27 3.02 ± 0.16 3.02 ± 0.16 3.02 ± 0.16 2.46 ± 0.06 2.46 ± 0.06 2.46 ± 0.06 Figure 3: Smoothened classification cost (top) and classification error (bottom) of Mean Teacher and our baseline ⇧model on SVHN over the first 100000 training steps. In the upper row, the training classification costs are measured using only labeled data. 3.2 SVHN with extra unlabeled data Above, we suggested that Mean Teacher scales well to large datasets and on-line learning. In addition, the SVHN and CIFAR-10 results indicate that it uses unlabeled examples efficiently. Therefore, we wanted to test whether we have reached the limits of our approach. Besides the primary training data, SVHN includes also an extra dataset of 531131 examples. We picked 500 samples from the primary training as our labeled training examples. We used the rest of the primary training set together with the extra training set as unlabeled examples. We ran experiments with Mean Teacher and our baseline ⇧model, and used either 0, 100000 or 500000 extra examples. Table 3 shows the results. 3.3 Analysis of the training curves The training curves on Figure 3 help us understand the effects of using Mean Teacher. As expected, the EMA-weighted models (blue and dark gray curves in the bottom row) give more accurate predictions than the bare student models (orange and light gray) after an initial period. Using the EMA-weighted model as the teacher improves results in the semi-supervised settings. There appears to be a virtuous feedback cycle of the teacher (blue curve) improving the student (orange) via the consistency cost, and the student improving the teacher via exponential moving averaging. If this feedback cycle is detached, the learning is slower, and the model starts to overfit earlier (dark gray and light gray). Mean Teacher helps when labels are scarce. When using 500 labels (middle column) Mean Teacher learns faster, and continues training after the ⇧model stops improving. On the other hand, in the all-labeled case (left column), Mean Teacher and the ⇧model behave virtually identically. 5 Figure 4: Validation error on 250-label SVHN over four runs per hyperparameter setting and their means. In each experiment, we varied one hyperparameter, and used the evaluation run hyperparameters of Table 1 for the rest. The hyperparameter settings used in the evaluation runs are marked with the bolded font weight. See the text for details. Mean Teacher uses unlabeled training data more efficiently than the ⇧model, as seen in the middle column. On the other hand, with 500k extra unlabeled examples (right column), ⇧model keeps improving for longer. Mean Teacher learns faster, and eventually converges to a better result, but the sheer amount of data appears to offset ⇧model’s worse predictions. 3.4 Ablation experiments To assess the importance of various aspects of the model, we ran experiments on SVHN with 250 labels, varying one or a few hyperparameters at a time while keeping the others fixed. Removal of noise (Figures 4(a) and 4(b)). In the introduction and Figure 1, we presented the hypothesis that the ⇧model produces better predictions by adding noise to the model on both sides. But after the addition of Mean Teacher, is noise still needed? Yes. We can see that either input augmentation or dropout is necessary for passable performance. On the other hand, input noise does not help when augmentation is in use. Dropout on the teacher side provides only a marginal benefit over just having it on the student side, at least when input augmentation is in use. Sensitivity to EMA decay and consistency weight (Figures 4(c) and 4(d)). The essential hyperparameters of the Mean Teacher algorithm are the consistency cost weight and the EMA decay ↵. How sensitive is the algorithm to their values? We can see that in each case the good values span roughly an order of magnitude and outside these ranges the performance degrades quickly. Note that EMA decay ↵= 0 makes the model a variation of the ⇧model, although somewhat inefficient one because the gradients are propagated through only the student path. Note also that in the evaluation runs we used EMA decay ↵= 0.99 during the ramp-up phase, and ↵= 0.999 for the rest of the training. We chose this strategy because the student improves quickly early in the training, and thus the teacher should forget the old, inaccurate, student weights quickly. Later the student improvement slows, and the teacher benefits from a longer memory. Decoupling classification and consistency (Figure 4(e)). The consistency to teacher predictions may not necessarily be a good proxy for the classification task, especially early in the training. So far our model has strongly coupled these two tasks by using the same output for both. How would decoupling the tasks change the performance of the algorithm? To investigate, we changed the model to have two top layers and produce two outputs. We then trained one of the outputs for classification and the other for consistency. We also added a mean squared error cost between the output logits, and then varied the weight of this cost, allowing us to control the strength of the coupling. Looking at the results (reported using the EMA version of the classification output), we can see that the strongly coupled version performs well and the too loosely coupled versions do not. On the other hand, a moderate decoupling seems to have the benefit of making the consistency ramp-up redundant. 6 Table 4: Error rate percentage of ResNet Mean Teacher compared to the state of the art. We report the test results from 10 runs on CIFAR-10 and validation results from 2 runs on ImageNet. CIFAR-10 4000 labels ImageNet 2012 10% of the labels State of the art 10.55 [15] 35.24 ± 0.90 [19] ConvNet Mean Teacher 12.31 ± 0.28 ResNet Mean Teacher 6.28 ± 0.15 6.28 ± 0.15 6.28 ± 0.15 9.11 ± 0.12 9.11 ± 0.12 9.11 ± 0.12 State of the art using all labels 2.86 [5] 3.79 [10] Changing from MSE to KL-divergence (Figure 4(f)) Following Laine & Aila [13], we use mean squared error (MSE) as our consistency cost function, but KL-divergence would seem a more natural choice. Which one works better? We ran experiments with instances of a cost function family ranging from MSE (⌧= 0 in the figure) to KL-divergence (⌧= 1), and found out that in this setting MSE performs better than the other cost functions. See Appendix C for the details of the cost function family and for our intuition about why MSE performs so well. 3.5 Mean Teacher with residual networks on CIFAR-10 and ImageNet In the experiments above, we used a traditional 13-layer convolutional architecture (ConvNet), which has the benefit of making comparisons to earlier work easy. In order to explore the effect of the model architecture, we ran experiments using a 12-block (26-layer) Residual Network [8] (ResNet) with Shake-Shake regularization [5] on CIFAR-10. The details of the model and the training procedure are described in Appendix B.2. As shown in Table 4, the results improve remarkably with the better network architecture. To test whether the methods scales to more natural images, we ran experiments on Imagenet 2012 dataset [21] using 10% of the labels. We used a 50-block (152-layer) ResNeXt architecture [32], and saw a clear improvement over the state of the art. As the test set is not publicly available, we measured the results using the validation set. 4 Related work Noise regularization of neural networks was proposed by Sietsma & Dow [25]. More recently, several types of perturbations have been shown to regularize intermediate representations effectively in deep learning. Adversarial Training [6] changes the input slightly to give predictions that are as different as possible from the original predictions. Dropout [27] zeroes random dimensions of layer outputs. Dropconnect [30] generalizes Dropout by zeroing individual weights instead of activations. Stochastic Depth [11] drops entire layers of residual networks, and Swapout [26] generalizes Dropout and Stochastic Depth. Shake-shake regularization [5] duplicates residual paths and samples a linear combination of their outputs independently during forward and backward passes. Several semi-supervised methods are based on training the model predictions to be consistent to perturbation. The Denoising Source Separation framework (DSS) [28] uses denoising of latent variables to learn their likelihood estimate. The Γ variant of Ladder Network [20] implements DSS with a deep learning model for classification tasks. It produces a noisy student predictions and clean teacher predictions, and applies a denoising layer to predict teacher predictions from the student predictions. The ⇧model [13] improves the Γ model by removing the explicit denoising layer and applying noise also to the teacher predictions. Similar methods had been proposed already earlier for linear models [29] and deep learning [2]. Virtual Adversarial Training [15] is similar to the ⇧model but uses adversarial perturbation instead of independent noise. The idea of a teacher model training a student is related to model compression [3] and distillation [9]. The knowledge of a complicated model can be transferred to a simpler model by training the simpler model with the softmax outputs of the complicated model. The softmax outputs contain more information about the task than the one-hot outputs, and the requirement of representing this 7 knowledge regularizes the simpler model. Besides its use in model compression, distillation can be used to harden trained models against adversarial attacks [17]. The difference between distillation and consistency regularization is that distillation is performed after training whereas consistency regularization is performed on training time. Consistency regularization can be seen as a form of label propagation [33]. Training samples that resemble each other are more likely to belong to the same class. Label propagation takes advantage of this assumption by pushing label information from each example to examples that are near it according to some metric. Label propagation can also be applied to deep learning models [31]. However, ordinary label propagation requires a predefined distance metric in the input space. In contrast, consistency targets employ a learned distance metric implied by the abstract representations of the model. As the model learns new features, the distance metric changes to accommodate these features. Therefore, consistency targets guide learning in two ways. On the one hand they spread the labels according to the current distance metric, and on the other hand, they aid the network learn a better distance metric. 5 Conclusion Temporal Ensembling, Virtual Adversarial Training and other forms of consistency regularization have recently shown their strength in semi-supervised learning. In this paper, we propose Mean Teacher, a method that averages model weights to form a target-generating teacher model. Unlike Temporal Ensembling, Mean Teacher works with large datasets and on-line learning. Our experiments suggest that it improves the speed of learning and the classification accuracy of the trained network. In addition, it scales well to state-of-the-art architectures and large image sizes. The success of consistency regularization depends on the quality of teacher-generated targets. If the targets can be improved, they should be. Mean Teacher and Virtual Adversarial Training represent two ways of exploiting this principle. Their combination may yield even better targets. There are probably additional methods to be uncovered that improve targets and trained models even further. Acknowledgements We thank Samuli Laine and Timo Aila for fruitful discussions about their work, and Phil Bachman and Colin Raffel for corrections to the pre-print version of this paper. We also thank everyone at The Curious AI Company for their help, encouragement, and ideas. References [1] Abadi, Martín, Agarwal, Ashish, Barham, Paul, Brevdo, Eugene, Chen, Zhifeng, Citro, Craig, Corrado, Greg S., Davis, Andy, Dean, Jeffrey, Devin, Matthieu, Ghemawat, Sanjay, Goodfellow, Ian, Harp, Andrew, Irving, Geoffrey, Isard, Michael, Jia, Yangqing, Jozefowicz, Rafal, Kaiser, Lukasz, Kudlur, Manjunath, Levenberg, Josh, Mané, Dan, Monga, Rajat, Moore, Sherry, Murray, Derek, Olah, Chris, Schuster, Mike, Shlens, Jonathon, Steiner, Benoit, Sutskever, Ilya, Talwar, Kunal, Tucker, Paul, Vanhoucke, Vincent, Vasudevan, Vijay, Viégas, Fernanda, Vinyals, Oriol, Warden, Pete, Wattenberg, Martin, Wicke, Martin, Yu, Yuan, and Zheng, Xiaoqiang. TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems. 2015. [2] Bachman, Philip, Alsharif, Ouais, and Precup, Doina. Learning with Pseudo-Ensembles. arXiv:1412.4864 [cs, stat], December 2014. arXiv: 1412.4864. [3] Buciluˇa, Cristian, Caruana, Rich, and Niculescu-Mizil, Alexandru. Model compression. In Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 535–541. ACM, 2006. [4] Gal, Yarin and Ghahramani, Zoubin. Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning. In Proceedings of The 33rd International Conference on Machine Learning, pp. 1050–1059, 2016. [5] Gastaldi, Xavier. Shake-Shake regularization. arXiv:1705.07485 [cs], May 2017. arXiv: 1705.07485. 8 [6] Goodfellow, Ian J., Shlens, Jonathon, and Szegedy, Christian. Explaining and Harnessing Adversarial Examples. December 2014. arXiv: 1412.6572. [7] Guo, Chuan, Pleiss, Geoff, Sun, Yu, and Weinberger, Kilian Q. On Calibration of Modern Neural Networks. arXiv:1706.04599 [cs], June 2017. arXiv: 1706.04599. [8] He, Kaiming, Zhang, Xiangyu, Ren, Shaoqing, and Sun, Jian. Deep Residual Learning for Image Recognition. arXiv:1512.03385 [cs], December 2015. arXiv: 1512.03385. [9] Hinton, Geoffrey, Vinyals, Oriol, and Dean, Jeff. Distilling the Knowledge in a Neural Network. arXiv:1503.02531 [cs, stat], March 2015. arXiv: 1503.02531. [10] Hu, Jie, Shen, Li, and Sun, Gang. Squeeze-and-Excitation Networks. arXiv:1709.01507 [cs], September 2017. arXiv: 1709.01507. [11] Huang, Gao, Sun, Yu, Liu, Zhuang, Sedra, Daniel, and Weinberger, Kilian. Deep Networks with Stochastic Depth. arXiv:1603.09382 [cs], March 2016. arXiv: 1603.09382. [12] Kingma, Diederik and Ba, Jimmy. Adam: A Method for Stochastic Optimization. arXiv:1412.6980 [cs], December 2014. arXiv: 1412.6980. [13] Laine, Samuli and Aila, Timo. Temporal Ensembling for Semi-Supervised Learning. arXiv:1610.02242 [cs], October 2016. arXiv: 1610.02242. [14] Maas, Andrew L., Hannun, Awni Y., and Ng, Andrew Y. Rectifier nonlinearities improve neural network acoustic models. In Proc. ICML, volume 30, 2013. [15] Miyato, Takeru, Maeda, Shin-ichi, Koyama, Masanori, and Ishii, Shin. Virtual Adversarial Training: a Regularization Method for Supervised and Semi-supervised Learning. arXiv:1704.03976 [cs, stat], April 2017. arXiv: 1704.03976. [16] Netzer, Yuval, Wang, Tao, Coates, Adam, Bissacco, Alessandro, Wu, Bo, and Ng, Andrew Y. Reading digits in natural images with unsupervised feature learning. In NIPS Workshop on Deep Learning and Unsupervised Feature Learning, 2011. [17] Papernot, Nicolas, McDaniel, Patrick, Wu, Xi, Jha, Somesh, and Swami, Ananthram. Distillation as a Defense to Adversarial Perturbations against Deep Neural Networks. arXiv:1511.04508 [cs, stat], November 2015. arXiv: 1511.04508. [18] Polyak, B. T. and Juditsky, A. B. Acceleration of Stochastic Approximation by Averaging. SIAM J. Control Optim., 30(4):838–855, July 1992. ISSN 0363-0129. doi: 10.1137/0330046. [19] Pu, Yunchen, Gan, Zhe, Henao, Ricardo, Yuan, Xin, Li, Chunyuan, Stevens, Andrew, and Carin, Lawrence. Variational Autoencoder for Deep Learning of Images, Labels and Captions. arXiv:1609.08976 [cs, stat], September 2016. arXiv: 1609.08976. [20] Rasmus, Antti, Berglund, Mathias, Honkala, Mikko, Valpola, Harri, and Raiko, Tapani. Semisupervised Learning with Ladder Networks. In Cortes, C., Lawrence, N. D., Lee, D. D., Sugiyama, M., and Garnett, R. (eds.), Advances in Neural Information Processing Systems 28, pp. 3546–3554. Curran Associates, Inc., 2015. [21] Russakovsky, Olga, Deng, Jia, Su, Hao, Krause, Jonathan, Satheesh, Sanjeev, Ma, Sean, Huang, Zhiheng, Karpathy, Andrej, Khosla, Aditya, Bernstein, Michael, Berg, Alexander C., and FeiFei, Li. ImageNet Large Scale Visual Recognition Challenge. arXiv:1409.0575 [cs], September 2014. arXiv: 1409.0575. [22] Sajjadi, Mehdi, Javanmardi, Mehran, and Tasdizen, Tolga. Regularization With Stochastic Transformations and Perturbations for Deep Semi-Supervised Learning. In Lee, D. D., Sugiyama, M., Luxburg, U. V., Guyon, I., and Garnett, R. (eds.), Advances in Neural Information Processing Systems 29, pp. 1163–1171. Curran Associates, Inc., 2016. [23] Salimans, Tim and Kingma, Diederik P. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. In Advances in Neural Information Processing Systems, pp. 901–901, 2016. 9 [24] Salimans, Tim, Goodfellow, Ian, Zaremba, Wojciech, Cheung, Vicki, Radford, Alec, and Chen, Xi. Improved techniques for training gans. In Advances in Neural Information Processing Systems, pp. 2226–2234, 2016. [25] Sietsma, Jocelyn and Dow, Robert JF. Creating artificial neural networks that generalize. Neural networks, 4(1):67–79, 1991. [26] Singh, Saurabh, Hoiem, Derek, and Forsyth, David. Swapout: Learning an ensemble of deep architectures. arXiv:1605.06465 [cs], May 2016. arXiv: 1605.06465. [27] Srivastava, Nitish, Hinton, Geoffrey, Krizhevsky, Alex, Sutskever, Ilya, and Salakhutdinov, Ruslan. Dropout: A Simple Way to Prevent Neural Networks from Overfitting. J. Mach. Learn. Res., 15(1):1929–1958, January 2014. ISSN 1532-4435. [28] Särelä, Jaakko and Valpola, Harri. Denoising Source Separation. Journal of Machine Learning Research, 6(Mar):233–272, 2005. ISSN ISSN 1533-7928. [29] Wager, Stefan, Wang, Sida, and Liang, Percy. Dropout Training as Adaptive Regularization. arXiv:1307.1493 [cs, stat], July 2013. arXiv: 1307.1493. [30] Wan, Li, Zeiler, Matthew, Zhang, Sixin, Le Cun, Yann, and Fergus, Rob. Regularization of Neural Networks using DropConnect. pp. 1058–1066, 2013. [31] Weston, Jason, Ratle, Frédéric, Mobahi, Hossein, and Collobert, Ronan. Deep learning via semi-supervised embedding. In Neural Networks: Tricks of the Trade, pp. 639–655. Springer, 2012. [32] Xie, Saining, Girshick, Ross, Dollár, Piotr, Tu, Zhuowen, and He, Kaiming. Aggregated Residual Transformations for Deep Neural Networks. arXiv:1611.05431 [cs], November 2016. arXiv: 1611.05431. [33] Zhu, Xiaojin and Ghahramani, Zoubin. Learning from labeled and unlabeled data with label propagation. 2002. 10 | 2017 | 268 |
6,750 | Multi-Agent Actor-Critic for Mixed Cooperative-Competitive Environments Ryan Lowe∗ McGill University OpenAI Yi Wu∗ UC Berkeley Aviv Tamar UC Berkeley Jean Harb McGill University OpenAI Pieter Abbeel UC Berkeley OpenAI Igor Mordatch OpenAI Abstract We explore deep reinforcement learning methods for multi-agent domains. We begin by analyzing the difficulty of traditional algorithms in the multi-agent case: Q-learning is challenged by an inherent non-stationarity of the environment, while policy gradient suffers from a variance that increases as the number of agents grows. We then present an adaptation of actor-critic methods that considers action policies of other agents and is able to successfully learn policies that require complex multiagent coordination. Additionally, we introduce a training regimen utilizing an ensemble of policies for each agent that leads to more robust multi-agent policies. We show the strength of our approach compared to existing methods in cooperative as well as competitive scenarios, where agent populations are able to discover various physical and informational coordination strategies. 1 Introduction Reinforcement learning (RL) has recently been applied to solve challenging problems, from game playing [23, 28] to robotics [18]. In industrial applications, RL is seeing use in large scale systems such as data center cooling [1]. Most of the successes of RL have been in single agent domains, where modelling or predicting the behaviour of other actors in the environment is largely unnecessary. However, there are a number of important applications that involve interaction between multiple agents, where emergent behavior and complexity arise from agents co-evolving together. For example, multi-robot control [20], the discovery of communication and language [29, 8, 24], multiplayer games [27], and the analysis of social dilemmas [17] all operate in a multi-agent domain. Related problems, such as variants of hierarchical reinforcement learning [6] can also be seen as a multi-agent system, with multiple levels of hierarchy being equivalent to multiple agents. Additionally, multi-agent self-play has recently been shown to be a useful training paradigm [28, 30]. Successfully scaling RL to environments with multiple agents is crucial to building artificially intelligent systems that can productively interact with humans and each other. Unfortunately, traditional reinforcement learning approaches such as Q-Learning or policy gradient are poorly suited to multi-agent environments. One issue is that each agent’s policy is changing as training progresses, and the environment becomes non-stationary from the perspective of any individual agent (in a way that is not explainable by changes in the agent’s own policy). This presents learning stability challenges and prevents the straightforward use of past experience replay, which is ∗Equal contribution. Corresponding authors: ryan.lowe@cs.mcgill.ca, jxwuyi@gmail.com, mordatch@openai.com. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. crucial for stabilizing deep Q-learning. Policy gradient methods, on the other hand, usually exhibit very high variance when coordination of multiple agents is required. Alternatively, one can use modelbased policy optimization which can learn optimal policies via back-propagation, but this requires a (differentiable) model of the world dynamics and assumptions about the interactions between agents. Applying these methods to competitive environments is also challenging from an optimization perspective, as evidenced by the notorious instability of adversarial training methods [11]. In this work, we propose a general-purpose multi-agent learning algorithm that: (1) leads to learned policies that only use local information (i.e. their own observations) at execution time, (2) does not assume a differentiable model of the environment dynamics or any particular structure on the communication method between agents, and (3) is applicable not only to cooperative interaction but to competitive or mixed interaction involving both physical and communicative behavior. The ability to act in mixed cooperative-competitive environments may be critical for intelligent agents; while competitive training provides a natural curriculum for learning [30], agents must also exhibit cooperative behavior (e.g. with humans) at execution time. We adopt the framework of centralized training with decentralized execution, allowing the policies to use extra information to ease training, so long as this information is not used at test time. It is unnatural to do this with Q-learning without making additional assumptions about the structure of the environment, as the Q function generally cannot contain different information at training and test time. Thus, we propose a simple extension of actor-critic policy gradient methods where the critic is augmented with extra information about the policies of other agents, while the actor only has access to local information. After training is completed, only the local actors are used at execution phase, acting in a decentralized manner and equally applicable in cooperative and competitive settings. This is a natural setting for multi-agent language learning, as full centralization would not require the development of discrete communication protocols. Since the centralized critic function explicitly uses the decision-making policies of other agents, we additionally show that agents can learn approximate models of other agents online and effectively use them in their own policy learning procedure. We also introduce a method to improve the stability of multi-agent policies by training agents with an ensemble of policies, thus requiring robust interaction with a variety of collaborator and competitor policies. We empirically show the success of our approach compared to existing methods in cooperative as well as competitive scenarios, where agent populations are able to discover complex physical and communicative coordination strategies. 2 Related Work The simplest approach to learning in multi-agent settings is to use independently learning agents. This was attempted with Q-learning in [34], but does not perform well in practice [22]. As we will show, independently-learning policy gradient methods also perform poorly. One issue is that each agent’s policy changes during training, resulting in a non-stationary environment and preventing the naïve application of experience replay. Previous work has attempted to address this by inputting other agent’s policy parameters to the Q function [35], explicitly adding the iteration index to the replay buffer, or using importance sampling [9]. Deep Q-learning approaches have previously been investigated in [33] to train competing Pong agents. The nature of interaction between agents can either be cooperative, competitive, or both and many algorithms are designed only for a particular nature of interaction. Most studied are cooperative settings, with strategies such as optimistic and hysteretic Q function updates [15, 21, 25], which assume that the actions of other agents are made to improve collective reward. Another approach is to indirectly arrive at cooperation via sharing of policy parameters [12], but this requires homogeneous agent capabilities. These algorithms are generally not applicable in competitive or mixed settings. See [26, 4] for surveys of multi-agent learning approaches and applications. Concurrently to our work, [7] proposed a similar idea of using policy gradient methods with a centralized critic, and test their approach on a StarCraft micromanagement task. Their approach differs from ours in the following ways: (1) they learn a single centralized critic for all agents, whereas we learn a centralized critic for each agent, allowing for agents with differing reward functions including competitive scenarios, (2) we consider environments with explicit communication between agents, (3) they combine recurrent policies with feed-forward critics, whereas our experiments 2 use feed-forward policies (although our methods are applicable to recurrent policies), (4) we learn continuous policies whereas they learn discrete policies. Recent work has focused on learning grounded cooperative communication protocols between agents to solve various tasks [29, 8, 24]. However, these methods are usually only applicable when the communication between agents is carried out over a dedicated, differentiable communication channel. Our method requires explicitly modeling decision-making process of other agents. The importance of such modeling has been recognized by both reinforcement learning [3, 5] and cognitive science communities [10]. [13] stressed the importance of being robust to the decision making process of other agents, as do others by building Bayesian models of decision making. We incorporate such robustness considerations by requiring that agents interact successfully with an ensemble of any possible policies of other agents, improving training stability and robustness of agents after training. 3 Background Markov Games In this work, we consider a multi-agent extension of Markov decision processes (MDPs) called partially observable Markov games [19]. A Markov game for N agents is defined by a set of states S describing the possible configurations of all agents, a set of actions A1, ..., AN and a set of observations O1, ..., ON for each agent. To choose actions, each agent i uses a stochastic policy πππθi : Oi × Ai 7→[0, 1], which produces the next state according to the state transition function T : S × A1 × ... × AN 7→S.2 Each agent i obtains rewards as a function of the state and agent’s action ri : S × Ai 7→R, and receives a private observation correlated with the state oi : S 7→Oi. The initial states are determined by a distribution ρ : S 7→[0, 1]. Each agent i aims to maximize its own total expected return Ri = PT t=0 γtrt i where γ is a discount factor and T is the time horizon. Q-Learning and Deep Q-Networks (DQN). Q-Learning and DQN [23] are popular methods in reinforcement learning and have been previously applied to multi-agent settings [8, 35]. Q-Learning makes use of an action-value function for policy πππ as Qπππ(s, a) = E[R|st = s, at = a]. This Q function can be recursively rewritten as Qπππ(s, a) = Es′[r(s, a) + γEa′∼πππ[Qπππ(s′, a′)]]. DQN learns the action-value function Q∗corresponding to the optimal policy by minimizing the loss: L(θ) = Es,a,r,s′[(Q∗(s, a|θ) −y)2], where y = r + γ max a′ ¯Q∗(s′, a′), (1) where ¯Q is a target Q function whose parameters are periodically updated with the most recent θ, which helps stabilize learning. Another crucial component of stabilizing DQN is the use of an experience replay buffer D containing tuples (s, a, r, s′). Q-Learning can be directly applied to multi-agent settings by having each agent i learn an independently optimal function Qi [34]. However, because agents are independently updating their policies as learning progresses, the environment appears non-stationary from the view of any one agent, violating Markov assumptions required for convergence of Q-learning. Another difficulty observed in [9] is that the experience replay buffer cannot be used in such a setting since in general, P(s′|s, a,πππ1, ...,πππN) ̸= P(s′|s, a,πππ′ 1, ...,πππ′ N) when any πππi ̸= πππ′ i. Policy Gradient (PG) Algorithms. Policy gradient methods are another popular choice for a variety of RL tasks. The main idea is to directly adjust the parameters θ of the policy in order to maximize the objective J(θ) = Es∼pπππ,a∼πππθ[R] by taking steps in the direction of ∇θJ(θ). Using the Q function defined previously, the gradient of the policy can be written as [32]: ∇θJ(θ) = Es∼pπππ,a∼πππθ[∇θ logπππθ(a|s)Qπππ(s, a)], (2) where pπππ is the state distribution. The policy gradient theorem has given rise to several practical algorithms, which often differ in how they estimate Qπππ. For example, one can simply use a sample return Rt = PT i=t γi−tri, which leads to the REINFORCE algorithm [37]. Alternatively, one could learn an approximation of the true action-value function Qπππ(s, a) by e.g. temporal-difference learning [31]; this Qπππ(s, a) is called the critic and leads to a variety of actor-critic algorithms [31]. Policy gradient methods are known to exhibit high variance gradient estimates. This is exacerbated in multi-agent settings; since an agent’s reward usually depends on the actions of many agents, 2To minimize notation we will often omit θ from the subscript of πππ. 3 the reward conditioned only on the agent’s own actions (when the actions of other agents are not considered in the agent’s optimization process) exhibits much more variability, thereby increasing the variance of its gradients. Below, we show a simple setting where the probability of taking a gradient step in the correct direction decreases exponentially with the number of agents. Proposition 1. Consider N agents with binary actions: P(ai = 1) = θi, where R(a1, . . . , aN) = 1a1=···=aN . We assume an uninformed scenario, in which agents are initialized to θi = 0.5 ∀i. Then, if we are estimating the gradient of the cost J with policy gradient, we have: P(⟨ˆ∇J, ∇J⟩> 0) ∝(0.5)N where ˆ∇J is the policy gradient estimator from a single sample, and ∇J is the true gradient. Proof. See Appendix. The use of baselines, such as value function baselines typically used to ameliorate high variance, is problematic in multi-agent settings due to the non-stationarity issues mentioned previously. Deterministic Policy Gradient (DPG) Algorithms. It is also possible to extend the policy gradient framework to deterministic policies µµµθ : S 7→A. In particular, under certain conditions we can write the gradient of the objective J(θ) = Es∼pµ µ µ[R(s, a)] as: ∇θJ(θ) = Es∼D[∇θµµµθ(a|s)∇aQµµµ(s, a)|a=µµµθ(s)] (3) Since this theorem relies on ∇aQµµµ(s, a), it requires that the action space A (and thus the policy µµµ) be continuous. Deep deterministic policy gradient (DDPG) is a variant of DPG where the policy µµµ and critic Qµµµ are approximated with deep neural networks. DDPG is an off-policy algorithm, and samples trajectories from a replay buffer of experiences that are stored throughout training. DDPG also makes use of a target network, as in DQN [23]. 4 Methods 4.1 Multi-Agent Actor Critic .. .. l l π o a agent 1 . . . Q π o a agent N Q execution training . . . . . . 1 N N 1 1 N Figure 1: Overview of our multi-agent decentralized actor, centralized critic approach. We have argued in the previous section that naïve policy gradient methods perform poorly in simple multi-agent settings, and this is supported in our experiments in Section 5. Our goal in this section is to derive an algorithm that works well in such settings. However, we would like to operate under the following constraints: (1) the learned policies can only use local information (i.e. their own observations) at execution time, (2) we do not assume a differentiable model of the environment dynamics, unlike in [24], and (3) we do not assume any particular structure on the communication method between agents (that is, we don’t assume a differentiable communication channel). Fulfilling the above desiderata would provide a general-purpose multi-agent learning algorithm that could be applied not just to cooperative games with explicit communication channels, but competitive games and games involving only physical interactions between agents. Similarly to [8], we accomplish our goal by adopting the framework of centralized training with decentralized execution. Thus, we allow the policies to use extra information to ease training, so long as this information is not used at test time. It is unnatural to do this with Q-learning, as the Q function generally cannot contain different information at training and test time. Thus, we propose a simple extension of actor-critic policy gradient methods where the critic is augmented with extra information about the policies of other agents. More concretely, consider a game with N agents with policies parameterized by θθθ = {θ1, ..., θN}, and let πππ = {πππ1, ...,πππN} be the set of all agent policies. Then we can write the gradient of the 4 expected return for agent i, J(θi) = E[Ri] as: ∇θiJ(θi) = Es∼pµ µ µ,ai∼πππi[∇θi logπππi(ai|oi)Qπππ i (x, a1, ..., aN)]. (4) Here Qπππ i (x, a1, ..., aN) is a centralized action-value function that takes as input the actions of all agents, a1, . . . , aN, in addition to some state information x, and outputs the Q-value for agent i. In the simplest case, x could consist of the observations of all agents, x = (o1, ..., oN), however we could also include additional state information if available. Since each Qπππ i is learned separately, agents can have arbitrary reward structures, including conflicting rewards in a competitive setting. We can extend the above idea to work with deterministic policies. If we now consider N continuous policies µµµθi w.r.t. parameters θi (abbreviated as µµµi), the gradient can be written as: ∇θiJ(µµµi) = Ex,a∼D[∇θiµµµi(ai|oi)∇aiQµµµ i (x, a1, ..., aN)|ai=µµµi(oi)], (5) Here the experience replay buffer D contains the tuples (x, x′, a1, . . . , aN, r1, . . . , rN), recording experiences of all agents. The centralized action-value function Qµµµ i is updated as: L(θi) = Ex,a,r,x′[(Qµµµ i (x, a1, . . . , aN) −y)2], y = ri + γ Qµµµ′ i (x′, a′ 1, . . . , a′ N) a′ j=µµµ′ j(oj), (6) where µµµ′ = {µµµθ′ 1, ...,µµµθ′ N } is the set of target policies with delayed parameters θ′ i. As shown in Section 5, we find the centralized critic with deterministic policies works very well in practice, and refer to it as multi-agent deep deterministic policy gradient (MADDPG). We provide the description of the full algorithm in the Appendix. A primary motivation behind MADDPG is that, if we know the actions taken by all agents, the environment is stationary even as the policies change, since P(s′|s, a1, ..., aN,πππ1, ...,πππN) = P(s′|s, a1, ..., aN) = P(s′|s, a1, ..., aN,πππ′ 1, ...,πππ′ N) for any πππi ̸= πππ′ i. This is not the case if we do not explicitly condition on the actions of other agents, as done for most traditional RL methods. Note that we require the policies of other agents to apply an update in Eq. 6. Knowing the observations and policies of other agents is not a particularly restrictive assumption; if our goal is to train agents to exhibit complex communicative behaviour in simulation, this information is often available to all agents. However, we can relax this assumption if necessary by learning the policies of other agents from observations — we describe a method of doing this in Section 4.2. 4.2 Inferring Policies of Other Agents To remove the assumption of knowing other agents’ policies, as required in Eq. 6, each agent i can additionally maintain an approximation ˆµµµφj i (where φ are the parameters of the approximation; henceforth ˆµµµj i) to the true policy of agent j, µµµj. This approximate policy is learned by maximizing the log probability of agent j’s actions, with an entropy regularizer: L(φj i) = −Eoj,aj h log ˆµµµj i(aj|oj) + λH(ˆµµµj i) i , (7) where H is the entropy of the policy distribution. With the approximate policies, y in Eq. 6 can be replaced by an approximate value ˆy calculated as follows: ˆy = ri + γQµµµ′ i (x′, ˆµµµ′1 i (o1), . . . ,µµµ′ i(oi), . . . , ˆµµµ′N i (oN)), (8) where ˆµµµ′j i denotes the target network for the approximate policy ˆµµµj i. Note that Eq. 7 can be optimized in a completely online fashion: before updating Qµµµ i , the centralized Q function, we take the latest samples of each agent j from the replay buffer to perform a single gradient step to update φj i. We also input the action log probabilities of each agent directly into Q, rather than sampling. 4.3 Agents with Policy Ensembles A recurring problem in multi-agent reinforcement learning is the environment non-stationarity due to the agents’ changing policies. This is particularly true in competitive settings, where agents can derive a strong policy by overfitting to the behavior of their competitors. Such policies are undesirable as they are brittle and may fail when the competitors alter their strategies. 5 To obtain multi-agent policies that are more robust to changes in the policy of competing agents, we propose to train a collection of K different sub-policies. At each episode, we randomly select one particular sub-policy for each agent to execute. Suppose that policy µµµi is an ensemble of K different sub-policies with sub-policy k denoted by µµµθ(k) i (denoted as µµµ(k) i ). For agent i, we are then maximizing the ensemble objective: Je(µµµi) = Ek∼unif(1,K),s∼pµ µ µ,a∼µµµ(k) i [Ri(s, a)] . Since different sub-policies will be executed in different episodes, we maintain a replay buffer D(k) i for each sub-policy µµµ(k) i of agent i. Accordingly, we can derive the gradient of the ensemble objective with respect to θ(k) i as follows: ∇θ(k) i Je(µµµi) = 1 K Ex,a∼D(k) i ∇θ(k) i µµµ(k) i (ai|oi)∇aiQµµµi (x, a1, . . . , aN) ai=µµµ(k) i (oi) . (9) 5 Experiments2 5.1 Environments To perform our experiments, we adopt the grounded communication environment proposed in [24], which consists of N agents and L landmarks inhabiting a two-dimensional world with continuous space and discrete time2. Agents may take physical actions in the environment and communication actions that get broadcasted to other agents. Unlike [24], we do not assume that all agents have identical action and observation spaces, or act according to the same policy πππ. We also consider games that are both cooperative (all agents must maximize a shared return) and competitive (agents have conflicting goals). Some environments require explicit communication between agents in order to achieve the best reward, while in other environments agents can only perform physical actions. We provide details for each environment below. speaker listener “green” ent 1 agent 3 mark landmark landmark v c gent 2 predator 1 prey predator 2 predator 3 agent 1 agent 2 agent 3 agent 1 agent 2 adversary ? Figure 2: Illustrations of the experimental environment and some tasks we consider, including a) Cooperative Communication b) Predator-Prey c) Cooperative Navigation d) Physical Deception. See webpage for videos of all experimental results. Cooperative communication. This task consists of two cooperative agents, a speaker and a listener, who are placed in an environment with three landmarks of differing colors. At each episode, the listener must navigate to a landmark of a particular color, and obtains reward based on its distance to the correct landmark. However, while the listener can observe the relative position and color of the landmarks, it does not know which landmark it must navigate to. Conversely, the speaker’s observation consists of the correct landmark color, and it can produce a communication output at each time step which is observed by the listener. Thus, the speaker must learn to output the landmark colour based on the motions of the listener. Although this problem is relatively simple, as we show in Section 5.2 it poses a significant challenge to traditional RL algorithms. Cooperative navigation. In this environment, agents must cooperate through physical actions to reach a set of L landmarks. Agents observe the relative positions of other agents and landmarks, and are collectively rewarded based on the proximity of any agent to each landmark. In other words, the agents have to ‘cover’ all of the landmarks. Further, the agents occupy significant physical space and are penalized when colliding with each other. Our agents learn to infer the landmark they must cover, and move there while avoiding other agents. 2 Videos of our experimental results can be viewed at https://sites.google.com/site/multiagentac/ 2 The environments are publicly available: https://github.com/openai/multiagent-particle-envs 6 Figure 3: Comparison between MADDPG and DDPG (left), and between single policy MADDPG and ensemble MADDPG (right) on the competitive environments. Each bar cluster shows the 0-1 normalized score for a set of competing policies (agent v adversary), where a higher score is better for the agent. In all cases, MADDPG outperforms DDPG when directly pitted against it, and similarly for the ensemble against the single MADDPG policies. Full results are given in the Appendix. Keep-away. This scenario consists of L landmarks including a target landmark, N cooperating agents who know the target landmark and are rewarded based on their distance to the target, and M adversarial agents who must prevent the cooperating agents from reaching the target. Adversaries accomplish this by physically pushing the agents away from the landmark, temporarily occupying it. While the adversaries are also rewarded based on their distance to the target landmark, they do not know the correct target; this must be inferred from the movements of the agents. Physical deception. Here, N agents cooperate to reach a single target landmark from a total of N landmarks. They are rewarded based on the minimum distance of any agent to the target (so only one agent needs to reach the target landmark). However, a lone adversary also desires to reach the target landmark; the catch is that the adversary does not know which of the landmarks is the correct one. Thus the cooperating agents, who are penalized based on the adversary distance to the target, learn to spread out and cover all landmarks so as to deceive the adversary. Predator-prey. In this variant of the classic predator-prey game, N slower cooperating agents must chase the faster adversary around a randomly generated environment with L large landmarks impeding the way. Each time the cooperative agents collide with an adversary, the agents are rewarded while the adversary is penalized. Agents observe the relative positions and velocities of the agents, and the positions of the landmarks. Covert communication. This is an adversarial communication environment, where a speaker agent (‘Alice’) must communicate a message to a listener agent (‘Bob’), who must reconstruct the message at the other end. However, an adversarial agent (‘Eve’) is also observing the channel, and wants to reconstruct the message — Alice and Bob are penalized based on Eve’s reconstruction, and thus Alice must encode her message using a randomly generated key, known only to Alice and Bob. This is similar to the cryptography environment considered in [2]. 5.2 Comparison to Decentralized Reinforcement Learning Methods Figure 4: The reward of MADDPG against traditional RL approaches on cooperative communication after 25000 episodes. We implement MADDPG and evaluate it on the environments presented in Section 5.1. Unless otherwise specified, our policies are parameterized by a two-layer ReLU MLP with 64 units per layer. To support discrete communication messages, we use the Gumbel-Softmax estimator [14]. To evaluate the quality of policies learned in competitive settings, we pitch MADDPG agents against DDPG agents, and compare the resulting success of the agents and adversaries in the environment. We train our models until convergence, and then evaluate them by averaging various metrics for 1000 further iterations. We provide the tables and details of our results on all environments in the Appendix, and summarize them here. 7 Cooperative Comm. Physical Deception (a) MADDPG (b) DDPG Figure 5: Comparison between MADDPG (left) and DDPG (right) on the cooperative communication (CC) and physical deception (PD) environments at t = 0, 5, and 25. Small dark circles indicate landmarks. In CC, the grey agent is the speaker, and the color of the listener indicates the target landmark. In PD, the blue agents are trying to deceive the red adversary, while covering the target landmark (in green). MADDPG learns the correct behavior in both cases: in CC the speaker learns to output the target landmark color to direct the listener, while in PD the agents learn to cover both landmarks to confuse the adversary. DDPG (and other RL algorithms) struggles in these settings: in CC the speaker always repeats the same utterance and the listener moves to the middle of the landmarks, and in PP one agent greedily pursues the green landmark (and is followed by the adversary) while the othe agent scatters. See video for full trajectories. We first examine the cooperative communication scenario. Despite the simplicity of the task (the speaker only needs to learn to output its observation), traditional RL methods such as DQN, ActorCritic, a first-order implementation of TRPO, and DDPG all fail to learn the correct behaviour (measured by whether the listener is within a short distance from the target landmark). In practice we observed that the listener learns to ignore the speaker and simply moves to the middle of all observed landmarks. We plot the learning curves over 25000 episodes for various approaches in Figure 4. We hypothesize that a primary reason for the failure of traditional RL methods in this (and other) multi-agent settings is the lack of a consistent gradient signal. For example, if the speaker utters the correct symbol while the listener moves in the wrong direction, the speaker is penalized. This problem is exacerbated as the number of time steps grows: we observed that traditional policy gradient methods can learn when the objective of the listener is simply to reconstruct the observation of the speaker in a single time step, or if the initial positions of agents and landmarks are fixed and evenly distributed. This indicates that many of the multi-agent methods previously proposed for scenarios with short time horizons (e.g. [16]) may not generalize to more complex tasks. Conversely, MADDPG agents can learn coordinated behaviour more easily via the centralized critic. In the cooperative communication environment, MADDPG is able to reliably learn the correct listener and speaker policies, and the listener is often (84.0% of the time) able to navigate to the target. A similar situation arises for the physical deception task: when the cooperating agents are trained with MADDPG, they are able to successfully deceive the adversary by covering all of the landmarks around 94% of the time when L = 2 (Figure 5). Furthermore, the adversary success is quite low, especially when the adversary is trained with DDPG (16.4% when L = 2). This contrasts sharply with the behaviour learned by the cooperating DDPG agents, who are unable to deceive MADDPG adversaries in any scenario, and do not even deceive other DDPG agents when L = 4. While the cooperative navigation and predator-prey tasks have a less stark divide between success and failure, in both cases the MADDPG agents outperform the DDPG agents. In cooperative navigation, MADDPG agents have a slightly smaller average distance to each landmark, but have almost half the average number of collisions per episode (when N = 2) compared to DDPG agents due to the ease of coordination. Similarly, MADDPG predators are far more successful at chasing DDPG prey (16.1 collisions/episode) than the converse (10.3 collisions/episode). In the covert communication environment, we found that Bob trained with both MADDPG and DDPG out-performs Eve in terms of reconstructing Alice’s message. However, Bob trained with MADDPG achieves a larger relative success rate compared with DDPG (52.4% to 25.1%). Further, only Alice trained with MADDPG can encode her message such that Eve achieves near-random 8 0 1000 2000 3000 4000 5000 6000 7000 iteration 80 70 60 50 40 30 20 10 average reward use approximate policies use true policies of other agents 0 1000 2000 3000 4000 5000 6000 7000 iteration 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 KL( || ) listener speaker Figure 6: Effectiveness of learning by approximating policies of other agents in the cooperative communication scenario. Left: plot of the reward over number of iterations; MADDPG agents quickly learn to solve the task when approximating the policies of others. Right: KL divergence between the approximate policies and the true policies. reconstruction accuracy. The learning curve (a sample plot is shown in Appendix) shows that the oscillation due to the competitive nature of the environment often cannot be overcome with common decentralized RL methods. We emphasize that we do not use any of the tricks required for the cryptography environment from [2], including modifying Eve’s loss function, alternating agent and adversary training, and using a hybrid ‘mix & transform’ feed-forward and convolutional architecture. 5.3 Effect of Learning Polices of Other Agents We evaluate the effectiveness of learning the policies of other agents in the cooperative communication environment, following the same hyperparameters as the previous experiments and setting λ = 0.001 in Eq. 7. The results are shown in Figure 6. We observe that despite not fitting the policies of other agents perfectly (in particular, the approximate listener policy learned by the speaker has a fairly large KL divergence to the true policy), learning with approximated policies is able to achieve the same success rate as using the true policy, without a significant slowdown in convergence. 5.4 Effect of Training with Policy Ensembles We focus on the effectiveness of policy ensembles in competitive environments, including keep-away, cooperative navigation, and predator-prey. We choose K = 3 sub-policies for the keep-away and cooperative navigation environments, and K = 2 for predator-prey. To improve convergence speed, we enforce that the cooperative agents should have the same policies at each episode, and similarly for the adversaries. To evaluate the approach, we measure the performance of ensemble policies and single policies in the roles of both agent and adversary. The results are shown on the right side of Figure 3. We observe that agents with policy ensembles are stronger than those with a single policy. In particular, when pitting ensemble agents against single policy adversaries (second to left bar cluster), the ensemble agents outperform the adversaries by a large margin compared to when the roles are reversed (third to left bar cluster). 6 Conclusions and Future Work We have proposed a multi-agent policy gradient algorithm where agents learn a centralized critic based on the observations and actions of all agents. Empirically, our method outperforms traditional RL algorithms on a variety of cooperative and competitive multi-agent environments. We can further improve the performance of our method by training agents with an ensemble of policies, an approach we believe to be generally applicable to any multi-agent algorithm. One downside to our approach is that the input space of Q grows linearly (depending on what information is contained in x) with the number of agents N. This could be remedied in practice by, for example, having a modular Q function that only considers agents in a certain neighborhood of a given agent. We leave this investigation to future work. 9 Acknowledgements The authors would like to thank Jacob Andreas, Smitha Milli, Jack Clark, Jakob Foerster, and others at OpenAI and UC Berkeley for interesting discussions related to this paper, as well as Jakub Pachocki, Yura Burda, and Joelle Pineau for comments on the paper draft. We thank Tambet Matiisen for providing the code base that was used for some early experiments associated with this paper. Ryan Lowe is supported in part by a Vanier CGS Scholarship and the Samsung Advanced Institute of Technology. Finally, we’d like to thank OpenAI for fostering an engaging and productive research environment. References [1] DeepMind AI reduces google data centre cooling bill by 40. https://deepmind.com/blog/deepmind-ai-reduces-google-data-centre-cooling-bill-40/. Accessed: 2017-05-19. [2] M. Abadi and D. G. Andersen. Learning to protect communications with adversarial neural cryptography. arXiv preprint arXiv:1610.06918, 2016. [3] C. Boutilier. Learning conventions in multiagent stochastic domains using likelihood estimates. In Proceedings of the Twelfth international conference on Uncertainty in artificial intelligence, pages 106–114. Morgan Kaufmann Publishers Inc., 1996. [4] L. Busoniu, R. Babuska, and B. De Schutter. A comprehensive survey of multiagent reinforcement learning. IEEE Transactions on Systems Man and Cybernetics Part C Applications and Reviews, 38(2):156, 2008. [5] G. Chalkiadakis and C. Boutilier. Coordination in multiagent reinforcement learning: a bayesian approach. In Proceedings of the second international joint conference on Autonomous agents and multiagent systems, pages 709–716. ACM, 2003. [6] P. Dayan and G. E. Hinton. Feudal reinforcement learning. In Advances in neural information processing systems, pages 271–271. Morgan Kaufmann Publishers, 1993. [7] J. Foerster, G. Farquhar, T. Afouras, N. Nardelli, and S. Whiteson. Counterfactual multi-agent policy gradients. arXiv preprint arXiv:1705.08926, 2017. [8] J. N. Foerster, Y. M. Assael, N. de Freitas, and S. Whiteson. Learning to communicate with deep multi-agent reinforcement learning. CoRR, abs/1605.06676, 2016. [9] J. N. Foerster, N. Nardelli, G. Farquhar, P. H. S. Torr, P. Kohli, and S. Whiteson. Stabilising experience replay for deep multi-agent reinforcement learning. CoRR, abs/1702.08887, 2017. [10] M. C. Frank and N. D. Goodman. Predicting pragmatic reasoning in language games. Science, 336(6084):998–998, 2012. [11] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In Advances in neural information processing systems, 2014. [12] J. K. Gupta, M. Egorov, and M. Kochenderfer. Cooperative multi-agent control using deep reinforcement learning. 2017. [13] J. Hu and M. P. Wellman. Online learning about other agents in a dynamic multiagent system. In Proceedings of the Second International Conference on Autonomous Agents, AGENTS ’98, pages 239–246, New York, NY, USA, 1998. ACM. [14] E. Jang, S. Gu, and B. Poole. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144, 2016. [15] M. Lauer and M. Riedmiller. An algorithm for distributed reinforcement learning in cooperative multi-agent systems. In In Proceedings of the Seventeenth International Conference on Machine Learning, pages 535–542. Morgan Kaufmann, 2000. 10 [16] A. Lazaridou, A. Peysakhovich, and M. Baroni. Multi-agent cooperation and the emergence of (natural) language. arXiv preprint arXiv:1612.07182, 2016. [17] J. Z. Leibo, V. F. Zambaldi, M. Lanctot, J. Marecki, and T. Graepel. Multi-agent reinforcement learning in sequential social dilemmas. CoRR, abs/1702.03037, 2017. [18] S. Levine, C. Finn, T. Darrell, and P. Abbeel. End-to-end training of deep visuomotor policies. arXiv preprint arXiv:1504.00702, 2015. [19] M. L. Littman. Markov games as a framework for multi-agent reinforcement learning. In Proceedings of the eleventh international conference on machine learning, volume 157, pages 157–163, 1994. [20] L. Matignon, L. Jeanpierre, A.-I. Mouaddib, et al. Coordinated multi-robot exploration under communication constraints using decentralized markov decision processes. In AAAI, 2012. [21] L. Matignon, G. J. Laurent, and N. Le Fort-Piat. Hysteretic q-learning: an algorithm for decentralized reinforcement learning in cooperative multi-agent teams. In Intelligent Robots and Systems, 2007. IROS 2007. IEEE/RSJ International Conference on, pages 64–69. IEEE, 2007. [22] L. Matignon, G. J. Laurent, and N. Le Fort-Piat. Independent reinforcement learners in cooperative markov games: a survey regarding coordination problems. The Knowledge Engineering Review, 27(01), 2012. [23] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. [24] I. Mordatch and P. Abbeel. Emergence of grounded compositional language in multi-agent populations. arXiv preprint arXiv:1703.04908, 2017. [25] S. Omidshafiei, J. Pazis, C. Amato, J. P. How, and J. Vian. Deep decentralized multi-task multi-agent reinforcement learning under partial observability. CoRR, abs/1703.06182, 2017. [26] L. Panait and S. Luke. Cooperative multi-agent learning: The state of the art. Autonomous Agents and Multi-Agent Systems, 11(3):387–434, Nov. 2005. [27] P. Peng, Q. Yuan, Y. Wen, Y. Yang, Z. Tang, H. Long, and J. Wang. Multiagent bidirectionallycoordinated nets for learning to play starcraft combat games. CoRR, abs/1703.10069, 2017. [28] D. Silver, A. Huang, C. J. Maddison, A. Guez, L. Sifre, G. van den Driessche, J. Schrittwieser, I. Antonoglou, V. Panneershelvam, M. Lanctot, S. Dieleman, D. Grewe, J. Nham, N. Kalchbrenner, I. Sutskever, T. Lillicrap, M. Leach, K. Kavukcuoglu, T. Graepel, and D. Hassabis. Mastering the game of Go with deep neural networks and tree search. Nature, 529(7587):484 – 489, 2016. [29] S. Sukhbaatar, R. Fergus, et al. Learning multiagent communication with backpropagation. In Advances in Neural Information Processing Systems, pages 2244–2252, 2016. [30] S. Sukhbaatar, I. Kostrikov, A. Szlam, and R. Fergus. Intrinsic motivation and automatic curricula via asymmetric self-play. arXiv preprint arXiv:1703.05407, 2017. [31] R. S. Sutton and A. G. Barto. Reinforcement learning: An introduction. MIT press Cambridge, 1998. [32] R. S. Sutton, D. A. McAllester, S. P. Singh, and Y. Mansour. Policy gradient methods for reinforcement learning with function approximation. In Advances in neural information processing systems, 2000. [33] A. Tampuu, T. Matiisen, D. Kodelja, I. Kuzovkin, K. Korjus, J. Aru, J. Aru, and R. Vicente. Multiagent cooperation and competition with deep reinforcement learning. PloS one, 12(4):e0172395, 2017. 11 [34] M. Tan. Multi-agent reinforcement learning: Independent vs. cooperative agents. In Proceedings of the tenth international conference on machine learning, pages 330–337, 1993. [35] G. Tesauro. Extending q-learning to general adaptive multi-agent systems. In Advances in neural information processing systems, pages 871–878, 2004. [36] P. S. Thomas and A. G. Barto. Conjugate markov decision processes. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pages 137–144, 2011. [37] R. J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992. 12 | 2017 | 269 |
6,751 | A Bayesian Data Augmentation Approach for Learning Deep Models Toan Tran1, Trung Pham1, Gustavo Carneiro1, Lyle Palmer2 and Ian Reid1 1School of Computer Science, 2School of Public Health The University of Adelaide, Australia {toan.m.tran, trung.pham, gustavo.carneiro, lyle.palmer, ian.reid} @adelaide.edu.au Abstract Data augmentation is an essential part of the training process applied to deep learning models. The motivation is that a robust training process for deep learning models depends on large annotated datasets, which are expensive to be acquired, stored and processed. Therefore a reasonable alternative is to be able to automatically generate new annotated training samples using a process known as data augmentation. The dominant data augmentation approach in the field assumes that new training samples can be obtained via random geometric or appearance transformations applied to annotated training samples, but this is a strong assumption because it is unclear if this is a reliable generative model for producing new training samples. In this paper, we provide a novel Bayesian formulation to data augmentation, where new annotated training points are treated as missing variables and generated based on the distribution learned from the training set. For learning, we introduce a theoretically sound algorithm — generalised Monte Carlo expectation maximisation, and demonstrate one possible implementation via an extension of the Generative Adversarial Network (GAN). Classification results on MNIST, CIFAR-10 and CIFAR-100 show the better performance of our proposed method compared to the current dominant data augmentation approach mentioned above — the results also show that our approach produces better classification results than similar GAN models. 1 Introduction Deep learning has become the “backbone” of several state-of-the-art visual object classification [19, 14, 25, 27], speech recognition [17, 12, 6], and natural language processing [4, 5, 31] systems. One of the many reasons that explains the success of deep learning models is that their large capacity allows for the modeling of complex, high dimensional data patterns. The large capacity allowed by deep learning is enabled by millions of parameters estimated within annotated training sets, where generalization tends to improve with the size of these training sets. One way of acquiring large annotated training sets is via the manual (or “hand”) labeling of training samples by human experts — a difficult and sometimes subjective task that is expensive and prone to mistakes. Another way of producing such large training sets is to artificially enlarge existing training datasets — a process that is commonly known in computer science as data augmentation (DA). In computer vision applications, DA has been predominantly developed with the application of simple geometric and appearance transformations on existing annotated training samples in order to generate new training samples, where the transformation parameters are sampled with additive Gaussian or uniform noise. For instance, for ImageNet classification [8], new training images can be generated by applying random rotations, translations or color perturbations to the annotated images [19]. Such a DA process based on “label-preserving” transformations assumes that the noise model over these 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. transformation spaces can represent with fidelity the processes that have produced the labelled images. This is a strong assumption that to the best of our knowledge has not been properly tested. In fact, this commonly used DA process is known as “poor man’s” data augmentation (PMDA) [28] in the statistical learning community because new synthetic samples are generated from a distribution estimated only once at the beginning of the training process. Figure 1: An overview of our Bayesian data augmentation algorithm for learning deep models. In this analytic framework, the generator and classifier networks are jointly learned, and the synthesized training set is continuously updated as the training progresses. In the current manuscript, we propose a novel Bayesian DA approach for training deep learning models. In particular, we treat synthetic data points as instances of a random latent variable, which are drawn from a distribution learned from the given annotated training set. Effectively, rather than generating new synthetic training data prior to the training process using pre-defined transformation spaces and noise models, our approach generates new training data as the training progresses using samples obtained from an iteratively learned training data distribution. Fig. 1 shows an overview of our proposed data augmentation algorithm. The development of our approach is inspired by DA using latent variables proposed by the statistical learning community [29], where the motivation is to introduce latent variables to facilitate the computation of posterior distributions. However, directly applying this idea to deep learning is challenging because sampling millions of network parameters is computationally difficult. By replacing the estimation of the posterior distribution by the estimation of the maximum a posteriori (MAP) probability, one can employ the Expectation Maximization (EM) algorithm, if the maximisation of such augmented posteriors is feasible. Unfortunately, this is not the case for deep learning models, where the posterior maximisation cannot reliably produce a global optimum. An additional challenge for deep learning models is that it is nontrivial to compute the expected value of the network parameters given the current estimate of the network parameters and the augmented data. In order to address such challenges, we propose a novel Bayesian DA algorithm, called Generalized Monte Carlo Expectation Maximization (GMCEM), which jointly augments the training data and optimises the network parameters. Our algorithm runs iteratively, where at each iteration we sample new synthetic training points and use Monte Carlo to estimate the expected value of the network parameters given the previous estimate. Then, the parameter values are updated with stochastic gradient decent (SGD). We show that the augmented learning loss function is actually equivalent to the expected value of the network parameters, and that therefore we can guarantee weak convergence. Moreover, our method depends on the definition of predictive distributions over the latent variables, but the design of such distributions is hard because they need to be sufficiently expressive to model high-dimensional data, such as images. We address this challenge by leveraging the recent advances reached by deep generative models [11], where data distributions are implicitly represented via deep neural networks whose parameters are learned from annotated data. We demonstrate our Bayesian DA algorithm in the training of deep learning classification models [15, 16]. Our proposed algorithm is realised by extending a generative adversarial network (GAN) model [11, 22, 24] with a data generation model and two discriminative models (one to discriminate between real and fake images and another to discriminate between the dataset classes). One important contribution of our approach is the fact that the modularity of our method allows us to test different models for the generative and discriminative models – in particular, we are able to test several recently proposed deep learning models [15, 16] for the dataset class classification. Experiments on MNIST, CIFAR-10 and CIFAR-100 datasets show the better classification performance of our proposed method compared to the current dominant DA approach. 2 2 Related Work 2.1 Data Augmentation Data augmentation (DA) has become an essential step in training deep learning models, where the goal is to enlarge the training sets to avoid over-fitting. DA has also been explored by the statistical learning community [29, 7] for calculating posterior distributions via the introduction of latent variables. Such DA techniques are useful in cases where the likelihood (or posterior) density functions are hard to maximize or sample, but the augmented density functions are easier to work. An important caveat is that in statistical learning, latent variables may not lie in the same space of the observed data, but in deep learning, the latent variables representing the synthesized training samples belong to the same space as the observed data. Synthesizing new training samples from the original training samples is a widely used DA method for training deep learning models [30, 26, 19]. The usual idea is to apply either additive Gaussian or uniform noise over pre-determined families of transformations to generate new synthetic training samples from the original annotated training samples. For example, Yaeger et al. [30] proposed the “stroke warping" technique for word recognition, which adds small changes in skew, rotation, and scaling into the original word images. Simard et al. [26] used a related approach for visual document analysis. Similarly, Krizhevsky et al. [19] used horizontal reflections and color perturbations for image classification. Hauberg et al. [13] proposed a manifold learning approach that is run once before the classifier training begins, where this manifold describes the geometric transformations present in the training set. Nevertheless, the DA approaches presented above have several limitations. First, it is unclear how to generate diverse data samples. As pointed out by Fawzi et al. [10], the transformations should be “sufficiently small” so that the ground truth labels are preserved. In other words, these methods implicitly assume a small scale noise model over a pre-determined “transformation space" of the training samples. Such an assumption is likely too restrictive and has not been tested properly. Moreover, these DA mechanisms do not adapt with the progress of the learning process— instead, the augmented data are generated only once and prior to the training process. This is, in fact, analogous to the Poor Man’s Data Augmentation (PMDA) [28] algorithm in statistical learning as it is non-iterative. In contrast, our Bayesian DA algorithm iteratively generates novel training samples as the training progresses, and the “generator” is adaptively learned. This is crucial because we do not make a noise model assumption over pre-determined transformation spaces to generate new synthetic training samples. 2.2 Deep Generative Models Deep learning has been widely applied in training discriminative models with great success, but the progress in learning generative models has proven to be more difficult. One noteworthy work in training deep generative models is the Generative Adversarial Networks (GAN) proposed by Goodfellow et al. [11], which, once trained, can be used to sample synthetic images. GAN consists of one generator and one discriminator, both represented by deep learning models. In “adversarial training”, the generator and discriminator play a “two-player minimax game”, in which the generator tries to fool the discriminator by rendering images as similar as possible to the real images, and the discriminator tries to distinguish the real and fake ones. Nonetheless, the synthetic images generated by GAN are of low quality when trained on the datasets with high variability [9]. Variants of GAN have been proposed to improve the quality of the synthetic images [22, 3, 23, 24]. For instance, conditional GAN [22] improves the original GAN by making the generator conditioned on the class labels. Auxiliary classifier GAN (AC-GAN) [24] additionally forces the discriminator to classify both real-or-fake sources as well as the class labels of the input samples. These two works have shown significant improvement over the original GAN in generating photo-realistic images. So far these generative models mainly aim at generating samples of high-quality, high-resolution photo-realistic images. In contrast, we explore generative models (in the form of GANs) in our proposed Bayesian DA algorithm for improving classification models. 3 3 Data Augmentation Algorithm in Deep Learning 3.1 Bayesian Neural Networks Our goal is to estimate the parameters of a deep learning model using an annotated training set denoted by Y = {yn}N n=1, where y = (t, x), with annotations t ∈{1, ..., K} (K = # Classes), and data samples represented by x ∈RD. Denoting the model parameters by θ, the training process is defined by the following optimisation problem: θ∗= arg max θ log p(θ|y), (1) where the observed posterior p(θ|y) = p(θ|t, x) ∝p(t|x, θ)p(x|θ)p(θ). Assuming that the data samples in Y are conditionally independent, the cost function that maximises (1) is defined as [1]: log p(θ|y) ≈log p(θ) + 1 N N X n=1 (log p(tn|xn, θ) + log p(xn|θ)), (2) where p(θ) denotes a prior on the distribution of the deep learning model parameters, p(tn|xn, θ) represents the conditional likelihood of label tn, and p(xn|θ) is the likelihood of the data x. In general, the training process to estimate the model parameters θ tends to over-fit the training set Y given the large dimensionality of θ and the fact that Y does not have a sufficiently large amount of training samples. One of the main approaches designed to circumvent this over-fitting issue is the automated generation of synthetic training samples — a process known as data augmentation (DA). In this work, we propose a novel Bayesian approach to augment the training set, targeting a more robust training process. 3.2 Data Augmentation using Latent Variable Methods The DA principle is to increase the observed training data y using a latent variable z that represents the synthesised data, so that the augmented posterior p(θ|y, z) can be easily estimated [28], leading to a more robust estimation of p(θ|y). The latent variable is defined by z = (ta, xa), where xa ∈RD refers to a synthesized data point, and ta ∈{1, ..., K} denotes the associated label. The most commonly chosen optimization method in these types of training processes involving a latent variable is the expectation-maximisation (EM) algorithm [7]. In EM, let θi denote the estimated parameters of the model of p(θ|y) at iteration i, and p(z|θi, y) represents the conditional predictive distribution of z. Then, the E-step computes the expectation of log p(θ|y, z) with respect to p(z|θi, y), as follows: Q(θ, θi) = Ep(z|θi,y) log p(θ|y, z) = Z z log p(θ|y, z)p(z|θi, y)dz. (3) The parameter estimation at the next iteration, θi+1, is then obtained at the M-step by maximizing the Q function: θi+1 = arg max θ Q(θ, θi). (4) The algorithm iterates until ||θi+1 −θi|| is sufficiently small, and the optimal θ∗is selected from the last iteration. The EM algorithm guarantees that the sequence {θi}i=1,2,... converges to a stationary point of p(θ|y) [7, 28], given that the expectation in (3) and the maximization in (4) can be computed exactly. In the convergence proof [7, 28], it is assumed that θi converges to θ∗as the number of iterations i increases, then the proof consists of showing that θ∗is a critical point of p(θ|y). However, in practice, either the E-step or M-step or both can be difficult to compute exactly, especially when working with deep learning models. In such cases, we need to rely on approximation methods. For instance, Monte Carlo sampling method can approximate the integration in (3) (the E-step). This technique is known as Monte Carlo EM (MCEM) algorithm [28]. Furthermore, when the estimation of the global maximiser of Q(θ, θi) in (4) is difficult, Dempster et al. [7] proposed the Generalized EM (GEM) algorithm, which relaxes this requirement with the estimation of θi+1, where Q(θi+1, θi) > Q(θi, θi). The GEM algorithm is proven to have weak convergence [28], by showing that p(θi+1|y) > p(θi|y), given that Q(θi+1, θi) > Q(θi, θi). 4 3.3 Generalized Monte Carlo EM Algorithm With the latent variable z, the augmented posterior p(θ|y, z) becomes: p(θ|y, z) = p(y, z, θ) p(y, z) = p(z|y, θ)p(θ|y)p(y) p(z|y)p(y) = p(z|y, θ)p(θ|y) p(z|y) , (5) where the E-step is represented by the following Monte-Carlo estimation of Q(θ, θi): ˆQ(θ, θi) = 1 M M X m=1 log p(θ|y, zm) = log p(θ|y) + 1 M M X m=1 (log p(zm|y, θ) −log p(zm|y)), (6) where zm ∼p(z|y, θi), for m ∈{1, ..., M}. In (6), if the label ta m of the mth synthesized sample zm is known, then xa m can be sampled from the distribution p(xa m|θ, y, ta m). Hence, the conditional distribution p(z|y, θ) can be decomposed as: p(z|y, θ) = p(ta, xa|y, θ) = p(ta|xa, y, θ)p(xa|y, θ), (7) where (ta, xa) are conditionally independent of y given that all the information from the training set y is summarized in θ — this means that p(ta|xa, y, θ) = p(ta|xa, θ), and p(xa|y, θ) = p(xa|θ). The maximization of ˆQ(θ, θi) with respect to θ for the M-step is re-formulated by first removing all terms that are independent of θ, which allows us to reach the following derivation (making the same assumption as in (2)): ˆQ(θ, θi) = log p(θ) + 1 N N X n=1 (log p(tn|xn, θ) + log p(xn|θ)) + 1 M M X m=1 log p(zm|y, θ) (8) = log p(θ) + 1 N N X n=1 (log p(tn|xn, θ) + log p(xn|θ)) + 1 M M X m=1 (log p(ta m|xa m, θ) + log p(xa m|θ)). Given that there is no analytical solution for the optimization in (8), we follow the same strategy employed in the GEM algorithm, where we estimate θi+1 so that ˆQ(θi+1, θi) > ˆQ(θi, θi). As the function ˆQ(·, θi) is differentiable, we can find such θi+1 by running one step of gradient decent. It can be seen that our proposed optimization consists of a marriage between MCEM and GEM algorithms, which we name: Generalized Monte Carlo EM (GMCEM). The weak convergence proof of GMCEM is provided by Lemma 1. Lemma 1. Assuming that ˆQ(θi+1, θi) > ˆQ(θi, θi), which is guaranteed from (8), then the weak convergence (i.e. p(θi+1|y) > p(θi|y)) will be fulfilled. Proof. Given ˆQ(θi+1, θi) > ˆQ(θi, θi), then by taking the expectation on both sides, that is Ep(z|y,θi)[ ˆQ(θi+1, θi)] > Ep(z|y,θi)[ ˆQ(θi, θi)], we obtain Q(θi+1, θi) > Q(θi, θi), which is the condition for p(θi+1|y) > p(θi|y) proven from [28]. So far, we have presented our Bayesian DA algorithm in a very general manner. The specific forms that the probability terms in (8) take in our implementation are presented in the next section. 4 Implementation In general, our proposed DA algorithm can be implemented using any deep generative and classification models which have differentiable optimisation functions. This is in fact an important advantage that allows us to use the most sophisticated extant models available in the field for the implementation of our algorithm. In this section, we present a specific implementation of our approach using state-of-the-art discriminative and generative models. 5 4.1 Network Architecture Our network architecture consists of two models: a classifier and a generator. For the classifier, modern deep convolutional neural networks [15, 16] can be used. For the generator, we select the adversarial generative networks (GAN) [11], which include a generative model (represented by a deconvolutional neural network) and an authenticator model (represented by a convolutional neural network). This authenticator component is mainly used for facilitating the adversarial training. As a result, our network consists of a classifier (C) with parameters θC, a generator (G) with parameters θG and an Authenticator (A) with parameters θA. Fig. 2 compares our network architecture with other variants of GAN recently proposed [11, 22, 24]. On the surface, our network appears similar to AC-GAN [24], where the only difference is the separation of the classifier network from the authenticator network. However, this crucial modularisation enables our DA algorithm to replace GANs by other generative models that may become available in the future; likewise, we can use the most sophisticated classification models for C. Furthermore, unlike our model, the classification subnetwork introduced in AC-GAN mainly aims for improving the quality of synthesized samples, rather than for classification tasks. Nonetheless, one can consider AC-GAN as one possible implementation of our DA algorithm. Finally, our proposed GAN model is similar to the recently proposed triplet GAN [21] 1, but it is important to emphasise that triplet GAN was proposed in order to improve the training procedure for GANs, while our model represents a particular realisation of the proposed Bayesian DA algorithm, which is the main contribution of this paper. Figure 2: A comparison of different network architectures including GAN[11], C-GAN [22], ACGAN [24] and ours. G: Generator, A: Authenticator, C: Classifier, D: Discriminator. 4.2 Optimization Function Let us define x ∈RD, θC ∈RC, θA ∈RA, θG ∈RG, u ∈R100, c ∈{1, ..., K}, the classifier C, the authenticator A and the generator G are respectively defined by fC : RD × RC →[0, 1]K; (9) fA : RD × RA →[0, 1]2; (10) fG : R100 × Z+ × RG →RD. (11) The optimisation function used to train the classifier C is defined as: JC(θC) = 1 N N X n=1 lC(tn|xn, θC) + 1 M M X m=1 lC(ta m|xa m, θC), (12) where lC(tn|xn, θC) = −log (softmax(fC(tn = c; xn, θC))). The optimisation functions for the authenticator and generator networks are defined by [11]: JAG(θA, θG) = 1 N N X n=1 lA(xn|θA) + 1 M M X m=1 lAG(xa m|θA, θG), (13) 1The triplet GAN [21] was proposed in parallel to this NIPS submission. 6 where lA(xn|θA) = −log (softmax(fA(input = real, xn, θA)) ; (14) lAG(xa m|θA, θG) = −log (1 −softmax(fA(input = real, xa m, θG, θA))) . (15) Following the same training procedure used to train GANs [11, 24], the optimisation is divided into two steps: the training of the discriminative part, consisting of minimising JC(θC) + JAG(θA, θG) and the training of the generative part consisting of minimising JC(θC) −JAG(θA, θG). This loss function can be linked to (8), as follows: lC(tn|xn, θC) = −log p(tn|xn, θ), (16) lC(ta m|xa m, θC) = −log p(ta m|xa m, θ), (17) lA(xn|θA) = −log p(xn|θ), (18) lAG(xa m|θA, θG) = −log p(xa m|θ). (19) 4.3 Training Training the network parameters θ follows the proposed GMCEM algorithm presented in Sec. 3. Accordingly, at each iteration we need to find θi+1 so that ˆQ(θi+1, θi) > ˆQ(θi, θi), which can be achieved using gradient decent. However, since the number of training and augmented samples (i.e., N + M) is large, evaluating the sum of the gradients over this whole set is computationally expensive. A similar issue was observed in contrastive divergence [2], where the computation of the approximate gradient required in theory an infinite number of Markov chain Monte Carlo (MCMC) cycles, but in practice, it was noted that only a few cycles were needed to provide a robust gradient approximation. Analogously, following the same principle, we propose to replace gradient decent by stochastic gradient decent (SGD), where the update from θi to θi+1 is estimated using only a sub-set of the M + N training samples. In practice, we divide the training set into batches, and the updated θi+1 is obtained by running SGD through all batches (i.e, one epoch). We found that such strategy works well empirically, as shown in the experiments (Sec. 5). 5 Experiments In this section, we compare our proposed Bayesian DA algorithm with the commonly used DA technique [19] (denoted as PMDA) on several image classification tasks (code available at: https: //github.com/toantm/keras-bda). This comparison is based on experiments using the following three datasets: MNIST [20] (containing 60, 000 training and 10, 000 testing images of 10 handwritten digits), CIFAR-10[18] (consisting of 50, 000 training and 10, 000 testing images of 10 visual classes like car, dog, cat, etc.), and CIFAR-100 [18] (containing the same amount of training and testing samples as CIFAR-10, but with 100 visual classes). The experimental results are based on the top-1 classification accuracy as a function of the amount of data augmentation used – in particular, we try the following amounts of synthesized images M: a) M = N (i.e., 2× DA), M = 4N (5× DA), and M = 9N (10× DA). The PMDA is based on the use of a uniform noise model over a rotation range of [−10, 10] degrees, and a translation range of at most 10% of the image width and height. Other transformations were tested, but these two provided the best results for PMDA on the datasets considered in this paper. We also include an experiment that does not use DA in order to illustrate the importance of DA in deep learning. As mentioned in Sec. 1, one important contribution of our method is its ability to use arbitrary deep learning generative and classification models. For the generative model, we use the C-GAN [22] 2, and for the classification model we rely on the ResNet18 [15] and ResNetpa [16]. The architectures of the generator and authenticator networks, which are kept unchanged for all three datasets, can be found in the supplementary material. For training, we use Adadelta (with learning rate=1.0, decay rate=0.95 and epsilon=1e −8) for the Classifier (C), Adam (with learning rate 0.0002, and exponential decay rate 0.5) for the Generator (G) and SDG (with learning rate 0.01) for the Authenticator (A). The noise vector used by the Generator G is based on a standard Gaussian noise. In all experiments, we use training batches of size 100. Comparison results using ResNet18 and ResNetpa networks are shown in Figures 3 and 4. First, in all cases it is clear that DA provides a significant improvement in the classification accuracy – in general, 2The code was adapted from: https://github.com/lukedeo/keras-acgan 7 2X 5X 10X Increase size of training data 99.2 99.3 99.4 99.5 99.6 99.7 Accuracy rate ResNet18 on MNIST Without DA PMDA Ours (a) MNIST 2X 5X 10X Increase size of training data 75 80 85 90 95 Accuracy rate ResNet18 on CIFAR-10 Without DA PMDA Ours (b) CIFAR-10 2X 5X 10X Increase size of training data 40 50 60 70 80 Accuracy rate ResNet18 on CIFAR-100 Without DA PMDA Ours (c) CIFAR-100 Figure 3: Performance comparison using ResNet18 [15] classifier. 2X 5X 10X Increase size of training data 99.55 99.6 99.65 99.7 99.75 Accuracy rate ResNetPA on MNIST Without DA PMDA Ours (a) MNIST 2X 5X 10X Increase size of training data 84 86 88 90 92 94 Accuracy rate ResNetPA on CIFAR-10 Without DA PMDA Ours (b) CIFAR-10 2X 5X 10X Increase size of training data 55 60 65 70 75 Accuracy rate ResNetPA on CIFAR-100 Without DA PMDA Ours (c) CIFAR-100 Figure 4: Performance comparison using ResNetpa [16] classifier. larger augmented training set sizes lead to more accurate classification. More importantly, the results reveal that our Bayesian DA algorithm outperforms PMDA by a large margin in all datasets. Given the similarity between the model used by our proposed Bayesian DA algorithm (using ResNetpa [16]) and AC-GAN, it is relevant to present a comparison between these two models, which is shown in Fig. 5 – notice that our approach is far superior to AC-GAN. Finally, it is also important to show the evolution of the test classification accuracy as a function of training time – this is reported in Fig. 6. As expected, it is clear that PMDA produces better classification results at the first training stages, but after a certain amount of training, our Bayesian DA algorithm produces better results. In particular, using the ResNet18 [15] classifier, on CIFAR-100, our method is better than PMDA after two hours of training; while for MNIST, our method is better after five hours of training. It is worth emphasizing that the main goal of the proposed Bayesian DA is to improve the training process of the classifier C. Nevertheless, it is also of interest to investigate the quality of the images produced by the generator G. In Fig. 7, we display several examples of the synthetic images produced by G after the training process has converged. In general, the images look reasonably realistic, particularly the handwritten digits, where the synthesized images would be hard to generate 2X 5X 10X Increase size of training data 99 99.2 99.4 99.6 99.8 Accuracy rate Comparison with AC-GAN on MNIST AC-GAN ResNetpa without DA ResNetpa with ours (a) MNIST 2X 5X 10X Increase size of training data 80 85 90 95 Accuracy rate Comparison with AC-GAN on CIFAR-10 AC-GAN ResNetpa without DA ResNetpa with ours (b) CIFAR-10 2X 5X 10X Increase size of training data 50 55 60 65 70 75 Accuracy rate Comparison with AC-GAN on CIFAR-100 AC-GAN ResNetpa without DA ResNetpa with ours (c) CIFAR-100 Figure 5: Performance comparison with AC-GAN using ResNetpa [16] 8 0.1hr 1hr 2hrs 5hrs 10hrs 24hrs Training time 90 92 94 96 98 100 Accuracy rate ResNet18 on MNIST With PMDA With ours (a) MNIST 0.1hr 1hr 2hrs 5hrs 10hrs 24hrs Training time 30 40 50 60 70 80 Accuracy rate ResNet18 on CIFAR-100 With PMDA With ours (b) CIFAR-100 Figure 6: Classification accuracy (as a function of the training time) using PMDA and our proposed data augmentation on ResNet18 [15] (a) MNIST (b) CIFAR-10 (c) CIFAR-100 Figure 7: Synthesized images generated using our model trained on MNIST (a), CIFAR-10 (b) and CIFAR-100 (c). Each column is conditioned on a class label: a) classes are 0, ..., 9; b) classes are airplane, automobile, bird and ship; and c) classes are apple, aquarium fish, rose and lobster. by the application of Gaussian or uniform noise on pre-determined geometric and appearance transformations. 6 Conclusions In this paper we have presented a novel Bayesian DA that improves the training process of deep learning classification models. Unlike currently dominant methods that apply random transformations to the observed training samples, our method is theoretically sound; the missing data are sampled from the distribution learned from the annotated training set. However, we do not train the generator distribution independently from the training of the classification model. Instead, both models are jointly optimised based on our proposed Bayesian DA formulation that connects the classical latent variable method in statistical learning with modern deep generative models. The advantages of our data augmentation approach are validated using several image classification tasks with clear improvements over standard DA methods and also over the recently proposed AC-GAN model [24]. Acknowledgments TT gratefully acknowledges the support by Vietnam International Education Development (VIED). TP, GC and IR gratefully acknowledge the support of the Australian Research Council through the Centre of Excellence for Robotic Vision (project number CE140100016) and Laureate Fellowship FL130100102 to IR. 9 References [1] C. Bishop. Pattern recognition and machine learning (information science and statistics), 1st edn. 2006. corr. 2nd printing edn. Springer, New York, 2007. [2] M. A. Carreira-Perpinan and G. E. Hinton. On contrastive divergence learning. In AISTATS, volume 10, pages 33–40. Citeseer, 2005. [3] X. Chen, Y. Duan, R. Houthooft, J. Schulman, I. Sutskever, and P. Abbeel. Infogan: interpretable representation learning by information maximizing generative adversarial nets. In Advances in Neural Information Processing Systems, 2016. [4] R. Collobert and J. Weston. A unified architecture for natural language processing: Deep neural networks with multitask learning. In Proceedings of the 25th international conference on Machine learning, pages 160–167. ACM, 2008. [5] R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu, and P. Kuksa. Natural language processing (almost) from scratch. Journal of Machine Learning Research, 12(Aug):2493–2537, 2011. [6] X. Cui, V. Goel, and B. Kingsbury. Data augmentation for deep neural network acoustic modeling. IEEE/ACM Transactions on Audio, Speech and Language Processing (TASLP), 23(9):1469–1477, 2015. [7] A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data via the em algorithm. Journal of the royal statistical society. Series B (methodological), pages 1–38, 1977. [8] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. Imagenet: A large-scale hierarchical image database. In IEEE Conference on Computer Vision and Pattern Recognition, 2009, 2009. [9] E. L. Denton, S. Chintala, a. szlam, and R. Fergus. Deep generative image models using a laplacian pyramid of adversarial networks. In Advances in Neural Information Processing Systems 28, pages 1486–1494. 2015. [10] A. Fawzi, H. Samulowitz, D. Turaga, and P. Frossard. Adaptive data augmentation for image classification. In Image Processing (ICIP), 2016 IEEE International Conference on, pages 3688–3692. IEEE, 2016. [11] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In Advances in neural information processing systems, pages 2672–2680, 2014. [12] A. Graves, A.-r. Mohamed, and G. Hinton. Speech recognition with deep recurrent neural networks. In Acoustics, speech and signal processing (icassp), 2013 ieee international conference on, pages 6645–6649. IEEE, 2013. [13] S. Hauberg, O. Freifeld, A. B. L. Larsen, J. Fisher, and L. Hansen. Dreaming more data: Class-dependent distributions over diffeomorphisms for learned data augmentation. In Artificial Intelligence and Statistics, pages 342–350, 2016. [14] K. He, X. Zhang, S. Ren, and J. Sun. Spatial pyramid pooling in deep convolutional networks for visual recognition. IEEE transactions on pattern analysis and machine intelligence, 37(9):1904–1916, 2015. [15] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770–778, 2016. [16] K. He, X. Zhang, S. Ren, and J. Sun. Identity mappings in deep residual networks. In European Conference on Computer Vision, pages 630–645. Springer, 2016. [17] G. Hinton, L. Deng, D. Yu, G. E. Dahl, A.-r. Mohamed, N. Jaitly, A. Senior, V. Vanhoucke, P. Nguyen, T. N. Sainath, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 29(6):82–97, 2012. [18] A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images. 2009. [19] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. [20] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. [21] C. Li, K. Xu, J. Zhu, and B. Zhang. Triple generative adversarial nets. CoRR, abs/1703.02291, 2017. [22] M. Mirza and S. Osindero. Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784, 2014. [23] A. Odena. Semi-supervised learning with generative adversarial networks. arXiv preprint arXiv:1606.01583, 2016. [24] A. Odena, C. Olah, and J. Shlens. Conditional image synthesis with auxiliary classifier gans. arXiv preprint arXiv:1610.09585, 2016. [25] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211–252, 2015. [26] P. Y. Simard, D. Steinkraus, and J. C. Platt. Best practices for convolutional neural networks applied to visual document analysis. In Proceedings of the Seventh International Conference on Document Analysis and Recognition - Volume 2, 2003. [27] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. [28] M. A. Tanner. Tools for statistical inference: Observed data and data augmentation methods. Lecture Notes in Statistics, 67, 1991. [29] M. A. Tanner and W. H. Wong. The calculation of posterior distributions by data augmentation. Journal of the American statistical Association, 82(398):528–540, 1987. [30] L. Yaeger, R. Lyon, and B. Webb. Effective training of a neural network character classifier for word recognition. In NIPS, volume 9, pages 807–813, 1996. [31] X. Zhang and Y. LeCun. Text understanding from scratch. arXiv preprint arXiv:1502.01710, 2015. 10 | 2017 | 27 |
6,752 | Log-normality and Skewness of Estimated State/Action Values in Reinforcement Learning Liangpeng Zhang1,2, Ke Tang3,1, and Xin Yao3,2 1School of Computer Science and Technology, University of Science and Technology of China 2University of Birmingham, U.K. 3Shenzhen Key Lab of Computational Intelligence, Department of Computer Science and Engineering, Southern University of Science and Technology, China lxz472@cs.bham.ac.uk, tangk3@sustc.edu.cn, xiny@sustc.edu.cn Abstract Under/overestimation of state/action values are harmful for reinforcement learning agents. In this paper, we show that a state/action value estimated using the Bellman equation can be decomposed to a weighted sum of path-wise values that follow log-normal distributions. Since log-normal distributions are skewed, the distribution of estimated state/action values can also be skewed, leading to an imbalanced likelihood of under/overestimation. The degree of such imbalance can vary greatly among actions and policies within a single problem instance, making the agent prone to select actions/policies that have inferior expected return and higher likelihood of overestimation. We present a comprehensive analysis to such skewness, examine its factors and impacts through both theoretical and empirical results, and discuss the possible ways to reduce its undesirable effects. 1 Introduction In reinforcement learning (RL) [1, 2], actions executed by the agent are decided by comparing relevant state values V or action values Q. In most cases, the ground truth V and Q are not available to the agent, and the agent has to rely on estimated values ˆV and ˆQ instead. Therefore, whether or not an RL algorithm yields sufficiently accurate ˆV and ˆQ is a key factor to its performance. Many researches have proved that, for many popular RL algorithms such as Q-learning [3] and value iteration [4], estimated values are guaranteed to converge in the limit to their ground truth values [5, 6, 7, 8]. Still, under/overestimation of state/action values occur frequently in practice. Such phenomena are often considered as the result of insufficient sample size or the utilisation of function approximation [9]. However, recent researches have pointed out that the basic estimators of V and Q derived from the Bellman equation, which were considered unbiased and have been widely applied in RL algorithms, are actually biased [10] and inconsistent [11]. For example, van Hasselt [10] showed that the max operator in the Bellman equation and its transforms introduces bias to the estimated action values, resulting in overestimation. New operators and algorithms have been proposed to correct such biases [12, 13, 14], inconsistency [11] and other issues of value-based RL [15, 16, 17, 18]. This paper shows that, despite having great improvements in recent years, the value estimator of RL can still suffer from under/overestimation. Specifically, we show that the distributions of estimated state/action values are very likely to be skewed, resulting in imbalanced likelihood of under/overestimation. Such skewness and likelihood can vary dramatically among actions/policies within a single problem instance. As a result, the agent may frequently select undesirable actions/policies, regardless of its value estimator being unbiased. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. -5 -4 -3 -2 -1 0 1 2 3 4 5 estimated value 0 0.1 0.2 0.3 0.4 0.5 density value 1 value 2 Figure 1: Illustration of positive skewness (red distribution) and negative skewness (blue distribution). Thick and thin vertical lines represent the corresponding expected values and medians, respectively. Such phenomenon is illustrated in Figure 1. An estimated state/action value following the red distribution has a mean 0.21 and a median −0.61, thus tends to be underestimated. Another following the blue distribution, on the other hand, has a mean −0.92 and a median 0.61, thus likely to be overestimated. Despite that the red expected return is noticeably greater than the blue, the probability of an unbiased agent arriving at the opposite conclusion (blue is better) and thus selecting the inferior action/policy is around 0.59, which is even worse than random guessing. This paper also indicates that such skewness comes from the Bellman equation passing the dispersion of transition dynamics to the state/action values. Therefore, as long as a value is estimated by applying the Bellman equation to the observations of transition, it can suffer from the skewness problem, regardless of the algorithm being used. Instead of proposing new algorithms, this paper suggests two general ways to reduce the skewness. The first is to balance the impacts of positive and negative immediate rewards to the estimated values. We show that positive rewards lead to positive skewness and vice versa, and thus, a balance between the two may help neutralise the harmful effect of skewness. The second way is to simply collect more observations of transitions. However, our results in this paper indicate that the effectiveness of this approach diminishes quickly as the sample size grows, and thus is recommended only when observations are cheap to obtain. In the rest of this paper, we will elaborate our analysis to the distributions of state/action values estimated by the Bellman equation. Specifically, we will show that an estimated value in a general MDP can be decomposed to path-wise values in normalised single-reward Markov chains. The path-wise values are shown to obey log-normal distributions, and thus the distribution of an estimated value is the convolution of such log-normal distributions. To understand which factors have the most impact to the skewness, we derive the expressions of the parameters of these log-normal distributions. We then discuss whether the skewness of estimated values can be reduced in order to improve learning performance. Finally, we provide our empirical results to complement our theoretical ones, illustrating how substantial the undesirable effect of skewness can be, as well as to what degree such effect can be reduced by obtaining more observations. 2 Preliminaries The standard RL setup of [1] is followed in this paper. An environment is formulated as a finite discounted Markov Decision Process (MDP) M = (S, A, P, R, γ), where S and A are finite sets of states and actions, P(s′|s, a) is a transition probability function, R(s, a, s′) is an immediate reward function, and γ ∈(0, 1) is a discount factor. A trajectory (s1, a1, s2, r1), (s2, a2, s3, r2), ..., (st, at, st+1, rt) represents the interaction history between the agent and the MDP. The number of occurrences of state-action pair (s, a) and transition (s, a, s′) in such trajectory are denoted Ns,a and Ns,a,s′, respectively. A policy is denoted π, and V π(s) is the state value of π starting from s. An action value Qπ(s, a) is essentially a state value following a non-stationary policy that selects a at the first step but follows π thereafter. It can be analysed in the same way as V π, so it suffices to focus on V π in the following sections. For convenience, superscript π in V π will be dropped if it is clear from the context. For any s ∈S and policy π, it holds that V π(s) = P s′∈S P(s′|s, π(s))(R(s, π(s), s′) + γV π(s′)), which is called the Bellman equation. Most model-based and model-free RL algorithms utilise this equation, its equivalents, or its transforms to estimate state values. Since P and R are unknown to the agent, estimated values ˆV (s) are computed from estimated transitions ˆP and rewards ˆR instead, 2 where ˆP(s′|s, a) = Ns,a,s′/Ns,a and ˆR(s, a, s′) = rt with (st, at, st+1)=(s, a, s′). This is done explicitly in model-based learning, and implicitly with frequencies of updates in model-free learning. We will show in later section that the skewness of estimated values is decided by the dynamic effects of the environment rather than the learning algorithm being used, and therefore, it suffices to focus on the model-based case in order to evaluate such skewness. The skewness in this paper refers to the Pearson 2 coefficient (E[X] −median[X])/ p Var[X] [19, 20]. Following this definition, a distribution has a positive skewness if and only if its mean is greater than its median, and vice versa. Assuming that the bias of ˆV is corrected or absent, we have E[ ˆV ] = V . Thus, a positive skewness of ˆV means Pr( ˆV <V ) > 0.5, indicating a higher likelihood of underestimation, while a negative skewness indicates a higher likelihood of overestimation. An informative indicator of skewness is CDF ˆV (V )−0.5 where CDF ˆV is the cumulative distribution function of ˆV . The sign of this indicator is consistent with the Pearson 2 coefficient, while its absolute value gives the extra probability of under/overestimation of ˆV compared to a zero-skew distribution. A log-normal distribution with location parameter µ and scale parameter σ is denoted lnN(µ, σ2). A random variable X follows lnN(µ, σ2) if and only if ln(X) follows normal distribution N(µ, σ2). The parameters µ and σ of log-normal distribution can be calculated from its mean and variance by µ = ln E[X]2 √ E[X]2+Var[X] , and σ2 = ln 1 + Var[X] E[X]2 , where E[X] and Var[X] are the mean and variance of X ∼lnN(µ, σ2), respectively. 3 Log-normality of Estimated State Values In this section, we elaborate our analysis to the distributions of estimated values ˆV . The analysis is formed of three steps. First, state values in general MDPs are decomposed to the state values in relevant normalised single-reward Markov chains. Second, they are further decomposed into path-wise state values. Third, the path-wise state values are shown to obey log-normal distributions. 3.1 Decomposing into Normalised Single-reward Markov chains Given an MDP M and a policy π, the interaction between π and M forms a Markov chain M π, with transition probability pi,j = P(sj|si, π(si)) and reward ri,j = R(si, π(si), sj) from arbitrary state si to state sj. Let P π be the transition matrix of M π, V π be the (column) vector of state values, Rπ be the reward matrix, and J be a vector of 1 with the same size of V π. Then Bellman equation is equivalent to V π = P π◦RπJ + γP πV π = (I −γP π)−1(P π◦RπJ), where I is an identity matrix, and ◦is Hadamard product. This equation indicates that a state value is a weighted sum of dynamic effects, with rewards serving as the weights of summation. Precisely, let B = (I −γP π)−1, then the equation above becomes V π = B(P π◦RπJ), or V π(si) = P j,k rj,k(bi,j pj,k). Here, term (bi,j pj,k) describes the joint dynamic effect starting from si ending with transition sjsk, which will be elaborated in Section 3.2. Let M π j,k denote a normalised single-reward Markov chain (NSR-MC) of M π, which has exactly the same S, A, γ and P π as M π, but all rewards are trivially 0 except rj,k = 1. For an NSR-MC M π j,k, the equation above becomes V π M π j,k(si) = bi,j pj,k. Thus, a state value V of a general MDP M can be rewritten as the weighted sum of state values of all |S|2 NSR-MCs {M π j,k} of M, i.e. V π M(si) = P j,k rj,kVM π j,k(si). (1) Therefore, the next step of analysis is to examine the state values in NSR-MCs. 3.2 Decomposing into Path-wise State Values Seeing Markov chain M π as a directed graph, a walk w of length |w| in such graph is a sequence of |w| successive transitions through states s1, s2, s3, ..., s|w|+1.1 A path is a walk without repeated states, with exception to the last state s|w|+1, which can be either a visited or an unvisited one. 1Superscripts here refer to the timestamps on w rather than the indices of specific states in S. 3 1 2 3 4 p1,2 p2,3 p3,4 p1,1 p2,2 p3,3 p2,1 p3,2 p3,1 Figure 2: Illustration of walks and a representative path. "Forward" and "backward" transitions are drawn in thick and thin arrows, respectively, and pi,j denotes the transition probability from si to sj. In an NSR-MC with unique non-zero reward rj,k = 1, a state value V π(si) = bi,j pj,k can be expanded as a sum of the discounted occurrence probabilities of walks that start from si and end with transition (sj, π(sj), sk). Let Wi,j,k denotes the set of all possible walks w satisfying s1=si, s|w|=sj and s|w|+1=sk. Then we have V (si) = P w∈Wi,j,k(γ|w|−1 Q (st,st+1) on w pst,st+1). Since Wi,j,k is infinite, the walks in Wi,j,k need to be put into finite groups for further analysis. Concretely, a step in a walk is considered "forward" if it arrives to a previously unvisited state, and "backward" if the destination has already been visited before that step. The latter also includes the cases where st+1 = st, that is, the agent stays at the same state after transition. The only exception to this classification is the last transition of a walk, which is always considered a "forward" one, regardless of if its destination having been visited or not. The start state s1 and all such "forward" transitions of a walk w form a representative path of w, denoted ˜w. This is illustrated by Figure 2. In this example, all walks from s1 passing s2 ending with s3s4, such as (s1s1s2s3s3s4), (s1s2s3s1s2s3s4) and (s1s2s3s2s3s2s3s4), are grouped with the representative path (s1s2s3s4). Note that transition s1s3 will not happen within this group; rather, it belongs to the groups that have s1s3 in their representative paths. As can be seen from Figure 2, all possible walks sharing one representative path ˜w compose a chain which has the same transition probability values with the original Markov chain M π, but with only two type of transitions: (forward) si to si+1 (i ≤| ˜w|); (backward) si to sj (j ≤i ≤| ˜w|). We call this chain the derived chain of ˜w, denoted M π( ˜w), or simply M( ˜w). Then the infinite sum becomes V (s) = P ˜ w∈˜ W VM( ˜ w)(s), (2) where ˜W is the set of all representative paths that start from s and end with the unique 1-reward transition of the relevant NSR-MC. Such VM( ˜ w)(s) are called path-wise state values of M π. Since the main concern of this paper is the skewness of ˆV , we do not provide a constructive method of obtaining all M π( ˜w). Rather, we point out that the size of ˜W is at most (|S|!), and thus an estimated value ˆV in NSR-MCs can be decomposed to finitely many estimated path-wise state values. 3.3 Log-normality of Estimated Path-wise State Values Strictly speaking, derived chain M( ˜w) of a representative path ˜w is not necessarily a Markov chain, because only part of the transitions in the original Markov chain M π is included, allowing the possibility of Pi+1 j=1 psi,sj < 1. However, this does not make the path-wise state values violate Bellman equation, and thus they can be treated as regular state values. Since a representative path ˜w has no repeated states (except for s| ˜ w|+1 which can either be a new state or the same as some sk), the superscripts here can be treated as the indices of states for convenience. Therefore, path-wise state value VM( ˜ w)(si) is denoted Vi, and pi,j refers to psi,sj in this section. Given ˜w, the most important path-wise value is V1, which belongs to the start point of ˜w. Definition 3.1. Given a derived chain M( ˜w) and discount factor γ, let pi,j be the transition probability from si to sj on M( ˜w). The joint dynamic effect of M( ˜w) for i ≤| ˜w| is recursively defined as Di = γpi,i+1 1 −γ(pi,i + Pi−1 j=1 pi,j Qi−1 k=j Dk) . Lemma 3.2. For all i < | ˜w|, path-wise state values satisfy Vi = Di Vi+1. 4 Proof. By Bellman equation, it holds that Vi = P| ˜ w|+1 j=1 pi,j(ri,j+γVj). By definition of M( ˜w) we have pi,j = 0 for j > i+1 and ri,j = 0 for (i, j) ̸= (| ˜w|, | ˜w|+1). Thus Vi = γ Pi+1 j=1 pi,jVj for i < | ˜w|. When i = 1, this becomes V1 = γ(p1,1V1+p1,2V2) = γp1,2 1−γp1,1 V2 = D1V2. Suppose Vi = Di Vi+1 holds for all i ≤k < | ˜w|−1. Then Vi = (Qk j=i Dj)Vk+1 for i ≤k, and therefore, Vk+1 = γ Pk+2 j=1 pk+1,jVj = γ[Pk+1 j=1 pk+1,j(Qk l=j Dl)Vk+1 + pk+1,k+2Vk+2] = γpk+1,k+2 1−γ(pk+1,k+1+Pk j=1 pk+1,j Qk l=j Dl)Vk+2 = Dk+1Vk+2. Thus, by the principle of induction, Vi = Di Vi+1 holds for all i < | ˜w|. Lemma 3.3. For all i ≤| ˜w|, Vi = 1 γ Q| ˜ w| j=i Dj. Particularly, V1 = 1 γ Q| ˜ w| j=1 Dj. Proof. By definition of ˜w, there are two possible cases of the last step from s| ˜ w| to s| ˜ w|+1: (I) s| ˜ w|+1 /∈{s1, ..., s| ˜ w|}; (II) there exists k ≤| ˜w| such that s| ˜ w|+1 = sk. (Case I) There is no transition starting from s| ˜ w|+1 in this case, thus V| ˜ w|+1 = 0. Therefore, V| ˜ w| = p| ˜ w|,| ˜ w|+1(r| ˜ w|,| ˜ w|+1 + γV| ˜ w|+1) + γ P| ˜ w| j=1 p| ˜ w|,jVj = p| ˜ w|,| ˜ w|+1 + γ P| ˜ w| j=1 p| ˜ w|,jVj = p| ˜ w|,| ˜ w|+1 1−γ(p| ˜ w|,| ˜ w|+P| ˜ w|−1 j=1 p| ˜ w|,j Q| ˜ w|−1 k=j Dk) = 1 γ D| ˜ w|. Thus Vi = (Q| ˜ w|−1 j=i Dj)V| ˜ w| = 1 γ Q| ˜ w| j=i Dj. (Case II with s| ˜ w|+1 = sk) In this case V| ˜ w|+1 = Vk and p| ˜ w|,| ˜ w|+1 = p| ˜ w|,k, thus V| ˜ w| = p| ˜ w|,| ˜ w|+1(r| ˜ w|,| ˜ w|+1 + γVk) + γ P| ˜ w| j=1,j̸=k p| ˜ w|,jVj = p| ˜ w|,| ˜ w|+1 + γ P| ˜ w| j=1 p| ˜ w|,jVj which is the same expression as the first case, and therefore Vi = 1 γ Q| ˜ w| j=i Dj also holds for this case. In both of the two cases above, V1 is the product of D1, D2, ..., D| ˜ w| given by Definition 3.1, and an additional factor 1 γ . Thus we have ln(V1) = −ln(γ) + P| ˜ w| j=1 ln(Dj). By replacing all pi,j in Definition 3.1 with estimated transition ˆpi,j, we get the “estimated” 2 joint dynamic effects ˆD. Then the equation above becomes ln( ˆV1) = −ln(γ) + P| ˜ w| j=1 ln( ˆDj). Assuming ˆDi’s as independent random variables, it can be shown by the central limit theorem that as | ˜w| grows, ln( ˆV1) will tend to a normal distribution, and therefore, ˆV1 approximates a log-normal distribution. The “estimated” joint dynamic effects ˆD are actually mutually dependent in most cases, thus the rigorous analysis of log-normality is more complicated. The main idea here is to first prove all ˆDi ≤γ, and then show that the summation involving terms pi,j Qi−1 k=j ˆDk in Definition 3.1 diminish quickly with the size of ˜w, which indicates that ˆDi is mostly decided by ˆpi,i and ˆpi,i+1 and thus the dependency between any two ˆD is relatively weak. As the focus here is to see the skewness of ˆV1, such analysis is skipped, and we proceed to the study of parameters of log-normal distribution of ˆV1. Since ˆpi,i and ˆpi,i+1 are the main factors that decide ˆDi, we provide the result on the most representative case where pi,i + pi,i+1 = 1 and all other pi,j are 0 for i < | ˜w|. Such M( ˜w) is denoted M0( ˜w) in the following text. It is easy to see that all ˆDi are mutually independent in such chains. The delta method [21, 22] below is used to obtain the expressions of parameters. Lemma 3.4 (Delta method[21, 22]). Suppose X is a random variable with finite moments, E[X] being its mean and Var[X] being its variance. Suppose f is a sufficiently differentiable function. Then it holds that E[f(X)] ≈f(E[X]), and Var[f(X)] ≈f ′(E[X])2 Var[X]. Lemma 3.5. Let ˆDj be Dj replacing all p with ˆp. Let Ni denotes the number of visits to the chain state si in a learning trajectory. In M0( ˜w) derived chains it holds that E[ ˆDj] ≈ γpj,j+1 1−γpj,j , and Var[ ˆDj] ≈ γ2(1−γ)2 (1−γpj,j)4 · pj,jpj,j+1 Nj . Proof. It holds that Var[ˆpj,j+1] = ( 1 Nj )2Njpj,jpj,j+1 = pj,jpj,j+1 Nj , then by applying Lemma 3.4 to Definition 3.1. 2Such “estimation” is not done explicitly in actual algorithms, but implicitly when using Bellman equation. 5 Lemma 3.6. In M0( ˜w) derived chains it holds that E[ ˆV1] = 1 γ | ˜ w| Y j=1 E[ ˆDj], Var[ ˆV1] ≈1 γ2 | ˜ w| Y j=1 (Var[ ˆDj] + E[ ˆDj]2) − | ˜ w| Y j=1 E[ ˆDj]2 . Proof. For independent X1, X2, ..., Xn it holds that Var[X1...Xn] = Qn j=1(Var[Xj] + E[Xj]2) − Qn j=1 E[Xj]2. Since all ˆD are independent in M0( ˜w), by applying this and Lemma 3.4 to Lemma 3.3, the above results can be obtained. Theorem 3.7. In M0( ˜w) with sufficiently large | ˜w|, it holds that ˆV1 ˙∼lnN(µ, σ2) with µ = ln E[ ˆV1]2 √ E[ ˆV1]2+Var[ ˆV1] and σ2 = ln 1+ Var[ ˆV1] E[ ˆV1]2 , where E[ ˆV1] and Var[ ˆV1] are given by Lemma 3.6. Proof. By applying the equations on the parameters of log-normal (see Section 2) to ˆV1. 4 Skewness of Estimated State Values, and Countermeasures This section interprets the results presented in Section 3 in terms of skewness, and discuss how to reduce the undesirable effects of skewness. The skewness is mainly decided by two factors: (a) parameter σ of log-normal distributions; (b) non-zero immediate rewards. 4.1 Impact of Parameter σ of Log-normal Distributions A regular log-normal distribution lnN(µ, σ2) has a positive skewness, which means a sampled value from such distribution has more than 0.5 probability to be less than its expected value, resulting in a higher likelihood of underestimation. Precisely, if X ∼lnN(µ, σ2), then E[X] = exp(µ + σ2/2) and median[X] = exp(µ), thus the Pearson 2 coefficient of X is greater than 0. Additionally, since lnN(µ, σ2) has a CDF(x) = 0.5(1 + erf( ln(x)−µ √ 2σ )) where erf(x) is the Gauss error function, our indicator CDF(E[X])−0.5 equals to 0.5 erf(σ/ √ 8). This indicates that σ has a stronger impact than µ to the scale of the skewness in log-normal distributions. Combining Lemma 3.6 and Theorem 3.7 shows that σ is decided by a complicated interaction between all observed dynamic effect ˆDj’s. By Lemma 3.5, transition probabilities pj,∗completely decide E[ ˆDj], and have substantial impacts to Var[ ˆDj]. This indicates that the main cause of skewness is the transition dynamics of MDPs rather than learning algorithms. As an extreme case, if the forward transition of a state-action pair is deterministic (i.e. pj,j+1 = 1), then its Var[ ˆDj] = 0, resulting no contribution to the skewness. If an estimated value consists of a large portion of such transitions, then the likelihoods of overestimation and underestimation are both very low. On the other hand, if backward transition probability pj,j (or any pj,k with k ≤j) is close to 1, then Var[ ˆDj] increases dramatically, resulting a noticeable skewness. Real-world problems can be a mix of these two extremes, which leads to a great variety of skewness among different actions/policies, making learning significantly more difficult. By Lemma 3.5, σ is also dependent to the number of observations Nj. As Nj grows infinitely, Var[ ˆDj] slowly decreases to 0, which reduces Var[ ˆV1] in Lemma 3.6 and eventually leads σ to 0. This indicates that running algorithms more steps does help reduce the skewness of estimated values and improve the overall performance. However, the expression of Var[ ˆDj] in Lemma 3.5 also indicates that the degree of improvement diminishes quickly as Nj grows. Therefore, collecting more observations is not always an efficient way to reduce the skewness. 6 -4 -2 0 2 4 estimated path-wise value 0 0.2 0.4 0.6 0.8 density positive negative (a) -4 -2 0 2 4 estimated path-wise value 0 0.2 0.4 0.6 0.8 density positive negative convolution (b) -4 -2 0 2 4 estimated path-wise value 0 0.5 1 1.5 density positive negative convolution (c) Figure 3: (a) Log-normals weighted by positive reward (red) and negative reward (blue). Thick/thin vertical lines are means & medians. (b, c) Convolution of two log-normals, given by the purple curve. 1 n 2 3 ... p p p p 1 −p 1 −p 1 −p 1 1 1 1 1, rD 1, rG Figure 4: A chain MDP with n states, forward probability p, goal reward rG and distraction reward rD. Transitions under taking action a+ is drawn in solid arrows, and a−in dotted arrows. 4.2 Impact of Non-zero Immediate Rewards Non-zero immediate rewards decide not only the scale of skewness, but also the direction of skewness. By Equation 1 and 2 in Sections 3.1 and 3.2, path-wise values are weighted by their corresponding immediate rewards before being summed into state values. If a path-wise state value is weighted by a positive reward, then the resulting distribution is still a regular log-normal, which has a positive skewness and thus a higher likelihood of underestimation. However, if it is weighted by a negative reward, then the result is a flipped log-normal, which has a negative skewness and thus a higher likelihood of overestimation. This is illustrated in Figure 3 (a), where the red and blue distributions correspond to the estimated path-wise values weighted by a positive and a negative reward, respectively. In general cases, the sum of positively skewed random variables is not necessarily a positively skewed random variable. However, the sum of regular log-normal random variables can be approximated by another log-normal [23], thus is still positively skewed. Since path-wise state values are approximately log-normal, it is clear that if an MDP only has positive immediate rewards, then all estimated values are likely to be positively skewed and thus have higher likelihoods to be underestimated. On the other hand, if an estimated value is composed of both positive and negative rewards, then the skewness of regular and flipped log-normal distributions may partly be neutralised in their convolution. The purple distribution in Figure 3 (b) shows the result of convolution of two skewed distributions that lie symmetrically to x = 0. The skewness is perfectly neutralised in this case, resulting in a symmetric distribution with a balanced likelihood of under/overestimation. In the case of Figure 3 (c), the convolution is still a skewed one, but the scale of this skewness is less than the original ones. To make learning easier, one may hope to design the reward function such that the more desirable actions/policies have both higher expected returns and higher likelihood of overestimation than the less desirable ones. However, the former requires more positive rewards, while the latter calls for more negative rewards, causing an unsolvable dilemma. Therefore, it is more realistic just to balance the likelihood of under/overestimation, so that all actions/policies can compete fairly with each other. Reward shaping [24, 25] can be a promising choice to achieve this goal, as it preserves the optimality of policies. Since a better balance of positive and negative rewards directly reduces the impact of the skewness of all relevant log-normal distributions, this approach might be more effective than simply collecting more observations. 5 Experiments In this section, we present our empirical results on the skewness of estimated values. There are two purposes in these experiments: (a) to demonstrate how substantial the harm of the skewness can be; (b) to see the improvement provided by collecting more observations, as mentioned in Section 4.1. We conducted experiments in chain MDPs shown in Figure 4. There are n > 0 states s1, s2, ..., sn in a chain MDP. At each state, the agent has two possible actions a+ and a−. By taking a+ at si with 7 0 5 10 15 20 estimated value 0 0.05 0.1 0.15 0.2 density sample distribution theoretical distribution (a) 0 100 200 300 400 #observations per state-action 0.5 0.55 0.6 0.65 0.7 0.75 0.8 probability of underestimation empirical theoretical (b) Figure 5: (a) Distribution of ˆV π+(s1) at m = 200. (b) Underestimation probability curve. i < n, the agent has probability p > 0 to be sent to si+1, and 1 −p to remain at si. Taking a+ at sn yields a goal reward rG > 0, and the agent remains at sn. Taking a−, on the other hand, sends the agent from si to si−1 (i > 1) or s1 (i = 1) with probability 1, and if a−is taken at s1, then the agent will be provided a distraction reward rD > 0. The objective of the learning agent is to discover a policy that leads it to the goal sn and collects rG as often as possible, rather than being distracted by rD. There are two policy of interest: π+ that always take a+, and π−that always take a−. Other policies can be proved to be always worse than π+ and π−in terms of V π(s1) regardless of rG, rD, p, and discount factor γ. Since using max operator may introduce bias [10], we modified the default value iteration algorithm [4] to let it output the unbiased estimated state values by following predetermined policies rather than using max operator. In each run of experiment, m observations were collected for each state-action pair, resulting in a data set of size 2mn. Then, the observations were passed to the modified value iteration algorithm to estimate the state values of π+ and π−under discount factor γ = 0.9. The Markov chain M π+ and M π−here are both single-path ones, and thus the corresponding theoretical distributions of ˆV can be computed directly by applying Theorem 3.7. Further, since transition probabilities in M π−are all 1, we have Var[ ˆV π−] = 0, and thus its estimated values always equal trivially to the ground truth one (i.e. it will never be under/overestimated). The empirical and theoretical distributions of estimated state value ˆV π+(s1) with m = 200, n = 20, p = 0.1, rG = 1e6 in 1000 runs is shown in Figure 5 (a). One-sample Kolmogorov-Smirnov test was conducted against the null hypotheses that the empirical data came from the theoretical log-normal distributions. The resulting p-value was 0.1190, which failed to reject the null hypothesis at 5% significance level, indicating no significant difference between the theoretical and sample distribution. More importantly, Figure 5 (a) shows a clear positive skewness, indicating a higher likelihood of underestimation. The empirical value of indicator CDF(E[ ˆV ])−0.5 was +0.103, meaning that in 60.3% of runs, the state value was underestimated. This further indicates that, if the distraction reward rD is set to a value such that V π−(s1) is slightly less than V π+(s1), then the agent will wrongly select π−with probability close to 0.603, which is worse than random guess. To see whether collecting more observations helps reduce skewness, the same experiments as above were conducted with the number of observations per state-action m ranged from 20 to 400. Figure 5 (b) shows the theoretical and empirical probability of underestimation Pr( ˆV π+(s1) < E ˆV π+(s1)). At m = 20, 200 and 400, the empirical underestimate probability was 0.741, 0.603 and 0.563, respectively. While from m = 20 to 200 there was an significant improvement of 0.138, or a 18.6% relative improvement, from 200 to 400 it was only 0.040, or 6.6% relative. This result supports the analysis in Section 4.1, demonstrating that the merit of collecting more observations is most noticeable when the sample size is low, and diminishes quickly as the sample size grows. We also conducted experiments in the complex maze domain [26] in the same manner as above. In this domain, the task of the agent is to find a policy that can collect all flags and bring them to the goal as often as possible, without falling into any traps. The maze used is given in Figure 6 (a). The states in this domain is represented by the current position of the agent and the status of the three flags. The agent starts at the start point indicated by S with no flag. At each time step, the agent can 8 X X S 1 T T T T X 3 T 2 T X X X X G X X (a) 2000 4000 6000 8000 10000 12000 estimated state value 0 1 2 3 density 10-4 m=10 lognormal fit (b) 0 40 80 120 160 200 #observations per state-action 0.5 0.55 0.6 0.65 0.7 probability of underestimation data curve fit (c) Figure 6: (a) A complex maze. S, G, numbers, and circles stand for start, goal, flags, and traps, respectively. (b) Distribution of ˆV π∗(sstart) at m = 10. (c) Underestimation probability curve. select one of the four directions to move to. The agent is then sent to the adjacent grid at the chosen direction with probability 0.7, and at each of the other three directions with probability 0.1, unless the destination is blocked, in which case the agent remains at the current grid. Additionally, at the flag grids (numbers in Figure 6 (a)), taking actions also provides the corresponding flag to the agent if that flag has not been obtained yet. At the goal point (G), taking arbitrary action yields an immediate reward equals to 1, 100, 1002 or 1003 if the agent holds 0, 1, 2 or 3 flags, respectively. Then the agent is sent back to the start point, and all three flag are reset to their initial position. Finally, at any trap grid (circles), taking actions sends the agent to S and resets all flags without yielding a goal reward. The complex maze in Figure 6(a) has 440 states, 4 actions, 32 non-zero immediate rewards, and complicated transition patterns, and thus is difficult to analyse manually. However, it is noticeable that all non-zero immediate rewards are positive, and thus according to Section 4.2, estimated state values are likely to have positive skew, resulting in greater likelihood of underestimation. Figure 6 (b) shows the empirical distribution of estimated value ˆV π∗(sstart, no flag) under γ = 0.9 and m = 10 in 1000 runs. Although it is not a path-wise state value, the distribution is approximately log-normal with parameter µ ≈8.21, σ ≈0.480. In 67.6% of these 1000 runs, the optimal state value at the start state was underestimated. The effect of collecting a larger sample is show in Figure 6 (c). The probability of underestimation decreased from 0.676 at m = 10 to 0.597 at m = 50, 0.563 at m = 100, and 0.556 at m = 200. The data points approximated an exponential function y = 0.1725 exp(−0.04015x) + 0.5546, which suggests that it can be very difficult to achieve underestimation probability lower than 0.55 by collecting more data in this domain. 6 Conclusion and Future Work This paper has shown that estimated state values computed using the Bellman equation can be decomposed to the relevant path-wise state values, and the latter obey log-normal distributions. Since log-normal distributions are skewed, the estimated state values also have skewed distributions, resulting in imbalanced likelihood of under/overestimation, which can be harmful for learning. We have also pointed out that the direction of such imbalance is decided by the immediate reward associated to the log-normal distributions, and thus, by carefully balancing the impact of positive and negative rewards when designing the MDPs, such undesirable imbalance can possibly be neutralised. Collecting more observations, on the other hand, helps reduce the skewness to a degree, but such effect becomes less significant when the sample size is already large. It would be interesting to see how the skewness studied in this paper interacts with function approximation (e.g. neural networks [27, 28]), policy gradient [29, 30], or Monte-Carlo tree search [31, 32]. A reasonable guess is that these techniques introduce their own skewness, and the two different skewness amplify each other, making learning even more difficult. On the other hand, reducing the skewness discussed in this paper may improve learning performance even when such techniques are used. Therefore, developing a concrete method of balancing positive and negative rewards (as discussed in Section 4.2) can be very helpful, and will be investigated in the future. 9 Acknowledgements This paper was supported by Ministry of Science and Technology of China (Grant No. 2017YFB1003102), the National Natural Science Foundation of China (Grant Nos. 61672478 and 61329302), the Science and Technology Innovation Committee Foundation of Shenzhen (Grant No. ZDSYS201703031748284), EPSRC (Grant No. J017515/1), and in part by the Royal Society Newton Advanced Fellowship (Reference No. NA150123). References [1] Richard S. Sutton and Andrew G. Barto. Introduction to Reinforcement Learning. MIT Press, Cambridge, MA, USA, 1st edition, 1998. [2] Csaba Szepesvári. Algorithms for reinforcement learning. Synthesis lectures on artificial intelligence and machine learning, 4(1):1–103, 2010. [3] Christopher Watkins and Peter Dayan. Q-learning. Machine learning, 8(3-4):279–292, 1992. [4] Martin Puterman. Markov Decision Processes: Discrete Stochastic Dynamic Programming. Wiley-Interscience, 1994. [5] Peter Dayan. The convergence of TD (λ) for general λ. Machine learning, 8(3-4):341–362, 1992. [6] John N. Tsitsiklis. Asynchronous stochastic approximation and Q-learning. Machine Learning, 16(3):185–202, 1994. [7] Michael L. Littman, Thomas L. Dean, and Leslie P. Kaelbling. On the complexity of solving markov decision problems. In Proceedings of the Eleventh Conference on Uncertainty in Artificial Intelligence, pages 394–402. Morgan Kaufmann Publishers Inc., 1995. [8] Csaba Szepesvári. The asymptotic convergence-rate of Q-learning. In Proceedings of the 10th International Conference on Neural Information Processing Systems, pages 1064–1070. MIT Press, 1997. [9] Sebastian Thrun and Anton Schwartz. Issues in using function approximation for reinforcement learning. In Proceedings of the 1993 Connectionist Models Summer School Hillsdale, NJ. Lawrence Erlbaum. Citeseer, 1993. [10] Hado Van Hasselt. Double Q-learning. In Advances in Neural Information Processing Systems, pages 2613–2621, 2010. [11] Marc G. Bellemare, Georg Ostrovski, Arthur Guez, Philip S. Thomas, and Rémi Munos. Increasing the action gap: New operators for reinforcement learning. In Proceedings of the 30th AAAI Conference on Artificial Intelligence, pages 1476–1483, 2016. [12] Donghun Lee, Boris Defourny, and Warren B. Powell. Bias-corrected Q-learning to control max-operator bias in Q-learning. In Adaptive Dynamic Programming And Reinforcement Learning (ADPRL), 2013 IEEE Symposium on, pages 93–99. IEEE, 2013. [13] Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double Q-learning. In Proceedings of the 30th AAAI Conference on Artificial Intelligence, pages 2094–2100, 2016. [14] Carlo D’Eramo, Alessandro Nuara, Matteo Pirotta, and Marcello Restelli. Estimating the maximum expected value in continuous reinforcement learning problems. In Proceedings of the 31th AAAI Conference on Artificial Intelligence, pages 1840–1846, 2017. [15] Dimitri P. Bertsekas and Huizhen Yu. Q-learning and enhanced policy iteration in discounted dynamic programming. Mathematics of Operations Research, 37(1):66–94, 2012. [16] Paul Wagner. Policy oscillation is overshooting. Neural Networks, 52:43–61, 2014. 10 [17] Nan Jiang, Alex Kulesza, Satinder Singh, and Richard Lewis. The dependence of effective planning horizon on model accuracy. In Proceedings of the 2015 International Conference on Autonomous Agents and Multiagent Systems, pages 1181–1189. International Foundation for Autonomous Agents and Multiagent Systems, 2015. [18] Harm Van Seijen, A. Rupam Mahmood, Patrick M. Pilarski, Marlos C. Machado, and Richard S. Sutton. True online temporal-difference learning. Journal of Machine Learning Research, 17(145):1–40, 2016. [19] David P. Doane and Lori E. Seward. Measuring skewness: a forgotten statistic. Journal of Statistics Education, 19(2):1–18, 2011. [20] Harold Hotelling and Leonard M. Solomons. The limits of a measure of skewness. The Annals of Mathematical Statistics, 3(2):141–142, 05 1932. [21] Gary W. Oehlert. A note on the delta method. The American Statistician, 46(1):27–29, 1992. [22] George Casella and Roger L. Berger. Statistical inference. 2nd edition, 2002. [23] Norman C. Beaulieu and Qiong Xie. An optimal lognormal approximation to lognormal sum distributions. IEEE Transactions on Vehicular Technology, 53(2):479–489, 2004. [24] Andrew Y. Ng, Daishi Harada, and Stuart Russell. Policy invariance under reward transformations: Theory and application to reward shaping. In Proceedings of the Sixteenth International Conference on Machine Learning, volume 99, pages 278–287, 1999. [25] John Asmuth, Michael L. Littman, and Robert Zinkov. Potential-based shaping in model-based reinforcement learning. In Proceedings of the 23th AAAI Conference on Artificial Intelligence, pages 604–609, 2008. [26] Liangpeng Zhang, Ke Tang, and Xin Yao. Increasingly cautious optimism for practical PACMDP exploration. In Proceedings of the 24th International Joint Conference on Artificial Intelligence, pages 4033–4040, 2015. [27] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin Riedmiller, Andreas K. Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. [28] Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In Proceedings of the 33rd International Conference on Machine Learning, pages 1928–1937, 2016. [29] Sham Kakade. A natural policy gradient. Advances in neural information processing systems, 2:1531–1538, 2002. [30] John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In Proceedings of The 32nd International Conference on Machine Learning, pages 1889–1897, 2015. [31] Levente Kocsis and Csaba Szepesvári. Bandit based monte-carlo planning. In European Conference on Machine Learning, 2006. [32] Cameron B. Browne, Edward Powley, Daniel Whitehouse, Simon M. Lucas, Peter I. Cowling, Philipp Rohlfshagen, Stephen Tavener, Diego Perez, Spyridon Samothrakis, and Simon Colton. A survey of monte carlo tree search methods. IEEE Transactions on Computational Intelligence and AI in games, 4(1):1–43, 2012. 11 | 2017 | 270 |
6,753 | Bayesian Compression for Deep Learning Christos Louizos University of Amsterdam TNO Intelligent Imaging c.louizos@uva.nl Karen Ullrich University of Amsterdam k.ullrich@uva.nl Max Welling University of Amsterdam CIFAR∗ m.welling@uva.nl Abstract Compression and computational efficiency in deep learning have become a problem of great significance. In this work, we argue that the most principled and effective way to attack this problem is by adopting a Bayesian point of view, where through sparsity inducing priors we prune large parts of the network. We introduce two novelties in this paper: 1) we use hierarchical priors to prune nodes instead of individual weights, and 2) we use the posterior uncertainties to determine the optimal fixed point precision to encode the weights. Both factors significantly contribute to achieving the state of the art in terms of compression rates, while still staying competitive with methods designed to optimize for speed or energy efficiency. 1 Introduction While deep neural networks have become extremely successful in in a wide range of applications, often exceeding human performance, they remain difficult to apply in many real world scenarios. For instance, making billions of predictions per day comes with substantial energy costs given the energy consumption of common Graphical Processing Units (GPUs). Also, real-time predictions are often about a factor 100 away in terms of speed from what deep NNs can deliver, and sending NNs with millions of parameters through band limited channels is still impractical. As a result, running them on hardware limited devices such as smart phones, robots or cars requires substantial improvements on all of these issues. For all those reasons, compression and efficiency have become a topic of interest in the deep learning community. While all of these issues are certainly related, compression and performance optimizing procedures might not always be aligned. As an illustration, consider the convolutional layers of Alexnet, which account for only 4% of the parameters but 91% of the computation [65]. Compressing these layers will not contribute much to the overall memory footprint. There is a variety of approaches to address these problem settings. However, most methods have the common strategy of reducing both the neural network structure and the effective fixed point precision for each weight. A justification for the former is the finding that NNs suffer from significant parameter redundancy [14]. Methods in this line of thought are network pruning, where unnecessary connections are being removed [38, 24, 21], or student-teacher learning where a large network is used to train a significantly smaller network [5, 26]. From a Bayesian perspective network pruning and reducing bit precision for the weights is aligned with achieving high accuracy, because Bayesian methods search for the optimal model structure (which leads to pruning with sparsity inducing priors), and reward uncertain posteriors over parameters through the bits back argument [27] (which leads to removing insignificant bits). This relation is made explicit in the MDL principle [20] which is known to be related to Bayesian inference. ∗Canadian Institute For Advanced Research. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. In this paper we will use the variational Bayesian approximation for Bayesian inference which has also been explicitly interpreted in terms of model compression [27]. By employing sparsity inducing priors for hidden units (and not individual weights) we can prune neurons including all their ingoing and outgoing weights. This avoids more complicated and inefficient coding schemes needed for pruning or vector quantizing individual weights. As an additional Bayesian bonus we can use the variational posterior uncertainty to assess which bits are significant and remove the ones which fluctuate too much under approximate posterior sampling. From this we derive the optimal fixed point precision per layer, which is still practical on chip. 2 Variational Bayes and Minimum Description Length A fundamental theorem in information theory is the minimum description length (MDL) principle [20]. It relates to compression directly in that it defines the best hypothesis to be the one that communicates the sum of the model (complexity cost LC) and the data misfit (error cost LE) with the minimum number of bits [57, 58]. It is well understood that variational inference can be reinterpreted from an MDL point of view [54, 69, 27, 29, 19]. More specifically, assume that we are presented with a dataset D that consists from N input-output pairs {(x1, y1), . . . , (xn, yn)}. Let p(D|w) = QN i=1 p(yi|xi, w) be a parametric model, e.g. a deep neural network, that maps inputs x to their corresponding outputs y using parameters w governed by a prior distribution p(w). In this scenario, we wish to approximate the intractable posterior distribution p(w|D) = p(D|w)p(w)/p(D) with a fixed form approximate posterior qφ(w) by optimizing the variational parameters φ according to: L(φ) = Eqφ(w)[log p(D|w)] | {z } LE + Eqφ(w)[log p(w)] + H(qφ(w)) | {z } LC , (1) where H(·) denotes the entropy and L(φ) is known as the evidence-lower-bound (ELBO) or negative variational free energy. As indicated in eq. 1, L(φ) naturally decomposes into a minimum cost for communicating the targets {yn}N n=1 under the assumption that the sender and receiver agreed on a prior p(w) and that the receiver knows the inputs {xn}N n=1 and form of the parametric model. By using sparsity inducing priors for groups of weights that feed into a neuron the Bayesian mechanism will start pruning hidden units that are not strictly necessary for prediction and thus achieving compression. But there is also a second mechanism by which Bayes can help us compress. By explicitly entertaining noisy weight encodings through qφ(w) we can benefit from the bits-back argument [27, 29] due to the entropy term; this is in contrast to infinitely precise weights that lead to H(δ(w)) = −∞2. Nevertheless in practice, the data misfit term LE is intractable for neural network models under a noisy weight encoding, so as a solution Monte Carlo integration is usually employed. Continuous qφ(w) allow for the reparametrization trick [34, 56]. Here, we replace sampling from qφ(w) by a deterministic function of the variational parameters φ and random samples from some noise variables ϵ: L(φ) = Ep(ϵ)[log p(D|f(φ, ϵ))] + Eqφ(w)[log p(w)] + H(qφ(w)), (2) where w = f(φ, ϵ). By applying this trick, we obtain unbiased stochastic gradients of the ELBO with respect to the variational parameters φ, thus resulting in a standard optimization problem that is fit for stochastic gradient ascent. The efficiency of the gradient estimator resulting from eq. 2 can be further improved for neural networks by utilizing local reparametrizations [35] (which we will use in our experiments); they provide variance reduction in an efficient way by locally marginalizing the weights at each layer and instead sampling the distribution of the pre-activations. 3 Related Work One of the earliest ideas and most direct approaches to tackle efficiency is pruning. Originally introduced by [38], pruning has recently been demonstrated to be applicable to modern architectures [25, 21]. It had been demonstrated that an overwhelming amount of up to 99,5% of parameters can be pruned in common architectures. There have been quite a few encouraging results obtained by (empirical) Bayesian approaches that employ weight pruning [19, 7, 50, 67, 49]. Nevertheless, 2In practice this term is a large constant determined by the weight precision. 2 weight pruning is in general inefficient for compression since the matrix format of the weights is not taken into consideration, therefore the Compressed Sparse Column (CSC) format has to be employed. Moreover, note that in conventional CNNs most flops are used by the convolution operation. Inspired by this observation, several authors proposed pruning schemes that take these considerations into account [70, 71] or even go as far as efficiency aware architectures to begin with [31, 15, 30]. From the Bayesian viewpoint, similar pruning schemes have been explored at [45, 51, 37, 33]. Given optimal architecture, NNs can further be compressed by quantization. More precisely, there are two common techniques. First, the set of accessible weights can be reduced drastically. As an extreme example, [13, 46, 55, 72] and [11] trained NN to use only binary or tertiary weights with floating point gradients. This approach however is in need of significantly more parameters than their ordinary counterparts. Work by [18] explores various techniques beyond binary quantization: k-means quantization, product quantization and residual quantization. Later studies extent this set to optimal fixed point [42] and hashing quantization [10]. [25] apply k-means clustering and consequent center training. From a practical point of view, however, all these are fairly unpractical during test time. For the computation of each feature map in a net, the original weight matrix must be reconstructed from the indexes in the matrix and a codebook that contains all the original weights. This is an expensive operation and this is why some studies propose a different approach than set quantization. Precision quantization simply reduces the bit size per weight. This has a great advantage over set quantization at inference time since feature maps can simply be computed with less precision weights. Several studies show that this has little to no effect on network accuracy when using 16bit weights [47, 22, 12, 68, 9]. Somewhat orthogonal to the above discussion but certainly relevant are approaches that customize the implementation of CNNs for hardware limited devices[30, 4, 60]. 4 Bayesian compression with scale mixtures of normals Consider the following prior over a parameter w where its scale z is governed by a distribution p(z): z ∼p(z); w ∼N(w; 0, z2), (3) with z2 serving as the variance of the zero-mean normal distribution over w. By treating the scales of w as random variables we can recover marginal prior distributions over the parameters that have heavier tails and more mass at zero; this subsequently biases the posterior distribution over w to be sparse. This family of distributions is known as scale-mixtures of normals [6, 2] and it is quite general, as a lot of well known sparsity inducing distributions are special cases. One example of the aforementioned framework is the spike-and-slab distribution [48], the golden standard for sparse Bayesian inference. Under the spike-and-slab, the mixing density of the scales is a Bernoulli distribution, thus the marginal p(w) has a delta “spike” at zero and a continuous “slab” over the real line. Unfortunately, this prior leads to a computationally expensive inference since we have to explore a space of 2M models, where M is the number of the model parameters. Dropout [28, 64], one of the most popular regularization techniques for neural networks, can be interpreted as positing a spike and slab distribution over the weights where the variance of the “slab” is zero [17, 43]. Another example is the Laplace distribution which arises by considering p(z2) = Exp(λ). The mode of the posterior distribution under a Laplace prior is known as the Lasso [66] estimator and has been previously used for sparsifying neural networks at [70, 59]. While computationally simple, the Lasso estimator is prone to “shrinking" large signals [8] and only provides point estimates about the parameters. As a result it does not provide uncertainty estimates, it can potentially overfit and, according to the bits-back argument, is inefficient for compression. For these reasons, in this paper we will tackle the problem of compression and efficiency in neural networks by adopting a Bayesian treatment and inferring an approximate posterior distribution over the parameters under a scale mixture prior. We will consider two choices for the prior over the scales p(z); the hyperparameter free log-uniform prior [16, 35] and the half-Cauchy prior, which results into a horseshoe [8] distribution. Both of these distributions correspond to a continuous relaxation of the spike-and-slab prior and we provide a brief discussion on their shrinkage properties at Appendix C. 3 4.1 Reparametrizing variational dropout for group sparsity One potential choice for p(z) is the improper log-uniform prior [35]: p(z) ∝|z|−1. It turns out that we can recover the log-uniform prior over the weights w if we marginalize over the scales z: p(w) ∝ Z 1 |z|N(w|0, z2)dz = 1 |w|. (4) This alternative parametrization of the log uniform prior is known in the statistics literature as the normal-Jeffreys prior and has been introduced by [16]. This formulation allows to “couple" the scales of weights that belong to the same group (e.g. neuron or feature map), by simply sharing the corresponding scale variable z in the joint prior3: p(W, z) ∝ A Y i 1 |zi| A,B Y ij N(wij|0, z2 i ), (5) where W is the weight matrix of a fully connected neural network layer with A being the dimensionality of the input and B the dimensionality of the output. Now consider performing variational inference with a joint approximate posterior parametrized as follows: qφ(W, z) = A Y i=1 N(zi|µzi, µ2 ziαi) A,B Y i,j N(wij|ziµij, z2 i σ2 ij), (6) where αi is the dropout rate [64, 35, 49] of the given group. As explained at [35, 49], the multiplicative parametrization of the approximate posterior over z suffers from high variance gradients; therefore we will follow [49] and re-parametrize it in terms of σ2 zi = µ2 ziαi, hence optimize w.r.t. σ2 zi. The lower bound under this prior and approximate posterior becomes: L(φ) = Eqφ(z)qφ(W|z)[log p(D|W)] −Eqφ(z)[KL(qφ(W|z)||p(W|z))] −KL(qφ(z)||p(z)). (7) Under this particular variational posterior parametrization the negative KL-divergence from the conditional prior p(W|z) to the approximate posterior qφ(W|z) is independent of z: KL(qφ(W|z)||p(W|z)) = 1 2 A,B X i,j log z2 i z2 i σ2 ij + z2 i σ2 ij z2 i + z2 i µ2 ij z2 i −1 . (8) This independence can be better understood if we consider a non-centered parametrization of the prior [53]. More specifically, consider reparametrizing the weights as ˜wij = wij zi ; this will then result into p(W|z)p(z) = p( ˜ W)p(z), where p( ˜ W) = Q i,j N( ˜wij|0, 1) and W = diag(z) ˜ W. Now if we perform variational inference under the p( ˜ W)p(z) prior with an approximate posterior that has the form of qφ( ˜ W, z) = qφ( ˜ W)qφ(z), with qφ( ˜ W) = Q i,j N( ˜wij|µij, σ2 ij), then we see that we arrive at the same expressions for the negative KL-divergence from the prior to the approximate posterior. Finally, the negative KL-divergence from the normal-Jeffreys scale prior p(z) to the Gaussian variational posterior qφ(z) depends only on the “implied” dropout rate, αi = σ2 zi/µ2 zi, and takes the following form [49]: −KL(qφ(z)||p(z)) ≈ A X i k1σ(k2 + k3 log αi) −0.5m(−log αi) −k1 , (9) where σ(·), m(·) are the sigmoid and softplus functions respectively4 and k1 = 0.63576, k2 = 1.87320, k3 = 1.48695. We can now prune entire groups of parameters by simply specifying a threshold for the variational dropout rate of the corresponding group, e.g. log αi = (log σ2 zi −log µ2 zi) ≥t. It should be mentioned that this prior parametrization readily allows for a more flexible marginal posterior over the weights as we now have a compound distribution, qφ(W) = R qφ(W|z)qφ(z)dz; this is in contrast to the original parametrization and the Gaussian approximations employed by [35, 49]. 3Stricly speaking the result of eq. 4 only holds when each weight has its own scale and not when that scale is shared across multiple weights. Nevertheless, in practice we obtain a prior that behaves in a similar way, i.e. it biases the variational posterior to be sparse. 4σ(x) = (1 + exp(−x))−1, m(x) = log(1 + exp(x)) 4 Furthermore, this approach generalizes the low variance additive parametrization of variational dropout proposed for weight sparsity at [49] to group sparsity (which was left as an open question at [49]) in a principled way. At test time, in order to have a single feedforward pass we replace the distribution over W at each layer with a single weight matrix, the masked variational posterior mean: ˆ W = diag(m) Eq(z)q( ˜ W)[diag(z) ˜ W] = diag m ⊙µz MW , (10) where m is a binary mask determined according to the group variational dropout rate and MW are the means of qφ( ˜ W). We further use the variational posterior marginal variances5 for this particular posterior approximation: V(wij)NJ = σ2 zi σ2 ij + µ2 ij + σ2 ijµ2 zi, (11) to asess the bit precision of each weight in the weight matrix. More specifically, we employed the mean variance across the weight matrix ˆ W to compute the unit round off necessary to represent the weights. This method will give us the amount significant bits, and by adding 3 exponent and 1 sign bits we arrive at the final bit precision for the entire weight matrix ˆ W6. We provide more details at Appendix B. 4.2 Group horseshoe with half-Cauchy scale priors Another choice for p(z) is a proper half-Cauchy distribution: C+(0, s) = 2(sπ(1 + (z/s)2))−1; it induces a horseshoe prior [8] distribution over the weights, which is a well known sparsity inducing prior in the statistics literature. More formally, the prior hierarchy over the weights is expressed as (in a non-centered parametrization): s ∼C+(0, τ0); ˜zi ∼C+(0, 1); ˜wij ∼N(0, 1); wij = ˜wij ˜zis, (12) where τ0 is the free parameter that can be tuned for specific desiderata. The idea behind the horseshoe is that of the “global-local" shrinkage; the global scale variable s pulls all of the variables towards zero whereas the heavy tailed local variables zi can compensate and allow for some weights to escape. Instead of directly working with the half-Cauchy priors we will employ a decomposition of the half-Cauchy that relies upon (inverse) gamma distributions [52] as this will allow us to compute the negative KL-divergence from the scale prior p(z) to an approximate log-normal scale posterior qφ(z) in closed form (the derivation is given in Appendix D). More specifically, we have that the half-Cauchy prior can be expressed in a non-centered parametrization as: p(˜β) = IG(0.5, 1); p(˜α) = G(0.5, k2); z2 = ˜α˜β, (13) where IG(·, ·), G(·, ·) correspond to the inverse Gamma and Gamma distributions in the scale parametrization, and z follows a half-Cauchy distribution with scale k. Therefore we will re-express the whole hierarchy as: sb ∼IG(0.5, 1); sa ∼G(0.5, τ 2 0 ); ˜βi ∼IG(0.5, 1); ˜αi ∼G(0.5, 1); ˜wij ∼N(0, 1); wij = ˜wij q sasb˜αi ˜βi. (14) It should be mentioned that the improper log-uniform prior is the limiting case of the horseshoe prior when the shapes of the (inverse) Gamma hyperpriors on ˜αi, ˜βi go to zero [8]. In fact, several well known shrinkage priors can be expressed in this form by altering the shapes of the (inverse) Gamma hyperpriors [3]. For the variational posterior we will employ the following mean field approximation: qφ(sb, sa, ˜β) = LN(sb|µsb, σ2 sb)LN(sa|µsa, σ2 sa) A Y i LN(˜βi|µ ˜βi, σ2 ˜βi) (15) qφ(˜α, ˜ W) = A Y i LN(˜αi|µ˜αi, σ2 ˜αi) A,B Y i,j N( ˜wij|µ ˜ wij, σ2 ˜ wij), (16) 5V(wij) = V(zi ˜wij) = V(zi) E[ ˜wij]2 + V( ˜wij) + V( ˜wij) E[zi]2. 6Notice that the fact that we are using mean-field variational approximations (which we chose for simplicity) can potentially underestimate the variance, thus lead to higher bit precisions for the weights. We leave the exploration of more involved posteriors for future work. 5 where LN(·, ·) is a log-normal distribution. It should be mentioned that a similar form of noncentered variational inference for the horseshoe has been also successfully employed for undirected models at [32]. Notice that we can also apply local reparametrizations [35] when we are sampling q ˜αi ˜βi and √sasb by exploiting properties of the log-normal distribution7 and thus forming the implied: ˜zi = q ˜αi ˜βi ∼LN(µ˜zi, σ2 ˜zi); s = √sasb ∼LN(µs, σ2 s) (17) µ˜zi = 1 2(µ˜αi + µ ˜βi); σ2 ˜zi = 1 4(σ2 ˜αi + σ2 ˜βi); µs = 1 2(µsa + µsb); σ2 s = 1 4(σ2 sa + σ2 sb). (18) As a threshold rule for group pruning we will use the negative log-mode8 of the local log-normal r.v. zi = s˜zi, i.e. prune when (σ2 zi −µzi) ≥t, with µzi = µ˜zi + µs and σ2 zi = σ2 ˜zi + σ2 s.This ignores dependencies among the zi elements induced by the common scale s, but nonetheless we found that it works well in practice. Similarly with the group normal-Jeffreys prior, we will replace the distribution over W at each layer with the masked variational posterior mean during test time: ˆ W = diag(m) Eq(z)q( ˜ W)[diag(z) ˜ W] = diag m ⊙exp(µz + 1 2σ2 z) MW , (19) where m is a binary mask determined according to the aforementioned threshold, MW are the means of q( ˜ W) and µz, σ2 z are the means and variances of the local log-normals over zi. Furthermore, similarly to the group normal-Jeffreys approach, we will use the variational posterior marginal variances: V(wij)HS = (exp(σ2 zi) −1) exp(2µzi + σ2 zi) σ2 ij + µ2 ij + σ2 ij exp(2µzi + σ2 zi), (20) to compute the final bit precision for the entire weight matrix ˆ W. 5 Experiments We validated the compression and speed-up capabilities of our models on the well-known architectures of LeNet-300-100 [39], LeNet-5-Caffe9 on MNIST [40] and, similarly with [49], VGG [61]10 on CIFAR 10 [36]. The groups of parameters were constructed by coupling the scale variables for each filter for the convolutional layers and for each input neuron for the fully connected layers. We provide the algorithms that describe the forward pass using local reparametrizations for fully connected and convolutional layers with each of the employed approximate posteriors at appendix F. For the horseshoe prior we set the scale τ0 of the global half-Cauchy prior to a reasonably small value, e.g. τ0 = 1e −5. This further increases the prior mass at zero, which is essential for sparse estimation and compression. We also found that constraining the standard deviations as described at [44] and “warm-up" [62] helps in avoiding bad local optima of the variational objective. Further details about the experimental setup can be found at Appendix A. Determining the threshold for pruning can be easily done with manual inspection as usually there are two well separated clusters (signal and noise). We provide a sample visualization at Appendix E. 5.1 Architecture learning & bit precisions We will first demonstrate the group sparsity capabilities of our methods by illustrating the learned architectures at Table 1, along with the inferred bit precision per layer. As we can observe, our methods infer significantly smaller architectures for the LeNet-300-100 and LeNet-5-Caffe, compared to Sparse Variational Dropout, Generalized Dropout and Group Lasso. Interestingly, we observe that for the VGG network almost all of big 512 feature map layers are drastically reduced to around 10 feature maps whereas the initial layers are mostly kept intact. Furthermore, all of the Bayesian methods considered require far fewer than the standard 32 bits per-layer to represent the weights, sometimes even allowing for 5 bit precisions. 7The product of log-normal r.v.s is another log-normal and a power of a log-normal r.v. is another log-normal. 8Empirically, it slightly better separates the scales compared to the negative log-mean −(µzi + 0.5σ2 zi). 9https://github.com/BVLC/caffe/tree/master/examples/mnist 10The adapted CIFAR 10 version described at http://torch.ch/blog/2015/07/30/cifar.html. 6 Table 1: Learned architectures with Sparse VD [49], Generalized Dropout (GD) [63] and Group Lasso (GL) [70]. Bayesian Compression (BC) with group normal-Jeffreys (BC-GNJ) and group horseshoe (BC-GHS) priors correspond to the proposed models. We show the amount of neurons left after pruning along with the average bit precisions for the weights at each layer. Network & size Method Pruned architecture Bit-precision LeNet-300-100 Sparse VD 512-114-72 8-11-14 784-300-100 BC-GNJ 278-98-13 8-9-14 BC-GHS 311-86-14 13-11-10 LeNet-5-Caffe Sparse VD 14-19-242-131 13-10-8-12 GD 7-13-208-16 20-50-800-500 GL 3-12-192-500 BC-GNJ 8-13-88-13 18-10-7-9 BC-GHS 5-10-76-16 10-10–14-13 VGG BC-GNJ 63-64-128-128-245-155-6310-10-10-10-8-8-8-26-24-20-14-12-11-11-15 -5-5-5-5-5-6-7-11 (2× 64)-(2× 128)BC-GHS 51-62-125-128-228-129-3811-12-9-14-10-8-5-(3×256)-(8× 512) -13-9-6-5-6-6-6-20 -5-6-6-6-8-11-17-10 5.2 Compression Rates For the actual compression task we compare our method to current work in three different scenarios: (i) compression achieved only by pruning, here, for non-group methods we use the CSC format to store parameters; (ii) compression based on the former but with reduced bit precision per layer (only for the weights); and (iii) the maximum compression rate as proposed by [25]. We believe Table 2: Compression results for our methods. “DC” corresponds to Deep Compression method introduced at [25], “DNS” to the method of [21] and “SWS” to the Soft-Weight Sharing of [67]. Numbers marked with * are best case guesses. Compression Rates (Error %) Model Fast Maximum Original Error % Method |w̸=0| |w| % Pruning Prediction Compression LeNet-300-100 DC 8.0 6 (1.6) 40 (1.6) DNS 1.8 28* (2.0) 1.6 SWS 4.3 12* (1.9) 64(1.9) Sparse VD 2.2 21(1.8) 84(1.8) 113 (1.8) BC-GNJ 10.8 9(1.8) 36(1.8) 58(1.8) BC-GHS 10.6 9(1.8) 23(1.9) 59(2.0) LeNet-5-Caffe DC 8.0 6*(0.7) 39(0.7) DNS 0.9 55*(0.9) 108(0.9) 0.9 SWS 0.5 100*(1.0) 162(1.0) Sparse VD 0.7 63(1.0) 228(1.0) 365(1.0) BC-GNJ 0.9 108(1.0) 361(1.0) 573(1.0) BC-GHS 0.6 156(1.0) 419(1.0) 771(1.0) VGG BC-GNJ 6.7 14(8.6) 56(8.8) 95(8.6) 8.4 BC-GHS 5.5 18(9.0) 59(9.0) 116(9.2) these to be relevant scenarios because (i) can be applied with already existing frameworks such as Tensorflow [1], (ii) is a practical scheme given upcoming GPUs and frameworks will be designed to work with low and mixed precision arithmetics [41, 23]. For (iii), we perform k-means clustering on the weights with k=32 and consequently store a weight index that points to a codebook of available 7 weights. Note that the latter achieves highest compression rate but it is however fairly unpractical at test time since the original matrix needs to be restored for each layer. As we can observe at Table 2, our methods are competitive with the state-of-the art for LeNet-300-100 while offering significantly better compression rates on the LeNet-5-Caffe architecture, without any loss in accuracy. Do note that group sparsity and weight sparsity can be combined so as to further prune some weights when a particular group is not removed, thus we can potentially further boost compression performance at e.g. LeNet-300-100. For the VGG network we observe that training from a random initialization yielded consistently less accuracy (around 1%-2% less) compared to initializing the means of the approximate posterior from a pretrained network, similarly with [49], thus we only report the latter results11. After initialization we trained the VGG network regularly for 200 epochs using Adam with the default hyperparameters. We observe a small drop in accuracy for the final models when using the deterministic version of the network for prediction, but nevertheless averaging across multiple samples restores the original accuracy. Note, that in general we can maintain the original accuracy on VGG without sampling by simply finetuning with a small learning rate, as done at [49]. This will still induce (less) sparsity but unfortunately it does not lead to good compression as the bit precision remains very high due to not appropriately increasing the marginal variances of the weights. 5.3 Speed and energy consumption We demonstrate that our method is competitive with [70], denoted as GL, a method that explicitly prunes convolutional kernels to reduce compute time. We measure the time and energy consumption of one forward pass of a mini-batch with batch size 8192 through LeNet-5-Caffe. We average over 104 forward passes and all experiments were run with Tensorflow 1.0.1, cuda 8.0 and respective cuDNN. We apply 16 CPUs run in parallel (CPU) or a Titan X (GPU). Note that we only use the pruned architecture as lower bit precision would further increase the speed-up but is not implementable in any common framework. Further, all methods we compare to in the latter experiments would barely show an improvement at all since they do not learn to prune groups but only parameters. In figure 1 we present our results. As to be expected the largest effect on the speed up is caused by GPU usage. However, both our models and best competing models reach a speed up factor of around 8×. We can further save about 3 × energy costs by applying our architecture instead of the original one on a GPU. For larger networks the speed-up is even higher: for the VGG experiments with batch size 256 we have a speed-up factor of 51×. Figure 1: Left: Avg. Time a batch of 8192 samples takes to pass through LeNet-5-Caffe. Numbers on top of the bars represent speed-up factor relative to the CPU implementation of the original network. Right: Energy consumption of the GPU of the same process (when run on GPU). 6 Conclusion We introduced Bayesian compression, a way to tackle efficiency and compression in deep neural networks in a unified and principled way. Our proposed methods allow for theoretically principled compression of neural networks, improved energy efficiency with reduced computation while naturally learning the bit precisions for each weight. This serves as a strong argument in favor of Bayesian methods for neural networks, when we are concerned with compression and speed up. 11We also tried to finetune the same network with Sparse VD, but unfortunately it increased the error considerably (around 3% extra error), therefore we do not report those results. 8 Acknowledgments We would like to thank Dmitry Molchanov, Dmitry Vetrov, Klamer Schutte and Dennis Koelma for valuable discussions and feedback. This research was supported by TNO, NWO and Google. References [1] M. Abadi, A. Agarwal, P. Barham, E. Brevdo, Z. Chen, C. Citro, G. S. Corrado, A. Davis, J. Dean, M. Devin, et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467, 2016. [2] D. F. Andrews and C. L. Mallows. Scale mixtures of normal distributions. Journal of the Royal Statistical Society. Series B (Methodological), pages 99–102, 1974. [3] A. Armagan, M. Clyde, and D. B. Dunson. Generalized beta mixtures of gaussians. In Advances in neural information processing systems, pages 523–531, 2011. [4] E. Azarkhish, D. Rossi, I. Loi, and L. Benini. Neurostream: Scalable and energy efficient deep learning with smart memory cubes. arXiv preprint arXiv:1701.06420, 2017. [5] J. Ba and R. Caruana. Do deep nets really need to be deep? In Advances in neural information processing systems, pages 2654–2662, 2014. [6] E. Beale, C. Mallows, et al. Scale mixing of symmetric distributions with zero means. The Annals of Mathematical Statistics, 30(4):1145–1151, 1959. [7] C. Blundell, J. Cornebise, K. Kavukcuoglu, and D. Wierstra. Weight uncertainty in neural networks. Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, Lille, France, 6-11 July 2015, 2015. [8] C. M. Carvalho, N. G. Polson, and J. G. Scott. The horseshoe estimator for sparse signals. Biometrika, 97 (2):465–480, 2010. [9] S. Chai, A. Raghavan, D. Zhang, M. Amer, and T. Shields. Low precision neural networks using subband decomposition. arXiv preprint arXiv:1703.08595, 2017. [10] W. Chen, J. T. Wilson, S. Tyree, K. Q. Weinberger, and Y. Chen. Compressing convolutional neural networks. arXiv preprint arXiv:1506.04449, 2015. [11] M. Courbariaux and Y. Bengio. Binarynet: Training deep neural networks with weights and activations constrained to +1 or −1. arXiv preprint arXiv:1602.02830, 2016. [12] M. Courbariaux, J.-P. David, and Y. Bengio. Training deep neural networks with low precision multiplications. arXiv preprint arXiv:1412.7024, 2014. [13] M. Courbariaux, Y. Bengio, and J.-P. David. Binaryconnect: Training deep neural networks with binary weights during propagations. In Advances in Neural Information Processing Systems, pages 3105–3113, 2015. [14] M. Denil, B. Shakibi, L. Dinh, N. de Freitas, et al. Predicting parameters in deep learning. In Advances in Neural Information Processing Systems, pages 2148–2156, 2013. [15] X. Dong, J. Huang, Y. Yang, and S. Yan. More is less: A more complicated network with less inference complexity. arXiv preprint arXiv:1703.08651, 2017. [16] M. A. Figueiredo. Adaptive sparseness using jeffreys’ prior. Advances in neural information processing systems, 1:697–704, 2002. [17] Y. Gal and Z. Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. ICML, 2016. [18] Y. Gong, L. Liu, M. Yang, and L. Bourdev. Compressing deep convolutional networks using vector quantization. ICLR, 2015. [19] A. Graves. Practical variational inference for neural networks. In Advances in Neural Information Processing Systems, pages 2348–2356, 2011. [20] P. D. Grünwald. The minimum description length principle. MIT press, 2007. [21] Y. Guo, A. Yao, and Y. Chen. Dynamic network surgery for efficient dnns. In Advances In Neural Information Processing Systems, pages 1379–1387, 2016. [22] S. Gupta, A. Agrawal, K. Gopalakrishnan, and P. Narayanan. Deep learning with limited numerical precision. CoRR, abs/1502.02551, 392, 2015. [23] P. Gysel. Ristretto: Hardware-oriented approximation of convolutional neural networks. Master’s thesis, University of California, 2016. 9 [24] S. Han, J. Pool, J. Tran, and W. Dally. Learning both weights and connections for efficient neural networks. In Advances in Neural Information Processing Systems, pages 1135–1143, 2015. [25] S. Han, H. Mao, and W. J. Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. ICLR, 2016. [26] G. Hinton, O. Vinyals, and J. Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. [27] G. E. Hinton and D. Van Camp. Keeping the neural networks simple by minimizing the description length of the weights. In Proceedings of the sixth annual conference on Computational learning theory, pages 5–13. ACM, 1993. [28] G. E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever, and R. R. Salakhutdinov. Improving neural networks by preventing co-adaptation of feature detectors. arXiv preprint arXiv:1207.0580, 2012. [29] A. Honkela and H. Valpola. Variational learning and bits-back coding: an information-theoretic view to bayesian learning. IEEE Transactions on Neural Networks, 15(4):800–810, 2004. [30] A. G. Howard, M. Zhu, B. Chen, D. Kalenichenko, W. Wang, T. Weyand, M. Andreetto, and H. Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017. [31] F. N. Iandola, S. Han, M. W. Moskewicz, K. Ashraf, W. J. Dally, and K. Keutzer. Squeezenet: Alexnet-level accuracy with 50x fewer parameters and< 0.5 mb model size. ICLR, 2017. [32] J. B. Ingraham and D. S. Marks. Bayesian sparsity for intractable distributions. arXiv preprint arXiv:1602.03807, 2016. [33] T. Karaletsos and G. Rätsch. Automatic relevance determination for deep generative models. arXiv preprint arXiv:1505.07765, 2015. [34] D. P. Kingma and M. Welling. Auto-encoding variational bayes. International Conference on Learning Representations (ICLR), 2014. [35] D. P. Kingma, T. Salimans, and M. Welling. Variational dropout and the local reparametrization trick. Advances in Neural Information Processing Systems, 2015. [36] A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images, 2009. [37] N. D. Lawrence. Note relevance determination. In Neural Nets WIRN Vietri-01, pages 128–133. Springer, 2002. [38] Y. LeCun, J. S. Denker, S. A. Solla, R. E. Howard, and L. D. Jackel. Optimal brain damage. In NIPs, volume 2, pages 598–605, 1989. [39] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. [40] Y. LeCun, C. Cortes, and C. J. Burges. The mnist database of handwritten digits, 1998. [41] D. D. Lin and S. S. Talathi. Overcoming challenges in fixed point training of deep convolutional networks. Workshop ICML, 2016. [42] D. D. Lin, S. S. Talathi, and V. S. Annapureddy. Fixed point quantization of deep convolutional networks. arXiv preprint arXiv:1511.06393, 2015. [43] C. Louizos. Smart regularization of deep architectures. Master’s thesis, University of Amsterdam, 2015. [44] C. Louizos and M. Welling. Multiplicative Normalizing Flows for Variational Bayesian Neural Networks. ArXiv e-prints, Mar. 2017. [45] D. J. MacKay. Probable networks and plausible predictions—a review of practical bayesian methods for supervised neural networks. Network: Computation in Neural Systems, 6(3):469–505, 1995. [46] N. Mellempudi, A. Kundu, D. Mudigere, D. Das, B. Kaul, and P. Dubey. Ternary neural networks with fine-grained quantization. arXiv preprint arXiv:1705.01462, 2017. [47] P. Merolla, R. Appuswamy, J. Arthur, S. K. Esser, and D. Modha. Deep neural networks are robust to weight binarization and other non-linear distortions. arXiv preprint arXiv:1606.01981, 2016. [48] T. J. Mitchell and J. J. Beauchamp. Bayesian variable selection in linear regression. Journal of the American Statistical Association, 83(404):1023–1032, 1988. [49] D. Molchanov, A. Ashukha, and D. Vetrov. Variational dropout sparsifies deep neural networks. arXiv preprint arXiv:1701.05369, 2017. [50] E. Nalisnick, A. Anandkumar, and P. Smyth. A scale mixture perspective of multiplicative noise in neural networks. arXiv preprint arXiv:1506.03208, 2015. [51] R. M. Neal. Bayesian learning for neural networks. PhD thesis, Citeseer, 1995. 10 [52] S. E. Neville, J. T. Ormerod, M. Wand, et al. Mean field variational bayes for continuous sparse signal shrinkage: pitfalls and remedies. Electronic Journal of Statistics, 8(1):1113–1151, 2014. [53] O. Papaspiliopoulos, G. O. Roberts, and M. Sköld. A general framework for the parametrization of hierarchical models. Statistical Science, pages 59–73, 2007. [54] C. Peterson. A mean field theory learning algorithm for neural networks. Complex systems, 1:995–1019, 1987. [55] M. Rastegari, V. Ordonez, J. Redmon, and A. Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. In European Conference on Computer Vision, pages 525–542. Springer, 2016. [56] D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In Proceedings of the 31th International Conference on Machine Learning, ICML 2014, Beijing, China, 21-26 June 2014, pages 1278–1286, 2014. [57] J. Rissanen. Modeling by shortest data description. Automatica, 14(5):465–471, 1978. [58] J. Rissanen. Stochastic complexity and modeling. The annals of statistics, pages 1080–1100, 1986. [59] S. Scardapane, D. Comminiello, A. Hussain, and A. Uncini. Group sparse regularization for deep neural networks. arXiv preprint arXiv:1607.00485, 2016. [60] S. Shi and X. Chu. Speeding up convolutional neural networks by exploiting the sparsity of rectifier units. arXiv preprint arXiv:1704.07724, 2017. [61] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. ICLR, 2015. [62] C. K. Sønderby, T. Raiko, L. Maaløe, S. K. Sønderby, and O. Winther. Ladder variational autoencoders. arXiv preprint arXiv:1602.02282, 2016. [63] S. Srinivas and R. V. Babu. Generalized dropout. arXiv preprint arXiv:1611.06791, 2016. [64] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research, 15(1):1929–1958, 2014. [65] V. Sze, Y.-H. Chen, T.-J. Yang, and J. Emer. Efficient processing of deep neural networks: A tutorial and survey. arXiv preprint arXiv:1703.09039, 2017. [66] R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society. Series B (Methodological), pages 267–288, 1996. [67] K. Ullrich, E. Meeds, and M. Welling. Soft weight-sharing for neural network compression. ICLR, 2017. [68] G. Venkatesh, E. Nurvitadhi, and D. Marr. Accelerating deep convolutional networks using low-precision and sparsity. arXiv preprint arXiv:1610.00324, 2016. [69] C. S. Wallace. Classification by minimum-message-length inference. In International Conference on Computing and Information, pages 72–81. Springer, 1990. [70] W. Wen, C. Wu, Y. Wang, Y. Chen, and H. Li. Learning structured sparsity in deep neural networks. In Advances In Neural Information Processing Systems, pages 2074–2082, 2016. [71] T.-J. Yang, Y.-H. Chen, and V. Sze. Designing energy-efficient convolutional neural networks using energy-aware pruning. CVPR, 2017. [72] C. Zhu, S. Han, H. Mao, and W. J. Dally. Trained ternary quantization. ICLR, 2017. 11 | 2017 | 271 |
6,754 | Is Input Sparsity Time Possible for Kernel Low-Rank Approximation? Cameron Musco MIT cnmusco@mit.edu David P. Woodruff Carnegie Mellon University dwoodruf@cs.cmu.edu Abstract Low-rank approximation is a common tool used to accelerate kernel methods: the n⇥n kernel matrix K is approximated via a rank-k matrix ˜K which can be stored in much less space and processed more quickly. In this work we study the limits of computationally efficient low-rank kernel approximation. We show that for a broad class of kernels, including the popular Gaussian and polynomial kernels, computing a relative error k-rank approximation to K is at least as difficult as multiplying the input data matrix A 2 Rn⇥d by an arbitrary matrix C 2 Rd⇥k. Barring a breakthrough in fast matrix multiplication, when k is not too large, this requires ⌦(nnz(A)k) time where nnz(A) is the number of non-zeros in A. This lower bound matches, in many parameter regimes, recent work on subquadratic time algorithms for low-rank approximation of general kernels [MM16, MW17], demonstrating that these algorithms are unlikely to be significantly improved, in particular to O(nnz(A)) input sparsity runtimes. At the same time there is hope: we show for the first time that O(nnz(A)) time approximation is possible for general radial basis function kernels (e.g., the Gaussian kernel) for the closely related problem of low-rank approximation of the kernelized dataset. 1 Introduction The kernel method is a popular technique used to apply linear learning and classification algorithms to datasets with nonlinear structure. Given training input points a1, ..., an 2 Rd, the idea is to replace the standard Euclidean dot product hai, aji = aT i aj with the kernel dot product (ai, aj), where : Rd ⇥Rd ! R+ is some positive semidefinite function. Popular kernel functions include e.g., the Gaussian kernel with (ai, aj) = e−kai−ajk2/σ for some bandwidth parameter σ and the polynomial kernel of degree q with (ai, aj) = (c + aT i aj)q for some parameter c. Throughout this work, we focus on kernels where (ai, aj) is a function of the dot products aT i ai = kaik2, aT j aj = kajk2, and aT i aj. Such functions encompass many kernels used in practice, including the Gaussian kernel, the Laplace kernel, the polynomial kernel, and the Matern kernels. Letting F be the reproducing kernel Hilbert space associated with (·, ·), we can write (ai, aj) = hφ(ai), φ(aj)i where φ : Rd ! F is a typically non-linear feature map. We let Φ = [φ(a1), ..., φ(an)]T denote the kernelized dataset, whose ith row is the kernelized datapoint φ(ai). There is no requirement that Φ can be efficiently computed or stored – for example, in the case of the Gaussian kernel, F is an infinite dimensional space. Thus, kernel methods typically work with the kernel matrix K 2 Rn⇥n with Ki,j = (ai, aj). We will also sometimes denote K = { (ai, aj)} to make it clear which kernel function it is generated by. We can equivalently write K = ΦΦT . As long as all operations of an algorithm only access Φ via the dot products between its rows, they can thus be implemented using just K without explicitly computing the feature map. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Unfortunately computing K is expensive, and a bottleneck for scaling kernel methods to large datasets. For the kernels we consider, where depends on dot products between the input points, we must at least compute the Gram matrix AAT , requiring ⇥(n2d) time in general. Even if A is sparse, this takes ⇥(nnz(A)n) time. Storing K then takes ⇥(n2) space, and processing it for downstream applications like kernel ridge regression and kernel SVM can be even more expensive. 1.1 Low-rank kernel approximation For this reason, a vast body of work studies how to efficiently approximate K via a low-rank surrogate ˜K [SS00, AMS01, WS01, FS02, RR07, ANW14, LSS13, BJ02, DM05, ZTK08, BW09, CKS11, WZ13, GM13]. If ˜K is rank-k, it can be stored in factored form in O(nk) space and operated on quickly – e.g., it can be inverted in just O(nk2) time to solve kernel ridge regression. One possibility is to set ˜K = Kk where Kk is K’s best k-rank approximation – the projection onto its top k eigenvectors. Kk minimizes, over all rank-k ˜K, the error kK −˜KkF , where kMkF is the Frobenius norm: (P i,j M 2 i,j)1/2. It in fact minimizes error under any unitarily invariant norm, e.g., the popular spectral norm. Unfortunately, Kk is prohibitively expensive to compute, requiring ⇥(n3) time in practice, or n! in theory using fast matrix multiplication, where ! ⇡2.373 [LG14]. The idea of much prior work on low-rank kernel approximation is to find ˜K which is nearly as good as Kk, but can be computed much more quickly. Specifically, it is natural to ask for ˜K fulfilling the following relative error guarantee for some parameter ✏> 0: kK −˜KkF (1 + ✏)kK −KkkF . (1) Other goals, such as nearly matching the spectral norm error kK −Kkk or approximating K entrywise have also been considered [RR07, GM13]. Of particular interest to our results is the closely related goal of outputting an orthonormal basis Z 2 Rn⇥k satisfying for any Φ with ΦΦT = K: kΦ −ZZT ΦkF (1 + ✏)kΦ −ΦkkF . (2) (2) can be viewed as a Kernel PCA guarantee – its asks us to find a low-rank subspace Z such that the projection of our kernelized dataset Φ onto Z nearly optimally approximates this dataset. Given Z, we can approximate K using ˜K = ZZT ΦΦT ZZT = ZZT KZZT . Alternatively, letting P be the projection onto the row span of ZZT Φ, we can write ˜K = ΦPΦT , which can be computed efficiently, for example, when P is a projection onto a subset of the kernelized datapoints [MM16]. 1.2 Fast algorithms for relative-error kernel approximation Until recently, all algorithms achieving the guarantees of (1) and (2) were at least as expensive as computing the full matrix K, which was needed to compute the low-rank approximation [GM13]. However, recent work has shown that this is not required. Avron, Nguyen, and Woodruff [ANW14] demonstrate that for the polynomial kernel, Z satisfying (2) can be computed in O(nnz(A)q) + n poly(3qk/✏) time for a polynomial kernel with degree q. Musco and Musco [MM16] give a fast algorithm for any kernel, using recursive Nyström sampling, which computes ˜K (in factored form) satisfying kK −˜Kk λ, for input parameter λ. With the proper setting of λ, it can output Z satisfying (2) (see Section C.3 of [MM16]). Computing Z requires evaluating ˜O(k/✏) columns of the kernel matrix along with ˜O(n(k/✏)!−1) additional time for other computations. Assuming the kernel is a function of the dot products between the input points, the kernel evaluations require ˜O(nnz(A)k/✏) time. The results of [MM16] can also be used to compute ˜K satisfying (1) with ✏= pn in ˜O(nnz(A)k + nk!−1) time (see Appendix A of [MW17]). Woodruff and Musco [MW17] show that for any kernel, and for any ✏> 0, it is possible to achieve (1) in ˜O(nnz(A)k/✏)+n poly(k/✏) time plus the time needed to compute an ˜O( p nk/✏2)⇥ ˜O( p nk/✏) submatrix of K. If A has uniform row sparsity – i.e., nnz(ai) c nnz(A)/n for some constant c and all i, this step can be done in ˜O(nnz(A)k/✏2.5) time. Alternatively, if d ( p nk/✏2)↵ for ↵< .314 this can be done in ˜O(nk/✏4) = ˜O(nnz(A)k/✏4) time using fast rectangular matrix multiplication [LG12, GU17] (assuming that there are no all zero data points so n nnz(A).) 2 1.3 Our results The algorithms of [MM16, MW17] make significant progress in efficiently solving (1) and (2) for general kernel matrices. They demonstrate that, surprisingly, a relative-error low-rank approximation can be computed significantly faster than the time required to write down all of K. A natural question is if these results can be improved. Even ignoring ✏dependencies and typically lower order terms, both algorithms use ⌦(nnz(A)k) time. One might hope to improve this to input sparsity, or near input sparsity time, ˜O(nnz(A)), which is known for computing a low-rank approximation of A itself [CW13]. The work of Avron et al. affirms that this is possible for the kernel PCA guarantee of (2) for degree-q polynomial kernels, for constant q. Can this result be extended to other popular kernels, or even more general classes? 1.3.1 Lower bounds We show that achieving the guarantee of (1) significantly more efficiently than the work of [MM16, MW17] is likely very difficult. Specifically, we prove that for a wide class of kernels, the kernel low-rank approximation problem is as hard as multiplying the input A 2 Rn⇥d by an arbitrary C 2 Rd⇥k. We have the following result for some common kernels to which our techniques apply: Theorem 1 (Hardness for low-rank kernel approximation). Consider any polynomial kernel (mi, mj) = (c + mT i mj)q, Gaussian kernel (mi, mj) = e−kmi−mjk2/σ, or the linear kernel (mi, mj) = mT i mj. Assume there is an algorithm which given M 2 Rn⇥d with associated kernel matrix K = { (mi, mj)}, returns N 2 Rn⇥k in o(nnz(M)k) time satisfying: kK −NN T k2 F ∆kK −Kkk2 F for some approximation factor ∆. Then there is an o(nnz(A)k) + O(nk2) time algorithm for multiplying arbitrary integer matrices A 2 Rn⇥d, C 2 Rd⇥k. The above applies for any approximation factor ∆. While we work in the real RAM model, ignoring bit complexity, as long as ∆= poly(n) and A, C have polynomially bounded entries, our reduction from multiplication to low-rank approximation is achieved using matrices that can be represented with just O(log(n + d)) bits per entry. Theorem 1 shows that the runtime of ˜O(nnz(A)k + nk!−1) for ∆= pn achieved by [MM16] for general kernels cannot be significantly improved without advancing the state-of-the-art in matrix multiplication. Currently no general algorithm is known for multiplying integer A 2 Rn⇥d, C 2 Rd⇥k in o(nnz(A)k) time, except when k ≥n↵for ↵< .314 and A is dense. In this case, AC can be computed in O(nd) time using fast rectangular matrix multiplication [LG12, GU17]. As discussed, when A has uniform row sparsity or when d ( p nk/✏2)↵, the runtime of [MW17] for ∆= (1 + ✏), ignoring ✏dependencies and typically lower order terms, is ˜O(nnz(A)k), which is also nearly tight. In recent work, Backurs et al. [BIS17] give lower bounds for a number of kernel learning problems, including kernel PCA for the Gaussian kernel. However, their strong bound, of ⌦(n2) time, requires very small error ∆= exp(−!(log2 n), whereas ours applies for any relative error ∆. 1.3.2 Improved algorithm for radial basis function kernels In contrast to the above negative result, we demonstrate that achieving the alternative Kernel PCA guarantee of (2) is possible in input sparsity time for any shift and rotationally invariant kernel – e.g., any radial basis function kernel where (xi, xj) = f(kxi −xjk). This result significantly extends the progress of Avron et al. [ANW14] on the polynomial kernel. Our algorithm is based off a fast implementation of the random Fourier features method [RR07], which uses the fact that that the Fourier transform of any shift invariant kernel is a probability distribution after appropriate scaling (a consequence of Bochner’s theorem). Sampling frequencies from this distribution gives an approximation to (·, ·) and consequentially the matrix K. 3 We employ a new analysis of this method [AKM+17], which shows that sampling ˜O # n ✏2λ $ random Fourier features suffices to give ˜K = ˜Φ˜ΦT satisfying the spectral approximation guarantee: (1 −✏)( ˜K + λI) ⪯K + λI ⪯(1 + ✏)( ˜K + λI). If we set λ σk+1(K)/k, we can show that ˜Φ also gives a projection-cost preserving sketch [CEM+15] for the kernelized dataset Φ. This ensures that any Z satisfying k˜Φ −ZZT ˜Φk2 F (1 + ✏)k˜Φ −˜Φkk2 F also satisfies kΦ −ZZT Φk2 F (1 + O(✏))kΦ −Φkk2 F and thus achieves (2). Our algorithm samples s = ˜O # n ✏2λ $ = ˜O ⇣ nk ✏2σk+1(K) ⌘ random Fourier features, which naively requires O(nnz(A)s) time. We show that this can be accelerated to O(nnz(A))+poly(n, s) time, using a recent result of Kapralov et al. on fast multiplication by random Gaussian matrices [KPW16]. Our technique is analogous to the ‘Fastfood’ approach to accelerating random Fourier features using fast Hadamard transforms [LSS13]. However, our runtime scales with nnz(A), which can be significantly smaller than the ˜O(nd) runtime given by Fastfood when A is sparse. Our main algorithmic result is: Theorem 2 (Input sparsity time kernel PCA). There is an algorithm that given A 2 Rn⇥d along with shift and rotation-invariant kernel function : Rd ⇥Rd ! R+ with (x, x) = 1, outputs, with probability 99/100, Z 2 Rn⇥k satisfying: kΦ −ZZT Φk2 F (1 + ✏)kΦ −Φkk2 F for any Φ with ΦΦT = K = { (ai, aj)} and any ✏> 0. Letting σk+1 denote the (k + 1)th largest eigenvalue of K and ! < 2.373 be the exponent of fast matrix multiplication, the algorithm runs in O(nnz(A)) + ˜O ✓ n!+1.5 · ⇣ k σk+1✏2 ⌘!−1.5◆ time. We note that the runtime of our algorithm is O(nnz(A)) whenever n, k, 1/σk+1, and 1/✏are not too large. Due to the relatively poor dependence on n, the algorithm is relevant for very high dimensional datasets with d ≫n. Such datasets are found often, e.g., in genetics applications [HDC+01, JDMP11]. While we have dependence on 1/σk+1, in the natural setting, we only compute a low-rank approximation up to an error threshold, ignoring very small eigenvalues of K, and so σk+1 will not be too small. We do note that if we apply Theorem 2 to the low-rank approximation instances given by our lower bound construction, σk+1 can be very small, 1/ poly(n, d) for matrices with poly(n) bounded entries. Thus, removing this dependence is an important open question in understanding the complexity of low-rank kernel approximation. We leave open the possibility of improving our algorithm, achieving O(nnz(A)) + n · poly(k, ✏) runtime, which would match the state-of-the-art for low-rank approximation of non-kernelized matrices [CW13]. Alternatively, it is possible that a lower bound can be shown, proving the that high n dependence, or the 1/σk+1 term are required even for the Kernel PCA guarantee of (2). 2 Lower bounds Our lower bound proof argues that for a broad class of kernels, given input M, a low-rank approximation of the associated kernel matrix K achieving (1) can be used to obtain a close approximation to the Gram matrix MM T . We write (mi, mj) as a function of mT i mj (or kmi −mjk2 for distance kernels) and expand this function as a power series. We show that the if input points are appropriately rescaled, the contribution of degree-1 term mT i mj dominates, and hence our kernel matrix approximates MM T , up to some easy to compute low-rank components. We then show that such an approximation can be used to give a fast algorithm for multiplying any two integer matrices A 2 Rn⇥d and C 2 Rd⇥k. The key idea is to set M = [A, wC] where w is a large weight. We then have: MM T = AAT wAC wCT AT w2CT C * . Since w is very large, the AAT block is relatively very small, and so MM T is nearly rank-2k – it has a ‘heavy’ strip of elements in its last k rows and columns. Thus, computing a relative-error rank-2k approximation to MM T recovers all entries except those in the AAT block very accurately, and importantly, recovers the wAC block and so the product AC. 4 2.1 Lower bound for low-rank approximation of MM T . We first illustrate our lower bound technique by showing hardness of direct approximation of MM T . Theorem 3 (Hardness of low-rank approximation for MM T ). Assume there is an algorithm A which given any M 2 Rn⇥d returns N 2 Rn⇥k such that kMM T −NN T k2 F ∆1kMM T − (MM T )kk2 F in T(M, k) time for some approximation factor ∆1. For any A 2 Rn⇥d and C 2 Rd⇥k each with integer entries in [−∆2, ∆2], let B = [AT , wC]T where w = 3p∆1∆2 2nd. It is possible to compute the product AC in time T(B, 2k) + O(nk!−1). Proof. We can write the (n + k) ⇥(n + k) matrix BBT as: BBT = [AT , wC]T [A, wC] = AAT wAC wCT AT w2CT C * . Let Q 2 Rn⇥2k be an orthogonal span for the columns of the n ⇥2k matrix: 0 wAC V w2CT C * where V 2 Rk⇥k spans the columns of wCT AT 2 Rk⇥n. The projection QQT BBT gives the best Frobenius norm approximation to BBT in the span of Q. We can see that: kBBT −(BBT )2kk2 F kBBT −QQT BBT k2 F ++++ AAT 0 0 0 *++++ 2 F ∆4 2n2d2 (3) since each entry of A is bounded in magnitude by ∆2 and so each entry of AAT is bounded by d∆2 2. Let N be the matrix returned by running A on B with rank 2k. In order to achieve the approximation bound of kBBT −NN T k2 F ∆1kBBT −(BBT )2kk2 F we must have, for all i, j: (BBT −NN T )2 i,j kBBT −NN T k2 F ∆1∆4 2n2d2 where the last inequality is from (3). This gives |BBT −NN T |i,j p∆1∆2 2nd. Since A and C have integer entries, each entry in the submatrix wAC of BBT is an integer multiple of w = 3p∆1∆2 2nd. Since (NN T )i,j approximates this entry to error p∆1∆2 2nd, by simply rounding (NN T )i,j to the nearest multiple of w, we obtain the entry exactly. Thus, given N, we can exactly recover AC in O(nk!−1) time by computing the n⇥k submatrix corresponding to AC in BBT . Theorem 3 gives our main bound Theorem 1 for the case of the linear kernel (mi, mj) = mT i mj. Proof of Theorem 1 – Linear Kernel. We apply Theorem 3 after noting that for B = [AT , wC]T , nnz(B) nnz(A) + nk and so T(B, 2k) = o(nnz(A)k) + O(nk2). We show in Appendix A that there is an algorithm which nearly matches the lower bound of Theorem 1 for any ∆= (1 + ✏) for any ✏> 0. Further, in Appendix B we show that even just outputting an orthogonal matrix Z 2 Rn⇥k such that ˜K = ZZT MM T is a relative-error low-rank approximation of MM T , but not computing a factorization of ˜K itself, is enough to give fast multiplication of integer matrices A and C. 2.2 Lower bound for dot product kernels We now extend Theorem 3 to general dot product kernels – where (ai, aj) = f(aT i aj) for some function f. This includes, for example, the polynomial kernel. Theorem 4 (Hardness of low-rank approximation for dot product kernels). Consider any kernel : Rd ⇥Rd ! R+ with (ai, aj) = f(aT i aj) for some function f which can be expanded as f(x) = P1 q=0 cqxq with c1 6= 0 and |cq/c1| Gq−1 and for all q ≥2 and some G ≥1. Assume there is an algorithm A which given M 2 Rn⇥d with kernel matrix K = { (mi, mj)}, returns N 2 Rn⇥k satisfying kK −NN T k2 F ∆1kK −Kkk in T(M, k) time. For any A 2 Rn⇥d, C 2 Rd⇥k with integer entries in [−∆2, ∆2], let B = [w1AT , w2C]T with w1 = w2 12p∆1∆2 2nd, w2 = 1 4 p Gd∆2 . Then it is possible to compute AC in time T(B, 2k + 1) + O(nk!−1). 5 Proof. Using our decomposition of (·, ·), we can write the kernel matrix for B and as: K = c0 1 1 1 1 * + c1 w2 1AAT w1w2AC w1w2CT AT w2 2CT C * + c2K(2) + c3K(3) + ... (4) where K(q) i,j = (bT i bj)q and 1 denotes the all ones matrix of appropriate size. The key idea is to show that the contribution of the K(q) terms is small, and so any relative-error rank-(2k+1) approximation to K must recover an approximation to BBT , and thus the product AC as in Theorem 3. By our setting of w2 = 1 4 p Gd∆2 , the fact that w1 < w2, and our bound on the entries of A and C, we have for all i, j, |bT i bj| w2 2d∆2 2 < 1 16G. Thus, for any i, j, using that |cq/c1| Gq−1: ,,,,, 1 X q=2 cqK(q) i,j ,,,,, c1|bT i bj| · ,,,,, 1 X q=2 Gq−1|bT i bj|q−1 ,,,,, c1|bT i bj| 1 X q=2 Gq−1 (16G)q−1 1 12c1|bT i bj|. (5) Let ¯K be the matrix ✓ K −c0 1 1 1 1 *◆ , with its top right n ⇥n block set to 0. ¯K just has its last k columns and rows non-zero, so has rank 2k. Let Q 2 Rn⇥2k+1 be an orthogonal span for the columns ¯K along with the all ones vector of length n. Let N be the result of running A on B with rank 2k + 1. Then we have: kK −NN T k2 F ∆1kK −K2k+1k2 F ∆1kK −QQT Kk2 F ∆1 ++++ (c1w2 1AAT + c2 ˆK(2) + ...) 0 0 0 *++++ 2 F (6) where ˆK(q) denotes the top left n ⇥n submatrix of K(q). By our bound on the entries of A and (5): ,,,, ⇣ c1w2 1AAT + c2 ˆK(2) + c3 ˆK(3) + ... ⌘ i,j ,,,, 13 12 ,,, # c1w2 1AAT $ i,j ,,, 2c1w2 1d∆2 2. Plugging back into (6) and using w1 = w2 12p∆1∆2 2nd, this gives for any i, j: (K −NN T )i,j kK −NN T kF p ∆1n2 · 2c1w2 1d∆2 2 p∆1n · 2c1d∆2 2 12p∆1∆2 2nd · w1w2 w1w2c1 6 . (7) Since A and C have integer entries, each entry of c1w1w2AC is an integer multiple of c1w1w2. By the decomposition of (4) and the bound of (5), if we subtract c0 from the corresponding entry of K and round it to the nearest multiple of c1w1w2, we will recover the entry of AC. By the bound of (7), we can likewise round the corresponding entry of NN T . Computing all nk of these entries given N takes time O(nk!−1), giving the theorem. Theorem 4 lets us lower bound the time to compute a low-rank kernel approximation for any kernel function expressible as a reasonable power expansion of aT i aj. As a straightforward example, it gives the lower bound for the polynomial kernel of any degree stated in Theorem 1. Proof of Theorem 1 – Polynomial Kernel. We apply Theorem 4, noting that (mi, mj) = (c + mT i mj)q can be written as f(mT i mj) where f(x) = Pq j=0 cjxj with cj = cq−j#q j $ . Thus c1 6= 0 and |cj/c1| Gj−1 for G = (q/c). Finally note that nnz(B) nnz(A)+nk giving the result. 2.3 Lower bound for distance kernels We finally extend Theorem 4 to handle kernels like the Gaussian kernel whose value depends on the squared distance kai −ajk2 rather than just the dot product aT i aj. We prove: 6 Theorem 5 (Hardness of low-rank approximation for distance kernels). Consider any kernel function : Rd⇥Rd ! R+ with (ai, aj) = f(kai−ajk2) for some function f which can be expanded as f(x) = P1 q=0 cqxq with c1 6= 0 and |cq/c1| Gq−1 and for all q ≥2 and some G ≥1. Assume there is an algorithm A which given input M 2 Rn⇥d with kernel matrix K = { (mi, mj)}, returns N 2 Rn⇥k satisfying kK −NN T k2 F ∆1kK −Kkk in T(M, k) time. For any A 2 Rn⇥d, C 2 Rd⇥k with integer entries in [−∆2, ∆2], let B = [w1AT , w2C]T with w1 = w2 36p∆1∆2 2nd, w2 = 1 (16Gd2∆4 2)(36p∆1∆2 2nd). It is possible to compute AC in T(B, 2k + 3) + O(nk!−1) time. The proof of Theorem 5 is similar to that of Theorem 4, and relegated to Appendix C. The key idea is to write K as a polynomial in the distance matrix D with Di,j = kbi −bjk2 2. Since kbi − bjk2 2 = kbik2 2 + kbjk2 2 −2bT i bj, D can be written as −2BBT plus a rank-2 component. By setting w1, w2 sufficiently small, as in the proof of Theorem 4, we ensure that the higher powers of D are negligible, and thus that our low-rank approximation must accurately recover the submatrix of BBT corresponding to AC. Theorem 5 gives Theorem 1 for the popular Gaussian kernel: Proof of Theorem 1 – Gaussian Kernel. (mi, mj) can be written as f(kmi−mjk2) where f(x) = e−x/σ = P1 q=0 (−1/σ)q q! xq. Thus c1 6= 0 and |cq/c1| Gq−1 for G = 1/σ. Applying Theorem 5 and bounding nnz(B) nnz(A) + nk, gives the result. 3 Input sparsity time kernel PCA for radial basis kernels Theorem 1 gives little hope for achieving o(nnz(A)k) time for low-rank kernel approximation. However, the guarantee of (1) is not the only way of measuring the quality of ˜K. Here we show that for shift/rotationally invariant kernels, including e.g., radial basis kernels, input sparsity time can be achieved for the kernel PCA goal of (2). 3.1 Basic algorithm Our technique is based on the random Fourier features technique [RR07]. Given any shift-invariant kernel, (x, y) = (x −y) with (0) = 1 (we will assume this w.l.o.g. as the function can always be scaled), there is a probability density function p(⌘) over vectors in Rd such that: (x −y) = Z Rd e−2⇡i⌘T (x−y)p(⌘)d⌘. (8) p(⌘) is just the (inverse) Fourier transform of (·), and is a density function by Bochner’s theorem. Informally, given A 2 Rn⇥d if we let Z denote the matrix with columns z(⌘) indexed by ⌘2 Rd. z(⌘)j = e−2⇡i⌘T aj. Then (8) gives ZPZ⇤= K where P is diagonal with P⌘,⌘= p(⌘), and Z⇤ denotes the Hermitian transpose. The idea of random Fourier features is to select s frequencies ⌘1, ..., ⌘s according to the density p(⌘) and set ˜Z = 1 ps[z(⌘1), ...z(⌘s)]. ˜K = ˜Z ˜ZT is then used to approximate K. In recent work, Avron et al. [AKM+17] give a new analysis of random Fourier features. Extending prior work on ridge leverage scores in the discrete setting [AM15, CMM17], they define the ridge leverage function for parameter λ > 0: ⌧λ(⌘) = p(⌘)z(⌘)⇤(K + λI)−1z(⌘) (9) As part of their results, which seek ˜K that spectrally approximates K, they prove the following: Lemma 6. For all ⌘, ⌧λ(⌘) n/λ. While simple, this bound is key to our algorithm. It was shown in [CMM17] that if the columns of a matrix are sampled by over-approximations to their ridge leverage scores (with appropriately set λ), the sample is a projection-cost preserving sketch for the original matrix. That is, it can be used as a surrogate in computing a low-rank approximation. The results of [CMM17] carry over to the continuous setting giving, in conjunction with Lemma 6: 7 Lemma 7 (Projection-cost preserving sketch via random Fourier features). Consider any A 2 Rn⇥d and shift-invariant kernel (·) with (0) = 1, with associated kernel matrix K = { (ai −aj)} and kernel Fourier transform p(⌘). For any 0 < λ 1 k Pn i=k+1 σi(K), let s = cn log(n/δλ) ✏2λ for sufficiently large c and let ˜Z = 1 ps[z(⌘1), ..., z(⌘s)] where ⌘1, ..., ⌘s are sampled independently according to p(⌘). Then with probability ≥1 −δ, for any orthonormal Q 2 Rn⇥k and any Φ with ΦΦT = K: (1 −✏)kQQT ˜Z −˜Zk2 F kQQT Φ −Φk2 F (1 + ✏)kQQT ˜Z −˜Zk2 F . (10) By (10) if we compute Q satisfying kQQT ˜Z −˜Zk2 F (1 + ✏)k ˜Z −˜Zkk2 F then we have: kQQT Φ −Φk2 F (1 + ✏)2k ˜Z −˜Zkk2 F (1 + ✏)2 1 −✏kUkU T k Φ −Φk2 F = (1 + O(✏))kΦ −Φkk2 F where Uk 2 Rn⇥k contains the top k column singular vectors of Φ. By adjusting constants on ✏by making c large enough, we thus have the relative error low-rank approximation guarantee of (2). It remains to show that this approach can be implemented efficiently. 3.2 Input sparsity time implementation Given ˜Z sampled as in Lemma 7, we can find a near optimal subspace Q using any input sparsity time low-rank approximation algorithm (e.g., [CW13, NN13]). We have the following Corollary: Corollary 8. Given ˜Z sampled as in Lemma 7 with s = ˜⇥( nk ✏2σk+1(K)), there is an algorithm running in time ˜O( n2k ✏2σk+1(K)) that computes Q satisfying with high probability, for any Φ with ΦΦT = K: kQQT Φ −Φk2 F (1 + ✏)kΦ −Φkk2 F . With Corollary 8 in place the main bottleneck to our approach becomes computing ˜Z. 3.2.1 Sampling Frequencies To compute ˜Z, we first sample ⌘1, ..., ⌘s according to p(⌘). Here we use the rotational invariance of (·). In this case, p(⌘) is also rotationally invariant [LSS13] and so, letting ˆp(·) be the distribution over norms of vectors sampled from p(⌘) we can sample ⌘1, ..., ⌘n by first selecting s random Gaussian vectors and then rescaling them to have norms distributed according to ˆp(·). That is, we can write [⌘1, ..., ⌘n] = GD where G 2 Rd⇥s is a random Gaussian matrix and D is a diagonal rescaling matrix with Dii = m kGik with m ⇠ˆp. We will assume that ˆp can be sampled from in O(1) time. This is true for many natural kernels – e.g., for the Gaussian kernel, ˆp is just a Gaussian density. 3.2.2 Computing ˜Z Due to our large sample size, s > n, even writing down G above requires ⌦(nd) time. However, to form ˜Z we do not need G itself: it suffices to compute for m = 1, ..., s the column z(⌘m) with z(⌘m)j = e−2⇡i⌘T maj. This requires computing AGD, which contains the appropriate dot products aT j ⌘m for all m, j. We use a recent result [KPW16] which shows that this can be performed approximately in input sparsity time: Lemma 9 (From Theorem 1 of [KPW16]). There is an algorithm running in O(nnz(A) + log4 dn3s!−1.5 δ ) time which outputs random B whose distribution has total variation distance at most δ from the distribution of AG where G 2 Rd⇥s is a random Gaussian matrix. Here, ! < 2.373 is the exponent of fast matrix multiplication. Proof. Theorem 1 of [KPW16] shows that for B to have total variation distance δ from the distribution of AG it suffices to set B = ACG0 where C is a d ⇥O(log4 dn2s1/2/δ) CountSketch matrix 8 and G0 is an O(log4 dn2s1/2/δ) ⇥s random Gaussian matrix. Computing AC requires O(nnz(A)) time. Multiplying the result by G0 then requires O( log4 dn3s1.5 δ ) time if fast matrix multiplication is not employed. Using fast matrix multiplication, this can be improved to O( log4 dn3s!−1.5 δ ). Applying Lemma 9 with δ = 1/200 lets us compute random BD with total variation distance 1/200 from AGD. Thus, the distribution of ˜Z generated from this matrix has total variation distance 1/200 from the ˜Z generated from the true random Fourier features distribution. So, by Corollary 8, we can use ˜Z to compute Q satisfying kQQT Φ −Φk2 F (1 + ✏)kΦ −Φkk2 F with probability 1/100 accounting for the the total variation difference and the failure probability of Corollary 8. This yields our main algorithmic result, Theorem 2. 3.3 An alternative approach We conclude by noting that near input sparsity time Kernel PCA can also be achieved for a broad class of kernels using a very different approach. We can approximate (·, ·) via an expansion into polynomial kernel matrices as is done in [CKS11] and then apply the sketching algorithms for the polynomial kernel developed in [ANW14]. As long as the expansion achieves high accuracy with low degree, and as long as 1/σk+1 is not too small – since this will control the necessary approximation factor, this technique can yield runtimes of the form ˜O(nnz(A))+poly(n, k, 1/σk+1, 1/✏), giving improved dependence on n for some kernels over our random Fourier features method. Improving the poly(n, k, 1/σk+1, 1/✏) term in both these methods, and especially removing the 1/σk+1 dependence and achieving linear dependence on n is an interesting open question for future work. 4 Conclusion In this work we have shown that for a broad class of kernels, including the Gaussian, polynomial, and linear kernels, given data matrix A, computing a relative error low-rank approximation to A’s kernel matrix K (i.e., satisfying (1)) requires at least ⌦(nnz(A)k) time, barring a major breakthrough in the runtime of matrix multiplication. In the constant error regime, this lower bound essentially matches the runtimes given by recent work on subquadratic time kernel and PSD matrix low-rank approximation [MM16, MW17]. We show that for the alternative kernel PCA guarantee of (2), a potentially faster runtime of O(nnz(A)) + poly(n, k, 1/σk+1, 1/✏) can be achieved for general shift and rotation-invariant kernels. Practically, improving the second term in our runtime, especially the poor dependence on n, is an important open question. Generally, computing the kernel matrix K explicitly requires O(n2d) time, and so our algorithm only gives runtime gains when d is large compared to n – at least ⌦(n!−.5), even ignoring k, σk+1, and ✏dependencies. Theoretically, removing the dependence on σk+1 would be of interest, as it would give input sparsity runtime without any assumptions on the matrix A (i.e., that σk+1 is not too small). Resolving this question has strong connections to finding efficient kernel subspace embeddings, which approximate the full spectrum of K. References [AKM+17] Haim Avron, Michael Kapralov, Cameron Musco, Christopher Musco, Ameya Velingker, and Amir Zandieh. Random Fourier features for kernel ridge regression: Approximation bounds and statistical guarantees. In Proceedings of the 34th International Conference on Machine Learning (ICML), 2017. [AM15] Ahmed Alaoui and Michael W Mahoney. Fast randomized kernel ridge regression with statistical guarantees. In Advances in Neural Information Processing Systems 28 (NIPS), pages 775–783, 2015. [AMS01] Dimitris Achlioptas, Frank Mcsherry, and Bernhard Schölkopf. Sampling techniques for kernel methods. In Advances in Neural Information Processing Systems 14 (NIPS), 2001. 9 [ANW14] Haim Avron, Huy Nguyen, and David Woodruff. Subspace embeddings for the polynomial kernel. In Advances in Neural Information Processing Systems 27 (NIPS), pages 2258–2266, 2014. [BIS17] Arturs Backurs, Piotr Indyk, and Ludwig Schmidt. On the fine-grained complexity of empirical risk minimization: Kernel methods and neural networks. In Advances in Neural Information Processing Systems 30 (NIPS), 2017. [BJ02] Francis Bach and Michael I. Jordan. Kernel independent component analysis. Journal of Machine Learning Research, 3(Jul):1–48, 2002. [BW09] Mohamed-Ali Belabbas and Patrick J. Wolfe. Spectral methods in machine learning: New strategies for very large datasets. Proceedings of the National Academy of Sciences of the USA, 106:369–374, 2009. [CEM+15] Michael B. Cohen, Sam Elder, Cameron Musco, Christopher Musco, and Madalina Persu. Dimensionality reduction for k-means clustering and low rank approximation. In Proceedings of the 47th Annual ACM Symposium on Theory of Computing (STOC), pages 163–172, 2015. [CKS11] Andrew Cotter, Joseph Keshet, and Nathan Srebro. Explicit approximations of the Gaussian kernel. arXiv:1109.4603, 2011. [CMM17] Michael B. Cohen, Cameron Musco, and Christopher Musco. Input sparsity time lowrank approximation via ridge leverage score sampling. In Proceedings of the 28th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1758–1777, 2017. [CW13] Kenneth L Clarkson and David P Woodruff. Low rank approximation and regression in input sparsity time. In Proceedings of the 45th Annual ACM Symposium on Theory of Computing (STOC), pages 81–90, 2013. [CW17] Kenneth L. Clarkson and David P. Woodruff. Low-rank PSD approximation in inputsparsity time. In Proceedings of the 28th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2061–2072, 2017. [DM05] Petros Drineas and Michael W Mahoney. On the Nyström method for approximating a Gram matrix for improved kernel-based learning. Journal of Machine Learning Research, 6:2153–2175, 2005. [FS02] Shai Fine and Katya Scheinberg. Efficient SVM training using low-rank kernel representations. Journal of Machine Learning Research, 2:243–264, 2002. [FT07] Shmuel Friedland and Anatoli Torokhti. Generalized rank-constrained matrix approximations. SIAM Journal on Matrix Analysis and Applications, 29(2):656–659, 2007. [GM13] Alex Gittens and Michael Mahoney. Revisiting the Nyström method for improved large-scale machine learning. In Proceedings of the 30th International Conference on Machine Learning (ICML), pages 567–575, 2013. Full version at arXiv:1303.1849. [GU17] François Le Gall and Florent Urrutia. Improved rectangular matrix multiplication using powers of the Coppersmith-Winograd tensor. arXiv:1708.05622, 2017. [HDC+01] Ingrid Hedenfalk, David Duggan, Yidong Chen, Michael Radmacher, Michael Bittner, Richard Simon, Paul Meltzer, Barry Gusterson, Manel Esteller, Mark Raffeld, et al. Gene-expression profiles in hereditary breast cancer. New England Journal of Medicine, 344(8):539–548, 2001. [JDMP11] Asif Javed, Petros Drineas, Michael W Mahoney, and Peristera Paschou. Efficient genomewide selection of PCA-correlated tSNPs for genotype imputation. Annals of Human Genetics, 75(6):707–722, 2011. [KPW16] Michael Kapralov, Vamsi Potluru, and David Woodruff. How to fake multiply by a Gaussian matrix. In Proceedings of the 33rd International Conference on Machine Learning (ICML), pages 2101–2110, 2016. 10 [LG12] François Le Gall. Faster algorithms for rectangular matrix multiplication. In Proceedings of the 53rd Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 514–523, 2012. [LG14] François Le Gall. Powers of tensors and fast matrix multiplication. In Proceedings of the 39th international symposium on symbolic and algebraic computation, pages 296–303. ACM, 2014. [LSS13] Quoc Le, Tamás Sarlós, and Alexander Smola. Fastfood - Computing Hilbert space expansions in loglinear time. In Proceedings of the 30th International Conference on Machine Learning (ICML), pages 244–252, 2013. [MM16] Cameron Musco and Christopher Musco. Recursive sampling for the Nyström method. In Advances in Neural Information Processing Systems 30 (NIPS), 2016. [MW17] Cameron Musco and David P Woodruff. Sublinear time low-rank approximation of positive semidefinite matrices. In Proceedings of the 58th Annual IEEE Symposium on Foundations of Computer Science (FOCS), 2017. [NN13] Jelani Nelson and Huy L Nguyên. OSNAP: Faster numerical linear algebra algorithms via sparser subspace embeddings. In Proceedings of the 54th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 117–126, 2013. [RR07] Ali Rahimi and Benjamin Recht. Random features for large-scale kernel machines. In Advances in Neural Information Processing Systems 20 (NIPS), pages 1177–1184, 2007. [SS00] Alex J Smola and Bernhard Schökopf. Sparse greedy matrix approximation for machine learning. In Proceedings of the 17th International Conference on Machine Learning (ICML), pages 911–918, 2000. [WS01] Christopher Williams and Matthias Seeger. Using the Nyström method to speed up kernel machines. In Advances in Neural Information Processing Systems 14 (NIPS), pages 682–688, 2001. [WZ13] Shusen Wang and Zhihua Zhang. Improving CUR matrix decomposition and the Nyström approximation via adaptive sampling. Journal of Machine Learning Research, 14:2729–2769, 2013. [ZTK08] Kai Zhang, Ivor W. Tsang, and James T. Kwok. Improved Nyström low-rank approximation and error analysis. In Proceedings of the 25th International Conference on Machine Learning (ICML), pages 1232–1239, 2008. 11 | 2017 | 272 |
6,755 | Convergent Block Coordinate Descent for Training Tikhonov Regularized Deep Neural Networks Ziming Zhang and Matthew Brand Mitsubishi Electric Research Laboratories (MERL) Cambridge, MA 02139-1955 {zzhang, brand}@merl.com Abstract By lifting the ReLU function into a higher dimensional space, we develop a smooth multi-convex formulation for training feed-forward deep neural networks (DNNs). This allows us to develop a block coordinate descent (BCD) training algorithm consisting of a sequence of numerically well-behaved convex optimizations. Using ideas from proximal point methods in convex analysis, we prove that this BCD algorithm will converge globally to a stationary point with R-linear convergence rate of order one. In experiments with the MNIST database, DNNs trained with this BCD algorithm consistently yielded better test-set error rates than identical DNN architectures trained via all the stochastic gradient descent (SGD) variants in the Caffe toolbox. 1 Introduction Feed-forward deep neural networks (DNNs) are function approximators wherein weighted combinations inputs are filtered through nonlinear activation functions that are organized into a cascade of fully connected (FC) hidden layers. In recent years DNNs have become the tool of choice for many research areas such as machine translation and computer vision. The objective function for training a DNN is highly non-convex, leading to numerous obstacles to global optimization [10], notably proliferation of saddle points [11] and prevalence of local extrema that offer poor generalization off the training sample [8]. These observations have motivated regularization schemes to smooth or simplify the energy surface, either explicitly such as weight decay [23] or implicitly such as dropout [32] and batch normalization [19], so that the solutions are more robust, i.e. better generalized to test data. Training algorithms face many numerically difficulties that can make it difficult to even find a local optimum. One of the well-known issues is so-called vanishing gradient in back propagation (chain rule differentiation) [18], i.e. the long dependency chains between hidden layers (and corresponding variables) tend to drive gradients to zero far from the optimum. This issue leads to very slow improvements of the model parameters, an issue that becomes more and more serious in deeper networks [16]. The vanishing gradient problem can be partially ameliorated by using non-saturating activation functions such as rectified linear unit (ReLU) [25], and network architectures that have shorter input-to-output paths such as ResNet [17]. The saddle-point problem has been addressed by switching from deterministic gradient descent to stochastic gradient descent (SGD), which can achieve weak convergence in probability [6]. Classic proximal-point optimization methods such as the alternating direction method of multipliers (ADMM) have also shown promise for DNN training [34; 41], but in the DNN setting their convergence properties remain unknown. Contributions: In this paper, 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 1. We propose a novel Tikhonov regularized multi-convex formulation for deep learning, which can be used to learn both dense and sparse DNNs; 2. We propose a novel block coordinate descent (BCD) based learning algorithm accordingly, which can guarantee to globally converge to stationary points with R-linear convergence rate of order one; 3. We demonstrate empirically that DNNs estimated with BCD can produce better representations than DNNs estimated with SGD, in the sense of yielding better test-set classification rates. Our Tikhonov regularization is motivated by the fact that the ReLU activation function is equivalent to solving a smoothly penalized projection problem in a higher-dimensional Euclidean space. We use this to build a Tikhonov regularization matrix which encodes all the information of the networks, i.e. the architectures as well as their associated weights. In this way our training objective can be divided into three sub-problems, namely, (1) Tikhonov regularized inverse problem [37], (2) least-square regression, and (3) learning classifiers. Since each sub-problem is convex and coupled with the other two, our overall objective is multi-convex. Block coordinate descent (BCD) is often used for problems where finding an exact solution of a sub-problem with respect to a subset (block) of variables is much simpler than finding the solution for all variables simultaneously [27]. In our case, each sub-problem isolates block of variables which can be solved easily (e.g. close-form solutions exist). One of the advantages of our decomposition into sub-problems is that the long-range dependency between hidden layers is captured within a subproblem whose solution helps to propagate the information between inputs and outputs to stabilize the networks (i.e. convergence). Therefore, it does not suffer from vanishing gradient at all. In our experiments, we demonstrate the effectiveness and efficiency of our algorithm by comparing with SGD based solvers. 1.1 Related Work (1) Stochastic Regularization (SR) vs. Local Regularization vs. Tikhonov Regularization: SR is a widely-used technique in deep learning to prevent the training from overfitting. The basic idea in SR is to multiple the network weights with some random variables so that the learned network is more robust and generalized to test data. Dropout [32] and its variants such like [22] are classic examples of SR. Gal & Ghahramani [14] showed that SR in deep learning can be considered as approximate variational inference in Bayesian neural networks. Recently Baldassi et al. [2] proposed smoothing non-convex functions with local entropy, and latter Chaudhari et al. [8] proposed Entropy-SGD for training DNNs. The idea behind such methods is to locate solutions locally within large flat regions of the energy landscape that favors good generalization. In [9] Chaudhari et al. provided the mathematical justification for these methods from the perspective of partial differential equations (PDEs) In contrast, our Tikhonov regularization tends to smooth the non-convex loss explicitly, globally, and data-dependently. We deterministically learn the Tikhonov matrix as well as the auxiliary variables in the ill-posed inverse problems. The Tikhonov matrix encodes all the information in the network, and the auxiliary variables represent the ideal outputs of the data from each hidden layer that minimize our objective. Conceptually these variables work similarly as target propagation [4]. (2) SGD vs. BCD: In [6] Bottou et al. proved weak convergence of SGD for non-convex optimization. Ghadimi & Lan [15] showed that SGD can achieve convergence rates that scale as O t−1/2 for non-convex loss functions if the stochastic gradient is unbiased with bounded variance, where t denotes the number of iterations. For non-convex optimization, the BCD based algorithm in [39] was proven to converge globally to stationary points. For parallel computing another BCD based algorithm, namely Parallel Successive Convex Approximation (PSCA), was proposed in [31] and proven to be convergent. (3) ADMM vs. BCD: Alternating direction method of multipliers (ADMM) is a proximal-point optimization framework from the 1970s and recently championed by Boyd [7]. It breaks a nearlyseparable problem into loosely-coupled smaller problems, some of which can be solved independently and thus in parallel. ADMM offers linear convergence for strictly convex problems, and for certain special non-convex optimization problems, ADMM can also converge [29; 36]. Unfortunately, thus 2 far there is no evidence or mathematical argument that DNN training is one of these special cases. Therefore, even though empirically it has been successfully applied to DNN training [34; 41], it still lacks of convergence guarantee. Our BCD-based DNN training algorithm is also amenable to ADMM-like parallelization. More importantly, as we prove in Sec. 4, it will converge globally to stationary points with R-linear convergence. 2 Tikhonov Regularization for Deep Learning 2.1 Problem Setup Key Notations: We denote xi ∈Rd0 as the i-th training data, yi ∈Y as its corresponding class label from label set Y, ui,n ∈Rdn as the output feature for xi from the n-th (1 ≤n ≤N) hidden layer in our network, Wn,m ∈Rdn×dm as the weight matrix between the n-th and m-th hidden layers, Mn as the input layer index set for the n-th hidden layer, V ∈RdN+1×dN as the weight matrix between the last hidden layer and the output layer, U, V, W as nonempty closed convex sets, and ℓ(·, ·) as a convex loss function. Network Architectures: In our networks we only consider ReLU as the activation functions. To provide short paths through the DNN, we allow multi-input ReLU units which can take the outputs from multiple previous layers as its inputs. input output hidden layers Figure 1: Illustration of DNN architectures that we consider in the paper. Fig. 1 illustrates a network architecture that we consider, where the third hidden layers (with ReLU activations), for instance, takes the input data and the outputs from the first and second hidden layers as its inputs. Mathematically, we define our multi-input ReLU function at layer n for data xi as: ui,n = xi, if n = 0 max 0, P m∈Mn Wn,mui,m , otherwise (1) where max denotes the entry-wise max operator and 0 denotes a dn-dim zero vector. Note that multi-input ReLUs can be thought of as conventional ReLU with skip layers [17] where W’s are set to identity matrices accordingly. Conventional Objective for Training DNNs with ReLU: We write down the general objective1 in a recursive way as used in [41] as follows for clarity: min V∈V, ˜ W⊆W X i ℓ(yi, Vui,N), s.t. ui,n = max ( 0, X m∈Mn Wn,mui,m ) , ui,0 = xi, ∀i, ∀n, (2) where ˜ W = {Wn,m}. Note that we separate the last FC layer (with weight matrix V) from the rest hidden layers (with weight matrices in ˜ W) intentionally, because V is for learning classifiers while ˜ W is for learning useful features. The network architectures we use in this paper are mainly for extracting features, on top of which any arbitrary classifier can be learned further. Our goal is to optimize Eq. 2. To that end, we propose a novel BCD based algorithm which can solve the relaxation of Eq. 2 using Tikhonov regularization with convergence guarantee. 2.2 Reinterpretation of ReLU The ReLU, ordinarily defined as u = max{0, x} for x ∈Rd, can be viewed as a projection onto a convex set (POCS) [3], and thus rewritten as a simple smooth convex optimization problem, max{0, x} ≡arg min u∈U ∥u −x∥2 2, (3) where ∥· ∥2 denotes the ℓ2 norm of a vector and U here is the nonnegative closed half-space. This non-negative least squares problem becomes the basis of our lifted objective. 1For simplicity in this paper we always presume that the domain of each variable contains the regularization, e.g. ℓ2-norm, without showing it in the objective explicitly. 3 2.3 Our Tikhonov Regularized Objective We use Eq. 3 to lift and unroll the general training objective in Eq. 2 obtaining the relaxation: min ˜U⊆U,V∈V, ˜ W⊆W f( ˜U, V, ˜ W) ∆= X i ℓ(yi, Vui,N) + X i,n γn 2
ui,n − X m∈Mn Wn,mui,m
2 2 , (4) s.t. ui,n ≥0, ui,0 = xi, ∀i, ∀n ≥1, where ˜U = {ui,n} and γn ≥0, ∀n denote predefined regularization constants. Larger γn values force ui,n, ∀i to more closely approximate the output of ReLU at the n-th hidden layer. Arranging u and γ terms into a matrix Q, we rewrite Eq. 4 in familiar form as a Tikhonov regularized objective: min ˜U⊆U,V∈V, ˜ W⊆W f( ˜U, V, ˜ W) ≡ X i ℓ(yi, VPui) + 1 2uT i Q( ˜ W)ui . (5) Here ui, ∀i denotes the concatenating vector of all hidden outputs as well as the input data, i.e. ui = [ui,n]N n=0, ∀i, P is a predefined constant matrix so that Pui = ui,N, ∀i, and Q( ˜ W) denotes another matrix constructed by the weight matrix set ˜ W. Proposition 1. Q( ˜ W) is positive semidefinite, leading to the following Tikhonov regularization: uT i Q( ˜ W)ui ≡(Γui)T (Γui) = ∥Γui∥2 2, ∃Γ, ∀i, where Γ is the Tikhonov matrix. Definition 1 (Block Multi-Convexity [38]). A function f is block multi-convex if for each block variable xi, ∀i, f is a convex function of xi while all the other blocks are fixed. Proposition 2. f( ˜U, V, ˜ W) is block multi-convex. 3 Block Coordinate Descent Algorithm 3.1 Training Eq. 4 can be minimized using alternating optimization, which decomposes the problem into the following three convex sub-problems based on Lemma 2: • Tikhonov regularized inverse problem: minui∈U ℓ(yi, VPui) + 1 2uT i Q( ˜ W)ui, ∀i. • Least-square regression: min∀Wn,m∈˜ W γn 2 P i
ui,n −P m∈Mn Wn,mui,m
2 2; • Classification using learned features: minV∈V P i ℓ(yi, VPui). All the three sub-problems can be solved efficiently due to their convexity. In fact the inverse subproblem alleviates the vanishing gradient issue in traditional deep learning, because it tries to obtain the estimated solution for the output feature of each hidden layer, which are dependent on each other through the Tikhonov matrix. Such functionality is similar to that of target (i.e. estimated outputs of each layer) propagation [4], namely, propagating information between input data and output labels. Unfortunately, a simple alternating optimization scheme cannot guarantee the convergence to stationary points for solving Eq. 4. Therefore we propose a novel BCD based algorithm for training DNNs based on Eq. 4 as listed in Alg. 1. Basically we sequentially solve each sub-problem with an extra quadratic term. These extra terms as well as the convex combination rule guarantee the global convergence of the algorithm (see Sec. 4 for more details). Our algorithm involves solving a sequence of quadratic programs (QP), whose computational complexity is cubic, in general, in the input dimension [28]. In this paper we focus on the theoretical development of the algorithm, and consider fast implementations in future work. 3.2 Testing Given a test sample x and learned network weights ˜ W∗, V∗, based on Eq. 4 the ideal decision function for classification should be y∗= arg miny∈Y n minu f(u, V∗, ˜ W∗) o . This indicates that 4 Algorithm 1 Block Coordinate Descent (BCD) Algorithm for Training DNNs Input :training data {(xi, yi)} and regularization parameters {γn} Output :network weights ˜ W Randomly initialize ˜U(0) ⊆U, V(0) ∈V, ˜ W(0) ⊆W; Set sequence {θt}∞ t=1 so that 0 ≤θt ≤1, ∀t and sequence nP∞ k=t θk 1−θk o∞ t=1 converges to zero, e.g. θt = 1 t2 ; for t = 1, 2, · · · do u∗ i ←arg minui∈U ℓ(yi, V(t−1)Pui) + 1 2uT i Q( ˜ W(t−1))ui + 1 2(1 −θt)2∥ui −u(t−1) i ∥2 2, ∀i; u(t) i ←u(t−1) i + θt(u∗ i −u(t−1) i ), ∀i; V∗←arg minV∈V P i ℓ(yi, VPu(t) i ) + 1 2(1 −θt)2∥V −V(t−1)∥2 F ; V(t) ←V(t−1) + θt(V∗−V(t−1)); ˜ W∗←arg min ˜ W⊆W P i 1 2[u(t) i ]T Q( ˜ W)u(t) i + 1 2(1 −θt)2 P n P m∈Mn ∥Wn,m −W(t−1) n,m ∥2 F W(t) n,m ←W(t−1) n,m + θt(W∗ n,m −W(t−1) n,m ), ∀n, ∀m ∈Mn, W∗ n,m ∈˜ W∗; end return ˜ W; for each pair of test data and potential label we have to solve an optimization problem, leading to unaffordably high computational complexity that prevents us from using it. Recall that our goal is to train feed-forward DNNs using the BCD algorithm in Alg. 1. Considering this, we utilize the network weights ˜ W∗to construct the network for extracting deep features. Since these features are the approximation of ˜U in Eq. 4 (in fact this is a feasible solution of an extreme case where γn = +∞, ∀n), the learned classifier V∗can never be reused at test time. Therefore, we retain the architecture and weights of the trained network and replace the classification layer (i.e. the last layer with weights V) with a linear support vector machine (SVM). 3.3 Experiments 3.3.1 MNIST Demonstration xi yi w1,0 w2,1 w3,2 v ui,1 ui,2 ui,3 Figure 2: The network architecture for algorithm/solver comparison. To demonstrate the effectiveness and efficiency of our BCD based algorithm in Alg. 1, we conduct comprehensive experiments on MNIST [26] dataset using its 28 × 28 = 784 raw pixels as input features. We refer to our algorithm for learning dense networks as “BCD” and that for learning sparse networks as “BCD-S”, respectively. For sparse learning, we define the convex set W = {W | ∥Wk∥1 ≤1, ∀k}, where Wk denotes the k-th row in matrix W and ∥· ∥1 denotes the ℓ1 norm of a vector. All the comparisons are performed on the same PC. We implement our algorithms using MATLAB GPU implementation without optimizing the code. We compare our algorithms with the six SGD based solvers in Caffe [20], i.e. SGD [5], AdaDelta [40], AdaGrad [12], Adam [21], Nesterov [33], RMSProp [35], which are coded in Python. The network architecture that we implemented is illustrated in Fig. 2. This network has three hidden layers (with ReLU) with 784 nodes per layer, four FC layers, and three skip layers inside. Therefore, the mapping function from input xi to output yi defined by the network is: f(xi) = Vui,3, ui,3 = max{0, xi + ui,1 + W3,2ui,2}, ui,2 = max{0, xi + W2,1ui,1}, ui,1 = max{0, W1,0xi}. For simplicity without loss of generality, we utilize MSE as the loss function, and learn the network parameters using different solvers with the same inputs and random initial weights for each FC layer. Without fine-tuning the regularization parameters, we simply set γn = 0.1, ∀n in Eq. 4 for both BCD and BCD-S algorithms. For the Caffe solvers, we modify the demo code in Caffe for MNIST and run the comparison with carefully tuning the parameters to achieve the best performance that we can. We report the results within 100 epochs by averaging three trials, because at this point the training of all the methods seems convergent already. For all competing algorithms, in each epoch the entire 5 0 10 20 30 40 50 60 70 80 90 100 # Epochs 0 0.5 1 1.5 2 2.5 Training Objective ×104 BCD BCD-S (a) Adadelta Adagrad Adam NesterovRmsprop SGD BCD BCD-S Solvers 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 Test Error (b) Adadelta Adagrad Adam NesterovRmsprop SGD BCD BCD-S Solvers 0 0.5 1 1.5 2 2.5 Relative Running Time (c) 1st 2nd 3rd 4th Fully-connected Layer 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Percentage of Nonzeros BCD BCD-S (d) Figure 3: (a) Illustration of convergence for BCD and BCD-S. (b) Test error comparison. (c) Running time comparison. (d) Sparseness comparison for BCD and BCD-S. training data is passed through once to update parameters. Therefore, for our algorithms each epoch is equivalent to one iteration, and there are 100 iterations in total. Convergence: Fig. 3(a) shows the change of training objective with increase of epochs for BCD and BCD-S, respectively. As we see both curves decrease monotonically and become flatter and flatter eventually, indicating that both algorithms converge. BCD-S converges much faster than BCD, but its objective is higher than BCD. This is because BCD-S learns sparse models that may not fit data as well as dense models learned by BCD. Testing Error: As mentioned in Sec. 3.2, here we utilize linear SVMs and last-layer hidden features extracted from training data to retrain the classifier. Based on the network in Fig. 2 the feature extraction function is ui,3 = max{0, xi + max{0, W1,0xi} + W3,2 max{0, xi + W2,1 max{0, W1,0xi}}}. To conduct fair comparison, we retrain the classifiers for all the algorithms, and summarize the test-time results in Fig. 3(b) with 100 epochs. Our BCD algorithm which learns dense architectures, same as the SGD based solvers, performs best, while our BCD-S algorithm works still better than the SGD competitors, although it learns much sparser networks. These results are consistent with the training objectives in Fig. 3(a) as well. Computational Time: We compare the training time in Fig. 3(c). It seems that our BCD implementation is significantly faster than the Caffe solvers. For instance, our BCD achieves about 2.5 times speed-up than the competitors, while achieving best classification performance at test time. Sparseness: In order to compare the difference in terms of weights between the dense and sparse networks learned by BCD and BCD-S, respectively, we compare the percentage of nonzero weights in each FC layer, and show the results in Fig. 3(d). As we see, expect the last FC layer (corresponding to parameter V as classifiers) BCD-S has the ability of learning much sparser networks for deep feature extraction. In our case BCD-S learns a network with 2.42% nonzero weights2, on average, with classification accuracy 1.34% lower than that of BCD which learns a network with 97.15% nonzero weights. Potentially this ability could be very useful in the scenarios such as embedding systems where sparse networks are desired. 3.3.2 Supervised Hashing To further demonstrate the usage of our approach, we compare with [41]3 for the application of supervised hashing, which is the state-of-the-art in the literature. [41] proposed an ADMM based 2Since we will retrain the classifiers after all, here we do not take the nonzeros in the last FC into account. 3MATLAB code is available at https://zimingzhang.wordpress.com/publications/. 6 optimization algorithm to train DNNs with relaxed objective that is very related to ours. We train the same DNN on MNIST as used in [41], i.e. with 48 hidden layers and 256 nodes per layer that are sequentially and fully connected (see [41] for more details on the network). Using the same image features, we consistently observe marginal improvement over the results (i.e. precision, recall, mAP) reported in [41]. However, on the same PC we can finish training within 1 hour based on our implementation, while using the MATLAB code for [41] the training needs about 9 hours. Similar observations can be made on CIFAR-10 as used in [41] using a network with 16 hidden layers and 1024 nodes per layer. 4 Convergence Analysis 4.1 Preliminaries Definition 2 (Lipschitz Continuity [13]). We say that function f is Lipschitz continuous with Lipschitz constant Lf on X, if there is a (necessarily nonnegative) constant Lf such that |f(x1) −f(x2)| ≤Lf|x1 −x2|, ∀x1, x2 ∈X. Definition 3 (Global Convergence [24]). Let X be a set and x0 ∈X a given point, Then an Algorithm, A, with initial point x0 is a point-to-set map A : X →P(X) which generates a sequence {xk}∞ k=1 via the rule xk+1 ∈A(xk), k = 0, 1, · · · . A is said to be global convergent if for any chosen initial point x0, the sequence {xk}∞ k=0 generated by xk+1 ∈A(xk) (or a subsequence) converges to a point for which a necessary condition of optimality holds. Definition 4 (R-linear Convergence Rate [30]). Let {xk} be a sequence in Rn that converges to x∗. We say that convergence is R-linear if there is a sequence of nonnegative scalars {vk} such that ∥xk −x∗∥≤vk, ∀k, and {vk} converges Q-linearly to zero. Lemma 1 (3-Point Property [1]). If function φ(w) is convex and ˆw = arg minw∈Rd φ(w) + 1 2∥w − w0∥2 2, then for any w ∈Rd, φ( ˆw) + 1 2∥ˆw −w0∥2 2 ≤φ(w) + 1 2∥w −w0∥2 2 −1 2∥w −ˆw∥2 2. 4.2 Theoretical Results Definition 5 (Assumptions on f in Eq. 4). Let f1( ˜U) ∆= f( ˜U, ·, ·), f2(V) ∆= f(·, V, ·), f3( ˜ W) ∆= f(·, ·, ˜ W) be the objectives of the three sub-problems, respectively. Then we assume that f is lower-bounded and f1, f2, f3 are Lipschitz continuous with constants Lf1, Lf2, Lf3, respectively. Proposition 3. Let x, y, ˆx ∈X and y = (1 −θ)x + θˆx. Then 1 2∥ˆx −y∥2 2 = 1 2 (1 −θ)2 ∥ˆx −x∥2 2. Lemma 2. Let X be a nonempty closed convex set, function φ : X →R is convex and Lipschitz continuous with constant L, and scalar 0 ≤θ ≤1. Suppose that ∀x ∈X, ˆx = arg minz∈X φ(z) + 1 2∥z −z0∥2 2 and z0 = y = (1 −θ)x + θˆx. Then we have 1 −θ θ ∥y −x∥2 2 ≤φ(x) −φ(y) ≤L∥y −x∥2 ⇒∥y −x∥2 ≤ Lθ 1 −θ. Proof. Based on the convexity of φ, Prop. 3, and Lemma 1, we have φ(x) −φ(y) ≥φ(x) −[(1 −θ) φ(x) + θφ(ˆx)] = θ [φ(x) −φ(ˆx)] ≥θ 1 2∥x −ˆx∥2 2 + 1 2∥ˆx −z0∥2 2 −1 2∥x −z0∥2 2 = θ (1 −θ) ∥x −ˆx∥2 2 = 1 −θ θ ∥y −x∥2 2, where ∥y −x∥2 2 = 0 if and only if ˆx = x (equivalently φ(x) = φ(y)); otherwise ∥y −x∥2 2 is lower-bounded from 0 provided that θ ̸= 1. Based on Def. 2, we have φ(x) −φ(y) ≤L∥y −x∥2. Theorem 1. Let n ˜U(t), V(t), ˜ W(t)o∞ t=1 ⊆U ×V×W be an arbitrary sequence from a closed convex set that is generated by Alg. 1. Suppose that 0 ≤θt ≤1, ∀t and the sequence nP∞ k=t θk 1−θk o∞ t=1 converges to zero. Then we have 7 1. ˜U(∞), V(∞), ˜ W(∞) is a stationary point; 2. n ˜U(t), V(t), ˜ W(t)o∞ t=1 will converge to ˜U(∞), V(∞), ˜ W(∞) globally with R-linear convergence rate. Proof. 1. Suppose that for ˜U(∞) there exists a △˜U ̸= ∅so that f1( ˜U(∞) + △˜U) = f1( ˜U(∞)) (otherwise, it conflicts with the fact of ˜U(∞) being the limit point). From Lemma 2, f1( ˜U(∞) + △˜U) = f1( ˜U(∞)) is equivalent to ˜U(∞) + △˜U = ˜U(∞), and thus △˜U = ∅, which conflicts with the assumption of △˜U ̸= ∅. Therefore, there is no direction that can decrease f1( ˜U(∞)), i.e. ∇f1( ˜U(∞)) = 0. Similarly we have ∇f2(V(∞)) = 0 and ∇f3( ˜ W(∞)) = 0. Therefore, ˜U(∞), V(∞), ˜ W(∞) is a stationary point. 2. Based on Def. 5 and Lemma 2, we have v u u t X ui,n∈˜U
u(t) i,n −u(∞) i,n
2 2 +
V(t) −V(∞)
2 F + X Wn,m∈˜ W
W(t) n,m −W(∞) n,m
2 F ≤ X ui,n∈˜U
u(t) i,n −u(∞) i,n
2 +
V(t) −V(∞)
F + X Wn,m∈˜ W
W(t) n,m −W(∞) n,m
F = X ui,n∈˜U
∞ X k=t u(k) i,n −u(k+1) i,n
2 +
∞ X k=t V(k) −V(k+1)
F + X Wn,m∈˜ W
∞ X k=t W(k) n,m −W(k+1) n,m
F ≤ ∞ X k=t X ui,n∈˜U
u(k) i,n −u(k+1) i,n
2 +
V(k) −V(k+1)
F + X Wn,m∈˜ W
W(k) n,m −W(k+1) n,m
F ≤ ∞ X k=t X ui,n∈˜U Lf1θk 1 −θk + Lf2θk 1 −θk + X Wn,m∈˜ W Lf3θk 1 −θk = O ∞ X k=t θk 1 −θk ! . By combining this with Def. 3 and Def. 4 we can complete the proof. Corollary 1. Let θt = 1 t p , ∀t. Then when p > 1, Alg. 1 will converge globally with order one. Proof. ∞ X k=t θk 1 −θk = ∞ X k=t 1 kp −1 ≤ Z ∞ tp−1 1 xd(x + 1) 1 p = 1 p Z ∞ tp−1 1 x(x + 1) 1 p −1dx ∵p>1 ≤ 1 p Z ∞ tp−1 x 1 p −2dx = (p −1)−1(tp −1) 1 p −1. (6) Since the sequence n (tp −1) 1 p −1o∞ t=1 , ∀p > 1 converges to zero sublinearly with order one, by combining these with Def. 4 and Thm. 1 we can complete the proof. 5 Conclusion In this paper we first propose a novel Tikhonov regularization for training DNNs with ReLU as the activation functions. The Tikhonov matrix encodes the network architecture as well as parameterization. With its help we reformulate the network training as a block multi-convex minimization problem. Accordingly we further propose a novel block coordinate descent (BCD) based algorithm, which is proven to converge globally to stationary points with R-linear converge rate of order one. Our empirical results suggest that our algorithm does converge, is suitable for learning both dense and sparse networks, and may work better than traditional SGD based deep learning solvers. 8 References [1] L. Baldassarre and M. Pontil. Advanced topics in machine learning part II 5. proximal methods. University Lecture, http://www0.cs.ucl.ac.uk/staff/l.baldassarre/lectures/ baldassarre_proximal_methods.pdf. [2] C. Baldassi, A. Ingrosso, C. Lucibello, L. Saglietti, and R. Zecchina. Subdominant dense clusters allow for simple learning and high computational performance in neural networks with discrete synapses. Physical review letters, 115(12):128101, 2015. [3] H. H. Bauschke and J. M. Borwein. On projection algorithms for solving convex feasibility problems. SIAM review, 38(3):367–426, 1996. [4] Y. Bengio. How auto-encoders could provide credit assignment in deep networks via target propagation. arXiv preprint arXiv:1407.7906, 2014. [5] L. Bottou. Stochastic gradient descent tricks. In Neural networks: Tricks of the trade, pages 421–436. Springer, 2012. [6] L. Bottou, F. E. Curtis, and J. Nocedal. Optimization methods for large-scale machine learning. arXiv preprint arXiv:1606.04838, 2016. [7] S. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eckstein. Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundations and Trends R⃝in Machine Learning, 3(1):1–122, 2011. [8] P. Chaudhari, A. Choromanska, S. Soatto, and Y. LeCun. Entropy-sgd: Biasing gradient descent into wide valleys. arXiv preprint arXiv:1611.01838, 2016. [9] P. Chaudhari, A. Oberman, S. Osher, S. Soatto, and G. Carlier. Deep relaxation: partial differential equations for optimizing deep neural networks. arXiv preprint arXiv:1704.04932, 2017. [10] A. Choromanska, M. Henaff, M. Mathieu, G. B. Arous, and Y. LeCun. The loss surfaces of multilayer networks. In AISTATS, 2015. [11] Y. N. Dauphin, R. Pascanu, C. Gulcehre, K. Cho, S. Ganguli, and Y. Bengio. Identifying and attacking the saddle point problem in high-dimensional non-convex optimization. In NIPS, pages 2933–2941, 2014. [12] J. Duchi, E. Hazan, and Y. Singer. Adaptive subgradient methods for online learning and stochastic optimization. JMLR, 12(Jul):2121–2159, 2011. [13] K. Eriksson, D. Estep, and C. Johnson. Applied Mathematics Body and Soul: Vol I-III. Springer-Verlag Publishing, 2003. [14] Y. Gal and Z. Ghahramani. On modern deep learning and variational inference. In Advances in Approximate Bayesian Inference workshop, NIPS, 2015. [15] S. Ghadimi and G. Lan. Stochastic first-and zeroth-order methods for nonconvex stochastic programming. SIAM Journal on Optimization, 23(4):2341–2368, 2013. [16] X. Glorot and Y. Bengio. Understanding the difficulty of training deep feedforward neural networks. In AISTATS, pages 249–256, 2010. [17] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, pages 770–778, 2016. [18] S. Hochreiter, Y. Bengio, and P. Frasconi. Gradient flow in recurrent nets: the difficulty of learning long-term dependencies. In J. Kolen and S. Kremer, editors, Field Guide to Dynamical Recurrent Networks. IEEE Press, 2001. [19] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. [20] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. In ACM Multimedia, pages 675–678. ACM, 2014. [21] D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [22] D. P. Kingma, T. Salimans, and M. Welling. Variational dropout and the local reparameterization trick. In NIPS, pages 2575–2583, 2015. [23] A. Krogh and J. A. Hertz. A simple weight decay can improve generalization. In NIPS, pages 950–957, 1991. [24] G. R. Lanckriet and B. K. Sriperumbudur. On the convergence of the concave-convex procedure. In NIPS, pages 1759–1767, 2009. [25] Y. LeCun, Y. Bengio, and G. Hinton. Deep learning. Nature, 521(7553):436–444, 2015. [26] Y. LeCun, C. Cortes, and C. J. Burges. The mnist database of handwritten digits, 1998. [27] Y. Nesterov. Efficiency of coordinate descent methods on huge-scale optimization problems. SIAM Journal on Optimization, 22(2):341–362, 2012. [28] Y. Nesterov and A. Nemirovskii. Interior-point polynomial algorithms in convex programming. SIAM, 1994. [29] R. Nishihara, L. Lessard, B. Recht, A. Packard, and M. I. Jordan. A general analysis of the convergence of admm. In ICML, pages 343–352, 2015. [30] J. Nocedal and S. J. Wright. Numerical optimization. Springer, 1st. ed. 1999. corr. 2nd printing edition, Aug. 1999. [31] M. Razaviyayn, M. Hong, Z.-Q. Luo, and J.-S. Pang. Parallel successive convex approximation for nonsmooth nonconvex optimization. In NIPS, pages 1440–1448, 2014. [32] N. Srivastava, G. E. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. JMLR, 15(1):1929–1958, 2014. 9 [33] I. Sutskever, J. Martens, G. E. Dahl, and G. E. Hinton. On the importance of initialization and momentum in deep learning. In ICML, pages 1139–1147, 2013. [34] G. Taylor, R. Burmeister, Z. Xu, B. Singh, A. Patel, and T. Goldstein. Training neural networks without gradients: A scalable admm approach. In ICML, 2016. [35] T. Tieleman and G. Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural networks for machine learning, 4(2), 2012. [36] Y. Wang, W. Yin, and J. Zeng. Global convergence of admm in nonconvex nonsmooth optimization. arXiv preprint arXiv:1511.06324, 2015. [37] R. A. Willoughby. Solutions of ill-posed problems (an tikhonov and vy arsenin). SIAM Review, 21(2):266, 1979. [38] Y. Xu and W. Yin. A block coordinate descent method for regularized multiconvex optimization with applications to nonnegative tensor factorization and completion. SIAM Journal on imaging sciences, 6(3):1758–1789, 2013. [39] Y. Xu and W. Yin. A globally convergent algorithm for nonconvex optimization based on block coordinate update. arXiv preprint arXiv:1410.1386, 2014. [40] M. D. Zeiler. Adadelta: an adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012. [41] Z. Zhang, Y. Chen, and V. Saligrama. Efficient training of very deep neural networks for supervised hashing. In CVPR, June 2016. 10 | 2017 | 273 |
6,756 | Bayesian Inference of Individualized Treatment Effects using Multi-task Gaussian Processes Ahmed M. Alaa Electrical Engineering Department University of California, Los Angeles ahmedmalaa@ucla.edu Mihaela van der Schaar Department of Engineering Science University of Oxford mihaela.vanderschaar@eng.ox.ac.uk Abstract Predicated on the increasing abundance of electronic health records, we investigate the problem of inferring individualized treatment effects using observational data. Stemming from the potential outcomes model, we propose a novel multitask learning framework in which factual and counterfactual outcomes are modeled as the outputs of a function in a vector-valued reproducing kernel Hilbert space (vvRKHS). We develop a nonparametric Bayesian method for learning the treatment effects using a multi-task Gaussian process (GP) with a linear coregionalization kernel as a prior over the vvRKHS. The Bayesian approach allows us to compute individualized measures of confidence in our estimates via pointwise credible intervals, which are crucial for realizing the full potential of precision medicine. The impact of selection bias is alleviated via a risk-based empirical Bayes method for adapting the multi-task GP prior, which jointly minimizes the empirical error in factual outcomes and the uncertainty in (unobserved) counterfactual outcomes. We conduct experiments on observational datasets for an interventional social program applied to premature infants, and a left ventricular assist device applied to cardiac patients wait-listed for a heart transplant. In both experiments, we show that our method significantly outperforms the state-of-the-art. 1 Introduction Clinical trials entail enormous costs: the average costs of multi-phase trials in vital therapeutic areas such as the respiratory system, anesthesia and oncology are $115.3 million, $105.4 million, and $78.6 million, respectively [1]. Moreover, due to the difficulty of patient recruitment, randomized controlled trials often exhibit small sample sizes, which hinders the discovery of heterogeneous therapeutic effects across different patient subgroups [2]. Observational studies are cheaper and quicker alternatives to clinical trials [3, 4]. With the advent of electronic health records (EHRs), currently deployed in more than 75% of hospitals in the U.S. according to the latest ONC data brief1, there is a growing interest in using machine learning to infer heterogeneous treatment effects from readily available observational data in EHRs. This interest glints in recent initiatives such as STRATOS [3], which focuses on guiding observational medical research, in addition to various recent works on causal inference from observational data developed by the machine learning community [4-11]. Motivated by the plethora of EHR data and the potentiality of precision medicine, we address the problem of estimating individualized treatment effects (i.e. causal inference) using observational data. The problem differs from standard supervised learning in that for every subject in an observational cohort, we only observe the "factual" outcome for a specific treatment assignment, but never observe the corresponding "counterfactual" outcome2, without which we can never know the true 1https://www.healthit.gov/sites/default/files/briefs/ 2Some works refer to this setting as the "logged bandits with feedback" [12, 13]. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. treatment effect [4-9]. Selection bias creates a discrepancy in the feature distributions for the treated and control patient groups, which makes the problem even harder. Much of the classical works have focused on the simpler problem of estimating average treatment effects via unbiased estimators based on propensity score weighting (see [14] and the references therein). More recent works learn individualized treatment effects via regression models that view the subjects’ treatment assignments as input features [4-13]. We provide a thorough review on these works in Section 3. Contribution At the heart of this paper lies a novel conception of causal inference as a multi-task learning problem. That is, we view a subject’s potential outcomes as the outputs of a vector-valued function in a reproducing kernel Hilbert space (vvRKHS) [15]. We propose a Bayesian approach for learning the treatment effects through a multi-task Gaussian process (GP) prior over the populations’ potential outcomes. The Bayesian perspective on the multi-task learning problem allows reasoning about the unobserved counterfactual outcomes, giving rise to a loss function that quantifies the Bayesian risk of the estimated treatment effects while taking into account the uncertainty in counterfactual outcomes without explicit propensity modeling. Furthermore, we show that optimizing the multi-task GP hyper-parameters via risk-based empirical Bayes [16] is equivalent to minimizing the empirical error in the factual outcomes, with a regularizer that is proportional to the posterior uncertainty (variance) in counterfactual outcomes. We provide a feature space interpretation of our method showing its relation to previous works on domain adaptation [6, 8], empirical risk minimization [13], and tree-based learning [4, 5, 7, 9]. The Bayesian approach allows us to compute individualized measures of confidence in our estimates via pointwise credible intervals. With the exception of [5] and [9], all previous works do not associate their estimates with confidence measures, which hinders their applicability in formal medical research. While Bayesian credible sets do not guarantee frequentist coverage, recent results on the "honesty" (i.e. frequentist coverage) of adaptive credible sets in nonparametric regression may extend to our setting [16]. In particular, [Theorem 1, 16] shows that –under some extrapolation conditions– adapting a GP prior via risk-based empirical Bayes guarantees honest credible sets: investigating the validity of these results in our setting is an interesting topic for future research. 2 Problem Setup We consider the setting in which a specific treatment is applied to a population of subjects, where each subject i possesses a d-dimensional feature Xi ∈X, and two (random) potential outcomes Y (1) i , Y (0) i ∈R that are drawn from a distribution (Y (1) i , Y (0) i )|Xi = x ∼P(.|Xi = x), and correspond to the subject’s response with and without the treatment, respectively. The realized causal effect of the treatment on subject i manifests through the random variable (Y (1) i −Y (0) i ) | Xi = x. Hence, we define the individualized treatment effect (ITE) for subjects with a feature Xi = x as T(x) = E [ Y (1) i −Y (0) i Xi = x ] . (1) Our goal is to conduct the causal inference task of estimating the function T(x) from an observational dataset D, which typically comprises n independent samples of the random tuple {Xi, Wi, Y (Wi) i }, where Wi ∈{0, 1} is a treatment assignment indicator that indicates whether or not subject i has received the treatment under consideration. The outcomes Y (Wi) i and Y (1−Wi) i are known as the factual and the counterfactual outcomes, respectively [6, 9]. Treatment assignments are generally dependent on features, i.e. Wi ̸⊥⊥Xi. The conditional distribution P(Wi = 1|Xi = x), also known as the propensity score of subject i [13, 14], reflects the underlying policy for assigning the treatment to subjects. Throughout this paper, we respect the standard assumptions of unconfoundedness (or ignorability) and overlap: this setting is known in the literature as the "potential outcomes model with unconfoundedness" [4-11]. Individual-based causal inference using observational data is challenging. Since we only observe one of the potential outcomes for every subject i, we never observe the treatment effect Y (1) i −Y (0) i for any of the subjects, and hence we cannot resort to standard supervised learning to estimate T(x). Moreover, the dataset D exhibits selection bias, which may render the estimates of T(x) inaccurate if the treatment assignment for individuals with Xi = x is strongly biased (i.e. P(Wi = 1|Xi = x) is close to 0 or 1). Since our primary motivation for addressing this problem comes from its application potential in precision medicine, it is important to associate our estimate of T(.) with a pointwise measure of confidence in order to properly guide therapeutic decisions for individual patients. 2 3 Multi-task Learning for Causal Inference Vector-valued Potential Outcomes Function We adopt the following signal-in-white-noise model for the potential outcomes: Y (w) i = fw(Xi) + ϵi,w, w ∈{0, 1}, (2) where ϵi,w ∼N(0, σ2 w) is a Gaussian noise variable. It follows from (2) that E[Y (w) i | Xi = x] = fw(x), and hence the ITE can be estimated as ˆT(x) = ˆf1(x) −ˆf0(x). Most previous works that estimate T(x) via direct modeling learn a single-output regression model that treats the treatment assignment as an input feature, i.e. fw(x) = f(x, w), f(., .) : X × {0, 1} →R, and estimate the ITE as ˆT(x) = ˆf(x, 1) −ˆf(x, 0) [5-9]. We take a different perspective by introducing a new multi-output regression model comprising a potential outcomes (PO) function f(.) : X →R2, with d inputs (features) and 2 outputs (potential outcomes); the ITE estimate is the projection of the estimated PO function on the vector e = [−1 1]T , i.e. ˆT(x) = ˆf T (x) e. Consistent pointwise estimation of the ITE function T(x) requires restricting the PO function f(x) to a smooth function class [9]. To this end, we model the PO function f(x) as belonging to a vector-valued Reproducing Kernel Hilbert Space (vvRKHS) HK equipped with an inner product ⟨., .⟩HK, and with a reproducing kernel K : X × X →R2×2, where K is a (symmetric) positive semi-definite matrix-valued function [15]. Our choice for the vvRKHS is motivated by its algorithmic advantages; by virtue of the representer theorem, we know that learning the PO function entails estimating a finite number of coefficients evaluated at the input points {Xi}n i=1 [17]. Multi-task Learning The vector-valued model for the PO function conceptualizes causal inference as a multi-task learning problem. That is, D = {Xi, Wi, Y (Wi) i }n i=1 can be thought of as comprising training data for two learning tasks with target functions f0(.) and f1(.), with Wi acting as the "task index" for the ith training point [15]. For an estimated PO function ˆf(x), the true loss functional is L(ˆf) = ∫ x∈X ( ˆf T (x) e −T(x) )2 · P(X = x) dx. (3) The loss functional in (3) is known as the precision in estimating heterogeneous effects (PEHE), and is commonly used to quantify the "goodness" of ˆT(x) as an estimate of T(x) [4-6, 8]. A conspicuous challenge that arises when learning the "PEHE-optimal" PO function f is that we cannot compute the empirical PEHE for a particular f ∈HK since the treatment effect samples {Y (1) i −Y (0) i }n i=1 are not available in D. On the other hand, using a loss function that evaluates the losses of f0(x) and f1(x) separately (as in conventional multi-task learning [Sec. 3.2, 15]) can be highly problematic: in the presence of a strong selection bias, the empirical loss for f(.) with respect to factual outcomes may not generalize to counterfactual outcomes, leading to a large PEHE loss. In order to gain insight into the structure of the optimal PO function, we consider an "oracle" that has access to counterfactual outcomes. For such an oracle, the finite-sample empirical PEHE is ˆL(ˆf; K, Y(W), Y(1−W)) = 1 n n ∑ i=1 ( ˆf T (Xi) e −(1 −2Wi) ( Y (1−Wi) i −Y (Wi) i ))2 , (4) where Y(W) = [Y (Wi) i ]i and Y(1−W) = [Y (1−Wi) i ]i. When Y(1−W) is accessible, the PEHEoptimal PO function f(.) is given by the following representer Theorem. Theorem 1 (Representer Theorem for Oracle Causal Inference). For any ˆf ∗∈HK satisfying ˆf ∗= arg min ˆf∈HK ˆL(ˆf; K, Y(W), Y(1−W)) + λ ||ˆf||2 HK, λ ∈R+, (5) we have that ˆT ∗(.) = eTˆf ∗(.) ∈span{ ˜K(., X1), . . . , ˜K(., Xn)}, where ˜K(., .) = eT K(., .) e. That is, ˆT ∗(.) admits a representation ˆT ∗(.) = ∑n i=1 αi ˜K(., Xi), α = [α1, . . . , αn]T , where α = ( ˜K(X, X) + n λ I)−1((1 −2W) ⊙(Y(1−W) −Y(W))), (6) where ⊙denotes component-wise product, ˜K(X, X) = ( ˜K(Xi, Xj))i,j, W = [W1, . . . , Wn]T . □ 3 A Bayesian Perspective Theorem 1 follows directly from the generalized representer Theorem [17] (A proof is provided in [17]), and it implies that regularized empirical PEHE minimization in vvRKHS is equivalent to Bayesian inference with a Gaussian process (GP) prior [Sec. 2.2, 15]. Therefore, we can interpret ˆT ∗(.) as the posterior mean of T(.) given a GP prior with a covariance kernel ˜K, i.e. T ∼GP(0, ˜K). We know from Theorem 1 that ˜K = eT Ke, hence the prior on T(.) is equivalent to a multi-task GP prior on the PO function f(.) with a kernel K, i.e. f ∼GP(0, K). The Bayesian view of the problem is advantageous for two reasons. First, as discussed earlier, it allows computing individualized (pointwise) measures of uncertainty in ˆT(.) via posterior credible intervals. Second, it allows reasoning about the unobserved counterfactual outcomes in a Bayesian fashion, and hence provides a natural proxy for the oracle learner’s empirical PEHE in (4). Let θ ∈Θ be a kernel hyper-parameter that parametrizes the multi-task GP kernel Kθ. We define the Bayesian PEHE risk R(θ,ˆf; D) for a point estimate ˆf as follows R(θ,ˆf; D) = Eθ [ ˆL(ˆf; Kθ, Y(W), Y(1−W)) D ] . (7) The expectation in (7) is taken with respect to Y(1−W)|D. The Bayesian PEHE risk R(θ,ˆf; D) is simply the oracle learner’s empirical loss in (4) marginalized over the posterior distribution of the unobserved counterfactuals Y(1−W), and hence it incorporates the posterior uncertainty in counterfactual outcomes without explicit propensity modeling. The optimal hyper-parameter θ∗and interpolant ˆf ∗(.) that minimize the Bayesian PEHE risk are given in the following Theorem. Theorem 2 (Risk-based Empirical Bayes). The minimizer (ˆf ∗, θ∗) of R(θ,ˆf; D) is given by ˆf ∗= Eθ∗[ f | D ], θ∗= arg min θ∈Θ
Y(W) −Eθ[ f | D ]
2 2 | {z } Empirical factual error +
Varθ[ Y(1−W) | D ]
1 | {z } Posterior counterfactual variance , where Varθ[.|.] is the posterior variance and ∥.∥p is the p-norm. □ The proof is provided in Appendix A. Theorem 2 shows that hyper-parameter selection via riskbased empirical Bayes is instrumental in alleviating the impact of selection bias. This is because, as the Theorem states, θ∗minimizes the empirical loss of ˆf ∗with respect to factual outcomes, and uses the posterior variance of the counterfactual outcomes as a regularizer. Hence, θ∗carves a kernel that not only fits factual outcomes, but also generalizes well to counterfactuals. It comes as no surprise that ˆf ∗= Eθ∗[ f | D ]; Eθ∗[ f | D, Y(1−W) ] is equivalent to the oracle’s solution in Theorem 1, hence by the law of iterated expectations, Eθ∗[ f | D ] = Eθ∗[ Eθ∗[ f | D, Y(1−W) ] | D ] is the oracle’s solution marginalized over the posterior distribution of counterfactuals. Figure 1: Pictorial depiction for model selection via risk-based empirical Bayes. Related Works A feature space interpretation of Theorem 2 helps creating a conceptual equivalence between our method and previous works. For simplicity of exposition, consider a finitedimensional vvRKHS in which the PO function resides: we can describe such a space in terms of a feature map Φ : X →Rp, where K(x, x′) = ⟨Φ(x), Φ(x′)⟩[Sec. 2.3, 15]. Every PO function f ∈HK can be represented as f = ⟨α, Φ(x)⟩, and hence the two response surfaces fo(.) and f1(.) 4 are represented as hyperplanes in the transformed feature space as depicted in Fig. 1 (right). The risk-based empirical Bayes method attempts to find a feature map Φ and two hyperplanes that best fit the factual outcomes (right panel in Fig. 1) while minimizing the posterior variance in counterfactual outcomes (middle panel in Fig. 1). This conception is related to that of counterfactual regression [6, 8], which builds on ideas from co-variate shift and domain adaptation [19] in order to jointly learn a response function f and a "balanced" representation Φ that makes the distributions P(Φ(Xi = x)|Wi = 1) and P(Φ(Xi = x)|Wi = 0) similar. Our work differs from [6, 8] in the following aspects. First, our Bayesian multi-task formulation provides a direct estimate of the PEHE: (7) is an unbiased estimator of the finite-sample version of (3). Contrarily, [Eq. 2, 6] creates a coarse proxy for the PEHE by using the nearest-neighbor factual outcomes in replacement of counterfactuals, whereas [Eq. 3, 8] optimizes a generalization bound which may largely overestimate the true PEHE for particular hypothesis classes. [6] optimizes the algorithm’s hyper-parameters by assuming (unrealistically) that counterfactuals are available in a held-out sample, whereas [8] uses an ad hoc nearest-neighbor approximation. Moreover, unlike the case in [6], our multi-task formulation protects the interactions between Wi and Xi from being lost in high-dimensional feature spaces. Most of the previous works estimate the ITE via co-variate adjustment (G-computation formula) [4, 5, 7, 11, 20]; the most remarkable of these methods are the nonparametric Bayesian additive regression trees [5] and causal forests [4, 9]. We provide numerical comparisons with both methods in Section 5. [11] also uses Gaussian processes, but with the focus of modeling treatment response curves over time. Counterfactual risk minimization is another framework that is applicable only when the propensity score P(Wi = 1|Xi = x) is known [12, 13]. [25] uses deep networks to infer counterfactuals, but requires some of the data to be drawn from a randomized trial. 4 Causal Multi-task Gaussian Processes (CMGPs) In this Section, we provide a recipe for Bayesian causal inference with the prior f ∼GP(0, Kθ). We call this model a Causal Multi-task Gaussian Process (CMGP). Constructing the CMGP Kernel As it is often the case in medical settings, the two response surfaces f0(.) and f1(.) may display different levels of heterogeneity (smoothness), and may have different relevant features. Standard intrinsic coregionalization models for constructing vector-valued kernels impose the same covariance parameters for all outputs [18], which limits the interaction between the treatment assignments and the patients’ features. To that end, we construct a linear model of coregionalization (LMC) [15], which mixes two intrinsic coregionalization models as follows Kθ(x, x′) = A0 k0(x, x′) + A1 k1(x, x′), (8) where kw(x, x′), w ∈{0, 1}, is the radial basis function (RBF) with automatic relevance determination, i.e. kw(x, x′) = exp ( −1 2(x −x′)T R−1 w (x −x′) ) , Rw = diag(ℓ2 1,w, ℓ2 2,w, . . . , ℓ2 d,w), with ℓd,w being the length scale parameter of the dth feature in kw(., .), whereas A0 and A1 are given by A0 = [ β2 00 ρ0 ρ0 β2 01 ] , A1 = [ β2 10 ρ1 ρ1 β2 11 ] . (9) The parameters (β2 ij)ij and (ρi)i determine the variances and correlations of the two response surfaces f0(x) and f1(x). The LMC kernel introduces degrees of freedom that allow the two response surfaces to have different covariance functions and relevant features. When β00 >> β01 and β11 >> β10, the length scale parameter ℓd,w can be interpreted as the relevance of the dth feature to the response surface fw(.). The set of all hyper-parameters is θ = (σ0, σ1, R0, R1, A0, A1). Adapting the Prior via Risk-based Empirical Bayes In order to avoid overfitting to the factual outcomes Y(W), we evaluate the empirical error in factual outcomes via leave-one-out cross-validation (LOO-CV) with Bayesian regularization [24]; the regularized objective function is thus given by ˆR(θ; D) = η0 Q(θ) + η1 ∥θ∥2 2, where Q(θ) =
Varθ[ Y(1−W) | D ]
1 + n ∑ i=1 ( Y (Wi) i −Eθ[f(Xi) | D−i] )2 , (10) and D−i is the dataset D with subject i removed, whereas η0 and η1 are the Bayesian regularization parameters. For the second level of inference, we use the improper Jeffrey’s prior as an ignorance 5 prior for the regularization parameters, i.e. P(η0) ∝ 1 η0 and P(η1) ∝ 1 η1 . This allows us to integrate out the regularization parameters [Sec. 2.1, 24], leading to a revised objective function ˆR(θ; D) = n log(Q(θ)) + (10 + 2 d) log(∥θ∥2 2) [Eq. (15), 24]. It is important to note that LOO-CV with squared loss has often been considered to be unfavorable in ordinary GP regression as it leaves one degree of freedom undetermined [Sec. 5.4.2, 5]; this problem does not arise in our setting since the term
Varθ[ Y(1−W) | D ]
1 involves all the variance parameters, and hence the objective function ˆR(θ; D) does not depend solely on the posterior mean. Causal Inference via CMGPs Algorithm 1 sums up the entire causal inference procedure. It first invokes the routine Initialize-hyperparameters, which uses the sample variance and upcrossing rate of Y(W) to initialize θ (see Appendix B). Such an automated initialization procedure allows running our method without any user-defined inputs, which facilitates its usage by researchers conducting observational studies. Having initialized θ (line 3), the algorithm finds a locally optimal θ∗using gradient descent (lines 5-12), and then estimates the ITE function and the associated credible intervals (lines 13-17). (X = [{Xi}Wi=0, {Xi}Wi=1]T , Y = [{Y (Wi) i }Wi=0, {Y (Wi) i }Wi=1]T , Σ = diag(σ2 0 In−n1, σ2 1 In1), n1 = ∑ i Wi, erf(x) = 1 √π ∫x −x e−y2dy, and Kθ(x) = (Kθ(x, Xi))i.) We use a re-parametrized version of the Adaptive Moment Estimation (ADAM) gradient descent algorithm for optimizing θ [21]; we first apply a transformation ϕ = exp(θ) to ensure that all covariance parameters remain positive, and then run ADAM to minimize ˆR(log(ϕt); D). The ITE function is estimated as the posterior mean of the CMGP (line 14). The credible interval Cγ(x) with a Bayesian coverage of γ for a subject with feature x is defined as Pθ(T(x) ∈Cγ(x)) = γ, and is computed straightforwardly using the error function of the normal distribution (lines 15-17). The computational burden of Algorithm 1 is dominated by the O(n3) matrix inversion in line 13; for large observational studies, this can be ameliorated using conventional sparse approximations [Sec. 8.4, 23]. Algorithm 1 Causal Inference via CMGPs 1: Input: Observational dataset D, Bayesian coverage γ 2: Output: ITE function ˆT(x), credible intervals Cγ(x) 3: θ ←Initialize-hyperparameters(D) 4: ϕ0 ←exp(θ), t ←0, mt ←0, vt ←0, 5: repeat 6: mt+1 ←β1 mt +(1−β1) · ϕt ⊙∇ϕ ˆR(log(ϕt); D) 7: vt+1 ←β2 vt+(1−β2) · (ϕt ⊙∇ϕ ˆR(log(ϕt); D))2 8: ˆmt+1 ←mt/(1 −βt 1), ˆvt+1 ←vt/(1 −βt 2) 9: ϕt+1 ←ϕt ⊙exp ( −η · ˆmt+1/(√ˆvt+1 + ϵ) ) 10: t ←t + 1 11: until convergence 12: θ∗ ←log(ϕt−1) 13: Λθ∗←(Kθ∗(X, X) + Σ)−1 14: ˆT(x) ←(KT θ∗(x) Λθ∗Y)T e 15: V(x) ←Kθ∗(x, x) −Kθ∗(x) Λθ∗KT θ∗(x) 16: ˆI(x) ←erf−1(γ) (2eT V(x)e) 1 2 17: Cγ(x) ←[ ˆT(x) −ˆI(x), ˆT(x) + ˆI(x)] 5 Experiments Since the ground truth counterfactual outcomes are never available in real-world observational datasets, evaluating causal inference algorithms is not straightforward. We follow the semi-synthetic experimental setup in [5, 6, 8], where covariates and treatment assignments are real but outcomes are simulated. Experiments are conducted using the IHDP dataset introduced in [5]. We also introduce a new experimental setup using the UNOS dataset: an observational dataset involving end-stage cardiovascular patients wait-listed for heart transplantation. Finally, we illustrate the clinical utility and significance of our algorithm by applying it to the real outcomes in the UNOS dataset. The IHDP dataset The Infant Health and Development Program (IHDP) is intended to enhance the cognitive and health status of low birth weight, premature infants through pediatric follow-ups and parent support groups [5]. The semi-simulated dataset in [5, 6, 8] is based on covariates from a real randomized experiment that evaluated the impact of the IHDP on the subjects’ IQ scores at the age of three: selection bias is introduced by removing a subset of the treated population. All outcomes (response surfaces) are simulated. The response surface data generation process was not designed to favor our method: we used the standard non-linear "Response Surface B" setting in [5] 6 (also used in [6] and [8]). The dataset comprises 747 subjects (608 control and 139 treated), and there are 25 covariates associated with each subject. The UNOS dataset3 The United Network for Organ Sharing (UNOS) dataset contains information on every heart transplantation event in the U.S. since 1987. The dataset also contains information on patients registered in the heart transplantation wait-list over the years, including those who died before undergoing a transplant. Left Ventricular Assistance Devices (LVADs) were introduced in 2001 as a life-saving therapy for patients awaiting a heart donor [26]; the survival benefits of LVADs are very heterogeneous across the patients’ population, and it is unclear to practitioners how outcomes vary across patient subgroups. It is important to learn the heterogeneous survival benefits of LVADs in order to appropriately re-design the current transplant priority allocation scheme [26]. We extracted a cohort of patients enrolled in the wait-list in 2010; we chose this year since by that time the current continuous-flow LVAD technology became dominant in practice, and patients have been followed up sufficiently long to assess their survival. (Details of data processing is provided in Appendix C.) After excluding pediatric patients, the cohort comprised 1,006 patients (774 control and 232 treated), and there were 14 covariates associated with each patient. The outcomes (survival times) generation model is described as follows: σ0 = σ1 = 1, f0(x) = exp((x + 1 2) Ω), and f1(x) = Ωx −ω, where Ωis a random vector of regression coefficients sampled uniformly from [0, 0.1, 0.2, 0.3, 0.4], and ω is selected for a given Ωso as to adjust the average survival benefit to 5 years. In order to increase the selection bias, we estimate the propensity score P(Wi = 1|Xi = x) using logistic-regression, and then, sequentially, with probability 0.5 we remove the control patient whose propensity score is closest to 1, and with probability 0.5 we remove a random control patient. A total of 200 patients are removed, leading to a cohort with 806 patients. The resulting dataset is more biased than IHDP, and hence poses a greater inferential challenge. Table 1: Results on the IHDP and UNOS datasets (lower √ PEHE is better). IHDP UNOS In-sample Out-of-sample In-sample Out-of-sample √ PEHE √ PEHE √ PEHE √ PEHE ♡ CMGP 0.59 ± 0.01 0.76 ± 0.01 1.7 ± 0.10 1.8 ± 0.13 GP 2.1 ± 0.11 2.3 ± 0.14 4.1 ± 0.15 4.5 ± 0.20 ♣ BART 2.0 ± 0.13 2.2 ± 0.17 3.5 ± 0.17 3.9 ± 0.23 CF 2.4 ± 0.21 2.8 ± 0.23 3.8 ± 0.25 4.3 ± 0.31 VTRF 1.4 ± 0.07 2.2 ± 0.16 4.5 ± 0.35 4.9 ± 0.41 CFRF 2.7 ± 0.24 2.9 ± 0.25 4.7 ± 0.21 5.2 ± 0.32 ♠ BLR 5.9 ± 0.31 6.1 ± 0.41 5.7 ± 0.21 6.2 ± 0.30 BNN 2.1 ± 0.11 2.2 ± 0.13 3.2 ± 0.10 3.3 ± 0.12 CFRW 1.0 ± 0.07 1.2 ± 0.08 2.7 ± 0.07 2.9 ± 0.11 ⋆ kNN 3.2 ± 0.12 4.2 ± 0.22 5.2 ± 0.11 5.4 ± 0.12 PSM 4.9 ± 0.31 4.9 ± 0.31 4.6 ± 0.12 4.8 ± 0.16 ♢ TML 5.2 ± 0.35 5.2 ± 0.35 6.2 ± 0.31 6.2 ± 0.31 Benchmarks We compare our algorithm with: ♣Tree-based methods (BART [5], causal forests (CF) [4, 9], virtual-twin random forests (VTRF) [7], and counterfactual random forests (CFRF) [7]), ♠Balancing counterfactual regression (Balancing linear regression (BLR) [6], balancing neural networks (BNN) [6], and counterfactual regression with Wasserstein distance metric (CFRW) [8]), ⋆Propensity-based and matching methods (k nearest-neighbor (kNN), propensity score matching (PSM)), ♢Doubly-robust methods (Targeted maximum likelihood (TML) [22]), and ♡Gaussian process-based methods (separate GP regression for treated and control with marginal likelihood maximization (GP)). Details of all these benchmarks are provided in Appendix D. Following [4-9], we evaluate the performance of all algorithms by reporting the square-root of PEHE = 1 n ∑n i=1((f1(Xi) −f0(Xi)) −E[Y (1) i −Y (0) i |Xi = x])2, where f1(Xi) −f0(Xi) is 3https://www.unos.org/data/ 7 the estimated treatment effect. We evaluate the PEHE via a Monte Carlo simulation with 1000 realizations of both the IHDP and UNOS datasets, where in each experiment we run all the benchmarks with 60/20/20 train-validation-test splits. Counterfactuals are never made available to any of the benchmarks. We run Algorithm 1 with the a learning rate of 0.01 and with the standard setting prescribed in [21] (i.e. β1 = 0.9, β2 = 0.999, ϵ = 10−8). We report both the in-sample and out-of-sample PEHE estimates: the former corresponds to the accuracy of the estimated ITE in a retrospective cohort study, whereas the latter corresponds to the performance of a clinical decision support system that provides out-of-sample patients with ITE estimates [8]. The in-sample PEHE metrics is non-trivial since we never observe counterfactuals even in the training phase. Results As can be seen in Table 1, CMGPs outperform all other benchmarks in terms of the PEHE in both the IHDP and UNOS datasets. The benefit of the risk-based empirical Bayes method manifest in the comparison with ordinary GP regression that fits the treated and control populations by evidence maximization. The performance gain of CMGPs with respect to GPs increase in the UNOS dataset as it exhibits a larger selection bias, hence naïve GP regression tends to fit a function to the factual outcomes that does not generalize well to counterfactuals. Our algorithm is also performing better than all other nonparametric tree-based algorithms. In comparison to BART, our algorithm places an adaptive prior on a smooth function space, and hence it is capable of achieving faster posterior contraction rates than BART, which places a prior on a space of discontinuous functions [16]. Similar insights apply to the frequentist random forest algorithms. CMGPs also outperform the different variants of counterfactual regression in both datasets, though CFRW is competitive in the IHDP experiment. BLR performs badly in both datasets as it balances the distributions of the treated and control populations by variable selection, and hence it throws away informative features for the sake of balancing the selection bias. The performance gain of CMGPs with respect to BNN and CFRW shows that the multi-task learning framework is advantageous: through the linear coregionalization kernel, CMGPs preserves the interactions between Wi and Xi, and hence is capable of capturing highly non-linear (heterogeneous) response surfaces. Figure 2: Pathway for a representative patient in the UNOS dataset. 6 Discussion: Towards Precision Medicine To provide insights into the clinical utility of CMGPs, we ran our algorithm on all patients in the UNOS dataset who were wait-listed in the period 2005-2010, and used the real patient survival times as outcomes. The current transplant priority allocation scheme relies on a coarse categorization of patients that does not take into account their individual risks; for instance, all patients who have an LVAD are thought of as benefiting from it equally. We found a substantial evidence in the data that this leads to wrong clinical decision. In particular, we found that 10.3% of wait-list patients for whom an LVAD was implanted exhibit a delayed assignment to a high priority allocation in the wait-list. One of such patients has her pathway depicted in Fig. 2: she was assigned a high priority (status 1A) in June 2013, but died shortly after, before her turn to get a heart transplant. Her late assignment to the high priority status was caused by an overestimated benefit of the LVAD she got implanted in 2010; that is, the wait-list allocation scheme assumed she will attain the "populational average" survival benefit from the LVAD. Our algorithm had a much more conservative estimate of her survival; since she was diabetic, her individual benefit from the LVAD was less than the populational average. We envision a new priority allocation scheme in which our algorithm is used to allocate priorities based on the individual risks in a personalized manner. 8 References [1] C. Adams and V. Brantner. Spending on New Drug Development. Health Economics, 19(2): 130-141, 2010. [2] J. C. Foster, M. G. T. Jeremy, and S. J. Ruberg. Subgroup Identification from Randomized Clinical Trial Data. Statistics in medicine, 30(24), 2867-2880, 2011. [3] W. Sauerbrei, M. Abrahamowicz, D. G. Altman, S. Cessie, and J. Carpenter. Strengthening Analytical Thinking for Observational Studies: the STRATOS Initiative. Statistics in medicine, 33(30): 5413-5432, 2014. [4] S. Athey and G. Imbens. Recursive Partitioning for Heterogeneous Causal Effects. Proceedings of the National Academy of Sciences, 113(27):7353-7360, 2016. [5] J. L. Hill. Bayesian Nonparametric Modeling for Causal Inference. Journal of Computational and Graphical Statistics, 2012. [6] F. D. Johansson, U. Shalit, and D. Sontag. Learning Representations for Counter-factual Inference. In ICML, 2016. [7] M. Lu, S. Sadiq, D. J. Feaster, and H. Ishwaran. Estimating Individual Treatment Effect in Observational Data using Random Forest Methods. arXiv:1701.05306, 2017. [8] U. Shalit, F. Johansson, and D. Sontag. Estimating Individual Treatment Effect: Generalization Bounds and Algorithms. arXiv:1606.03976, 2016. [9] S. Wager and S. Athey. Estimation and Inference of Heterogeneous Treatment Effects using Random Forests. arXiv:1510.04342, 2015. [10] Y. Xie, J. E. Brand, and B. Jann. Estimating Heterogeneous Treatment Effects with Observational Data. Sociological Methodology, 42(1):314-347, 2012. [11] Y. Xu, Y. Xu, and S. Saria. A Bayesian Nonparametic Approach for Estimating Individualized TreatmentResponse Curves. arXiv:1608.05182, 2016. [12] M. Dudk, J. Langford, and L. Li. Doubly robust policy evaluation and learning. In ICML, 2011. [13] A. Swaminathan and T. Joachims. Batch Learning from Logged Bandit Feedback Through Counter-factual Risk Minimization. Journal of Machine Learning Research, 16(1): 1731-1755, 2015. [14] A. Abadie and G. Imbens. Matching on the Estimated Propensity Score. Econometrica, 84(2):781-807, 2016. [15] M. A. Alvarez, L. Rosasco, N. D. Lawrence. Kernels for Vector-valued Functions: A Review. Foundations and Trends R⃝in Machine Learning, 4(3):195-266, 2012. [16] S. Sniekers, A. van der Vaart. Adaptive Bayesian Credible Sets in Regression with a Gaussian Process Prior. Electronic Journal of Statistics, 9(2):2475-2527, 2015. [17] B. Schlkopf, R. Herbrich, and A. J. Smola. A Generalized Representer Theorem. International Conference on Computational Learning Theory, 2001. [18] E. V. Bonilla, K. M. Chai, and C. Williams. Multi-task Gaussian Process Prediction. In NIPS, 2007. [19] S. Bickel, M. Brckner, and T. Scheffer. Discriminative Learning under Covariate Shift. Journal of Machine Learning Research, 10(9): 2137-2155, 2009. [20] V. Chernozhukov, D. Chetverikov, M. Demirer, E. Duflo, and C. Hansen. Double Machine Learning for Treatment and Causal Parameters. arXiv preprint arXiv:1608.00060, 2016. [21] D. Kingma and J. Ba. ADAM: A Method for Stochastic Optimization. arXiv:1412.6980, 2014. [22] K. E. Porter, S. Gruber, M. J. Van Der Laan, and J. S. Sekhon. The Relative Performance of Targeted Maximum Likelihood Estimators. The International Journal of Biostatistics, 7(1):1-34, 2011. [23] Carl Edward Rasmussen. Gaussian Processes for Machine Learning. Citeseer, 2006. [24] G. C. Cawley and N. L. C. Talbot. Preventing Over-fitting During Model Selection via Bayesian Regularisation of the Hyper-parameters. Journal of Machine Learning Research, 841-861, 2007. [25] J. Hartford, G. Lewis, K. Leyton-Brown, and M. Taddy. Counterfactual Prediction with Deep Instrumental Variables Networks. arXiv preprint arXiv:1612.09596, 2016. [26] M. S. Slaughter, et al. Advanced Heart Failure Treated with Continuous-flow Left Ventricular Assist Device. New England Journal of Medicine, 361(23): 2241-2251, 2009. 9 | 2017 | 274 |
6,757 | Learning Overcomplete HMMs Vatsal Sharan Stanford University vsharan@stanford.edu Sham Kakade University of Washington sham@cs.washington.edu Percy Liang Stanford University pliang@cs.stanford.edu Gregory Valiant Stanford University valiant@stanford.edu Abstract We study the problem of learning overcomplete HMMs—those that have many hidden states but a small output alphabet. Despite having significant practical importance, such HMMs are poorly understood with no known positive or negative results for efficient learning. In this paper, we present several new results—both positive and negative—which help define the boundaries between the tractable and intractable settings. Specifically, we show positive results for a large subclass of HMMs whose transition matrices are sparse, well-conditioned, and have small probability mass on short cycles. On the other hand, we show that learning is impossible given only a polynomial number of samples for HMMs with a small output alphabet and whose transition matrices are random regular graphs with large degree. We also discuss these results in the context of learning HMMs which can capture long-term dependencies. 1 Introduction Hidden Markov Models (HMMs) are commonly used for data with natural sequential structure (e.g., speech, language, video). This paper focuses on overcomplete HMMs, where the number of output symbols m is much smaller than the number of hidden states n. As an example, for an HMM that outputs natural language documents one character at a time, the number of characters m is quite small, but the number of hidden states n would need to be very large to encode the rich syntactic, semantic, and discourse structure of the document. Most algorithms for learning HMMs with provable guarantees assume the transition T ∈Rn×n and observation O ∈Rm×n matrices are full rank [2, 3, 20] and hence do not apply to the overcomplete regime. A notable exception is the recent work of Huang et al. [14] who studied this setting where m ≪n and showed that generic HMMs can be learned in polynomial time given exact moments of the output process (which requires infinite data). Though understanding properties of generic HMMs is an important first step, in reality, HMMs with a large number of hidden states typically have structured, non-generic transition matrices—e.g., consider sparse transition matrices or transition matrices of factorial HMMs [12]. Huang et al. [14] also assume access to exact moments, which leaves open the question of when learning is possible with efficient sample complexity. Summarizing, we are interested in the following questions: 1. What are the fundamental limitations for learning overcomplete HMMs? 2. What properties of HMMs make learning possible with polynomial samples? 3. Are there structured HMMs which can be learned in the overcomplete regime? Our contributions. We make progress on all three questions in this work, sharpening our understanding of the boundary between tractable and intractable learning. We begin by stating a negative result, which perhaps explains some of the difficulty of obtaining strong learning guarantees in the overcomplete setting. Theorem 1. The parameters of HMMs where i) the transition matrix encodes a random walk on a regular graph on n nodes with degree polynomial in n, ii) the output alphabet m = polylog(n) and, iii) the output distribution for each hidden state is chosen uniformly and independently at random, cannot be learned (even approximately) using polynomially many samples over any window length polynomial in n, with high probability over the choice of the observation matrix. Theorem 1 is somewhat surprising, as parameters of HMMs with such transition matrices can be easily learned in the non-overcomplete (m ≥n) regime. This is because such transition matrices are full-rank and their condition numbers are polynomial in n; hence spectral techniques such as Anandkumar et al. [3] can be applied. Theorem 1 is also fundamentally of a different nature as compared to lower bounds based on parity with noise reductions for HMMs [20], as ours is information-theoretic.1 Also, it seems far more damning as the hard cases are seemingly innocuous classes such as random walks on dense graphs. The lower bound also shows that analyzing generic or random HMMs might not be the right framework to consider in the overcomplete regime as these might not be learnable with polynomial samples even though they are identifiable. This further motivates the need for understanding HMMs with structured transition matrices. We provide a proof of Theorem 1 with more explicitly stated conditions in Appendix D. For our positive results we focus on understanding properties of structured transition matrices which make learning tractable. To disentangle additional complications due to the choice of the observation matrix, we will assume that the observation matrix is drawn at random throughout the paper. Long-standing open problems on learning aliased HMMs (HMMs where multiple hidden states have identical output distributions) [7, 15, 23] hint that understanding learnability with respect to properties of the observation matrix is a daunting task in itself, and is perhaps best studied separately from understanding how properties of the transition matrix affect learning. Our positive result on learnability (Theorem 2) depends on two natural graph-theoretic properties of the transition matrix. We consider transition matrices which are i) sparse (hidden states have constant degree) and ii) have small probability mass on cycles shorter than 10 logm n states—and show that these HMMs can be learned efficiently using tensor decomposition and the method of moments, given random observation matrices. The condition prohibiting short cycles might seem mysterious. Intuitively, we need this condition to ensure that the Markov Chain visits a sufficient large portion of the state space in a short interval of time, and in fact the condition stems from information-theoretic considerations. We discuss these further in Sections 2.4 and 3.1. We also discuss how our results relate to learning HMMs which capture long-term dependencies in their outputs, and introduce a new notion of how well an HMM captures long-term dependencies. These are discussed in Section 5. We also show new identifiability results for sparse HMMs. These results provide a finer picture of identifiability than Huang et al. [14], as ours hold for sparse transition matrices which are not generic. Technical contribution. To prove Theorem 2 we show that the Khatri-Rao product of dependent random vectors is well-conditioned under certain conditions. Previously, Bhaskara et al. [6] showed that the Khatri-Rao product of independent random vectors is well-conditioned to perform a smoothed analysis of tensor decomposition, their techniques however do not extend to the dependent case. For the dependent case, we show a similar result using a novel Markov chain coupling based argument which relates the condition number to the best coupling of output distributions of two random walks with disjoint starting distributions. The technique is outlined in Section 2.2. Related work. Spectral methods for learning HMMs have been studied in Anandkumar et al. [3], Bhaskara et al. [5], Allman et al. [1], Hsu et al. [13], but these results require m ≥n. In Allman et al. [1], the authors show that that HMMs are identifiable given moments of continuous observations over a time interval of length N = 2τ + 1 for some τ such that τ+m−1 m−1 ≥n. When m ≪n this requires τ = O(n1/m). Bhaskara et al. [5] give another bound on window size which requires τ = O(n/m). However, with a output alphabet of size m, specifying all moments in a N length continuous time interval requires mN time and samples, and therefore all of these approaches lead to exponential runtimes when m is constant with respect to n. Also relevant is the work by Anandkumar et al. [4] on guarantees for learning certain latent variable models such as Gaussian mixtures in the overcomplete setting through tensor decomposition. As mentioned earlier, the work closest to ours is Huang et al. [14] who showed that generic HMMs are identifiable with τ = O(logm n), which gives the first polynomial runtimes for the case when m is constant. 1Parity with noise is information theoretically easy given observations over a window of length at least the number of inputs to the parity. This is linear in the number of hidden states of the parity with noise HMM, whereas Theorem 1 says that the sample complexity must be super polynomial for any polynomial sized window. 2 Outline. Section 2 introduces the notation and setup. It also provides examples and a high-level overview of our proof approach. Section 3 states the learnability result, discusses our assumptions and HMMs which satisfy these assumptions. Section 4 contains our identifiability results for sparse HMMs. Section 5 discusses natural measures of long-term dependencies in HMMs. We conclude in Section 6. Proof details are deferred to the Appendix. 2 Setup and preliminaries In this section we first introduce the required notation, and then outline the method of moments approach for parameter recovery. We also go over some examples to provide a better understanding of the classes of HMMs we aim to learn, and give a high level proof strategy. 2.1 Notation and preliminaries We will denote the output at time t by yt and the hidden state at time t by ht. Let the number of hidden states be n and the number of observations be m. Assume that the output alphabet is {0, . . . , m −1} without loss of generality. Let T be the transition matrix and O be the observation matrix of the HMM, both of these are defined so that the columns add up to one. For any matrix A, we refer to the ith column of A as Ai. T ′ is defined as the transition matrix of the time-reversed Markov chain, but we do not assume reversibility and hence T may not equal T ′. Let yj i = yi, . . . , yj denote the sequence of outputs from time i to time j. Let lj i = li, . . . , lj refer to a string of length i + j −1 over the output alphabet, denoting a particular output sequence from time i to j. Define a bijective mapping L which maps an output sequence lτ 1 ∈{0, . . . , m−1}τ into an index L(lτ 1) ∈{1, . . . , mτ} and the associated inverse mapping L−1. Throughout the paper, we assume that the transition matrix T is ergodic, and hence has a stationary distribution. We also assume that every hidden state has stationary probability at least 1/poly(n). This is a necessary condition, as otherwise we might not even visit all states in poly(n) samples. We also assume that the output process of the HMM is stationary. A stochastic process is stationary if the distribution of any subset of random variables is invariant with respect to shifts in the time index—that is, P[yτ −τ = lτ −τ] = P[yτ+T −τ+T = lτ −τ] for any τ, T and string lτ −τ. This is true if the initial hidden state is chosen according to the stationary distribution. Our results depend on the conditioning of the matrix T with respect to the ℓ1 norm. We define σ(1) min(T) as the minimum ℓ1 gain of the transition matrix T over all vectors x having unit ℓ1 norm (not just non-negative vectors x, for which the ratio would always be 1): σ(1) min(T) = min x∈Rn ∥Tx∥1 ∥x∥1 σ(1) min(T) is also a natural parameter to measure the long-term dependence of the HMM—if σ(1) min(T) is large then T preserves significant information about the distribution of hidden states at time 0 at a future time t, for all initial distributions at time 0. We discuss this further in Section 5. 2.2 Method of moments for learning HMMs Our algorithm for learning HMMs follows the method of moments based approach, outlined for example in Anandkumar et al. [2] and Huang et al. [14]. In contrast to the more popular ExpectationMaximization (EM) approach which can suffer from slow convergence and local optima [21], the method of moments approach ensures guaranteed recovery of the parameters under mild conditions. More details about tensor decomposition and the method of moments approach to learning HMMs can be found in Appendix A. The method of moments approach to learning HMMs has two high-level steps. In the first step, we write down a tensor of empirical moments of the data, such that the factors of the tensor correspond to parameters of the underlying model. In the second step, we perform tensor decomposition to recover the factors of the tensor—and then recover the parameters of the model from the factors. The key fact that enables the second step is that tensors have a unique decomposition under mild conditions on their factors, for example tensors have a unique decomposition if all the factors are full rank. The uniqueness of tensor decomposition permits unique recovery of the parameters of the model. We will learn the HMM using the moments of observation sequences yτ −τ from time −τ to τ. Since the output process is assumed to be stationary, the distribution of outputs is the same for 3 any contiguous time interval of the same length, and we use the interval −τ to τ in our setup for convenience. We call the length of the observation sequences used for learning the window length N = 2τ + 1. Since the number of samples required to estimate moments over a window of length N is mN, it is desirable to keep N small. Note that to ensure polynomial runtime and sample complexity for the method of moments approach, the window length N must be O(logm n). We will now define our moment tensor. Given moments over a window of length N = 2τ + 1, we can construct the third-order moment tensor M ∈Rmτ ×mτ ×m using the mapping L from strings of outputs to indices in the tensor: M(L(lτ 1 ),L(l−τ −1 ),l0) = P[yτ −τ = lτ −τ]. M is simply the tensor of the moments of the HMM over a window length N, and can be estimated directly from data. We can write M as an outer product because of the Markov property: M = A ⊗B ⊗C where A ∈Rmτ ×n, B ∈Rmτ ×n, C ∈Rm×n are defined as follows (here h0 denotes the hidden state at time 0): AL(lτ 1 ),i = P[yτ 1 = lτ 1 | h0 = i] BL(l−τ −1 ),i = P[y−τ −1 = l−τ −1 | h0 = i] Cl0,i = P[y0 = l, h0 = i] T and O can be related in a simple manner to A, B and C. If we can decompose the tensor M into the factors A, B and C, we can recover T and O from A, B and C. Kruskal’s condition [18] guarantees that tensors have a unique decomposition whenever A and B are full rank and no two column of C are the same. We refer the reader to Appendix A for more details, specifically Algorithm 1. 2.3 High-level proof strategy As the transition and observation matrices can be recovered from the factors of the tensors, our goal is to analyze the conditions under which the tensor decomposition step works provably. Note that the factor matrix A is the likelihood of observing each sequence of observations conditioned on starting at a given hidden state. We’ll refer to A as the likelihood matrix for this reason. B is the equivalent matrix for the time-reversed Markov chain. If we show that A, B are full rank and no two columns of C are the same, then the HMM can be learned provided the exact moments using the simultaneous diagonalization algorithm, also known as Jennrich’s algorithm (see Algorithm 1). We show this property for our identifiability results. For our learnability results, we show that the matrices A and B are well-conditioned (have condition numbers polynomial in n), which implies learnability from polynomial samples. This is the main technical contribution of the paper, and requires analyzing the condition number of the Khatri-Rao product of dependent random vectors. Before sketching the argument, we first introduce some notation. We can define A(t) as the likelihood matrix over t steps: A(t) L(lt 1),i = P[yt 1 = lt 1 | h0 = i]. A(t) can be recursively written down as follows: A(0) = OT, A(t) = (O ⊙A(t−1))T (1) where A ⊙B, denotes the Khatri-Rao product of the matrices A and B. If A and B are two matrices of size m1 × r and m2 × r then the Khatri-Rao product is a m1m2 × r matrix whose ith column is the outer product Ai ⊗Bi flattened into a vector. Note that A(τ) is the same as A. We now sketch our argument for showing that A(τ) is well-conditioned under appropriate conditions. Coupling random walks to analyze the Khatri-Rao product. As mentioned in the introduction, in this paper we are interested in the setting where the transition matrix is fixed but the observation matrix is drawn at random. If we could draw fresh random matrices O at each time step of the recursion in Eq. 1, then A would be well-conditioned by the smoothed analysis of the Khatri-Rao product due to Bhaskara et al. [6]. However, our setting is significantly more difficult, as we do not have access to fresh randomness at each time step, so the techniques of Bhaskara et al. [6] cannot be applied here. As pointed out earlier, the condition number of A in this scenario depends crucially on the transition matrix T, as A is not even full rank if T = I. 4 (a) Transition matrix is a cycle, or a permutation on the hidden states. (b) Transition matrix is a random walk on a graph with small degree and no short cycles. Figure 1: Examples of transition matrices which we can learn, refer to Section 2.4 and Section 3.2. Instead, we analyze A by a coupling argument. To get some intuition for this, note that if A does not have full rank, then there are two disjoint sets of columns of A whose linear combinations are equal, and these combination weights can be used to setup the initial states of two random walks defined by the transition matrix T which have the same output distribution for τ time steps. More generally, if A is ill-conditioned then there are two random walks with disjoint starting states which have very similar output distributions. We show that if two random walks have very similar output distributions over τ time steps for a randomly chosen observation matrix O, then most of the probability mass in these random walks can be coupled. On the other hand, if (σ(1) min(T))τ is sufficiently large, the total variational distance between random walks starting at two different starting states must be at least (σ(1) min(T))τ after τ time steps, and so there cannot be a good coupling, and A is well-conditioned. We provide a sketch of the argument for a simple case in Appendix 1 before we prove Theorem 2. 2.4 Illustrative examples We now provide a few simple examples which will illustrate some classes of HMMs we can and cannot learn. We first provide an example of a class of simple HMMs which can be handled by our results, but has non-generic transition matrices and hence does not fit into the framework of Huang et al. [14]. Consider an HMM where the transition matrix is a permutation or cyclic shift on the hidden states (see Fig. 1a). Our results imply that such HMMs are learnable in polynomial time from polynomial samples if the output distributions of the hidden states are chosen at random. We will try to provide some intuition about why an HMM with the transition matrix as in Fig. 1a should be efficiently learnable. Let us consider the simple case when the the outputs are binary (so m = 2) and each hidden state deterministically outputs a 0 or a 1, and is labeled by a 0 or a 1 accordingly. If the labels are assigned at random, then with high probability the string of labels of any continuous sequence of 2 log2 n hidden states in the cycle in Fig. 1a will be unique. This means that the output distribution in a 2 log2 n time window is unique for every initial hidden state, and it can be shown that this ensures that the moment tensor has a unique factorization. By showing that the output distribution in a 2 log2 n time window is very different for different initial hidden states—in addition to being unique—we can show that the factors of the moment tensor are well-conditioned, which allows recovery with efficient sample complexity. As another slightly more complex example of an HMM we can learn, Fig. 1b depicts an HMM whose transition matrix is a random walk on a graph with small degree and no short cycles. Our learnability result can handle such HMMs having structured transition matrices. As an example of an HMM which cannot be learned in our framework, consider an HMM with transition matrix T = I and binary observations (m = 2), see Fig. 2a. In this case, the probability of an output sequence only depends on the total number of zeros or ones in the sequence. Therefore, we only get t independent measurements from windows of length t, hence windows of length O(n) instead of O(log2 n) are necessary for identifiability (also refer to Blischke [8] for more discussions on this case). More generally, we prove in Proposition 1 that for small m a transition matrix composed only of cycles of constant length (see Fig. 2b) requires the window length to be polynomial in n to become identifiable. Proposition 1. Consider an HMM on n hidden states and m observations with the transition matrix being a permutation composed of cycles of length c. Then windows of length O(n1/mc) are necessary for the model to be identifiable, which is polynomial in n for constant c and m. The root cause of the difficulty in learning HMMs having short cycles is that they do not visit a large enough portion of the state space in O(logm n) steps, and hence moments over a O(logm n) time 5 (a) Transition matrix is the identity on 8 hidden states. (b) Transition matrix is a union of 4 cycles, each on 5 hidden states. Figure 2: Examples of transition matrices which do not fit in our framework. Proposition 1 shows that such HMMs where the transition matrix is composed of a union of cycles of constant length are not even identifiable from short windows of length O(logm n) window do not carry sufficient information for learning. Our results cannot handle such classes of transition matrices, also see Section 3.1 for more discussion. 3 Learnability results for overcomplete HMMs In this section, we state our learnability result, discuss the assumptions and provide examples of HMMs which satisfy these assumptions. Our learnability results hold under the following conditions: Assumptions: For fixed constants c1, c2, c3 > 1, the HMM satisfies the following properties for some c > 0: 1. Transition matrix is well-conditioned: Both T and the transition matrix T ′ of the time reversed Markov Chain are well-conditioned in the ℓ1-norm: σ(1) min(T), σ(1) min(T ′) ≥1/mc/c1 2. Transition matrix does not have short cycles: For both T and T ′, every state visits at least 10 logm n states in 15 logm n time except with probability δ1 ≤1/nc. 3. All hidden states have small “degree”: There exists δ2 such that for every hidden state i, the transition distributions Ti and T ′ i have cumulative mass at most δ2 on all but d states, with d ≤m1/c2 and δ2 ≤1/nc. Hence this is a soft “degree” requirement. 4. Output distributions are random and have small support : There exists δ3 such that for every hidden state i the output distribution Oi has cumulative mass at most δ3 on all but k outputs, with k ≤m1/c3 and δ3 ≤1/nc. Also, the output distribution Oi is drawn uniformly on these k outputs. The constants c1, c2, c3 are can be made explicit, for example, c1 = 20, c2 = 16 and c3 = 10 works. Under these conditions, we show that HMMs can be learned using polynomially many samples: Theorem 2. If an HMM satisfies the above conditions, then with high probability over the choice of O, the parameters of the HMM are learnable to within additive error ϵ with observations over windows of length 2τ + 1, τ = 15 logm n, with the sample complexity poly(n, 1/ϵ). Appendix C also states a corollary of Theorem 2 in terms of the minimum singular value σmin(T) of the matrix T, instead of σ(1) min(T). We discuss the conditions for Theorem 2 next, and subsequently provide examples of HMMs which satisfy these conditions. 3.1 Discussion of the assumptions 1. Transition matrix is well-conditioned: Note that singular transition matrices might not even be identifiable. Moreover, Mossel and Roch [20] showed that learning HMMs with singular transition matrices is as hard as learning parity with noise, which is widely conjectured to be computationally hard. Hence, it is necessary to exclude at least some classes of ill-conditioned transition matrices. 2. Transition matrix does not have short cycles: Due to Proposition 1, we know that a HMM might not even be identifiable from short windows if it is composed of a union of short cycles, hence we expect a similar condition for learning the HMM with polynomial samples; though there is a gap between the upper and lower bounds in terms of the probability mass which is allowed on the short cycles. We performed some simulations to understand how the length of cycles in the transition matrix and the probability mass assigned to short cycles affects the condition number of the likelihood matrix A; recall that the condition number of A determines the stability of the method of moments 6 0 0.1 0.2 0.3 0.4 0.5 20 40 60 80 100 Condition number of matrix A Epsilon Cycle length 2 Cycle length 4 Cycle length 8 (a) The conditioning becomes worse when cycles are smaller or when more probability mass ϵ is put on short cycles. 0 0.01 0.02 0.03 0.04 0.05 50 100 150 200 Condition number of matrix A Epsilon Degree 2 Degree 4 Degree 8 (b) The conditioning becomes worse as the degree increases, and when more probabiltiy mass ϵ is put on the dense part of T. Figure 3: Experiments to study the effect of sparsity and short cycles on the learnability of HMMs. The condition number of the likelihood matrix A determines the stability or sample complexity of the method of moments approach. The condition numbers are averaged over 10 trials. approach. We take the number of hidden states n = 128, and let P128 be a cycle on the n hidden states (as in Fig. 1a). Let Pc be a union of short cycles of length c on the n states (refer to Fig. 2b for an example). We take the transition matrix to be T = ϵPc + (1 −ϵ)P128 for different values of c and ϵ. Fig. 3a shows that the condition number of A becomes worse and hence learning requires more samples if the cycles are shorter in length, and if more probability mass is assigned to the short cycles, hinting that our conditions are perhaps not be too stringent. 3. All hidden states have a small degree: Condition 3 in Theorem 2 can be reinterpreted as saying that the transition probabilities out of any hidden state must have mass at most 1/n1+c on any hidden state except a set of d hidden states, for any c > 0. While this soft constraint is weaker than a hard constraint on the degree, it natural to ask whether any sparsity is necessary to learn HMMs. As above, we carry out simulations to understand how the degree affects the condition number of the likelihood matrix A. We consider transition matrices on n = 128 hidden states which are a combination of a dense part and a cycle. Define P128 to be a cycle as before. Define Gd as the adjacency matrix of a directed regular graph with degree d. We take the transition matrix T = ϵGd + (1 −ϵd)P128. Hence the transition distribution of every hidden state has mass ϵ on a set of d neighbors, and the residual probability mass is assigned to the permutation P128. Fig. 3b shows that the condition number of A becomes worse as the degree d becomes larger, and as more probability mass ϵ is assigned to the dense part Gd of the transition matrix T, providing some weak evidence for the necessity of Condition 3. Also, recall that Theorem 1 shows that HMMs where the transition matrix is a random walk on an undirected regular graph with large degree (degree polynomial in n) cannot be learned using polynomially many samples if m is a constant with respect to n. However, such graphs have all eigenvalues except the first one to be less than O(1/ √ d), hence it is not clear if the hardness of learning depends on the large degree itself or is only due to T being ill-conditioned. More concretely, we pose the following open question: Open question: Consider an HMM with a transition matrix T = (1 −ϵ)P + ϵU, where P is the cyclic permutation on n hidden states (such as in Fig. 1a) and U is a random walk on a undirected, regular graph with large degree (polynomial in n) and ϵ > 0 is a constant. Can this HMM be learned using polynomial samples when m is small (constant) with respect to n? This example approximately preserves σmin(T) by the addition of the permutation, and hence the difficulty is only due to the transition matrix having large degree. 4. Output distributions are random and have small support: As discussed in the introduction, if we do not assume that the observation matrices are random, then even simple HMMs with a cycle or permutation as the transition matrix might require long windows even to become identifiable, see Fig. 4. Hence some assumptions on the output distribution do seem necessary for learning the model from short time windows, though our assumptions are probably not tight. For instance, the assumption that the output distributions have a small support makes learning easier as it leads to the outputs being more discriminative of the hidden states, but it is not clear that this is a necessary assumption. Ideally, we would like to prove our learnability results under a smoothed model for O, where an adversary is allowed to see the transition matrix T and pick any worst-case O, but random noise is then added to 7 the output distributions, which limits the power of the adversary. We believe our results should hold under such a smoothed setting, but set this aside for future work. Figure 4: Consider two HMMs with transition matrices being cycles on n = 16 states with binary outputs, and outputs conditioned on the hidden states are deterministic. The states labeled as 0 always emit a 0 and the states labeled as 1 always emit a 1. The two HMMs are not distinguishable from windows of length less than 8. Hence with worst case O even simple HMMs like the cycle could require long windows to even become identifiable. 3.2 Examples of transition matrices which satisfy our assumptions We revisit the examples from Fig. 1a and Fig. 1b, showing that they satisfy our assumptions. 1. Transition matrices where the Markov Chain is a permutation: If the Markov chain is a permutation with all cycles longer than 10 logm n then the transition matrix obeys all the conditions for Theorem 2. This is because all the singular values of a permutation are 1, the degree is 1 and all hidden states visit 10 logm n different states in 15 logm n time steps. 2. Transition matrices which are random walks on graphs with small degree and large girth: For directed graphs, Condition 2 can be equivalently stated as that the graph representation of the transition matrix has a large girth (girth of a graph is defined as the length of its shortest cycle). 3. Transition matrices of factorial HMMs: Factorial HMMs [12] factor the latent state at any time into D dimensions, each of which independently evolves according to a Markov process. For D = 2, this is equivalent to saying that the hidden states are indexed by two labels (i, j) and if T1 and T2 represent the transition matrices for the two dimensions, then P[(i1, j1) →(i2, j2)] = T1(i2, i1)T2(j2, j1). This naturally models settings where there are multiple latent concepts which evolve independently. The following properties are easy to show: 1. If either of T1 or T2 visit N different states in 15 logm n time steps with probability (1 −δ), then T visits N different states in 15 logm n time steps with probability (1 −δ). 2. σmin(T) = σmin(T1)σmin(T2) 3. If all hidden states in T1 and T2 have mass at most δ on all but d1 states and d2 states respectively, then T has mass at most 2δ on all but d1d2 states. Therefore, factorial HMMs are learnable with random O if the underlying processes obey conditions similar to the assumptions for Theorem 2. If both T1 and T2 are well-conditioned and at least one of them does not have short cycles, and either has small degree, then T is learnable with random O. 4 Identifiability of HMMs from short windows As it is not obvious that some of the requirements for Theorem 2 are necessary, it is natural to attempt to derive stronger results for just identifiability of HMMs having structured transition matrices. In this section, we state our results for identifiability of HMMs from windows of size O(logm n). Huang et al. [14] showed that all HMMs except those belonging to a measure zero set become identifiable from windows of length 2τ + 1 with τ = 8⌈logm n⌉. However, the measure zero set itself might possibly contain interesting classes of HMMs (see Fig. 1), for example sparse HMMs also belong to a measure zero set. We refine the identifiability results in this section, and show that a natural sparsity condition on the transition matrix guarantees identifiability from short windows. Given any transition matrix T, we regard T as being supported by a set of indices S if the non-zero entries of T all lie in S. We now state our result for identifiability of sparse HMMs. Theorem 3. Let S be a set of indices which supports a permutation where all cycles have at least 2⌈logm n⌉hidden states. Then the set T of all transition matrices with support S is identifiable from windows of length 4⌈logm n⌉+ 1 for all observation matrices O except for a measure zero set of transition matrices in T and observation matrices O. 8 We hypothesize that excluding a measure zero set of transition matrices in Theorem 3 should not be necessary as long as the transition matrix is full rank, but are unable to show this. Note that our result on identifiability is more flexible in allowing short cycles in transition matrices than Theorem 2, and is closer to the lower bound on identifiability in Proposition 1. We also strengthen the result of Huang et al. [14] for identifiability of generic HMMs. Huang et al. [14] conjectured that windows of length 2⌈logm n⌉+ 1 are sufficient for generic HMMs to be identifiable. The constant 2 is the information theoretic bound as an HMM on n hidden states and m outputs has O(n2 + nm) independent parameters, and hence needs observations over a window of size 2⌈logm n⌉+ 1 to be uniquely identifiable. Proposition 2 settles this conjecture, proving the optimal window length requirement for generic HMMs to be identifiable. As the number of possible outputs over a window of length t is mt, the size of the moment tensor in Section 2.2 is itself exponential in the window length. Therefore even a factor of 2 improvement in the window length requirement leads to a quadratic improvement in the sample and time complexity. Proposition 2. The set of all HMMs is identifiable from observations over windows of length 2⌈logm n⌉+ 1 except for a measure zero set of transition matrices T and observation matrices O. 5 Discussion on long-term dependencies in HMMs In this section, we discuss long-term dependencies in HMMs, and show how our results on overcomplete HMMs improve the understanding of how HMMs can capture long-term dependencies, both with respect to the Markov chain and the outputs. Recall the definition of σ(1) min(T): σ(1) min(T) = min x∈Rn ∥Tx∥1 ∥x∥1 We claim that if σ(1) min(T) is large, then the transition matrix preserves significant information about the distribution of hidden states at time 0 at a future time t, for all initial distributions at time 0. Consider any two distributions p0 and q0 at time 0. Let pt and qt be the distributions of the hidden states at time t given that the distribution at time 0 is p0 and q0 respectively. Then the ℓ1 distance between pt and qt is ∥pt −qt∥1 ≥(σ(1) min(T))t∥p0 −q0∥1, verifying our claim. It is interesting to compare this notion with the mixing time of the transition matrix. Defining mixing time as the time until the ℓ1 distance between any two starting distributions is at most 1/2, it follows that the mixing time τmix ≥1/ log(1/σ(1) min(T)), therefore if σ(1) min(T)) is large then the chain is slowly mixing. However, the converse is not true—σ(1) min(T) might be small even if the chain never mixes, for example if the graph is disconnected but the connected components mix very quickly. Therefore, σ(1) min(T) is possibly a better notion of the long-term dependence of the transition matrix, as it requires that information is preserved about the past state “in all directions”. Another reasonable notion of the long-term dependence of the HMM is the long-term dependence in the output process instead of in the hidden Markov chain, which is the utility of past observations when making predictions about the distant future (given outputs y−∞, . . . , y1, y2, . . . , yt, at time t how far back do we need to remember about the past to make a good prediction about yt?). This does not depend in a simple way on the T and O matrices, but we do note that if the Markov chain is fast mixing then the output process can certainly not have long-term dependencies. We also note that with respect to long-term dependencies in the output process, the setting m ≪n seems to be much more interesting than when m is comparable to n. The reason is that in the small output alphabet setting we only receive a small amount of information about the true hidden state at each step, and hence longer windows are necessary to infer the hidden state and make a good prediction. We also refer the reader to Kakade et al. [16] for related discussions on the memory of output processes of HMMs. 6 Conclusion and Future Work The setting where the output alphabet m is much smaller than the number of hidden states n is well-motivated in practice and seems to have several interesting theoretical questions about new lower bounds and algorithms. Though some of our results are obtained in more restrictive conditions than seems necessary, we hope the ideas and techniques pave the way for much sharper results in this setting. Some open problems which we think might be particularly useful for improving our understanding is relaxing the condition on the observation matrix being random to some structural constraint on the observation matrix (such as on its Kruskal rank), and more thoroughly investigating the requirement for the transition matrix being sparse and not having short cycles. 9 References [1] E. S. Allman, C. Matias, and J. A. Rhodes. Identifiability of parameters in latent structure models with many observed variables. Annals of Statistics, 37:3099–3132, 2009. [2] A. Anandkumar, D. J. Hsu, and S. M. Kakade. A method of moments for mixture models and hidden markov models. In COLT, volume 1, page 4, 2012. [3] A. Anandkumar, R. Ge, D. Hsu, S. M. Kakade, and M. Telgarsky. Tensor decompositions for learning latent variable models. arXiv, 2013. [4] A. Anandkumar, R. Ge, and M. Janzamin. Learning overcomplete latent variable models through tensor methods. In COLT, pages 36–112, 2015. [5] A. Bhaskara, M. Charikar, and A. Vijayaraghavan. Uniqueness of tensor decompositions with applications to polynomial identifiability. CoRR, abs/1304.8087, 2013. [6] A. Bhaskara, M. Charikar, A. Moitra, and A. Vijayaraghavan. Smoothed analysis of tensor decompositions. In Proceedings of the 46th Annual ACM Symposium on Theory of Computing, pages 594–603. ACM, 2014. [7] D. Blackwell and L. Koopmans. On the identifiability problem for functions of finite Markov chains. Annals of Mathematical Statistics, 28:1011–1015, 1957. [8] W. Blischke. Estimating the parameters of mixtures of binomial distributions. Journal of the American Statistical Association, 59(306):510–528, 1964. [9] J. T. Chang. Full reconstruction of markov models on evolutionary trees: identifiability and consistency. Mathematical biosciences, 137(1):51–73, 1996. [10] A. Flaxman, A. W. Harrow, and G. B. Sorkin. Strings with maximally many distinct subsequences and substrings. Electron. J. Combin, 11(1):R8, 2004. [11] J. Friedman. A proof of Alon’s second eigenvalue conjecture. In Proceedings of the thirty-fifth Annual ACM Symposium on Theory of Computing, pages 720–724. ACM, 2003. [12] Z. Ghahramani and M. Jordan. Factorial hidden markov models. Machine Learning, 1:31, 1997. [13] D. Hsu, S. M. Kakade, and T. Zhang. A spectral algorithm for learning hidden markov models. Journal of Computer and System Sciences, 78(5):1460–1480, 2012. [14] Q. Huang, R. Ge, S. Kakade, and M. Dahleh. Minimal realization problems for hidden markov models. IEEE Transactions on Signal Processing, 64(7):1896–1904, 2016. [15] H. Ito, S.-I. Amari, and K. Kobayashi. Identifiability of hidden markov information sources and their minimum degrees of freedom. IEEE transactions on information theory, 38(2):324–333, 1992. [16] S. Kakade, P. Liang, V. Sharan, and G. Valiant. Prediction with a short memory. arXiv preprint arXiv:1612.02526, 2016. [17] M. Krivelevich, B. Sudakov, V. H. Vu, and N. C. Wormald. Random regular graphs of high degree. Random Structures & Algorithms, 18(4):346–363, 2001. [18] J. B. Kruskal. Three-way arrays: rank and uniqueness of trilinear decompositions, with application to arithmetic complexity and statistics. Linear Algebra and its Applications, 18(2), 1977. [19] S. Leurgans, R. Ross, and R. Abel. A decomposition for three-way arrays. SIAM Journal on Matrix Analysis and Applications, 14(4):1064–1083, 1993. [20] E. Mossel and S. Roch. Learning nonsingular phylogenies and hidden markov models. In Proceedings of the thirty-seventh Annual ACM Symposium on Theory of Computing, pages 366–375. ACM, 2005. [21] R. A. Redner and H. F. Walker. Mixture densities, maximum likelihood and the em algorithm. SIAM review, 26(2):195–239, 1984. [22] E. Shamir and E. Upfal. Large regular factors in random graphs. North-Holland Mathematics Studies, 87:271–282, 1984. [23] R. Weiss and B. Nadler. Learning parametric-output hmms with two aliased states. In ICML, pages 635–644, 2015. 10 | 2017 | 275 |
6,758 | Convolutional Phase Retrieval Qing Qu Columbia University qq2105@columbia.edu Yuqian Zhang Columbia University yz2409@columbia.edu Yonina C. Eldar Technion yonina@ee.technion.ac.il John Wright Columbia University jw2966@columbia.edu Abstract We study the convolutional phase retrieval problem, which considers recovery of an unknown signal x ∈Cn from m measurements consisting of the magnitude of its cyclic convolution with a known kernel a of length m. This model is motivated by applications to channel estimation, optics, and underwater acoustic communication, where the signal of interest is acted on by a given channel/filter, and phase information is difficult or impossible to acquire. We show that when a is random and m is sufficiently large, x can be efficiently recovered up to a global phase using a combination of spectral initialization and generalized gradient descent. The main challenge is coping with dependencies in the measurement operator; we overcome this challenge by using ideas from decoupling theory, suprema of chaos processes and the restricted isometry property of random circulant matrices, and recent analysis for alternating minimizing methods. 1 Introduction We study the problem of recovering a unknown signal x ∈Cn from measurements y = |a ⊛x|, which consist of the magnitude of the convolution of x and a given filter a ∈Cm, find z, s.t. y = |a ⊛z| , (1) where ⊛denotes cyclic convolution. Let Ca ∈Cm×m be a circulant matrix generated by a, and let A ∈Cm×n be a matrix formed by the first n columns of Ca. Then the convolutional phase retrieval problem can be rewritten in the common matrix-vector form find z, s.t. y = |Az| . (2) This problem is motivated by applications like channel estimation [37, 1], (non)coherent optical communication [14, 24], and underwater acoustic communication [31]. For example, in millimeter-wave (mm-wave) wireless communications for 5G networks [27], one important problem is to reconstruct signal angle of arrival (AoA) from measurements, which are taken by the convolution of signal AoA and the antenna pattern. Because of technical difficulties that the phase measurements are either very noisy and unreliable, or expensive to acquire, it is preferred to only take measurements of signal magnitude and the phase information is lost. Most known results on the exact solution of phase retrieval problems [8, 29, 10, 38, 36, 35] pertain to generic random matrices, where the entries of A are independent subgaussian random variables. However, in practice it is almost impossible to design purely random measurement matrices: in many cases as we mentioned above, the measurement is much more 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. structured – generated by passing a signal through a manually designed filter. Moreover, the structured measurements often admit more efficient numerical methods: by using the fast Fourier transform for matrix-vector products, the benign structure of the convolutional model (1) allows us to design methods with O(m) memory and O(m log m) computation cost per iteration. While for generic measurements, the cost is around O(mn). In this work, we study the convolutional phase retrieval problem (1) under the assumption that the kernel a = [a1, · · · , am]⊤is random, with each entry i.i.d. complex Gaussian, a = u + iv, u, v ∼iid N ( 0, 1 2I ) . (3) Compared to the generic random measurement, as we can see, the random convolution model we study here is far more structured: it is parameterized by only O(m) independent complex normal random variables, whereas the generic model involves O(mn) ones. Since the rows and columns of A are probabilistically dependent, standard techniques (based on concentration of functions of independent random vectors) do not apply. We propose and analyze a local1 gradient descent type method, minimizing a weighted, nonconvex and nonsmooth objective min z∈Cn f(z) = 1 2m
b1/2 ⊙(y −|Az|)
2 , (4) where ⊙denotes the Hadamard product and b ∈Rm ++ is a weighting vector. Our result can be informally summarized as follows. Theorem 1.1 (Informal) When m ≥Ω(n poly log n), with high probability, spectral initialization [25, 5] produces an initialization z(0) that is O(1/ poly log n) close to the optimum. Moreover, when m ≥Ω ( ∥Cx∥2 ∥x∥2 n poly log n ) , with high probability, a certain gradient descent method based on (4) converges linearly from this initialization to the set X = { xeiϕ | ϕ ∈[0, 2π) } of points that differ from the true signal x only by a global phase. Here, Cx ∈Cm×m denotes the circulant matrix corresponding to cyclic convolution with a length m zero padding of x, and poly log n denotes a polynomial in log n. A dependence of the sample complexity m on ∥Cx∥seems inevitable2 and is corroborated by experiments. Our proof is based on ideas from decoupling theory [11], the suprema of chaos processes and restricted isometry property of random circulant matrices [26, 20], and a new iterative analysis of alternating minimizing methods [35]. Our analysis draws connections between the convergence properties of gradient descent and the classical alternating direction method. This allows us to avoid the need to argue that high-degree polynomials in the structured random matrix A concentrate uniformly, as would be required by a straightforward translation of existing analysis to this new setting. Instead, we control the bulk effect of phase errors uniformly in a neighborhood around the ground truth. This requires us to develop new decoupling and concentration tools for controlling nonlinear phase functions of circulant random matrices, which could be potentially useful for analyzing other random circulant convolution problems such as blind deconvolution [40], and convolutional dictionary learning [18]. Prior art for phase retrieval. The challenge of developing efficient, guaranteed methods for phase retrieval has attracted substantial interest over the past decade [28, 19]. For the generalized phase retrieval problem in which the sensing matrix A is i.i.d. random, the first result on global recovery is based on semidefinite programming (SDP) [8, 3, 36]. However, the computational cost of SDP limits its practicality. Nonconvex methods can be more efficient. [25] showed that the alternating minimization method provably converges to the 1It would be nicer to characterize the global geometry of the problem as in [15, 33, 34, 32]. However, the nonhomogeneity of ∥Cx∥over the space causes tremendous difficulties for concentration with m ≥Ω(n poly log n) samples. 2The operator norm of Cx is nonhomogeneous over x ∈CSn−1, ranging from constant to O(√n). For instance, ∥Cx∥= 1 when x is a standard basis vector; and ∥Cx∥= √n when x = 1 √n1. 2 truth, when initialized using a spectral method and provided with fresh samples at each iteration. Candes et al. [5] showed with the same initalization, gradient descent for the nonconvex least squares objective, min z∈Cn f1(z) = 1 2m
y2 −|Az|2
2 , (5) provably recovers the ground truth, with near-optimal sample complexity m ≥Ω(n log n). The work [10, 39, 38] further reduce the sample complexity to m ≥Ω(n) by using different nonconvex objectives and truncation techniques. Moreover, [34] reveals that the nonconvex objective (5) has a benign global geometry: with high probability, it has no bad critical points with m ≥Ω(n log3 n) samples3. Structured random measurements. The study of structured random measurement in signal processing [21] includes the study of random Fourier measurements [7, 9, 12] and partial random convolutions [26, 20] in compressed sensing [6]. However, the study of structured random measurement for phase retrieval is still quite limited. In particular, [17] and [4] studied the performance of SDP methods with t-designs and random masked Fourier transform measurements. The authors in [5, 2] show that the phase retrieval problem with random coded diffraction and STFT measurements can be solved by minimizing nonconvex objectives, while [5] requires resampling for the initialization, and in [2] the contraction radius is not large enough for initialization. In addition, the motivation of these measurement schemes are quite different from ours. For more detailed review of this subject, we refer the readers to Section 4 of [21]. Notations. We use (·)⊤and (·)∗to denote the real and Hermitian transpose, respectively. We use CSn−1 to denote a n dimensional complex sphere. Let ℜ(·) and ℑ(·) denote the real and imaginary parts of a complex variable, respectively. Throughout the paper, we assume the optimal solution is x ∈Cn. Because the solution is only optimal to a global phase shift, we define the optimal solution set as X = { xeiθ | θ ∈[0, 2π) } , and define the distance from a point z ∈Cn to the set X as dist(z, X) .= inf θ∈[0,2π)
z −xeiθ
. For any z ∈C with |z| ̸= 0, we use ϕ(z) to denote the phase of z, that is, eiϕ(z) = z/ |z|. 2 Algorithm We develop an approach to convolutional phase retrieval based on local nonconvex optimization. Our proposed algorithm has two components: (1) a careful initialization using the spectral method; (2) local refinement by (generalized) gradient descent. We introduce the two steps in reverse order. 2.1 Minimization of a nonconvex and nonsmooth objective We consider minimizing a weighted nonconvex and nonsmooth objective f(z) = 1 2m
b1/2 ⊙(y −|Az|)
2 . (6) The introduction of the positive weights b facilitates our analysis, by enabling us to compare certain functions of the dependent random matrix A to functions involving more independent random variables. We will substantiate this claim in the next section. Although the function (4) is not complex-differentiable, if one identifies Cn with R2n and treats f(z) as a function in the real domain, f is still differentiable in the real sense. Thus, we adopt the Wirtinger calculus [22], which can be thought of as a clean way of organizing the real partial derivatives [29, 34]. 3[30] tightened the sample complexity to m ≥Ω(n log n) by using advanced probability tools. 3 On the other hand, it should also be noted that the absolute value |·| is nonsmooth at 0 and hence f(z) is not differentiable everywhere even in the real sense. Similar to [38], for any complex number u ∈C, if we uniquely define its phase ϕ(u) at 0 by exp (iϕ(u)) .= {u/ |u| if |u| ̸= 0, 1 otherwise, then the Wirtinger gradient of (4) can be uniquely determined as ∂ ∂z f(z) = 1 mA∗diag (b) [Az −y ⊙exp (iϕ(Az))] . (7) Starting from some initialization z(0), we minimize the objective (6) by gradient descent z(r+1) = z(r) −τ ∂ ∂z f(z(r)), (8) where τ > 0 is the stepsize. Indeed, ∂ ∂zf(z) can be interpreted as the gradient of f(z) as in the real case; this method is also referred to as amplitude flow [38]. 2.2 Initialization via spectral method Similar to [25, 29], we compute the initialization z(0) via a spectral method, detailed in [29, Algorithm 1]. More specifically, z(0) is a scaled leading eigenvector of Y = 1 m m ∑ k=1 y2 kaka∗ k = 1 mA∗diag ( y2) A, (9) which is constructed from the knowledge of the sensing vectors and observations. The leading eigenvector of Y can be efficiently computed via the power method. Note that E [Y ] = ∥x∥2 I + xx∗, so the leading eigenvector of E [Y ] is proportional to the optimal solution x. Under the random convolutional model of A, by using probability tools from [21], we show that v∗Y v concentrates to its expectation v∗E [Y ] v for all v ∈CSn−1 whenever m ≥Ω(n poly log n), ensuring the initialization z(0) close to the optimal set X. 3 Main Result and Analysis In this section, we describe our main theoretical result, which shows that with high probability, the algorithm described in the previous section succeeds. Theorem 3.1 (Main Result) Whenever m ≥C0n log31 n, the spectral method [29, Algorithm 1] produces an initialization z(0) that satisfies dist ( z(0), X ) ≤c0 log−6 n ∥x∥ with probability at least 1 −c1m−c2. Suppose b = ζσ2(y), where ζσ2(t) = 1 −2πσ2ξσ2(t), ξσ2(t) = 1 2πσ2 exp ( −t2 2σ2 ) , t > 0, (10) with σ2 > 1/2. Starting from z(0), with σ2 = 0.51 and stepsize τ = 2.02, whenever m ≥ C1 ∥Cx∥2 ∥x∥2 max { log17 n, n log4 n } , with probability at least 1 −c3m−c4 for all iterate z(r)(r ≥1) defined in (8), we have dist ( z(r), X ) ≤(1 −ϱ)r dist ( z(0), X ) , (11) holds for a small scalar ϱ ∈(0, 1). Here, c0, c1, c2, c3, c4, C0, C1 > 0 are numerical constants. 4 Remark: Our result shows that by initializing the problem O(1/polylog(n))-close to the optimum via spectral method, the gradient descent (8) converges linearly to the optimal solution. As we can see, the sample complexity here also depends on ∥Cx∥, which is quite different from the i.i.d. case. For a typical x ∈CSn−1 (e.g., x is drawn uniformly random from CSn−1), ∥Cx∥remains as O(log n), the sample complexity m ≥Ω(n poly log n) matches the i.i.d. case up to log factors. However, ∥Cx∥is nonhomogeneous over x ∈CSn−1: if x is sparse in the Fourier domain (e.g., x = 1 √n1), the sample complexity can be as large as m ≥Ω ( n2 poly log n ) . Such a behavior is also demonstrated in the experiments of Section 4. We believe the (very large!) number of logarithms in our result is an artifact of our analysis, rather than a limitation of the method. We expect to reduce the sample complexity to m ≥Ω ( ∥Cx∥2 ∥x∥2 n log6 n ) by a tighter analysis, which is left for future work. The choices of the weighting b ∈Rm in (10), σ2 = 0.51, and the stepsize τ = 2.02 are purely for the purpose of analysis. In practice, the algorithm converges with b = 1 and a choice of small stepsize τ, or by using backtracking linesearch for the stepsize τ. In the following, we briefly highlight some major challenges and novel proofing ideas behind the analysis. The details can be found in our full paper. 3.1 Proof sketch of iterative contraction Our analysis is largely inspired by the recent analysis of alternating direction method (ADM) [35]. In this following, we draw connections between the gradient descent method (8) and ADM, and sketch basic ideas of convergence analysis. ADM iteration. ADM is a classical method for solving phase retrieval problems [16, 25, 35], which can be considered as a heuristic method that solves the problem min z∈Cn,|u|=1 1 2 ∥Az −y ⊙u∥2 . At every iterate bz(r), ADM proceeds in two steps: c(r+1) = y ⊙exp ( Abz(r)) , bz(r+1) = arg min z 1 2
Az −c(r+1)
2 , which leads to the following update bz(r+1) = A† ( y ⊙exp ( Abz(r))) , where A† = (A∗A)−1 A∗is the pseudo-inverse of A. Let bθr = arg minθ
bz(r) −xeiθ
. The distance between bz(r+1) and X is bounded by dist ( bz(r+1), X ) =
bz(r+1) −xeibθr+1
≤
A†
Axeibθr − ( y ⊙exp ( Abz(r)))
. (12) Gradient descent with b = 1. For simplicity, let us consider the gradient descent update (8) with b = 1. Let θr = arg minθ
z(r) −xeiθ
, with stepsize τ = 1. The distance between the iterate z(r) and the optimal set X is bounded by dist ( z(r+1), X ) =
z(r+1) −xeiθr+1
≤
I −1 mA∗A
z(r) −xeiθr
+ 1 m ∥A∥
Axeiθr −y ⊙exp ( iϕ(Az(r)) )
. (13) Towards iterative contraction. By measure concentration, it can be shown that
I −1 mA∗A
= o(1), ∥A∥≈√m,
A†
≈1/√m, (14) 5 holds with high probability whenever m ≥Ω(n poly log n). Therefore, to show iterative contraction of both methods, based on (12) and (13), it is sufficient to show that
Axeiθ −y ⊙exp (iϕ(Az))
≤(1 −η)√m
z −xeiθ
, (15) for some constant η ∈(0, 1), where θ = arg minθ∈[0,2π)
z −xeiθ
such that eiθ = x∗z/ |x∗z|. By similar ideas of controlling (15) for the ADM method [35], this observation provides a new way of analyzing the gradient descent method. As an attempt to show (15) for the random circulant matrix A, we invoke the following lemma, which controls the error in a first order approximation to exp(iϕ(·)). Lemma 3.2 (Lemma 3.2, [35]) For any ρ > 0, and for any z, z′ ∈C, we have |exp (iϕ(z′ + z)) −exp (iϕ(z′))| ≤21|z|≥ρ|z′| + (1 −ρ)−1 |ℑ(z/z′)| . Let us decompose z = αx + βw, where w ∈CSn−1 with w ⊥x, and α, β ∈C. Note that ϕ(α) = θ. Then by Lemma 3.2, for any ρ ∈(0, 1), we have
Axeiθ −y ⊙exp (iϕ(Az))
=
|Ax| ⊙ [ exp (iϕ (Ax)) −exp ( iϕ ( Ax + β αAw ))]
≤
|Ax| ⊙1| β α||Aw|≥ρ|Ax|
| {z } T1 + 1 1 −ρ β α ∥ℑ((Aw) ⊙exp (−iϕ(Ax)))∥ | {z } T2 . The first term T1 can be bounded using the restricted isometry property of random circulant matrices [20], together with some auxiliary analysis. The second term T2 involves a nonlinear function exp (−iϕ(Ax)) of the random circulant matrix A. Controlling this nonlinear, highly dependent random process T2(w) for all w is a nontrivial task. Next, we explain why controlling T2 is technically challenging, and sketch the key ideas about how to control a smoothed variant of T2, by using the weighting b = ζσ2(y) introduced in (10). We also provide intuition for why the weighting b is helpful. 3.2 Controlling the phase term T2 As elaborated above, the major challenge of showing iterative contraction is bounding the suprema of the nonlinear, dependent random process T2(w) over the set S = { w ∈CSn−1 | w ⊥x } . By using the fact that ℑ(u) = 1 2i (u −u) for any u ∈C, we have sup w∈S T 2 2 ≤ 1 2 ∥A∥2 + 1 2 sup w∈S w⊤A⊤diag (ψ(Ax)) Aw | {z } L(a,w) , where ψ(t) .= exp (−2iϕ(t)). As from (14), ∥A∥≈√m, the major task left is to show that sup w∈S |L(a, w)| < (1 −η′)m (16) for some constant η′ ∈(0, 1). Why decoupling? Let A = [ a∗ 1 · · · a∗ m ] . The term L(a, w) = w⊤A⊤diag (ψ(Ax)) Aw = m ∑ k=1 ψ(a∗ kx)w⊤aka⊤ k w | {z } dependence across k is a summation of dependent random variables, for which our probability tools are very limited. To overcome this problem, we deploy ideas from decoupling [11]. Informally, decoupling allows us to compare moments of the original random function to functions of more independent random variables, which are usually easier to analyze. The book [11] provides 6 a beautiful introduction to this area. In our problem, notice that the random vector a occurs twice in the definition of L(a, w) – one in the phase term ψ(Ax) = exp(−2iϕ(Ax)), and another in the quadratic term. The general spirit of decoupling is to seek to replace one a with an independent copy a′ of the same random vector, yielding a random process with fewer dependencies. Here, we seek to replace L(a, w) with QL dec(a, a′, w) = w⊤A⊤diag (ψ(A′x)) Aw. (17) The usefulness of this new, decoupled form QL dec(a, a′, w), is that it introduces extra randomness — QL dec(a, a′, w) is now a chaos process of a conditioned on a′. This makes analyzing supw∈S QL dec(a, a′, w) amenable to existing analysis of suprema of chaos processes for random circulant matrices [21]. However, achieving the decoupling requires additional work; the most general existing results on decoupling pertain to tetrahedral polynomials, which are polynomials with no monomials involving any power larger than one of any random variable. By appropriately tracking cross terms, these results can also be applied to more general (non-tetrahedral) polynomials in Gaussian random variables [23]. However, our random process L(a, w) involves a nonlinear phase term ψ(Aw) which is not a polynomial, and hence is not amenable to a direct appeal to existing results. Decoupling is “recoupling”. Existing results [23] for decoupling polynomials of Gaussian random variables are derived from two simple facts: (i) orthogonal projections of Gaussian variables are independent, and (ii) Jensen’s inequality. Indeed, for a ∼CN(0, I), let us introduce an independent vector δ ∼CN(0, I). Write g1 = a + δ, g2 = a −δ. Because of Fact (i), these are independent CN(0, 2I) vectors. By conditional expectation, Eδ [ QL dec(g1, g2, w) ] = Eδ [ QL dec(a + δ, a −δ, w) ] .= bL(a, w). (18) Thus, we can see that the key idea of decoupling L(a, w) into QL dec(a, a′, w), is essentially “recoupling” QL dec(g1, g2, w) via conditional expectation – the “recoupled” term bL can be viewed as an approximation of L(a, w). Notice that by Fact (ii), for any convex function φ, Ea [ sup w∈S φ ( bL(a, w) )] = Ea [ sup w∈S φ ( Eδ [ QL dec(a + δ, a −δ, w) ])] ≤Ea,δ [ sup w∈S φ ( QL dec(a + δ, a −δ, w) )] = Eg1,g2 [ sup w∈S φ ( QL dec(g1, g2, w) )] . Thus, by choosing φ(t) = |t|p, we can control moments of supw∈S bL(a, w) via
sup w∈S bL(a, w)
Lp ≤
sup w∈S QL dec(g1, g2, w)
Lp . (19) For tetrahedral polynomials, bL = L, so the approximation is exact. As the tail bound of supw∈S bL(a, w) can be controlled via its moments bounds [13, Chapter 7.2], this allows us to directly control the object L(a, w) of interest. The reason that this control obtains is because the conditional expectation operator Eδ [· | a] “recouples” QL dec(a, a′, w) back to the target L(a, w). In slogan form, (Gaussian) decoupling is recoupling. “Recoupling” is Gaussian smoothing. A distinctive feature in convolutional phase retrieval is that L is not a polynomial. Hence, it may be challenging to posit a QL dec which “recouples” back to L. In other words, in the existing form, we need to tolerate an approximation error as bL ̸= L. By the triangle inequality, sup w∈S |L(a, w)| ≤sup w∈S bL(a, w) + sup w∈S bL(a, w) −L(a, w) . (20) As discussed above, the supw∈S bL(a, w) can be sharply controlled via its moments bound in (19). Now the bound (20) is useful to derive tight control for L(a, w), if L(a, w) is very 7 close to bL(a, w) uniformly. The question is: for what L is it possible to find a “well-behaved” QL dec for which the approximation error is small? To understand this question, recall that the mechanism that links Qdec back to bL is the conditional expectation operator Eδ [· | a]. For our case, from (18) orthogonality leads to bL(a, w) = wA⊤diag (h(Ax)) Aw, h(t) .= Es∼CN (0,∥x∥2) [ψ(t + s)] . (21) Thus, by combining the results in (20) and (21), we have sup w∈S |L(a, w)| ≤sup w∈S bL(a, w) + ∥h −ψ∥L∞ | {z } approximation error ∥A∥2 . (22) Note that the function h is not exactly ψ, but generated by convolving ψ with a multivariate Gaussian pdf : indeed, recoupling is Gaussian smoothing. The Fourier transform of a multivariate Gaussian is again a Gaussian; it decays quickly with frequency. So, in order to admit a small approximation error, the target L must be smooth. However, in our case, the function ψ(t) = exp(−2iϕ(t)) is discontinuous at t = 0; it changes extremely rapidly in the vicinity of t = 0, and hence its Fourier transform (appropriately defined) does not decay quickly at all. Therefore, L(a, w) is a poor target for approximation with a smooth function bL = Eδ[QL dec]. From Fig. 1, the difference between h and ψ increases as |t| ↘0. The poor approximation error ∥h −ψ∥L∞= 1 results in a trivial bound for supw∈S |L(a, w)| instead of (16). Decoupling and convolutional phase retrieval. The key idea to reduce the approximation error ∥ψ −h∥L∞= 1 is to smooth ψ. More specifically, we introduce a new objective (6) with Gaussian weighting b = ζσ2(y) in (10), replacing the analyzing target T2 with bT2 =
diag ( b1/2) ℑ((Aw) ⊙exp (−iϕ(Ax)))
. Consequently, we obtain a smoothed variant Ls(a, w) of L(a, w), Ls(a, w) = w⊤A⊤diag (ζσ2(y) ⊙ψ(Ax)) Aw. Now the approximation error ∥h −ψ∥L∞in (22) is replaced by ∥h(t) −ζσ2(t)ψ(t)∥L∞. As observed from Fig. 1, the function ζσ2(t) smoothes ψ(t) especially near the vicinity of t = 0, such that the new approximation error ∥f(t) −ζσ2(t)ψ(t)∥L∞is significantly reduced. Thus, by using similar ideas as above, we can prove a desired bound supw∈S |Ls(a, w)| < (1 −ηs)m. Finally, because the new weighting b = ζσ2(y), the overall analysis needs to be slightly modified correspondingly. We refer the readers to our full paper for more details. Figure 1: Plots of functions ζσ2(t), f(t) and ψ(t) for t ∈R+. Figure 2: Phase transition for recovering the signal x ∈CSn−1 with different ∥Cx∥. 4 Experiments Dependence of sample complexity on ∥Cx∥. First, we investigate the dependence of the sample complexity m on ∥Cx∥. We assume the ground truth x ∈CSn−1, and consider three 8 cases: (1) x = e1 with ∥Cx∥= 1, where e1 the standard basis vector; (2) x is uniformly random generated from CSn−1; (3) x = 1 √n1, with ∥Cx∥= √n. For each case, we fix the signal length n = 1000 and vary the ratio m/n. For each ratio m/n, we randomly generate the kernel a ∼CN(0, I) and repeat the experiment for 100 times. We initialize the algorithm by the spectral method [29, Algorithm 1] and run the gradient descent (8). Given the algorithm output bx, we judge the success of recovery by infϕ∈[0,2π)
bx −xeiϕ
≤ϵ, where ϵ = 10−5. From Fig. 2, we can see that the larger the ∥Cx∥, the more samples are needed for exact recovery. Figure 3: Experiment on real images. Experiments on real image. Finally, we run the experiment on some real dataset to demonstrate the effectiveness and the efficiency of the proposed method. We choose an image of size 200 × 300 as in Fig. 4, we use m = 5n log n samples for reconstruction. The kernel a ∈Cm is randomly generated as complex Gaussian CN(0, I). We run power method for 100 iterations for initialization, and stop the algorithm once the error is smaller than 1 × 10−4. It takes 197.08s to reconstruct all the RGB channels. Experiment using general Gaussian measurements A ∈Cm×n could easily run out of memory on a personal computer for problems of this size. Figure 4: Experiment with real antenna pattern. Experiments on signal AoA phase recovery for 5G communications. Finally, we demonstrate the effectiveness of the proposed method on a problem arising in 5G communication, as we mentioned in the introduction. Fig. 4 (left) shows an antenna pattern a ∈C361 obtained from Bell labs. We observe the modulus of the convolution of this pattern with the signal of interest. For three different types of signals with length n = 20, (1) x = e1 , (2) x is uniformly random generated from CSn−1, (3) x = 1 √n1, our result in Fig. 4 shows that we can achieve almost perfect recovery. 9 5 Acknowledgement This work was partially supported by the grants NSF CCF 1527809 and NSF IIS 1546411, the grants from the European Unions Horizon 2020 research and innovation program under grant agreement No. 646804-ERCCOGBNYQ, and the grant from the Israel Science Foundation under grant no. 335/14. QQ thanks the generous support of the Microsoft graduate research fellowship. We would like to thank Shan Zhong for the helpful discussion for real applications and providing the antenna data for experiments, and we thank Ju Sun and Han-wen Kuo for helpful discussion and input regarding the analysis of this work. References [1] Sercan Ö. Arik and Joseph M. Kahn. Direct-detection mode-division multiplexing in modal basis using phase retrieval. Opt. Lett., 41(18):4265–4268, Sep 2016. [2] T. Bendory, Y. C. Eldar, and N. Boumal. Non-convex phase retrieval from stft measurements. IEEE Transactions on Information Theory, PP(99):1–1, 2017. [3] Emmanuel J. Candès, Yonina C. Eldar, Thomas Strohmer, and Vladislav Voroninski. Phase retrieval via matrix completion. SIAM Journal on Imaging Sciences, 6(1), 2013. [4] Emmanuel J. Candès, Xiaodong Li, and Mahdi Soltanolkotabi. Phase retrieval from coded diffraction patterns. Applied and Computational Harmonic Analysis, 39(2):277–299, 2015. [5] Emmanuel J. Candès, Xiaodong Li, and Mahdi Soltanolkotabi. Phase retrieval via wirtinger flow: Theory and algorithms. Information Theory, IEEE Transactions on, 61(4):1985–2007, April 2015. [6] Emmanuel J Candès, Justin Romberg, and Terence Tao. Robust uncertainty principles: Exact signal reconstruction from highly incomplete frequency information. IEEE Transactions on information theory, 52(2):489–509, 2006. [7] Emmanuel J Candes, Justin K Romberg, and Terence Tao. Stable signal recovery from incomplete and inaccurate measurements. Communications on pure and applied mathematics, 59(8):1207–1223, 2006. [8] Emmanuel J. Candès, Thomas Strohmer, and Vladislav Voroninski. Phaselift: Exact and stable signal recovery from magnitude measurements via convex programming. Communications on Pure and Applied Mathematics, 66(8):1241–1274, 2013. [9] Emmanuel J Candes and Terence Tao. Near-optimal signal recovery from random projections: Universal encoding strategies? IEEE transactions on information theory, 52(12):5406–5425, 2006. [10] Yuxin Chen and Emmanuel J. Candès. Solving random quadratic systems of equations is nearly as easy as solving linear systems. arXiv preprint arXiv:1505.05114, 2015. [11] Victor De la Pena and Evarist Giné. Decoupling: from dependence to independence. Springer, 1999. [12] Yonina C Eldar and Gitta Kutyniok. Compressed sensing: theory and applications. Cambridge University Press, 2012. [13] Simon Foucart and Holger Rauhut. A mathematical introduction to compressive sensing. Springer, 2013. [14] Robert M Gagliardi and Sherman Karp. Optical communications. New York, Wiley-Interscience, 1976. 445 p., 1, 1976. [15] Rong Ge, Furong Huang, Chi Jin, and Yang Yuan. Escaping from saddle points—online stochastic gradient for tensor decomposition. In Proceedings of The 28th Conference on Learning Theory, pages 797–842, 2015. [16] R. W. Gerchberg and W. Owen Saxton. A practical algorithm for the determination of the phase from image and diffraction plane pictures. Optik, 35:237–246, 1972. [17] David Gross, Felix Krahmer, and Richard Kueng. A partial derandomization of phaselift using spherical designs. arXiv preprint arXiv:1310.2267, 2013. 10 [18] Felix Heide, Wolfgang Heidrich, and Gordon Wetzstein. Fast and flexible convolutional sparse coding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5135–5143, 2015. [19] Kishore Jaganathan, Yonina C. Eldar, and Babak Hassibi. Phase retrieval: An overview of recent developments. Chapter V, Optical Compressive Imaging, 2016. [20] Felix Krahmer, Shahar Mendelson, and Holger Rauhut. Suprema of chaos processes and the restricted isometry property. Communications on Pure and Applied Mathematics, 67(11):1877–1904, 2014. [21] Felix Krahmer and Holger Rauhut. Structured random measurements in signal processing. GAMM-Mitteilungen, 37(2):217–238, 2014. [22] Ken Kreutz-Delgado. The complex gradient operator and the CR-calculus. arXiv preprint arXiv:0906.4835, 2009. [23] Stanislaw Kwapien. Decoupling inequalities for polynomial chaos. The Annals of Probability, pages 1062–1071, 1987. [24] Antonio Mecozzi, Cristian Antonelli, and Mark Shtaif. Kramers–kronig coherent receiver. Optica, 3(11):1220–1227, Nov 2016. [25] Praneeth Netrapalli, Prateek Jain, and Sujay Sanghavi. Phase retrieval using alternating minimization. In Advances in Neural Information Processing Systems, pages 2796–2804, 2013. [26] Holger Rauhut. Compressive sensing and structured random matrices. Theoretical foundations and numerical methods for sparse recovery, 9:1–92, 2010. [27] Arash Shahmansoori, Gabriel E Garcia, Giuseppe Destino, Gonzalo Seco-Granados, and Henk Wymeersch. 5g position and orientation estimation through millimeter wave mimo. In Globecom Workshops (GC Wkshps), 2015 IEEE, pages 1–6. IEEE, 2015. [28] Yoav Shechtman, Yonina C. Eldar, Oren Cohen, Henry N. Chapman, Jianwei Miao, and Mordechai Segev. Phase retrieval with application to optical imaging: A contemporary overview. Signal Processing Magazine, IEEE, 32(3):87–109, May 2015. [29] Mahdi Soltanolkotabi. Algorithms and theory for clustering and nonconvex quadratic programming. PhD thesis, Stanford University, 2014. [30] Mahdi Soltanolkotabi. Structured signal recovery from quadratic measurements: Breaking sample complexity barriers via nonconvex optimization. CoRR, abs/1702.06175, 2017. [31] Milica Stojanovic, Josko A Catipovic, and John G Proakis. Phase-coherent digital communications for underwater acoustic channels. IEEE Journal of Oceanic Engineering, 19(1):100–111, 1994. [32] Ju Sun, Qing Qu, and John Wright. Complete dictionary recovery over the sphere. arXiv preprint arXiv:1504.06785, 2015. [33] Ju Sun, Qing Qu, and John Wright. When are nonconvex problems not scary? arXiv preprint arXiv:1510.06096, 2015. [34] Ju Sun, Qing Qu, and John Wright. A geometric analysis of phase retreival. arXiv preprint arXiv:1602.06664, 2016. [35] Irène Waldspurger. Phase retrieval with random gaussian sensing vectors by alternating projections. arXiv preprint arXiv:1609.03088, 2016. [36] Irène Waldspurger, Alexandre d`Aspremont, and Stéphane Mallat. Phase recovery, maxcut and complex semidefinite programming. Mathematical Programming, 149(1-2):47–81, 2015. [37] P. Walk, H. Becker, and P. Jung. OFDM channel estimation via phase retrieval. In Asilomar 2015, 2015. [38] G. Wang, G. B. Giannakis, and Y. C. Eldar. Solving systems of random quadratic equations via truncated amplitude flow. IEEE Transactions on Information Theory, PP(99):1–1, 2017. [39] Huishuai Zhang and Yingbin Liang. Reshaped wirtinger flow for solving quadratic systems of equations. arXiv preprint arXiv:1605.07719, 2016. [40] Yuqian Zhang, Yenson Lau, Han-wen Kuo, Sky Cheung, Abhay Pasupathy, and John Wright. On the global geometry of sphere-constrained sparse blind deconvolution. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. 11 | 2017 | 276 |
6,759 | Stochastic and Adversarial Online Learning without Hyperparameters Ashok Cutkosky Department of Computer Science Stanford University ashokc@cs.stanford.edu Kwabena Boahen Department of Bioengineering Stanford University boahen@stanford.edu Abstract Most online optimization algorithms focus on one of two things: performing well in adversarial settings by adapting to unknown data parameters (such as Lipschitz constants), typically achieving O( √ T) regret, or performing well in stochastic settings where they can leverage some structure in the losses (such as strong convexity), typically achieving O(log(T)) regret. Algorithms that focus on the former problem hitherto achieved O( √ T) in the stochastic setting rather than O(log(T)). Here we introduce an online optimization algorithm that achieves O(log4(T)) regret in a wide class of stochastic settings while gracefully degrading to the optimal O( √ T) regret in adversarial settings (up to logarithmic factors). Our algorithm does not require any prior knowledge about the data or tuning of parameters to achieve superior performance. 1 Extending Adversarial Algorithms to Stochastic Settings The online convex optimization (OCO) paradigm [1, 2] can be used to model a large number of scenarios of interest, such as streaming problems, adversarial environments, or stochastic optimization. In brief, an OCO algorithm plays T rounds of a game in which on each round the algorithm outputs a vector wt in some convex space W, and then receives a loss function ℓt : W →R that is convex. The algorithm’s objective is to minimize regret, which is the total loss of all rounds relative to w⋆, the minimizer of PT t=1 ℓt in W: RT (w⋆) = T X t=1 ℓt(wt) −ℓt(w⋆) OCO algorithms typically either make as few as possible assumptions about the ℓt while attempting to perform well (adversarial settings), or assume that the ℓt have some particular structure that can be leveraged to perform much better (stochastic settings). For the adversarial setting, the minimax optimal regret is O(BLmax √ T), where B is the diameter of W and Lmax is the maximum Lipschitz constant of the losses [3]. A wide variety of algorithms achieve this bound without prior knowledge of one or both of B and Lmax [4, 5, 6, 7], resulting in hyperparameter-free algorithms. In the stochastic setting, it was recently shown that for a class of problems (those satisfying the so-called Bernstein condition), one can achieve regret O(dBLmax log(T)) where W ⊂Rd using the METAGRAD algorithm [8, 9]. This approach requires knowledge of the parameter Lmax. In this paper, we extend an algorithm for the parameter-free adversarial setting [7] to the stochastic setting, achieving both optimal regret in adversarial settings as well as logarithmic regret in a wide class of stochastic settings, without needing to tune parameters. Our class of stochastic settings is those for which E[∇ℓt(wt)] is aligned with wt −w⋆, quantified by a value α that increases with 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. increasing alignment. We call losses in this class α-acutely convex, and show that a single quadratic lower bound on the average loss is sufficient to ensure high α. This paper is organized as follows. In Section 2, we provide an overview of our approach. In Section 3, we give explicit pseudo-code and prove our regret bounds for the adversarial setting. In Section 4, we formally define α-acute convexity and prove regret bounds for the acutely convex stochastic setting. Finally, in Section 5, we give some motivating examples of acutely convex stochastic losses. Section 6 concludes the paper. 2 Overview of Approach Before giving the overview, we fix some notation. We assume our domain W is a closed convex subset of a Hilbert space with 0 ∈W. We write gt to be an arbitrary subgradient of ℓt at wt for all t, which we denote by gt ∈∂ℓt(wt). Lmax is the maximum Lipschitz constant of all the ℓt, and B is the diameter of the space W. The norm ∥· ∥we use is the 2-norm: ∥w∥= √w · w. We observe that since each ℓt is convex, we have RT (w⋆) ≤PT t=1 gt(wt −w⋆). We will make heavy use of this inequality; every regret bound we state will in fact be an upper bound on PT t=1 gt(wt −w⋆). Finally, we use a compressed sum notation g1:t = Pt t′=1 gt′, and we use ˜O to suppress logarithmic terms in big-Oh notation. All proofs omitted from the main text appear in the appendix. Our algorithm works by trading off some performance in order to avoid knowledge of problem parameters. Prior analysis of the METAGRAD algorithm [9] showed that any algorithm guaranteeing RT (w⋆) = ˜O qPT t=1(gt · (wt −w⋆))2 will obtain logarithmic regret for stochastic settings satisfying the Bernstein condition. We will instead guarantee the weaker regret bound: RT (w⋆) ≤˜O v u u tLmax T X t=1 ∥gt∥∥wt −w⋆∥2 (1) which we will show in turn implies √ T regret in adversarial settings and logarithmic regret for acutely convex stochastic settings. Although (1) is weaker than the METAGRAD regret bound, we can obtain it without prior knoweldge. In order to come up with an algorithm that achieves the bound (1), we interpret it as the square root of E[∥w −w⋆∥2], where w takes on value wt with probability proportional to ∥gt∥. This allows us to use the bias-variance decomposition to write (1) as: RT (w⋆) ≤˜O ∥w⋆−w∥ p Lmax∥g∥1:T + v u u t T X t=1 Lmax∥gt∥∥wt −w∥2 (2) where w = PT t=1 ∥gt∥wt ∥g∥1:T . Certain algorithms for unconstrained OCO can achieve RT (u) = ˜O(∥u∥Lmax p ∥g∥1:T ) simultaneously for all u ∈W [10, 6, 11, 7]. Thus if we knew w ahead of time, we could translate the predictions of one such algorithm by w to abtain RT (w⋆) ≤ ˜O(∥w⋆−w∥Lmax p ∥g∥1:T ), the bias term of (2). We do not know w, but we can estimate it over time. Errors in the estimation procedure will cause us to incur the variance term of (2). We implement this strategy by modifying FREEREX [7], an unconstrained OCO algorithm that does not require prior knowledge of any parameters. Our modification to FREEREX is very simple: we set wt = ˆwt + wt−1 where ˆwt is the tth output of FREEREX, and wt−1 is (approximately) a weighted average of the previous vectors w1, . . . , wt−1 with the weight of wt equal to ∥gt∥. This wt offset can be viewed as a kind of momentum term that accelerates us towards optimal points when the losses are stochastic (which tends to cause correlated wt and therefore large offsets), but has very little effect when the losses are adversarial (which tends to cause uncorrelated wt and therefore small offsets). 2 3 FREEREXMOMENTUM In this section, we explicitly describe and analyze our algorithm, FREEREXMOMENTUM, a modification of FREEREX. FREEREX is a Follow-the-Regularized-Leader (FTRL) algorithm, which means that for all t, there is some regularizer function ψt such that wt+1 = argminW ψt(w) + g1:t · w. Specifically, FREEREX uses ψt = √ 5 atηt φ(atw), where φ(w) = (∥w∥+ 1) log(∥w∥+ 1) −∥w∥ and ηt and at are specific numbers that grow over time as specified in Algorithm 1. FREEREXMOMENTUM’s predictions are given by offsetting FREEREX’s predictions wt+1 by a momentum term wt = Pt−1 t′=1 ∥gt′∥wt 1+∥g∥1:t . We accomplish this by shifting the regularizers ψt by wt, so that FREEREXMOMENTUM is FTRL with regularizers ψt(w −wt). Algorithm 1 FREEREXMOMENTUM Initialize: 1 η2 0 ←0, a0 ←0, w1 ←0, L0 ←0, ψ(w) = (∥w∥+ 1) log(∥w∥+ 1) −∥w∥ for t = 1 to T do Play wt Receive subgradient gt ∈∂ℓt(wt) Lt ←max(Lt−1, ∥gt∥). // Lt = maxt′≤t ∥gt∥ 1 η2 t ←max 1 η2 t−1 + 2∥gt∥2, Lt∥g1:t∥ . at ←max(at−1, 1/(Ltηt)2) wt ← Pt−1 t′=1 ∥gt′∥wt 1+∥g∥1:t wt+1 ←argminW h √ 5φ(at(w−wt) atηt + g1:t · w i end for 3.1 Regret Analysis We leverage the description of FREEREXMOMENTUM in terms of shifted regularizers to prove a regret bound of the same form as (1) in four steps: 1. From [7] Theorem 13, we bound the regret by RT (w⋆) ≤ T X t=1 gt · (wt −w⋆) ≤ψT (w⋆) + T X t=1 ψt−1(w+ t+1) −ψ+ t (w+ t+1) + gt · (wt −w+ t+1) + ψ+ T (w⋆) −ψT (w⋆) + T −1 X t=1 ψ+ t (w+ t+2) −ψt(w+ t+2) where ψ+ t (w) ≈ √ 5φ(at(w−wt−1) atηt is a version of ψt shifted by wt−1 instead of wt, and w+ t+1 = argminW ψ+ t (w) + g1:tw. This breaks the regret out into two sums, one in which we have the term ψt−1(w+ t+1) −ψ+ t (w+ t+1) for which the two different functions are shifted by the same amount, and one with the term ψ+ t (w+ t+2) −ψt(w+ t+2), for which the functions are shifted differently, but the arguments are the same. 2. Because ψt−1 and ψ+ t are shifted by the same amount, the regret analysis for FREEREX in [7] applies to the second line of the regret bound, yielding a quantity similar to ∥w⋆− wT ∥ p Lmax∥g∥1:T . 3. Next, we analyze the third line. We show that wt −wt−1 cannot be too big, and use this observation to bound the third line with a quantity similar to qPT t=1 Lmax∥gt∥(wt −wT )2. At this point we have enough results to prove a bound of the form (2) (see Theorem 1). 4. Finally, we perform some algebraic manipulation on the bound from the first three steps to obtain a bound of the form (1) (see Corollary 2). 3 The details of Steps 1-3 procedure are in the appendix, resulting in Theorem 1, stated below. Step 4 is carried out in Corollary 2, which follows. Theorem 1. Let ψ(w) = (∥w∥+1) log(∥w∥+1)−∥w∥. Set Lt = maxt′≤t ∥gt′∥, and QT = 2 ∥g∥1:T Lmax . Define 1 ηt and at as in the pseudo-code for FREEREXMOMENTUM (Algorithm 1). Then the regret of FREEREXMOMENTUM is bounded by: T X t=1 gt·(wt−w⋆) ≤ √ 5 QT ηT ψ(QT (w⋆−wT ))+405Lmax+2LmaxB+3Lmax √2Lmax √1 + L1 B log(BaT +1) + v u u t2Lmax ∥wT ∥2 + T X t=1 ∥gt∥∥wt −wT ∥2 ! 2 + log 1 + ∥g∥1:T 1 + ∥g1∥ log(BaT + 1) Corollary 2. Under the assumptions and notation of Theorem 1, the regret of FREEREXMOMENTUM is bounded by: T X t=1 gt · (wt −w⋆) ≤2 √ 5 v u u tLmax ∥w⋆∥2 + T X t=1 ∥gt∥∥w⋆−wt∥2 ! log(2BT + 1)(2 + log(T)) + 405Lmax + 2LmaxB + 3Lmax √2Lmax √1 + L1 B log(2BT + 1) Observe that since wt and w⋆are both in W, ∥w⋆∥and ∥wt −w⋆∥both are at most B, so that Corollary 2 implies that FREEREXMOMENTUM achieves ˜O(BLmax √ T) regret in the worst-case, which is optimal up to logarithmic factors. 3.2 Efficient Implementation for L∞Balls A careful reader may notice that the procedure for FREEREXMOMENTUM involves computing argminW h √ 5ψ(at(w−wt) atηt + g1:t · w i , which may not be easy if the solution wt+1 is on the boundary of W. When the wt+1 is not on the boundary of W, then we have a closed-form update: wt+1 = wt − g1:t at∥g1:t∥ exp ηt∥g1:t∥ √ 5 −1 (3) However, when wt+1 lies on the boundary of W, it is not clear how to compute it for general W. In this section we offer a simple strategy for the case that W is an L∞ball, W = Qd i=1[−b, b]. In this setting, we can use the standard trick (e.g. see [12]) of running a separate copy of FREEREXMOMENTUM for each coordinate. That is, we observe that RT (w⋆) ≤ T X t=1 gt · (wt −u) = d X i=1 T X t=1 gt,i(wt,i −ui) (4) so that if we run an independent online learning algorithm on each coordinate, using the coordinates of the gradients gt,i as losses, then the total regret is at most the sum of the individual regrets. More detailed pseudocode is given in Algorithm 2. Coordinate-wise FREEREXMOMENTUM is easily implementable in time O(d) per update because the FREEREXMOMENTUM update is easy to perform in one dimension: if the update (3) is outside the domain [−b, b], simply set wt+1 to b or −b, whichever is closer to the unconstrained update. Therefore, coordinate-wise FREEREXMOMENTUM can be computed in O(d) time per update. We bound the regret of coordinate-wise FREEREXMOMENTUM using Corollary 2 and Equation (4), resulting the following Corollary. 4 Algorithm 2 Coordinate-Wise FREEREXMOMENTUM Initialize: w1 = 0, d copies of FREEREXMOMENTUM, F1,...,Fd, where each Fi uses domain W = [−b, b]. for t = 1 to T do Play wt, receive subgradient gt. for i = 1 to d do Give gt,i to Fi. Get wt+1,i ∈[−b, b] from Fi. end for end for Corollary 3. The regret of coordinate-wise FREEREXMOMENTUM is bounded by: T X t=1 gt · (wt −w⋆) ≤2 √ 5 v u u tdLmax d∥w⋆∥2 + T X t=1 ∥gt∥∥w⋆−wt∥2 ! log(2Tb + 1)(2 + log(T)) + 405dLmax + 2Lmaxdb + 3dLmax √2Lmax √1 + L1 b log(2bT + 1) 4 Logarithmic Regret in Stochastic Problems In this section we formally define α-acute convexity and show that FREEREXMOMENTUM achieves logarithmic regret for α-acutely convex losses. As a warm-up, we first consider the simplest case in which the loss functions ℓt are fixed, ℓt = ℓfor all t. After showing logarithmic regret for this case, we will then generalize to more complicated stochastic settings. Intuitively, an acutely convex loss function ℓis one for which the gradient gt is aligned with the vector wt −w⋆where w⋆= argmin ℓ, as defined below. Definition 4. A convex function ℓis α-acutely convex on a set W if ℓhas a global minimum at some w⋆∈W and for all w ∈W, for all subgradients g ∈∂ℓ(w), we have g · (w −w⋆) ≥α∥g∥∥w −w⋆∥2 With this definition in hand, we can show logarithmic regret in the case where ℓt = ℓfor all t for some α-acutely convex function ℓ. From Corollary 2, with w⋆= argmin ℓ, we have T X t=1 gt · (wt −w⋆) ≤˜O v u u tLmax ∥w⋆∥2 + T X t=1 ∥gt∥∥w⋆−wt∥2 ! ≤˜O v u u tLmax ∥w⋆∥+ 1 α T X t=1 gt · (w⋆−wt) ! (5) Where the ˜O notation suppresses terms whose dependence on T is at most O(log2(T)). Now we need a small Proposition: Proposition 5. If a, b, c and d are non-negative constants such that x ≤a √ bx + c + d Then x ≤4a2b + 2a√c + 2d Applying Proposition 5 to Equation (5) with x = PT t=1 gt · (wt −w⋆) yields RT (u) ≤˜O Lmax∥w⋆∥ α 5 where the ˜O again suppresses logarithmic terms, now with dependence on T at most O(log4(T)). Having shown that FREEREXMOMENTUM achieves logarithmic regret on fixed α-acutely convex losses, we now generalize to stochastic losses. In order to do this we will necessarily have to make some assumptions about the process generating the stochastic losses. We encapsulate these assumptions in a stochastic version of α-acute convexity, given below. Definition 6. Suppose for all t, gt is such that E[gt|g1, . . . gt−1] ∈∂ℓ(wt) for some convex function ℓwith minimum at w⋆. Then we say gt is α-acutely convex in expectation if: E[gt] · (wt −w⋆) ≥α E[∥gt∥∥wt −w⋆∥2] where all expectations are conditioned on g1, . . . , gt−1. Using this definition, a fairly straightforward calculation gives us the following result. Theorem 7. Suppose gt is α-acutely convex in expectation and gt is bounded ∥gt∥≤Lmax with probability 1. Then FREEREXMOMENTUM achieves expected regret: E[RT (w⋆)] ≤˜O Lmax∥w⋆∥ α Proof. Throughout this proof, all expectations are conditioned on prior subgradients. By Corollary 2 and Jensen’s inequality we have E " T X t=1 gt · (wt −w⋆) # ≤E 405Lmax + 2LmaxB + 3Lmax √2Lmax √1 + L1 B log(2BT + 1) +2 √ 5 v u u tLmax ∥w⋆∥2 + T X t=1 ∥gt∥∥w⋆−wt∥2 ! log(2TB + 1)(2 + log(T)) ≤405Lmax + 2LmaxB + 3Lmax √2Lmax √ δ B log(2BT + 1) + 2 √ 5 v u u tLmax ∥w⋆∥2 + T X t=1 E[∥gt∥∥w⋆−wt∥2] ! log(2TB + 1)(2 + log(T)) ≤405Lmax + 2LmaxB + 3Lmax √2Lmax √ δ B log(2BT + 1) + 2 √ 5 v u u tLmax ∥w⋆∥2 + 1 α T X t=1 E[gt · (wt −w⋆)] ! log(2TB + 1)(2 + log(T)) Set R = E hPT t=1 gt(wt −w⋆) i . Then we have shown R ≤2 √ 5 s Lmax ∥w⋆∥2 + R α log(2TB + 1)(2 + log(T)) + 405Lmax + 2LmaxB + 3Lmax √2Lmax √ δ B log(BT + 1) = ˜O "s Lmax ∥w⋆∥2 + R α # And now we use Proposition 5 to conclude: T X t=1 E[gt · (wt −w⋆)] = ˜O Lmax∥w⋆∥ α as desired, where again ˜O hides at most a O(log4(T)) dependence on T. Exactly the same argument with an extra factor of d applies to the regret of FREEREXMOMENTUM with coordinate-wise updates. 6 5 Examples of α-acute convexity in expectation In this section, we show that α-acute convexity in expectation is a condition that arises in practice, justifying the relevance of our logarithmic regret bounds. To do this, we show that a quadratic lower bound on the expected loss implies α-acute convexity, demonstrating acutely convexity is a weaker condition than strong convexity. Proposition 8. Suppose E[gt|g1, . . . , gt−1] ∈∂ℓ(wt) for some convex ℓsuch that for some µ > 0 and w⋆= argmin ℓ, ℓ(w) −ℓ(w⋆) ≥µ 2 ∥w −w⋆∥2 for all w ∈W. Suppose ∥g∥≤Lmax with probability 1. Then gt is µ 2Lmax -acutely convex in expectation. Proof. By convexity and the hypothesis of the proposition: E[gt] · (wt −w⋆) ≥ℓ(wt) −ℓ(w⋆) ≥ µ 2 ∥wt −w⋆∥2 ≥ µ 2Lmax E[∥gt∥∥wt −w⋆∥2 With Proposition 8, we see that FREEREXMOMENTUM obtains logarithmic regret for any loss that is larger than a quadratic, without requiring knowledge of the parameter µ or the Lipschitz bound Lmax. Further, this result requires only the expected loss ℓ= E[ℓt] to have a quadratic lower bound - the individual losses ℓt themselves need not do so. The boundedness of W makes it surprisingly easy to have a quadratic lower bound. Although a quadratic lower bound for a function ℓis easily implied by strong convexity, the quadratic lower bound is a significantly weaker condition. For example, since W has diameter B, ∥w∥≥1 B ∥w∥2 and so the absolute value is 1 B -acutely convex, but not strongly convex. The following Proposition shows that existence of a quadratic lower bound is actually a local condition; so long as the expected loss ℓhas a quadratic lower bound in a neighborhood of w⋆, it must do so over the entire space W: Proposition 9. Supppose ℓ: W →R is a convex function such that ℓ(w) −ℓ(w⋆) ≥µ 2 ∥w −w⋆∥ for all w with ∥w −w⋆∥≤r. Then ℓ(w) −ℓ(w⋆) ≥min µr 2B , µ 2 ∥w −w⋆∥2 for all w ∈W. Proof. We translate by w⋆to assume without loss of generality that w⋆= 0. Then the statement is clear for ∥w∥≤r. By convexity, ℓ(w) −ℓ(w⋆) ≥ ∥w∥ r h ℓ rw ∥w∥ −ℓ(w⋆) i ≥ µr 2 ∥w∥≥ µr 2B ∥w∥2. Finally, we provide a simple motivating example of an interesting problem we can solve with an α-acutely convex loss that is not strongly convex: computing the median. Proposition 10. Let W = [a, b], and ℓt(w) = |w −xt| where each xt is drawn i.i.d. from some fixed distribution with a continuous cumulative distribution function D, and assume D(x⋆) = 1 2. Further, suppose |2D(w) −1| ≥F|w −x⋆| for all |w −x⋆| ≤G. Suppose gt = ℓ′ t(wt) for wt ̸= xt and gt = ±1 with equal probability if wt = xt. Then gt is min F G b−a, F -acutely convex in expectation. Proof. By a little calculation, E[gt] = ℓ′(wt) = 2D(wt) −1, and E[|gt|] = 1. Since ℓ′(x⋆) = 0, w⋆= x⋆(the median). For |wt −x⋆| ≥G, we have |2D(w) −1| ≥FG, which gives E[gt] · (wt − w⋆) ≥F G b−a E[|gt|](wt −w⋆)2. For |wt −x⋆| ≤G, we have E[gt]·(wt −w⋆) ≥F E[|gt|](wt −w⋆)2, so that gt is min F G b−a, F -acutely convex in expectation. Proposition 10 shows that we can obtain low regret for an interesting stochastic problem without curvature. The condition on the cumulative distribution function D is asking only that there be positive density in a neighborhood of the median; it would be satisfied if D′(w) ≥F for |w| ≤G. If the expected loss ℓis µ-strongly convex, we can apply Proposition 8 to see that ℓis µ/2-aligned, and then use Theorem 7 to obtain a regret of ˜O(Lmax∥w⋆∥/µ). This is different from the usual regret bound of ˜O(L2 max/µ) obtained by Online Newton Step [13], which is due to an inefficiency in using the wearker α-alignment condition. Instead, arguing from the regret bound of Corollary 2 directly, we can recover the optimal regret bound: 7 Corollary 11. Suppose each ℓt is an independent random variable with E[ℓt] = ℓfor some µ-strongly convex ℓwith minimum at w⋆. Then the expected regret of FREEREXMOMENTUM satisfies E " T X t=1 ℓ(wt) −ℓ(w∗) # ≤˜O(L2 max/µ) Where the ˜O hides terms that are logarithmic in TB. Proof. From strong-convexity, we have ∥wt −w⋆∥2 ≤2 µ(ℓ(wt) −ℓ(w⋆)) Therefore applying Corollary 2 we have E[RT (w⋆)] = E " T X t=1 ℓ(wt) −ℓ(w∗) # ≤˜O v u u tL2max E[ T X t=1 ∥wt −w⋆∥2] ≤˜O( p L2max E[RT (w⋆)]) So that applying Proposition 5 we obtain the desired result. As a result of Corollary 11, we see that FREEREXMOMENTUM obtains logarithmic regret for αaligned problems and also obtains the optimal (up to log factors) regret bound for µ-strongly-convex problems, all without requiring any knowledge of the parameters α or µ. This stands in contrast to prior algorithms that adapt to user-supplied curvature information such as Adaptive Gradient Descent [14] or (A, B)-prod [15]. 6 Conclusions and Open Problems We have presented an algorithm, FREEREXMOMENTUM, that achieves both ˜O(BLmax √ T) regret in adversarial settings and ˜O LmaxB α regret in α-acutely convex stochastic settings without requiring any prior information about any parameters. We further showed that a quadratic lower bound on the expected loss implies acute convexity, so that while strong-convexity is sufficient for acute convexity, other important loss families such as the absolute loss may also be acutely convex. Since FREEREXMOMENTUM does not require prior information about any problem parameters, it does not require any hyperparameter tuning to be assured of good convergence. Therefore, the user need not actually know whether a particular problem is adversarial or acutely convex and stochastic, or really much of anything at all about the problem, in order to use FREEREXMOMENTUM. There are still many interesting open questions in this area. First, we would like to find an efficient way to implement the FREEREXMOMENTUM algorithm or some variant directly, without appealing to coordinate-wise updates. This would enable us to remove the factor of d we incur by using coordinate-wise updates. Second, our modification to FREEREX is extremely simple and intuitive, but our analysis makes use of some of the internal logic of FREEREX. It is possible, however, that any algorithm with sufficiently low regret can be modified in a similar way to achieve our results. Finally, we observe that while log4(T) is much better than √ T asymptotically, it turns out that log4(T) > √ T for T < 1011, which casts the practical relevance of our logarithmic bounds in doubt. Therefore we hope that this work serves as a starting point for either new analysis or algorithm design that further simplifies and improves regret bounds. References [1] Martin Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In Proceedings of the 20th International Conference on Machine Learning (ICML-03), pages 928–936, 2003. [2] Shai Shalev-Shwartz. Online learning and online convex optimization. Foundations and Trends in Machine Learning, 4(2):107–194, 2011. 8 [3] Jacob Abernethy, Peter L Bartlett, Alexander Rakhlin, and Ambuj Tewari. Optimal strategies and minimax lower bounds for online convex games. In Proceedings of the nineteenth annual conference on computational learning theory, 2008. [4] J. Duchi, E. Hazan, and Y. Singer. Adaptive subgradient methods for online learning and stochastic optimization. In Conference on Learning Theory (COLT), 2010. [5] H. Brendan McMahan and Matthew Streeter. Adaptive bound optimization for online convex optimization. In Proceedings of the 23rd Annual Conference on Learning Theory (COLT), 2010. [6] Francesco Orabona and Dávid Pál. Coin betting and parameter-free online learning. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 577–585. Curran Associates, Inc., 2016. [7] Ashok Cutkosky and Kwabena Boahen. Online learning without prior information. arXiv preprint arXiv:1703.02629, 2017. [8] Tim van Erven and Wouter M Koolen. Metagrad: Multiple learning rates in online learning. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 3666–3674. Curran Associates, Inc., 2016. [9] Wouter M Koolen, Peter Grünwald, and Tim van Erven. Combining adversarial guarantees and stochastic fast rates in online learning. In Advances in Neural Information Processing Systems, pages 4457–4465, 2016. [10] Francesco Orabona. Dimension-free exponentiated gradient. In Advances in Neural Information Processing Systems, pages 1806–1814, 2013. [11] Ashok Cutkosky and Kwabena A Boahen. Online convex optimization with unconstrained domains and losses. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 748–756. Curran Associates, Inc., 2016. [12] Brendan Mcmahan and Matthew Streeter. No-regret algorithms for unconstrained online convex optimization. In Advances in neural information processing systems, pages 2402–2410, 2012. [13] Elad Hazan, Amit Agarwal, and Satyen Kale. Logarithmic regret algorithms for online convex optimization. Machine Learning, 69(2):169–192, 2007. [14] Peter L Bartlett, Elad Hazan, and Alexander Rakhlin. Adaptive online gradient descent. In NIPS, volume 20, pages 65–72, 2007. [15] Amir Sani, Gergely Neu, and Alessandro Lazaric. Exploiting easy data in online optimization. In Advances in Neural Information Processing Systems, pages 810–818, 2014. 9 | 2017 | 277 |
6,760 | Masked Autoregressive Flow for Density Estimation George Papamakarios University of Edinburgh g.papamakarios@ed.ac.uk Theo Pavlakou University of Edinburgh theo.pavlakou@ed.ac.uk Iain Murray University of Edinburgh i.murray@ed.ac.uk Abstract Autoregressive models are among the best performing neural density estimators. We describe an approach for increasing the flexibility of an autoregressive model, based on modelling the random numbers that the model uses internally when generating data. By constructing a stack of autoregressive models, each modelling the random numbers of the next model in the stack, we obtain a type of normalizing flow suitable for density estimation, which we call Masked Autoregressive Flow. This type of flow is closely related to Inverse Autoregressive Flow and is a generalization of Real NVP. Masked Autoregressive Flow achieves state-of-the-art performance in a range of general-purpose density estimation tasks. 1 Introduction The joint density p(x) of a set of variables x is a central object of interest in machine learning. Being able to access and manipulate p(x) enables a wide range of tasks to be performed, such as inference, prediction, data completion and data generation. As such, the problem of estimating p(x) from a set of examples {xn} is at the core of probabilistic unsupervised learning and generative modelling. In recent years, using neural networks for density estimation has been particularly successful. Combining the flexibility and learning capacity of neural networks with prior knowledge about the structure of data to be modelled has led to impressive results in modelling natural images [4, 30, 37, 38] and audio data [34, 36]. State-of-the-art neural density estimators have also been used for likelihood-free inference from simulated data [21, 23], variational inference [13, 24], and as surrogates for maximum entropy models [19]. Neural density estimators differ from other approaches to generative modelling—such as variational autoencoders [12, 25] and generative adversarial networks [7]—in that they readily provide exact density evaluations. As such, they are more suitable in applications where the focus is on explicitly evaluating densities, rather than generating synthetic data. For instance, density estimators can learn suitable priors for data from large unlabelled datasets, for use in standard Bayesian inference [39]. In simulation-based likelihood-free inference, conditional density estimators can learn models for the likelihood [5] or the posterior [23] from simulated data. Density estimators can learn effective proposals for importance sampling [22] or sequential Monte Carlo [8, 21]; such proposals can be used in probabilistic programming environments to speed up inference [15, 16]. Finally, conditional density estimators can be used as flexible inference networks for amortized variational inference and as part of variational autoencoders [12, 25]. A challenge in neural density estimation is to construct models that are flexible enough to represent complex densities, but have tractable density functions and learning algorithms. There are mainly two families of neural density estimators that are both flexible and tractable: autoregressive models [35] and normalizing flows [24]. Autoregressive models decompose the joint density as a product of conditionals, and model each conditional in turn. Normalizing flows transform a base density (e.g. a standard Gaussian) into the target density by an invertible transformation with tractable Jacobian. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Our starting point is the realization (as pointed out by Kingma et al. [13]) that autoregressive models, when used to generate data, correspond to a differentiable transformation of an external source of randomness (typically obtained by random number generators). This transformation has a tractable Jacobian by design, and for certain autoregressive models it is also invertible, hence it precisely corresponds to a normalizing flow. Viewing an autoregressive model as a normalizing flow opens the possibility of increasing its flexibility by stacking multiple models of the same type, by having each model provide the source of randomness for the next model in the stack. The resulting stack of models is a normalizing flow that is more flexible than the original model, and that remains tractable. In this paper we present Masked Autoregressive Flow (MAF), which is a particular implementation of the above normalizing flow that uses the Masked Autoencoder for Distribution Estimation (MADE) [6] as a building block. The use of MADE enables density evaluations without the sequential loop that is typical of autoregressive models, and thus makes MAF fast to evaluate and train on parallel computing architectures such as Graphics Processing Units (GPUs). We show a close theoretical connection between MAF and Inverse Autoregressive Flow (IAF) [13], which has been designed for variational inference instead of density estimation, and show that both correspond to generalizations of the successful Real NVP [4]. We experimentally evaluate MAF on a wide range of datasets, and we demonstrate that (a) MAF outperforms Real NVP on general-purpose density estimation, and (b) a conditional version of MAF achieves close to state-of-the-art performance on conditional image modelling even with a general-purpose architecture. 2 Background 2.1 Autoregressive density estimation Using the chain rule of probability, any joint density p(x) can be decomposed into a product of one-dimensional conditionals as p(x) = Q i p(xi | x1:i−1). Autoregressive density estimators [35] model each conditional p(xi | x1:i−1) as a parametric density, whose parameters are a function of a hidden state hi. In recurrent architectures, hi is a function of the previous hidden state hi−1 and the ith input variable xi. The Real-valued Neural Autoregressive Density Estimator (RNADE) [32] uses mixtures of Gaussian or Laplace densities for modelling the conditionals, and a simple linear rule for updating the hidden state. More flexible approaches for updating the hidden state are based on Long Short-Term Memory recurrent neural networks [30, 38]. A drawback of autoregressive models is that they are sensitive to the order of the variables. For example, the order of the variables matters when learning the density of Figure 1a if we assume a model with Gaussian conditionals. As Figure 1b shows, a model with order (x1, x2) cannot learn this density, even though the same model with order (x2, x1) can represent it perfectly. In practice is it hard to know which of the factorially many orders is the most suitable for the task at hand. Autoregressive models that are trained to work with an order chosen at random have been developed, and the predictions from different orders can then be combined in an ensemble [6, 33]. Our approach (Section 3) can use a different order in each layer, and using random orders would also be possible. Straightforward recurrent autoregressive models would update a hidden state sequentially for every variable, requiring D sequential computations to compute the probability p(x) of a D-dimensional vector, which is not well-suited for computation on parallel architectures such as GPUs. One way to enable parallel computation is to start with a fully-connected model with D inputs and D outputs, and drop out connections in order to ensure that output i will only be connected to inputs 1, 2, . . . , i−1. Output i can then be interpreted as computing the parameters of the ith conditional p(xi | x1:i−1). By construction, the resulting model will satisfy the autoregressive property, and at the same time it will be able to calculate p(x) efficiently on a GPU. An example of this approach is the Masked Autoencoder for Distribution Estimation (MADE) [6], which drops out connections by multiplying the weight matrices of a fully-connected autoencoder with binary masks. Other mechanisms for dropping out connections include masked convolutions [38] and causal convolutions [36]. 2.2 Normalizing flows A normalizing flow [24] represents p(x) as an invertible differentiable transformation f of a base density πu(u). That is, x = f(u) where u ∼πu(u). The base density πu(u) is chosen such that it can be easily evaluated for any input u (a common choice for πu(u) is a standard Gaussian). Under 2 (a) Target density (b) MADE with Gaussian conditionals (c) MAF with 5 layers Figure 1: (a) The density to be learnt, defined as p(x1, x2) = N(x2 | 0, 4)N x1 | 1 4x2 2, 1 . (b) The density learnt by a MADE with order (x1, x2) and Gaussian conditionals. Scatter plot shows the train data transformed into random numbers u; the non-Gaussian distribution indicates that the model is a poor fit. (c) Learnt density and transformed train data of a 5 layer MAF with the same order (x1, x2). the invertibility assumption for f, the density p(x) can be calculated as p(x) = πu f −1(x) det ∂f −1 ∂x . (1) In order for Equation (1) to be tractable, the transformation f must be constructed such that (a) it is easy to invert, and (b) the determinant of its Jacobian is easy to compute. An important point is that if transformations f1 and f2 have the above properties, then their composition f1 ◦f2 also has these properties. In other words, the transformation f can be made deeper by composing multiple instances of it, and the result will still be a valid normalizing flow. There have been various approaches in developing normalizing flows. An early example is Gaussianization [2], which is based on successive application of independent component analysis. Enforcing invertibility with nonsingular weight matrices has been proposed [1, 26], however in such approaches calculating the determinant of the Jacobian scales cubicly with data dimensionality in general. Planar/radial flows [24] and Inverse Autoregressive Flow (IAF) [13] are models whose Jacobian is tractable by design. However, they were developed primarily for variational inference and are not well-suited for density estimation, as they can only efficiently calculate the density of their own samples and not of externally provided datapoints. The Non-linear Independent Components Estimator (NICE) [3] and its successor Real NVP [4] have a tractable Jacobian and are also suitable for density estimation. IAF, NICE and Real NVP are discussed in more detail in Section 3. 3 Masked Autoregressive Flow 3.1 Autoregressive models as normalizing flows Consider an autoregressive model whose conditionals are parameterized as single Gaussians. That is, the ith conditional is given by p(xi | x1:i−1) = N xi | µi, (exp αi)2 where µi = fµi(x1:i−1) and αi = fαi(x1:i−1). (2) In the above, fµi and fαi are unconstrained scalar functions that compute the mean and log standard deviation of the ith conditional given all previous variables. We can generate data from the above model using the following recursion: xi = ui exp αi + µi where µi = fµi(x1:i−1), αi = fαi(x1:i−1) and ui ∼N(0, 1). (3) In the above, u = (u1, u2, . . . , uI) is the vector of random numbers the model uses internally to generate data, typically by making calls to a random number generator often called randn(). Equation (3) provides an alternative characterization of the autoregressive model as a transformation f from the space of random numbers u to the space of data x. That is, we can express the model as x = f(u) where u ∼N(0, I). By construction, f is easily invertible. Given a datapoint x, the random numbers u that were used to generate it are obtained by the following recursion: ui = (xi −µi) exp(−αi) where µi = fµi(x1:i−1) and αi = fαi(x1:i−1). (4) 3 Due to the autoregressive structure, the Jacobian of f −1 is triangular by design, hence its absolute determinant can be easily obtained as follows: det ∂f −1 ∂x = exp − X iαi where αi = fαi(x1:i−1). (5) It follows that the autoregressive model can be equivalently interpreted as a normalizing flow, whose density p(x) can be obtained by substituting Equations (4) and (5) into Equation (1). This observation was first pointed out by Kingma et al. [13]. A useful diagnostic for assessing whether an autoregressive model of the above type fits the target density well is to transform the train data {xn} into corresponding random numbers {un} using Equation (4), and assess whether the ui’s come from independent standard normals. If the ui’s do not seem to come from independent standard normals, this is evidence that the model is a bad fit. For instance, Figure 1b shows that the scatter plot of the random numbers associated with the train data can look significantly non-Gaussian if the model fits the target density poorly. Here we interpret autoregressive models as a flow, and improve the model fit by stacking multiple instances of the model into a deeper flow. Given autoregressive models M1, M2, . . . , MK, we model the density of the random numbers u1 of M1 with M2, model the random numbers u2 of M2 with M3 and so on, finally modelling the random numbers uK of MK with a standard Gaussian. This stacking adds flexibility: for example, Figure 1c demonstrates that a flow of 5 autoregressive models is able to learn multimodal conditionals, even though each model has unimodal conditionals. Stacking has previously been used in a similar way to improve model fit of deep belief nets [9] and deep mixtures of factor analyzers [28]. We choose to implement the set of functions {fµi, fαi} with masking, following the approach used by MADE [6]. MADE is a feedforward network that takes x as input and outputs µi and αi for all i with a single forward pass. The autoregressive property is enforced by multiplying the weight matrices of MADE with suitably constructed binary masks. In other words, we use MADE with Gaussian conditionals as the building layer of our flow. The benefit of using masking is that it enables transforming from data x to random numbers u and thus calculating p(x) in one forward pass through the flow, thus eliminating the need for sequential recursion as in Equation (4). We call this implementation of stacking MADEs into a flow Masked Autoregressive Flow (MAF). 3.2 Relationship with Inverse Autoregressive Flow Like MAF, Inverse Autoregressive Flow (IAF) [13] is a normalizing flow which uses MADE as its component layer. Each layer of IAF is defined by the following recursion: xi = ui exp αi + µi where µi = fµi(u1:i−1) and αi = fαi(u1:i−1). (6) Similarly to MAF, functions {fµi, fαi} are computed using a MADE with Gaussian conditionals. The difference is architectural: in MAF µi and αi are directly computed from previous data variables x1:i−1, whereas in IAF µi and αi are directly computed from previous random numbers u1:i−1. The consequence of the above is that MAF and IAF are different models with different computational trade-offs. MAF is capable of calculating the density p(x) of any datapoint x in one pass through the model, however sampling from it requires performing D sequential passes (where D is the dimensionality of x). In contrast, IAF can generate samples and calculate their density with one pass, however calculating the density p(x) of an externally provided datapoint x requires D passes to find the random numbers u associated with x. Hence, the design choice of whether to connect µi and αi directly to x1:i−1 (obtaining MAF) or to u1:i−1 (obtaining IAF) depends on the intended usage. IAF is suitable as a recognition model for stochastic variational inference [12, 25], where it only ever needs to calculate the density of its own samples. In contrast, MAF is more suitable for density estimation, because each example requires only one pass through the model whereas IAF requires D. A theoretical equivalence between MAF and IAF is that training a MAF with maximum likelihood corresponds to fitting an implicit IAF to the base density with stochastic variational inference. Let πx(x) be the data density we wish to learn, πu(u) be the base density, and f be the transformation from u to x as implemented by MAF. The density defined by MAF (with added subscript x for disambiguation) is px(x) = πu f −1(x) det ∂f −1 ∂x . (7) 4 The inverse transformation f −1 from x to u can be seen as describing an implicit IAF with base density πx(x), which defines the following implicit density over the u space: pu(u) = πx(f(u)) det ∂f ∂u . (8) Training MAF by maximizing the total log likelihood P n log p(xn) on train data {xn} corresponds to fitting px(x) to πx(x) by stochastically minimizing DKL(πx(x) ∥px(x)). In Section A of the supplementary material, we show that DKL(πx(x) ∥px(x)) = DKL(pu(u) ∥πu(u)). (9) Hence, stochastically minimizing DKL(πx(x) ∥px(x)) is equivalent to fitting pu(u) to πu(u) by minimizing DKL(pu(u) ∥πu(u)). Since the latter is the loss function used in variational inference, and pu(u) can be seen as an IAF with base density πx(x) and transformation f −1, it follows that training MAF as a density estimator of πx(x) is equivalent to performing stochastic variational inference with an implicit IAF, where the posterior is taken to be the base density πu(u) and the transformation f −1 implements the reparameterization trick [12, 25]. This argument is presented in more detail in Section A of the supplementary material. 3.3 Relationship with Real NVP Real NVP [4] (NVP stands for Non Volume Preserving) is a normalizing flow obtained by stacking coupling layers. A coupling layer is an invertible transformation f from random numbers u to data x with a tractable Jacobian, defined by x1:d = u1:d xd+1:D = ud+1:D ⊙exp α + µ where µ = fµ(u1:d) α = fα(u1:d). (10) In the above, ⊙denotes elementwise multiplication, and the exp is applied to each element of α. The transformation copies the first d elements, and scales and shifts the remaining D−d elements, with the amount of scaling and shifting being a function of the first d elements. When stacking coupling layers into a flow, the elements are permuted across layers so that a different set of elements is copied each time. A special case of the coupling layer where α=0 is used by NICE [3]. We can see that the coupling layer is a special case of both the autoregressive transformation used by MAF in Equation (3), and the autoregressive transformation used by IAF in Equation (6). Indeed, we can recover the coupling layer from the autoregressive transformation of MAF by setting µi = αi = 0 for i ≤d and making µi and αi functions of only x1:d for i > d (for IAF we need to make µi and αi functions of u1:d instead for i > d). In other words, both MAF and IAF can be seen as more flexible (but different) generalizations of Real NVP, where each element is individually scaled and shifted as a function of all previous elements. The advantage of Real NVP compared to MAF and IAF is that it can both generate data and estimate densities with one forward pass only, whereas MAF would need D passes to generate data and IAF would need D passes to estimate densities. 3.4 Conditional MAF Given a set of example pairs {(xn, yn)}, conditional density estimation is the task of estimating the conditional density p(x | y). Autoregressive modelling extends naturally to conditional density estimation. Each term in the chain rule of probability can be conditioned on side-information y, decomposing any conditional density as p(x | y) = Q i p(xi | x1:i−1, y). Therefore, we can turn any unconditional autoregressive model into a conditional one by augmenting its set of input variables with y and only modelling the conditionals that correspond to x. Any order of the variables can be chosen, as long as y comes before x. In masked autoregressive models, no connections need to be dropped from the y inputs to the rest of the network. We can implement a conditional version of MAF by stacking MADEs that were made conditional using the above strategy. That is, in a conditional MAF, the vector y becomes an additional input for every layer. As a special case of MAF, Real NVP can be made conditional in the same way. In Section 4, we show that conditional MAF significantly outperforms unconditional MAF when conditional information (such as data labels) is available. In our experiments, MAF was able to benefit from conditioning considerably more than MADE and Real NVP. 5 4 Experiments 4.1 Implementation and setup We systematically evaluate three types of density estimator (MADE, Real NVP and MAF) in terms of density estimation performance on a variety of datasets. Code for reproducing our experiments (which uses Theano [29]) can be found at https://github.com/gpapamak/maf. MADE. We consider two versions: (a) a MADE with Gaussian conditionals, denoted simply by MADE, and (b) a MADE whose conditionals are each parameterized as a mixture of C Gaussians, denoted by MADE MoG. We used C = 10 in all our experiments. MADE can be seen either as a MADE MoG with C =1, or as a MAF with only one autoregressive layer. Adding more Gaussian components per conditional or stacking MADEs to form a MAF are two alternative ways of increasing the flexibility of MADE, which we are interested in comparing. Real NVP. We consider a general-purpose implementation of the coupling layer, which uses two feedforward neural networks, implementing the scaling function fα and the shifting function fµ respectively. Both networks have the same architecture, except that fα has hyperbolic tangent hidden units, whereas fµ has rectified linear hidden units (we found this combination to perform best). Both networks have a linear output. We consider Real NVPs with either 5 or 10 coupling layers, denoted by Real NVP (5) and Real NVP (10) respectively, and in both cases the base density is a standard Gaussian. Successive coupling layers alternate between (a) copying the odd-indexed variables and transforming the even-indexed variables, and (b) copying the even-indexed variables and transforming the odd-indexed variables. It is important to clarify that this is a general-purpose implementation of Real NVP which is different and thus not comparable to its original version [4], which was designed specifically for image data. Here we are interested in comparing coupling layers with autoregressive layers as building blocks of normalizing flows for general-purpose density estimation tasks, and our design of Real NVP is such that a fair comparison between the two can be made. MAF. We consider three versions: (a) a MAF with 5 autoregressive layers and a standard Gaussian as a base density πu(u), denoted by MAF (5), (b) a MAF with 10 autoregressive layers and a standard Gaussian as a base density, denoted by MAF (10), and (c) a MAF with 5 autoregressive layers and a MADE MoG with C =10 Gaussian components as a base density, denoted by MAF MoG (5). MAF MoG (5) can be thought of as a MAF (5) stacked on top of a MADE MoG and trained jointly with it. In all experiments, MADE and MADE MoG order the inputs using the order that comes with the dataset by default; no alternative orders were considered. MAF uses the default order for the first autoregressive layer (i.e. the layer that directly models the data) and reverses the order for each successive layer (the same was done for IAF by Kingma et al. [13]). MADE, MADE MoG and each layer in MAF is a feedforward neural network with masked weight matrices, such that the autoregressive property holds. The procedure for designing the masks (due to Germain et al. [6]) is as follows. Each input or hidden unit is assigned a degree, which is an integer ranging from 1 to D, where D is the data dimensionality. The degree of an input is taken to be its index in the order. The D outputs have degrees that sequentially range from 0 to D−1. A unit is allowed to receive input only from units with lower or equal degree, which enforces the autoregressive property. In order for output i to be connected to all inputs with degree less than i, and thus make sure that no conditional independences are introduced, it is both necessary and sufficient that every hidden layer contains every degree. In all experiments except for CIFAR-10, we sequentially assign degrees within each hidden layer and use enough hidden units to make sure that all degrees appear. Because CIFAR-10 is high-dimensional, we used fewer hidden units than inputs and assigned degrees to hidden units uniformly at random (as was done by Germain et al. [6]). We added batch normalization [10] after each coupling layer in Real NVP and after each autoregressive layer in MAF. Batch normalization is an elementwise scaling and shifting, which is easily invertible and has a tractable Jacobian, and thus it is suitable for use in a normalizing flow. We found that batch normalization in Real NVP and MAF reduces training time, increases stability during training and improves performance (as observed by Dinh et al. [4] for Real NVP). Section B of the supplementary material discusses our implementation of batch normalization and its use in normalizing flows. All models were trained with the Adam optimizer [11], using a minibatch size of 100, and a step size of 10−3 for MADE and MADE MoG, and of 10−4 for Real NVP and MAF. A small amount of ℓ2 6 Table 1: Average test log likelihood (in nats) for unconditional density estimation. The best performing model for each dataset is shown in bold (multiple models are highlighted if the difference is not statistically significant according to a paired t-test). Error bars correspond to 2 standard deviations. POWER GAS HEPMASS MINIBOONE BSDS300 Gaussian −7.74 ± 0.02 −3.58 ± 0.75 −27.93 ± 0.02 −37.24 ± 1.07 96.67 ± 0.25 MADE −3.08 ± 0.03 3.56 ± 0.04 −20.98 ± 0.02 −15.59 ± 0.50 148.85 ± 0.28 MADE MoG 0.40 ± 0.01 8.47 ± 0.02 −15.15 ± 0.02 −12.27 ± 0.47 153.71 ± 0.28 Real NVP (5) −0.02 ± 0.01 4.78 ± 1.80 −19.62 ± 0.02 −13.55 ± 0.49 152.97 ± 0.28 Real NVP (10) 0.17 ± 0.01 8.33 ± 0.14 −18.71 ± 0.02 −13.84 ± 0.52 153.28 ± 1.78 MAF (5) 0.14 ± 0.01 9.07 ± 0.02 −17.70 ± 0.02 −11.75 ± 0.44 155.69 ± 0.28 MAF (10) 0.24 ± 0.01 10.08 ± 0.02 −17.73 ± 0.02 −12.24 ± 0.45 154.93 ± 0.28 MAF MoG (5) 0.30 ± 0.01 9.59 ± 0.02 −17.39 ± 0.02 −11.68 ± 0.44 156.36 ± 0.28 regularization was added, with coefficient 10−6. Each model was trained with early stopping until no improvement occurred for 30 consecutive epochs on the validation set. For each model, we selected the number of hidden layers and number of hidden units based on validation performance (we gave the same options to all models), as described in Section D of the supplementary material. 4.2 Unconditional density estimation Following Uria et al. [32], we perform unconditional density estimation on four UCI datasets (POWER, GAS, HEPMASS, MINIBOONE) and on a dataset of natural image patches (BSDS300). UCI datasets. These datasets were taken from the UCI machine learning repository [18]. We selected different datasets than Uria et al. [32], because the ones they used were much smaller, resulting in an expensive cross-validation procedure involving a separate hyperparameter search for each fold. However, our data preprocessing follows Uria et al. [32]. The sample mean was subtracted from the data and each feature was divided by its sample standard deviation. Discrete-valued attributes were eliminated, as well as every attribute with a Pearson correlation coefficient greater than 0.98. These procedures are meant to avoid trivial high densities, which would make the comparison between approaches hard to interpret. Section D of the supplementary material gives more details about the UCI datasets and the individual preprocessing done on each of them. Image patches. This dataset was obtained by extracting random 8×8 monochrome patches from the BSDS300 dataset of natural images [20]. We used the same preprocessing as by Uria et al. [32]. Uniform noise was added to dequantize pixel values, which was then rescaled to be in the range [0, 1]. The mean pixel value was subtracted from each patch, and the bottom-right pixel was discarded. Table 1 shows the performance of each model on each dataset. A Gaussian fitted to the train data is reported as a baseline. We can see that on 3 out of 5 datasets MAF is the best performing model, with MADE MoG being the best performing model on the other 2. On all datasets, MAF outperforms Real NVP. For the MINIBOONE dataset, due to overlapping error bars, a pairwise comparison was done to determine which model performs the best, the results of which are reported in Section E of the supplementary material. MAF MoG (5) achieves the best reported result on BSDS300 for a single model with 156.36 nats, followed by Deep RNADE [33] with 155.2. An ensemble of 32 Deep RNADEs was reported to achieve 157.0 nats [33]. The UCI datasets were used for the first time in the literature for density estimation, so no comparison with existing work can be made yet. 4.3 Conditional density estimation For conditional density estimation, we used the MNIST dataset of handwritten digits [17] and the CIFAR-10 dataset of natural images [14]. In both datasets, each datapoint comes from one of 10 distinct classes. We represent the class label as a 10-dimensional, one-hot encoded vector y, and we model the density p(x | y), where x represents an image. At test time, we evaluate the probability of a test image x by p(x)=P y p(x | y)p(y), where p(y)= 1 10 is a uniform prior over the labels. For comparison, we also train every model as an unconditional density estimator and report both results. 7 Table 2: Average test log likelihood (in nats) for conditional density estimation. The best performing model for each dataset is shown in bold. Error bars correspond to 2 standard deviations. MNIST CIFAR-10 unconditional conditional unconditional conditional Gaussian −1366.9 ± 1.4 −1344.7 ± 1.8 2367 ± 29 2030 ± 41 MADE −1380.8 ± 4.8 −1361.9 ± 1.9 147 ± 20 187 ± 20 MADE MoG −1038.5 ± 1.8 −1030.3 ± 1.7 −397 ± 21 −119 ± 20 Real NVP (5) −1323.2 ± 6.6 −1326.3 ± 5.8 2576 ± 27 2642 ± 26 Real NVP (10) −1370.7 ± 10.1 −1371.3 ± 43.9 2568 ± 26 2475 ± 25 MAF (5) −1300.5 ± 1.7 −591.7 ± 1.7 2936 ± 27 5797 ± 26 MAF (10) −1313.1 ± 2.0 −605.6 ± 1.8 3049 ± 26 5872 ± 26 MAF MoG (5) −1100.3 ± 1.6 −1092.3 ± 1.7 2911 ± 26 2936 ± 26 For both MNIST and CIFAR-10, we use the same preprocessing as by Dinh et al. [4]. We dequantize pixel values by adding uniform noise, and then rescale them to [0, 1]. We transform the rescaled pixel values into logit space by x 7→logit(λ + (1 −2λ)x), where λ=10−6 for MNIST and λ=0.05 for CIFAR-10, and perform density estimation in that space. In the case of CIFAR-10, we also augment the train set with horizontal flips of all train examples (as also done by Dinh et al. [4]). Table 2 shows the results on MNIST and CIFAR-10. The performance of a class-conditional Gaussian is reported as a baseline for the conditional case. Log likelihoods are calculated in logit space. For unconditional density estimation, MADE MoG is the best performing model on MNIST, whereas MAF is the best performing model on CIFAR-10. For conditional density estimation, MAF is by far the best performing model on both datasets. On CIFAR-10, both MADE and MADE MoG performed significantly worse than the Gaussian baseline. MAF outperforms Real NVP in all cases. The conditional performance of MAF is particularly impressive. MAF performs almost twice as well compared to its unconditional version and to every other model’s conditional version. To facilitate comparison with the literature, Section E of the supplementary material reports results in bits/pixel. MAF (5) and MAF (10), the two best performing conditional models, achieve 3.02 and 2.98 bits/pixel respectively on CIFAR-10. This result is very close to the state-of-the-art 2.94 bits/pixel achieved by a conditional PixelCNN++ [27], even though, unlike PixelCNN++, our version of MAF does not incorporate prior image knowledge, and it pays a price for doing density estimation in a transformed real-valued space (PixelCNN++ directly models discrete pixel values). 5 Discussion We showed that we can improve MADE by modelling the density of its internal random numbers. Alternatively, MADE can be improved by increasing the flexibility of its conditionals. The comparison between MAF and MADE MoG showed that the best approach is dataset specific; in our experiments MAF outperformed MADE MoG in 6 out of 9 cases, which is strong evidence of its competitiveness. MADE MoG is a universal density approximator; with sufficiently many hidden units and Gaussian components, it can approximate any continuous density arbitrarily well. It is an open question whether MAF with a Gaussian base density has a similar property (MAF MoG clearly does). We also showed that the coupling layer used in Real NVP is a special case of the autoregressive layer used in MAF. In fact, MAF outperformed Real NVP in all our experiments. Real NVP has achieved impressive performance in image modelling by incorporating knowledge about image structure. Our results suggest that replacing coupling layers with autoregressive layers in the original version of Real NVP is a promising direction for further improving its performance. Real NVP maintains however the advantage over MAF (and autoregressive models in general) that samples from the model can be generated efficiently in parallel. MAF achieved impressive results in conditional density estimation. Whereas almost all models we considered benefited from the additional information supplied by the labels, MAF nearly doubled its performance, coming close to state-of-the-art models for image modelling without incorporating 8 any prior image knowledge. The ability of MAF to benefit significantly from conditional knowledge suggests that automatic discovery of conditional structure (e.g. finding labels by clustering) could be a promising direction for improving unconditional density estimation in general. Density estimation is one of several types of generative modelling, with the focus on obtaining accurate densities. However, we know that accurate densities do not necessarily imply good performance in other tasks, such as in data generation [31]. Alternative approaches to generative modelling include variational autoencoders [12, 25], which are capable of efficient inference of their (potentially interpretable) latent space, and generative adversarial networks [7], which are capable of high quality data generation. Choice of method should be informed by whether the application at hand calls for accurate densities, latent space inference or high quality samples. Masked Autoregressive Flow is a contribution towards the first of these goals. Acknowledgments We thank Maria Gorinova for useful comments. George Papamakarios and Theo Pavlakou were supported by the Centre for Doctoral Training in Data Science, funded by EPSRC (grant EP/L016427/1) and the University of Edinburgh. George Papamakarios was also supported by Microsoft Research through its PhD Scholarship Programme. References [1] J. Ballé, V. Laparra, and E. P. Simoncelli. Density modeling of images using a generalized normalization transformation. Proceedings of the 4nd International Conference on Learning Representations, 2016. [2] S. S. Chen and R. A. Gopinath. Gaussianization. Advances in Neural Information Processing Systems 13, pages 423–429, 2001. [3] L. Dinh, D. Krueger, and Y. Bengio. NICE: Non-linear Independent Components Estimation. arXiv:1410.8516, 2014. [4] L. Dinh, J. Sohl-Dickstein, and S. Bengio. Density estimation using Real NVP. Proceedings of the 5th International Conference on Learning Representations, 2017. [5] Y. Fan, D. J. Nott, and S. A. Sisson. Approximate Bayesian computation via regression density estimation. Stat, 2(1):34–48, 2013. [6] M. Germain, K. Gregor, I. Murray, and H. Larochelle. MADE: Masked Autoencoder for Distribution Estimation. Proceedings of the 32nd International Conference on Machine Learning, pages 881–889, 2015. [7] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. Advances in Neural Information Processing Systems 27, pages 2672–2680, 2014. [8] S. Gu, Z. Ghahramani, and R. E. Turner. Neural adaptive sequential Monte Carlo. Advances in Neural Information Processing Systems 28, pages 2629–2637, 2015. [9] G. Hinton, S. Osindero, and Y.-W. Teh. A fast learning algorithm for deep belief nets. Neural Computation, 18(7):1527–1554, 2006. [10] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. Proceedings of the 32nd International Conference on Machine Learning, pages 448–456, 2015. [11] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. Proceedings of the 3rd International Conference on Learning Representations, 2015. [12] D. P. Kingma and M. Welling. Auto-encoding variational Bayes. Proceedings of the 2nd International Conference on Learning Representations, 2014. [13] D. P. Kingma, T. Salimans, R. Jozefowicz, X. Chen, I. Sutskever, and M. Welling. Improved variational inference with Inverse Autoregressive Flow. Advances in Neural Information Processing Systems 29, pages 4743–4751, 2016. [14] A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009. [15] T. D. Kulkarni, P. Kohli, J. B. Tenenbaum, and V. Mansinghka. Picture: A probabilistic programming language for scene perception. IEEE Conference on Computer Vision and Pattern Recognition, pages 4390–4399, 2015. 9 [16] T. A. Le, A. G. Baydin, and F. Wood. Inference compilation and universal probabilistic programming. Proceedings of the 20th International Conference on Artificial Intelligence and Statistics, 2017. [17] Y. LeCun, C. Cortes, and C. J. C. Burges. The MNIST database of handwritten digits. URL http: //yann.lecun.com/exdb/mnist/. [18] M. Lichman. UCI machine learning repository, 2013. URL http://archive.ics.uci.edu/ml. [19] G. Loaiza-Ganem, Y. Gao, and J. P. Cunningham. Maximum entropy flow networks. Proceedings of the 5th International Conference on Learning Representations, 2017. [20] D. Martin, C. Fowlkes, D. Tal, and J. Malik. A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. pages 416–423, 2001. [21] B. Paige and F. Wood. Inference networks for sequential Monte Carlo in graphical models. Proceedings of the 33rd International Conference on Machine Learning, 2016. [22] G. Papamakarios and I. Murray. Distilling intractable generative models, 2015. Probabilistic Integration Workshop at Neural Information Processing Systems 28. [23] G. Papamakarios and I. Murray. Fast ϵ-free inference of simulation models with Bayesian conditional density estimation. Advances in Neural Information Processing Systems 29, 2016. [24] D. J. Rezende and S. Mohamed. Variational inference with normalizing flows. Proceedings of the 32nd International Conference on Machine Learning, pages 1530–1538, 2015. [25] D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. Proceedings of the 31st International Conference on Machine Learning, pages 1278–1286, 2014. [26] O. Rippel and R. P. Adams. High-dimensional probability estimation with deep density models. arXiv:1302.5125, 2013. [27] T. Salimans, A. Karpathy, X. Chen, and D. P. Kingma. PixelCNN++: Improving the PixelCNN with discretized logistic mixture likelihood and other modifications. arXiv:1701.05517, 2017. [28] Y. Tang, R. Salakhutdinov, and G. Hinton. Deep mixtures of factor analysers. Proceedings of the 29th International Conference on Machine Learning, pages 505–512, 2012. [29] Theano Development Team. Theano: A Python framework for fast computation of mathematical expressions. arXiv:1605.02688, 2016. [30] L. Theis and M. Bethge. Generative image modeling using spatial LSTMs. Advances in Neural Information Processing Systems 28, pages 1927–1935, 2015. [31] L. Theis, A. van den Oord, and M. Bethge. A note on the evaluation of generative models. Proceedings of the 4nd International Conference on Learning Representations, 2016. [32] B. Uria, I. Murray, and H. Larochelle. RNADE: The real-valued neural autoregressive density-estimator. Advances in Neural Information Processing Systems 26, pages 2175–2183, 2013. [33] B. Uria, I. Murray, and H. Larochelle. A deep and tractable density estimator. Proceedings of the 31st International Conference on Machine Learning, pages 467–475, 2014. [34] B. Uria, I. Murray, S. Renals, C. Valentini-Botinhao, and J. Bridle. Modelling acoustic feature dependencies with artificial neural networks: Trajectory-RNADE. IEEE International Conference on Acoustics, Speech and Signal Processing, pages 4465–4469, 2015. [35] B. Uria, M.-A. Côté, K. Gregor, I. Murray, and H. Larochelle. Neural autoregressive distribution estimation. Journal of Machine Learning Research, 17(205):1–37, 2016. [36] A. van den Oord, S. Dieleman, H. Zen, K. Simonyan, O. Vinyals, A. Graves, N. Kalchbrenner, A. W. Senior, and K. Kavukcuoglu. WaveNet: A generative model for raw audio. arXiv:1609.03499, 2016. [37] A. van den Oord, N. Kalchbrenner, L. Espeholt, K. Kavukcuoglu, O. Vinyals, and A. Graves. Conditional image generation with PixelCNN decoders. Advances in Neural Information Processing Systems 29, pages 4790–4798, 2016. [38] A. van den Oord, N. Kalchbrenner, and K. Kavukcuoglu. Pixel recurrent neural networks. Proceedings of the 33rd International Conference on Machine Learning, pages 1747–1756, 2016. [39] D. Zoran and Y. Weiss. From learning models of natural image patches to whole image restoration. Proceedings of the 13rd International Conference on Computer Vision, pages 479–486, 2011. 10 | 2017 | 278 |
6,761 | QSGD: Communication-Efficient SGD via Gradient Quantization and Encoding Dan Alistarh IST Austria & ETH Zurich dan.alistarh@ist.ac.at Demjan Grubic ETH Zurich & Google demjangrubic@gmail.com Jerry Z. Li MIT jerryzli@mit.edu Ryota Tomioka Microsoft Research ryoto@microsoft.com Milan Vojnovic London School of Economics M.Vojnovic@lse.ac.uk Abstract Parallel implementations of stochastic gradient descent (SGD) have received significant research attention, thanks to its excellent scalability properties. A fundamental barrier when parallelizing SGD is the high bandwidth cost of communicating gradient updates between nodes; consequently, several lossy compresion heuristics have been proposed, by which nodes only communicate quantized gradients. Although effective in practice, these heuristics do not always converge. In this paper, we propose Quantized SGD (QSGD), a family of compression schemes with convergence guarantees and good practical performance. QSGD allows the user to smoothly trade off communication bandwidth and convergence time: nodes can adjust the number of bits sent per iteration, at the cost of possibly higher variance. We show that this trade-off is inherent, in the sense that improving it past some threshold would violate information-theoretic lower bounds. QSGD guarantees convergence for convex and non-convex objectives, under asynchrony, and can be extended to stochastic variance-reduced techniques. When applied to training deep neural networks for image classification and automated speech recognition, QSGD leads to significant reductions in end-to-end training time. For instance, on 16GPUs, we can train the ResNet-152 network to full accuracy on ImageNet 1.8× faster than the full-precision variant. 1 Introduction The surge of massive data has led to significant interest in distributed algorithms for scaling computations in the context of machine learning and optimization. In this context, much attention has been devoted to scaling large-scale stochastic gradient descent (SGD) algorithms [33], which can be briefly defined as follows. Let f : Rn →R be a function which we want to minimize. We have access to stochastic gradients eg such that E[eg(x)] = ∇f(x). A standard instance of SGD will converge towards the minimum by iterating the procedure xt+1 = xt −ηteg(xt), (1) where xt is the current candidate, and ηt is a variable step-size parameter. Notably, this arises if we are given i.i.d. data points X1, . . . , Xm generated from an unknown distribution D, and a loss function ℓ(X, θ), which measures the loss of the model θ at data point X. We wish to find a model θ∗which minimizes f(θ) = EX∼D[ℓ(X, θ)], the expected loss to the data. This framework captures many fundamental tasks, such as neural network training. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. In this paper, we focus on parallel SGD methods, which have received considerable attention recently due to their high scalability [6, 8, 32, 13]. Specifically, we consider a setting where a large dataset is partitioned among K processors, which collectively minimize a function f. Each processor maintains a local copy of the parameter vector xt; in each iteration, it obtains a new stochastic gradient update (corresponding to its local data). Processors then broadcast their gradient updates to their peers, and aggregate the gradients to compute the new iterate xt+1. In most current implementations of parallel SGD, in each iteration, each processor must communicate its entire gradient update to all other processors. If the gradient vector is dense, each processor will need to send and receive n floating-point numbers per iteration to/from each peer to communicate the gradients and maintain the parameter vector x. In practical applications, communicating the gradients in each iteration has been observed to be a significant performance bottleneck [35, 37, 8]. One popular way to reduce this cost has been to perform lossy compression of the gradients [11, 1, 3, 10, 41]. A simple implementation is to simply reduce precision of the representation, which has been shown to converge under convexity and sparsity assumptions [10]. A more drastic quantization technique is 1BitSGD [35, 37], which reduces each component of the gradient to just its sign (one bit), scaled by the average over the coordinates of eg, accumulating errors locally. 1BitSGD was experimentally observed to preserve convergence [35], under certain conditions; thanks to the reduction in communication, it enabled state-of-the-art scaling of deep neural networks (DNNs) for acoustic modelling [37]. However, it is currently not known if 1BitSGD provides any guarantees, even under strong assumptions, and it is not clear if higher compression is achievable. Contributions. Our focus is understanding the trade-offs between the communication cost of dataparallel SGD, and its convergence guarantees. We propose a family of algorithms allowing for lossy compression of gradients called Quantized SGD (QSGD), by which processors can trade-off the number of bits communicated per iteration with the variance added to the process. QSGD is built on two algorithmic ideas. The first is an intuitive stochastic quantization scheme: given the gradient vector at a processor, we quantize each component by randomized rounding to a discrete set of values, in a principled way which preserves the statistical properties of the original. The second step is an efficient lossless code for quantized gradients, which exploits their statistical properties to generate efficient encodings. Our analysis gives tight bounds on the precision-variance trade-off induced by QSGD. At one extreme of this trade-off, we can guarantee that each processor transmits at most √n(log n + O(1)) expected bits per iteration, while increasing variance by at most a √n multiplicative factor. At the other extreme, we show that each processor can transmit ≤2.8n + 32 bits per iteration in expectation, while increasing variance by a only a factor of 2. In particular, in the latter regime, compared to full precision SGD, we use ≈2.8n bits of communication per iteration as opposed to 32n bits, and guarantee at most 2× more iterations, leading to bandwidth savings of ≈5.7×. QSGD is fairly general: it can also be shown to converge, under assumptions, to local minima for nonconvex objectives, as well as under asynchronous iterations. One non-trivial extension we develop is a stochastic variance-reduced [23] variant of QSGD, called QSVRG, which has exponential convergence rate. One key question is whether QSGD’s compression-variance trade-off is inherent: for instance, does any algorithm guaranteeing at most constant variance blowup need to transmit Ω(n) bits per iteration? The answer is positive: improving asymptotically upon this trade-off would break the communication complexity lower bound of distributed mean estimation (see [44, Proposition 2] and [38]). Experiments. The crucial question is whether, in practice, QSGD can reduce communication cost by enough to offset the overhead of any additional iterations to convergence. The answer is yes. We explore the practicality of QSGD on a variety of state-of-the-art datasets and machine learning models: we examine its performance in training networks for image classification tasks (AlexNet, Inception, ResNet, and VGG) on the ImageNet [12] and CIFAR-10 [25] datasets, as well as on LSTMs [19] for speech recognition. We implement QSGD in Microsoft CNTK [3]. Experiments show that all these models can significantly benefit from reduced communication when doing multi-GPU training, with virtually no accuracy loss, and under standard parameters. For example, when training AlexNet on 16 GPUs with standard parameters, the reduction in communication time is 4×, and the reduction in training to the network’s top accuracy is 2.5×. When training an LSTM on two GPUs, the reduction in communication time is 6.8×, while the reduction in training 2 time to the same target accuracy is 2.7×. Further, even computationally-heavy architectures such as Inception and ResNet can benefit from the reduction in communication: on 16GPUs, QSGD reduces the end-to-end convergence time of ResNet152 by approximately 2×. Networks trained with QSGD can converge to virtually the same accuracy as full-precision variants, and that gradient quantization may even slightly improve accuracy in some settings. Related Work. One line of related research studies the communication complexity of convex optimization. In particular, [40] studied two-processor convex minimization in the same model, provided a lower bound of Ω(n(log n + log(1/ϵ))) bits on the communication cost of n-dimensional convex problems, and proposed a non-stochastic algorithm for strongly convex problems, whose communication cost is within a log factor of the lower bound. By contrast, our focus is on stochastic gradient methods. Recent work [5] focused on round complexity lower bounds on the number of communication rounds necessary for convex learning. Buckwild! [10] was the first to consider the convergence guarantees of low-precision SGD. It gave upper bounds on the error probability of SGD, assuming unbiased stochastic quantization, convexity, and gradient sparsity, and showed significant speedup when solving convex problems on CPUs. QSGD refines these results by focusing on the trade-off between communication and convergence. We view quantization as an independent source of variance for SGD, which allows us to employ standard convergence results [7]. The main differences from Buckwild! are that 1) we focus on the variance-precision trade-off; 2) our results apply to the quantized non-convex case; 3) we validate the practicality of our scheme on neural network training on GPUs. Concurrent work proposes TernGrad [41], which starts from a similar stochastic quantization, but focuses on the case where individual gradient components can have only three possible values. They show that significant speedups can be achieved on TensorFlow [1], while maintaining accuracy within a few percentage points relative to full precision. The main differences to our work are: 1) our implementation guarantees convergence under standard assumptions; 2) we strive to provide a black-box compression technique, with no additional hyperparameters to tune; 3) experimentally, QSGD maintains the same accuracy within the same target number of epochs; for this, we allow gradients to have larger bit width; 4) our experiments focus on the single-machine multi-GPU case. We note that QSGD can be applied to solve the distributed mean estimation problem [38, 24] with an optimal error-communication trade-off in some regimes. In contrast to the elegant random rotation solution presented in [38], QSGD employs quantization and Elias coding. Our use case is different from the federated learning application of [38, 24], and has the advantage of being more efficient to compute on a GPU. There is an extremely rich area studying algorithms and systems for efficient distributed large-scale learning, e.g. [6, 11, 1, 3, 39, 32, 10, 21, 43]. Significant interest has recently been dedicated to quantized frameworks, both for inference, e.g., [1, 17] and training [45, 35, 20, 37, 16, 10, 42]. In this context, [35] proposed 1BitSGD, a heuristic for compressing gradients in SGD, inspired by delta-sigma modulation [34]. It is implemented in Microsoft CNTK, and has a cost of n bits and two floats per iteration. Variants of it were shown to perform well on large-scale Amazon datasets by [37]. Compared to 1BitSGD, QSGD can achieve asymptotically higher compression, provably converges under standard assumptions, and shows superior practical performance in some cases. 2 Preliminaries SGD has many variants, with different preconditions and guarantees. Our techniques are rather portable, and can usually be applied in a black-box fashion on top of SGD. For conciseness, we will focus on a basic SGD setup. The following assumptions are standard; see e.g. [7]. Let X ⊆Rn be a known convex set, and let f : X →R be differentiable, convex, smooth, and unknown. We assume repeated access to stochastic gradients of f, which on (possibly random) input x, outputs a direction which is in expectation the correct direction to move in. Formally: Definition 2.1. Fix f : X →R. A stochastic gradient for f is a random function eg(x) so that E[eg(x)] = ∇f(x). We say the stochastic gradient has second moment at most B if E[∥eg∥2 2] ≤B for all x ∈X. We say it has variance at most σ2 if E[∥eg(x) −∇f(x)∥2 2] ≤σ2 for all x ∈X. Observe that any stochastic gradient with second moment bound B is automatically also a stochastic gradient with variance bound σ2 = B, since E[∥eg(x) −∇f(x)∥2] ≤E[∥eg(x)∥2] as long as E[eg(x)] = ∇f(x). Second, in convex optimization, one often assumes a second moment bound 3 Data: Local copy of the parameter vector x 1 for each iteration t do 2 Let egi t be an independent stochastic gradient ; 3 M i ←Encode(egi(x)) //encode gradients ; 4 broadcast M i to all peers; 5 for each peer ℓdo 6 receive M ℓfrom peer ℓ; 7 bgℓ←Decode(M ℓ) //decode gradients ; 8 end 9 xt+1 ←xt −(ηt/K) PK ℓ=1 bgℓ; 10 end Algorithm 1: Parallel SGD Algorithm. Figure 1: An illustration of generalized stochastic quantization with 5 levels. when dealing with non-smooth convex optimization, and a variance bound when dealing with smooth convex optimization. However, for us it will be convenient to consistently assume a second moment bound. This does not seem to be a major distinction in theory or in practice [7]. Given access to stochastic gradients, and a starting point x0, SGD builds iterates xt given by Equation (1), projected onto X, where (ηt)t≥0 is a sequence of step sizes. In this setting, one can show: Theorem 2.1 ([7], Theorem 6.3). Let X ⊆Rn be convex, and let f : X →R be unknown, convex, and L-smooth. Let x0 ∈X be given, and let R2 = supx∈X ∥x −x0∥2. Let T > 0 be fixed. Given repeated, independent access to stochastic gradients with variance bound σ2 for f, SGD with initial point x0 and constant step sizes ηt = 1 L+1/γ , where γ = R σ q 2 T , achieves E " f 1 T T X t=0 xt !# −min x∈X f(x) ≤R r 2σ2 T + LR2 T . (2) Minibatched SGD. A modification to the SGD scheme presented above often observed in practice is a technique known as minibatching. In minibatched SGD, updates are of the form xt+1 = ΠX (xt −ηt eGt(xt)), where eGt(xt) = 1 m Pm i=1 egt,i, and where each egt,i is an independent stochastic gradient for f at xt. It is not hard to see that if egt,i are stochastic gradients with variance bound σ2, then the eGt is a stochastic gradient with variance bound σ2/m. By inspection of Theorem 2.1, as long as the first term in (2) dominates, minibatched SGD requires 1/m fewer iterations to converge. Data-Parallel SGD. We consider synchronous data-parallel SGD, modelling real-world multi-GPU systems, and focus on the communication cost of SGD in this setting. We have a set of K processors p1, p2, . . . , pK who proceed in synchronous steps, and communicate using point-to-point messages. Each processor maintains a local copy of a vector x of dimension n, representing the current estimate of the minimizer, and has access to private, independent stochastic gradients for f. In each synchronous iteration, described in Algorithm 1, each processor aggregates the value of x, then obtains random gradient updates for each component of x, then communicates these updates to all peers, and finally aggregates the received updates and applies them locally. Importantly, we add encoding and decoding steps for the gradients before and after send/receive in lines 3 and 7, respectively. In the following, whenever describing a variant of SGD, we assume the above general pattern, and only specify the encode/decode functions. Notice that the decoding step does not necessarily recover the original gradient egℓ; instead, we usually apply an approximate version. When the encoding and decoding steps are the identity (i.e., no encoding / decoding), we shall refer to this algorithm as parallel SGD. In this case, it is a simple calculation to see that at each processor, if xt was the value of x that the processors held before iteration t, then the updated value of x by the end of this iteration is xt+1 = xt −(ηt/K) PK ℓ=1 egℓ(xt), where each egℓis a stochatic gradient. In particular, this update is merely a minibatched update of size K. Thus, by the discussion above, and by rephrasing Theorem 2.1, we have the following corollary: Corollary 2.2. Let X, f, L, x0, and R be as in Theorem 2.1. Fix ϵ > 0. Suppose we run parallel SGD on K processors, each with access to independent stochastic gradients with second moment 4 bound B, with step size ηt = 1/(L + √ K/γ), where γ is as in Theorem 2.1. Then if T = O R2 · max 2B Kϵ2 , L ϵ , then E " f 1 T T X t=0 xt !# −min x∈X f(x) ≤ϵ. (3) In most reasonable regimes, the first term of the max in (3) will dominate the number of iterations necessary. Specifically, the number of iterations will depend linearly on the second moment bound B. 3 Quantized Stochastic Gradient Descent (QSGD) In this section, we present our main results on stochastically quantized SGD. Throughout, log denotes the base-2 logarithm, and the number of bits to represent a float is 32. For any vector v ∈Rn, we let ∥v∥0 denote the number of nonzeros of v. For any string ω ∈{0, 1}∗, we will let |ω| denote its length. For any scalar x ∈R, we let sgn (x) ∈{−1, +1} denote its sign, with sgn (0) = 1. 3.1 Generalized Stochastic Quantization and Coding Stochastic Quantization. We now consider a general, parametrizable lossy-compression scheme for stochastic gradient vectors. The quantization function is denoted with Qs(v), where s ≥1 is a tuning parameter, corresponding to the number of quantization levels we implement. Intuitively, we define s uniformly distributed levels between 0 and 1, to which each value is quantized in a way which preserves the value in expectation, and introduces minimal variance. Please see Figure 1. For any v ∈Rn with v ̸= 0, Qs(v) is defined as Qs(vi) = ∥v∥2 · sgn (vi) · ξi(v, s) , (4) where ξi(v, s)’s are independent random variables defined as follows. Let 0 ≤ℓ< s be an integer such that |vi|/∥v∥2 ∈[ℓ/s, (ℓ+ 1)/s]. That is, [ℓ/s, (ℓ+ 1)/s] is the quantization interval corresponding to |vi|/∥v∥2. Then ξi(v, s) = ( ℓ/s with probability 1 −p |vi| ∥v∥2 , s ; (ℓ+ 1)/s otherwise. Here, p(a, s) = as −ℓfor any a ∈[0, 1]. If v = 0, then we define Q(v, s) = 0. The distribution of ξi(v, s) has minimal variance over distributions with support {0, 1/s, . . . , 1}, and its expectation satisfies E[ξi(v, s)] = |vi|/∥v∥2. Formally, we can show: Lemma 3.1. For any vector v ∈Rn, we have that (i) E[Qs(v)] = v (unbiasedness), (ii) E[∥Qs(v)− v∥2 2] ≤min(n/s2, √n/s)∥v∥2 2 (variance bound), and (iii) E[∥Qs(v)∥0] ≤s(s + √n) (sparsity). Efficient Coding of Gradients. Observe that for any vector v, the output of Qs(v) is naturally expressible by a tuple (∥v∥2, σ, ζ), where σ is the vector of signs of the vi’s and ζ is the vector of integer values s · ξi(v, s). The key idea behind the coding scheme is that not all integer values s · ξi(v, s) can be equally likely: in particular, larger integers are less frequent. We will exploit this via a specialized Elias integer encoding [14], presented in full in the full version of our paper [4]. Intuitively, for any positive integer k, its code, denoted Elias(k), starts from the binary representation of k, to which it prepends the length of this representation. It then recursively encodes this prefix. We show that for any positive integer k, the length of the resulting code has |Elias(k)| = log k + log log k + . . . + 1 ≤(1 + o(1)) log k + 1, and that encoding and decoding can be done efficiently. Given a gradient vector represented as the triple (∥v∥2, σ, ζ), with s quantization levels, our coding outputs a string S defined as follows. First, it uses 32 bits to encode ∥v∥2. It proceeds to encode using Elias recursive coding the position of the first nonzero entry of ζ. It then appends a bit denoting σi and follows that with Elias(s · ξi(v, s)). Iteratively, it proceeds to encode the distance from the current coordinate of ζ to the next nonzero, and encodes the σi and ζi for that coordinate in the same way. The decoding scheme is straightforward: we first read off 32 bits to construct ∥v∥2, then iteratively use the decoding scheme for Elias recursive coding to read off the positions and values of the nonzeros of ζ and σ. The properties of the quantization and of the encoding imply the following. Theorem 3.2. Let f : Rn →R be fixed, and let x ∈Rn be arbitrary. Fix s ≥2 quantization levels. If eg(x) is a stochastic gradient for f at x with second moment bound B, then Qs(eg(x)) is a 5 stochastic gradient for f at x with variance bound min n s2 , √n s B. Moreover, there is an encoding scheme so that in expectation, the number of bits to communicate Qs(eg(x)) is upper bounded by 3 + 3 2 + o(1) log 2(s2 + n) s(s + √n) s(s + √n) + 32. Sparse Regime. For the case s = 1, i.e., quantization levels 0, 1, and −1, the gradient density is O(√n), while the second-moment blowup is ≤√n. Intuitively, this means that we will employ O(√n log n) bits per iteration, while the convergence time is increased by O(√n). Dense Regime. The variance blowup is minimized to at most 2 for s = √n quantization levels; in this case, we devise a more efficient encoding which yields an order of magnitude shorter codes compared to the full-precision variant. The proof of this statement is not entirely obvious, as it exploits both the statistical properties of the quantization and the guarantees of the Elias coding. Corollary 3.3. Let f, x, and eg(x) be as in Theorem 3.2. There is an encoding scheme for Q√n(eg(x)) which in expectation has length at most 2.8n + 32. 3.2 QSGD Guarantees Putting the bounds on the communication and variance given above with the guarantees for SGD algorithms on smooth, convex functions yield the following results: Theorem 3.4 (Smooth Convex QSGD). Let X, f, L, x0, and R be as in Theorem 2.1. Fix ϵ > 0. Suppose we run parallel QSGD with s quantization levels on K processors accessing independent stochastic gradients with second moment bound B, with step size ηt = 1/(L + √ K/γ), where γ is as in Theorem 2.1 with σ = B′, where B′ = min n s2 , √n s B. Then if T = O R2 · max 2B′ Kϵ2 , L ϵ , then E h f 1 T PT t=0 xt i −minx∈X f(x) ≤ϵ. Moreover, QSGD requires 3 + 3 2 + o(1) log 2(s2+n) s2+√n (s2 + √n) + 32 bits of communication per round. In the special case when s = √n, this can be reduced to 2.8n + 32. QSGD is quite portable, and can be applied to almost any stochastic gradient method. For illustration, we can use quantization along with [15] to get communication-efficient non-convex SGD. Theorem 3.5 (QSGD for smooth non-convex optimization). Let f : Rn →R be a L-smooth (possibly nonconvex) function, and let x1 be an arbitrary initial point. Let T > 0 be fixed, and s > 0. Then there is a random stopping time R supported on {1, . . . , N} so that QSGD with quantization level s, constant stepsizes η = O(1/L) and access to stochastic gradients of f with second moment bound B satisfies 1 L E ∥∇f(x)∥2 2 ≤O √ L(f(x1)−f ∗) N + min(n/s2,√n/s)B L . Moreover, the communication cost is the same as in Theorem 3.4. 3.3 Quantized Variance-Reduced SGD Assume we are given K processors, and a parameter m > 0, where each processor i has access to functions {fim/K, . . . , f(i+1)m/K−1}. The goal is to approximately minimize f = 1 m Pm i=1 fi. For processor i, let hi = 1 m P(i+1)m/K−1 j=im/K fi be the portion of f that it knows, so that f = PK i=1 hi. A natural question is whether we can apply stochastic quantization to reduce communication for parallel SVRG. Upon inspection, we notice that the resulting update will break standard SVRG. We resolve this technical issue, proving one can quantize SVRG updates using our techniques and still obtain the same convergence bounds. Algorithm Description. Let eQ(v) = Q(v, √n), where Q(v, s) is defined as in Section 3.1. Given arbitrary starting point x0, we let y(1) = x0. At the beginning of epoch p, each processor broadcasts ∇hi(y(p)), that is, the unquantized full gradient, from which the processors each aggregate ∇f(y(p)) = Pm i=1 ∇hi(y(p)). Within each epoch, for each iteration t = 1, . . . , T, and for each processor i = 1, . . . , K, we let j(p) i,t be a uniformly random integer from [m] completely independent from everything else. Then, in iteration t in epoch p, processor i broadcasts the update vector u(p) t,i = eQ ∇fj(p) i,t (x(p) t ) −∇fj(p) i,t (y(p)) + ∇f(y(p)) . 6 Table 1: Description of networks, final top-1 accuracy, as well as end-to-end training speedup on 8GPUs. Network Dataset Params. Init. Rate Top-1 (32bit) Top-1 (QSGD) Speedup (8 GPUs) AlexNet ImageNet 62M 0.07 59.50% 60.05% (4bit) 2.05 × ResNet152 ImageNet 60M 1 77.0% 76.74% (8bit) 1.56 × ResNet50 ImageNet 25M 1 74.68% 74.76% (4bit) 1.26 × ResNet110 CIFAR-10 1M 0.1 93.86% 94.19% (4bit) 1.10 × BN-Inception ImageNet 11M 3.6 1.16× (projected) VGG19 ImageNet 143M 0.1 2.25× (projected) LSTM AN4 13M 0.5 81.13% 81.15 % (4bit) 2× (2 GPUs) Each processor then computes the total update u(p) t = 1 K PK i=1 ut,i, and sets x(p) t+1 = x(p) t −ηu(p) t . At the end of epoch p, each processor sets y(p+1) = 1 T PT t=1 x(p) t . We can prove the following. Theorem 3.6. Let f(x) = 1 m Pm i=1 fi(x), where f is ℓ-strongly convex, and fi are convex and L-smooth, for all i. Let x∗be the unique minimizer of f over Rn. Then, if η = O(1/L) and T = O(L/ℓ), then QSVRG with initial point y(1) ensures E f(y(p+1)) −f(x∗) ≤ 0.9p f(y(1)) −f(x∗) , for any epoch p ≥1. Moreover, QSVRG with T iterations per epoch requires ≤(F + 2.8n)(T + 1) + Fn bits of communication per epoch. Discussion. In particular, this allows us to largely decouple the dependence between F and the condition number of f in the communication. Let κ = L/ℓdenote the condition number of f. Observe that whenever F ≪κ, the second term is subsumed by the first and the per epoch communication is dominated by (F + 2.8n)(T + 1). Specifically, for any fixed ϵ, to attain accuracy ϵ we must take F = O(log 1/ϵ). As long as log 1/ϵ ≥Ω(κ), which is true for instance in the case when κ ≥poly log(n) and ϵ ≥poly(1/n), then the communication per epoch is O(κ(log 1/ϵ + n)). Gradient Descent. The full version of the paper [4] contains an application of QSGD to gradient descent. Roughly, in this case, QSGD can simply truncate the gradient to its top components, sorted by magnitude. 4 QSGD Variants Our experiments will stretch the theory, as we use deep networks, with non-convex objectives. (We have also tested QSGD for convex objectives. Results closely follow the theory, and are therefore omitted.) Our implementations will depart from the previous algorithm description as follows. First, we notice that the we can control the variance the quantization by quantizing into buckets of a fixed size d. If we view each gradient as a one-dimensional vector v, reshaping tensors if necessary, a bucket will be defined as a set of d consecutive vector values. (E.g. the ith bucket is the sub-vector v[(i −1)d + 1 : i · d].) We will quantize each bucket independently, using QSGD. Setting d = 1 corresponds to no quantization (vanilla SGD), and d = n corresponds to full quantization, as described in the previous section. It is easy to see that, using bucketing, the guarantees from Lemma 3.1 will be expressed in terms of d, as opposed to the full dimension n. This provides a knob by which we can control variance, at the cost of storing an extra scaling factor on every d bucket values. As an example, if we use a bucket size of 512, and 4 bits, the variance increase due to quantization will be upper bounded by only √ 512/24 ≃1.41. This provides a theoretical justification for the similar convergence rates we observe in practice. The second difference from the theory is that we will scale by the maximum value of the vector (as opposed to the 2-norm). Intuitively, normalizing by the max preserves more values, and has slightly higher accuracy for the same number of iterations. Both methods have the same baseline bandwidth reduction because of lower bit width (e.g. 32 bits to 2 bits per dimension), but normalizing by the max no longer provides any sparsity guarantees. We note that this does not affect our bounds in the regime where we use Θ(√n) quantization levels per component, as we employ no sparsity in that case. (However, we note that in practice max normalization also generates non-trivial sparsity.) 5 Experiments Setup. We performed experiments on Amazon EC2 p2.16xlarge instances, with 16 NVIDIA K80 GPUs. Instances have GPUDirect peer-to-peer communication, but do not currently support NVIDIA 7 2.3x 3.5x 1.6x Figure 2: Breakdown of communication versus computation for various neural networks, on 2, 4, 8, 16 GPUs, for full 32-bit precision versus QSGD 4-bit. Each bar represents the total time for an epoch under standard parameters. Epoch time is broken down into communication (bottom, solid) and computation (top, transparent). Although epoch time diminishes as we parallelize, the proportion of communication increases. > 2x faster (a) AlexNet Accuracy versus Time. 0 300 600 900 1200 1500 Time (sec) 0.0 0.5 1.0 1.5 2.0 Training loss 2bit QSGD (d=128) 4bit QSGD (d=8192) 8bit QSGD (d=8192) SGD (b) LSTM error vs Time. 0 20 40 60 80 100 120 Epoch 0 10 20 30 40 50 60 70 80 Test accuracy (%) 1bitSGD* 32bit QSGD 4bit QSGD 8bit (c) ResNet50 Accuracy. Figure 3: Accuracy numbers for different networks. Light blue lines represent 32-bit accuracy. NCCL extensions. We have implemented QSGD on GPUs using the Microsoft Cognitive Toolkit (CNTK) [3]. This package provides efficient (MPI-based) GPU-to-GPU communication, and implements an optimized version of 1bit-SGD [35]. Our code is released as open-source [31]. We execute two types of tasks: image classification on ILSVRC 2015 (ImageNet) [12], CIFAR10 [25], and MNIST [27], and speech recognition on the CMU AN4 dataset [2]. For vision, we experimented with AlexNet [26], VGG [36], ResNet [18], and Inception with Batch Normalization [22] deep networks. For speech, we trained an LSTM network [19]. See Table 1 for details. Protocol. Our methodology emphasizes zero error tolerance, in the sense that we always aim to preserve the accuracy of the networks trained. We used standard sizes for the networks, with hyperparameters optimized for the 32bit precision variant. (Unless otherwise stated, we use the default networks and hyper-parameters optimized for full-precision CNTK 2.0.) We increased batch size when necessary to balance communication and computation for larger GPU counts, but never past the point where we lose accuracy. We employed double buffering [35] to perform communication and quantization concurrently with the computation. Quantization usually benefits from lowering learning rates; yet, we always run the 32bit learning rate, and decrease bucket size to reduce variance. We will not quantize small gradient matrices (< 10K elements), since the computational cost of quantizing them significantly exceeds the reduction in communication. However, in all experiments, more than 99% of all parameters are transmitted in quantized form. We reshape matrices to fit bucket sizes, so that no receptive field is split across two buckets. Communication vs. Computation. In the first set of experiments, we examine the ratio between computation and communication costs during training, for increased parallelism. The image classification networks are trained on ImageNet, while LSTM is trained on AN4. We examine the cost breakdown for these networks over a pass over the dataset (epoch). Figure 2 gives the results for various networks for image classification. The variance of epoch times is practically negligible (<1%), hence we omit confidence intervals. Figure 2 leads to some interesting observations. First, based on the ratio of communication to computation, we can roughly split networks into communication-intensive (AlexNet, VGG, LSTM), and computation-intensive (Inception, ResNet). For both network types, the relative impact of communication increases significantly as we increase the number of GPUs. Examining the breakdown for the 32-bit version, all networks could significantly benefit from reduced communication. For 8 example, for AlexNet on 16 GPUs with batch size 1024, more than 80% of training time is spent on communication, whereas for LSTM on 2 GPUs with batch size 256, the ratio is 71%. (These ratios can be slightly changed by increasing batch size, but this can decrease accuracy, see e.g. [21].) Next, we examine the impact of QSGD on communication and overall training time. (Communication time includes time spent compressing and uncompressing gradients.) We measured QSGD with 2-bit quantization and 128 bucket size, and 4-bit and 8-bit quantization with 512 bucket size. The results for these two variants are similar, since the different bucket sizes mean that the 4bit version only sends 77% more data than the 2-bit version (but ∼8× less than 32-bit). These bucket sizes are chosen to ensure good convergence, but are not carefully tuned. On 16GPU AlexNet with batch size 1024, 4-bit QSGD reduces communication time by 4×, and overall epoch time by 2.5×. On LSTM, it reduces communication time by 6.8×, and overall epoch time by 2.7×. Runtime improvements are non-trivial for all architectures we considered. Accuracy. We now examine how QSGD influences accuracy and convergence rate. We ran AlexNet and ResNet to full convergence on ImageNet, LSTM on AN4, ResNet110 on CIFAR-10, as well as a two-layer perceptron on MNIST. Results are given in Figure 3, and exact numbers are given in Table 1. QSGD tests are performed on an 8GPU setup, and are compared against the best known full-precision accuracy of the networks. In general, we notice that 4bit or 8bit gradient quantization is sufficient to recover or even slightly improve full accuracy, while ensuring non-trivial speedup. Across all our experiments, 8-bit gradients with 512 bucket size have been sufficient to recover or improve upon the full-precision accuracy. Our results are consistent with recent work [30] noting benefits of adding noise to gradients when training deep networks. Thus, quantization can be seen as a source of zero-mean noise, which happens to render communication more efficient. At the same time, we note that more aggressive quantization can hurt accuracy. In particular, 4-bit QSGD with 8192 bucket size (not shown) loses 0.57% for top-5 accuracy, and 0.68% for top-1, versus full precision on AlexNet when trained for the same number of epochs. Also, QSGD with 2-bit and 64 bucket size has gap 1.73% for top-1, and 1.18% for top-1. One issue we examined in more detail is which layers are more sensitive to quantization. It appears that quantizing convolutional layers too aggressively (e.g., 2-bit precision) can lead to accuracy loss if trained for the same period of time as the full precision variant. However, increasing precision to 4-bit or 8-bit recovers accuracy. This finding suggests that modern architectures for vision tasks, such as ResNet or Inception, which are almost entirely convolutional, may benefit less from quantization than recurrent deep networks such as LSTMs. Additional Experiments. The full version of the paper contains additional experiments, including a full comparison with 1BitSGD. In brief, QSGD outperforms or matches the performance and final accuracy of 1BitSGD for the networks and parameter values we consider. 6 Conclusions and Future Work We have presented QSGD, a family of SGD algorithms which allow a smooth trade off between the amount of communication per iteration and the running time. Experiments suggest that QSGD is highly competitive with the full-precision variant on a variety of tasks. There are a number of optimizations we did not explore. The most significant is leveraging the sparsity created by QSGD. Current implementations of MPI do not provide support for sparse types, but we plan to explore such support in future work. Further, we plan to examine the potential of QSGD in larger-scale applications, such as super-computing. On the theoretical side, it is interesting to consider applications of quantization beyond SGD. The full version of this paper [4] contains complete proofs, as well as additional applications. 7 Acknowledgments The authors would like to thank Martin Jaggi, Ce Zhang, Frank Seide and the CNTK team for their support during the development of this project, as well as the anonymous NIPS reviewers for their careful consideration and excellent suggestions. Dan Alistarh was supported by a Swiss National Fund Ambizione Fellowship. Jerry Li was supported by the NSF CAREER Award CCF-1453261, CCF-1565235, a Google Faculty Research Award, and an NSF Graduate Research Fellowship. This work was developed in part while Dan Alistarh, Jerri Li and Milan Vojnovic were with Microsoft Research Cambridge, UK. 9 References [1] Martın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467, 2016. [2] Alex Acero. Acoustical and environmental robustness in automatic speech recognition, volume 201. Springer Science & Business Media, 2012. [3] Amit Agarwal, Eldar Akchurin, Chris Basoglu, Guoguo Chen, Scott Cyphers, Jasha Droppo, Adam Eversole, Brian Guenter, Mark Hillebrand, Ryan Hoens, et al. An introduction to computational networks and the computational network toolkit. Technical report, Tech. Rep. MSR-TR-2014-112, August 2014., 2014. [4] Dan Alistarh, Demjan Grubic, Jerry Li, Ryota Tomioka, and Milan Vojnovic. QSGD: Communication-efficient SGD via gradient quantization and encoding. arXiv preprint arXiv:1610.02132, 2016. [5] Yossi Arjevani and Ohad Shamir. Communication complexity of distributed convex learning and optimization. In NIPS, 2015. [6] Ron Bekkerman, Mikhail Bilenko, and John Langford. Scaling up machine learning: Parallel and distributed approaches. Cambridge University Press, 2011. [7] Sébastien Bubeck. Convex optimization: Algorithms and complexity. Foundations and Trends R⃝ in Machine Learning, 8(3-4):231–357, 2015. [8] Trishul Chilimbi, Yutaka Suzue, Johnson Apacible, and Karthik Kalyanaraman. Project adam: Building an efficient and scalable deep learning training system. In OSDI, October 2014. [9] Cntk brainscript file for alexnet. https://github.com/Microsoft/CNTK/tree/master/ Examples/Image/Classification/AlexNet/BrainScript. Accessed: 2017-02-24. [10] Christopher M De Sa, Ce Zhang, Kunle Olukotun, and Christopher Ré. Taming the wild: A unified analysis of hogwild-style algorithms. In NIPS, 2015. [11] Jeffrey Dean, Greg Corrado, Rajat Monga, Kai Chen, Matthieu Devin, Mark Mao, Andrew Senior, Paul Tucker, Ke Yang, Quoc V Le, et al. Large scale distributed deep networks. In NIPS, 2012. [12] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pages 248–255. IEEE, 2009. [13] John C Duchi, Sorathan Chaturapruek, and Christopher Ré. Asynchronous stochastic convex optimization. NIPS, 2015. [14] Peter Elias. Universal codeword sets and representations of the integers. IEEE transactions on information theory, 21(2):194–203, 1975. [15] Saeed Ghadimi and Guanghui Lan. Stochastic first- and zeroth-order methods for nonconvex stochastic programming. SIAM Journal on Optimization, 23(4):2341–2368, 2013. [16] Suyog Gupta, Ankur Agrawal, Kailash Gopalakrishnan, and Pritish Narayanan. Deep learning with limited numerical precision. In ICML, pages 1737–1746, 2015. [17] Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015. [18] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770–778, 2016. 10 [19] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. [20] Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Binarized neural networks. In Advances in Neural Information Processing Systems, pages 4107–4115, 2016. [21] Forrest N Iandola, Matthew W Moskewicz, Khalid Ashraf, and Kurt Keutzer. Firecaffe: nearlinear acceleration of deep neural network training on compute clusters. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2592–2600, 2016. [22] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. [23] Rie Johnson and Tong Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In NIPS, 2013. [24] Jakub Koneˇcn`y. Stochastic, distributed and federated optimization for machine learning. arXiv preprint arXiv:1707.01155, 2017. [25] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images, 2009. [26] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. [27] Yann LeCun, Corinna Cortes, and Christopher JC Burges. The mnist database of handwritten digits, 1998. [28] Mu Li, David G Andersen, Jun Woo Park, Alexander J Smola, Amr Ahmed, Vanja Josifovski, James Long, Eugene J Shekita, and Bor-Yiing Su. Scaling distributed machine learning with the parameter server. In OSDI, 2014. [29] Xiangru Lian, Yijun Huang, Yuncheng Li, and Ji Liu. Asynchronous parallel stochastic gradient for nonconvex optimization. In NIPS. 2015. [30] Arvind Neelakantan, Luke Vilnis, Quoc V Le, Ilya Sutskever, Lukasz Kaiser, Karol Kurach, and James Martens. Adding gradient noise improves learning for very deep networks. arXiv preprint arXiv:1511.06807, 2015. [31] Cntk implementation of qsgd. https://gitlab.com/demjangrubic/QSGD. Accessed: 201711-4. [32] Benjamin Recht, Christopher Re, Stephen Wright, and Feng Niu. Hogwild: A lock-free approach to parallelizing stochastic gradient descent. In NIPS, 2011. [33] Herbert Robbins and Sutton Monro. A stochastic approximation method. The Annals of Mathematical Statistics, pages 400–407, 1951. [34] Richard Schreier and Gabor C Temes. Understanding delta-sigma data converters, volume 74. IEEE Press, Piscataway, NJ, 2005. [35] Frank Seide, Hao Fu, Jasha Droppo, Gang Li, and Dong Yu. 1-bit stochastic gradient descent and its application to data-parallel distributed training of speech dnns. In INTERSPEECH, 2014. [36] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [37] Nikko Strom. Scalable distributed DNN training using commodity GPU cloud computing. In INTERSPEECH, 2015. [38] Ananda Theertha Suresh, Felix X Yu, H Brendan McMahan, and Sanjiv Kumar. Distributed mean estimation with limited communication. arXiv preprint arXiv:1611.00429, 2016. 11 [39] Seiya Tokui, Kenta Oono, Shohei Hido, CA San Mateo, and Justin Clayton. Chainer: a next-generation open source framework for deep learning. [40] John N Tsitsiklis and Zhi-Quan Luo. Communication complexity of convex optimization. Journal of Complexity, 3(3), 1987. [41] Wei Wen, Cong Xu, Feng Yan, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Terngrad: Ternary gradients to reduce communication in distributed deep learning. arXiv preprint arXiv:1705.07878, 2017. [42] Hantian Zhang, Jerry Li, Kaan Kara, Dan Alistarh, Ji Liu, and Ce Zhang. Zipml: Training linear models with end-to-end low precision, and a little bit of deep learning. In International Conference on Machine Learning, pages 4035–4043, 2017. [43] Sixin Zhang, Anna E Choromanska, and Yann LeCun. Deep learning with elastic averaging sgd. In Advances in Neural Information Processing Systems, pages 685–693, 2015. [44] Yuchen Zhang, John Duchi, Michael I Jordan, and Martin J Wainwright. Information-theoretic lower bounds for distributed statistical estimation with communication constraints. In NIPS, 2013. [45] Shuchang Zhou, Yuxin Wu, Zekun Ni, Xinyu Zhou, He Wen, and Yuheng Zou. Dorefa-net: Training low bitwidth convolutional neural networks with low bitwidth gradients. arXiv preprint arXiv:1606.06160, 2016. 12 | 2017 | 279 |
6,762 | Deep Hyperalignment Muhammad Yousefnezhad, Daoqiang Zhang College of Computer Science and Technology Nanjing University of Aeronautics and Astronautics {myousefnezhad,dqzhang}@nuaa.edu.cn Abstract This paper proposes Deep Hyperalignment (DHA) as a regularized, deep extension, scalable Hyperalignment (HA) method, which is well-suited for applying functional alignment to fMRI datasets with nonlinearity, high-dimensionality (broad ROI), and a large number of subjects. Unlink previous methods, DHA is not limited by a restricted fixed kernel function. Further, it uses a parametric approach, rank-m Singular Value Decomposition (SVD), and stochastic gradient descent for optimization. Therefore, DHA has a suitable time complexity for large datasets, and DHA does not require the training data when it computes the functional alignment for a new subject. Experimental studies on multi-subject fMRI analysis confirm that the DHA method achieves superior performance to other state-of-the-art HA algorithms. 1 Introduction The multi-subject fMRI analysis is a challenging problem in the human brain decoding [1–7]. On the one hand, the multi-subject analysis can verify the developed models across subjects. On the other hand, this analysis requires authentic functional and anatomical alignments among neuronal activities of different subjects, which these alignments can significantly improve the performance of the developed models [1, 4]. In fact, multi-subject fMRI images must be aligned across subjects in order to take between-subject variability into account. There are technically two main alignment methods, including anatomical alignment and functional alignment, which can work in unison. Indeed, anatomical alignment is only utilized in the majority of the fMRI studies as a preprocessing step. It is applied by aligning fMRI images based on anatomical features of standard structural MRI images, e.g. Talairach [2, 7]. However, anatomical alignment can limitedly improve the accuracy because the size, shape and anatomical location of functional loci differ across subjects [1, 2, 7]. By contrast, functional alignment explores to precisely align the fMRI images across subjects. Indeed, it has a broad range of applications in neuroscience, such as localization of the Brain’s tumor [8]. As the widely used functional alignment method [1–7], Hyperalignment (HA) [1] is an ‘anatomy free’ functional alignment method, which can be mathematically formulated as a multiple-set Canonical Correlation Analysis (CCA) problem [2, 3, 5]. Original HA does not work in a very high dimensional space. In order to extend HA into the real-world problems, Xu et al. developed the Regularized Hyperalignment (RHA) by utilizing an EM algorithm to iteratively seek the regularized optimum parameters [2]. Further, Chen et al. developed Singular Value Decomposition Hyperalignment (SVDHA), which firstly provides dimensionality reduction by SVD, and then HA aligns the functional responses in the reduced space [4]. In another study, Chen et al. introduced Shared Response Model (SRM), which is technically equivalent to Probabilistic CCA [5]. In addition, Guntupalli et al. developed SearchLight (SL) model, which is actually an ensemble of quasi-CCA models fits on patches of the brain images [9]. Lorbert et al. illustrated the limitation of HA methods on the linear representation of fMRI responses. They also proposed Kernel Hyperalignment (KHA) as a nonlinear alternative in an embedding space for solving the HA limitation [3]. Although KHA 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. can solve the nonlinearity and high-dimensionality problems, its performance is limited by the fixed employed kernel function. As another nonlinear HA method, Chen et al. recently developed Convolutional Autoencoder (CAE) for whole brain functional alignment. Indeed, this method reformulates the SRM as a multi-view autoencoder [5] and then uses the standard SL analysis [9] in order to improve the stability and robustness of the generated classification (cognitive) model [6]. Since CAE simultaneously employs SRM and SL, its time complexity is so high. In a nutshell, there are three main challenges in previous HA methods for calculating accurate functional alignments, i.e. nonlinearity [3, 6], high-dimensionality [2, 4, 5], and using a large number of subjects [6]. As the main contribution of this paper, we propose a novel kernel approach, which is called Deep Hyperalignment (DHA), in order to solve mentioned challenges in HA problems. Indeed, DHA employs deep network, i.e. multiple stacked layers of nonlinear transformation, as the kernel function, which is parametric and uses rank-m SVD [10] and Stochastic Gradient Descent (SGD) [13] for optimization. Consequently, DHA generates low-runtime on large datasets, and the training data is not referenced when DHA computes the functional alignment for a new subject. Further, DHA is not limited by a restricted fixed representational space because the kernel in DHA is a multi-layer neural network, which can separately implement any nonlinear function [11–13] for each subject to transfer the brain activities to a common space. The proposed method is related to RHA [2] and MVLSA [10]. Indeed, the main difference between DHA and the mentioned methods lies in the deep kernel function. Further, KHA [3] is equivalent to DHA, where the proposed deep network is employed as the kernel function. In addition, DHA can be looked as a multi-set regularized DCCA [11] with stochastic optimization [13]. Finally, DHA is related to DGCCA [12], when DGCCA is reformulated for functional alignment by using regularization, and rank-m SVD [10]. The rest of this paper is organized as follows: In Section 2, this study briefly introduces HA method. Then, DHA is proposed in Section 3. Experimental results are reported in Section 4; and finally, this paper presents conclusion and pointed out some future works in Section 5. 2 Hyperalignment As a training set, preprocessed fMRI time series for S subjects can be denoted by X(ℓ) = n x(ℓ) mn o ∈ RT ×V , ℓ= 1:S, m = 1:T, n = 1:V , where V denotes the number of voxels, T is the number of time points in units of TRs (Time of Repetition), and x(ℓ) mn ∈R denotes the functional activity for the ℓ-th subject in the m-th time point and the n-th voxel. For assuring temporal alignment, the stimuli in the training set are considered time synchronized, i.e. the m-th time point for all subjects illustrates the same simulation [2, 3]. Original HA can be defined based on Inter-Subject Correlation (ISC), which is a classical metric in order to apply functional alignment: [1-4, 7] max R(i),R(j) S X i=1 S X j=i+1 ISC(X(i)R(i), X(j)R(j)) ≡ max R(i),R(j) S X i=1 S X j=i+1 tr (X(i)R(i))⊤X(j)R(j) s.t. X(ℓ)R(ℓ)⊤X(ℓ)R(ℓ) = I, ℓ= 1:S, (1) where tr() denotes the trace function, I is the identity matrix, R(ℓ) ∈RV ×V denotes the solution for ℓ-th subject. For avoiding overfitting, the constrains must be imposed in R(ℓ) [2, 7]. If X(ℓ) ∼ N(0, 1), ℓ= 1:S are column-wise standardized, the ISC lies in [−1, +1]. Here, the large values illustrate better alignment [2, 3]. In order to seek an optimum solution, solving (1) may not be the best approach because there is no scale to evaluate the distance between current result and the optimum (fully maximized) solution [2, 4, 7]. Instead, we can reformulate (1) as a minimization problem by using a multiple-set CCA: [1–4] min R(i),R(j) S X i=1 S X j=i+1
X(i)R(i) −X(j)R(j)
2 F , s.t. X(ℓ)R(ℓ)⊤ X(ℓ)R(ℓ) = I, ℓ= 1:S, (2) where (2) approaches zero for an optimum result. Indeed, the main assumption in the original HA is that the R(ℓ), ℓ= 1:S are noisy ‘rotations’ of a common template [1, 9]. This paper provides a detailed description of HA methods in the supplementary materials (https://sourceforge.net/ projects/myousefnezhad/files/DHA/). 2 3 Deep Hyperalignment Objective function of DHA is defined as follows: min θ(i),R(i) θ(j),R(j) S X i=1 S X j=i+1
fi X(i);θ(i) R(i) −fj X(j);θ(j) R(j)
2 F s.t. R(ℓ)⊤ fℓ X(ℓ);θ(ℓ)⊤ fℓ X(ℓ);θ(ℓ) + ϵI R(ℓ) = I, ℓ= 1:S, (3) where θ(ℓ)= W(ℓ) m , b(ℓ) m , m=2:C denotes all parameters in ℓ-th deep network belonged to ℓ-th subject, R(ℓ) ∈RVnew×Vnew is the DHA solution for ℓ-th subject, Vnew ≤V denotes the number of features after transformation, the regularized parameter ϵ is a small constant, e.g. 10−8, and deep multi-layer kernel function fℓ X(ℓ);θ(ℓ) ∈RT ×Vnew is denoted as follows: fℓ X(ℓ);θ(ℓ) = mat h(ℓ) C , T, Vnew , (4) where T denotes the number of time points, C ≥ 3 is number of deep network layers, mat(x, m, n):Rmn →Rm×n denotes the reshape (matricization) function, and h(ℓ) C ∈RT Vnew is the output layer of the following multi-layer deep network: h(ℓ) m = g W(ℓ) m h(ℓ) m−1 + b(ℓ) m , where h(ℓ) 1 = vec X(ℓ) and m = 2:C. (5) Here, g:R →R is a nonlinear function applied componentwise, vec:Rm×n →Rmn denotes the vectorization function, consequently h(ℓ) 1 = vec X(ℓ) ∈RT V . Notably, this paper considers both vec() and mat() functions are linear transformations, where X ∈Rm×n = mat vec(X), m, n for any matrix X. By considering U (m) units in the m-th intermediate layer, parameters of distinctive layers of fℓ X(ℓ);θ(ℓ) are defined by following properties: W(ℓ) C ∈RT Vnew×U (C-1) and b(ℓ) C ∈ RT Vnew for the output layer, W(ℓ) 2 ∈RU (2)×T V and b(ℓ) 2 ∈RU (2) for the first intermediate layer, and W(ℓ) m ∈RU (m)×U (m-1), b(ℓ) m ∈RU (m) and h(ℓ) m ∈RU (m) for m-th intermediate layer (3 ≤m ≤ C −1). Since (3) must be calculated for any new subject in the testing phase, it is not computationally efficient. In other words, the transformed training data must be referenced by the current objective function for each new subject in the testing phase. Lemma 1. The equation (3) can be reformulated as follows where G ∈RT ×Vnew is the HA template: min G,R(i),θ(i) S X i=1
G −fi X(i);θ(i) R(i)
2 F s.t. G⊤G = I, where G = 1 S S X j=1 fj X(j);θ(j) R(j). (6) Proof. In a nutshell, both (3) and (6) can be rewritten as −S2tr G⊤G + S PS ℓ=1 tr fℓ X(ℓ);θ(ℓ) R(ℓ)⊤ fℓ X(ℓ);θ(ℓ) R(ℓ) ! . Please see supplementary materials for proof in details. Remark 1. G is called DHA template, which can be used for functional alignment in the testing phase. Remark 2. Same as previous approaches for HA problems [1–7], a DHA solution is not unique. If a DHA template G is calculated for a specific HA problem, then QG is another solution for that specific HA problem, where Q ∈RVnew×Vnew can be any orthogonal matrix. Consequently, if two independent templates G1, G2 are trained for a specific dataset, the solutions can be mapped to each other by calculating
G2 −QG1
, where Q can be used as a coefficient for functional alignment in the first solution in order to compare its results to the second one. Indeed, G1 and G2 are located in different positions on the same contour line [5, 7]. 3 3.1 Optimization This section proposes an effective approach for optimizing the DHA objective function by using rank-m SVD [10] and SGD [13]. This method seeks an optimum solution for the DHA objective function (6) by using two different steps, which iteratively work in unison. By considering fixed network parameters (θ(ℓ)), a mini-batch of neural activities is firstly aligned through the deep network. Then, back-propagation algorithm [14] is used to update the network parameters. The main challenge for solving the DHA objective function is that we cannot seek a natural extension of the correlation object to more than two random variables. Consequently, functional alignments are stacked in a S × S matrix and maximize a certain matrix norm for that matrix [10, 12]. As the first step, we consider network parameters are in an optimum state. Therefore, the mappings (R(ℓ), ℓ= 1:S) and template (G) must be calculated to solve the DHA problem. In order to scale DHA approach, this paper employs the rank-m SVD [10] of the mapped neural activities as follows: fℓ X(ℓ);θ(ℓ) SV D = Ω(ℓ)Σ(ℓ) Ψ(ℓ)⊤, ℓ= 1:S (7) where Σ(ℓ) ∈Rm×m denotes the diagonal matrix with m-largest singular values of the mapped feature fℓ X(ℓ);θ(ℓ) , Ω(ℓ) ∈RT ×m and Ψ(ℓ) ∈Rm×Vnew are respectively the corresponding left and right singular vectors. Based on (7), the projection matrix for ℓ-th subject can be generated as follows: [10] P(ℓ) = fℓ X(ℓ);θ(ℓ) fℓ X(ℓ);θ(ℓ)⊤ fℓ X(ℓ);θ(ℓ) + ϵI −1 fℓ X(ℓ);θ(ℓ)⊤ = Ω(ℓ) Σ(ℓ)⊤ Σ(ℓ) Σ(ℓ)⊤+ ϵI −1 Σ(ℓ) Ω(ℓ)⊤= Ω(ℓ)D(ℓ) Ω(ℓ)D(ℓ)⊤ , (8) where P(ℓ) ∈RT ×T is symmetric and idempotent [10, 12], and diagonal matrix D(ℓ) ∈Rm×m is D(ℓ) D(ℓ)⊤= Σ(ℓ)⊤ Σ(ℓ) Σ(ℓ)⊤+ ϵI −1 Σ(ℓ). (9) Further, the sum of projection matrices can be defined as follows, where eA eA⊤is the Cholesky decomposition [10] of A: A = S X i=1 P(i) = eA eA⊤, where eA ∈RT ×mS = Ω(1)D(1) . . . Ω(S)D(S) . (10) Lemma 2. Based on (10), the objective function of DHA (6) can be rewritten as follows: min G,R(i),θ(i) S X i=1
G −fi X(i);θ(i) R(i)
≡max G tr G⊤AG . (11) Proof. Since P(ℓ) is idempotent, the trace form of (6) can be reformulated as maximizing the sum of projections. Please see the supplementary materials for proof in details. Based on Lemma 2, the first optimization step of DHA problem can be expressed as eigendecomposition of AG = GΛ, where Λ = λ1 . . . λT and G respectively denote the eigenvalues and eigenvectors of A. Further, the matrix G that we are interested in finding, can be calculated by the left singular vectors of eA = GeΣ eΨ⊤, where G⊤G = I [10]. This paper utilizes Incremental SVD [15] for calculating these left singular vectors. Further, DHA mapping for ℓ-th subject is denoted as follows: R(ℓ) = fℓ X(ℓ);θ(ℓ)⊤ fℓ X(ℓ);θ(ℓ) + ϵI −1 fℓ X(ℓ);θ(ℓ)⊤ G. (12) Lemma 3. In order to update network parameters as the second step, the derivative of Z = PT ℓ=1 λℓ, which is the sum of eigenvalues of A, over the mapped neural activities of ℓ-th subject is defined as follows: ∂Z ∂fℓ X(ℓ);θ(ℓ) = 2R(ℓ)G⊤−2R(ℓ) R(ℓ)⊤ fℓ X(ℓ);θ(ℓ)⊤ . (13) Proof. This derivative can be solved by using the chain and product rules in the matrix derivative as well as considering ∂Z/∂A = GG⊤[12]. Please see the supplementary materials for proof in details. 4 Algorithm 1 Deep Hyperalignment (DHA) Input: Data X(i), i = 1:S, Regularized parameter ϵ, Number of layers C, Number of units U (m) for m = 2:C, HA template bG for testing phase (default ∅), Learning rate η (default 10−4 [13]). Output: DHA mappings R(ℓ) and parameters θ(ℓ), HA template G just from training phase Method: 01. Initialize iteration counter: m ←1 and θ(ℓ) ∼N(0, 1) for ℓ= 1:S. 02. Construct fℓ X(ℓ);θ(ℓ) based on (4) and (5) by using θ(ℓ), C, U (m) for ℓ= 1:S. 03. IF ( bG ̸= ∅) THEN % The first step of DHA: fixed θ(ℓ) and calculating G and R(ℓ) ↓ 04. Generate eA by using (8) and (10). 05. Calculate G by applying Incremental SVD [15] to eA = GeΣ eΨ⊤. 06. ELSE 07. G = bG. 08. END IF 09. Calculate mappings R(ℓ), ℓ= 1:S by using (12). 10. Estimate error of iteration γm = PS i=1 PS j=i+1
fi X(i);θ(i) R(i) −fj X(j);θ(j) R(j)
2 F . 11. IF (m > 3) and (γm ≥γm−1 ≥γm−2) THEN % This is the finishing condition. 12. Return calculated G, R(ℓ), θ(ℓ)(ℓ= 1:S) related to (m-2)-th iteration. 13. END IF % The second step of DHA: fixed G and R(ℓ) and updating θ(ℓ) ↓ 14. ∇θ(ℓ) ←backprop ∂Z/∂fℓ X(ℓ);θ(ℓ), θ(ℓ) by using (13) for ℓ= 1:S. 15. Update θ(ℓ) ←θ(ℓ) −η∇θ(ℓ) for ℓ= 1:S and then m ←m + 1 16. SAVE all DHA parameters related to this iteration and GO TO Line 02. Algorithm 1 illustrates the DHA method for both training and testing phases. As depicted in this algorithm, (12) is just needed as the first step in the testing phase because the DHA template G is calculated for this phase based on the training samples (please see Lemma 1). As the second step in the DHA method, the networks’ parameters (θ(ℓ)) must be updated. This paper employs the back-propagation algorithm (backprop() function) [14] as well as Lemma 3 for this step. In addition, finishing condition is defined by tackling errors in last three iterations, i.e. the average of the difference between each pair correlations of aligned functional activities across subjects (γm for last three iterations). In other words, DHA will be finished if the error rates in the last three iterations are going to be worst. Further, a structure (nonlinear function for componentwise, and numbers of layers and units) for the deep network can be selected based on the optimum-state error (γopt) generated by training samples across different structures (see Experiment Schemes in the supplementary materials). In summary, this paper proposes DHA as a flexible deep kernel approach to improve the performance of functional alignment in fMRI analysis. In order to seek an efficient functional alignment, DHA uses a deep network (multiple stacked layers of nonlinear transformation) for mapping fMRI responses of each subject to an embedded space (fℓ: RT ×V →RT ×Vnew, ℓ= 1:S). Unlike previous methods that use a restricted fixed kernel function, mapping functions in DHA are flexible across subjects because they employ multi-layer neural networks, which can implement any nonlinear function [12]. Therefore, DHA does not suffer from disadvantages of the previous kernel approach. In order to deal with high-dimensionality (broad ROI), DHA can also apply an optional feature selection by considering Vnew < V for constructing the deep networks. The performance of the optional feature selection will be analyzed in Section 4. Finally, DHA can be scaled across a large number of subjects by using the proposed optimization algorithm, i.e. rank-m SVD, regularization, and mini-batch SGD. 4 Experiments The empirical studies are reported in this section. Like previous studies [1–7, 9], this paper employs the ν-SVM algorithms [16] for generating the classification model. Indeed, we use the binary ν-SVM for datasets with just two categories of stimuli and multi-label ν-SVM [3, 16] as the multi-class approach. All datasets are separately preprocessed by FSL 5.0.9 (https://fsl.fmrib.ox.ac.uk), i.e. slice timing, anatomical alignment, normalization, smoothing. Regions of Interests (ROI) are also denoted by employing the main reference of each dataset. In addition, leave-one-subject-out 5 Table 1: Accuracy of HA methods in post-alignment classification by using simple task datasets ↓Algorithms, Datasets→ DS005 DS105 DS107 DS116 DS117 ν-SVM [17] 71.65±0.97 22.89±1.02 38.84±0.82 67.26±1.99 73.32±1.67 HA [1] 81.27±0.59 30.03±0.87 43.01±0.56 74.23±1.40 77.93±0.29 RHA [2] 83.06±0.36 32.62±0.52 46.82±0.37 78.71±0.76 84.22±0.44 KHA [3] 85.29±0.49 37.14±0.91 52.69±0.69 78.03±0.89 83.32±0.41 SVD-HA [4] 90.82±1.23 40.21±0.83 59.54±0.99 81.56±0.54 95.62±0.83 SRM [5] 91.26±0.34 48.77±0.94 64.11±0.37 83.31±0.73 95.01±0.64 SL [9] 90.21±0.61 49.86±0.4 64.07±0.98 82.32±0.28 94.96±0.24 CAE [6] 94.25±0.76 54.52±0.80 72.16±0.43 91.49±0.67 95.92±0.67 DHA 97.92±0.82 60.39±0.68 73.05±0.63 90.28±0.71 97.99±0.94 Table 2: Area under the ROC curve (AUC) of different HA methods in post-alignment classification by using simple task datasets ↓Algorithms, Datasets→ DS005 DS105 DS107 DS116 DS117 ν-SVM [17] 68.37±1.01 21.76±0.91 36.84±1.45 62.49±1.34 70.17±0.59 HA [1] 70.32±0.92 28.91±1.03 40.21±0.33 70.67±0.97 76.14±0.49 RHA [2] 82.22±0.42 30.35±0.39 43.63±0.61 76.34±0.45 81.54±0.92 KHA [3] 80.91±0.21 36.23±0.57 50.41±0.92 75.28±0.94 80.92±0.28 SVD-HA [4] 88.54±0.71 37.61±0.62 57.54±0.31 78.66±0.82 92.14±0.42 SRM [5] 90.23±0.74 44.48±0.75 62.41±0.72 79.20±0.98 93.65±0.93 SL [9] 89.79±0.25 47.32±0.92 61.84±0.32 80.63±0.81 93.26±0.72 CAE [6] 91.24±0.61 52.16±0.63 72.33±0.79 87.53±0.72 91.49±0.33 DHA 96.91±0.82 59.57±0.32 70.23±0.92 89.93±0.24 96.13±0.32 cross-validation is utilized for partitioning datasets to the training set and testing set. Different HA methods are employed for functional aligning and then the mapped neural activities are used to generate the classification model. The performance of the proposed method is compared with the ν-SVM algorithm as the baseline, where the features are used after anatomical alignment without applying any hyperalignment mapping. Further, performances of the standard HA [1], RHA [2], KHA [3], SVDHA [4], SRM [5], and SL [9] are reported as state-of-the-arts HA methods. In this paper, the results of HA algorithm is generated by employing Generalized CCA proposed in [10]. In addition, regularized parameters (α, β) in RHA are optimally assigned based on [2]. Further, KHA algorithm is used by the Gaussian kernel, which is evaluated as the best kernel in the original paper [3]. As another deep-learning-based alternative for functional alignment, the performance of CAE [6] is also compared with the proposed method. Like the original paper [6], this paper employs k1 = k3 = {5, 10, 15, 20, 25}, ρ = {0.1, 0.25, 0.5, 0.75, 0.9}, λ = {0.1, 1, 5, 10}. Then, aligned neural activities (by using CAE) are applied to the classification algorithm same as other HA techniques. This paper follows the CAE setup to set the same settings in the proposed method. Consequently, three hidden layers (C = 5) and the regularized parameters ϵ = {10−4, 10−6, 10−8} are employed in the DHA method. In addition, the number of units in the intermediate layers are considered U (m) = KV , where m = 2:C-1, C is the number of layers, V denotes the number of voxels and K is the number of stimulus categories in each dataset1. Further, three distinctive activation functions are employed, i.e. Sigmoid (g(x) = 1/1 + exp(−x)), Hyperbolic (g(x) = tanh(x)), and Rectified Linear Unit or ReLU (g(x) = ln(1 + exp(x))). In this paper, the optimum parameters for DHA and CAE methods are reported for each dataset. Moreover, all algorithms are implemented by Python 3 on a PC with certain specifications2 by authors in order to generate experimental results. Experiment schemes are also described in supplementary materials. 4.1 Simple Tasks Analysis This paper utilizes 5 datasets, shared by Open fMRI (https://openfmri.org), for running empirical studies of this section. Further, numbers of original and aligned features are considered 1Although we can use any settings for DHA, we empirically figured out this setting is acceptable to seek an optimum solution. Indeed, we followed CAE setup in the network structure but used the number of categories (K) rather than a series of parameters. In the current format of DHA, we just need to set the regularized constant and the nonlinear activation function, while a wide range of parameters must be set in the CAE. 2DEL, CPU = Intel Xeon E5-2630 v3 (8×2.4 GHz), RAM = 64GB, GPU = GeForce GTX TITAN X (12GB memory), OS = Ubuntu 16.04.3 LTS, Python = 3.6.2, Pip = 9.0.1, Numpy = 1.13.1, Scipy = 0.19.1, Scikit-Learn = 0.18.2, Theano = 0.9.0. 6 100200 400 600 800 1000 1200 25 30 35 40 45 50 55 60 65 70 75 80 85 Classification Accuracy (%) # of voxels per hemisphere vSVM HA KHA RHA SL SVDHA SRM CAE DHA (a) Forrest Gump (TRs = 100) 100200 400 600 800 1000 1200 30 35 40 45 50 55 60 65 70 75 80 85 Classification Accuracy (%) # of voxels per hemisphere vSVM HA KHA RHA SL SVDHA SRM CAE DHA (b) Forrest Gump (TRs = 400) 100200 400 600 800 1000 1200 30 35 40 45 50 55 60 65 70 75 80 85 Classification Accuracy (%) # of voxels per hemisphere vSVM HA KHA RHA SL SVDHA SRM CAE DHA (c) Forrest Gump (TRs = 800) 100200 400 600 800 1000 1200 30 35 40 45 50 55 60 65 70 75 80 85 Classification Accuracy (%) # of voxels per hemisphere vSVM HA KHA RHA SL SVDHA SRM CAE DHA (d) Forrest Gump (TRs = 2000) 70 140 210 280 350 420 490 30 35 40 45 50 55 60 65 70 Classification Accuracy (%) # of voxels per hemisphere vSVM HA KHA RHA SL SVDHA SRM CAE DHA (e) Raiders (TRs = 100) 70 140 210 280 350 420 490 30 35 40 45 50 55 60 65 70 Classification Accuracy (%) # of voxels per hemisphere vSVM HA KHA RHA SL SVDHA SRM CAE DHA (f) Raiders (TRs = 400) 70 140 210 280 350 420 490 30 35 40 45 50 55 60 65 70 Classification Accuracy (%) # of voxels per hemisphere vSVM HA KHA RHA SL SVDHA SRM CAE DHA (g) Raiders (TRs = 800) 70 140 210 280 350 420 490 30 35 40 45 50 55 60 65 70 75 Classification Accuracy (%) # of voxels per hemisphere vSVM HA KHA RHA SL SVDHA SRM CAE DHA (h) Raiders (TRs = 2000) Figure 1: Comparison of different HA algorithms on complex task datasets by using ranked voxels. equal (V = Vnew) for all HA methods. As the first dataset, ‘Mixed-gambles task’ (DS005) includes S = 48 subjects. It also contains K = 2 categories of risk tasks in the human brain, where the chance of selection is 50/50. In this dataset, the best results for CAE is generated by following parameters k1 = k3 = 20, ρ = 0.75, λ = 1 and for DHA by using ϵ = 10−8 and Hyperbolic function. In addition, ROI is defined based on the original paper [17]. As the second dataset, ‘Visual Object Recognition’ (DS105) includes S = 71 subjects. It also contains K = 8 categories of visual stimuli, i.e. gray-scale images of faces, houses, cats, bottles, scissors, shoes, chairs, and scrambles (nonsense patterns). In this dataset, the best results for CAE is generated by following parameters k1 = k3 = 25, ρ = 0.9, λ = 5 and for DHA by using ϵ = 10−6 and Sigmoid function. Please see [1, 7] for more information. As the third dataset, ‘Word and Object Processing’ (DS107) includes S = 98 subjects. It contains K = 4 categories of visual stimuli, i.e. words, objects, scrambles, consonants. In this dataset, the best results for CAE is generated by following parameters k1 = k3 = 10, ρ = 0.5, λ = 10 and for DHA by using ϵ = 10−6 and ReLU function. Please see [18] for more information. As the fourth dataset, ‘Multi-subject, multi-modal human neuroimaging dataset’ (DS117) includes MEG and fMRI images for S = 171 subjects. This paper just uses the fMRI images of this dataset. It also contains K = 2 categories of visual stimuli, i.e. human faces, and scrambles. In this dataset, the best results for CAE is generated by following parameters k1 = k3 = 20, ρ = 0.9, λ = 5 and for DHA by using ϵ = 10−8 and Sigmoid function. Please see [19] for more information. The responses of voxels in the Ventral Cortex are analyzed for these three datasets (DS105, DS107, DS117). As the last dataset, ‘Auditory and Visual Oddball EEG-fMRI’ (DS116) includes EEG signals and fMRI images for S = 102 subjects. This paper only employs the fMRI images of this dataset. It contains K = 2 categories of audio and visual stimuli, including oddball tasks. In this dataset, the best results for CAE is generated by following parameters k1 = k3 = 10, ρ = 0.75, λ = 1 and for DHA by using ϵ = 10−4 and ReLU function. In addition, ROI is defined based on the original paper [20]. This paper also provides the technical information of the employed datasets in the supplementary materials. Table 1 and 2 respectively demonstrate the classification Accuracy and Area Under the ROC Curve (AUC) in percentage (%) for the predictors. As these tables demonstrate, the performances of classification analysis without HA method are significantly low. Further, the proposed algorithm has generated better performance in comparison with other methods because it provided a better embedded space in order to align neural activities. 4.2 Complex Tasks Analysis This section uses two fMRI datasets, which are related to watching movies. The numbers of original and aligned features are considered equal (V = Vnew) for all HA methods. As the first dataset, ‘A high-resolution 7-Tesla fMRI dataset from complex natural stimulation with an audio movie’ (DS113) includes the fMRI data of S = 18 subjects, who watched ‘Forrest Gump (1994)’ movie during the experiment. This dataset provided by Open fMRI. In this dataset, the best results for CAE is generated by following parameters k1 = k3 = 25, ρ = 0.9, λ = 10 and for DHA by using ϵ = 10−8 and Sigmoid function. Please see [7] for more information. As the second dataset, S = 10 subjects watched ‘Raiders of the Lost Ark (1981)’, where whole brain volumes are 48. In this dataset, the best results for CAE is generated by following parameters k1 = k3 = 15, ρ = 0.75, λ = 1 and for DHA 7 100 90 80 70 60 40 45 50 55 60 65 Classification Accuracy The Percentage of Selected Features SVDHA SRM CAE DHA (A) DS105 100 90 80 70 60 60 62 64 66 68 70 72 74 76 78 80 82 Classification Accuracy The Percentage of Selected Features SVDHA SRM CAE DHA (B) DS107 Figure 2: Classification by using feature selection. CAE DHA SL SRM SVDHA KHA RHA HA νSVM Runtime (%) 0 0.5 1 1.5 2 (A) DS105 CAE DHA SL SRM SVDHA KHA RHA HA νSVM Runtime (%) 0 0.5 1 1.5 2 (B) DS107 Figure 3: Runtime Analysis by using ϵ = 10−4 and Sigmoid function. Please see [3-5] for more information. In these two datasets, the ROI is defined in the ventral temporal cortex (VT). Figure 1 depicts the generated results, where the voxels in ROI are ranked by the method proposed in [1] based on their neurological priorities same as previous studies [1, 4, 7, 9]. Then, the experiments are repeated by using the different number of ranked voxels per hemisphere, i.e. in Forrest: [100, 200, 400, 600, 800, 1000, 1200], and in Raiders: [70, 140, 210, 280, 350, 420, 490]. In addition, the empirical studies are reported by using the first TRs = [100, 400, 800, 2000] in both datasets. Figure 1 shows that the DHA achieves superior performance to other HA algorithms. 4.3 Classification analysis by using feature selection In this section, the effect of features selection (Vnew < V ) on the performance of classification methods will be discussed by using DS105 and DS107 datasets. Here, the performance of the proposed method is compared with SVDHA [4], SRM [5], and CAE [6] as the state-of-the-art HA techniques, which can apply feature selection before generating a classification model. Here, multi-label ν-SVM [16] is used for generating the classification models after each of the mentioned methods applied on preprocessed fMRI images for functional alignment. In addition, the setup of this experiment is same as the previous sections (cross-validation, the best parameters, etc.). Figure 2 illustrates the performance of different methods by employing 100% to 60% of features. As depicted in this figure, the proposed method has generated better performance in comparison with other methods because it provides better feature representation in comparison with other techniques. 4.4 Runtime Analysis In this section, the runtime of the proposed method is compared with the previous HA methods by using DS105 and DS107 datasets. As mentioned before, all of the results in this experiment are generated by a PC with certain specifications. Figure 3 illustrates the runtime of the mentioned methods, where runtime of other methods are scaled based on the DHA (runtime of the proposed method is considered as the unit). As depicted in this figure, CAE generated the worse runtime because it concurrently employs modified versions of SRM and SL for functional alignment. Further, SL also includes high time complexity because of the ensemble approach. By considering the performance of the proposed method in the previous sections, it generates acceptable runtime. As mentioned before, the proposed method employs rank-m SVD [10] as well as Incremental SVD [15], which can significantly reduce the time complexity of the optimization procedure [10, 12]. 5 Conclusion This paper extended a deep approach for hyperalignment methods in order to provide accurate functional alignment in multi-subject fMRI analysis. Deep Hyperalignment (DHA) can handle fMRI datasets with nonlinearity, high-dimensionality (broad ROI), and a large number of subjects. We have also illustrated how DHA can be used for post-alignment classification. DHA is parametric and uses rank-m SVD and stochastic gradient descent for optimization. Therefore, DHA generates lowruntime on large datasets, and DHA does not require the training data when the functional alignment is computed for a new subject. Further, DHA is not limited by a restricted fixed representational space because the kernel in DHA is a multi-layer neural network, which can separately implement any nonlinear function for each subject to transfer the brain activities to a common space. Experimental studies on multi-subject fMRI analysis confirm that the DHA method achieves superior performance to other state-of-the-art HA algorithms. In the future, we will plan to employ DHA for improving the performance of other techniques in fMRI analysis, e.g. Representational Similarity Analysis (RSA). 8 Acknowledgments This work was supported in part by the National Natural Science Foundation of China (61422204, 61473149, and 61732006), and NUAA Fundamental Research Funds (NE2013105). References [1] Haxby, J.V. & Connolly, A.C. & Guntupalli, J.S. (2014) Decoding neural representational spaces using multivariate pattern analysis. Annual Review of Neuroscience. 37:435–456, [2] Xu, H. & Lorbert, A. & Ramadge, P.J. & Guntupalli, J.S. & Haxby, J.V. (2012) Regularized hyperalignment of multi-set fMRI data. IEEE Statistical Signal Processing Workshop (SSP). pp. 229–232, Aug/5–8, USA. [3] Lorbert, A. & Ramadge, P.J. (2012) Kernel hyperalignment. 25th Advances in Neural Information Processing Systems (NIPS). pp. 1790–179. Dec/3–8, Harveys. [4] Chen, P.H. & Guntupalli, J.S. & Haxby, J.V. & Ramadge, P.J. (2014) Joint SVD-Hyperalignment for multisubject FMRI data alignment. 24th IEEE International Workshop on Machine Learning for Signal Processing (MLSP). pp. 1–6, Sep/21–24, France. [5] Chen, P.H. & Chen, J. & Yeshurun, Y. & Hasson, U. & Haxby, J.V. & Ramadge, P.J. (2015) A reduceddimension fMRI shared response model. 28th Advances in Neural Information Processing Systems (NIPS). pp. 460–468, Dec/7–12, Canada. [6] Chen, P.H. & Zhu, X. & Zhang, H. & Turek, J.S. & Chen, J. & Willke, T.L. & Hasson, U. & Ramadge, P.J. (2016) A convolutional autoencoder for multi-subject fMRI data aggregation. 29th Workshop of Representation Learning in Artificial and Biological Neural Networks. NIPS, Dec/5–10, Barcelona. [7] Yousefnezhad, M. & Zhang D. (2017) Local Discriminant Hyperalignment for multi-subject fMRI data alignment. 34th AAAI Conference on Artificial Intelligence. pp. 59–61, Feb/4–9, San Francisco, USA. [8] Langs, G. & Tie, Y. & Rigolo, L. & Golby, A. & Golland, P. (2010) Functional geometry alignment and localization of brain areas, 23th Advances in Neural Information Processing Systems (NIPS). Dec/6–11, Canada. [9] Guntupalli, J.S. & Hanke, M. & Halchenko, Y.O. & Connolly, A.C. & Ramadge, P.J. & Haxby, J.V. (2016) A model of representational spaces in human cortex. Cerebral Cortex. Oxford University Press. [10] Rastogi, P. & Van D.B. & Arora, R. (2015) Multiview LSA: Representation Learning via Generalized CCA. 14th Annual Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (HLT-NAACL). pp. 556–566, May/31 to Jun/5, Denver, USA. [11] Andrew, G. & Arora, R. & Bilmes, J. & Livescu, K. (2012) Deep Canonical Correlation Analysis. 30th International Conference on Machine Learning (ICML). pp. 1247–1255, Jun/16–21, Atlanta, USA. [12] Benton, A. & Khayrallah, H. & Gujral, B. & Reisinger, D. & Zhang, S. & Arora, R. (2017) Deep Generalized Canonical Correlation Analysis. 5th International Conference on Learning Representations (ICLR). [13] Wang, W. & Arora, R. & Livescu, K. & Srebro, N. Stochastic optimization for deep CCA via nonlinear orthogonal iterations. 53rd Annual Allerton Conference on Communication, Control, and Computing (Allerton). pp. 688–695, Oct/3–6, Urbana-Champaign, USA. [14] Rumelhart, D.E. & Hinton, G.E. & Williams, R.J. (1986) Learning representations by back-propagating errors. Nature. 323(6088):533–538. [15] Brand, M. (2002) Incremental Singular Value Decomposition of uncertain data with missing values. 7th European Conference on Computer Vision (ECCV). pp. 707–720, May/28–31, Copenhagen, Denmark. [16] Smola, A.J. & Schölkopf, B. (2004) A tutorial on support vector regression. Statistics and Computing. 14(3):199–222. [17] Sabrina, T.M. & Craig, F.R. & Trepel, C. & Poldrack, R.A. (2007) The neural basis of loss aversion in decision-making under risk. American Association for the Advancement of Science. 315(5811):515–518. [18] Duncan, K.J. & Pattamadilok, C. & Knierim, I. & Devlin, Joseph T. (2009) Consistency and variability in functional localisers. NeuroImage. 46(4):1018–1026. [19] Wakeman, D.G. & Henson, R.N. (2015) A multi-subject, multi-modal human neuroimaging dataset. Scientific Data. vol. 2. [20] Walz J.M. & Goldman R.I. & Carapezza M. & Muraskin J. & Brown T.R. & Sajda P. (2013) Simultaneous EEG-fMRI reveals temporal evolution of coupling between supramodal cortical attention networks and the brainstem. Journal of Neuroscience. 33(49):19212-22. 9 | 2017 | 28 |
6,763 | Learning Hierarchical Information Flow with Recurrent Neural Modules Danijar Hafner ∗ Google Brain mail@danijar.com Alex Irpan Google Brain alexirpan@google.com James Davidson Google Brain jcdavidson@google.com Nicolas Heess Google DeepMind heess@google.com Abstract We propose ThalNet, a deep learning model inspired by neocortical communication via the thalamus. Our model consists of recurrent neural modules that send features through a routing center, endowing the modules with the flexibility to share features over multiple time steps. We show that our model learns to route information hierarchically, processing input data by a chain of modules. We observe common architectures, such as feed forward neural networks and skip connections, emerging as special cases of our architecture, while novel connectivity patterns are learned for the text8 compression task. Our model outperforms standard recurrent neural networks on several sequential benchmarks. 1 Introduction Deep learning models make use of modular building blocks such as fully connected layers, convolutional layers, and recurrent layers. Researchers often combine them in strictly layered or task-specific ways. Instead of prescribing this connectivity a priori, our method learns how to route information as part of learning to solve the task. We achieve this using recurrent modules that communicate via a routing center that is inspired by the thalamus. Warren McCulloch and Walter Pitts invented the perceptron in 1943 as the first mathematical model of neural information processing [22], laying the groundwork for modern research on artificial neural networks. Since then, researchers have continued looking for inspiration from neuroscience to identify new deep learning architectures [11, 13, 16, 31]. While some of these efforts have been directed at learning biologically plausible mechanisms in an attempt to explain brain behavior, our interest is to achieve a flexible learning model. In the neocortex, communication between areas can be broadly classified into two pathways: Direct communication and communication via the thalamus [28]. In our model, we borrow this latter notion of a centralized routing system to connect specializing neural modules. In our experiments, the presented model learns to form connection patterns that process input hierarchically, including skip connections as known from ResNet [12], Highway networks [29], and DenseNet [14] and feedback connections, which are known to both play an important role in the neocortex and improve deep learning [7, 20]. The learned connectivity structure is adapted to the task, allowing the model to trade-off computational width and depth. In this paper, we study these properties with the goal of building an understanding of the interactions between recurrent neural modules. ∗Work done during an internship with Google Brain. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. f 2 f 3 f 4 f 1 x 1 y 4 y 3 Φ (a) Module f 1 receives the task input, f 2 can be used for side computation, f 3 is trained on an auxiliary task, and f 4 produces the output for the main task. Φ 2 Φ 1 x 2 y 2 f 2 f 3 x 3 y 3 f 1 x 1 y 1 f 2 f 1 f 3 f 2 f 3 f 1 (b) Computation of 3 modules unrolled in time. One possible path of hierarchical information flow is highlighted in green. We show that our model learns hierarchical information flow, skip connections and feedback connections in Section 4. Figure 1: Several modules share their learned features via a routing center. Dashed lines are used for dynamic reading only. We define both static and dynamic reading mechanisms in Section 2.2. Section 2 defines our computational model. We point out two critical design axes, which we explore experimentally in the supplementary material. In Section 3 we compare the performance of our model on three sequential tasks, and show that it consistently outperforms multi-layer recurrent networks. In Section 4, we apply the best performing design to a language modeling task, where we observe that the model automatically learns hierarchical connectivity patterns. 2 Thalamus Gated Recurrent Modules We find inspiration for our work in the neurological structure of the neocortex. Areas of the neocortex communicate via two principal pathways: The cortico-cortico-pathway comprises direct connections between nuclei, and the cortico-thalamo-cortico comprises connections relayed via the thalamus. Inspired by this second pathway, we develop a sequential deep learning model in which modules communicate via a routing center. We name the proposed model ThalNet. 2.1 Model Definition Our system comprises a tuple of computation modules F = (f 1, · · · , f I) that route their respective features into a shared center vector Φ. An example instance of our ThalNet model is shown in Figure 1a. At every time step t, each module f i reads from the center vector via a context input ci t and an optional task input xi t. The features φi t = f i(ci t, xi t) that each module produces are directed into the center Φ.2 Output modules additionally produce task output from their feature vector as a function oi(φi) = yi. All modules send their features to the routing center, where they are merged to a single feature vector Φt = m(φ1 t, · · · , φI t ). In our experiments, we simply implement m as the concatenation of all φi. At the next time step, the center vector Φt is then read selectively by each module using a reading mechanism to obtain the context input ci t+1 = ri(Φt, φi t).3 This reading mechanism allows modules to read individual features, allowing for complex and selective reuse of information between modules. The initial center vector Φ0 is the zero vector. 2In practice, we experiment with both feed forward and recurrent implementations of the modules f i. For simplicity, we omit the hidden state used in recurrent modules in our notation. 3The reading mechanism is conditioned on both Φt and φi t separately as the merging does not preserve φi t in the general case. 2 f 2 c Φ y x φ 2 φ 3 φ 1 φ 4 × = Figure 2: The ThalNet model from the perspective of a single module. In this example, the module receives input xi and produces features to the center Φ and output yi. Its context input ci is determined as a linear mapping of the center features from the previous time step. In practice, we apply weight normalization to encourage interpretable weight matrices (analyzed in Section 4). In summary, ThalNet is governed by the following equations: Module features: φi t = f i(ci t, xi t) (1) Module output: yi t = oi(φi t) (2) Center features: Φt = m(φ1 t, · · · , φI t ) (3) Read context input: ci t+1 = ri(Φt, φi t) (4) The choice of input and output modules depends on the task at hand. In a simple scenario (e.g., single task), there is exactly one input module receiving task input, some number of side modules, and exactly one output module producing predictions. The output modules get trained using appropriate loss functions, with their gradients flowing backwards through the fully differentiable routing center into all modules. Modules can operate in parallel as reads target the center vector from the previous time step. An unrolling of the multi-step process can be seen in Figure 1b. This figure illustrates the ability to arbitrarily route between modules between time steps This suggest a sequential nature of our model, even though application to static input is possible by allowing observing the input for multiple time steps. We hypothesize that modules will use the center to route information through a chain of modules before producing the final output (see Section 4). For tasks that require producing an output at every time step, we repeat input frames to allow the model to process through multiple modules first, before producing an output. This is because communication between modules always spans a time step.4 2.2 Reading Mechanisms We now discuss implementations of the reading mechanism ri(Φ, φi) and modules f i(ci, xi), as defined in Section 2.1. We draw a distinction between static and dynamic reading mechanisms for ThalNet. For static reading, ri(Φ) is conditioned on independent parameters. For dynamic reading, ri(Φ, φi) is conditioned on the current corresponding module state, allowing the model to adapt its connectivity within a single sequence. We investigate the following reading mechanisms: • Linear Mapping. In its simplest form, static reading consists of a fully connected layer r(Φ, ·) = WΦ with weights W ∈R|c|×|Φ| as illustrated in Figure 2. This approach performs reasonably well, but can exhibit unstable learning dynamics and learns noisy weight matrices that are hard to interpret. Regularizing weights using L1 or L2 penalties does not help here since it can cause side modules to not get read from anymore. • Weight Normalization. We found linear mappings with weight normalization [26] parameterization to be effective. For this, the context input is computed as r(Φ, ·) = β W |W |Φ with scaling factor β ∈R, weights W ∈R|c|×|Φ|, and the Euclidean matrix norm |W|. 4Please refer to Graves [8] for a study of a similar approach. 3 Normalization results in interpretable weights since increasing one weight pushes other, less important, weights closer to zero, as demonstrated in Section 4. • Fast Softmax. To achieve dynamic routing, we condition the reading weight matrix on the current module features φi. This can be seen as a form of fast weights, providing a biologically plausible method for attention [2, 27]. We then apply softmax normalization to the computed weights so that each element of the context is computed as a weighted average over center elements, rather than just a weighted sum. Specifically, r(Φ, φ)(j) = e(W φ+b)(j)/P|Φ| k=1 e(W φ+b)(jk) Φ with weights W ∈R|φ|×|Φ|×|c|, and biases b ∈R|Φ|×|c|. While this allows for a different connectivity pattern at each time step, it introduces |φi + 1| × |Φ| × |ci| learned parameters per module. • Fast Gaussian. As a compact parameterization for dynamic routing, we consider choosing each context element as a Gaussian weighted average of Φ, with only mean and variance vectors learned conditioned on φi. The context input is computed as r(Φ, φ)(j) = f (1, 2, · · · , |Φ|)|(Wφ + b)(j), (Uφ + d)(j) Φ with weights W, U ∈R|c|×|φ|, biases b, d ∈R|c|, and the Gaussian density function f(x|µ, σ2). The density is evaluated for each index in Φ based on its distance from the mean. This reading mechanism only requires |φi + 1| × 2 × |ci| parameters per module and thus makes dynamic reading more practical. Reading mechanisms could also select between modules on a high level, instead of individual feature elements. We do not explore this direction since it seems less biologically plausible. Moreover, we demonstrate that such knowledge about feature boundaries is not necessary, and hierarchical information flow emerges when using fine-grained routing (see Figure 4). Theoretically, this also allows our model to perform a wider class of computations. 3 Performance Comparison We investigate the properties and performance of our model on several benchmark tasks. First, we compare reading mechanisms and module designs on a simple sequential task, to obtain a good configuration for the later experiments. Please refer to the supplementary material for the precise experiment description and results. We find that the weight normalized reading mechanism provides best performance and stability during training. We will use ThalNet models with four modules of configuration for all experiments in this section. To explore the performance of ThalNet, we now conduct experiments on three sequential tasks of increasing difficulty: • Sequential Permuted MNIST. We use images from the MNIST [19] data set, the pixels of every image by a fixed random permutation, and show them to the model as a sequence of rows. The model outputs its prediction of the handwritten digit at the last time step, so that it must integrate and remember observed information from previous rows. This delayed prediction combined with the permutation of pixels makes the task harder than the static image classification task, with a multi-layer recurrent neural network achieving ~65 % test error. We use the standard split of 60,000 training images and 10,000 testing images. • Sequential CIFAR-10. In a similar spirit, we use the CIFAR-10 [17] data set and feed images to the model row by row. We flatten the color channels of every row so that the model observes a vector of 96 elements at every time step. The classification is given after observing the last row of the image. This task is more difficult than the MNIST task, as the image show more complex and often ambiguous objects. The data set contains 50,000 training images and 10,000 testing images. • Text8 Language Modeling. This text corpus consisting of the first 108 bytes of the English Wikipedia is commonly used as a language modeling benchmark for sequential models. At every time step, the model observes one byte, usually corresponding to 1 character, encoded as a one-hot vector of length 256. The task it to predict the distribution of the next character in the sequence. Performance is measured in bits per character (BPC) computed as −1 N PN i=1 log2 p(xi). Following Cooijmans et al. [4], we train on the first 90% and evaluate performance on the following 5% of the corpus. For the two image classification tasks, we compare variations of our model to a stacked Gated Recurrent Unit (GRU) [3] network of 4 layers as baseline. The variations we compare are different 4 20 40 60 80 100 Epochs 0.5 0.6 0.7 0.8 0.9 Accuracy (%) ThalNet FF-GRU-FF ThalNet FF-GRU ThalNet FF ThalNet GRU-FF ThalNet GRU GRU Baseline Sequential Permuted MNIST Testing 20 40 60 80 100 Epochs 0.35 0.40 0.45 0.50 Accuracy (%) ThalNet GRU-FF ThalNet FF-GRU ThalNet GRU GRU Baseline ThalNet FF-GRU-FF ThalNet FF Sequential CIFAR-10 Testing 10 20 30 40 50 Epochs 1.40 1.42 1.44 1.46 Bits per character (BPC) GRU (1 step) GRU (2 steps) ThalNet (2 steps) Text8 Language Modeling Evaluation 20 40 60 80 100 Epochs 0.5 0.6 0.7 0.8 0.9 1.0 Accuracy (%) ThalNet FF-GRU ThalNet FF-GRU-FF ThalNet GRU-FF ThalNet FF ThalNet GRU GRU Baseline Sequential Permuted MNIST Training 20 40 60 80 100 Epochs 0.40 0.45 0.50 0.55 0.60 Accuracy (%) GRU Baseline ThalNet GRU ThalNet FF-GRU ThalNet GRU-FF ThalNet FF-GRU-FF ThalNet FF Sequential CIFAR-10 Training 10 20 30 40 50 Epochs 1.20 1.25 1.30 1.35 1.40 1.45 Bits per character (BPC) ThalNet (2 steps) GRU (1 step) GRU (2 steps) Text8 Language Modeling Training Figure 3: Performance on the permuted sequential MNIST, sequential CIFAR, and text8 language modeling tasks. The stacked GRU baseline reaches higher training accuracy on CIFAR, but fails to generalize well. On both tasks, ThalNet clearly outperforms the baseline in testing accuracy. On CIFAR, we see how recurrency within the modules speeds up training. The same pattern is shows for the text8 experiment, where ThalNet using 12M parameters matches the performance of the baseline with 14M parameters. The step number 1 or 2 refers to repeated inputs as discussed in Section 2. We had to smooth the graphs using a running average since the models were evaluated on testing batches on a rolling basis. choices of feed-forward layers and GRU layers for implementing the modules f i(ci, xi): We test with two fully connected layers (FF), a GRU layer (GRU), fully connected followed by GRU (FF-GRU), GRU followed by fully connected (GRU-FF), and a GRU sandwiched between fully connected layers (FF-GRU-FF).5 For all models, we pick the largest layer sizes such that the number of parameters does not exceed 50,000. Training is performed for 100 epochs on batches of size 50 using RMSProp [30] with a learning rate of 10−3. For language modeling, we simulate ThalNet for 2 steps per token, as described in Section 2 to allow the output module to read information about the current input before making its prediction. Note that on this task, our model uses only half of its capacity directly, since its side modules can only integrate longer-term dependencies from previous time steps. We run the baseline once without extra steps and once with 2 steps per token, allowing it to apply its full capacity once and twice on each token, respectively. This makes the comparison a bit difficult, but only by favouring the baseline. This suggests that architectural modifications, such as explicit skip-connections between modules, could further improve performance. The Text8 task requires larger models. We train ThalNet with 4 modules of a size 400 feed forward layer and a size 600 GRU layer each, totaling in 12 million model parameters. We compare to a standard baseline in language modeling, a single GRU with 2000 units, totaling in 14 million parameters. We train on batches of 100 sequences, each containing 200 bytes, using the Adam optimizer [15] with a default learning rate of 10−3. We scale down gradients exceeding a norm of 1. Results for 50 epochs of training are shown in Figure 3. The training took about 8 days for ThalNet with 2 steps per token, 6 days for the baseline with 2 steps per token, and 3 days for the baseline without extra steps. Figure 3 shows the training and testing and training curves for the three tasks described in this section. ThalNet outperforms standard GRU networks in all three tasks. Interestingly, ThalNet experiences a 5Note that the modules require some amount of local structure to allow them to specialize. Implementing the modules as a single fully connected layer recovers a standard recurrent neural network with one large layer. 5 much smaller gap between training and testing performance than our baseline – a trend we observed across all experimental results. On the Text8 task, ThalNet scores 1.39 BPC using 12M parameters, while our GRU baseline scores 1.41 BPC using 14M parameters (lower is better). Our model thus slightly improves on the baseline while using fewer parameters. This result places ThalNet in between the baseline and regularization methods designed for language modeling, which can also be applied to our model. The baseline performance is consistent with published results of LSTMs with similar number of parameters [18]. We hypothesize the information bottleneck at the reading mechanism acting as an implicit regularizer that encourages generalization. Compared to using one large RNN that has a lot of freedom of modeling the input-output mapping, ThalNet imposes local structure to how the input-output mapping can be implemented. In particular, it encourages the model to decompose into several modules that have stronger intra-connectivity than extra-connectivity. Thus, to some extend every module needs to learn a self-contained computation. 4 Hierarchical Connectivity Patterns Using its routing center, our model is able to learn its structure as part of learning to solve the task. In this section, we explore the emergent connectivity patterns. We show that our model learns to route features in hierarchical ways as hypothesized, including skip connections and feedback connections. For this purpose, we choose the text8 corpus, a medium-scale language modeling benchmark consisting of the first 108 bytes of Wikipedia, preprocessed for the Hutter Prize [21]. The model observes one one-hot encoded byte per time step, and is trained to predict its future input at the next time step. We use comparably small models to be able to run experiments quickly, comparing ThalNet models of 4 FF-GRU-FF modules with layer sizes 50, 100, 50 and 50, 200, 50. Both experiments use weight normalized reading. Our focus here is on exploring learned connectivity patterns. We show competitive results on the task using larger models in Section 3. We simulate two sub time steps to allow for the output module to receive information of the current input frame as discussed in Section 2. Models are trained for 50 epochs on batches of size 10 containing sequences of length 50 using RMSProp with a learning rate of 10−3. In general, we observe different random seeds converging to similar connectivity patterns with recurring elements. 4.1 Trained Reading Weights Figure 4 shows trained reading weights for various reading mechanisms, along with their connectivity graphs that were manually deduced.6 Each image represents a reading weight matrix for the modules 1 to 4 (top to bottom). Each pixel row shows the weight factors that get multiplied with Φ to produce a single element of the context vector of that module. The weight matrices thus has dimensions of |Φ| × |ci|. White pixels represent large magnitudes, suggesting focus on features at those positions. The weight matrices of weight normalized reading clearly resemble the boundaries of the four concatenated module features φ1, · · · , φ4 in the center vector Φ, even though the model has no notion of the origin and ordering of elements in the center vector. A similar structure emerges with fast softmax reading. These weight matrices are sparser than the weights from weight normalization. Over the course of a sequence, we observe some weights staying constant while others change their magnitudes at each time step. This suggests that optimal connectivity might include both static and dynamic elements. However, this reading mechanism leads to less stable training. This problem could potentially alleviated by normalizing the fast weight matrix. With fast Gaussian reading, we see that the distributions occasionally tighten on specific features in the first and last modules, the modules that receive input and emit output. The other modules learn large variance parameters, effectively spanning all center features. This could potentially be addressed by reading using mixtures of Gaussians for each context element instead. We generally find that weight normalized and fast softmax reading select features with in a more targeted way. 6Developing formal measurements for this deduction process seems beneficial in the future. 6 3 2 4 1 x y skip connection skip connection feedback connection (a) Weight Normalization 3 2 4 1 x y feedback connection skip connection (b) Fast Softmax (c) Fast Gaussian Figure 4: Reading weights learned by different reading mechanisms with 4 modules on the text8 language modeling task, alongside manually deducted connectivity graphs. We plot the weight matrices that produce the context inputs to the four modules, top to bottom. The top images show focus of the input modules, followed by side modules, and output modules at the bottom. Each pixel row gets multiplied with the center vector Φ to produce one scalar element of the context input ci. We visualize the magnitude of weights between the 5 % to the 95 % percentile. We do not include the connectivity graph for Fast Gaussian reading as its reading weights are not clearly structured. 4.2 Commonly Learned Structures The top row in Figure 4 shows manually deducted connectivity graphs between modules. Arrows represent the main direction of information flow in the model. For example, the two incoming arrows to module 4 in Figure 4a indicate that module 4 mainly attends to features produced by modules 1 and 3. We infer the connections from the larger weight magnitudes in the first and third quarters of the reading weights for module 4 (bottom row). A typical pattern that emerges during the experiments can be seen in the connectivity graphs of both weight normalized and fast softmax reading (Figures 4a and 4b). Namely, the output module reads features directly from the input module. This direction connection is established early on during training, likely because this is the most direct gradient path from output to input. Later on, the side modules develop useful features to support the input and output modules. In another pattern, one module reads from all other modules and combines their information. In Figure 4b, module 2 takes this role, reading from modules 1, 3, 4, and distributing these features via the input module. In additional experiments with more than four modules, we observed this pattern to emerge predominantly. This connection pattern provides a more efficient way of information sharing than cross-connecting all modules. Both connectivity graphs in Figure 4 include hierarchical computation paths through the modules. They include learn skip connections, which are known to improve gradient flow from popular models such as ResNet [12], Highway networks [29], and DenseNet [14]. Furthermore, the connectivity graphs contain backward connections, creating feedback loops over two or more modules. Feedback connections are known to play a critical role in the neocortex, which inspired our work [7]. 5 Related Work We describe a recurrent mixture of experts model, that learns to dynamically pass information between the modules. Related approaches can be found in various recurrent and multi-task methods as outlined in this section. 7 Modular Neural Networks. ThalNet consists of several recurrent modules that interact and exploit each other. Modularity is a common property of existing neural models. [5] learn a matrix of tasks and robot bodies to improve both multitask and transfer learning. [1] learn modules modules specific to objects present in the scene, which are selected by an object classifier. These approaches specify modules corresponding to a specific task or variable manually. In contrast, our model automatically discovers and exploits the inherent modularity of the task and does not require a one-to-one correspondence of modules to task variables. The Column Bundle model [23] consists of a central column and several mini-columns around it. While not applied to temporal data, we observe a structural similarity between our modules and the mini-columns, in the case where weights are shared among layers of the mini-columns, which the authors mention as a possibility. Learned Computation Paths. We learn the connectivity between modules alongside the task. There are various methods in the multi-task context that also connectivity between modules. Fernando et al. [6] learn paths through multiple layers of experts using an evolutionary approach. Rusu et al. [25] learn adapter connections to connect to fixed previously trained experts and exploit their information. These approaches focus on feed-forward architectures. The recurrency in our approach allows for complex and flexible computational paths. Moreover, we learn interpretable weight matrices that can be examined directly without performing costly sensitivity analysis. The Neural Programmer Interpreted presented by Reed and De Freitas [24] is related to our dynamic gating mechanisms. In their work, a network recursively calls itself in a parameterized way to perform tree-shaped computations. In comparison, our model allows for parallel computation between modules and for unrestricted connectivity patterns between modules. Memory Augmented RNNs. The center vector in our model can be interpreted as an external memory, with multiple recurrent controllers operating on it. Preceding work proposes recurrent neural networks operating on external memory structures. The Neural Turing Machine proposed by Graves et al. [9], and follow-up work [10], investigate differentiable ways to address a memory for reading and writing. In the ThalNet model, we use multiple recurrent controllers accessing the center vector. Moreover, our center vector is recomputed at each time step, and thus should not be confused with a persistent memory as is typical for model with external memory. 6 Conclusion We presented ThalNet, a recurrent modular framework that learns to pass information between neural modules in a hierarchical way. Experiments on sequential and permuted variants of MNIST and CIFAR-10 are a promising sign of the viability of this approach. In these experiments, ThalNet learns novel connectivity patterns that include hierarchical paths, skip connections, and feedback connections. In our current implementation, we assume the center features to be a vector. Introducing a matrix shape for the center features would open up ways to integrate convolutional modules and similaritybased attention mechanisms for reading from the center. While matrix shaped features are easily interpretable for visual input, it is less clear how this structure will be leveraged for other modalities. A further direction of future work is to apply our paradigm to tasks with multiple modalities for inputs and outputs. It seems natural to either have a separate input module for each modality, or to have multiple output modules that can all share information through the center. We believe this could be used to hint specialization into specific patterns and create more controllable connectivity patterns between modules. Similarly, we an interesting direction is to explore the proposed model can be leveraged to learn and remember a sequence of tasks. We believe modular computation in neural networks will become more important as researchers approach more complex tasks and employ deep learning to rich, multi-modal domains. Our work provides a step in the direction of automatically organizing neural modules that leverage each other in order to solve a wide range of tasks in a complex world. 8 References [1] J. Andreas, M. Rohrbach, T. Darrell, and D. Klein. Neural module networks. In IEEE Conference on Computer Vision and Pattern Recognition, pages 39–48, 2016. [2] J. Ba, G. E. Hinton, V. Mnih, J. Z. Leibo, and C. Ionescu. Using fast weights to attend to the recent past. In Advances in Neural Information Processing Systems, pages 4331–4339, 2016. [3] K. Cho, B. van Merriënboer, D. Bahdanau, and Y. Bengio. On the properties of neural machine translation: Encoder–decoder approaches. Syntax, Semantics and Structure in Statistical Translation, page 103, 2014. [4] T. Cooijmans, N. Ballas, C. Laurent, Ç. Gülçehre, and A. Courville. Recurrent batch normalization. arXiv preprint arXiv:1603.09025, 2016. [5] C. Devin, A. Gupta, T. Darrell, P. Abbeel, and S. Levine. Learning modular neural network policies for multi-task and multi-robot transfer. arXiv preprint arXiv:1609.07088, 2016. [6] C. Fernando, D. Banarse, C. Blundell, Y. Zwols, D. Ha, A. A. Rusu, A. Pritzel, and D. Wierstra. Pathnet: Evolution channels gradient descent in super neural networks. arXiv preprint arXiv:1701.08734, 2017. [7] C. D. Gilbert and M. Sigman. Brain states: top-down influences in sensory processing. Neuron, 54(5):677–696, 2007. [8] A. Graves. Adaptive computation time for recurrent neural networks. arXiv preprint arXiv:1603.08983, 2016. [9] A. Graves, G. Wayne, and I. Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014. [10] A. Graves, G. Wayne, M. Reynolds, T. Harley, I. Danihelka, A. Grabska-Barwi´nska, S. G. Colmenarejo, E. Grefenstette, T. Ramalho, J. Agapiou, et al. Hybrid computing using a neural network with dynamic external memory. Nature, 538(7626):471–476, 2016. [11] J. Hawkins and D. George. Hierarchical temporal memory: Concepts, theory and terminology. Technical report, Numenta, 2006. [12] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition, pages 770–778, 2016. [13] G. Hinton, A. Krizhevsky, and S. Wang. Transforming auto-encoders. Artificial Neural Networks and Machine Learning (ICANN), pages 44–51, 2011. [14] G. Huang, Z. Liu, K. Q. Weinberger, and L. van der Maaten. Densely connected convolutional networks. arXiv preprint arXiv:1608.06993, 2016. [15] D. Kingma and J. Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations, 2015. [16] J. Kirkpatrick, R. Pascanu, N. Rabinowitz, J. Veness, G. Desjardins, A. A. Rusu, K. Milan, J. Quan, T. Ramalho, A. Grabska-Barwinska, et al. Overcoming catastrophic forgetting in neural networks. Proceedings of the National Academy of Sciences, page 201611835, 2017. [17] A. Krizhevsky. Learning multiple layers of features from tiny images, 2009. [18] D. Krueger, T. Maharaj, J. Kramár, M. Pezeshki, N. Ballas, N. R. Ke, A. Goyal, Y. Bengio, H. Larochelle, A. Courville, et al. Zoneout: Regularizing rnns by randomly preserving hidden activations. arXiv preprint arXiv:1606.01305, 2016. [19] Y. LeCun and C. Cortes. The MNIST database of handwritten digits, 1998. [20] T. P. Lillicrap, D. Cownden, D. B. Tweed, and C. J. Akerman. Random synaptic feedback weights support error backpropagation for deep learning. Nature Communications, 7, 2016. 9 [21] M. Mahoney. About the test data. http://mattmahoney.net/dc/textdata, 2011. [22] W. S. McCulloch and W. Pitts. A logical calculus of the ideas immanent in nervous activity. The bulletin of mathematical biophysics, 5(4):115–133, 1943. [23] T. Pham, T. Tran, and S. Venkatesh. One size fits many: Column bundle for multi-x learning. arXiv preprint arXiv:1702.07021, 2017. [24] S. Reed and N. De Freitas. Neural programmer-interpreters. In International Conference on Learning Representations, 2015. [25] A. A. Rusu, N. C. Rabinowitz, G. Desjardins, H. Soyer, J. Kirkpatrick, K. Kavukcuoglu, R. Pascanu, and R. Hadsell. Progressive neural networks. arXiv preprint arXiv:1606.04671, 2016. [26] T. Salimans and D. P. Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. In Advances in Neural Information Processing Systems, pages 901–901, 2016. [27] J. Schmidhuber. Learning to control fast-weight memories: An alternative to dynamic recurrent networks. Neural Computation, 4(1):131–139, 1992. [28] S. M. Sherman. Thalamus plays a central role in ongoing cortical functioning. Nature neuroscience, 16(4):533–541, 2016. [29] R. K. Srivastava, K. Greff, and J. Schmidhuber. Highway networks. arXiv preprint arXiv:1505.00387, 2015. [30] T. Tieleman and G. Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural networks for machine learning, 4(2), 2012. [31] F. Zenke, B. Poole, and S. Ganguli. Improved multitask learning through synaptic intelligence. arXiv preprint arXiv:1703.04200, 2017. 10 | 2017 | 280 |
6,764 | Deanonymization in the Bitcoin P2P Network Giulia Fanti and Pramod Viswanath Abstract Recent attacks on Bitcoin’s peer-to-peer (P2P) network demonstrated that its transaction-flooding protocols, which are used to ensure network consistency, may enable user deanonymization—the linkage of a user’s IP address with her pseudonym in the Bitcoin network. In 2015, the Bitcoin community responded to these attacks by changing the network’s flooding mechanism to a different protocol, known as diffusion. However, it is unclear if diffusion actually improves the system’s anonymity. In this paper, we model the Bitcoin networking stack and analyze its anonymity properties, both pre- and post-2015. The core problem is one of epidemic source inference over graphs, where the observational model and spreading mechanisms are informed by Bitcoin’s implementation; notably, these models have not been studied in the epidemic source detection literature before. We identify and analyze near-optimal source estimators. This analysis suggests that Bitcoin’s networking protocols (both pre- and post-2015) offer poor anonymity properties on networks with a regular-tree topology. We confirm this claim in simulation on a 2015 snapshot of the real Bitcoin P2P network topology. 1 Introduction The Bitcoin cryptocurrency has seen widespread adoption, due in part to its reputation as a privacypreserving financial system [17, 22]. In practice, though, Bitcoin exhibits serious privacy vulnerabilities [3, 19, 27, 28, 24]. Most of these vulnerabilities arise because of two key properties: (1) Bitcoin associates each user with a pseudonym, and (2) pseudonyms can be linked to financial transactions through a public transaction ledger, called the blockchain [23]. If an attacker can associate a pseudonym with a human identity, the attacker may learn the user’s transaction history. In practice, there are several ways to link a user to her Bitcoin pseudonym. The most commonlystudied methods analyze transaction patterns in the public blockchain, and link those patterns using side information [3, 19, 27, 28, 24]. In this paper, we are interested in a lower-layer vulnerability: the networking stack. Like most cryptocurrencies, Bitcoin nodes communicate over a P2P network [23]. Whenever a user (Alice) generates a transaction (i.e., sends bitcoins to another user, Bob), she first creates a “transaction message” that contains her pseudonym, Bob’s pseudonym, and the transaction amount. Alice subsequently floods this transaction message over the P2P network, which enables other users to validate her transaction and incorporate it into the global blockchain. The anonymity implications of transaction broadcasting were largely ignored until recently, when researchers demonstrated practical deanonymization attacks on the P2P network [6, 15]. These attacks use a “supernode” to connect to all active Bitcoin nodes and listen to the transaction traffic they relay [15, 6, 7]. By using simple estimators to infer the source IP of each transaction broadcast, this eavesdropper adversary was able to link IP addresses to Bitcoin pseudonyms with an accuracy of up to 30% [6]. We refer to such linkage as deanonymization. Giulia Fanti (gfanti@andrew.cmu.edu) is in the ECE Department at Carnegie Mellon University. Pramod Viswanath (pramodv@illinois.edu) is in the ECE Department at the University of Illinois at UrbanaChampaign. This work was funded by NSF grant CCF-1705007. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. In 2015, the Bitcoin community responded to these attacks by changing its flooding protocols from a gossip-style protocol known as trickle spreading to a diffusion spreading protocol that spreads content with independent exponential delays [1]. We define these protocols precisely in Section 2. However, no systematic motivation was provided for this shift. Indeed, it is unclear whether the change actually defends against the deanonymization attacks in [6, 15]. Problem and contributions. The main point of our paper is to show that Bitcoin’s flooding protocols have poor anonymity properties, and the community’s shift from trickle spreading (pre-2015) to diffusion spreading (post-2015) did not help the situation. The problem of deanonymizing a user in this context is mathematically equivalent to inferring the source of a random spreading process over a graph, given partial observations of the spread. The optimal (maximum-likelihood) sourceidentification algorithms change between spreading protocols; identifying such algorithms and quantifying their accuracy is the primary focus of this work. We find that despite having different maximum-likelihood estimators, trickle and diffusion exhibit roughly the same, poor anonymity properties. Our specific contributions are threefold: (1) Modeling. We model the Bitcoin P2P network and an eavesdropper adversary, whose capabilities reflect recent practical attacks in [6, 15]. Most Bitcoin network protocols are not explicitly documented, so modeling the system requires parsing a combination of documentation, papers, and code. Several of the resulting models are new to the epidemic source detection literature. (2) Analysis of Trickle (Pre-2015). We analyze the probability of deanonymization by an eavesdropper adversary under trickle propagation. Our analysis is conducted over a regular tree-structured network. Although the Bitcoin network topology is not a regular tree, we show in Section 2 that regular trees are a reasonable first-order model. We consider graph-independent estimators (e.g., the first-timestamp estimator), as well as maximum-likelihood estimators; both are defined precisely in Section 2. Our analysis suggests that although the first-timestamp estimator performs poorly on high-degree trees, maximum-likelihood estimators achieve high probabilities of detection for trees of any degree d. (3) Analysis of Diffusion (Post-2015). We conduct a similar analysis of diffusion spreading, which was adopted in 2015 as a fix for the anonymity weaknesses observed under trickle propagation [6, 15]. The analysis of diffusion requires different theoretical tools, including nonlinear differential equations and generalized Pòlya urns. Although the analysis techniques and attack mechanisms are different, we find that the anonymity properties of diffusion are similar to those of trickle. Namely, the first-timestamp estimator’s probability of detection decays to 0 as degree d grows, but the maximum-likelihood probability of detection remains high (in particular, non-vanishing) even as d ! 1. 2 Model and related work Network model. We model the P2P network of Bitcoin nodes as a graph G(V, E), where V is the set of all server nodes and E is the set of edges, or connections, between them. Each server is represented by a (IP address, port) tuple; it can establish up to eight outgoing connections to other Bitcoin nodes [6, 2]. The resulting sparse random graph between nodes can be modeled approximately as a 16-regular graph; in practice, the average degree is closer to 8 due to nonhomogeneities across nodes [20]. The graph is locally tree-like and (approximately) regular. For this reason, regular trees are a natural class of graphs to study. In our theoretical analysis, we model G as a d-regular tree. We validate this choice by running simulations on a snapshot of the true Bitcoin network [20] (Section 5). Spreading protocols. Each transaction must be broadcast over the network; we analyze the spread of a single message originating from source node v⇤2 V . Without loss of generality, we label v⇤as node ‘0’ when iterating over nodes. At time t = 0, the message starts spreading according to one of two randomized protocols: trickle (pre-2015) or diffusion (post-2015). Trickle spreading is a gossip-based flooding protocol. Each source or relay chooses a neighboring peer (called the ‘trickle’ node) uniformly at random, every 200 ms. If the trickle node has not yet received the message, the sender forwards the message [6].1 We model this by considering a canonical, simpler spreading protocol of round-robin gossip. In round-robin gossip, each source or relay randomly orders its neighbors who have not yet seen the message; we call these uninfected neighbors. In each successive (discrete) timestep, the node transmits the message to the next neighbor 1This description omits some details of trickle spreading, which we do not consider in our analysis. For example, with probability 1/4, each relay forwards the message instantaneously to its neighbors without trickling. 2 in its ordering. Thus, if a node has d neighbors, all d neighbors will receive the message within d timesteps. This differs from trickle spreading, where the time-to-infection is a coupon collector’s problem, and therefore takes ⇥(d log d) timesteps in expectation [8]. We will henceforth abuse terminology by referring to round-robin gossip as trickle spreading. In diffusion, each source or relay node transmits the message to each of its uninfected neighbors with an independent, exponential delay of rate λ. In practice, Bitcoin uses a higher rate on outgoing edges than incoming ones [2]; we omit this distinction in our model. We assume a continuous-time system, with each node starting the exponential clocks upon receipt (or creation) of a message. For both protocols, we let Xv denote the timestamp at which node v 2 V receives a given message. Note that server nodes cannot be infected more than once. We assume the message originates at time t = 0, so Xv⇤= X0 = 0. Moreover, we let Gt(Vt, Et) denote the infected subgraph of G at time t, or the subgraph of nodes who have received the message (but not necessarily reported it to the adversary) by time t. Adversarial model. The adversary’s goal is to link a message with the source (IP address, port)—i.e., to identify the source node v⇤2 V . We consider an eavesdropper adversary, whose capabilities are modeled on the practical deanonymization attacks in [6, 15]. These attacks use a supernode that connects to most of the servers in the Bitcoin network. It can make multiple connections to each honest server, with each connection coming from a different (IP address, port). Hence, the honest server does not realize that the supernode’s connections are all from the same entity. We model this by assuming that the eavesdropper adversary makes a fixed number ✓of connections to each server, where ✓≥1. We do not include these adversarial connections in the original server graph G, so G remains a d-regular graph (see Figure 1). The supernode can learn the network structure between servers [6], so we assume that G(V, E) is known to the eavesdropper. $ ∗ Eavesdropper & = 2 ) = 3 Figure 1: The eavesdropper adversary establishes ✓links (in red) to each server. Honest servers are connected in a dregular tree topology (edges in black). The supernode in [6, 15] observes the timestamps at which messages are relayed from each honest server, without relaying or transmitting content. If the adversary maintains multiple active connections to each server (✓> 1), it receives the message ✓times from each server. We let ⌧v denote the time at which the adversary first observes the message from node v 2 V . We let ⌧= (⌧v)v2V denote the set of all observed first-timestamps. We assume timestamps are relative to time t = 0, i.e., the adversary knows when the message started spreading. Source estimation. The adversary’s goal is as follows: given the observed timestamps ⌧(up to estimation time t) and the graph G, find an estimator M(⌧, G) that outputs the true source. Our metric of success for the adversary is probability of detection, P(M(⌧, G) = v⇤), taken over the random spreading realization (captured by ⌧) and any randomness in the estimator. In [6, 15], the adversary uses a variant of the first-timestamp estimator MFT(⌧, G) = arg minv2Vt ⌧v, which outputs the first node (prior to estimation time t) to report the message to the adversary. The first-timestamp estimator requires no knowledge of the graph, and it is computationally easy to implement. We begin by analyzing this estimator for both trickle and diffusion propagation. We also consider the maximum-likelihood (ML) estimator: MML(⌧, G) = arg maxv2V P(⌧|G, v⇤= v). The ML estimator depends on the time of estimation t to the extent that ⌧only contains timestamps up to time t. Unlike the first-timestamp estimator, the ML estimator differs across spreading protocols, depends on the graph, and may be computationally intractable in general. Problem statement. Our goal is to understand whether the Bitcoin community’s move from trickle spreading to diffusion actually improved the system’s anonymity guarantees. The problem at hand is to characterize the maximum-likelihood (ML) probability of detection of the eavesdropper adversary for both trickle and diffusion processes on d-regular trees, as a function of degree d, number of corrupted connections ✓, and detection time t. We meet this goal by computing lower bounds derived from the analysis of suboptimal estimators (e.g., first-timestamp estimator and centrality-based estimators), and upper bounds derived from fundamental limits on detection. 3 Related work. Although there has been much work on the anonymity properties of Bitcoin [19, 28, 24, 27], the ‘epidemic source finding’ interpretation of Bitcoin deanonymization is fairly new. Prior work that (implicitly) adopts this interpretation has focused on Bitcoin’s protocol flaws more than the inference aspect of the problem [6, 15]. As this is the focus of our paper, we include the related source detection literature. Epidemic source detection has been widely studied under diffusion spreading with a snapshot adversary, which observes the set of infected nodes at a single time t; in our notation, the adversary would learn the set {v 2 V : Xv t} (no timestamps), along with graph G. Shah and Zaman first characterized the ML probability of detection for diffusion observed by a snapshot adversary when the underlying graph is a regular tree [29]. These results were later extended to random, irregular trees [31], whereas other authors studied heuristic source detection methods on general graphs [12, 26, 16] and related theoretical limits [32, 21, 14]. The eavesdropper adversary differs in that it eventually observes a noisy timestamp ⌧v from every node, regardless of when the node is infected. This changes both the analysis and the estimators that one can use. Another common adversarial model is the spy-based adversary, which observes exact timestamps for a corrupted set of nodes that does not include the source [25, 34]. In our notation, for a set of spies S ✓V , the spy-based adversary observes {(s, Xs) : s 2 S}. Prior work on the spy-based adversary does not characterize the ML probability of detection, but researchers have proposed efficient heuristics that perform well in practice [25, 34, 35, 9]. Unlike the spy-based adversary, the eavesdropper only observes delayed timestamps, and it does so for all nodes, including the source. 3 Analysis of trickle (pre-2015) 3.1 First-timestamp estimator The analysis of trickle propagation is complicated by its combinatorial, time-dependent nature. As such, we lower-bound the first-timestamp estimator’s probability of detection. Let ⌧m , min(⌧1, ⌧2, . . .) denote the minimum observed timestamp among nodes that are not the source. Then we compute P(⌧0 < ⌧m), i.e., the probability that the true source reports the message to the adversary strictly before any of the other nodes. This event (which causes the source to be detected with probability 1) does not include cases where the true source is one of k nodes (k > 1) that report the message to the adversary simultaneously, and before any other node in the system. Nonetheless, for large node degree d, the ‘simultaneous reporting’ event is rare, so our lower bound is close to the empirical probability of detection of the first-timestamp estimator. Theorem 3.1 (Proof in Appendix C.1) Consider a message that propagates according to trickle spreading over a d-regular tree of servers, where each node additionally has ✓connections to an eavesdropping adversary. The first-timestamp estimator’s probability of detection at time t = 1 satisfies P(MFT(⌧, G) = v⇤) ≥ ✓ d log 2 ⇥ Ei(2d log ⇢) −Ei (log ⇢) ⇤ where ⇢= d−1 d−1+✓, and Ei(x) , − R 1 −x e−tdt t denotes the exponential integral. 2 4 6 8 10 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 Theoretical lower bound log(d) / (d log(2)) Simulation Probability of Detection Tree degree, d Figure 2: First-timestamp estimator accuracy on d-regular trees when ✓= 1. We prove this bound by conditioning on the time at which the source reports to the adversary. The proof then becomes a combinatorial counting problem. The expression in Theorem 3.1 can be simplified by examining its Taylor expansion (see Appendix A). In particular, for the special case of ✓= 1 where the adversary establishes only one connection per server, line (5) simplifies to P(MFT(⌧, G)) ⇡ log d d·log 2 +o ⇣ log d d ⌘ . This suggests that the first-timestamp estimator has a probability of detection that decays to zero asymptotically as log(d)/d. Intuitively, the probability of detection should decay to zero, because the higher the degree of the tree, the higher the likelihood that a node other than the source reports to the adversary before the source does. Nonetheless, this is only a lower bound on the first-timestamp’s probability of detection, so we wish to understand how tight the bound is. 4 Simulation. To evaluate the lower bound in Theorem 3.1 and its approximation for ✓= 1, we simulate the first-timestamp estimator on regular trees.2 Figure 2 illustrates the simulation results for ✓= 1 compared to the approximation above. Each data point is averaged over 5,000 trials. Empirically, the lower bound appears to be tight, especially as d grows. Figure 2 suggest a natural solution to improve anonymity in the Bitcoin network: increase the degree of each node to reduce the adversary’s probability of detection. However, we shall see in the next section that stronger estimators (e.g., the ML estimator) may achieve high probabilities of detection, even for large d. 3.2 Maximum-likelihood estimator At any time t, if one knew the ground truth timestamps (i.e., the Xv’s), one could arrange the nodes of the infected subgraph Gt in the order they received the message. We call such an arrangement an ordering of nodes. Since propagation is in discrete time, multiple nodes may receive the message simultaneously; such nodes are lumped together in the ordering. Of course, the true ordering is not observed by the adversary, but the observed timestamps (i.e., ⌧) restrict the set of possible orderings. A feasible ordering is an ordering that respects the rules of trickle propagation over graph G, as well as the observed timestamps ⌧. In this subsection only, we will abuse notation by using ⌧to refer to all timestamps observed by the adversary, not just the first timestamp from each server. So if the adversary has ✓connections to each server, ⌧would include ✓timestamps per honest server. We propose an estimator called timestamp rumor centrality, which counts the number of feasible orderings originating from each candidate source. The candidate with the most feasible orderings is chosen as the estimator output. This estimator is similar to rumor centrality, an estimator devised for snapshot adversaries in [29]. However, the presence of timestamps and the lack of knowledge of the infected subgraph increases the estimator’s complexity. We first motivate timestamp rumor centrality. Proposition 3.2 (Proof in Appendix C.2) Consider a trickle process over a d-regular graph, where each node has ✓connections to the eavesdropper adversary. Any feasible orderings o1 and o2 with respect to observed timestamps ⌧and graph G have the same likelihood. Proposition 3.2 implies that at any fixed time, the likelihood of observing ⌧given a candidate source is proportional to the number of feasible orderings originating from that candidate source. Therefore, an ML estimator (timestamp rumor centrality) counts the number of feasible orderings at estimation time t. Timestamp rumor centrality is a message-passing algorithm that proceeds as follows: for each candidate source, recursively determine the set of feasible times when each node could have been infected, given the observed timestamps. This is achieved by passing a set of “feasible times of receipt" from the candidate source to the leaves of the largest feasible infected subtree rooted at the candidate source. In each step, nodes prune receipt times that conflict with their observed timestamps. Next, given each node’s set of feasible receipt times, they count the number of feasible orderings that obey the rules of trickle propagation. This is achieved by passing sets of partial orderings from the leaves to the candidate source, and pruning infeasible orderings. The timestamp rumor centrality protocol is presented in Appendix A.2, along with minor modifications that reduce its complexity. −2 1 −1 2 ./∗0 = 2 .10 = 2 .210 = 4 −3 5/∗0 = 0 510 = 1 570 = 3 5210 = 3 5270 = 4 3 580 = 4 $∗ Figure 3: Example of ball centrality on a line with one link to the adversary per server (these links are not shown). The estimator is run at time t = 4. In [31], precise analysis of standard rumor centrality was possible because rumor centrality can be reduced to a simple counting problem. Such an analysis is more challenging for timestamp rumor centrality, because timestamps prevent us from using the same counting argument. However, we identify a suboptimal, simplified version of timestamp rumor centrality that approaches optimal probabilities of detection as t grows. We call this estimator ball centrality. Ball centrality checks whether a candidate source v could have generated each of the observed timestamps, independently. For example, Figure 3 contains a sample spread on a line graph, where the adversary has one connection per server (not shown). Therefore, d = 2 and ✓= 1. The ground truth infection time is written as Xv below each node, and the observed timestamps are written 2Code for all simulations available at https://github.com/gfanti/bitcoin-trickle-diffusion. 5 above the node. In this figure, the estimator is run at time t = 4, so the adversary only sees three timestamps. For each observed timestamp ⌧v, the estimator creates a ball of radius ⌧v −1, centered at v. For example, in our figure, the green node (node 1) has ⌧1 = 2. Therefore, the adversary would make a ball of radius 1 centered at node 1; this ball is depicted by the green bubble in our figure. The ball represents the set of nodes that are close enough to node 1 to feasibly report to the adversary from node 1 at time ⌧1 = 2. After constructing an analogous ball for every observed timestamp in ⌧, the protocol outputs a source selected uniformly from the intersection of these balls. In our example, there are exactly two nodes in this intersection. We describe ball centrality precisely in Protocol 1 (Appendix A.2.1). Although ball centrality is not ML for a fixed time t, the following theorem lower bounds the ML probability of detection by analyzing ball centrality and showing that its probability of detection approaches a fundamental upper bound exponentially fast in detection time t. Theorem 3.3 (Proof in Section C.3) Consider a trickle spreading process over a d-regular graph of honest servers. In addition, each server has ✓independent connections to an eavesdropper adversary. The ML probability of detection at time t satisfies the following expression: 1 − d 2(✓+ d) − ✓ d ✓+ d ◆t (a) P(MML(⌧, G) = v⇤) (b) 1 − d 2(✓+ d) (1) Note that the right-hand side of equation (1) is always greater than 1 2. As such, increasing the graph degree would not significantly reduce the probability of detection; the adversary can still identify the source with probability at least 1 2 given enough time. Second, the ML probability of detection approaches its upper bound exponentially fast in time t. This suggests that the adversary can achieve high probabilities of detection at small times t. These results highlight an important point: estimators that exploit graph structure can reap significant, order-level gains in accuracy. 4 Analysis of diffusion (post-2015) 4.1 First-timestamp estimator Although the first-timestamp estimator does not use knowledge of the underlying graph, its performance depends on the underlying graph structure. The following theorem exactly characterizes its probability of detection on a regular tree as t ! 1. Theorem 4.1 (Proof in Appendix C.4) Consider a diffusion process of rate λ = 1 over a d-regular tree, d > 2. Suppose an adversary observes each node’s infection time with an independent, exponential delay of rate λ2 = ✓, ✓≥1. Then the following expression describes the probability of detection for the first-timestamp estimator at time t = 1: P(MFT(⌧, G) = v⇤) = ✓ d−2 log ( d+✓−2 ✓ ) . The proof expresses the probability of detection as a nonlinear differential equation that can be solved exactly. The expression highlights a few points: First, for a fixed degree d, the probability of detection is strictly positive as t ! 1. This is straightforward to see, but under other adversarial models (e.g., snapshot adversaries) it is not trivial to see that the probability of detection is positive as t ! 1. Indeed, several papers are dedicated to making that point [30, 31]. Second, when ✓= 1, i.e., the adversary has only one connection per node, the probability of detection approaches log(d)/d asymptotically in d. This quantity tends to 0 as d ! 1, and it is order-equal to the probability of detection of the first-timestamp adversary on the trickle protocol when ✓= 1 (see Section 3.1). Theorem 4.1 suggests that the Bitcoin community’s transition from trickle spreading to diffusion does not provide order-level anonymity gains (asymptotically in the degree of the graph), at least for the first-timestamp adversary. Next, we ask if the same is true for estimators that use the graph structure. 4.2 Centrality-based estimators We compute a different lower bound on the ML probability of detection by analyzing a centralitybased estimator. Unlike the first-timestamp estimator, this reporting centrality estimator uses the structure of the infected subgraph by selecting a candidate source that is close to the center (on the graph) of the observed timestamps. However, it does not explicitly use the observed timestamps. Also unlike the first-timestamp estimator, this centrality-based estimator improves as the degree d 6 of the underlying tree increases, with a strictly positive probability of detection as d ! 1. Thus the eavesdropper adversary has an ML probability of detection that scales as ⇥(1) in d. Intuitively, reporting centrality works as follows: for each candidate source v, the estimator counts the number of nodes that have reported to the adversary from each of the node v’s adjacent subtrees. It picks a candidate source for which the number of reporting nodes is approximately equal in each subtree. To make this precise, suppose the infected subtree Gt is rooted at w; we use T w v to denote the subtree of Gt that contains v and all of v’s descendants, with respect to root node w. Consider a random variable Yv(t), which is 1 if node v 2 V has reported to the adversary by time t, and 0 otherwise. We let YT w v (t) = P u2T w v Yu(t) denote the number of nodes in T w v that have reported to the adversary by time t. We use Y (t) = P v2Vt Yv(t) to denote the total number of reporting nodes in Gt at time t. Similarly, we use NT w v (t) to denote the number of infected nodes in T w v (so NT w v (t) ≥YT w v (t)), and we let N(t) denote the total number of infected nodes at time t (N(t) ≥Y (t)). For each candidate source v, we consider its d neighbors, which comprise the set N(v). We define a node v’s reporting centrality at time t—denoted Rv(t)—as follows: Rv(t) = ( 1 if maxu2N (v) YT v u (t) < Y (t) 2 0 otherwise. (2) That is, a node’s reporting centrality is 1 iff each of its adjacent subtrees has fewer than Y (t)/2 reporting nodes. A node is a reporting center iff its reporting centrality is 1. $∗ # Rv⇤(t) = 1 Rw(t) = 0 Y (t) = 5 N(t) = 7 Figure 4: Yellow nodes are infected; a red outline means the node has reported. Rv⇤(t) = 1 since v⇤’s adjacent subtrees have Y (t)/2 = 2.5 reporting nodes. The estimator outputs ˆv chosen uniformly from all reporting centers. In Figure 4, v⇤is the only reporting center. Reporting centrality does not use the adversary’s observed timestamps—it only counts the number of reporting nodes in each of a node’s adjacent subtrees. This estimator is inspired by rumor centrality [30], an ML estimator for the source of a diffusion process under a snapshot adversary. Recall that a snapshot adversary sees the infected subgraph Gt at time t, but it does not learn timestamp information. The next theorem shows that for trees with high degree d, reporting centrality has a strictly higher (in an order sense) probability of detection than the first-timestamp estimator; its probability of detection is strictly positive as d ! 1. Theorem 4.2 (Proof in Section C.5) Consider a diffusion process of rate λ = 1 over a d-regular tree. Suppose this process is observed by an eavesdropper adversary, which sees each node’s timestamp with an independent exponential delay of rate λ2 = ✓, ✓≥1. Then the reporting centrality estimator has a (time-dependent) probability of detection P(MRC(⌧, G) = v⇤) that satisfies lim inft!1 P(MRC(⌧, G) = v⇤) ≥Cd > 0. where Cd = 1 −d ⇣ 1 −I1/2 ⇣ 1 d−2, 1 + 1 d−2 ⌘⌘ is a constant that depends only on degree d, and I1/2(a, b) is the regularized incomplete Beta function, i.e., the probability a Beta random variable with parameters a and b takes a value in [0, 1 2). To prove this, we relate two Pòlya urn processes: one that represents the diffusion process over the regular tree of honest nodes, and one that describes the full spreading process, which includes both diffusion over the regular tree and random reporting to the adversary. The first urn can be posed as a classic Pòlya urn [10], which has been studied in the context of diffusion [31, 14]. The second urn can be described by an unbalanced generalized Pòlya urn (GPU) with negative coefficients [4, 13]—a class of urns that does not typically appear in the study of diffusion (to the best of our knowledge). As a side note, this approach can be used to analyze other epidemic source-finding problems that have previously evaded analysis, as we show in Appendix B. Notice that the constant Cd in Theorem 4.2 does not depend on ✓—this is because the reporting centrality estimator makes no use of timestamp information, so the delays in the timestamps ⌧do not affect the estimator’s asymptotic behavior. Simulation results. To evaluate the lower bound in Theorem 4.2, we simulate reporting centrality on diffusion over regular trees. Figure 5 illustrates the empirical performance of reporting centrality averaged over 4,000 trials, compared to the theoretical lower bound on the liminf. The estimator is 7 2 3 4 5 6 7 8 9 10 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 First-timestamp, theoretical First-timestamp, simulated Reporting centrality, theoretical Reporting centrality, simulated Degree, d Prob. of Detection Figure 5: First-timestamp vs. reporting centrality on diffusion over regular trees, theoretically and simulated. ✓= 1, t = d+2. 0 5 10 15 20 0.4 0.5 0.6 0.7 0.8 0.9 Trickle, Theoretical (Lower bound) Trickle, Simulated (Lower bound) Trickle, Simulated (Exact) Diffusion, Theoretical Diffusion, Simulated Eavesdropper connections, ✓ Prob. of Detection Figure 6: Comparison of trickle and diffusion under the first-timestamp estimator on 4-regular trees. 0 5 10 15 20 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Trickle, Theoretical lower bound Trickle, Simulated Trickle, Theoretical lower bound (d=2) Diffusion, Theoretical Diffusion, Simulation Eavesdropper connections, ✓ Prob. of Detection Figure 7: Trickle vs. diffusion under the first-timestamp estimator, simulated on a snapshot of the real Bitcoin network [20]. Table 1: Probability of detection on a d-regular tree. The adversary has ✓connections per server. Trickle Diffusion FirstTimestamp All ✓ ✓[Ei(2d log ⇢)−Ei(log ⇢)] d log 2 (Thm 3.1) ✓ d−2 log ( d+✓−2 ✓ ) (Thm. 4.1) ✓= 1 log(d) d log(2) + o ⇣ log d d ⌘ (Sec. 3.1) log(d−1) (d−2) (Thm. 4.1) MaximumLikelihood All ✓ 1 − d 2(✓+d) (Thm 3.3) 1 −d ⇣ 1 −I1/2 ⇣ 1 d−2, 1 + 1 d−2 ⌘⌘ ✓= 1 1 − d 2(d+1) (Thm. 3.3) (Thm. 4.2) run at time t = d + 2. Our simulations are run up to degree d = 5 due to computational constraints, since the infected subgraph grows exponentially in the degree of the tree. By d = 5, reporting centrality reaches the theoretical lower bound on the limiting detection probability. For diffusion, neither lower bound on the first-timestamp or reporting centrality estimator strictly outperforms the other. Figure 5 compares the two estimators as a function of degree d. We observe that reporting centrality outstrips first-timestamp estimation for trees of degree 9 and higher; since our theoretical result is only a lower bound on the performance of reporting centrality, the transition may occur at even smaller d. Empirically, the true Bitcoin graph is approximately 8-regular [20], a regime in which we expect reporting centrality to perform similarly to the first-timestamp estimator. 5 Discussion Table 1 summarizes our theoretical results for trickle and diffusion. The probabilities of detection for trickle and diffusion are similar, particularly when ✓= 1. Although the maximum-likelihood results are difficult to compare visually, they both approach a positive constant as d, t ! 1; for trickle propagation, that constant is 1 2, whereas for diffusion, it is approximately 0.307. These results are asymptotic in degree d. In practice, the underlying Bitcoin graph is fixed; the only variable quantity is the adversary’s resources, represented by ✓. Figure 6 compares analytical expressions and simulations for 4-regular trees under the first-timestamp estimator (as we lack an ML estimator on general graphs), as a function of ✓. It suggests nearly identical detection probabilities for diffusion and trickle on regular trees; while our theoretical prediction for diffusion is exact, our lower bound on trickle is loose since d is small. To validate our decision to analyze regular trees, we simulate trickle and diffusion on a 2015 snapshot of the Bitcoin network [20]. Figure 7 compares these results as a function of ✓, for the first-timestamp estimator. Unless specified otherwise, theoretical curves are calculated for a regular tree with d = 8, the mean degree of our dataset. Diffusion performs close to the theoretical prediction; this is because with high probability, the first-timestamp estimator uses only on a local neighborhood to estimate v⇤, and the Bitcoin graph is locally tree-like. However, our trickle lower bound remains loose. This is partially due to simultaneous reporting events, but the main contributing factor seems to be graph irregularity. Understanding this effect more carefully is an interesting question for future work. 8 In summary, trickle and diffusion have similar probabilities of detection, both in an asymptotic-order sense and numerically. We have analyzed the canonical class of d-regular trees and simulated these protocols on a real Bitcoin graph topology. Our results omit certain details of the spreading protocols, (Sec. 2); extending the analysis to include these details is practically relevant. References [1] Bitcoin core commit 5400ef6. https://github.com/bitcoin/bitcoin/commit/ 5400ef6bcb9d243b2b21697775aa6491115420f3. [2] Bitcoin core integration/staging tree. https://github.com/bitcoin/bitcoin. [3] Elli Androulaki, Ghassan O Karame, Marc Roeschlin, Tobias Scherer, and Srdjan Capkun. Evaluating user privacy in bitcoin. In International Conference on Financial Cryptography and Data Security, pages 34–51. Springer, 2013. [4] Krishna B Athreya and Peter E Ney. Branching processes, volume 196. Springer Science & Business Media, 2012. [5] Carl M Bender and Steven A Orszag. Advanced mathematical methods for scientists and engineers I. Springer Science & Business Media, 1999. [6] Alex Biryukov, Dmitry Khovratovich, and Ivan Pustogarov. Deanonymisation of clients in bitcoin p2p network. In Proceedings of the 2014 ACM SIGSAC Conference on Computer and Communications Security, pages 15–29. ACM, 2014. [7] Alex Biryukov and Ivan Pustogarov. Bitcoin over tor isn’t a good idea. In 2015 IEEE Symposium on Security and Privacy, pages 122–134. IEEE, 2015. [8] Arnon Boneh and Micha Hofri. The coupon-collector problem revisited?a survey of engineering problems and computational methods. Stochastic Models, 13(1):39–66, 1997. [9] Zhen Chen, Kai Zhu, and Lei Ying. Detecting multiple information sources in networks under the sir model. IEEE Transactions on Network Science and Engineering, 3(1):17–31, 2016. [10] Florian Eggenberger and George Pólya. Über die statistik verketteter vorgänge. ZAMM-Journal of Applied Mathematics and Mechanics/Zeitschrift für Angewandte Mathematik und Mechanik, 3(4):279–289, 1923. [11] G. Fanti, P. Kairouz, S. Oh, K. Ramchandran, and P. Viswanath. Metadata-aware anonymous messaging. In ICML, 2015. [12] V. Fioriti and M. Chinnici. Predicting the sources of an outbreak with a spectral technique. arXiv:1211.2333, 2012. [13] Svante Janson. Functional limit theorems for multitype branching processes and generalized pólya urns. Stochastic Processes and their Applications, 110(2):177–245, 2004. [14] Justin Khim and Po-Ling Loh. Confidence sets for the source of a diffusion in regular trees. arXiv preprint arXiv:1510.05461, 2015. [15] Philip Koshy, Diana Koshy, and Patrick McDaniel. An analysis of anonymity in bitcoin using p2p network traffic. In International Conference on Financial Cryptography and Data Security, pages 469–485. Springer, 2014. [16] A. Y. Lokhov, M. Mézard, H. Ohta, and L. Zdeborová. Inferring the origin of an epidemic with dynamic message-passing algorithm. arXiv preprint arXiv:1303.5315, 2013. [17] Paul Mah. Top 5 vpn services for personal privacy and security, 2016. http://www.cio.com/article/3152904/security/ top-5-vpn-services-for-personal-privacy-and-security.html. [18] Hosam Mahmoud. Pólya urn models. CRC press, 2008. 9 [19] Sarah Meiklejohn, Marjori Pomarole, Grant Jordan, Kirill Levchenko, Damon McCoy, Geoffrey M Voelker, and Stefan Savage. A fistful of bitcoins: characterizing payments among men with no names. In Proceedings of the 2013 conference on Internet measurement conference, pages 127–140. ACM, 2013. [20] Andrew Miller, James Litton, Andrew Pachulski, Neal Gupta, Dave Levin, Neil Spring, and Bobby Bhattacharjee. Discovering bitcoins public topology and influential nodes, 2015. [21] Chris Milling, Constantine Caramanis, Shie Mannor, and Sanjay Shakkottai. Network forensics: random infection vs spreading epidemic. ACM SIGMETRICS Performance Evaluation Review, 40(1):223–234, 2012. [22] David Z. Morris. Legal sparring continues in bitcoin user?s battle with irs tax sweep, 2017. http://fortune.com/2017/01/01/bitcoin-irs-tax-sweep-user-battle/. [23] Satoshi Nakamoto. Bitcoin: A peer-to-peer electronic cash system, 2008. [24] Micha Ober, Stefan Katzenbeisser, and Kay Hamacher. Structure and anonymity of the bitcoin transaction graph. Future internet, 5(2):237–250, 2013. [25] P. C. Pinto, P. Thiran, and M. Vetterli. Locating the source of diffusion in large-scale networks. Physical review letters, 109(6):068702, 2012. [26] B. A. Prakash, J. Vreeken, and C. Faloutsos. Spotting culprits in epidemics: How many and which ones? In ICDM, volume 12, pages 11–20, 2012. [27] Fergal Reid and Martin Harrigan. An analysis of anonymity in the bitcoin system. In Security and privacy in social networks, pages 197–223. Springer, 2013. [28] Dorit Ron and Adi Shamir. Quantitative analysis of the full bitcoin transaction graph. In International Conference on Financial Cryptography and Data Security, pages 6–24. Springer, 2013. [29] D. Shah and T. Zaman. Detecting sources of computer viruses in networks: theory and experiment. In ACM SIGMETRICS Performance Evaluation Review, volume 38, pages 203– 214. ACM, 2010. [30] D. Shah and T. Zaman. Rumors in a network: Who’s the culprit? Information Theory, IEEE Transactions on, 57:5163–5181, Aug 2011. [31] D. Shah and T. Zaman. Rumor centrality: a universal source detector. In ACM SIGMETRICS Performance Evaluation Review, volume 40, pages 199–210. ACM, 2012. [32] Z. Wang, W. Dong, W. Zhang, and C.W. Tan. Rumor source detection with multiple observations: Fundamental limits and algorithms. In ACM SIGMETRICS, 2014. [33] Eric W Weisstein. Euler-mascheroni constant. 2002. [34] K. Zhu and L. Ying. A robust information source estimator with sparse observations. arXiv preprint arXiv:1309.4846, 2013. [35] Kai Zhu and Lei Ying. A robust information source estimator with sparse observations. Computational Social Networks, 1(1):1, 2014. 10 | 2017 | 281 |
6,765 | Learning with Average Top-k Loss Yanbo Fan3,4,1 , Siwei Lyu1∗, Yiming Ying2 , Bao-Gang Hu3,4 1Department of Computer Science, University at Albany, SUNY 2Department of Mathematics and Statistics, University at Albany, SUNY 3National Laboratory of Pattern Recognition, CASIA 4University of Chinese Academy of Sciences (UCAS) {yanbo.fan,hubg}@nlpr.ia.ac.cn, slyu@albany.edu, yying@albany.edu Abstract In this work, we introduce the average top-k (ATk) loss as a new aggregate loss for supervised learning, which is the average over the k largest individual losses over a training dataset. We show that the ATk loss is a natural generalization of the two widely used aggregate losses, namely the average loss and the maximum loss, but can combine their advantages and mitigate their drawbacks to better adapt to different data distributions. Furthermore, it remains a convex function over all individual losses, which can lead to convex optimization problems that can be solved effectively with conventional gradient-based methods. We provide an intuitive interpretation of the ATk loss based on its equivalent effect on the continuous individual loss functions, suggesting that it can reduce the penalty on correctly classified data. We further give a learning theory analysis of MATk learning on the classification calibration of the ATk loss and the error bounds of ATk-SVM. We demonstrate the applicability of minimum average top-k learning for binary classification and regression using synthetic and real datasets. 1 Introduction Supervised learning concerns the inference of a function f : X 7→Y that predicts a target y ∈Y from data/features x ∈X using a set of labeled training examples {(xi, yi)}n i=1. This is typically achieved by seeking a function f that minimizes an aggregate loss formed from individual losses evaluated over all training samples. To be more specific, the individual loss for a sample (x, y) is given by ℓ(f(x), y), in which ℓis a nonnegative bivariate function that evaluates the quality of the prediction made by function f. For example, for binary classification (i.e., yi ∈{±1}), commonly used forms for individual loss include the 0-1 loss, Iyf(x)≤0, which is 1 when y and f(x) have different sign and 0 otherwise, the hinge loss, max(0, 1 −yf(x)), and the logistic loss, log2(1 + exp(−yf(x))), all of which can be further simplified as the so-called margin loss, i.e., ℓ(y, f(x)) = ℓ(yf(x)). For regression, squared difference (y −f(x))2 and absolute difference |y −f(x)| are two most popular forms for individual loss, which can be simplified as ℓ(y, f(x)) = ℓ(|y −f(x)|). Usually the individual loss is chosen to be a convex function of its input, but recent works also propose various types of non-convex individual losses (e.g., [10, 15, 27, 28]). The supervised learning problem is then formulated as minf {L(Lz(f)) + Ω(f)}, where L(Lz(f)) is the aggregate loss accumulates all individual losses over training samples, i.e., Lz(f) = {ℓi(f)}n i=1, with ℓi(f) being the shorthand notation for ℓ(f(xi), yi), and Ω(f) is the regularizer on f. However, in contrast to the plethora of the types of individual losses, there are only a few choices when we consider the aggregate loss: ∗Corresponding author. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. -1 0 1 2 3 -1 0 1 2 3 Classification Boundary 1 10 100 200 k 0 0.02 0.04 0.06 0.08 0.1 Misclassification Rate -1 0 1 2 3 -1 0 1 2 3 Classification Boundary 1 10 100 200 k 0 0.005 0.01 0.015 0.02 0.025 0.03 Misclassification Rate -1 0 1 2 3 -1 0 1 2 3 Classification Boundary 1 10 100 200 k 0 0.005 0.01 0.015 0.02 0.025 Misclassification Rate -1 0 1 2 3 -1 0 1 2 3 Classification Boundary 1 10 100 200 k 0 0.005 0.01 0.015 0.02 0.025 Misclassification Rate Figure 1: Comparison of different aggregate losses on 2D synthetic datasets with n = 200 samples for binary classification on a balanced but multi-modal dataset and with outliers (top) and an imbalanced dataset with outliers (bottom) with logistic loss (left) and hinge loss (right). Outliers in data are shown as an enlarged × and the optimal Bayes classifications are shown as shaded areas. The figures in the second and fourth columns show the misclassification rate of ATk vs. k for each case. • the average loss: Lavg(Lz(f)) = 1 n Pn i=1 ℓi(f), i.e., the mean of all individual losses; • the maximum loss: Lmax(Lz(f)) = max1≤k≤n ℓi(f), i.e., the largest individual loss; • the top-k loss [20]: Ltop-k(Lz(f)) = ℓ[k](f)2 for 1 ≤k ≤n, i.e., the k-th largest (top-k) individual loss. The average loss is unarguably the most widely used aggregate loss, as it is a unbiased approximation to the expected risk and leads to the empirical risk minimization in learning theory [1, 7, 22, 25, 26]. Further, minimizing the average loss affords simple and efficient stochastic gradient descent algorithms [3, 21]. On the other hand, the work in [20] shows that constructing learning objective based on the maximum loss may lead to improved performance for data with separate typical and rare subpopulations. The top-k loss [20] generalizes the maximum loss, as Lmax(Lz(f)) = Ltop-1(Lz(f)), and can alleviate the sensitivity to outliers of the latter. However, unlike the average loss or the maximum loss, the top-k loss in general does not lead to a convex learning objective, as it is not convex of all the individual losses Lz(f). In this work, we propose a new type of aggregate loss that we term as the average top-k (ATk) loss, which is the average of the largest k individual losses, that is defined as: Lavt-k(Lz(f)) = 1 k Pk i=1 ℓ[i](f). (1) We refer to learning objectives based on minimizing the ATk loss as MATk learning. The ATk loss generalizes the average loss (k = n) and the maximum loss (k = 1), yet it is less susceptible to their corresponding drawbacks, i.e., it is less sensitive to outliers than the maximum loss and can adapt to imbalanced and/or multi-modal data distributions better than the average loss. This is illustrated with two toy examples of synthesized 2D data for binary classification in Fig.1 (see supplementary materials for a complete illustration). As these plots show, the linear classifier obtained with the maximum loss is not optimal due to the existence of outliers while the linear classifier corresponding to the average loss has to accommodate the requirement to minimize individual losses across all training data, and sacrifices smaller sub-clusters of data (e.g., the rare population of + class in the top row and the smaller dataset of −class in the bottom row). In contrast, using ATk loss with k = 10 can better protect such smaller sub-clusters and leads to linear classifiers closer to the optimal Bayesian linear classifier. This is also corroborated by the plots of corresponding misclassification rate of ATk vs. k value in Fig.1, which show that minimum misclassification rates occur at k value other than 1 (maximum loss) or n (average loss). The ATk loss is a tight upper-bound of the top-k loss, as Lavt-k(Lz(f)) ≥Ltop-k(Lz(f)) with equality holds when k = 1 or ℓi(f) = constant, and it is a convex function of the individual losses (see Section 2). Indeed, we can express ℓ[k](f) as the difference of two convex functions kLavt-k(Lz(f))−(k−1)Lavt-(k−1)(Lz(f)), which shows that in general Ltop-k(Lz(f)) is not convex with regards to the individual losses. 2We define the top-k element of a set S = {s1, · · · , sn} as s[k], such that s[1] ≥s[2] ≥· · · ≥s[n]. 2 In sequel, we will provide a detailed analysis of the ATk loss and MATk learning. First, we establish a reformulation of the ATk loss as the minimum of the average of the individual losses over all training examples transformed by a hinge function. This reformulation leads to a simple and effective stochastic gradient-based algorithm for MATk learning, and interprets the effect of the ATk loss as shifting down and truncating at zero the individual loss to reduce the undesirable penalty on correctly classified data. When combined with the hinge function as individual loss, the ATk aggregate loss leads to a new variant of SVM algorithm that we term as ATk SVM, which generalizes the C-SVM and the ν-SVM algorithms [19]. We further study learning theory of MATk learning, focusing on the classification calibration of the ATk loss function and error bounds of the ATk SVM algorithm. This provides a theoretical lower-bound for k for reliable classification performance. We demonstrate the applicability of minimum average top-k learning for binary classification and regression using synthetic and real datasets. The main contributions of this work can be summarized as follows. • We introduce the ATk loss for supervised learning, which can balance the pros and cons of the average and maximum losses, and allows the learning algorithm to better adapt to imbalanced and multi-modal data distributions. • We provide algorithm and interpretation of the ATk loss, suggesting that most existing learning algorithms can take advantage of it without significant increase in computation. • We further study the theoretical aspects of ATk loss on classification calibration and error bounds of minimum average top-k learning for ATk-SVM. • We perform extensive experiments to validate the effectiveness of the MATk learning. 2 Formulation and Interpretation The original ATk loss, though intuitive, is not convenient to work with because of the sorting procedure involved. This also obscures its connection with the statistical view of supervised learning as minimizing the expectation of individual loss with regards to the underlying data distribution. Yet, it affords an equivalent form, which is based on the following result. Lemma 1 (Lemma 1, [16]). Pk i=1 x[i] is a convex function of (x1, · · · , xn). Furthermore, for xi ≥0 and i = 1, · · · , n, we have Pk i=1 x[i] = minλ≥0 kλ + Pn i=1 [xi −λ]+ , where [a]+ = max{0, a} is the hinge function. For completeness, we include a proof of Lemma 1 in supplementary materials. Using Lemma 1, we can reformulate the ATk loss (1) as Lavt-k(Lz(f)) = 1 k k X i=1 ℓ[i](f) ∝min λ≥0 ( 1 n n X i=1 [ℓi(f) −λ]+ + k nλ ) . (2) In other words, the ATk loss is equivalent to minimum of the average of individual losses that are shifted and truncated by the hinge function controlled by λ. This sheds more lights on the ATk loss, which is particularly easy to illustrate in the context of binary classification using the margin losses, ℓ(f(x), y) = ℓ(yf(x)). In binary classification, the “gold standard” of individual loss is the 0-1 loss Iyf(x)≤0, which exerts a constant penalty 1 to examples that are misclassified by f and no penalty to correctly classified examples. However, the 0-1 loss is difficult to work as it is neither continuous nor convex. In practice, it is usually replaced by a surrogate convex loss. Such convex surrogates afford efficient algorithms, but as continuous and convex upper-bounds of the 0-1 loss, they typically also penalize correctly classified examples, i.e., for y and x that satisfy yf(x) > 0, ℓ(yf(x)) > 0, whereas Iyf(x)≤0 = 0 (Fig.2). This implies that when the average of individual losses across all training examples is minimized, correctly classified examples by f that are “too close” to the classification boundary may be sacrificed to accommodate reducing the average loss, as is shown in Fig.1. In contrast, after the individual loss is combined with the hinge function, i.e., [ℓ(yf(x)) −λ]+ with λ > 0, it has the effect of “shifting down” the original individual loss function and truncating it at zero, see Fig.2. The transformation of the individual loss reduces penalties of all examples, and in particular benefits correctly classified data. In particular, if such examples are “far enough” from the decision boundary, like in the 0-1 loss, their penalty becomes zero. This alleviates the likelihood of misclassification on those rare sub-populations of data that are close to the decision boundary. 3 -1.5 -1 -0.5 0 0.5 1 1.5 0 0.5 1 1.5 2 2.5 3 Loss Figure 2: The ATk loss interpreted at the individual loss level. Shaded area corresponds to data/target with correct classification. Algorithm: The reformulation of the ATk loss in Eq.(2) also facilitates development of optimization algorithms for the minimum ATk learning. As practical supervised learning problems usually use a parametric form of f, as f(x; w), where w is the parameter, the corresponding minimum ATk objective becomes min w,λ≥0 ( 1 n n X i=1 [ℓ(f(xi; w), yi) −λ]+ + k nλ + Ω(w) ) , (3) It is not hard to see that if ℓ(f(x; w), y) is convex with respect to w, the objective function of in Eq.(3) is a convex function for w and λ jointly. This leads to an immediate stochastic (projected) gradient descent [3, 21] for solving (3). For instance, with Ω(w) = 1 2C ∥w∥2, where C > 0 is a regularization factor, at the t-th iteration, the corresponding MATk objective can be minimized by first randomly sampling (xit, yit) from the training set and then updating the parameters as w(t+1) ←w(t) −ηt ∂wℓ(f(xit; w(t)), yit) · I[ℓ(f(xit;w(t)),yit)>λ(t)] + w(t) C λ(t+1) ← h λ(t) −ηt k n −I[ℓ(f(xit;w(t),yit)>λ(t)] i + (4) where ∂wℓ(f(x; w), y) denotes the sub-gradient with respect to w, and ηt ∼ 1 √ t is the step size. ATk-SVM: As a general aggregate loss, the ATk loss can be combined with any functional form for individual losses. In the case of binary classification, the ATk loss combined with the individual hinge loss for a prediction function f from a reproducing kernel Hilbert space (RKHS) [18] leads to the ATk-SVM model. Specifically, we consider function f as a member of RKHS HK with norm ∥· ∥K, which is induced from a reproducing kernel K : X × X →R. Using the individual hinge loss, [1 −yif(xi)]+, the corresponding MATk learning objective in RKHS becomes min f∈HK,λ≥0 1 n n X i=1 [1 −yif(xi)]+ −λ + + k nλ + 1 2C ∥f∥2 K, (5) where C > 0 is the regularization factor. Furthermore, the outer hinge function in (5) can be removed due to the following result. Lemma 2. For a ≥0, b ≥0, there holds [a −ℓ]+ −b + = [a −b −ℓ]+. Proof of Lemma 2 can be found in the supplementary materials. In addition, note that for any minimizer (fz, λz) of (5), setting f(x) = 0, λ = 1 in the objective function of (5), we have k nλz ≤ 1 n Pn i=1 [1 −yifz(xi)]+ −λz + + k nλz + 1 2C ∥fz∥2 K ≤k n, so we have 0 ≤λz ≤1 which means that the minimization can be restricted to 0 ≤λ ≤1. Using these results and introducing ρ = 1−λ, Eq.(5) can be rewritten as min f∈HK,0≤ρ≤1 1 n n X i=1 [ρ −yif(xi)]+ −k nρ + 1 2C ∥f∥2 K. (6) The ATk-SVM objective generalizes many several existing SVM models. For example, when k = n, it equals to the standard C-SVM [5]. When C = 1 and with conditions K(xi, xi) ≤1 for any i, ATk-SVM reduces to ν-SVM [19] with ν = k n. Furthermore, similar to the conventional SVM model, writing in the dual form of (6) can lead to a convex quadratic programming problem that can be solved efficiently. See supplementary materials for more detailed explanations. Choosing k. The number of top individual losses in the ATk loss is a critical parameter that affects the learning performance. In concept, using ATk loss will not be worse than using average or maximum losses as they correspond to specific choices of k. In practice, k can be chosen during training from a validation dataset as the experiments in Section 4. As k is an integer, a simple grid search usually suffices to find a satisfactory value. Besides, Theorem 1 in Section 3 establishes a theoretical lower bound for k to guarantee reliable classification based on the Bayes error. If we have information about the proportion of outliers, we can also narrow searching space of k based on the fact that ATk loss is the convex upper bound of the top-k loss, which is similar to [20]. 4 3 Statistical Analysis In this section, we address the statistical properties of the ATk objective in the context of binary classification. Specifically, we investigate the property of classification calibration [1] of the ATk general objective, and derive bounds for the misclassification error of the ATk-SVM model in the framework of statistical learning theory (e.g. [1, 7, 23, 26]). 3.1 Classification Calibration under ATk Loss We assume the training data z = {(xi, yi)}n i=1 are i.i.d. samples from an unknown distribution p on X ×{±1}. Let pX be the marginal distribution of p on the input space X. Then, the misclassification error of a classifier f : X →{±1} is denoted by R(f) = Pr(y ̸= f(x)) = E[Iyf(x)≤0]. The Bayes error is given by R∗= inff R(f), where the infimum is over all measurable functions. No function can achieve less risk than the Bayes rule fc(x) = sign(η(x) −1 2), where η(x) = Pr(y = 1|x) [8]. In practice, one uses a surrogate loss ℓ: R →[0, ∞) which is convex and upper-bound the 0-1 loss. The population ℓ-risk (generalization error) is given by Eℓ(f) = E[ℓ(yf(x))]. Denote the optimal ℓ-risk by E∗ ℓ= inff Eℓ(f). A very basic requirement for using such a surrogate loss ℓis the so-called classification calibration (point-wise form of Fisher consistency) [1, 14]. Specifically, a loss ℓis classification calibrated with respect to distribution p if, for any x, the minimizer f ∗ ℓ= inff Eℓ(f) should have the same sign as the Bayes rule fc(x), i.e., sign(f ∗ ℓ(x)) = sign(fc(x)) whenever fc(x) ̸= 0. An appealing result concerning the classification calibration of a loss function ℓwas obtained in [1], which states that ℓis classification calibrated if ℓis convex, differentiable at 0 and ℓ′(0) < 0. In the same spirit, we investigate the classification calibration property of the ATk loss. Specifically, we first obtain the population form of the ATk objective using the infinite limit of (2) 1 n n X i=1 [ℓ(yif(xi)) −λ]+ + k nλ k n →ν −−−−→ n→∞E [[ℓ(yf(x)) −λ]+] + νλ. We then consider the optimization problem (f ∗, λ∗) = arg inf f,λ≥0 E [[ℓ(yf(x)) −λ]+] + νλ, (7) where the infimum is taken over all measurable function f : X →R. We say the ATk (aggregate) loss is classification calibrated with respect to p if f ∗has the same sign as the Bayes rule fc. The following theorem establishes such conditions. Theorem 1. Suppose the individual loss ℓ: R →R+ is convex, differentiable at 0 and ℓ′(0) < 0. Without loss of generality, assume that ℓ(0) = 1. Let (f ∗, λ∗) be defined in (7), (i) If ν > E∗ ℓthen the ATk loss is classification calibrated. (ii) If, moreover, ℓis monotonically decreasing and the ATk aggregate loss is classification calibrated then ν ≥ R η(x)̸= 1 2 min(η(x), 1 −η(x))dpX (x). The proof of Theorem 1 can be found in the supplementary materials. Part (i) and (ii) of the above theorem address respectively the sufficient and necessary conditions on ν such that the ATk loss becomes classification calibrated. Since ℓis an upper bound surrogate of the 0-1 loss, the optimal ℓ-risk E∗ ℓis larger than the Bayes error R∗, i.e., E∗ ℓ≥R∗. In particular, if the individual loss ℓ is the hinge loss then E∗ ℓ= 2R∗. Part (ii) of the above theorem indicates that the ATk aggregate loss is classification calibrated if ν = limn→∞k/n is larger than the optimal generalization error E∗ ℓ associated with the individual loss. The choice of k > nE∗ ℓthus guarantees classification calibration, which gives a lower bound of k. This result also provides a theoretical underpinning of the sensitivity to outliers of the maximum loss (ATk loss with k = 1). If the probability of the set {x : η(x) = 1/2} is zero, R∗= R X min(η(x), 1 −η(x))dpX (x) = R η(x)̸=1/2 min(η(x), 1 −η(x))dpX (x). Theorem 1 indicates that in this case, if the maximum loss is calibrated, one must have 1 n ≈ν ≥R∗. In other words, as the number of training data increases, the Bayes error has to be arbitrarily small, which is consistent with the empirical observation that the maximum loss works well under the well-separable data setting but are sensitive to outliers and non-separable data. 5 3.2 Error bounds of ATk-SVM We next study the excess misclassification error of the ATk-SVM model i.e., R(sign(fz)) −R∗. Let (fz, ρz) be the minimizer of the ATk-SVM objective (6) in the RKHS setting. Let fH be the minimizer of the generalization error over the RKHS space HK, i.e., fH = argminf∈HK Eh(f), where we use the notation Eh(f) = E [[1 −yf(x)]+] to denote the ℓ-risk of the hinge loss. In the finite-dimension case, the existence of fH follows from the direct method in the variational calculus, as Eh(·) is lower bounded by zero, coercive, and weakly sequentially lower semi-continuous by its convexity. For an infinite dimensional HK, we assume the existence of fH. We also assume that Eh(fH) < 1 since even a na¨ıve zero classifier can achieve Eh(0) = 1. Denote the approximation error by A(HK) = inff∈HK Eh(f) −Eh(fc) = Eh(fH) −Eh(fc), and let κ = supx∈X p K(x, x). The main theorem can be stated as follows. Theorem 2. Consider the ATk-SVM in RKHS (6). For any ε ∈(0, 1] and µ ∈(0, 1 −Eh(fH)), choosing k = ⌈n(Eh(fH) + µ)⌉. Then, it holds Pr R(sign(fz)) −R∗≥µ + A(H) + ε + 1 + Cκ,H √nµ ≤2 exp − nµ2ε2 (1 + Cκ,H)2 , where Cκ,H = κ(2 √ 2C + 4∥fH∥K). The complete proof of Theorem 2 is given in the supplementary materials. The main idea is to show that ρz is bounded from below by a positive constant with high probability, and then bound the excess misclassification error R(sign(f ∗ z )) −R∗by Eh(fz/ρz) −Eh(fc). If K is a universal kernel then A(HK) = 0 [23]. In this case, let µ = ε ∈(0, 1 −Eh(fH)), then from Theorem 2 we have Pr R(sign(fz)) −R∗≥2ε + 1 + Cκ,H √nε ≤2 exp − nε4 (1 + Cκ,H)2 , Consequently, choosing C such that limn→∞C/n = 0, which is equivalent to limn→∞(1 + Cκ,H)2/n = 0, then R(sign(fz)) can be arbitrarily close to the Bayes error R∗, with high probability, as long as n is sufficiently large. 4 Experiments We have demonstrated that ATk loss provides a continuum between the average loss and the maximum loss, which can potentially alleviates their drawbacks. A natural question is whether such an advantage actually benefits practical learning problems. In this section, we demonstrate the behaviors of MATk learning coupled with different individual losses for binary classification and regression on synthetic and real datasets, with minimizing the average loss and the maximum loss treated as special cases for k = n and k = 1, respectively. For simplicity, in all experiments, we use homogenized linear prediction functions f(x) = wT x with parameters w and the Tikhonov regularizer Ω(w) = 1 2C ||w||2 , and optimize the MATk learning objective with the stochastic gradient descent method given in (4). Binary Classification: We conduct experiments on binary classification using eight benchmark datasets from the UCI3 and KEEL4 data repositories to illustrate the potential effects of using ATk loss in practical learning to adapt to different underlying data distributions. A detailed description of the datasets is given in supplementary materials. The standard individual logistic loss and hinge loss are combined with different aggregate losses. Note that average loss combined with individual logistic loss corresponds to the logistic regression model and average loss combined with individual hinge loss leads to the C-SVM algorithm [5]. For each dataset, we randomly sample 50%, 25%, 25% examples as training, validation and testing sets, respectively. During training, we select parameters C (regularization factor) and k (number of top losses) on the validation set. Parameter C is searched on grids of log10 scale in the range of [10−5, 105] (extended when optimal value is on the boundary), and k is searched on grids of log10 scale in the range of [1, n]. We use k∗to denote the optimal k selected from the validation set. 3https://archive.ics.uci.edu/ml/datasets.html 4http://sci2s.ugr.es/keel/datasets.php 6 Logistic Loss Hinge Loss Maximum Average ATk∗ Maximum Average ATk∗ Monk 22.41(2.95) 20.46(2.02) 16.76(2.29) 22.04(3.08) 18.61(3.16) 17.04(2.77) Australian 19.88(6.64) 14.27(3.22) 11.70(2.82) 19.82(6.56) 14.74(3.10) 12.51(4.03) Madelon 47.85(2.51) 40.68(1.43) 39.65(1.72) 48.55(1.97) 40.58(1.86) 40.18(1.64) Splice 23.57(1.93) 17.25(0.93) 16.12(0.97) 23.40(2.10) 16.25(1.12) 16.23(0.97) Spambase 21.30(3.05) 8.36(0.97) 8.36(0.97) 21.03(3.26) 7.40(0.72) 7.40(0.72) German 28.24(1.69) 25.36(1.27) 23.28(1.16) 27.88(1.61) 24.16(0.89) 23.80(1.05) Titanic 26.50(3.35) 22.77(0.82) 22.44(0.84) 25.45(2.52) 22.82(0.74) 22.02(0.77) Phoneme 28.67(0.58) 25.50(0.88) 24.17(0.89) 28.81(0.62) 22.88(1.01) 22.88(1.01) Table 1: Average misclassification rate (%) of different learning objectives over 8 datasets. The best results are shown in bold with results that are not significant different to the best results underlined. 1 50 100 150 216 k 0.16 0.18 0.2 0.22 0.24 0.26 0.28 Misclassification Rate Monk 1 100 200 300 346 k 0.1 0.15 0.2 0.25 0.3 0.35 Misclassification Rate Australian 1 500 1000 1588 k 0.16 0.18 0.2 0.22 0.24 0.26 0.28 Misclassification Rate Splice 1 500 1000 1500 2000 2702 k 0.22 0.24 0.26 0.28 0.3 Misclassification Rate Phoneme Figure 3: Plots of misclassification rate on testing set vs. k on four datasets. We report the average performance over 10 random splitting of training/validation/testing for each dataset with MATk learning objectives formed from individual logistic loss and hinge loss. Table 1 gives their experimental results in terms of misclassification rate (results in terms of other classification quality metrics are given in supplementary materials). Note that on these datasets, the average loss consistently outperforms the maximum loss, but the performance can be further improved with the ATk loss, which is more adaptable to different data distributions. This advantage of the ATk loss is particularly conspicuous for datasets Monk and Australian. To further understand the behavior of MATk learning on individual datasets, we show plots of misclassification rate on testing set vs. k for four representative datasets in Fig.3 (in which C is fixed to 102 and k ∈[1, n]). As these plots show, on all four datasets, there is a clear range of k value with better classification performance than the two extreme cases k = 1 and k = n, corresponding to the maximum and average loss, respectively. To be more specific, when k = 1, the potential noises and outliers will have the highest negative effects on the learned classifier and the related classification performance is very poor. As k increases, the negative effects of noises and outliers will reduce and the classification performance becomes better, this is more significant on dataset Monk, Australian and Splice. However, if k keeps increase, the classification performance may decrease (e.g., when k = n). This may because that as k increases, more and more well classified samples will be included and the non-zero loss on these samples will have negative effects on the learned classifier (see our analysis in Section 2), especifically for dataset Monk, Australian and Phoneme. Regression. Next, we report experimental results of linear regression on one synthetic dataset (Sinc) and three real datasets from [4], with a detailed description of these datasets given in supplementary materials. The standard square loss and absolute loss are adopted as individual losses. Note that average loss coupled with individual square loss is standard ridge regression model and average loss coupled with individual absolute loss reduces to ν-SVR [19]. We normalize the target output to [0, 1] and report their root mean square error (RMSE) in Table 2, with optimal C and k∗ obtained by a grid search as in the case of classification (performance in terms of mean absolute square error (MAE) is given in supplementary materials). Similar to the classification cases, using the ATk loss usually improves performance in comparison to the average loss or maximum loss. 5 Related Works Most work on learning objectives focus on designing individual losses, and only a few are dedicated to new forms of aggregate losses. Recently, aggregate loss considering the order of training data have been proposed in curriculum learning [2] and self-paced learning [11, 9], which suggest to organize the training process in several passes and samples are included from easy to hard gradually. It is interesting to note that each pass of self-paced learning [11] is equivalent to minimum the average of 7 Square Loss Absolute Loss Maximum Average ATk∗ Maximum Average ATk∗ Sinc 0.2790(0.0449) 0.1147(0.0060) 0.1139(0.0057) 0.1916(0.0771) 0.1188(0.0067) 0.1161(0.0060) Housing 0.1531(0.0226) 0.1065(0.0132) 0.1050(0.0132) 0.1498(0.0125) 0.1097(0.0180) 0.1082(0.0189) Abalone 0.1544(0.1012) 0.0800(0.0026) 0.0797(0.0026) 0.1243(0.0283) 0.0814(0.0029) 0.0811(0.0027) Cpusmall 0.2895(0.0722) 0.1001(0.0035) 0.0998(0.0037) 0.2041(0.0933) 0.1170(0.0061) 0.1164(0.0062) Table 2: Average RMSE on four datasets. The best results are shown in bold with results that are not significant different to the best results underlined. the k smallest individual losses, i.e., 1 k Pn i=n−k+1 ℓ[i](f), which we term it as the average bottom-k loss in contrast to the average top-k losses in our case. In [20], the pros and cons of the maximum loss and the average loss are compared, and the top-k loss, i.e., ℓ[k](f), is advocated as a remedy to the problem of both. However, unlike the ATk loss, in general, neither the average bottom-k loss nor the top-k loss are convex functions with regards to the individual losses. Minimizing top-k errors has also been used in individual losses. For ranking problems, the work of [17, 24] describes a form of individual loss that gives more weights to the top examples in a ranked list. In multi-class classification, the top-1 loss is commonly used which causes penalties when the top-1 predicted class is not the same as the target class label [6]. This has been further extended in [12, 13] to the top-k multi-class loss, in which for a class label that can take m different values, the classifier is only penalized when the correct value does not show up in the top k most confident predicted values. As an individual loss, these works are complementary to the ATk loss and they can be combined to improve learning performance. 6 Discussion In this work, we introduce the average top-k (ATk) loss as a new aggregate loss for supervised learning, which is the average over the k largest individual losses over a training dataset. We show that the ATk loss is a natural generalization of the two widely used aggregate losses, namely the average loss and the maximum loss, but can combine their advantages and mitigate their drawbacks to better adapt to different data distributions. We demonstrate that the ATk loss can better protect small subsets of hard samples from being swamped by a large number of easy ones, especially for imbalanced problems. Furthermore, it remains a convex function over all individual losses, which can lead to convex optimization problems that can be solved effectively with conventional gradientbased methods. We provide an intuitive interpretation of the ATk loss based on its equivalent effect on the continuous individual loss functions, suggesting that it can reduce the penalty on correctly classified data. We further study the theoretical aspects of ATk loss on classification calibration and error bounds of minimum average top-k learning for ATk-SVM. We demonstrate the applicability of minimum average top-k learning for binary classification and regression using synthetic and real datasets. There are many interesting questions left unanswered regarding using the ATk loss as learning objectives. Currently, we use conventional gradient-based algorithms for its optimization, but we are investigating special instantiations of MATk learning for which more efficient optimization methods can be developed. Furthermore, the ATk loss can also be used for unsupervised learning problems (e.g., clustering), which is a focus of our subsequent study. It is also of practical importance to combine ATk loss with other successful learning paradigms such as deep learning, and to apply it to large scale real life dataset. Lastly, it would be very interesting to derive error bounds of MATk with general individual loss functions. 7 Acknowledgments We thank the anonymous reviewers for their constructive comments. This work was completed when the first author was a visiting student at SUNY Albany, supported by a scholarship from University of Chinese Academy of Sciences (UCAS). Siwei Lyu is supported by the National Science Foundation (NSF, Grant IIS-1537257) and Yiming Ying is supported by the Simons Foundation (#422504) and the 2016-2017 Presidential Innovation Fund for Research and Scholarship (PIFRS) program from SUNY Albany. This work is also partially supported by the National Science Foundation of China (NSFC, Grant 61620106003) for Bao-Gang Hu and Yanbo Fan. 8 References [1] P. L. Bartlett, M. I. Jordan, and J. D. McAuliffe. Convexity, classification, and risk bounds. Journal of the American Statistical Association, 101(473):138–156, 2006. [2] Y. Bengio, J. Louradour, R. Collobert, and J. Weston. Curriculum learning. In ICML, pages 41–48, 2009. [3] O. Bousquet and L. Bottou. The tradeoffs of large scale learning. In NIPS, pages 161–168, 2008. [4] C.-C. Chang and C.-J. Lin. Libsvm: a library for support vector machines. TIST, 2(3):27, 2011. [5] C. Cortes and V. Vapnik. Support-vector networks. Machine learning, 20(3):273–297, 1995. [6] K. Crammer and Y. Singer. On the algorithmic implementation of multiclass kernel-based vector machines. Journal of machine learning research, 2(Dec):265–292, 2001. [7] E. De Vito, A. Caponnetto, and L. Rosasco. Model selection for regularized least-squares algorithm in learning theory. Foundations of Computational Mathematics, 5(1):59–85, 2005. [8] L. Devroye, L. Gy¨orfi, and G. Lugosi. A probabilistic theory of pattern recognition, volume 31. Springer Science & Business Media, 2013. [9] Y. Fan, R. He, J. Liang, and B.-G. Hu. Self-paced learning: An implicit regularization perspective. In AAAI, pages 1877–1833, 2017. [10] R. He, W.-S. Zheng, and B.-G. Hu. Maximum correntropy criterion for robust face recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 33(8):1561–1576, 2011. [11] M. P. Kumar, B. Packer, and D. Koller. Self-paced learning for latent variable models. In NIPS, pages 1189–1197, 2010. [12] M. Lapin, M. Hein, and B. Schiele. Top-k multiclass SVM. In NIPS, pages 325–333, 2015. [13] M. Lapin, M. Hein, and B. Schiele. Loss functions for top-k error: Analysis and insights. In CVPR, pages 1468–1477, 2016. [14] Y. Lin. A note on margin-based loss functions in classification. Statistics & probability letters, 68(1):73– 82, 2004. [15] H. Masnadi-Shirazi and N. Vasconcelos. On the design of loss functions for classification: theory, robustness to outliers, and savageboost. In NIPS, pages 1049–1056, 2009. [16] W. Ogryczak and A. Tamir. Minimizing the sum of the k largest functions in linear time. Information Processing Letters, 85(3):117–122, 2003. [17] C. Rudin. The p-norm push: A simple convex ranking algorithm that concentrates at the top of the list. Journal of Machine Learning Research, 10(Oct):2233–2271, 2009. [18] B. Sch¨olkopf and A. J. Smola. Learning with kernels: support vector machines, regularization, optimization, and beyond. MIT press, 2001. [19] B. Sch¨olkopf, A. J. Smola, R. C. Williamson, and P. L. Bartlett. New support vector algorithms. Neural computation, 12(5):1207–1245, 2000. [20] S. Shalev-Shwartz and Y. Wexler. Minimizing the maximal loss: How and why. In ICML, 2016. [21] N. Srebro and A. Tewari. Stochastic optimization for machine learning. ICML Tutorial, 2010. [22] I. Steinwart. On the optimal parameter choice for ν-support vector machines. IEEE Transactions on Pattern Analysis and Machine Intelligence, 25(10):1274–1284, 2003. [23] I. Steinwart and A. Christmann. Support vector machines. Springer Science & Business Media, 2008. [24] N. Usunier, D. Buffoni, and P. Gallinari. Ranking with ordered weighted pairwise classification. In ICML, pages 1057–1064, 2009. [25] V. Vapnik. Statistical learning theory, volume 1. Wiley New York, 1998. [26] Q. Wu, Y. Ying, and D.-X. Zhou. Learning rates of least-square regularized regression. Foundations of Computational Mathematics, 6(2):171–192, 2006. [27] Y. Wu and Y. Liu. Robust truncated hinge loss support vector machines. Journal of the American Statistical Association, 102(479):974–983, 2007. [28] Y. Yu, M. Yang, L. Xu, M. White, and D. Schuurmans. Relaxed clipping: A global training method for robust regression and classification. In NIPS, pages 2532–2540, 2010. 9 | 2017 | 282 |
6,766 | MaskRNN: Instance Level Video Object Segmentation Yuan-Ting Hu UIUC ythu2@illinois.edu Jia-Bin Huang Virginia Tech jbhuang@vt.edu Alexander G. Schwing UIUC aschwing@illinois.edu Abstract Instance level video object segmentation is an important technique for video editing and compression. To capture the temporal coherence, in this paper, we develop MaskRNN, a recurrent neural net approach which fuses in each frame the output of two deep nets for each object instance — a binary segmentation net providing a mask and a localization net providing a bounding box. Due to the recurrent component and the localization component, our method is able to take advantage of long-term temporal structures of the video data as well as rejecting outliers. We validate the proposed algorithm on three challenging benchmark datasets, the DAVIS-2016 dataset, the DAVIS-2017 dataset, and the Segtrack v2 dataset, achieving state-of-the-art performance on all of them. 1 Introduction Instance level video object segmentation of complex scenes is a challenging problem with applications in areas such as object identification, video editing, and video compression. With the recent release of the DAVIS dataset [39], the task of segmenting multiple object instances from videos has gained considerable attention. However, just like for classical foreground-background segmentation, deforming shapes, fast movements, and multiple objects occluding each other pose significant challenges to instance level video object segmentation. Classical techniques [5, 10, 11, 17, 21, 41, 20, 44, 49] for video object segmentation often rely on geometry and assume rigid scenes. Since these assumptions are often violated in practice, visually apparent artifacts are commonly observed. To temporally and spatially smooth object mask estimates, graphical model based techniques [22, 2, 14, 45, 47, 46] have been proposed in the past. While graphical models enable an effective label propagation across the entire video sequences, they often tend to be sensitive to parameters. Recently, deep learning based approaches [7, 26, 23, 6, 25] have been applied to video object segmentation. Early work in this direction predicts the segmentation mask frame by frame [7]. Later, prediction of the current frame incorpoerates additional cues from the preceding frame using optical flow [23, 26, 25], semantic segmentations [6], or mask propagation [26, 25]. Importantly, all these methods only address the foreground-background segmentation of a single object and are not directly applicable to instance level segmentation of multiple objects in videos. In contrast to the aforementioned methods, in this paper, we develop MaskRNN, a framework that deals with instance level segmentation of multiple objects in videos. We use a bottom-up approach where we first track and segment individual objects before merging the results. To capture the temporal structure, our approach employs a recurrent neural net while the segmentation of individual objects is based on predictions of binary segmentation masks confined to a predicted bounding box. We evaluate our approach on the DAVIS-2016 dataset [37], the DAVIS-2017 dataset [39], and the Segtrack v2 dataset [30]. On all three we observe state-of-the-art performance. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Table 1: Comparisons with the state-of-the-art deep learning based video object segmentation algorithms. Method OSVOS MaskProp FusionSeg LucidTracker SemanticProp Ours [7] [26] [23] [25] [6] Using flow No Yes Yes Yes No Yes Temporal information No Short-term Short-term Short-term No Long-term (RNN) Location prior No Previous mask No Previous mask No Previous mask+Bounding box Semantic prior No No No No Yes No Post-processing Boundary snapping denseCRF No denseCRF No No Finetuning on the 1st frame Yes Yes No Yes Yes Yes 2 Related Work Video object segmentation has been studied extensively in recent years [45, 30, 34, 40, 29, 28, 36, 48, 16, 46, 37, 23, 6, 25]. In the following, we group the literature into two categories: (1) graph-based approaches and (2) deep learning methods. Video object segmentation via spatio-temporal graphs: Methods in this category construct a three-dimensional spatio-temporal graph [45, 30, 16, 28] to model the inter- and the intra-frame relationship of pixels or superpixels in a video. Evidence about a pixels assignment to the foreground or background is then propagated along this spatio-temporal graph, to determine which pixels are to be labeled as foreground and which pixel corresponds to the background of the observed scene. Graph-based approaches are able to accept different degrees of human supervision. For example, interactive video object segmentation approaches allow users to annotate the foreground segments in several key frames to generate accurate results by propagating the user-specified masks to the entire video [40, 13, 34, 31, 22]. Semi-supervised video object segmentation techniques [4, 16, 45, 22, 46, 33] require only one mask for the first frame of the video. Also, there are unsupervised methods [9, 28, 50, 36, 35, 12, 48] that do not require manual annotation. Since constructing and exploring the 3D spatio-temporal graphs is computationally expensive, the graph-based methods are typically slow, and the running time of the graph-based video object segmentation is often far from real time. Video object segmentation via deep learning: With the success of deep nets on semantic segmentation [32, 42], deep learning based approaches for video object segmentation [7, 26, 23, 6, 25] have been intensively studied recently and often yield state-of-the-art performance, outperforming graph-based methods. Generally, the employed deep nets are pre-trained on object segmentation datasets. In the semi-supervised setting where the ground truth mask of the first frame of a video is given, the network parameters are then finetuned on the given ground truth of the first frame of a particular video, to improve the results and the specificity of the network. Additionally, contour cues [7] and semantic segmentation information [7] can be incorporated into the framework. Besides those cues, optical flow between adjacent frames is another important key information for video data. Several methods [26, 23, 25] utilize the magnitude of the optical flow between adjacent frames. However, these methods do not explicitly model the location prior, which is important for object tracking. In addition, these methods focus on separating foreground from background and do not consider instance level segmentation of multiple objects in a video sequence. In Tab. 1, we provide a feature-by-feature comparison of our video object segmentation technique with representative state-of-the-art approaches. We note that the developed method is the only one that takes long-term temporal information into account via back-propagation through time using a recurrent neural net. In addition, the discussed method is the only one that estimates the bounding boxes in addition to the segmentation masks, allowing us to incorporate a location prior of the tracked object. 3 Instance Level Video Object Segmentation Next, we present MaskRNN, a joint multi-object video segmentation technique, which performs instance level object segmentation by combining binary segmentation with effective object tracking via bounding boxes. To benefit from temporal dependencies, we employ a recurrent neural net component to connect prediction over time in a unifying framework. In the following, we first provide a general outline of the developed approach illustrated in Fig. 1 and detail the individual components subsequently. 2 Figure 1: An illustration for the proposed algorithm. We show an example video with 2 objects (left). Our method predicts the binary segmentation for each object using 2 deep nets (Section 3.3), one for each object, which perform binary segmentation and object localization. The output instance-level segmentation mask is obtained by combining the binary segmentation masks (Section 3.2). 3.1 Overview We consider a video sequence I = {I1,I2,...,IT} which consists of T frames It, t ∈{1,...,T}. Throughout, we assume the ground truth segmentation mask of the N object instances of interest to be given for the first frame I1. We refer to the ground truth segmentation mask of the first frame via y∗ 1 ∈{0,1,...,N}H×W, where N is the number of object instances, and H and W are the height and width of the video frames. In multi-instance video object segmentation, the goal is to predict y2,...,yT ∈{0,...,N}H×W, which are the segmentation masks corresponding to frames I2 to IT. The proposed method is outlined in Fig. 1. Motivated by the time-dependence of the frames in the video sequence we formulate the task of instance level semantic video segmentation as a recurrent neural net, where the prediction of the previous frame influences prediction of the current frame. Beyond the prediction yt−1 for the previous frame t −1, our approach also takes into account both the previous and the current frames, i.e., It−1 and It. We compute the optical flow from the two images. We then use the predicted optical flow (i) as input feature to the neural nets and (ii) to warp the previous prediction to roughly align with the current frame. The warped prediction, the optical flow itself, and the appearance of the current frame are then used as input for N deep nets, one for each of the N objects. Each of the deep nets consists of two parts, a binary segmentation net which predicts a segmentation mask, and an object localization net which performs bounding box regression. The latter is used to alleviate outliers. Both, bounding box regression and segmentation map are merged into a binary segmentation mask bi t ∈[0,1]H×W denoting the foreground-background probability maps for each of the N object instances i ∈{1,...,N}. The binary semantic segmentations for all N objects are subsequently merged using an argmax operation. The prediction for the current frame, i.e., yt, is computed via thresholding. Note that we combine the binary predictions only at test time. In the following, we first describe our fusion operation in detail, before discussing the deep net performing binary segmentation and object localization. 3.2 Multiple instance level segmentation Predicting the segmentation mask yt for the t-th frame, can be viewed as a multi-class prediction problem, i.e., assigning to every pixel in the video a label, indicating whether the pixel p represents an object instance (yp t = {1,...,N}) or whether the pixel is considered background (yp t = 0). Following a recent technique for instance level image segmentation [18], we cast this multi-class prediction problem into multiple binary segmentations, one per object instance. Assume availability of binary segmentation masks bi t ∈[0,1]H×W which provide for each object instance i ∈{1,...,N} the probability that a pixel should be considered foreground or background. To combine the binary segmentations bi t into one final prediction yt such that every pixel is assigned to only one object label, is achieved by assigning the class with the largest probability for every pixel. 3 Figure 2: An illustration of the binary object segmentation network and the object localization network as described in Section 3.3. The binary segmentation network is a two-stream network including appearance stream and flow stream. The inputs of the appearance stream are the current frame It and φt(bi t−1). The inputs of the flow stream are the flow magnitude and the warped mask, φt(bi t−1). The object localization net refines the bounding box proposal to estimate the location prior. To compute the binary segmentation mask bi t, the output of appearance stream and the flow stream are linearly combined and the responses outside the refined bounding box are discarded. To be more specific, we assign class label i ∈{1,...,N} to the pixel if the probability for class i at the pixel (indicated by bi t) is largest among the N probability maps for the N object instances. Note that this operation is similar to a pooling operation, and permits back-propagation. 3.3 Binary Segmentation To obtain the binary segmentations bi t ∈[0,1]H×W employed in the fusion step, N deep nets are used, one for each of the N considered object instances. One of the N deep nets is illustrated in Fig. 2. It consists of two components, the binary segmentation net and the object localization net, which are discussed in greater detail in the following. Binary Segmentation Net: The objective for each of the binary segmentation nets is to predict the foreground-background mask bi t ∈[0,1]H×W for its corresponding object instance i ∈{1,...,N}. To achieve this task, the binary segmentation net is split into two streams, i.e., the appearance stream and the flow stream. The input of the appearance stream is the concatenation of the current frame It and the warped prediction of the previous frame yt−1, denoted as φt−1,t(yt−1). The warping function φt−1,t(.) transforms the input based on the optical flow field from frame It−1 to frame It. The input of the flow stream is the concatenation of the magnitude of the flow field from It to It−1 and It to It+1 and, again, the warped prediction of the previous frame φt−1,t(yt−1). The architecture of both streams is identical and follows the subsequent description. The network architecture is inspired by [7] where the bottom of the network follows the structure of the VGG-16 network [43]. The intermediate representations of the VGG-16 network, right before the max-pooling layers and after the ReLU layers, are extracted, upsampled by bilinear interpolation and linearly combined to form a single channel feature representation which has the same size as the input image. By linearly combining the two representations, one from the appearance stream and the other one from the flow stream, and by taking the sigmoid function on the combined single channel feature response, we obtain a probability map which indicates the probability bi t ∈[0,1]H×W of a pixel in the t-th frame being foreground, i.e., corresponding to the i-th object. The network architecture of the appearance stream is shown in Fig. 2 (right panel). During training, we use the weighted binary cross entropy loss as suggested in [7]. Note that all the operations in our network are differentiable. Hence, we can train the developed network end-to-end via back-propagation through time. 4 Table 2: Contribution of different components of our algorithm evaluated on DAVIS-2016 and DAVIS-2017 dataset. The performance is in term of IoU (%). Component Enable (✓) / Disable Segmentation net AStream ✓ ✓ ✓ ✓ ✓ ✓ FStream ✓ ✓ ✓ ✓ ✓ Warp mask ✓ ✓ ✓ ✓ Localization net Train ✓ ✓ ✓ Apply ✓ ✓ RNN ✓ DAVIS-2016 IoU(%), w/o Finetuning 54.17 55.87 56.88 52.29 53.90 56.32 DAVIS-2016 IoU(%), w/ Finetuning 76.63 79.77 79.92 78.43 80.10 80.38 DAVIS-2017 IoU(%), w/o Finetuning 41.29 43.33 44.52 38.95 41.57 45.53 DAVIS-2017 IoU(%), w/ Finetuning 58.66 59.46 59.71 56.12 60.41 60.51 Object Localization Net: Usage of an object localization net is inspired by tracking approaches which regularize the prediction by assuming that the object is less likely to move drastically between temporally adjacent frames. The object localization network computes the location for the i-th object in the current frame via bounding box regression. First, we find the bounding box proposal on the warped mask φt(bi t−1). Similarly to the bounding box regression in Fast-RCNN [15], with the bounding box proposal as the region of interest, we use the conv5_3 feature in the appearance stream of the segmentation net to perform RoI-pooling, followed by two fully connected layers. Their output is used to regress the bounding box position. We refer the reader to [15] for more details on bounding box regression. Given the bounding box, a pixel is classified as foreground if it is predicted as foreground by the segmentation net and if it is inside a bounding box which is enlarged by a factor of 1.25 compared to the predicted of the localization net. The estimated bounding box is then used to restrict the segmentation to avoid outliers which are far away from the object. 3.4 Training and Finetuning Our framework outlined in the preceding sections and illustrated in Fig. 1 can be trained end-to-end via back-propagation through time given a training sequence. Note that back-propagation through time is used because of the recurrence relation that connects multiple frames of the video sequence. To further improve the predictive performance, we follow the protocol [39] for the semi-supervised setting of video object segmentation and finetune our networks using the ground truth segmentation mask provided for the first frame. Specifically, we further optimize the binary segmentation net and localization net based on the given ground truth. Note that it is not possible to adjust the entire architecture since only a single ground truth frame is provided in the supervised setting. 4 Implementation Details In the following, we describe the implementation details of our approach, as well as the training data. We also provide details about the offline training and online training in our experimental setup. Training data: We use the training set of the DAVIS dataset to pre-train the appearance network for general-purpose object segmentation. The DAVIS-2016 dataset [37] contains 30 training videos and 20 testing videos and the DAVIS-2017 dataset [39] consists of 60 training videos and 30 testing videos. Note that the annotation of the DAVIS-2016 dataset contains only one single object per video. For a fair evaluation on the DAVIS-2016 and DAVIS-2017 datasets, the object segmentation net and localization nets are trained on the training set of each dataset separately. During testing, the network is further finetuned online on the given ground-truth of the first frame since we assume the ground truth segmentation mask of the first frame, i.e., y∗ 1, to be available. Offline training: During offline training, we first optimize the networks on static images. We found it useful to randomly perturb the ground-truth segmentation mask y∗ t−1 locally, to simulate the imperfect prediction of the last frame. The random perturbation includes dilation, deformation, resizing, rotation and translation. After having trained both the binary segmentation net and the object localization net on single frames, we further optimize the segmentation net by taking long-term 5 Table 3: The quantitative evaluation on the validation set of DAVIS dataset [37]. The evaluation matrics are the IoU measurement J , boundary precision F, and time stability T . Following [37], we also report the recall and the decay of performance over time for J and F measurements. Semi-supervised OSVOS MSK VPN OFL BVS FCP JMP HVS SEA TSP OURS [7] [26] [24] [46] [33] [38] [13] [16] [1] [8] Mean M ↑ 79.8 79.7 70.2 68.0 60.0 58.4 57.0 54.6 50.4 31.9 80.4 J Recall O ↑ 93.6 93.1 82.3 75.6 66.9 71.5 62.6 61.4 53.1 30.0 96.0 Decay D ↓ 14.9 8.9 12.4 26.4 28.9 -2.0 39.4 23.6 36.4 38.1 4.4 Mean M ↑ 80.6 75.4 65.5 63.4 58.8 49.2 53.1 52.9 48.0 29.7 82.3 F Recall O ↑ 92.6 87.1 69.0 70.4 67.9 49.5 54.2 61.0 46.3 23.0 93.2 Decay D ↓ 15.0 9.0 14.4 27.2 21.3 -1.1 38.4 22.7 34.5 35.7 8.8 T Mean M ↓ 37.8 21.8 32.4 22.2 34.7 30.6 15.9 36.0 15.4 41.7 19.0 information into account, i.e., training using the recurrence relation. We consider 7 frames at a time due to the memory limitation imposed by the GPU. During offline training all networks are optimized for 10 epochs using the Adam solver [27] and the learning rate is gradually decayed during training, starting from 10−5. Note that we use the pre-trained flowNet2.0 [19] for optical flow computation. During training, we apply data augmentation with randomly resizing, rotating, cropping, and left-right flipping the images and masks. Online finetuning: In the semi-supervised setting of video object segmentation, the ground-truth segmentation mask of the first frame is available. The object segmentation net and the localization net are further finetuned on the first frame of the testing video sequence. We set the learning rate to 10−5. We train the network for 200 iterations, and the learning rate is gradually decayed over time. To enrich the variation of the training data, for online finetuning the same data augmentation techniques are applied as in offline training, namely randomly resizing, rotating, cropping and flipping the images. Note that the RNN is not employed during online finetuning since only a single frame of training data is available. 5 Experimental Results Next, we first describe the evaluation metrics before we present an ablation study of our approach, quantitative results, and qualitative results. 5.1 Evaluation Metrics Intersection over union: We use the common mean intersection over union (IoU) metric which calculates the average across all frames of the dataset. The IoU metric is particularly challenging for small sized foreground objects. Contour accuracy [37]: Besides an accurate object overlap measured by IoU, we are also interested in an accurate delineation of the foreground objects. To assess the delineation quality of our approach, we measure the precision, P, and the recall R of the two sets of points on the contours of the ground truth segment and the output segment via a bipartite graph matching. The contour accuracy is calculated as 2PR P+R. Temporal stability [37]: The temporal stability estimates the degree of deformation needed to transform the segmentation masks from one frame to the next. The temporal stability is measured by the dissimilarity of the shape context descriptors [3] which describe the points on the contours of the segmentation between the two adjacent frames. 5.2 Ablation study We validate the contributions of the components in our method by presenting an ablation study summarized in Tab. 2 on two datasets, DAVIS-2016 and DAVIS-2017. We mark the enabled components using the ‘✓’ symbol. We analyze the contribution of the binary segmentation net 6 Table 4: The quantitative evaluation on DAVIS-2017 dataset [39] and SegTrack v2 dataset [30]. DAVIS-2017 SegTrack v2 OSVOS [7] OFL [46] OURS OSVOS [7] MSK [26] OFL [46] OURS IoU(%) 52.1 54.9 60.5 61.9 67.4 67.5 72.1 including the appearance stream (‘AStream’), the flow stream (‘FStream’) and whether to warp the input mask, yt−1, based on the optical flow field (‘Warp mask’). In addition, we analyze the effects of the object localization net. Specifically, we assess the occurring performance changes of two configurations: (i) by only adding the bounding box regression loss into the objective function (‘Train’), i.e., both the segmentation net and the object localization net are trained but only the segmentation net is deployed; (ii) by training and applying the object localization net (‘Apply’). The contribution of the recurrent training (‘RNN’) is also illustrated. The performances with and without online finetuning as described in Section 4 are shown for each dataset as well. In Tab. 2, we generally observe that online finetuning is important as the network is adjusted to the specific object appearance in the current video. For the segmentation net, the combination of the appearance stream and the flow stream performs better than using only the appearance stream. This is due to the fact that the optical flow magnitude provided in the flow stream provides complementary information by encoding motion boundaries, which helps to discover moving objects in the cluttered background. The performance can be further improved by using the optical flow to warp the mask so that the input to both streams of the segmentation net also takes the motion into account. For the localization net, we first show that adding the bounding box regression loss decreases the performance of the segmentation net (adding ‘Train’ configuration). However, by applying the bounding box to restrict the segmentation mask improves the results beyond the performance achieved by only applying the segmentation net. Training the network using the recurrence relationship further improves the results as the network produces more consistent segmentation masks over time. 5.3 Quantitative evaluation We compare the performance of our approach to several baselines on two tasks: foregroundbackground video object segmentation and multiple instance-level video object segmentation. More specifically, we use DAVIS-2016 [37] for evaluating foreground-background segmentation, and DAVIS-2017 [39] and Segtrack v2 [30] datasets for evaluating multiple instance-level segmentation. The three datasets serve as a good testbed as they contain challenging variations, such as drastic appearance changes, fast motion, and occlusion. We compare the performance of our approach to several state-of-the-art benchmarks. We assess performance on the validation set when using the DAVIS datasets and we use the whole dataset for Segtrack v2 as no split into train and validation sets is available. The results on DAVIS-2016 are summarized in Tab. 3, where we report the IoU, the contour accuracy, and the time stability metrics following [37]. The results on DAVIS-2017 and SegTrack v2 are summarized in Tab. 4. Foreground-background video object segmentation: We use the DAVIS-2016 dataset to evaluate the performance of foreground-background video object segmentation. The DAVIS-2016 dataset contains 30 training videos and 20 validation videos. The network is first trained on the 30 training videos and finetuned on the first frame of the 20 validation videos, respectively during testing. The performance evaluation is reported in Tab. 3. We outperform the other state-of-the-art semi-supervised methods by 0.6%. Note that OSVOS [7], MSK [26], VPN [24] are also deep learning approach. In contrast to our approach, these methods don’t employ the location prior. Instance-level video object segmentation: We use the DAVIS-2017 and the Segtrack v2 datasets to evaluate the performance of instance-level video object segmentation. The DAVIS-2017 dataset contains 60 training videos and 30 validation videos. The Segtrack v2 dataset contains 14 videos. There are 2.27 objects per video on average in the DAVIS-2017 dataset and 1.74 in the Segtrack v2 dataset. Again, as for DAVIS-2016, the network is trained on the training set and then finetuned using the groundtruth of the given first frame. Since the Segtrack v2 dataset does not provide a training set, we use the DAVIS-2017 training set to optimize and finetune the deep nets. The performance evaluation is reported in Tab. 4. We outperform other state-of-the-art semi-supervised methods by 5.6% and 4.6% on DAVIS-2017 and Segtrack v2, respectively. 7 Figure 3: Visual results of our approach on DAVIS-2016 (1st and 2nd row), DAVIS-2017 (3rd and 4th row) and Segtrack v2 dataset (5th and 6th row). Figure 4: Failure cases of our approach. The 1st and the 3rd column shows the results of the beginning frames. Our method fails to track the object instances as shown in the 2nd and 4th column. 5.4 Qualitative evaluation We visualize some of the qualitative results of our approach in Fig. 3 and Fig. 4. In Fig. 3, we show some successful cases of our algorithm on the DAVIS and Segtrack datasets. We observe that the proposed method accurately keeps track of the foreground objects even with complex motion and cluttered background. We also observe accurate instance level segmentation of multiple objects which occlude each other. In Fig. 4, we visualize two failure cases of our approach. Reasons for failures are the similar appearance of instances of interest as can be observed for the leftmost two figures. Another reason for failure is large variations in scale and viewpoint as shown for the two figures on the right of Fig. 4. 6 Conclusion We proposed MaskRNN, a recurrent neural net based approach for instance-level video object segmentation. Due to the recurrent component and the combination of segmentation and localization nets, our approach takes advantage of the long-term temporal information and the location prior to improve the results. Acknowledgments: This material is based upon work supported in part by the National Science Foundation under Grant No. 1718221. We thank NVIDIA for providing the GPUs used in this research. 8 References [1] S. Avinash Ramakanth and R. Venkatesh Babu. SeamSeg: Video object segmentation using patch seams. In Proc. CVPR, 2014. 6 [2] V. Badrinarayanan, F. Galasso, and R. Cipolla. Label propagation in video sequences. In Proc. CVPR, 2010. 1 [3] S. Belongie, J. Malik, and J. Puzicha. Shape matching and object recognition using shape contexts. TPAMI, 2002. 6 [4] W. Brendel and S. Todorovic. Video object segmentation by tracking regions. In Proc. ICCV, 2009. 2 [5] S. Brutzer, B. Hoeferlin, and G. Heidemann. Evaluation of background subtraction techniques for video surveillance. In Proc. CVPR, 2011. 1 [6] S. Caelles, Y. Chen, J. Pont-Tuset, and L. Van Gool. Semantically-guided video object segmentation. arXiv preprint arXiv:1704.01926, 2017. 1, 2 [7] S. Caelles, K.-K. Maninis, J. Pont-Tuset, L. Leal-Taixé, D. Cremers, and L. Van Gool. One-shot video object segmentation. In Proc. CVPR, 2017. 1, 2, 4, 6, 7 [8] J. Chang, D. Wei, and J. W. Fisher. A video representation using temporal superpixels. In Proc. CVPR, 2013. 6 [9] H.-T. Cheng and N. Ahuja. Exploiting nonlocal spatiotemporal structure for video segmentation. In Proc. CVPR, 2012. 2 [10] A. Criminisi, G. Cross, A. Blake, and V. Kolmogorov. Bilayer segmentation of live video. In Proc. CVPR, 2006. 1 [11] A. Elgammal, R. Duraiswami, D. Harwood, and L. Davis. Background and foreground modeling using nonparametric kernel density estimation for visual surveillance. In Proc. IEEE, 2002. 1 [12] A. Faktor and M. Irani. Video segmentation by non-local consensus voting. In BMVC, 2014. 2 [13] Q. Fan, F. Zhong, D. Lischinski, D. Cohen-Or, and B. Chen. JumpCut: Non-successive mask transfer and interpolation for video cutout. ACM TOG (Proc. SIGGRAPH), 2015. 2, 6 [14] F. Galasso, N. Nagaraja, T. Cardenas, T. Brox, and B. Schiele. A unified video segmentation benchmark: Annotation, metrics and analysis. In Proc. ICCV, 2013. 1 [15] R. Girshick. Fast R-CNN. In Proc. CVPR, 2015. 5 [16] M. Grundmann, V. Kwatra, M. Han, and I. Essa. Efficient hierarchical graph-based video segmentation. In Proc. CVPR, 2010. 2, 6 [17] E. Haymanand and J. O. Eklundh. Statistical background subtraction for a mobile observer. In Proc. ICCV, 2003. 1 [18] K. He, G. Gkioxari, P. Dollár, and R. Girshick. Mask r-cnn. In Proc. ICCV, 2017. 3 [19] E. Ilg, N. Mayer, T. Saikia, M. Keuper, A. Dosovitskiy, and T. Brox. Flownet 2.0: Evolution of optical flow estimation with deep networks. In Proc. CVPR, 2017. 6 [20] M. Irani and P. Anandan. A unified approach to moving object detection in 2d and 3d scenes. PAMI, 1998. 1 [21] M. Irani, B. Rousso, and S. Peleg. Computing occluding and transparent motions. IJCV, 1994. 1 [22] S. D. Jain and K. Grauman. Supervoxel-consistent foreground propagation in video. In Proc. ECCV, 2014. 1, 2 [23] S. D. Jain, B. Xiong, and K. Grauman. FusionSeg: Learning to combine motion and appearance for fully automatic segmention of generic objects in videos. In Proc. CVPR, 2017. 1, 2 [24] V. Jampani, R. Gadde, and P. V. Gehler. Video propagation networks. In Proc. CVPR, 2017. 6, 7 [25] A. Khoreva, R. Benenson, E. Ilg, T. Brox, and B. Schiele. Lucid data dreaming for object tracking. arXiv preprint arXiv:1703.09554, 2017. 1, 2 [26] A. Khoreva, F. Perazzi, R. Benenson, B. Schiele, and A.Sorkine-Hornung. Learning video object segmentation from static images. In Proc. CVPR, 2017. 1, 2, 6, 7 [27] D. Kingma and J. Ba. Adam: A method for stochastic optimization. In Proc. ICLR, 2014. 6 [28] Y. J. Lee, J. Kim, and K. Grauman. Key-segments for video object segmentation. In Proc. ICCV, 2011. 2 [29] J. Lezama, K. Alahari, J. Sivic, and I. Laptev. Track to the future: Spatio-temporal video segmentation with long-range motion cues. In Proc. CVPR, 2011. 2 [30] F. Li, T. Kim, A. Humayun, D. Tsai, and J. Rehg. Video segmentation by tracking many figure- ground segments. In Proc. ICCV, 2013. 1, 2, 7 [31] W. Li, F. Viola, J. Starck, G. J. Brostow, and N. D. Campbell. Roto++: Accelerating professional rotoscoping using shape manifolds. ACM TOG (Proc. SIGGRAPH), 2016. 2 [32] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In Proc. CVPR, 2015. 2 [33] N. Maerki, F. Perazzi, O. Wang, and A. Sorkine-Hornung. Bilateral space video segmentation. In Proc. CVPR, 2016. 2, 6 [34] N. Nagaraja, F. Schmidt, and T. Brox. Video segmentation with just a few strokes. In Proc. ICCV, 2015. 2 [35] P. Ochs, J. Malik, and T. Brox. Segmentation of moving objects by long term video analysis. TPAMI, 2014. 2 9 [36] A. Papazoglou and V. Ferrari. Fast object segmentation in unconstrained video. In Proc. ICCV, 2013. 2 [37] F. Perazzi, J. Pont-Tuset, B. McWilliams, L. V. Gool, M. Gross, and A. Sorkine-Hornung. A benchmark dataset and evaluation methodology for video object segmentation. In Proc. CVPR, 2016. 1, 2, 5, 6, 7 [38] F. Perazzi, O. Wang, M. Gross, and A. Sorkine-Hornung. Fully connected object proposals for video segmentation. In Proc. ICCV, 2015. 6 [39] J. Pont-Tuset, F. Perazzi, S. Caelles, P. Arbeláez, A. Sorkine-Hornung, and L. Van Gool. The 2017 davis challenge on video object segmentation. arXiv preprint arXiv:1704.00675, 2017. 1, 5, 7 [40] B. L. Price, B. S. Morse, and S. Cohen. LIVEcut: Learning-based interactive video segmentation by evaluation of multiple propagated cues. In Proc. ICCV, 2009. 2 [41] Y. Ren, C. S. Chua, and Y. K. Ho. Statistical background modeling for non-stationary camera. PRL, 2003. 1 [42] A. G. Schwing and R. Urtasun. Fully Connected Deep Structured Networks. In https://arxiv.org/abs/1503.02351, 2015. 2 [43] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In Proc. ICLR, 2015. 4 [44] P. H. S. Torr and A. Zisserman. Concerning bayesian motion segmentation, model averaging, matching and the trifocal tensor. In Proc. ECCV, 1998. 1 [45] D. Tsai, M. Flagg, and J. Rehg. Motion coherent tracking with multi-label mrf optimization. In Proc. BMVC, 2010. 1, 2 [46] Y.-H. Tsai, M.-H. Yang, and M. J. Black. Video Segmentation via Object Flow. In Proc. CVPR, 2016. 1, 2, 6, 7 [47] S. Vijayanarasimhan and K. Grauman. Active frame selection for label propagation in videos. In Proc. ECCV, 2012. 1 [48] F. Xiao and Y. J. Lee. Track and segment: An iterative unsupervised approach for video object proposals. In Proc. CVPR, 2016. 2 [49] C. Yuan, G. Medioni, J. Kang, and I. Cohen. Detecting motion regions in the presence of a strong parallax from a moving camera by multiview geometric constraints. PAMI, 2007. 1 [50] D. Zhang, O. Javed, and M. Shah. Video object segmentation through spatially accurate and temporally dense extraction of primary object regions. In Proc. CVPR, 2013. 2 10 | 2017 | 283 |
6,767 | Max-Margin Invariant Features from Transformed Unlabeled Data Dipan K. Pal, Ashwin A. Kannan∗, Gautam Arakalgud∗, Marios Savvides Department of Electrical and Computer Engineering Carnegie Mellon University Pittsburgh, PA 15213 {dipanp,aalapakk,garakalgud,marioss}@cmu.edu Abstract The study of representations invariant to common transformations of the data is important to learning. Most techniques have focused on local approximate invariance implemented within expensive optimization frameworks lacking explicit theoretical guarantees. In this paper, we study kernels that are invariant to a unitary group while having theoretical guarantees in addressing the important practical issue of unavailability of transformed versions of labelled data. A problem we call the Unlabeled Transformation Problem which is a special form of semisupervised learning and one-shot learning. We present a theoretically motivated alternate approach to the invariant kernel SVM based on which we propose MaxMargin Invariant Features (MMIF) to solve this problem. As an illustration, we design an framework for face recognition and demonstrate the efficacy of our approach on a large scale semi-synthetic dataset with 153,000 images and a new challenging protocol on Labelled Faces in the Wild (LFW) while out-performing strong baselines. 1 Introduction It is becoming increasingly important to learn well generalizing representations that are invariant to many common nuisance transformations of the data. Indeed, being invariant to intra-class transformations while being discriminative to between-class transformations can be said to be one of the fundamental problems in pattern recognition. The nuisance transformations can give rise to many ‘degrees of freedom’ even in a constrained task such as face recognition (e.g. pose, age-variation, illumination etc.). Explicitly factoring them out leads to improvements in recognition performance as found in [10, 7, 6]. It has also been shown that that features that are explicitly invariant to intra-class transformations allow the sample complexity of the recognition problem to be reduced [2]. To this end, the study of invariant representations and machinery built on the concept of explicit invariance is important. Invariance through Data Augmentation. Many approaches in the past have enforced invariance by generating transformed labelled training samples in some form such as [13, 17, 19, 9, 15, 4]. Perhaps, one of the most popular method for incorporating invariances in SVMs is the virtual support method (VSV) in [18], which used sequential runs of SVMs in order to find and augment the support vectors with transformed versions of themselves. Indecipherable transformations in data leads to shortage of transformed labelled samples. The above approaches however, assume that one has explicit knowledge about the transformation. This is a strong assumption. Indeed, in most general machine learning applications, the transformation ∗Authors contributed equally 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. present in the data is not clear and cannot be modelled easily, e.g. transformations between different views of a general 3D object and between different sentences articulated by the same person. Methods which work on generating invariance by explicitly transforming or augmenting labelled training data cannot be applied to these scenarios. Further, in cases where we do know the transformations that exist and we actually can model them, it is difficult to generate transformed versions of very large labelled datasets. Hence there arises an important problem: how do we train models to be invariant to transformations in test data, when we do not have access to transformed labelled training samples ? Transformed unlabeled data Non-transformed labeled data Train invariant to Test image not invariant to Train Figure 1: Max-Margin Invariant Features (MMIF) can solve an important problem we call the Unlabeled Transformation Problem. In the figure, a traditional classifier F(x) "learns" invariance to nuisance transformations directly from the labeled dataset X. On the other hand, our approach (MMIF) can incorporate additional invariance learned from any unlabeled data that undergoes the nuisance transformation of interest. Availability of unlabeled transformed data. Although it is difficult to obtain or generate transformed labelled data (due to the reasons mentioned above), unlabeled transformed data is more readily available. For instance, if different views of specific objects of interest are not available, one can simply collect views of general objects. Also, if different sentences spoken by a specific group of people are not available, one can simply collect those spoken by members of the general population. In both these scenarios, no explicit knowledge or model of the transformation is needed, thereby bypassing the problem of indecipherable transformations. This situation is common in vision e.g. only unlabeled transformed images are observed, but has so far mostly been addressed by the community by intense efforts in large scale data collection. Note that the transformed data that is collected is not required to be labelled. We now are in a position to state the central problem that this paper addresses. The Unlabeled Transformation (UT) Problem: Having access to transformed versions of the training unlabeled data but not of labelled data, how do we learn a discriminative model of the labelled data, while being invariant to transformations present in the unlabeled data ? Overall approach. The approach presented in this paper however (see Fig. 1), can solve this problem and learn invariance to transformations observed only through unlabeled samples and does not need labelled training data augmentation. We explicitly and simultaneously address both problems of generating invariance to intra-class transformation (through invariant kernels) and being discriminative to inter or between class transformations (through max-margin classifiers). Given a new test sample, the final extracted feature is invariant to the transformations observed in the unlabeled set, and thereby generalizes using just a single example. This is an example of one-shot learning. Prior Art: Invariant Kernels. Kernel methods in machine learning have long been studied to considerable depth. Nonetheless, the study of invariant kernels and techniques to extract invariant features has received much less attention. An invariant kernel allows the kernel product to remain invariant under transformations of the inputs. Most instances of incorporating invariances focused on local invariances through regularization and optimization such as [18, 19, 3, 21]. Some other techniques were jittering kernels [17, 3] and tangent-distance kernels [5], both of which sacrificed the positive semi-definite property of its kernels and were computationally expensive. Though these methods have had some success, most of them still lack explicit theoretical guarantees towards invariance. The proposed invariant kernel SVM formulation on the other hand, develops a valid PSD kernel that is guaranteed to be invariant. [4] used group integration to arrive at invariant kernels but did not address the Unlabeled Transformation problem which our proposed kernels do address. Further, our proposed kernels allow for the formulation of the invariant SVM and application to large scale problems. Recently, [14] presented some work with invariant kernels. However, unlike our non-parametric formulation, they do not learn the group transformations from the data itself and assume known parametric transformations (i.e. they assume that transformation is computable). Key ideas. The key ideas in this paper are twofold. 2 1. The first is to model transformations using unitary groups (or sub-groups) leading to unitarygroup invariant kernels. Unitary transforms allow the dot product to be preserved and allow for interesting generalization properties leading to low sample complexity and also allow learning transformation invariance from unlabeled examples (thereby solving the Unlabeled Transformation Problem). Classes of learning problems, such as vision, often have transformations belonging to a unitary-group, that one would like to be invariant towards (such as translation and rotation). In practice however, [8] found that invariance to much more general transformations not captured by this model can been achieved. 2. Secondly, we combine max-margin classifiers with invariant kernels leading to non-linear max-margin unitary-group invariant classifiers. These theoretically motivated invariant non-linear SVMs form the foundation upon which Max-Margin Invariant Features (MMIF) are based. MMIF features can effectively solve the important Unlabeled Transformation Problem. To the best of our knowledge, this is the first theoretically proven formulation of this nature. Contributions. In contrast to many previous studies on invariant kernels, we study non-linear positive semi-definite unitary-group invariant kernels guaranteeing invariance that can address the UT Problem. One of our central theoretical results to applies group integration in the RKHS. It builds on the observation that, under unitary restrictions on the kernel map, group action in the input space is reciprocated in the RKHS. Using the proposed invariant kernel, we present a theoretically motivated approach towards a non-linear invariant SVM that can solve the UT Problem with explicit invariance guarantees. As our main theoretical contribution, we showcase a result on the generalization of max-margin classifiers in group-invariant subspaces. We propose Max-Margin Invariant Features (MMIF) to learn highly discriminative non-linear features that also solve the UT problem. On the practical side, we propose an approach to face recognition to combine MMIFs with a pre-trained deep learning feature extractor (in our case VGG-Face [12]). MMIF features can be used with deep learning whenever there is a need to focus on a particular transformation in data (in our application pose in face recognition) and can further improve performance. 2 Unitary-Group Invariant Kernels Premise: Consider a dataset of normalized samples along with labels X = {xi}, Y = {yi} ∀i ∈ 1...N with x ∈Rd and y ∈{+1, −1}. We now introduce into the dataset a number of unitary transformations g part of a locally compact unitary-group G. We note again that the set of transformations under consideration need not be the entire unitary group. They could very well be a subgroup. Our augmented normalized dataset becomes {gxi, yi} ∀g ∈G ∀i. For clarity, we denote by gx the action of group element g ∈G on x, i.e. gx = g(x). We also define an orbit of x under G as the set XG = {gx} ∀g ∈G. Clearly, X ⊆XG. An invariant function is defined as follows. Definition 2.1 (G-Invariant Function). For any group G, we define a function f : X →Rn to be G-invariant if f(x) = f(gx) ∀x ∈X ∀g ∈G. One method of generating an invariant towards a group is through group integration. Group integration has stemmed from classical invariant theory and can be shown to be a projection onto a G-invariant subspace for vector spaces. In such a space x = gx ∀g ∈G and thus the representation x is invariant under the transformation of any element from the group G. This is ideal for recognition problems where one would want to be discriminative to between-class transformations (for e.g. between distinct subjects in face recognition) but be invariant to within-class transformations (for e.g. different images of the same subject). The set of transformations we model as G are the within-class transformations that we would like to be invariant towards. An invariant to any group G can be generated through the following basic (previously) known property (Lemma 2.1) based on group integration. Lemma 2.1. (Invariance Property) Given a vector ω ∈Rd, and any affine group G, for any fixed g′ ∈G and a normalized Haar measure dg, we have g′ R G gω dg = R G gω dg The Haar measure (dg) exists for every locally compact group and is unique up to a positive multiplicative constant (hence normalized). A similar property holds for discrete groups. Lemma 2.1 results in the quantity R G gω dg enjoy global invariance (encompassing all elements) to group G. This property allows one to generate a G-invariant subspace in the inherent space Rd through group integration. In practice, the integral corresponds to a summation over transformed samples. The 3 following two lemmas (novel results, and part of our contribution) (Lemma 2.2 and 2.3) showcase elementary properties of the operator Ψ = R G g dg for a unitary-group G 2. These properties would prove useful in the analysis of unitary-group invariant kernels and features. Lemma 2.2. If Ψ = R G g dg for unitary G, then ΨT = Ψ Lemma 2.3. (Unitary Projection) If Ψ = R G g dg for any affine G, then ΨΨ = Ψ, i.e. it is a projection operator. Further, if G is unitary, then ⟨ω, Ψω′⟩= ⟨Ψω, ω′⟩∀ω, ω′ ∈Rd Sample Complexity and Generalization. On applying the operator Ψ to the dataset X, all points in the set {gx | g ∈G} for any x ∈X map to the same point Ψx in the G-invariant subspace thereby reducing the number of distinct points by a factor of |G| (the cardinality of G, if G is finite). Theoretically, this would drastically reduce sample complexity while preserving linear feasibility (separability). It is trivial to observe that a perfect linear separator learned in XΨ = {Ψx | x ∈ X} would also be a perfect separator for XG, thus in theory achieving perfect generalization. Generalization here refers to the ability to perform correct classification even in the presence of the set of transformations G. We prove a similar result for Reproducing Kernel Hilbert Spaces (RKHS) in Section 2.2. This property is theoretically powerful since cardinality of G can be large. A classifier can avoid having to observe transformed versions {gx} of any x and yet generalize perfectly. The case of Face Recognition. As an illustration, if the group G of transformations considered is pose (it is hypothesized that small changes in pose can be modeled as unitary [10]), then Ψ = R G g dg represents a pose invariant subspace. In theory, all poses of a subject will converge to the same point in that subspace leading to near perfect pose invariant recognition. We have not yet leveraged the power of the unitary structure of the groups which is also critical in generalization to test cases as we would see later. We now present our central result showcasing that unitary kernels allow the unitary group action to reciprocate in a Reproducing Kernel Hilbert Space. This is critical to set the foundation for our core method called Max-Margin Invariant Features. 2.1 Group Actions Reciprocate in a Reproducing Kernel Hilbert Space Group integration provides exact invariance as seen in the previous section. However, it requires the group structure to be preserved, i.e. if the group structure is destroyed, group integration does not provide an invariant function. In the context of kernels, it is imperative that the group relation between the samples in XG be preserved in the kernel Hilbert space H corresponding to some kernel k with a mapping φ. If the kernel k is unitary in the following sense, then this is possible. Definition 2.2 (Unitary Kernel). A kernel k(x, y) = ⟨φ(x), φ(y)⟩is a unitary kernel if, for a unitary group G, the mapping φ(x) : X →H satisfies ⟨φ(gx), φ(gy)⟩= ⟨φ(x), φ(y)⟩∀g ∈G, ∀x, y ∈X. The unitary condition is fairly general, a common class of unitary kernels is the RBF kernel. We now define a transformation within the RKHS itself as gH : φ(x) →φ(gx) ∀φ(x) ∈H for any g ∈G where G is a unitary group. We then have the following result of significance. Theorem 2.4. (Covariance in the RKHS) If k(x, y) = ⟨φ(x), φ(y)⟩is a unitary kernel in the sense of Definition 2.2, then gH is a unitary transformation, and the set GH = {gH | gH : φ(x) →φ(gx) ∀g ∈ G} is a unitary-group in H. Theorem 2.4 shows that the unitary-group structure is preserved in the RKHS. This paves the way for new theoretically motivated approaches to achieve invariance to transformations in the RKHS. There have been a few studies on group invariant kernels [4, 10]. However, [4] does not examine whether the unitary group structure is actually preserved in the RKHS, which is critical. Also, DIKF was recently proposed as a method utilizing group structure under the unitary kernel [10]. Our result is a generalization of the theorems they present. Theorem 2.4 shows that since the unitary group structure is preserved in the RKHS, any method involving group integration would be invariant in the original space. The preservation of the group structure allows more direct group invariance results to be applied in the RKHS. It also directly allows one to formulate a non-linear SVM while guaranteeing invariance theoretically leading to Max-Margin Invariant Features. 2All proofs are presented in the supplementary material 4 2.2 Invariant Non-linear SVM: An Alternate Approach Through Group Integration We now apply the group integration approach to the kernel SVM. The decision function of SVMs can be written in the general form as fθ(x) = ωT φ(x) + b for some bias b ∈R (we agglomerate all parameters of f in θ) where φ is the kernel feature map, i.e. φ : X →H. Reviewing the SVM, a maximum margin separator is found by minimizing loss functions such as the hinge loss along with a regularizer. In order to invoke invariance, we can now utilize group integration in the the kernel space H using Theorem 2.4. All points in the set {gx ∈XG} get mapped to φ(gx) = gHφ(x) for a given g ∈G in the input space X. Group integration then results in a G-invariant subspace within H through ΨH = R GH gH dgH using Lemma 2.1. Introducing Lagrange multipliers α = (α1, α2...αN) ∈RN, the dual formulation (utilizing Lemma 2.2 and Lemma 2.3) then becomes min α − X i αi + 1 2 X i,j yiyjαiαj⟨ΨHφ(xi), ΨHφ(xj)⟩ (1) under the constraints P i αiyi = 0, 0 ≤αi ≤ 1 N ∀i. The SVM separator is then given by ω∗ H = ΨHω∗= P i yiαiΨHφ(xi) thereby existing in the GH-invariant (or equivalently G-invariant) subspace ΨH within H (since g →gH is a bijection). Effectively, the SVM observes samples from XΨH = {x | φ(x) = ΨHφ(u), ∀u ∈XG} and therefore ω∗ H enjoys exact global invariance to G. Further, ΨHω∗is a maximum-margin separator of {φ(XG)} (i.e. the set of all transformed samples). This can be shown by the following result. Theorem 2.5. (Generalization) For a unitary group G and unitary kernel k(x, y) = ⟨φ(x), φ(y)⟩, if ω∗ H = ΨHω∗= ( R GH gH dgH) ω∗is a perfect separator for {ΨHφ(X)} = {ΨHφ(x) | ∀x ∈X}, then ΨHω∗is also a perfect separator for {φ(XG)} = {φ(x) | x ∈XG} with the same margin. Further, a max-margin separator of {ΨHφ(X)} is also a max-margin separator of {φ(XG)}. The invariant non-linear SVM in objective 1, observes samples in the form of ΨHφ(x) and obtains a max-margin separator ΨHω∗. This allows for the generalization properties of max-margin classifiers to be combined with those of group invariant classifiers. While being invariant to nuisance transformations, max-margin classifiers can lead to highly discriminative features (more robust than DIKF [10] as we find in our experiments) that are invariant to within-class transformations. Theorem 2.5 shows that the margins of φ(XG) and {ΨHφ(XG)} are deeply related and implies that ΨHφ(x) is a max-margin separator for both datasets. Theoretically, the invariant non-linear SVM is able to generalize to XG on just observing X and utilizing prior information in the form of G for all unitary kernels k. This is true in practice for linear kernels. For non-linear kernels in practice, the invariant SVM still needs to observe and integrate over transformed training inputs. Leveraging unitary group properties. During test time to achieve invariance, the SVM would require to observe and integrate over all possible transformations of the test sample. This is a huge computational and design bottleneck. We would ideally want to achieve invariance and generalize by observing just a single test sample, in effect perform one shot learning. This would not only be computationally much cheaper but make the classifier powerful owing to generalization to full transformed orbits of test samples by observing just that single sample. This is where unitarity of g helps and we leverage it in the form of the following Lemma. Lemma 2.6. (Invariant Projection) If Ψ = R G g dg for any unitary group G, then for any fixed g′ ∈G (including the identity element) we have ⟨Ψx′, Ψω′⟩= ⟨g′x′, Ψω′⟩∀ω, ω′ ∈Rd Assuming Ψω′ is the learned SVM classifier, Lemma 2.6 shows that for any test x′, the invariant dot product ⟨Ψx′, Ψω′⟩which involves observing all transformations of x′ is equivalent to the quantity ⟨g′x′, Ψω′⟩which involves observing only one transformation of x′. Hence one can model the entire orbit of x′ under G by a single sample g′x′ where g′ ∈G can be any particular transformation including identity. This drastically reduces sample complexity and vastly increases generalization capabilities of the classifier since one only need to observe one test sample to achieve invariance Lemma 2.6 also helps us in saving computation, allowing us to apply the computationally expensive Ψ (group integration) operation only once on he classifier and not the test sample. Thus, the kernel in the Invariant SVM formulation can be replaced by the form kΨ(x, y) = ⟨φ(x), ΨHφ(y)⟩. For kernels in general, the GH-invariant subspace cannot be explicitly computed since it lies in the RKHS. It is only implicitly projected upon through ΨHφ(xi) = R G φ(gxi)dgH. It is important to 5 Class 1 Class 2 Class 3 Class 4 Test Image Kernel Invariant Feature Integration over the group (pooling) (a) Invariant kernel feature extraction Test Image (b) SVM feature extraction leading to MMIF features Figure 2: MMIF Feature Extraction. (a) l(x) denotes the invariant kernel feature of any x which is invariant to the transformation G. Invariance is generated by group integration (or pooling). The invariant kernel feature learns invariance form the unlabeled transformed template set TG. Also, the faces depicted are actual samples from the large-scale mugshots data (∼153, 000 images). (b) Once the invariant features have been extracted for the labelled non-transformed dataset X, then the SVMs learned act as feature extractors. Each binary class SVM (different color) was trained on the invariant kernel feature of a random subset of l(X) with random class assignments. The final MMIF feature for x is the concatenation of all SVM inner-products with l(x). note that during testing however, the SVM formulation will be invariant to transformations of the test sample regardless of a linear or non-linear kernel. Positive Semi-Definiteness. The G-invariant kernel map is now of the form kΨ(x, y) = ⟨φ(x), R G φ(gy)dgH⟩. This preserves the positive semi-definite property of the kernel k while guaranteeing global invariance to unitary transformations., unlike jittering kernels [17, 3] and tangent-distance kernels [5]. If we wish to include invariance to scaling however (in the sense of scaling an image), then we would lose positive-semi-definiteness (it is also not a unitary transform). Nonetheless, [20] show that conditionally positive definite kernels still exist for transformations including scaling, although we focus of unitary transformations in this paper. 3 Max-Margin Invariant Features The previous section utilized a group integration approach to arrive a theoretically invariant non-linear SVM. It however does not address the Unlabeled Transformation problem i.e. the kernel kΨ(x, y) = ⟨ΨHφ(x), ΨHφ(y)⟩= ⟨ R G φ(gx)dgH, R G φ(gy)dgH⟩still requires observing transformed versions of the labelled input sample namely {gx | gx ∈XG} (or atleast one of the labelled samples if we utilize Lemma 2.6). We now present our core approach called Max-Margin Invariant Features (MMIF) that does not require the observation of any transformed labelled training sample whatsoever. Assume that we have access to an unlabeled set of M templates T = {ti}i={1,...M}. We assume that we can observe all transformations under a unitary-group G, i.e. we have access to TG = {gti | ∀g ∈ G}i={1,...M}. Also, assume we have access to a set X = {xj}i={1,...D} of labelled data with N classes which are not transformed. We can extract an M-dimensional invariant kernel feature for each xj ∈X as follows. Let the invariant kernel feature be l(x) ∈RM to explicitly show the dependence on x. Then the ith dimension of l for any particular x is computed as l(x)i = ⟨φ(x), ΨHφ(ti)⟩= ⟨φ(x), Z G gHφ(ti)dgH⟩= ⟨φ(x), Z G φ(gti)dgH⟩ (2) The first equality utilizes Lemma 2.6 and the third equality uses Theorem 2.4. This is equivalent to observing all transformations of x since ⟨φ(x), ΨHφ(ti)⟩= ⟨ΨHφ(x), φ(ti)⟩using Lemma 2.3. Thereby we have constructed a feature l(x) which is invariant to G without ever needing to observe transformed versions of the labelled vector x. We now briefly the training of the MMIF feature extractor. The matching metrics we use for this study is normalized cosine distance. 6 Training MMIF SVMs. To learn a K-dimensional MMIF feature (potentially independent of N), we learn K independent binary-class linear SVMs. Each SVM trains on the labelled dataset l(X) = {l(xj) | j = {1, ...D}} with each sample being label +1 for some subset of the N classes (potentially just one class) and the rest being labelled −1. This leads us to a classifier in the form of ωk = P j yjαjl(xj). Here, yj is the label of xj for the kth SVM. It is important to note that the unlabeled data was only used to extract l(xj). Having multiple classes randomly labelled as positive allows the SVM to extract some feature that is common between them. This increases generalization by forcing the extracted feature to be more general (shared between multiple classes) rather than being highly tuned to a single class. Any K-dimensional MMIF feature can be trained through this technique leading to a higher dimensional feature vector useful in case where one has limited labelled samples and classes (N is small). During feature extraction, the K inner products (scores) of the test sample x′ with the K distinct binary-class SVMs provides the K-dimensional MMIF feature vector. This feature vector is highly discriminative due to the max-margin nature of SVMs while being invariant to G due to the invariant kernels. MMIF. Given TG and X, the MMIF feature is defined as MMIF(x′) ∈RK for any test x′ with each dimension k being computed as ⟨l(x′), ωk⟩for ωk = P j yjαjl(xj) ∀xj ∈X. Further, l(x′) ∈RM ∀x with each dimension i being l(x′)i = ⟨φ(x′), ΨHφ(ti)⟩. The process is illustrated in Fig. 2. Inheriting transformation invariance from transformed unlabeled data: A special case of semisupervised learning. MMIF features can learn to be invariant to transformations (G) by observing them only through TG. It can then transfer the invariance knowledge to new unseen samples from X thereby becoming invariant to XG despite never having observed any samples from XG. This is a special case of semi-supervised learning where we leverage on the specific transformations present in the unlabeled data. This is a very useful property of MMIFs allowing one to learn transformation invariance from one source and sample points from another source while having powerful discrimination and generalization properties. The property is can be formally stated as the following Theorem. Theorem 3.1. (MMIF is invariant to learnt transformations) MMIF(x′) = MMIF(gx′) ∀x′∀g ∈G where G is observed only through TG = {gti | ∀g ∈G}i={1,...M}. Thus we find that MMIF can solve the Unlabeled Transformation Problem. MMIFs have an invariant and a discriminative component. The invariant component of MMIF allows it to generalize to new transformations of the test sample whereas the discriminative component allows for robust classification due to max-margin classifiers. These two properties allow MMIFs to be very useful as we find in our experiments on face recognition. Max and Mean Pooling in MMIF. Group integration in practice directly results in mean pooling. Recent work however, showed that group integration can be treated as a subset of I-theory where one tries to measure moments (or a subset of) of the distribution ⟨x, gω⟩g ∈G since the distribution itself is also an invariant [1]. Group integration can be seen as measuring the mean or the first moment of the distribution. One can also characterize using the infinite moment or the max of the distribution. We find in our experiments that max pooling outperforms mean pooling in general. All results in this paper however, still hold under the I-theory framework. MMIF on external feature extractors (deep networks). MMIF does not make any assumptions regarding its input and hence one can apply it to features extracted from any feature extractor in general. The goal of any feature extractor is to (ideally) be invariant to within-class transformation while maximizing between-class discrimination. However, most feature extractors are not trained to explicitly factor out specific transformations. If we have access to even a small dataset with the transformation we would like to be invariant to, we can transfer the invariance using MMIFs (e.g. it is unlikely to observe all poses of a person in datasets, but pose is an important nuisance transformation). Modelling general non-unitary transformations. General non-linear transformations such as out-of-plane rotation or pose variation are challenging to model. Nonetheless, a small variation in these transformations can be approximated by some unitary G assuming piece wise linearity through transformation-dependent sub-manifold unfolding [11]. Further, it was found that in practice, integrating over general transformations produced approximate invariance [8]. 7 False Accept Rate 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Verification Rate 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 ℓ∞-DIKF (0.74) ℓ1-DIKF (0.61) NDP-ℓ∞(0.41) NDP-ℓ1 (0.32) MMIF (Ours) (0.78) VGG Features (0.55) MMIF-VGG (Ours) (0.61) (a) Invariant kernel feature extraction False Accept Rate 10-8 10-7 10-6 10-5 10-4 10-3 10-2 10-1 100 Verification Rate 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 MMIF VGG (Ours)(0.71) VGG (0.56) (b) SVM feature extraction leading to MMIF features Figure 3: (a) Pose-invariant face recognition results on the semi-synthetic large-scale mugshot database (testing on 114,750 images). Operating on pixels: MMIF (Pixels) outperforms invariance based methods DIKF [10] and invariant NDP [8]. Operating on deep features: MMIF trained on VGG-Face features [12] (MMIF-VGG) produces a significant improvement in performance. The numbers in the brackets represent VR at 0.1% FAR. (b) Face recognition results on LFW with raw VGG-Face features and MMIF trained on VGG-Face features. The values in the bracket show VR at 0.1% FAR. 4 Experiments on Face Recognition As illustration, we apply MMIFs using two modalities overall 1) on raw pixels and 2) on deep features from the pre-trained VGG-Face network [12]. We provide more implementation details and results discussion in the supplementary. A. MMIF on a large-scale semi-synthetic mugshot database (Raw-pixels and deep features). We utilize a large-scale semi-synthetic face dataset to generate the sets TG and X for MMIF. In this dataset, only two major transformations exist, that of pose variation and subject variation. All other transformations such as illumination, translation, rotation etc are strictly and synthetically controlled. This provides a very good benchmark for face recognition. where we want to be invariant to pose variation and be discriminative for subject variation. The experiment follows the exact protocol and data as described in [10] 3 We test on 750 subjects identities with 153 pose varied real-textured gray-scale image each (a total of 114,750 images) against each other resulting in about 13 billion pair-wise comparisons (compared to 6,000 for the standard LFW protocol). Results are reported as ROC curves along with VR at 0.1% FAR. Fig. 3(a) shows the ROC curves for this experiment. We find that MMIF features out-performs all baselines including VGG-Face features (pre-trained), DIKF and NDP approaches thereby demonstrating superior discriminability while being able to effectively capture pose-invariance from the transformed template set TG. MMIF is able to solve the Unlabeled Transformation problem by extracting transformation information from unlabeled TG. B. MMIF on LFW (deep features): Unseen subject protocol. In order to be able to effectively train under the scenario of general transformations and to challenge our algorithms, we define a new much harder protocol on LFW. We choose the top 500 subjects with a total of 6,300 images for training MMIF on VGG-Face features and test on the remaining subjects with 7,000 images. We perform all versus all matching, totalling upto 49 million matches (4 orders more than the official protocol). The evaluation metric is defined to be the standard ROC curve with verification rate reported at 0.1% false accept rate. We split the 500 subjects into two sets of 250 and use as TG and X. We do not use any alignment for this experiment, and the faces were cropped according to [16]. Fig. 3(b) shows the results of this experiment. We see that MMIF on VGG features significantly outperforms raw VGG on this protocol, boosting the VR at 0.1% FAR from 0.56 to 0.71. This demonstrates that MMIF is able to generate invariance for highly non-linear transformations that are not well-defined rendering it useful in real-world scenarios where transformations are unknown but observable. 3We provide more details in the supplementary. Also note that we do not need utilize identity information, all that is required is the fact that a set of pose varied images belong to the same subject. Such data can be obtained through temporal sampling. 8 References [1] F. Anselmi, J. Z. Leibo, L. Rosasco, J. Mutch, A. Tacchetti, and T. Poggio. Magic materials: a theory of deep hierarchical architectures for learning sensory representations. MIT, CBCL paper, 2013. [2] F. Anselmi, J. Z. Leibo, L. Rosasco, J. Mutch, A. Tacchetti, and T. Poggio. Unsupervised learning of invariant representations in hierarchical architectures. CoRR, abs/1311.4158, 2013. [3] D. Decoste and B. Schölkopf. Training invariant support vector machines. Mach. Learn., 46(1-3):161–190, Mar. 2002. [4] B. Haasdonk and H. Burkhardt. Invariant kernel functions for pattern analysis and machine learning. In Machine Learning, pages 35–61, 2007. [5] B. Haasdonk and D. Keysers. Tangent distance kernels for support vector machines. In Pattern Recognition, 2002. Proceedings. 16th International Conference on, volume 2, pages 864–868 vol.2, 2002. [6] G. E. Hinton. Learning translation invariant recognition in a massively parallel networks. In PARLE Parallel Architectures and Languages Europe, pages 1–13. Springer, 1987. [7] J. Z. Leibo, Q. Liao, and T. Poggio. Subtasks of unconstrained face recognition. In International Joint Conference on Computer Vision, Imaging and Computer Graphics, VISIGRAPP, 2014. [8] Q. Liao, J. Z. Leibo, and T. Poggio. Learning invariant representations and applications to face verification. Advances in Neural Information Processing Systems (NIPS), 2013. [9] P. Niyogi, F. Girosi, and T. Poggio. Incorporating prior information in machine learning by creating virtual examples. In Proceedings of the IEEE, pages 2196–2209, 1998. [10] D. K. Pal, F. Juefei-Xu, and M. Savvides. Discriminative invariant kernel features: a bells-and-whistles-free approach to unsupervised face recognition and pose estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5590–5599, 2016. [11] S. W. Park and M. Savvides. An extension of multifactor analysis for face recognition based on submanifold learning. In Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on, pages 2645– 2652. IEEE, 2010. [12] O. M. Parkhi, A. Vedaldi, and A. Zisserman. Deep face recognition. 2015. [13] T. Poggio and T. Vetter. Recognition and structure from one 2d model view: Observations on prototypes, object classes and symmetries. Laboratory, Massachusetts Institute of Technology, 1992. [14] A. Raj, A. Kumar, Y. Mroueh, T. Fletcher, and B. Schölkopf. Local group invariant representations via orbit embeddings. In Proceedings of the 20th International Conference on Artificial Intelligence and Statistics (AISTATS 2017), volume 54 of Proceedings of Machine Learning Research, pages 1225–1235, 2017. [15] M. Reisert. Group integration techniques in pattern analysis – a kernel view. PhD Thesis, 2008. [16] C. Sanderson and B. C. Lovell. Multi-region probabilistic histograms for robust and scalable identity inference. In International Conference on Biometrics, pages 199–208. Springer, 2009. [17] B. Schölkopf and A. J. Smola. Learning with kernels: Support vector machines, regularization, optimization, and beyond. MIT press, 2002. [18] B. Schölkopf, C. Burges, and V. Vapnik. Incorporating invariances in support vector learning machines. pages 47–52. Springer, 1996. [19] B. Schölkopf, P. Simard, A. Smola, and V. Vapnik. Prior knowledge in support vector kernels. Advances in Neural Information Processing Systems (NIPS), 1998. [20] C. Walder and O. Chapelle. Learning with transformation invariant kernels. In Advances in Neural Information Processing Systems, pages 1561–1568, 2007. [21] X. Zhang, W. S. Lee, and Y. W. Teh. Learning with invariance via linear functionals on reproducing kernel hilbert space. In Advances in Neural Information Processing Systems, pages 2031–2039, 2013. 9 | 2017 | 284 |
6,768 | Sparse Approximate Conic Hulls Gregory Van Buskirk, Benjamin Raichel, and Nicholas Ruozzi Department of Computer Science University of Texas at Dallas Richardson, TX 75080 {greg.vanbuskirk, benjamin.raichel, nicholas.ruozzi}@utdallas.edu Abstract We consider the problem of computing a restricted nonnegative matrix factorization (NMF) of an m × n matrix X. Specifically, we seek a factorization X ≈BC, where the k columns of B are a subset of those from X and C ∈Rk×n ≥0 . Equivalently, given the matrix X, consider the problem of finding a small subset, S, of the columns of X such that the conic hull of S ε-approximates the conic hull of the columns of X, i.e., the distance of every column of X to the conic hull of the columns of S should be at most an ε-fraction of the angular diameter of X. If k is the size of the smallest ε-approximation, then we produce an O(k/ε2/3) sized O(ε1/3)-approximation, yielding the first provable, polynomial time ε-approximation for this class of NMF problems, where also desirably the approximation is independent of n and m. Furthermore, we prove an approximate conic Carathéodory theorem, a general sparsity result, that shows that any column of X can be ε-approximated with an O(1/ε2) sparse combination from S. Our results are facilitated by a reduction to the problem of approximating convex hulls, and we prove that both the convex and conic hull variants are d-SUM-hard, resolving an open problem. Finally, we provide experimental results for the convex and conic algorithms on a variety of feature selection tasks. 1 Introduction Matrix factorizations of all sorts (SVD, NMF, CU, etc.) are ubiquitous in machine learning and computer science. In general, given an m × n matrix X, the goal is to find a decomposition into a product of two matrices B ∈Rm×k and C ∈Rk×n such that the Frobenius norm between X and BC is minimized. If no further restrictions are placed on the matrices B and C, this problem can be solved optimally by computing the singular value decomposition. However, imposing restrictions on B and C can lead to factorizations which are more desirable for reasons such as interpretability and sparsity. One of the most common restrictions is non-negative matrix factorization (NMF), requiring B and C to consist only of non-negative entries (see [Berry et al., 2007] for a survey). Practically, NMF has seen widespread usage as it often produces nice factorizations that are frequently sparse. Typically NMF is accomplished by applying local search heuristics, and while NMF can be solved exactly in certain cases (see [Arora et al., 2016]), in general NMF is not only NP-hard [Vavasis, 2009] but also d-SUM-hard [Arora et al., 2016]. One drawback of factorizations such as SVD or NMF is that they can represent the data using a basis that may have no clear relation to the data. CU decompositions [Mahoney and Drineas, 2009] address this by requiring the basis to consist of input points. While it appears that the hardness of this problem has not been resolved, approximate solutions are known. Most notable is the additive approximation of Frieze et al. [2004], though more recently there have been advances on the multiplicative front [Drineas et al., 2008, Çivril and Magdon-Ismail, 2012, Guruswami and Sinop, 2012]. Similar restrictions have also been considered for NMF. Donoho and Stodden [2003] introduced a separability 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. assumption for NMF, and Arora et al. [2016] showed that a NMF can be computed in polynomial time under this assumption. Various other methods have since been proposed for NMF under the separability (or near separability) assumption [Recht et al., 2012, Kumar et al., 2013, Benson et al., 2014, Gillis and Vavasis, 2014, Zhou et al., 2014, Kumar and Sindhwani, 2015]. The separability assumption requires that there exists a subset S of the columns of X such that X = XSC for some nonnegative matrix C. This assumption can be restrictive in practice, e.g., when an exact subset does not exist but a close approximate subset does, i.e., X ≈XSC. To our knowledge, no exact or approximate polynomial time algorithms have been proposed for the general problem of computing a NMF under only the restriction that the columns must be selected from those of X. In this work, we fill this gap by arguing that a simple greedy algorithm can be used to provide a polynomial time ε-approximation algorithm for NMF under the column subset restriction. Note that the separability assumption is not required here: our theoretical analysis bounds the error of our selected columns versus the best possible columns that could have been chosen. The algorithm is based off of recent work on fast algorithms for approximately computing the convex hull of a set of points [Blum et al., 2016]. As in previous approaches [Donoho and Stodden, 2003, Kumar et al., 2013], we formulate restricted NMF geometrically as finding a subset, S, of the columns of the matrix X whose conic hull, the set of all nonnegative combinations of columns of S, well-approximates the conic hull of X. Using gnomonic projection, we reduce the conic hull problem to a convex hull problem and then apply the greedy strategy of Blum et al. [2016] to compute the convex hull of the projected points. Given a set of points P in Rm, the convex hull of S ⊆P, denoted Convex(S), is said to ε-approximate Convex(P) if the Hausdorff distance between Convex(S) and Convex(P) is at most ε · diameter(P). For a fixed ε > 0, suppose the minimum sized subset of P whose convex hull ε-approximates the convex hull of P has size k, then Blum et al. [2016] show that a simple greedy algorithm gives an ε′ = O(ε1/3) approximation using at most k′ = O(k/ε2/3) points of P, with an efficient O(nc(m + c/ε2 + c2)) running time, where c = O(kopt/ε2/3). By careful analysis, we show that our reduction achieves the same guarantees for the conic problem. (Note Blum et al. [2016] present other trade-offs between k′ and ε′, which we argue carry to the conic case as well). Significantly, k′ and ε′ are independent of n and m, making this algorithm desirable for large high dimensional point sets. Note that our bounds on the approximation quality and the number of points do not explicitly depend on the dimension as they are relative to the size of the optimal solution, which itself may or may not depend on dimension. Like the X-RAY algorithm [Kumar et al., 2013], our algorithm is easy to parallelize, allowing it to be applied to large-scale problems. In addition to the above ε-approximation algorithm, we also present two additional theoretical results of independent interest. The first theoretical contribution provides justification for empirical observations about the sparsity of NMF [Lee and Seung, 1999, Ding et al., 2010]. Due to the high dimensional nature of many data sets, there is significant interest in sparse representations requiring far fewer points than the dimension. Our theoretical justification for sparsity is based on Carathéodory’s theorem: any point q in the convex hull of P can be expressed as a convex combination of at most m + 1 points from P. This is tight in the worst case for exact representation, however the approximate Carathéodory theorem [Clarkson, 2010, Barman, 2015] states there is a point q′ which is a convex combination of O(1/ε2) points of P (i.e., independent of n and m) such that ||q −q′|| ≤ε · diameter(P). This result has a long history with significant implications in machine learning, e.g., relating to the analysis of the perceptron algorithm [Novikoff, 1962], though the clean geometric statement of this theorem appears to be not well known outside the geometry community. Moreover, this approximation is easily computable with a greedy algorithm (e.g., [Blum et al., 2016]) similar to the Frank-Wolfe algorithm. The analogous statement for the linear case does not hold, so it is not immediately obvious whether such an approximate Carathéodory theorem should hold for the conic case, a question which we answer in the affirmative. As a second theoretical contribution, we address the question of whether or not the convex/conic hull problems are actually hard, i.e., whether approximations are actually necessary. We answer this question for both problems in the affirmative, resolving an open question of Blum et al. [2016], by showing both that the conic and convex problems are d-SUM-hard. Finally, we evaluate the performance of the greedy algorithms for computing the convex and conic hulls on a variety of feature selection tasks against existing methods. We observe that, both the conic and convex algorithms perform well for a variety of feature selection tasks, though, somewhat surprisingly, the convex hull algorithm, for which previously no experimental results had been 2 produced, yields consistently superior results on text datasets. We use our theoretical results to provide intuition for these empirical observations. 2 Preliminaries Let P be a point set in Rm. For any p ∈P, we interchangeably use the terms vector and point, depending on whether or not we wish to emphasize the direction from the origin. Let ray(p) denote the unbounded ray passing through p, whose base lies at the origin. Let unit(p) denote the unit vector in the direction of p, or equivalently unit(p) is the intersection of ray(p) with the unit hypersphere S(m−1). For any subset X = {x1, . . . , xk} ⊆P, ray(X) = {ray(x1), . . . , ray(xk)} and unit(X) = {unit(x1), . . . , unit(xk)}. Given points p, q ∈P, let d(p, q) = ||p−q|| denote their Euclidean distance, and let ⟨p, q⟩denote their dot product. Let angle(ray(p), ray(q)) = angle(p, q) = cos−1(⟨unit(p), unit(q)⟩) denote the angle between the rays ray(p) and ray(q), or equivalently between vectors p and q. For two sets, P, Q ⊆Rm, we write d(P, Q) = minp∈P,q∈Q d(p, q) and for a single point q we write d(q, P) = d({q}, P), and the same definitions apply to angle(). For any subset X = {x1, . . . , xk} ⊆P, let Convex(X) = {P i αixi | αi ≥0, P i αi = 1} denote the convex hull of X. Similarly, let Conic(X) = {P i αixi | αi ≥0} denote the conic hull of X and DualCone(X) = {z ∈X | ⟨x, z⟩≥0 ∀x ∈X} the dual cone. For any point q ∈Rm, the projection of q onto Convex(X) is the closest point to q in Convex(X), proj(q) = proj(q, Convex(X)) = arg minx∈Convex(X) d(q, x). Similarly the angular projection of q onto Conic(X) is the angularly closest point to q in Conic(X), aproj(q) = aproj(q, Conic(X)) = arg minx∈Conic(X) angle(q, x). Note that angular projection defines an entire ray of Conic(X), rather than a single point, which without loss of generality we choose the point on the ray minimizing the Euclidean distance to q. In fact, abusing notation, we sometimes equivalently view Conic(X) as a set of rays rather than points, in which case aproj(ray(q)) = aproj(q) is the entire ray. For X ⊂Rm, let ∆= ∆X = maxp,q∈X d(p, q) denote the diameter of X. The angular diameter of X is φ = φX = maxp,q∈X angle(p, q). Similarly φX(q) = maxp∈X angle(p, q) denotes the angular radius of the minimum radius cone centered around the ray through q and containing all of P. Definition 2.1. Consider a subset X of a point set P ⊂Rm. X is an ε-approximation to Convex(P) if dconvex(X, P) = maxp∈Convex(P ) d(p, Convex(X)) ≤ε∆. Note dconvex(X, P) is the Hausdorff distance between Convex(X) and Convex(P). Similarly X is an ε-approximation to Conic(P) if dconic(X, P) = maxp∈Conic(P ) angle(p, Conic(X)) ≤εφP . Note that the definition of ε-approximation for Conic(P) uses angular rather than Euclidean distance in order to be defined for rays, i.e., scaling a point outside the conic hull changes its Euclidean distance but its angular distance is unchanged since its ray stays the same. Thus we find considering angles better captures what it means to approximate the conic hull than the distance based Frobenius norm which is often used to evaluate the quality of approximation for NMF. As we are concerned only with angles, without loss of generality we often will assume that all points in the input set P have been scaled to have unit length, i.e., P = unit(P). In our theoretical results, we will always assume that φP < π/2. Note that if P lies in the non-negative orthant, then for any strictly positive q, φP (q) < π/2. In the case that the P is not strictly inside the positive orthant, the points can be uniformly translated a small amount to ensure that φP < π/2. 3 A Simple Greedy Algorithm Let P be a finite point set in Rm (with unit lengths). Call a point p ∈P extreme if it lies on the boundary of the conic hull (resp. convex hull). Observe that for any X ⊆P, containing all the extreme points, it holds that Conic(X) = Conic(P) (resp. Convex(X) = Convex(P)). Consider the simple greedy algorithm which builds a subset of points S, by iteratively adding to S the point angularly furthest from the conic hull of the current point set S (for the convex hull take the furthest point in distance). One can argue in each round this algorithm selects an extreme point, and thus can be used to find a subset of points whose hull captures that of P. Note if the hull is not degenerate, i.e., 3 no point on the boundary is expressible as a combination of other points on the boundary, then this produces the minimum sized subset capturing P. Otherwise, one can solve a recursive subproblem as discussed by Kumar et al. [2013] to exactly recover S. Here instead we consider finding a small subset of points (potentially much smaller than the number of extreme points) to approximate the hull. The question is then whether this greedy approach still yields a reasonable solution, which is not clear as there are simple examples showing the best approximate subset includes non-extreme points. Moreover, arguing about the conic approximation directly is challenging as it involves angles and hence spherical (rather than planar) geometry. For the convex case, Blum et al. [2016] argued that this greedy strategy does yield a good approximation. Thus we seek a way to reduce our conic problem to an instance of the convex problem, without introducing too much error in the process, which brings us to the gnomonic projection. Let hplane(q) be the hyperplane defined by the equation ⟨(q −x), q⟩= 0 where q ∈Rm is a unit length normal vector. The gnomonic projection of P onto hplane(q), is defined as gpq(P) = {ray(P) ∩hplane(q)} (see Figure 3.1). Note that gpq(q) = q. For any point x in hplane(q), the inverse gnomonic projection is pgq(x) = ray(x) ∩S(m−1). Similar to other work [Kumar et al., 2013], we allow projections onto any hyperplane tangent to the unit hypersphere with normal q in the strictly positive orthant. A key property of the gnomonic projection, is that the problem of finding the extreme points of the convex hull of the projected points is equivalent to finding the extreme points of the conic hull of P. (Additional properties of the gnomonic projection are discussed in the full version.) Thus the strategy to approximate the conic hull should now be clear. Let P ′ = gpq(P). We apply the greedy strategy of Blum et al. [2016] to P ′ to build a set of extreme points S, by iteratively adding to S the point furthest from the convex hull of the current point set S. This procedure is shown in Algorithm 1. We show that Algorithm 1 can be used to produce an ε-approximation to the restricted NMF problem. Formally, for ε > 0, let opt(P, ε) denote any minimum cardinality subset X ⊆P which ε-approximates Conic(P), and let kopt = |opt(P, ε)|. We consider the following problem. Problem 3.1. Given a set P of n points in Rm such that φP ≤π/2 −γ, for a constant γ > 0, and a value ε > 0, compute opt(P, ε). Alternatively one can fix k rather than ε, defining opt(P, k) = arg minX⊆P,|X|=k dconic(X, P) and εopt = dconic(opt(P, k), P). Our approach works for either variant, though here we focus on the version in Problem 3.1. Note the bounded angle assumption applies to any collection of points in the strictly positive orthant (a small translation can be used to ensure this for any nonnegative data set). In this section we argue Algorithm 1 produces an (α, β)-approximation to an instance (P, ε) of Problem 3.1, that is a subset X ⊆P such that dconic(X, P) ≤α and |X| ≤β ·kopt = β ·|opt(P, ε)|. For ε > 0, similarly define optconvex(P, ε) to be any minimum cardinality subset X ⊆P which ε-approximates Convex(P). Blum et al. [2016] gave (α, β)-approximation for the following. Problem 3.2. Given a set P of n points in Rm, and a value ε > 0, compute optconvex(P, ε). Note the proofs of correctness and approximation quality from Blum et al. [2016] for Problem 3.2 do not immediately imply the same results for using Algorithm 1 for Problem 3.1. To see this, consider any points u, v on S(m−1). Note the angle between u and v is the same as their geodesic distance on S(m−1). Intuitively, we want to claim the geodesic distance between u and v is roughly the same as the Euclidean distance between gpq(u) and gpq(v). While this is true for points near q, as we move away from q the correspondence breaks down (and is unbounded as you approach π/2). This non-uniform distortion requires care, and thus the proofs had to be moved to the full version. Finally, observe that Algorithm 1, requires being able to compute the point furthest from the convex hull. To do so we use the (convex) approximate Carathéodory, which is both theoretically and practically very efficient, and produces provably sparse solutions. As a stand alone result, we first prove the conic analog of the approximate Carathéodory theorem. This result is of independent interest since it can be used to sparsify the returned solution from Algorithm 1, or any other algorithm. 3.1 Sparsity and the Approximate Conic Carathéodory Theorem Our first result is a conic approximate Carathéodory theorem. That is, given a point set P ⊆Rm and a query point q, then the angularly closest point to q in Conic(P) can be approximately expressed as 4 Algorithm 1: Greedy Conic Hull Data: A set of n points, P, in Rm such that φP < π/2, a positive integer k, and a normal vector q in DualCone(P). Result: S ⊆P such that |S| = k Y ←gpq(P); Select an arbitrary starting point p0 ∈Y ; S ←{p0}; for i = 2 to k do Select p∗∈arg maxp∈Y dconvex(p, S); S ←S ∪{p∗}; q x x′ hplane(q) Figure 3.1: Side view of gnomonic projection. a sparse combination of point from P. More precisely, one can compute a point t which is a conic combination of O(1/ε2) points from P such that angle(q, t) ≤angle(q, Conic(P)) + εφP . The significance of this result is as follows. Recall that we seek a factorization X ≈BC, where the k columns of B are a subset of those from X and the entries of C are non-negative. Ideally each point in X is expressed as a sparse combination from the basis B, that is each column of C has very few non-zero entries. So suppose we are given any factorization BC, but C is dense. Then no problem, just throw out C, and use our Carathéodory theorem to compute a new matrix C′ with sparse columns. Namely treat each column of X as the query q and run the theorem for the point set P = B, and then the non-zero entries of corresponding column of C′ are just the selected combination from B. Not only does this mean we can sparsify any solution to our NMF problem (including those obtained by other methods), but it also means conceptually that rather than finding a good pair BC, one only needs to focus on finding the subset B, as is done in Algorithm 1. Note that Algorithm 1 allows non-negative inputs in P because φP < π/2 ensures P can be rotated into the positive orthant. While it appears the conic approximate Carathéodory theorem had not previously been stated, the convex version has a long history (e.g., implied by [Novikoff, 1962]). The algorithm to compute this sparse convex approximation is again a simple and fast greedy algorithm, which roughly speaking is a simplification of the Frank-Wolfe algorithm for this particular problem. Specifically, to find the projection of q onto Convex(P), start with any point t0 ∈Convex(P). In the ith round, find the point pi ∈P most extreme in the direction of q from ti−1 (i.e., maximizing ⟨q −ti−1, pi⟩) and set ti to be the closest point to q on the segment ti−1pi (thus simplifying Frank Wolfe, as we ignore step size issues). The standard analysis of this algorithm (e.g., [Blum et al., 2016]) gives the following. Theorem 3.3 (Convex Carathéodory). For a point set P ⊆Rm, ε > 0, and q ∈Rm, one can compute, in O |P| m/ε2 time, a point t ∈Convex(P), such that d(q, t) ≤d(q, Convex(P)) + ε∆, where ∆= ∆P . Furthermore, t is a convex combination of O(1/ε2) points of P. Again by exploiting properties of the gnomonic projection we are able to prove a conic analog of the above theorem. Note for P ⊂Rm, P is contained in the linear span of at most m points from P, and similarly the exact Carathéodory theorem states any point q ∈Convex(P) is expressible as a convex combination of at most m + 1 points from P. As the conic hull lies between the linear case (with all combinations) and the convex case (with non-negative combinations summing to one), it is not surprising an exact conic Carathéodory theorem holds. However, the linear analog of the approximate convex Caratheodory theorem does not hold, and so the following conic result is not a priori obvious. Theorem 3.4. Let P ⊂Rm be a point set, let q be such that φP (q) < π/2 −γ for some constant γ > 0, and let ε > 0 be a parameter. Then one can find, in O(|P|m/ε2) time, a point t ∈Conic(P) such that angle(q, t) ≤angle(q, Conic(P))+εφP (q). Moreover, t is a conic combination of O(1/ε2) points from P. Due to space constraints, the detailed proof of Theorem 3.4 appears in the full version. In the proof, the dependence on γ is made clear but we make a remark about it here. If ε is kept fixed, γ shows up 5 in the running time roughly by a factor of tan2(π/2 −γ). Alternatively, if the running time is fixed, the approximation error will roughly depend on the factor 1/ tan(π/2 −γ). We now give a simple example of a high dimensional point set which shows our bounded angle assumption is required for the conic Carathéodory theorem to hold. Let P consist of the standard basis vectors in Rm, let q be the all ones vector, and let ε be a parameter. Let X be a subset of P of size k, and consider aproj(q) = aproj(q, X). As P consists of basis vectors, each of which have all but one entry set to zero, aproj(q) will have at most k non-zero entries. By the symmetry of q it is also clear that all non-zero entries in aproj(q) should have the same value. Without loss of generality assume that this value is 1, and hence the magnitude of aproj(q) is √ k. Thus for aproj(q) to be an ε-approximation to q, angle(aproj(q), q) = cos−1( k √ k√m) = cos−1( p k/m) < ε. Hence for a fixed ε, the number of points required to ε-approximate q depends on m, while the conic Carathéodory theorem should be independent of m. 3.2 Approximating the Conic Hull We now prove that Algorithm 1 yields an approximation to the conic hull of a given point set and hence an approximation to the nonnegative matrix factorization problem. As discussed above, previously Blum et al. [2016] provided the following (α, β)-approximation for Problem 3.2. Theorem 3.5 ([Blum et al., 2016]). For a set P of n points in Rm, and ε > 0, the greedy strategy, which iteratively adds the point furthest from the current convex hull, gives a ((8ε1/3 + ε)∆, O(1/ε2/3))-approximation to Problem 3.2, and has running time O(nc(m + c/ε2 + c2)) time, where c = O(kopt/ε2/3). Our second result, is a conic analog of the above theorem. Theorem 3.6. Given a set P of n points in Rm such that φP ≤π 2 −γ for a constant γ > 0, and a value ε > 0, Algorithm 1 gives an ((8ε1/3 + ε)φP , O(1/ε2/3))-approximation to Problem 3.1, and has running time O(nc(m + c/ε2 + c2)), where c = O(kopt/ε2/3). Bounding the approximation error requires carefully handling the distortion due to the gnomonic project, and the details are presented in the full version. Additionally, Blum et al. [2016] provide other (α, β)-approximations, for different values of α and β, and in the full version these other results are also shown to hold for the conic case. 4 Hardness of the Convex and Conic Problems This section gives a reduction from d-SUM to the convex approximation of Problem 3.2, implying it is d-SUM-hard. In the full version a similar setup is used to argue the conic approximation of Problem 3.1 is d-SUM-hard. Actually if Problem 3.1 allowed instances where φP = π/2 the reduction would be virtually the same. However, arguing that the problem remains hard under our requirement that φP ≤π/2 −γ, is non-trivial and some of the calculations become challenging and lengthy. The reductions to both problems are partly inspired by Arora et al. [2016]. However, here, we use the somewhat non-standard version of d-SUM where repetitions are allowed as described below. Problem 4.1 (d-SUM). In the d-SUM problem we are given a set S = {s1, s2, · · · , sN} of N values, each in the interval [0, 1], and the goal is to determine if there is a set of d numbers (not necessarily distinct) whose sum is exactly d/2. It was shown by Patrascu and Williams [2010] that if d-SUM can be solved in N o(d) time then 3-SAT has a sub-exponential time algorithm, i.e., that the Exponential Time Hypothesis is false. Theorem 4.2 (d-SUM-hard). Let d < N 0.99, δ < 1. If d-SUM on N numbers of O(d log(N)) bits can be solved in O(N δd) time, then 3-SAT on n variables can be solved in 2o(n) time. 6 We will prove the following decision version of Problem 3.2 is d-SUM-hard. Note in this section the dimension will be denoted by d rather than m, as this is standard for d-SUM reductions. Problem 4.3. Given a set P of n points in Rd, a value ε > 0, and an integer k, is there a subset X ⊆P of k points such that dconvex(X, P) ≤ε∆, where ∆is the diameter of P. Given an instance of d-SUM with N values S = {s1, s2, · · · , sN} we construct an instance of Problem 4.3 where P ⊂Rd+2, k = d, and ε = 1/3 (or any sufficiently small value). The idea is to create d clusters each containing N points corresponding to a choice of one of the si values. The clusters are positioned such that exactly one point from each cluster must be chosen. The d + 2 coordinates are labeled ai for i ∈[d], w, and v. Together, a1, · · · , ad determine the cluster. The w dimension is used to compute the sum of the chosen si values. The v dimension is used as a threshold to determine whether d-SUM is a yes or no instance to Problem 4.3. Let w(pj) denote the w value of an arbitrary point pj. We assume d ≥2 as d-SUM is trivial for d = 1. Let e1, e2, · · · , ed ∈Rd be the standard basis in Rd, e1 = (1, · · · , 0), e2 = (0, 1, · · · , 0), . . . , and ed = (0, · · · , 1). Together they form the unit d-simplex, and they define the d clusters in the construction. Finally, let ∆∗= p 2 + (εsmax −εsmin)2 be a constant where smax and smin are, respectively, the maximum and minimum values in S. Definition 4.4. The set of points P ⊂Rd+2 are the following pi j points: For each i ∈[d], j ∈[N], set (a1, · · · , ad) = ei, w = εsj and v = 0 q point: For each i ∈[d], ai = 1/d, w = ε/2, v = 0 q′ point: For each i ∈[d], ai = 1/d and w = ε/2, v = ε∆∗ Lemma 4.5 (Proof in full version). The diameter of P, ∆P , is equal to ∆∗. We prove completeness and soundness of the reduction. Below P i = ∪j pi j denotes the ith cluster. Observation 4.6. If maxp∈P d(p, Convex(X)) ≤ε∆, then dconvex(X, P) ≤ε∆: For point sets A and B = {b1, . . . , bm}, if we fix a ∈Convex(A), then for any b ∈Convex(B) we have ||a −b|| = ||a −P i αibi|| = || P i αi(a −bi)|| ≤P i αi||a −bi|| ≤maxi ||a −bi||. Lemma 4.7 (Completeness). If there is a subset {sk1, sk2, · · · , skd} of d values (not necessarily distinct) such that P i∈[d] ski = d/2, then the above described instance of Problem 4.3 is a true instance, i.e. there is a d sized subset X ⊆P with dconvex(X, P) ≤ε∆. Proof: For each value ski consider the point xi = (ei, ε · ski, 0), which by Definition 4.4 is a point in P. Let X = {x1, . . . , xd}. We now prove maxp∈P d(p, Convex(X)) ≤ε∆, which by Observation 4.6 implies that dconvex(X, P) ≤ε∆. First observe that for any pi j in P, d(pi j, xi) = q (w(pi j) −w(xi))2 ≤|εsj −εski| ≤ε∆. The only other points in P are q and q′. Note that d(q, q′) = ε∆∗= ε∆from Lemma 4.5. Thus if we can prove that q ∈Convex(X) then we will have shown maxp∈P d(p, Convex(X)) ≤ε∆. Specifically, we prove that the convex combination x = 1 d Pd i xi is the point q. As X contains exactly one point from each set P i, and in each such set all points have ai = 1 and all other aj = 0, it holds that x has 1/d for all the a coordinates. All points in X have v = 0 and so this holds for x as well. Thus we only need to verify that w(x) = w(q) = ε/2, for which we have w(x) = 1 d P i w(xi) = 1 d P i εski = 1 d(εd/2) = ε/2. Proving soundness requires some helper lemmas. Note that in the above proof we constructed a solution to Problem 4.3 that selected exactly one point from each cluster P i. We now prove that this is a required property. Lemma 4.8 (Proof in full version). Let P ⊂Rd+2 be as defined above, and let X ⊆P be a subset of size d. If dconvex(X, P) ≤ε∆, then for all i, X contains exactly one point from P i. 7 25 50 75 100 125 150 0.2 0.4 0.6 0.8 1 # Features SVM Accuracy USPS Conic Convex X-RAY Mutant X-RAY Conic+γ 25 50 75 100 125 150 0.2 0.4 0.6 0.8 1 # Features COIL20 25 50 75 100 125 150 0 0.2 0.4 0.6 0.8 1 # Features Isolet 25 50 75 100 125 150 0.4 0.6 0.8 1 # Features SVM Accuracy Reuters 25 50 75 100 125 150 0.2 0.4 0.6 0.8 1 # Features BBC 25 50 75 100 125 150 0.2 0.4 0.6 0.8 1 # Features warpPIE10P Figure 4.1: Experimental results for feature selection on six different data sets. Best viewed in color. Lemma 4.9 (Proof in full version). If dconvex(X, P) ≤ε∆, then q ∈Convex(X) and moreover q = 1 d P xi∈X xi. Lemma 4.10 (Soundness). Let P be an instance of Problem 4.3 generated from a d-SUM instance S, as described in Definition 4.4. If there is a subset X ⊆P of size d such that dconvex(X, P) ≤ε∆, then there is a choice of d values from S that sum to exactly d/2. Proof: From Lemma 4.8 we know that X consist of exactly one point from each cluster P i. Thus for each xi ∈X, w(xi) = εski for some ski ∈S. By Lemma 4.9, q = 1 d P i xi, which implies w(q) = 1 d P i w(xi). By Definition 4.4 w(q) = ε/2, which implies ε/2 = 1 d P i w(xi) = 1 d P i εski. Thus we have a set {sk1, . . . , skd} of d values from S such that P i ski = d/2. Lemma 4.7 and Lemma 4.10 immediately imply the following. Theorem 4.11. For point sets in Rd+2, Problem 4.3 is d-SUM-hard. 5 Experimental Results We report an experimental comparison of the proposed greedy algorithm for conic hulls, the greedy algorithm for convex hulls (the conic hull algorithm without the projection step) [Blum et al., 2016], the X-RAY (max) algorithm [Kumar et al., 2013], a modified version of X-RAY, dubbed mutant X-RAY, which simply selects the point furthest away from the current cone (i.e., with the largest residual), and a γ-shifted version of the conic hull algorithm described below. Other methods such as Hottopixx [Recht et al., 2012, Gillis and Luce, 2014] and SPA [Gillis and Vavasis, 2014] were not included due to their similar performance to the above methods. For our experiments, we considered the performance of each of the methods when used to select features for a variety of SVM classification tasks on various image, text, and speech data sets including several from the Arizona State University feature selection repository [Li et al., 2016] as well as the UCI Reuters dataset and the BBC News dataset [Greene and Cunningham, 2006]. The Reuters and BBC text datasets are represented using the TF-IDF representation. For the Reuters dataset, only the ten most frequent 8 topics were used for classification. In all datasets, columns (corresponding to features) that were identically equal to zero were removed from the data matrix. For each problem, the data is divided using a 30/70 train/test split, the features are selected by the indicated method, and then an SVM classifier is trained using only the selected features. For the conic and convex hull methods, ϵ is set to 0.1. The accuracy (percent of correctly classified instances) is plotted versus the number of selected features for each method in Figure 4.1. Additional experimental results can be found in the full version. Generally speaking, the convex, mutant X-RAY, and shifted conic algorithms seem to consistently perform the best on the tasks. The difference in performance between convex and conic is most striking on the two text data sets Reuters and BBC. In the case of BBC and Reuters, this is likely due to the fact that many of the columns of the TF-IDF matrix are orthogonal. We note that the quality of both X-RAY and conic is improved if thresholding is used when constructing the feature matrix, but they still seem to under perform the convex method for text datasets. The text datasets are also interesting as not only do they violate the explicit assumption in our theorems that the angular diameter of the conic hull be strictly less than π/2, but that there are many such mutually orthogonal columns of the document-feature matrix. This observation motivates the γ-shifted version of the conic hull algorithm that simply takes the input matrix X and adds γ to all of the entries (essentially translating the data along the all ones vector) and then applies the conic hull algorithm. Let 1a,b denote the a × b matrix of ones. After a nonnegative shift, the angular assumption is satisfied, and the restricted NMF problem is that of approximating (X + γ1m,n) as (B + γ1m,k)C, where the columns of B are again chosen from those of X. Under the Frobenus norm ||(X + γ1m,n) −(B + γ1m,k)C||2 2 = P i,j(Xij −Bi,:C:,j + γ(1 −||C:,j||1))2. As C must be a nonnegative matrix, the shifted conic case acts like the original conic case plus a penalty that encourages the columns of C to sum to one (i.e., it is a hybrid between the conic case and the convex case). The plots illustrate the performance of the γ-shifted conic hull algorithm for γ = 10. After the shift, the performance more closely matches that of the convex and mutant X-RAY methods on TF-IDF features. Given these experimental results and the simplicity of the proposed convex and conic methods, we suggest that both methods should be added to practitioners’ toolboxes. In particular, the superior performance of the convex algorithm on text datasets, compared to X-RAY and the conic algorithm, seems to suggest that these types of “convex” factorizations may be more desirable for TF-IDF features. Acknowledgments Greg Van Buskirk and Ben Raichel were partially supported by NSF CRII Award-1566137. Nicholas Ruozzi was partially supported by DARPA Explainable Artificial Intelligence Program under contract number N66001-17- 2-4032 and NSF grant III-1527312 References M. Berry, M. Browne, A. Langville, V. Pauca, and R. Plemmons. Algorithms and applications for approximate nonnegative matrix factorization. Computational Statistics & Data Analysis, 52(1): 155–173, 2007. S. Arora, R. Ge, R. Kannan, and A. Moitra. Computing a nonnegative matrix factorization - provably. SIAM J. Comput., 45(4):1582–1611, 2016. S. Vavasis. On the complexity of nonnegative matrix factorization. SIAM Journal on Optimization, 20(3):1364–1377, 2009. M. Mahoney and P. Drineas. Cur matrix decompositions for improved data analysis. Proceedings of the National Academy of Sciences, 106(3):697–702, 2009. A. Frieze, R. Kannan, and S. Vempala. Fast monte-carlo algorithms for finding low-rank approximations. J. ACM, 51(6):1025–1041, 2004. 9 P. Drineas, M. Mahoney, and S. Muthukrishnan. Relative-error CUR matrix decompositions. SIAM J. Matrix Analysis Applications, 30(2):844–881, 2008. A. Çivril and M. Magdon-Ismail. Column subset selection via sparse approximation of SVD. Theor. Comput. Sci., 421:1–14, 2012. V. Guruswami and A. Sinop. Optimal column-based low-rank matrix reconstruction. In Proceedings of the Twenty-Third Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1207– 1214, 2012. D. L. Donoho and V. Stodden. When does non-negative matrix factorization give a correct decomposition into parts? In Advances in Neural Information Processing Systems (NIPS), 2003. B. Recht, C. Re, J. Tropp, and V. Bittorf. Factoring nonnegative matrices with linear programs. In Advances in Neural Information Processing Systems (NIPS), pages 1214–1222, 2012. A. Kumar, V. Sindhwani, and P. Kambadur. Fast conical hull algorithms for near-separable nonnegative matrix factorization. In International Conference on Machine Learning (ICML), pages 231–239, 2013. A. R. Benson, J. D. Lee, B. Rajwa, and D. F. Gleich. Scalable methods for nonnegative matrix factorizations of near-separable tall-and-skinny matrices. In Advances in Neural Information Processing Systems (NIPS), pages 945–953, 2014. N. Gillis and S. A. Vavasis. Fast and robust recursive algorithms for separable nonnegative matrix factorization. IEEE transactions on pattern analysis and machine intelligence, 36(4):698–714, 2014. T. Zhou, J. A. Bilmes, and C. Guestrin. Divide-and-conquer learning by anchoring a conical hull. In Advances in Neural Information Processing Systems (NIPS), pages 1242–1250, 2014. A. Kumar and V. Sindhwani. Near-separable Non-negative Matrix Factorization with l1 and Bregman Loss Functions, pages 343–351. 2015. A. Blum, S. Har-Peled, and B. Raichel. Sparse approximation via generating point sets. In Proceedings of the Twenty-Seventh Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 548–557, 2016. D. D. Lee and H. S. Seung. Learning the parts of objects by non-negative matrix factorization. Nature, 401(6755):788–791, 1999. C. H. Q. Ding, T. Li, and M. I. Jordan. Convex and semi-nonnegative matrix factorizations. IEEE transactions on pattern analysis and machine intelligence, 32(1):45–55, 2010. K. L. Clarkson. Coresets, sparse greedy approximation, and the frank-wolfe algorithm. 6(4), 2010. S. Barman. Approximating nash equilibria and dense bipartite subgraphs via an approximate version of caratheodory’s theorem. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing (STOC), pages 361–369, 2015. A.B.J. Novikoff. On convergence proofs on perceptrons. In Proc. Symp. Math. Theo. Automata, volume 12, pages 615–622, 1962. M. Patrascu and R. Williams. On the possibility of faster SAT algorithms. In Proceedings of the Twenty-First Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1065–1075, 2010. Nicolas Gillis and Robert Luce. Robust near-separable nonnegative matrix factorization using linear optimization. Journal of Machine Learning Research, 15(1):1249–1280, 2014. 10 J. Li, K. Cheng, S. Wang, F. Morstatter, T. Robert, J. Tang, and H. Liu. Feature selection: A data perspective. arXiv:1601.07996, 2016. Derek Greene and Pádraig Cunningham. Practical solutions to the problem of diagonal dominance in kernel document clustering. In Proceedings of the 23rd international conference on Machine learning, pages 377–384. ACM, 2006. 11 | 2017 | 285 |
6,769 | Label Distribution Learning Forests Wei Shen1,2, Kai Zhao1, Yilu Guo1, Alan Yuille2 1 Key Laboratory of Specialty Fiber Optics and Optical Access Networks, Shanghai Institute for Advanced Communication and Data Science, School of Communication and Information Engineering, Shanghai University 2 Department of Computer Science, Johns Hopkins University {shenwei1231,zhaok1206,gyl.luan0,alan.l.yuille}@gmail.com Abstract Label distribution learning (LDL) is a general learning framework, which assigns to an instance a distribution over a set of labels rather than a single label or multiple labels. Current LDL methods have either restricted assumptions on the expression form of the label distribution or limitations in representation learning, e.g., to learn deep features in an end-to-end manner. This paper presents label distribution learning forests (LDLFs) - a novel label distribution learning algorithm based on differentiable decision trees, which have several advantages: 1) Decision trees have the potential to model any general form of label distributions by a mixture of leaf node predictions. 2) The learning of differentiable decision trees can be combined with representation learning. We define a distribution-based loss function for a forest, enabling all the trees to be learned jointly, and show that an update function for leaf node predictions, which guarantees a strict decrease of the loss function, can be derived by variational bounding. The effectiveness of the proposed LDLFs is verified on several LDL tasks and a computer vision application, showing significant improvements to the state-of-the-art LDL methods. 1 Introduction Label distribution learning (LDL) [6, 11] is a learning framework to deal with problems of label ambiguity. Unlike single-label learning (SLL) and multi-label learning (MLL) [26], which assume an instance is assigned to a single label or multiple labels, LDL aims at learning the relative importance of each label involved in the description of an instance, i.e., a distribution over the set of labels. Such a learning strategy is suitable for many real-world problems, which have label ambiguity. An example is facial age estimation [8]. Even humans cannot predict the precise age from a single facial image. They may say that the person is probably in one age group and less likely to be in another. Hence it is more natural to assign a distribution of age labels to each facial image (Fig. 1(a)) instead of using a single age label. Another example is movie rating prediction [7]. Many famous movie review web sites, such as Netflix, IMDb and Douban, provide a crowd opinion for each movie specified by the distribution of ratings collected from their users (Fig. 1(b)). If a system could precisely predict such a rating distribution for every movie before it is released, movie producers can reduce their investment risk and the audience can better choose which movies to watch. Many LDL methods assume the label distribution can be represented by a maximum entropy model [2] and learn it by optimizing an energy function based on the model [8, 11, 28, 6]. But, the exponential part of this model restricts the generality of the distribution form, e.g., it has difficulty in representing mixture distributions. Some other LDL methods extend the existing learning algorithms, e.g, by boosting and support vector regression, to deal with label distributions [7, 27], which avoid making this assumption, but have limitations in representation learning, e.g., they do not learn deep features in an end-to-end manner. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Figure 1: The real-world data which are suitable to be modeled by label distribution learning. (a) Estimated facial ages (a unimodal distribution). (b) Rating distribution of crowd opinion on a movie (a multimodal distribution). In this paper, we present label distribution learning forests (LDLFs) - a novel label distribution learning algorithm inspired by differentiable decision trees [20]. Extending differentiable decision trees to deal with the LDL task has two advantages. One is that decision trees have the potential to model any general form of label distributions by mixture of the leaf node predictions, which avoid making strong assumption on the form of the label distributions. The second is that the split node parameters in differentiable decision trees can be learned by back-propagation, which enables a combination of tree learning and representation learning in an end-to-end manner. We define a distribution-based loss function for a tree by the Kullback-Leibler divergence (K-L) between the ground truth label distribution and the distribution predicted by the tree. By fixing split nodes, we show that the optimization of leaf node predictions to minimize the loss function of the tree can be addressed by variational bounding [19, 29], in which the original loss function to be minimized gets iteratively replaced by a decreasing sequence of upper bounds. Following this optimization strategy, we derive a discrete iterative function to update the leaf node predictions. To learn a forest, we average the losses of all the individual trees to be the loss for the forest and allow the split nodes from different trees to be connected to the same output unit of the feature learning function. In this way, the split node parameters of all the individual trees can be learned jointly. Our LDLFs can be used as a (shallow) stand-alone model, and can also be integrated with any deep networks, i.e., the feature learning function can be a linear transformation and a deep network, respectively. Fig. 2 illustrates a sketch chart of our LDLFs, where a forest consists of two trees is shown. We verify the effectiveness of our model on several LDL tasks, such as crowd opinion prediction on movies and disease prediction based on human genes, as well as one computer vision application, i.e., facial age estimation, showing significant improvements to the state-of-the-art LDL methods. The label distributions for these tasks include both unimodal distributions (e.g., the age distribution in Fig. 1(a)) and mixture distributions (the rating distribution on a movie in Fig. 1(b)). The superiority of our model on both of them verifies its ability to model any general form of label distributions Figure 2: Illustration of a label distribution learning forest. The top circles denote the output units of the function f parameterized by Θ, which can be a feature vector or a fully-connected layer of a deep network. The blue and green circles are split nodes and leaf nodes, respectively. Two index function ϕ1 and ϕ2 are assigned to these two trees respectively. The black dash arrows indicate the correspondence between the split nodes of these two trees and the output units of function f. Note that, one output unit may correspond to the split nodes belonging to different trees. Each tree has independent leaf node predictions q (denoted by histograms in leaf nodes). The output of the forest is a mixture of the tree predictions. f(·; Θ) and q are learned jointly in an end-to-end manner. 2 2 Related Work Since our LDL algorithm is inspired by differentiable decision trees, it is necessary to first review some typical techniques of decision trees. Then, we discuss current LDL methods. Decision trees. Random forests or randomized decision trees [16, 1, 3, 4], are a popular ensemble predictive model suitable for many machine learning tasks. In the past, learning of a decision tree was based on heuristics such as a greedy algorithm where locally-optimal hard decisions are made at each split node [1], and thus, cannot be integrated into in a deep learning framework, i.e., be combined with representation learning in an end-to-end manner. The newly proposed deep neural decision forests (dNDFs) [20] overcomes this problem by introducing a soft differentiable decision function at the split nodes and a global loss function defined on a tree. This ensures that the split node parameters can be learned by back-propagation and leaf node predictions can be updated by a discrete iterative function. Our method extends dNDFs to address LDL problems, but this extension is non-trivial, because learning leaf node predictions is a constrained convex optimization problem. Although a step-size free update function was given in dNDFs to update leaf node predictions, it was only proved to converge for a classification loss. Consequently, it was unclear how to obtain such an update function for other losses. We observed, however, that the update function in dNDFs can be derived from variational bounding, which allows us to extend it to our LDL loss. In addition, the strategies used in LDLFs and dNDFs to learning the ensemble of multiple trees (forests) are different: 1) we explicitly define a loss function for forests, while only the loss function for a single tree was defined in dNDFs; 2) we allow the split nodes from different trees to be connected to the same output unit of the feature learning function, while dNDFs did not; 3) all trees in LDLFs can be learned jointly, while trees in dNDFs were learned alternatively. These changes in the ensemble learning are important, because as shown in our experiments (Sec. 4.4), LDLFs can get better results by using more trees, but by using the ensemble strategy proposed in dNDFs, the results of forests are even worse than those for a single tree. To sum up, w.r.t. dNDFs [20], the contributions of LDLFs are: first, we extend from classification [20] to distribution learning by proposing a distribution-based loss for the forests and derive the gradient to learn splits nodes w.r.t. this loss; second, we derived the update function for leaf nodes by variational bounding (having observed that the update function in [20] was a special case of variational bounding); last but not the least, we propose above three strategies to learning the ensemble of multiple trees, which are different from [20], but we show are effective. Label distribution learning. A number of specialized algorithms have been proposed to address the LDL task, and have shown their effectiveness in many computer vision applications, such as facial age estimation [8, 11, 28], expression recognition [30] and hand orientation estimation [10]. Geng et al. [8] defined the label distribution for an instance as a vector containing the probabilities of the instance having each label. They also gave a strategy to assign a proper label distribution to an instance with a single label, i.e., assigning a Gaussian or Triangle distribution whose peak is the single label, and proposed an algorithm called IIS-LLD, which is an iterative optimization process based on a two-layer energy based model. Yang et al. [28] then defined a three-layer energy based model, called SCE-LDL, in which the ability to perform feature learning is improved by adding the extra hidden layer and sparsity constraints are also incorporated to ameliorate the model. Geng [6] developed an accelerated version of IIS-LLD, called BFGS-LDL, by using quasi-Newton optimization. All the above LDL methods assume that the label distribution can be represented by a maximum entropy model [2], but the exponential part of this model restricts the generality of the distribution form. Another way to address the LDL task, is to extend existing learning algorithms to deal with label distributions. Geng and Hou [7] proposed LDSVR, a LDL method by extending support vector regressor, which fit a sigmoid function to each component of the distribution simultaneously by a support vector machine. Xing et al. [27] then extended boosting to address the LDL task by additive weighted regressors. They showed that using the vector tree model as the weak regressor can lead to better performance and named this method AOSO-LDLLogitBoost. As the learning of this tree model is based on locally-optimal hard data partition functions at each split node, AOSO-LDLLogitBoost is unable to be combined with representation learning. Extending current deep learning algorithms to 3 address the LDL task is an interesting topic. But, the existing such a method, called DLDL [5], still focuses on maximum entropy model based LDL. Our method, LDLFs, extends differentiable decision trees to address LDL tasks, in which the predicted label distribution for a sample can be expressed by a linear combination of the label distributions of the training data, and thus have no restrictions on the distributions (e.g., no requirement of the maximum entropy model). In addition, thanks to the introduction of differentiable decision functions, LDLFs can be combined with representation learning, e.g., to learn deep features in an end-to-end manner. 3 Label Distribution Learning Forests A forest is an ensemble of decision trees. We first introduce how to learn a single decision tree by label distribution learning, then describe the learning of a forest. 3.1 Problem Formulation Let X = Rm denote the input space and Y = {y1, y2, . . . , yC} denote the complete set of labels, where C is the number of possible label values. We consider a label distribution learning (LDL) problem, where for each input sample x ∈X, there is a label distribution d = (dy1 x , dy2 x , . . . , dyC x )⊤∈ RC. Here dyc x expresses the probability of the sample x having the c-th label yc and thus has the constraints that dyc x ∈[0, 1] and PC c=1 dyc x = 1. The goal of the LDL problem is to learn a mapping function g : x →d between an input sample x and its corresponding label distribution d. Here, we want to learn the mapping function g(x) by a decision tree based model T . A decision tree consists of a set of split nodes N and a set of leaf nodes L. Each split node n ∈N defines a split function sn(·; Θ) : X →[0, 1] parameterized by Θ to determine whether a sample is sent to the left or right subtree. Each leaf node ℓ∈L holds a distribution qℓ= (qℓ1, qℓ2, . . . , qℓC)⊤ over Y, i.e, qℓc ∈[0, 1] and PC c=1 qℓc = 1. To build a differentiable decision tree, following [20], we use a probabilistic split function sn(x; Θ) = σ(fϕ(n)(x; Θ)), where σ(·) is a sigmoid function, ϕ(·) is an index function to bring the ϕ(n)-th output of function f(x; Θ) in correspondence with split node n, and f : x →RM is a real-valued feature learning function depending on the sample x and the parameter Θ, and can take any form. For a simple form, it can be a linear transformation of x, where Θ is the transformation matrix; For a complex form, it can be a deep network to perform representation learning in an end-to-end manner, then Θ is the network parameter. The correspondence between the split nodes and the output units of function f, indicated by ϕ(·) that is randomly generated before tree learning, i.e., which output units from “f” are used for constructing a tree is determined randomly. An example to demonstrate ϕ(·) is shown in Fig. 2. Then, the probability of the sample x falling into leaf node ℓis given by p(ℓ|x; Θ) = Y n∈N sn(x; Θ)1(ℓ∈Ll n)(1 −sn(x; Θ))1(ℓ∈Lr n), (1) where 1(·) is an indicator function and Ll n and Lr n denote the sets of leaf nodes held by the left and right subtrees of node n, T l n and T r n , respectively. The output of the tree T w.r.t. x, i.e., the mapping function g, is defined by g(x; Θ, T ) = X ℓ∈L p(ℓ|x; Θ)qℓ. (2) 3.2 Tree Optimization Given a training set S = {(xi, di)}N i=1, our goal is to learn a decision tree T described in Sec. 3.1 which can output a distribution g(xi; Θ, T ) similar to di for each sample xi. To this end, a straightforward way is to minimize the Kullback-Leibler (K-L) divergence between each g(xi; Θ, T ) and di, or equivalently to minimize the following cross-entropy loss: R(q, Θ; S) = −1 N N X i=1 C X c=1 dyc xi log(gc(xi; Θ, T )) = −1 N N X i=1 C X c=1 dyc xi log X ℓ∈L p(ℓ|xi; Θ)qℓc , (3) 4 where q denote the distributions held by all the leaf nodes L and gc(xi; Θ, T ) is the c-th output unit of g(xi; Θ, T ). Learning the tree T requires the estimation of two parameters: 1) the split node parameter Θ and 2) the distributions q held by the leaf nodes. The best parameters (Θ∗, q∗) are determined by (Θ∗, q∗) = arg min Θ,q R(q, Θ; S). (4) To solve Eqn. 4, we consider an alternating optimization strategy: First, we fix q and optimize Θ; Then, we fix Θ and optimize q. These two learning steps are alternatively performed, until convergence or a maximum number of iterations is reached (defined in the experiments). 3.2.1 Learning Split Nodes In this section, we describe how to learn the parameter Θ for split nodes, when the distributions held by the leaf nodes q are fixed. We compute the gradient of the loss R(q, Θ; S) w.r.t. Θ by the chain rule: ∂R(q, Θ; S) ∂Θ = N X i=1 X n∈N ∂R(q, Θ; S) ∂fϕ(n)(xi; Θ) ∂fϕ(n)(xi; Θ) ∂Θ , (5) where only the first term depends on the tree and the second term depends on the specific type of the function fϕ(n). The first term is given by ∂R(q, Θ; S) ∂fϕ(n)(xi; Θ) = 1 N C X c=1 dyc xi sn(xi; Θ)gc(xi; Θ, T r n ) gc(xi; Θ, T ) − 1 −sn(xi; Θ) gc(xi; Θ, T l n) gc(xi; Θ, T ) , (6) where gc(xi; Θ, T l n) = P ℓ∈Lln p(ℓ|xi; Θ)qℓc and gc(xi; Θ, T r n ) = P ℓ∈Lrn p(ℓ|xi; Θ)qℓc. Note that, let Tn be the tree rooted at the node n, then we have gc(xi; Θ, Tn) = gc(xi; Θ, T l n) + gc(xi; Θ, T r n ). This means the gradient computation in Eqn. 6 can be started at the leaf nodes and carried out in a bottom up manner. Thus, the split node parameters can be learned by standard back-propagation. 3.2.2 Learning Leaf Nodes Now, fixing the parameter Θ, we show how to learn the distributions held by the leaf nodes q, which is a constrained optimization problem: min q R(q, Θ; S), s.t., ∀ℓ, C X c=1 qℓc = 1. (7) Here, we propose to address this constrained convex optimization problem by variational bounding [19, 29], which leads to a step-size free and fast-converged update rule for q. In variational bounding, an original objective function to be minimized gets replaced by its bound in an iterative manner. A upper bound for the loss function R(q, Θ; S) can be obtained by Jensen’s inequality: R(q, Θ; S) = −1 N N X i=1 C X c=1 dyc xi log X ℓ∈L p(ℓ|xi; Θ)qℓc ≤−1 N N X i=1 C X c=1 dyc xi X ℓ∈L ξℓ(¯qℓc, xi) log p(ℓ|xi; Θ)qℓc ξℓ(¯qℓc, xi) , (8) where ξℓ(qℓc, xi) = p(ℓ|xi;Θ)qℓc gc(xi;Θ,T ) . We define φ(q, ¯q) = −1 N N X i=1 C X c=1 dyc xi X ℓ∈L ξℓ(¯qℓc, xi) log p(ℓ|xi; Θ)qℓc ξℓ(¯qℓc, xi) . (9) Then φ(q, ¯q) is an upper bound for R(q, Θ; S), which has the property that for any q and ¯q, φ(q, ¯q) ≥R(q, Θ; S), and φ(q, q) = R(q, Θ; S). Assume that we are at a point q(t) corresponding to the t-th iteration, then φ(q, q(t)) is an upper bound for R(q, Θ; S). In the next iteration, q(t+1) is chosen such that φ(q(t+1), q) ≤R(q(t), Θ; S), which implies R(q(t+1), Θ; S) ≤R(q(t), Θ; S). 5 Consequently, we can minimize φ(q, ¯q) instead of R(q, Θ; S) after ensuring that R(q(t), Θ; S) = φ(q(t), ¯q), i.e., ¯q = q(t). So we have q(t+1) = arg min q φ(q, q(t)), s.t., ∀ℓ, C X c=1 qℓc = 1, (10) which leads to minimizing the Lagrangian defined by ϕ(q, q(t)) = φ(q, q(t)) + X ℓ∈L λℓ( C X c=1 qℓc −1), (11) where λℓis the Lagrange multiplier. By setting ∂ϕ(q,q(t)) ∂qℓc = 0, we have λℓ= 1 N N X i=1 C X c=1 dyc xiξℓ(q(t) ℓc , xi) and q(t+1) ℓc = PN i=1 dyc xiξℓ(q(t) ℓc , xi) PC c=1 PN i=1 dyc xiξℓ(q(t) ℓc , xi) . (12) Note that, q(t+1) ℓc satisfies that q(t+1) ℓc ∈[0, 1] and PC c=1 q(t+1) ℓc = 1. Eqn. 12 is the update scheme for distributions held by the leaf nodes. The starting point q(0) ℓ can be simply initialized by the uniform distribution: q(0) ℓc = 1 C . 3.3 Learning a Forest A forest is an ensemble of decision trees F = {T1, . . . , TK}. In the training stage, all trees in the forest F use the same parameters Θ for feature learning function f(·; Θ) (but correspond to different output units of f assigned by ϕ, see Fig. 2), but each tree has independent leaf node predictions q. The loss function for a forest is given by averaging the loss functions for all individual trees: RF = 1 K PK k=1 RTk, where RTk is the loss function for tree Tk defined by Eqn. 3. To learn Θ by fixing the leaf node predictions q of all the trees in the forest F, based on the derivation in Sec. 3.2 and referring to Fig. 2, we have ∂RF ∂Θ = 1 K N X i=1 K X k=1 X n∈Nk ∂RTk ∂fϕk(n)(xi; Θ) ∂fϕk(n)(xi; Θ) ∂Θ , (13) where Nk and ϕk(·) are the split node set and the index function of Tk, respectively. Note that, the index function ϕk(·) for each tree is randomly assigned before tree learning, and thus split nodes correspond to a subset of output units of f. This strategy is similar to the random subspace method [17], which increases the randomness in training to reduce the risk of overfitting. As for q, since each tree in the forest F has its own leaf node predictions q, we can update them independently by Eqn. 12, given by Θ. For implementational convenience, we do not conduct this update scheme on the whole dataset S but on a set of mini-batches B. The training procedure of a LDLF is shown in Algorithm. 1. Algorithm 1 The training procedure of a LDLF. Require: S: training set, nB: the number of mini-batches to update q Initialize Θ randomly and q uniformly, set B = {∅} while Not converge do while |B| < nB do Randomly select a mini-batch B from S Update Θ by computing gradient (Eqn. 13) on B B = B S B end while Update q by iterating Eqn. 12 on B B = {∅} end while In the testing stage, the output of the forest F is given by averaging the predictions from all the individual trees: g(x; Θ, F) = 1 K PK k=1 g(x; Θ, Tk). 6 4 Experimental Results Our realization of LDLFs is based on “Caffe” [18]. It is modular and implemented as a standard neural network layer. We can either use it as a shallow stand-alone model (sLDLFs) or integrate it with any deep networks (dLDLFs). We evaluate sLDLFs on different LDL tasks and compare it with other stand-alone LDL methods. As dLDLFs can be learned from raw image data in an end-to-end manner, we verify dLDLFs on a computer vision application, i.e., facial age estimation. The default settings for the parameters of our forests are: tree number (5), tree depth (7), output unit number of the feature learning function (64), iteration times to update leaf node predictions (20), the number of mini-batches to update leaf node predictions (100), maximum iteration (25000). 4.1 Comparison of sLDLFs to Stand-alone LDL Methods We compare our shallow model sLDLFs with other state-of-the-art stand-alone LDL methods. For sLDLFs, the feature learning function f(x, Θ) is a linear transformation of x, i.e., the i-th output unit fi(x, θi) = θ⊤ i x, where θi is the i-th column of the transformation matrix Θ. We used 3 popular LDL datasets in [6], Movie, Human Gene and Natural Scene1. The samples in these 3 datasets are represented by numerical descriptors, and the ground truths for them are the rating distributions of crowd opinion on movies, the diseases distributions related to human genes and label distributions on scenes, such as plant, sky and cloud, respectively. The label distributions of these 3 datasets are mixture distributions, such as the rating distribution shown in Fig. 1(b). Following [7, 27], we use 6 measures to evaluate the performances of LDL methods, which compute the average similarity/distance between the predicted rating distributions and the real rating distributions, including 4 distance measures (K-L, Euclidean, Sφrensen, Squared χ2) and two similarity measures (Fidelity, Intersection). We evaluate our shallow model sLDLFs on these 3 datasets and compare it with other state-of-the-art stand-alone LDL methods. The results of sLDLFs and the competitors are summarized in Table 1. For Movie we quote the results reported in [27], as the code of [27] is not publicly available. For the results of the others two, we run code that the authors had made available. In all case, following [27, 6], we split each dataset into 10 fixed folds and do standard ten-fold cross validation, which represents the result by “mean±standard deviation” and matters less how training and testing data get divided. As can be seen from Table 1, sLDLFs perform best on all of the six measures. Table 1: Comparison results on three LDL datasets [6]. “↑” and “↓” indicate the larger and the smaller the better, respectively. Dataset Method K-L ↓ Euclidean ↓ Sφrensen ↓ Squared χ2 ↓ Fidelity ↑ Intersection ↑ Movie sLDLF (ours) 0.073±0.005 0.133±0.003 0.130±0.003 0.070±0.004 0.981±0.001 0.870±0.003 AOSO-LDLogitBoost [27] 0.086±0.004 0.155±0.003 0.152±0.003 0.084±0.003 0.978±0.001 0.848±0.003 LDLogitBoost [27] 0.090±0.004 0.159±0.003 0.155±0.003 0.088±0.003 0.977±0.001 0.845±0.003 LDSVR [7] 0.092±0.005 0.158±0.004 0.156±0.004 0.088±0.004 0.977±0.001 0.844±0.004 BFGS-LDL [6] 0.099±0.004 0.167±0.004 0.164±0.003 0.096±0.004 0.974±0.001 0.836±0.003 IIS-LDL [11] 0.129±0.007 0.187±0.004 0.183±0.004 0.120±0.005 0.967±0.001 0.817±0.004 Human Gene sLDLF (ours) 0.228±0.006 0.085±0.002 0.212±0.002 0.179±0.004 0.948±0.001 0.788±0.002 LDSVR [7] 0.245±0.019 0.099±0.005 0.229±0.015 0.189±0.021 0.940±0.006 0.771±0.015 BFGS-LDL [6] 0.231±0.021 0.076±0.006 0.231±0.012 0.211±0.018 0.938±0.008 0.769±0.012 IIS-LDL [11] 0.239±0.018 0.089±0.006 0.253±0.009 0.205±0.012 0.944±0.003 0.747±0.009 Natural Scene sLDLF (ours) 0.534±0.013 0.317±0.014 0.336±0.010 0.448±0.017 0.824±0.008 0.664±0.010 LDSVR [7] 0.852±0.023 0.511±0.021 0.492±0.016 0.595±0.026 0.813±0.008 0.509±0.016 BFGS-LDL [6] 0.856±0.061 0.475±0.029 0.508±0.026 0.716±0.041 0.722±0.021 0.492±0.026 IIS-LDL [11] 0.879±0.023 0.458±0.014 0.539±0.011 0.792±0.019 0.686±0.009 0.461±0.011 4.2 Evaluation of dLDLFs on Facial Age Estimation In some literature [8, 11, 28, 15, 5], age estimation is formulated as a LDL problem. We conduct facial age estimation experiments on Morph [24], which contains more than 50,000 facial images from about 13,000 people of different races. Each facial image is annotated with a chronological age. To generate an age distribution for each face image, we follow the same strategy used in [8, 28, 5], which uses a Gaussian distribution whose mean is the chronological age of the face image (Fig. 1(a)). The predicted age for a face image is simply the age having the highest probability in the predicted 1We download these datasets from http://cse.seu.edu.cn/people/xgeng/LDL/index.htm. 7 label distribution. The performance of age estimation is evaluated by the mean absolute error (MAE) between predicted ages and chronological ages. As the current state-of-the-art result on Morph is obtain by fine-tuning DLDL [5] on VGG-Face [23], we also build a dLDLF on VGG-Face, by replacing the softmax layer in VGGNet by a LDLF. Following [5], we do standard 10 ten-fold cross validation and the results are summarized in Table. 2, which shows dLDLF achieve the state-of-the-art performance on Morph. Note that, the significant performance gain between deep LDL models (DLDL and dLDLF) and non-deep LDL models (IIS-LDL, CPNN, BFGS-LDL) and the superiority of dLDLF compared with DLDL verifies the effectiveness of end-to-end learning and our tree-based model for LDL, respectively. Table 2: MAE of age estimation comparison on Morph [24]. Method IIS-LDL [11] CPNN [11] BFGS-LDL [6] DLDL+VGG-Face [5] dLDLF+VGG-Face (ours) MAE 5.67±0.15 4.87±0.31 3.94±0.05 2.42±0.01 2.24±0.02 As the distribution of gender and ethnicity is very unbalanced in Morph, many age estimation methods [13, 14, 15] are evaluated on a subset of Morph, called Morph_Sub for short, which consists of 20,160 selected facial images to avoid the influence of unbalanced distribution. The best performance reported on Morph_Sub is given by D2LDL [15], a data-dependent LDL method. As D2LDL used the output of the “fc7” layer in AlexNet [21] as the face image features, here we integrate a LDLF with AlexNet. Following the experiment setting used in D2LDL, we evaluate our dLDLF and the competitors, including both SLL and LDL based methods, under six different training set ratios (10% to 60%). All of the competitors are trained on the same deep features used by D2LDL. As can be seen from Table 3, our dLDLFs significantly outperform others for all training set ratios. Figure 3: MAE of age estimation comparison on Morph_Sub. Method Training set ratio 10% 20% 30% 40% 50% 60% AAS [22] 4.9081 4.7616 4.6507 4.5553 4.4690 4.4061 LARR [12] 4.7501 4.6112 4.5131 4.4273 4.3500 4.2949 IIS-ALDL [9] 4.1791 4.1683 4.1228 4.1107 4.1024 4.0902 D2LDL [15] 4.1080 3.9857 3.9204 3.8712 3.8560 3.8385 dLDLF (ours) 3.8495 3.6220 3.3991 3.2401 3.1917 3.1224 Note that, the generated age distributions are unimodal distributions and the label distributions used in Sec. 4.1 are mixture distributions. The proposed method LDLFs achieve the state-of-the-art results on both of them, which verifies that our model has the ability to model any general form of label distributions. 4.3 Time Complexity Let h and sB be the tree depth and the batch size, respectively. Each tree has 2h−1 −1 split nodes and 2h−1 leaf nodes. Let D = 2h−1 −1. For one tree and one sample, the complexity of a forward pass and a backward pass are O(D + D + 1×C) = O(D×C) and O(D + 1×C + D×C) = O(D×C), respectively. So for K trees and nB batches, the complexity of a forward and backward pass is O(D×C×K×nB×sB). The complexity of an iteration to update leaf nodes are O(nB×sB×K×C×D + 1) = O(D×C×K×nB×sB). Thus, the complexity for the training procedure (one epoch, nB batches) and the testing procedure (one sample) are O(D×C×K×nB×sB) and O(D×C×K), respectively. LDLFs are efficient: On Morph_Sub (12636 training images, 8424 testing images), our model only takes 5250s for training (25000 iterations) and 8s for testing all 8424 images. 4.4 Parameter Discussion Now we discuss the influence of parameter settings on performance. We report the results of rating prediction on Movie (measured by K-L) and age estimation on Morph_Sub with 60% training set ratio (measured by MAE) for different parameter settings in this section. Tree number. As a forest is an ensemble model, it is necessary to investigate how performances change by varying the tree number used in a forest. Note that, as we discussed in Sec. 2, the ensemble strategy to learn a forest proposed in dNDFs [20] is different from ours. Therefore, it is necessary to see which ensemble strategy is better to learn a forest. Towards this end, we replace our ensemble strategy in dLDLFs by the one used in dNDFs, and name this method dNDFs-LDL. The corresponding shallow model is named by sNDFs-LDL. We fix other parameters, i.e., tree depth and 8 output unit number of the feature learning function, as the default setting. As shown in Fig. 4 (a), our ensemble strategy can improve the performance by using more trees, while the one used in dNDFs even leads to a worse performance than one for a single tree. Observed from Fig. 4, the performance of LDLFs can be improved by using more trees, but the improvement becomes increasingly smaller and smaller. Therefore, using much larger ensembles does not yield a big improvement (On Movie, the number of trees K = 100: K-L = 0.070 vs K = 20: K-L = 0.071). Note that, not all random forests based methods use a large number of trees, e.g., Shotton et al. [25] obtained very good pose estimation results from depth images by only 3 decision trees. Tree depth. Tree depth is another important parameter for decision trees. In LDLFs, there is an implicit constraint between tree depth h and output unit number of the feature learning function τ: τ ≥2h−1 −1. To discuss the influence of tree depth to the performance of dLDLFs, we set τ = 2h−1 and fix tree number K = 1, and the performance change by varying tree depth is shown in Fig. 4 (b). We see that the performance first improves then decreases with the increase of the tree depth. The reason is as the tree depth increases, the dimension of learned features increases exponentially, which greatly increases the training difficulty. So using much larger depths may lead to bad performance (On Movie, tree depth h = 18: K-L = 0.1162 vs h = 9: K-L = 0.0831). Figure 4: The performance change of age estimation on Morph_Sub and rating prediction on Movie by varying (a) tree number and (b) tree depth. Our approach (dLDLFs/sLDLFs) can improve the performance by using more trees, while using the ensemble strategy proposed in dNDFs (dNDFsLDL/sNDFs-LDL) even leads to a worse performance than one for a single tree. 5 Conclusion We present label distribution learning forests, a novel label distribution learning algorithm inspired by differentiable decision trees. We defined a distribution-based loss function for the forests and found that the leaf node predictions can be optimized via variational bounding, which enables all the trees and the feature they use to be learned jointly in an end-to-end manner. Experimental results showed the superiority of our algorithm for several LDL tasks and a related computer vision application, and verified our model has the ability to model any general form of label distributions. Acknowledgement. This work was supported in part by the National Natural Science Foundation of China No. 61672336, in part by “Chen Guang” project supported by Shanghai Municipal Education Commission and Shanghai Education Development Foundation No. 15CG43 and in part by ONR N00014-15-1-2356. References [1] Y. Amit and D. Geman. Shape quantization and recognition with randomized trees. Neural Computation, 9(7):1545–1588, 1997. [2] A. L. Berger, S. D. Pietra, and V. J. D. Pietra. A maximum entropy approach to natural language processing. Computational Linguistics, 22(1):39–71, 1996. [3] L. Breiman. Random forests. Machine Learning, 45(1):5–32, 2001. [4] A. Criminisi and J. Shotton. Decision Forests for Computer Vision and Medical Image Analysis. Springer, 2013. [5] B.-B. Gao, C. Xing, C.-W. Xie, J. Wu, and X. Geng. Deep label distribution learning with label ambiguity. arXiv:1611.01731, 2017. [6] X. Geng. Label distribution learning. IEEE Trans. Knowl. Data Eng., 28(7):1734–1748, 2016. 9 [7] X. Geng and P. Hou. Pre-release prediction of crowd opinion on movies by label distribution learning. In Pro. IJCAI, pages 3511–3517, 2015. [8] X. Geng, K. Smith-Miles, and Z. Zhou. Facial age estimation by learning from label distributions. In Proc. AAAI, 2010. [9] X. Geng, Q. Wang, and Y. Xia. Facial age estimation by adaptive label distribution learning. In Proc. ICPR, pages 4465–4470, 2014. [10] X. Geng and Y. Xia. Head pose estimation based on multivariate label distribution. In Proc. CVPR, pages 1837–1842, 2014. [11] X. Geng, C. Yin, and Z. Zhou. Facial age estimation by learning from label distributions. IEEE Trans. Pattern Anal. Mach. Intell., 35(10):2401–2412, 2013. [12] G. Guo, Y. Fu, C. R. Dyer, and T. S. Huang. Image-based human age estimation by manifold learning and locally adjusted robust regression. IEEE Trans. Image Processing, 17(7):1178–1188, 2008. [13] G. Guo and G. Mu. Human age estimation: What is the influence across race and gender? In CVPR Workshops, pages 71–78, 2010. [14] G. Guo and C. Zhang. A study on cross-population age estimation. In Proc. CVPR, pages 4257–4263, 2014. [15] Z. He, X. Li, Z. Zhang, F. Wu, X. Geng, Y. Zhang, M.-H. Yang, and Y. Zhuang. Data-dependent label distribution learning for age estimation. IEEE Trans. on Image Processing, 2017. [16] T. K. Ho. Random decision forests. In Proc. ICDAR, pages 278–282, 1995. [17] T. K. Ho. The random subspace method for constructing decision forests. IEEE Trans. Pattern Anal. Mach. Intell., 20(8):832–844, 1998. [18] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014. [19] M. I. Jordan, Z. Ghahramani, T. S. Jaakkola, and L. K. Saul. An introduction to variational methods for graphical models. Machine Learning, 37(2):183–233, 1999. [20] P. Kontschieder, M. Fiterau, A. Criminisi, and S. R. Bulò. Deep neural decision forests. In Proc. ICCV, pages 1467–1475, 2015. [21] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Proc. NIPS, pages 1106–1114, 2012. [22] A. Lanitis, C. Draganova, and C. Christodoulou. Comparing different classifiers for automatic age estimation. IEEE Trans. on Cybernetics,, 34(1):621–628, 2004. [23] O. M. Parkhi, A. Vedaldi, and A. Zisserman. Deep face recognition. In Proc. BMVC, pages 41.1–41.12, 2015. [24] K. Ricanek and T. Tesafaye. MORPH: A longitudinal image database of normal adult age-progression. In Proc. FG, pages 341–345, 2006. [25] J. Shotton, A. W. Fitzgibbon, M. Cook, T. Sharp, M. Finocchio, R. Moore, A. Kipman, and A. Blake. Real-time human pose recognition in parts from single depth images. In Proc. CVPR, pages 1297–1304, 2011. [26] G. Tsoumakas and I. Katakis. Multi-label classification: An overview. International Journal of Data Warehousing and Mining, 3(3):1–13, 2007. [27] C. Xing, X. Geng, and H. Xue. Logistic boosting regression for label distribution learning. In Proc. CVPR, pages 4489–4497, 2016. [28] X. Yang, X. Geng, and D. Zhou. Sparsity conditional energy label distribution learning for age estimation. In Proc. IJCAI, pages 2259–2265, 2016. [29] A. L. Yuille and A. Rangarajan. The concave-convex procedure. Neural Computation, 15(4):915–936, 2003. [30] Y. Zhou, H. Xue, and X. Geng. Emotion distribution recognition from facial expressions. In Proc. MM, pages 1247–1250, 2015. 10 | 2017 | 286 |
6,770 | Efficient Sublinear-Regret Algorithms for Online Sparse Linear Regression with Limited Observation Shinji Ito NEC Corporation s-ito@me.jp.nec.com Daisuke Hatano National Institute of Informatics hatano@nii.ac.jp Hanna Sumita National Institute of Informatics sumita@nii.ac.jp Akihiro Yabe NEC Corporation a-yabe@cq.jp.nec.com Takuro Fukunaga JST, PRESTO takuro@nii.ac.jp Naonori Kakimura Keio University kakimura@math.keio.ac.jp Ken-ichi Kawarabayashi National Institute of Informatics k-keniti@nii.ac.jp Abstract Online sparse linear regression is the task of applying linear regression analysis to examples arriving sequentially subject to a resource constraint that a limited number of features of examples can be observed. Despite its importance in many practical applications, it has been recently shown that there is no polynomialtime sublinear-regret algorithm unless NP⊆BPP, and only an exponential-time sublinear-regret algorithm has been found. In this paper, we introduce mild assumptions to solve the problem. Under these assumptions, we present polynomialtime sublinear-regret algorithms for the online sparse linear regression. In addition, thorough experiments with publicly available data demonstrate that our algorithms outperform other known algorithms. 1 Introduction In online regression, a learner receives examples one by one, and aims to make a good prediction from the features of arriving examples, learning a model in the process. Online regression has attracted attention recently in the research community in managing massive learning data.In realworld scenarios, however, with resource constraints, it is desired to make a prediction with only a limited number of features per example. Such scenarios arise in the context of medical diagnosis of a disease [3] and in generating a ranking of web pages in a search engine, in which it costs to obtain features or only partial features are available in each round. In both these examples, predictions need to be made sequentially because a patient or a search query arrives online. To resolve the above issue of limited access to features, Kale [7] proposed online sparse regression. In this problem, a learner makes a prediction for the labels of examples arriving sequentially over a number of rounds. Each example has d features that can be potentially accessed by the learner. However, in each round, the learner can acquire the values of at most k′ features out of the d features, where k′ is a parameter set in advance. The learner then makes a prediction for the label of the example. After the prediction, the true label is revealed to the learner, and the learner suffers a loss for making an incorrect prediction. The performance of the prediction is measured here by the standard notion of regret, which is the difference between the total loss of the learner and the total 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Table 1: Computational complexity of online sparse linear regression. Assumptions Time complexity (1) (2) (a) (b) ✓ ✓ Hard [5] ✓ ✓ Hard (Theorem 1) ✓ ✓ ✓ Polynomial time (Algorithms 1, 2) ✓ ✓ ✓ Polynomial time (Algorithm 3) loss of the best predictor. In [7], the best predictor is defined as the best k-sparse linear predictor, i.e., the label is defined as a linear combination of at most k features. Online sparse regression is a natural online variant of sparse regression; however, its computational complexity was not well known until recently, as Kale [7] raised a question of whether it is possible to achieve sublinear regret in polynomial time for online sparse linear regression. Foster et al. [5] answered the question by proving that no polynomial-time algorithm achieves sublinear regret unless NP⊆BPP. Indeed, this hardness result holds even when observing Ω(k log d) features per example. On the positive side, they also proposed an exponential-time algorithm with sublinear regret, when we can observe at least k + 2 features in each round. However, their algorithm is not expected to work efficiently in practice. In fact, the algorithm enumerates all the d k′ possibilities to determine k′ features in each round, which requires exponential time for any instance. Our contributions. In this paper, we show that online sparse linear regression admits a polynomial-time algorithm with sublinear regret, under mild practical assumptions. First, we assume that the features of examples arriving online are determined by a hidden distribution (Assumption (1)), and the labels of the examples are determined by a weighted average of k features, where the weights are fixed through all rounds (Assumption (2)). These are natural assumptions in the online linear regression. However, Foster et al. [5] showed that no polynomial-time algorithm can achieve sublinear regret unless NP⊆BPP even under these two assumptions.1 Owing to this hardness, we introduce two types of conditions on the distribution of features, both of which are closely related to the restricted isometry property (RIP) that has been studied in the literature of sparse recovery. The first condition, which we call linear independence of features (Assumption (a)), is stronger than RIP. This condition roughly says that all the features are linearly independent. The second condition, which we call compatibility (Assumption (b)), is weaker than RIP. Thus, an instance having RIP always satisfies the compatibility condition. Under these assumptions, we propose the following three algorithms. Here, T is the number of rounds. • Algorithm 1: A polynomial-time algorithm that achieves O( d k′−k √ T) regret, under Assumptions (1), (2), and (a), which requires at least k + 2 features to be observed per example. • Algorithm 2: A polynomial-time algorithm that achieves O( √ dT + d16 k′16 ) regret, under Assumptions (1), (2), and (a), which requires at least k features to be observed per example. • Algorithm 3: A polynomial-time algorithm that achieves O( √ dT + d16 k′16 ) regret, under Assumptions (1), (2), and (b), which requires at least k features to be observed per example. We can also construct an algorithm achieving O( d k′−k √ T) regret under Assumption (b) for the case where k′ ≥k + 2, analogous to Algorithm 1, but we omit it due to space limitations. Assumptions (1)+(2)+(a) or (1)+(2)+(b) seem to be minimal assumptions needed to achieve sublinear regret in polynomial time. Indeed, as listed in Table 1, the problem is hard if any one of the assumptions is violated, where hard means that no polynomial-time algorithm can achieve sublinear regret unless NP⊆BPP. Note that Assumption (a) is stronger than (b). In addition to proving theoretical regret bounds of our algorithms, we perform thorough experiments to evaluate the algorithms. We verified that our algorithms outperform the exponential-time algorithm [5] in terms of computational complexity as well as performance of the prediction. Our algorithms also outperform (baseline) heuristic-based algorithms and algorithms proposed in [2, 6] 1 Although the statement in [5] does not mention the assumptions, its proof indicates that the hardness holds even with these assumptions. 2 for online learning based on limited observation. Moreover, we observe that our algorithms perform well even for a real dataset, which may not satisfy our assumptions (deciding whether the model satisfies our assumptions is difficult; for example, the RIP parameter cannot be approximated within any constant factor under a reasonable complexity assumption [9]). Thus, we can conclude that our algorithm is applicable in practice. Overview of our techniques. One naive strategy for choosing a limited number of features is to choose “large-weight” features in terms of estimated ground-truth regression weights. This strategy, however, does not achieve sublinear regret, as it ignores small-weight features. When we have Assumption (a), we show that if we observe two more features chosen uniformly at random, together with the largest k features, we can make a good prediction. More precisely, using the observed features, we output the label that minimizes the least-square loss function, based on the technique using an unbiased estimator of the gradient [2, 6] and the regularized dual averaging (RDA) method (see, e.g., [11, 4]). This idea gives Algorithm 1, and the details are given in Section 4. The reason why we use RDA is that it is efficient in terms of computational time and memory space as pointed out in [11] and, more importantly, we will combine this with the ℓ1 regularization later. However, this requires at least k + 2 features to be observed in each round. To avoid the requirement of two extra observations, the main idea is to employ Algorithm 1 with a partial dataset. As a by-product of Algorithm 1, we can estimate the ground-truth regression weight vector with high probability, even without observing extra features in each round. We use the ground-truth weight vector estimated by Algorithm 1 to choose k features. Combining this idea with RDA adapted for the sparse regression gives Algorithm 2 (Section 5.1) under Assumption (a). The compatibility condition (Assumption (b)) is often used in LASSO (Least Absolute Shrinkage and Selection Operator), and it is known that minimization with an ℓ1 regularizer converges to the sparse solution under the compatibility condition [1]. We introduce ℓ1 regularization into Algorithm 1 to estimate the ground-truth regression weight vector when we have Assumption (b) instead of Assumption (a). This gives Algorithm 3 (Section 5.2). Related work. In the online learning problem, a learner aims to predict a model based on the arriving examples. Specifically, in the linear function case, a learner predicts the coefficient wt of a linear function w⊤ t xt whenever an example with features xt arrives in round t. The learner then suffers a loss ℓt(wt) = (yt −w⊤ t xt)2. The aim is to minimize the total loss PT t=1(ℓt(wt) −ℓt(w)) for an arbitrary w. It is known that both the gradient descent method [12] and the dual averaging method [11] attain an O( √ T) regret even for the more general convex function case. However, these methods require access to all features of the examples. In linear regression with limited observation, the limited access to features in regression has been considered [2, 6]. In this problem, a learner can acquire only the values of at most k′ features among d features. The purpose here is to estimate a good weight vector, e.g., minimize the loss function ℓ(w) or the loss function with ℓ1 regularizer ℓ(w) + ∥w∥1. Let us note that, even if we obtain a good weight vector w with small ℓ(w), we cannot always compute w⊤xt from limited observation of xt and, hence, in our setting the prediction error might not be as small as ℓ(w). Thus, our setting uses a different loss function, defined in Section 2, to minimize the prediction error. Another problem incorporating the limited access is proposed by Zolghadr et al. [13]. Here, instead of observing k′ features, one considers the situation where obtaining a feature has an associated cost. In each round, one chooses a set of features to pay some amount of money, and the purpose is to minimize the sum of the regret and the total cost. They designed an exponential-time algorithm for the problem. Online sparse linear regression has been studied in [5, 7], but only an exponential-time algorithm has been proposed so far. In fact, Foster et al. [5] suggested designing an efficient algorithm for a special class of the problem as future work. The present paper aims to follow this suggestion. Recently, Kale et al. [8]2 presented computationally efficient algorithms to achieve sublinear regret under the assumption that input features satisfy RIP. Though this study includes similar results to ours, we can realize some differences. Our paper considers the assumption of the compatibility condition without extra observation (i.e., the case of k′ = k), whereas Kale et al. [8] studies a 2The paper [8] was published after our manuscript was submitted. 3 stronger assumption with extra observation (k′ ≥k + 2) that yields a smaller regret bound than ours. They also studies the agnostic (adversarial) setting. 2 Problem setting Online sparse linear regression. We suppose that there are T rounds, and an example arrives online in each round. Each example is represented by d features and is associated with a label, where features and labels are all real numbers. We denote the features of the example arriving in round t by xt = (xt1, . . . , xtd)⊤∈{x ∈Rd | ∥x∥≤1}, where the norm ∥· ∥without subscripts denotes the ℓ2 norm. The label of each example is denoted by yt ∈[−1, 1]. The purpose of the online sparse regression is to predict the label yt ∈R from a partial observation of xt in each round t = 1, . . . , T. The prediction is made through the following four steps: (i) we choose a set St ⊆[d] := {1, . . . , d} of features to observe, where |St| is restricted to be at most k′; (ii) observe the selected features {xti}i∈St; (iii) on the basis of observation {xti}i∈St, estimate a predictor ˆyt of yt; and (iv) observe the true value of yt. From St, we define Dt ∈Rd×d to be the diagonal matrix such that its (i, i)th entries are 1 for i ∈St and the other entries are 0. Then, observing the selected features {xti}i∈St in (ii) is equivalent to observing Dtxt. The predictor ˆyt is computed by ˆyt = w⊤ t Dtxt in (iii). Throughout the paper, we assume the following conditions, corresponding to Assumptions (1) and (2) in Section 1, respectively. Assumption (1) There exists a weight vector w∗∈Rd such that ∥w∥≤1 and yt = w∗⊤xt + ϵt for all t = 1, . . . , T, where ϵt ∼Dϵ, independent and identically distributed (i.i.d.), and E[ϵt] = 0, E[ϵt2] = σ2. There exists a distribution Dx on Rd such that xt ∼Dx, i.i.d. and independent of {ϵt}. Assumption (2) The true weight vector w∗is k-sparse, i.e., S∗= supp(w∗) = {i ∈[d] | w∗ i ̸= 0} satisfies |S∗| ≤k. Regret. The performance of the prediction is evaluated based on the regret RT (w) defined by RT (w) = T X t=1 (ˆyt −yt)2 − T X t=1 (w⊤xt −yt)2. (1) Our goal is to achieve smaller regret RT (w) for an arbitrary w ∈Rd such that ∥w∥≤1 and ∥w∥0 ≤k. For random inputs and randomized algorithms, we consider the expected regret maxw:∥w∥0≤k,∥w∥≤1 E[RT (w)]. Define the loss function ℓt(w) = (w⊤xt −yt)2. If we compute a predictor ˆyt = w⊤ t Dtxt using a weight vector wt = (wt1, . . . , wtd)⊤∈Rd in each step, we can rewrite the regret RT (w) in (1) using Dt and wt as RT (w) = T X t=1 (ℓt(Dtwt) −ℓt(w)) (2) because (ˆyt −yt)2 = (w⊤ t Dtxt −yt)2 = ℓt(Dtwt). It is worth noting that if our goal is only to construct wt that minimizes the loss function ℓt(wt), then the definition of the regret should be R′ T (w) = T X t=1 (ℓt(wt) −ℓt(w)). (3) However, the goal of online sparse regression involves predicting yt from the limited observation. Hence, we use (2) to evaluate the performance. In terms of the regret defined by (3), several algorithms based on limited observation have been developed. For example, the algorithms proposed by Cesa-Bianchi et al. [3] and Hazan and Koren [6] achieve O( √ T) regret of (3). 4 3 Extra assumptions on features of examples Foster et al. [5] showed that Assumptions (1) and (2) are not sufficient to achieve sublinear regret. Owing to this observation, we impose extra assumptions. Let V := E[x⊤ t xt] ∈Rd×d and let L be the Cholesky decomposition of V (i.e., V = L⊤L). Denote the largest and the smallest singular values of L by σ1 and σd, respectively. Under Assumption (1) in Section 2, we have σ1 ≤1 because, for arbitrary unit vector u ∈Rd, it holds that u⊤V u = E[(u⊤x)2] ≤1. For a vector w ∈R[d] and S ⊆[d], we let wS denote the restriction of w onto S. For S ⊆[d], Sc denotes [d] \ S. We assume either one of the following conditions holds. (a) Linear independence of features: σd > 0. (b) Compatibility: There exists a constant φ0 > 0 that satisfies φ2 0∥wS∗∥2 1 ≤kw⊤V w for all w ∈Rd with ∥w(S∗)c∥1 ≤2∥wS∗∥1. We assume the linear independence of features in Sections 4 and 5.1, and the compatibility in Section 5.2 to develop efficient algorithms. Note that condition (a) means that L is non-singular, and so is V . In other words, condition (a) indicates that the features in xt are linearly independent. This is the reason why we call condition (a) the “linear independence of features” assumption. Note that the linear independence of features does not imply the stochastic independence of features. Conditions (a) and (b) are closely related to RIP. Indeed, condition (b) is a weaker assumption than RIP, and RIP is weaker than condition (a), i.e., (a) linear independence of features =⇒RIP =⇒ (b) compatibility (see, e.g., [1]). We now clarify how the above two assumptions are connected to the regret. The expectation of the loss function ℓt(w) is equal to Ext,yt[ℓt(w)] = Ext∼Dx,ϵt∼Dϵ[(w⊤xt −w∗⊤xt −ϵt)2] = Ext∼Dx[((w −w∗)⊤xt)2] + Eϵt∼Dϵ[ϵ⊤ t ϵt] = (w −w∗)⊤V (w −w∗) + σ2 for all t, where the second equality comes from E[ϵt] = 0 and that xt and ϵt are independent. Denote this function by ℓ(w), and then ℓ(w) is minimized when w = w∗. If Dt and wt are determined independently of xt and yt, the expectation of the regret RT (w) satisfies E[RT (w)] = E[ T X t=1 (ℓ(Dtwt) −ℓ(w))] ≤E[ T X t=1 (ℓ(Dtwt) −ℓ(w∗))] = E[ T X t=1 (Dtwt −w∗)⊤V (Dtwt −w∗)] = E[ T X t=1 ∥L(Dtwt −w∗)∥2]. (4) We bound (4) in the analysis. Hardness result. Similarly to [5], we can show that it remains hard under Assumptions (1), (2), and (a). Refer to Appendix A for the proof. Theorem 1. Let D be any positive constant, and let cD ∈(0, 1) be a constant dependent on D. Suppose that Assumptions (1) and (2) hold with k = O(dcD) and k′ = ⌊kD ln d⌋. If an algorithm for the online sparse regression problem runs in poly(d, T) time per iteration and achieves a regret at most poly(d, 1/σd)T 1−δ in expectation for some constant δ > 0, then NP⊆BPP. 4 Algorithm with extra observations and linear independence of features In this section, we present Algorithm 1. Here we assume k′ ≥k + 2, in addition to the linear independence of features (Assumption (a)). The additional assumption will be removed in Section 5. As noted in Section 2, our algorithm first computes a weight vector wt, chooses a set St of k′ features to be observed, and computes a label ˆyt by ˆyt = w⊤ t Dtxt in each round t. In addition, our algorithm constructs an unbiased estimator ˆgt of the gradient gt of the loss function ℓt(w) at w = wt, i.e., gt = ∇wℓt(wt) = 2xt(x⊤ t wt −yt) at the end of the round. In the following, we describe how to compute wt, St, and ˆgt in round t, respectively, assuming that wt′, St′, and ˆgt′ are computed in the previous rounds t′ = 1, . . . , t−1. The entire algorithm is described in Algorithm 1. 5 Algorithm 1 Input: {xt, yt} ⊆Rd × R, {λt} ⊆R>0, k′ ≥2 and k1 ≥0 such that k1 ≤k′ −2. 1: Set ˆh0 = 0. 2: for t = 1, . . . , T do 3: Define wt by (5) and define St by Observe(wt, k′, k1). 4: Observe Dtxt and output ˆyt := w⊤ t Dtxt. 5: Observe yt and define ˆgt by (6) and set ˆht = ˆht−1 + ˆgt 6: end for Computing wt. We use ˆg1, . . . , ˆgt−1 to estimate wt by the dual averaging method as follows. Define ˆht−1 = Pt−1 j=1 ˆgj, which is the average of all estimators of gradients computed in the previous rounds. Moreover, let (λ1, . . . , λT ) be a monotonically non-decreasing sequence of positive numbers. From these, we define wt by wt = arg min w∈Rd,∥w∥≤1 ˆh⊤ t−1w + λt 2 ∥w∥2 = − 1 max{λt, ∥ˆht−1∥} ˆht−1, (5) Computing St. Let k1 be an integer such that k1 ≤k′ −2. We define Ut ⊆[d] as the set of the k1 largest features with respect to wt, i.e., choose Ut so that |Ut| = k1 and all i ∈Ut and j ∈[d] \ Ut satisfy |wti| ≥|wtj|. Let Vt be the set of (k′ −k1) elements chosen from [d] \ Ut uniformly at random. Then our algorithm observes the set St = Ut ∪Vt of the k′ features. We call this procedure to obtain St Observe(wt, k′, k1). Observation 1. We observe that Ut ⊆St and Prob[i, j ∈St] ≥(k′−k1)(k′−k1−1) d(d−1) =: Cd,k′,k1. Thus, Prob[i, j ∈St] > 0 for all i, j ∈[d] if k′ ≥k1 + 2. For simplicity, we use the notation p(t) i = Prob[i ∈St] and p(t) ij = Prob[i, j ∈St] for i, j ∈[d]. Computing ˆgt. Define ˜Xt = (˜xtij) ∈Rd×d by ˜Xt = Dtx⊤ t xtDt and let Xt ∈Rd×d be a matrix whose (i, j)-th entry is ˜xtij/p(t) ij . It follows that Xt is an unbiased estimator of xtx⊤ t . Similarly, defining zt = (zti) ∈Rd by zti = xti/p(t) i for i ∈St and zti = 0 for i /∈St, we see that zt is an unbiased estimator of xt. Using Xt and zt, we define ˆgt to be ˆgt = 2Xtwt −2ytzt. (6) Regret bound of Algorithm 1. Let us show that the regret achieved by Algorithm 1 is O( d k′−k √ T) in expectation. Theorem 2. Suppose that the linear independence of features is satisfied and k ≤k′ −2. Let k1 be an arbitrary integer such that k ≤k1 ≤k′ −2. Then, for arbitrary w ∈Rd with ∥w∥≤1, Algorithm 1 achieves E[RT (w)] ≤ 3 σ2 d 16 Cd,k′,k1 PT t=1 1 λt + λT +1 2 . By setting λt = 8 √ t/Cd,k′,k1 for each t = 1, . . . , T, we obtain E[RT (w)] ≤24 σ2 d s d(d −1) (k′ −k1)(k′ −k1 −1) · √ T + 1. (7) The rest of this section is devoted to proving Theorem 2. By (4), it suffices to evaluate E[PT t=1 ∥L(Dtwt −w∗)∥2] instead of E[RT (w)]. The following lemma asserts that each term of (4) can be bounded, assuming the linear independence of features. Proofs of all lemmas are given in the supplementary material. Lemma 3. Suppose that the linear independence of features is satisfied. If St ⊇Ut, ∥L(Dtwt −w∗)∥2 ≤3 σ2 d ∥L(wt −w∗)∥2. (8) 6 Proof. We have ∥L(Dtwt −w∗)∥2 ≤σ2 1∥Dtwt −w∗∥2 = σ2 1 X i∈S∗∩St (wti −w∗ i )2 + X i∈S∗\St w∗2 i + X i∈St\S∗ w2 ti ≤σ2 1 ∥wt −w∗∥2 + X i∈S∗\St w∗2 i , (9) where the second inequality holds since w∗ i = 0 for i ∈[d] \ S∗. It holds that X i∈S∗\St w∗2 i ≤ X i∈S∗\Ut w∗2 i ≤ X i∈S∗\Ut 2w2 ti + 2(wti −w∗ i )2 ≤2 X i∈Ut\S∗ w2 ti + 2 X i∈S∗\Ut (wti −w∗ i )2 ≤2∥wt −w∗∥2. (10) The first and third inequalities come from Ut ⊆St and the definition of Ut. Putting (10) into (9), we have ∥L(Dtwt −w∗)∥2 ≤3σ2 1∥wt −w∗∥2 ≤3σ2 1 σ2 d ∥L(wt −w∗)∥2. It follows from the above lemma that, if wt converges to w∗, we have Dtwt = w∗, and hence St includes the support of w∗. Moreover, it holds that PT t=1 E[∥L(wt −w∗)∥2] = E[PT t=1(ℓt(wt) − ℓt(w∗))] = E[R′ T (w∗)], since wt is independent of xt and yt. Thus, to bound PT t=1 E[∥L(wt − w∗)∥2], we shall evaluate E[R′ T (w∗)]. Lemma 4 ([11]). Suppose that wt is defined by (5) for each t = 1, . . . , T, and w ∈Rd satisfies ∥w∥≤1. Let Gt = E[∥ˆgt∥2] for t = 1, . . . , T. Then, E[R′ T (w)] ≤ T X t=1 1 λt Gt + λT +1 2 . (11) If Gt = O(1) and λt = Θ( √ t), the right-hand side of (11) is O( √ T). The following lemma shows that this is true if p(t) ij = Ω(1). Lemma 5. Suppose that the linear independence of features is satisfied. Let t ∈[T], and let q be a positive number such that q ≤min{p(t) i , p(t) ij }. Then we have Gt ≤16/q. We are now ready to prove Theorem 2. Proof of Theorem 2. The expectation E[RT (w)] of the regret is bounded as E[RT (w)] ≤ PT t=1 E[∥L(Dtwt −w∗)∥2] ≤ 3 σ2 d PT t=1 E[∥L(wt −w∗)∥2] = 3 σ2 d E[R′ T (w∗)], where the first inequality comes from (4) and the second comes from Lemma 3. From Lemma 4, E[R′ T (w∗)] is bounded by E[R′ T (w∗)] ≤HT := PT t=1 1 λt Gt + λT +1 2 . Lemma 5 and Observation 1 yield Gt ≤16/Cd,k′,k1. Hence, for λt = 8 p Cd,k′,k1t, HT satisfies HT ≤PT t=1 16 Cd,k′,k1λt + λT +1 2 = PT t=1 2 √ Cd,k′,k1t + 4 √ Cd,k′,k1 √ T + 1 ≤8 1 √ Cd,k′,k1 √ T + 1. Combining the above three inequalities, we obtain (7). 5 Algorithms without extra observations 5.1 Algorithm 2: Assuming (a) the linear independence of features In Section 4, Lemma 3 showed a connection between RT and R′ T : E[RT (w)] ≤3σ2 1 σd2E[R′ T (w∗)] under Ut ⊆St. Then, Lemmas 4 and 5 gave an upper bound of E[R′ T (w∗)]: E[R′ T (w∗)] = O( √ T) 7 under p(t) ij = Ω(1). In the case of k′ = k, however, the conditions Ut ⊆St and p(t) ij = Ω(1) may not be satisfied simultaneously, since, if Ut ⊆St and |St| = k′ = k ≥k1 = |Ut|, then we have Ut = St, which means p(t) ij = 0 for i /∈Ut or j /∈Ut. Thus, we cannot use both relationships for the analysis. In Algorithm 2, we bound RT (w) without bounding R′ T (w). Let us describe an idea of Algorithm 2. To achieve the claimed regret, we first define a subset J of {1, 2, . . . , T} by the set of squares, i.e., J = {s2 | s = 1, . . . , ⌊ √ T⌋}. Let ts denote the s-th smallest number in J for each s = 1, . . . , |J|. In each round t, the algorithm computes St, a weight vector ˜wt, and a vector Dt˜gt, where ˜gt is the gradient of ℓt(w) at w = Dt ˜wt. In addition, if t = ts, the algorithm computes other weight vectors ws and ¯ws := 1 s Ps j=1 wj, and an unbiased estimator ˆgs of the gradient of the loss function ℓt(w) at ws. At the beginning of round t, if t = ts, the algorithm first computes ws, and ¯ws is defined as the average of w1, . . . , ws. Roughly speaking, ws is the weight vector computed with Algorithm 1 applied to the examples (xt1, yt1), . . . , (xts, yts), setting k1 to be at most k −2. Then, we can show that ¯ws is a consistent estimator of w∗. This step is only performed if t ∈J. Then St is defined from ¯ws, where s is the largest number such that ts ≤t. Thus, St does not change for any t ∈[ts, ts+1 −1]. After this, the algorithm computes ˜wt from D1˜g1, . . . , Dt−1˜gt−1, and predicts the label of xt as ˆyt := ˜w⊤ t Dtxt. At the end of the round, the true label yt is observed, and Dt˜gt is computed from wt and (Dtxt, yt). In addition, if t = ts, ˆgs is computed as in Algorithm 1. We need ˆgs for computing ws′ with s′ > s in the subsequent rounds ts′. The following theorem bounds the regret of Algorithm 2. See the supplementary material for details of the algorithm and the proof of the theorem. Theorem 6. Suppose that (a), the linear independence of features, is satisfied and k ≤k′. Then, there exists a polynomial-time algorithm such that E[RT (w)] is at most 8(1+ √ d) √ T + 1+12T X i∈S∗ |w∗ i | exp(− C2 d,k′,0(T 1 4 −1)|w∗ i |2σ2 d 18432 )+4 X i∈S∗ |w∗ i |( 4096 C2 d,k′,0w∗4 i σ4 d +1)2, for arbitrary w ∈Rd with ∥w∥≤1, where Cd,k′,0 = k′(k′−1) d(d−1) = O( k′2 d2 ).2 5.2 Algorithm 3: Assuming (b) the compatibility condition Algorithm 3 adopts the same strategy as Algorithm 2 except for the procedure for determining ws and ¯ws. In the analysis of Algorithm 2, we show that, to achieve the claimed regret, it suffices to generate {St} that satisfies PT t=1 Prob[i /∈St] = O( √ T) for i ∈S∗. The condition was satisfied by defining St as the set of k largest features with respect to a weight vector ¯ws = Ps j=1 wj/s. The linear independence of features guarantees that ¯ws computed in Algorithm 2 converges to w∗, and hence {St} defined as above possesses the required property. Unfortunately, if the assumption of the independence of features is not satisfied, e.g., if we have almost same features, then ¯ws does not converge to w∗. However, if we introduce an ℓ1-regularization to the minimization problem in the definition of ws and change the definition of ¯ws to a weighted average of the modified vectors w1, . . . , ws, then we can generate a required set {St} under the compatibility assumption. See the supplementary material for details and the proof of the following theorem. Theorem 7. Suppose that (b), the compatibility assumption, is satisfied and k ≤k′. Then, there exists a polynomial-time algorithm such that E[RT (w)] is at most 8(1+ √ d) √ T +1 + 12T X i∈S∗ |w∗ i | exp(−Cd,k′,0 p T 1 4 −1|w∗ i |2φ2 0 5832k ) + 4 X i∈S∗ |w∗ i |( 64 · 364k2 C2 d,k′,0w∗4 i φ4 0 +1)2, for arbitrary w ∈Rd with ∥w∥≤1, where Cd,k′,0 = k′(k′−1) d(d−1) = O( k′2 d2 ).3,4 3 The asymptotic regret bound mentioned in Section 1, can be yielded by bounding the second term with the aid of the following: maxT ≥0 T exp(−αT β) = (αβ)−1 β exp(−1/β) for arbitrary α > 0, β > 0. 4Note that φ0 is the constant appearing in Assumption (b) in Section 3. 8 6 Experiments In this section, we compare our algorithms with the following four baseline algorithms: (i) a greedy method that chooses the k′ largest features with respect to wt computed as in Algorithm 1; (ii) a uniform-random method that chooses k′ features uniformly at random; (iii) the algorithm of [6] (called AELR); and (iv) the algorithm of [5] (called FKK). Owing to space limitations, we only present typical results here. Other results and the detailed descriptions on experiment settings are provided in the supplementary material. Synthetic data. First we show results on two kinds of synthetic datasets: instances with (d, k, k′) and instances with (d, k1, k). We set k1 = k in the setting of (d, k, k′) and k′ = k in the setting of (d, k1, k). The instances with (d, k, k′) assume that Algorithm 1 can use the ground truth k, while Algorithm 1 cannot use k in the instances with (d, k1, k). For each (d, k, k′) and (d, k1, k), we executed all algorithms on five instances with T = 5000 and computed the averages of regrets and run time, respectively. When (d, k, k′) = (20, 5, 7), FKK spent 1176 s on average, while AELR spent 6 s, and the others spent at most 1 s. Figures 1 and 2 plot the regrets given by (1) over the number of rounds on a typical instance with (d, k, k′) = (20, 5, 7). Tables 2 and 3 summarize the average regrets at T = 5000, where A1, A2, A3, G, and U denote Algorithm 1, 2, 3, greedy, and uniform random, respectively. We observe that Algorithm 1 achieves smallest regrets in the setting of (d, k, k′), whereas Algorithms 2 and 3 are better than Algorithm 1 in the setting of (d, k1, k). The results match our theoretical results. 0 1000 2000 3000 4000 5000 T 0 1000 2000 3000 4000 5000 6000 7000 RT Algorithm 1 Algorithm 2 Algorithm 3 greedy uniform random AELR FKK Figure 1: Plot of regrets with (d, k, k′) = (20, 5, 7) 0 1000 2000 3000 4000 5000 T 0 1000 2000 3000 4000 5000 6000 7000 RT Algorithm 1 Algorithm 2 Algorithm 3 greedy uniform random AELR FKK Figure 2: Plot of regrets with (d, k1, k) = (20, 5, 7) 0 10000 20000 30000 40000 50000 T 0.00 0.25 0.50 0.75 1.00 1.25 1.50 T ∑ t = 0( ̂yt −yt)2 1e8 Algorithm 1 Algorithm 2 Algorithm 3 greedy uniform random AELR Figure 3: CT-slice datasets Table 2: Values of RT /102 when changing (d, k, k′). (d, k1, k) A1 A2 A3 G U AELR FKK (10,2,4) 1.53 2.38 3.60 33.28 25.73 60.76 24.05 Table 3: Values of RT /102 when changing (d, k1, k). (d, k1, k) A1 A2 A3 G U AELR FKK (10,2,4) 26.88 20.59 17.19 43.03 60.02 64.75 58.71 Real data. We next conducted experiments using a CT-slice dataset, which is available online [10]. Each data consists of 384 features retrieved from 53500 CT images associated with a label that denotes the relative position of an image on the axial axis. We executed all algorithms except FKK, which does not work due to its expensive run time. Since we do not know the ground-truth regression weights, we measure the performance by the first term of (1), i.e., square loss of predictions. Figure 3 plots the losses over the number of rounds. The parameters are k1 = 60 and k′ = 70. For this instance, the run times of Algorithms 1 and 2, greedy, uniform random, and AELR were 195, 35, 147, 382, and 477 s, respectively. We observe that Algorithms 2 and 3 are superior to the others, which implies that Algorithm 2 and 3 are suitable for instances where the ground truth k is not known, such as real data-based instances. Acknowledgement This work was supported by JST ERATO Grant Number JPMJER1201, Japan. References [1] P. B¨uhlmann and S. van de Geer. Statistics for high-dimensional data. 2011. 9 [2] N. Cesa-Bianchi, S. Shalev-Shwartz, and O. Shamir. Some impossibility results for budgeted learning. In Joint ICML-COLT workshop on Budgeted Learning, 2010. [3] N. Cesa-Bianchi, S. Shalev-Shwartz, and O. Shamir. Efficient learning with partially observed attributes. Journal of Machine Learning Research, 12:2857–2878, 2011. [4] X. Chen, Q. Lin, and J. Pena. Optimal regularized dual averaging methods for stochastic optimization. In Advances in Neural Information Processing Systems, pages 395–403, 2012. [5] D. Foster, S. Kale, and H. Karloff. Online sparse linear regression. In 29th Annual Conference on Learning Theory, pages 960–970, 2016. [6] E. Hazan and T. Koren. Linear regression with limited observation. In Proceedings of the 29th International Conference on Machine Learning (ICML-12), pages 807–814, 2012. [7] S. Kale. Open problem: Efficient online sparse regression. In Proceedings of The 27th Conference on Learning Theory, pages 1299–1301, 2014. [8] S. Kale, Z. Karnin, T. Liang, and D. P´al. Adaptive feature selection: Computationally efficient online sparse linear regression under rip. In Proceedings of the 34th International Conference on Machine Learning (ICML-17), pages 1780–1788, 2017. [9] P. Koiran and A. Zouzias. Hidden cliques and the certification of the restricted isometry property. IEEE Trans. Information Theory, 60(8):4999–5006, 2014. [10] M. Lichman. UCI machine learning repository, 2013. [11] L. Xiao. Dual averaging methods for regularized stochastic learning and online optimization. Journal of Machine Learning Research, 11:2543–2596, 2010. [12] M. Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In Proceedings of the 20th International Conference on Machine Learning (ICML-03), pages 928–936, 2003. [13] N. Zolghadr, G. Bart´ok, R. Greiner, A. Gy¨orgy, and C. Szepesv´ari. Online learning with costly features and labels. In Advances in Neural Information Processing Systems, pages 1241–1249, 2013. 10 | 2017 | 287 |
6,771 | Accelerated First-order Methods for Geodesically Convex Optimization on Riemannian Manifolds Yuanyuan Liu1, Fanhua Shang1∗, James Cheng1, Hong Cheng2, Licheng Jiao3 1Dept. of Computer Science and Engineering, The Chinese University of Hong Kong 2Dept. of Systems Engineering and Engineering Management, The Chinese University of Hong Kong, Hong Kong 3Key Laboratory of Intelligent Perception and Image Understanding of Ministry of Education, School of Artificial Intelligence, Xidian University, China {yyliu, fhshang, jcheng}@cse.cuhk.edu.hk; hcheng@se.cuhk.edu.hk; lchjiao@mail.xidian.edu.cn Abstract In this paper, we propose an accelerated first-order method for geodesically convex optimization, which is the generalization of the standard Nesterov’s accelerated method from Euclidean space to nonlinear Riemannian space. We first derive two equations and obtain two nonlinear operators for geodesically convex optimization instead of the linear extrapolation step in Euclidean space. In particular, we analyze the global convergence properties of our accelerated method for geodesically strongly-convex problems, which show that our method improves the convergence rate from O((1−µ/L)k) to O((1− p µ/L)k). Moreover, our method also improves the global convergence rate on geodesically general convex problems from O(1/k) to O(1/k2). Finally, we give a specific iterative scheme for matrix Karcher mean problems, and validate our theoretical results with experiments. 1 Introduction In this paper, we study the following Riemannian optimization problem: min f(x) such that x ∈X ⊂M, (1) where (M, ϱ) denotes a Riemannian manifold with the Riemannian metric ϱ, X ⊂M is a nonempty, compact, geodesically convex set, and f :X →R is geodesically convex (G-convex) and geodesically L-smooth (G-L-smooth). Here, G-convex functions may be non-convex in the usual Euclidean space but convex along the manifold, and thus can be solved by a global optimization solver. [5] presented G-convexity and G-convex optimization on geodesic metric spaces, though without any attention to global complexity analysis. As discussed in [11], the topic of "geometric programming" may be viewed as a special case of G-convex optimization. [25] developed theoretical tools to recognize and generate G-convex functions as well as cone theoretic fixed point optimization algorithms. However, none of these three works provided a global convergence rate analysis for their algorithms. Very recently, [31] provided the global complexity analysis of first-order algorithms for G-convex optimization, and designed the following Riemannian gradient descent rule: xk+1 = Expxk(−η gradf(xk)), where k is the iterate index, Expxk is an exponential map at xk (see Section 2 for details), η is a step-size or learning rate, and gradf(xk) is the Riemannian gradient of f at xk ∈X. ∗Corresponding author. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. In this paper, we extend the Nesterov’s accelerated gradient descent method [19] from Euclidean space to nonlinear Riemannian space. Below, we first introduce the Nesterov’s method and its variants for convex optimization on Euclidean space, which can be viewed as a special case of our method, when M=Rd, and ϱ is the Euclidean inner product. Nowadays many real-world applications involve large data sets. As data sets and problems are getting larger in size, accelerating first-order methods is of both practical and theoretical interests. The earliest first-order method for minimizing a convex function f is perhaps the gradient method. Thirty years ago, Nesterov [19] proposed an accelerated gradient method, which takes the following form: starting with x0 and y0 =x0, and for any k≥1, xk = yk−1 −η∇f(yk−1), yk = xk + τk(xk −xk−1), (2) where 0 ≤τk ≤1 is the momentum parameter. For a fixed step-size η = 1/L, where L is the Lipschitz constant of ∇f, this scheme with τk = (k−1)/(k+2) exhibits the optimal convergence rate, f(xk)−f(x⋆) ≤O( L∥x⋆−x0∥2 k2 ), for general convex (or non-strongly convex) problems [20], where x⋆is any minimizer of f. In contrast, standard gradient descent methods can only achieve a convergence rate of O(1/k). We can see that this improvement relies on the introduction of the momentum term τk(xk −xk−1) as well as the particularly tuned coefficient (k−1)/(k+2)≈1−3/k. Inspired by the success of the Nesterov’s momentum, there has been much work on the development of first-order accelerated methods, see [2, 8, 21, 26, 27] for example. In addition, for strongly convex problems and setting τk ≡(1− p µ/L)/(1+ p µ/L), Nesterov’s accelerated gradient method attains a convergence rate of O((1− p µ/L)k), while standard gradient descent methods achieve a linear convergence rate of O((1−µ/L)k). It is then natural to ask whether our accelerated method in nonlinear Riemannian space has the same convergence rates as its Euclidean space counterparts (e.g., Nesterov’s accelerated method [20])? 1.1 Motivation and Challenges Zhang and Sra [31] proposed an efficient Riemannian gradient descent (RGD) method, which attains the convergence rates of O((1 −µ/L)k) and O(1/k) for geodesically strongly-convex and geodesically convex problems, respectively. Hence, there still remain gaps in convergence rates between RGD and the Nesterov’s accelerated method. As discussed in [31], a long-time question is whether the famous Nesterov’s accelerated gradient descent algorithm has a counterpart in nonlinear Riemannian spaces. Compared with standard gradient descent methods in Euclidean space, Nesterov’s accelerated gradient method involves a linear extrapolation step: yk = xk +τk(xk −xk−1), which can improve its convergence rates for both strongly convex and non-strongly convex problems. It is clear that ϕk(x) := f(yk)+⟨∇f(yk), x−yk⟩ is a linear function in Euclidean space, while its counterpart in nonlinear space, e.g., ϕk(x) := f(yk) + ⟨gradf(yk), Exp−1 yk (x)⟩yk, is a nonlinear function, where Exp−1 yk is the inverse of the exponential map Expyk, and ⟨·, ·⟩y is the inner product (see Section 2 for details). Therefore, in nonlinear Riemannian spaces, there is no trivial analogy of such a linear extrapolation step. In other words, although Riemannian geometry provides tools that enable generalization of Euclidean algorithms mentioned above [1], we must overcome some fundamental geometric hurdles to analyze the global convergence properties of our accelerated method as in [31]. 1.2 Contributions To answer the above-mentioned open problem in [31], in this paper we propose a general accelerated first-order method for nonlinear Riemannian spaces, which is in essence the generalization of the standard Nesterov’s accelerated method. We summarize the key contributions of this paper as follows. • We first present a general Nesterov’s accelerated iterative scheme in nonlinear Riemannian spaces, where the linear extrapolation step in (2) is replaced by a nonlinear operator. Furthermore, we derive two equations and obtain two corresponding nonlinear operators for both geodesically strongly-convex and geodesically convex cases, respectively. • We provide the global convergence analysis of our accelerated algorithms, which shows that our algorithms attain the convergence rates of O((1− p µ/L)k) and O(1/k2) for geodesically strongly-convex and geodesically convex objectives, respectively. 2 • Finally, we present a specific iterative scheme for matrix Karcher mean problems. Our experimental results verify the effectiveness and efficiency of our accelerated method. 2 Notation and Preliminaries We first introduce some key notations and definitions about Riemannian geometry (see [23, 30] for details). A Riemannian manifold (M, ϱ) is a real smooth manifold M equipped with a Riemannian metric ϱ. Let ⟨w1, w2⟩x =ϱx(w1, w2) denote the inner product of w1, w2 ∈TxM; and the norm of w∈TxM is defined as ∥w∥x = p ϱx(w, w), where the metric ϱ induces an inner product structure in each tangent space TxM associated with every x ∈M. A geodesic is a constant speed curve γ : [0, 1] →M that is locally distance minimizing. Let y ∈M and w ∈TxM, then an exponential map y = Expx(w):TxM→M maps w to y on M, such that there is a geodesic γ with γ(0)=x, γ(1) = y and ˙γ(0) = w. If there is a unique geodesic between any two points in X ⊂M, the exponential map has inverse Exp−1 x :X →TxM, i.e., w = Exp−1 x (y), and the geodesic is the unique shortest path with ∥Exp−1 x (y)∥x =∥Exp−1 y (x)∥y = d(x, y), where d(x, y) is the geodesic distance between x, y ∈X. Parallel transport Γy x : TxM →TyM maps a vector w ∈TxM to Γy xw ∈TyM, and preserves inner products and norm, that is, ⟨w1, w2⟩x =⟨Γy xw1, Γy xw2⟩y and ∥w1∥x =∥Γy xw1∥y, where w1, w2 ∈TxM. For any x, y ∈X and any geodesic γ with γ(0) = x, γ(1) = y and γ(t) ∈X for t ∈[0, 1] such that f(γ(t)) ≤(1 −t)f(x) + tf(y), then f is geodesically convex (G-convex), and an equivalent definition is formulated as follows: f(y) ≥f(x) + ⟨gradf(x), Exp−1 x (y)⟩x, where gradf(x) is the Riemannian gradient of f at x. A function f : X →R is called geodesically µ-strongly convex (µ-strongly G-convex) if for any x, y∈X, the following inequality holds f(y) ≥f(x) + ⟨gradf(x), Exp−1 x (y)⟩x + µ 2 ∥Exp−1 x (y)∥2 x. A differential function f is geodesically L-smooth (G-L-smooth) if its gradient is L-Lipschitz, i.e., f(y) ≤f(x) + ⟨gradf(x), Exp−1 x (y)⟩x + L 2 ∥Exp−1 x (y)∥2 x. 3 An Accelerated Method for Geodesically Convex Optimization In this section, we propose a general acceleration method for geodesically convex optimization, which can be viewed as a generalization of the famous Nesterov’s accelerated method from Euclidean space to Riemannian space. Nesterov’s accelerated method involves a linear extrapolation step as in (2), while in nonlinear Riemannian spaces, we do not have a simple way to find an analogy to such a linear extrapolation. Therefore, some standard analysis techniques do not work in nonlinear space. Motivated by this, we derive two equations to bridge the gap for both geodesically stronglyconvex and geodesically convex cases, and then generalized Nesterov’s algorithms are proposed for geodesically convex optimization by solving these two equations. We first propose to replace the classical Nesterov’s scheme in (2) with the following update rules for geodesically convex optimization in Riemannian space: xk = Expyk−1(−ηgradf(yk−1)), yk = S(yk−1, xk, xk−1), (3) where yk, xk ∈X, S denotes a nonlinear operator, and yk = S(yk−1, xk, xk−1) can be obtained by solving the two proposed equations (see (4) and (5) below, which can be used to deduce the key analysis tools for our convergence analysis) for strongly G-convex and general G-convex cases, respectively. Different from the Riemannian gradient descent rule (e.g., xk+1 =Expxk(−ηgradf(xk))), the Nesterov’s accelerated technique is introduced into our update rule of yk. Compared with the Nesterov’s scheme in (2), the main difference is the update rule of yk. That is, our update rule for yk is an implicit iteration process as shown below, while that of (2) is an explicit iteration one. 3 Figure 1: Illustration of geometric interpretation for Equations (4) and (5). Algorithm 1 Accelerated method for strongly G-convex optimization Input: µ, L Initialize: x0, y0, η. 1: for k = 1, 2, . . . , K do 2: Computing the gradient at yk−1: gk−1 = gradf(yk−1); 3: xk = Expyk−1(−ηgk−1); 4: yk = S(yk−1, xk, xk−1) by solving (4). 5: end for Output: xK 3.1 Geodesically Strongly Convex Cases We first design the following equation with respect to yk ∈X for the µ-strongly G-convex case: 1 − p µ/L Γyk−1 yk Exp−1 yk (xk) −βΓyk−1 yk gradf(yk) = 1 − p µ/L 3/2 Exp−1 yk−1(xk−1), (4) where β = 4/√µL−1/L > 0. Figure 1(a) illustrates the geometric interpretation of the proposed equation (4) for the strongly G-convex case, where uk =(1− p µ/L)Exp−1 yk (xk), vk =−βgradf(yk), and wk−1 = (1− p µ/L)3/2Exp−1 yk−1(xk−1). The vectors uk, vk ∈TykM are parallel transported to Tyk−1M, and the sum of their parallel translations is equal to wk−1 ∈Tyk−1M, which means that the equation (4) holds. We design an accelerated first-order algorithm for solving geodesically strongly-convex problems, as shown in Algorithm 1. In real applications, the proposed equation (4) can be manipulated into simpler forms. For example, we will give a specific equation for the averaging real symmetric positive definite matrices problem below. 3.2 Geodesically Convex Cases Let f be G-convex and G-L-smooth, the diameter of X be bounded by D (i.e., maxx,y∈X d(x, y) ≤ D), the variable yk ∈X can be obtained by solving the following equation: Γyk−1 yk k α−1Exp−1 yk (xk)−Dbgk = k−1 α−1Exp−1 yk−1(xk−1)−Dbgk−1 + (k+α−2)η α −1 gk−1, (5) where gk−1 = gradf(yk−1), and bgk = gk/∥gk∥yk, and α ≥3 is a given constant. Figure 1(b) illustrates the geometric interpretation of the proposed equation (5) for the G-convex case, where uk = k α−1Exp−1 yk (xk)−Dbgk, and vk−1 = (k+α−2)η α−1 gk−1. We also present an accelerated first-order algorithm for solving geodesically convex problems, as shown in Algorithm 2. 3.3 Key Lemmas For the Nesterov’s accelerated scheme in (2) with τk = k−1 k+2 (for example, the general convex case) in Euclidean space, the following result in [3, 20] plays a key role in the convergence analysis of Nesterov’s accelerated algorithm. 2 k+2⟨∇f(yk), zk−x⋆⟩−η 2∥∇f(yk)∥2 = 2 η(k+2)2 ∥zk −x⋆∥2 −∥zk+1−x⋆∥2 , (6) 4 Algorithm 2 Accelerated method for general G-convex optimization Input: L, D, α Initialize: x0, y0, η. 1: for k = 1, 2, . . . , K do 2: Computing the gradient at yk−1: gk−1 = gradf(yk−1) and ˆgk−1 = gk−1/∥gk−1∥yk−1; 3: xk = Expyk−1(−ηgk−1); 4: yk = S(yk−1, xk, xk−1) by solving (5). 5: end for Output: xK where zk =(k+2)yk/2 −(k/2)xk. Correspondingly, we can also obtain the following analysis tools for our convergence analysis using the proposed equations (4) and (5). In other words, the following equations (7) and (8) can be viewed as the Riemannian space counterparts of (6). Lemma 1 (Strongly G-convex). If f : X →R is geodesically µ-strongly convex and G-L-smooth, and {yk} satisfies the equation (4), and zk is defined as follows: zk = 1 − p µ/L Exp−1 yk (xk) ∈TykM. Then the following results hold: Γyk−1 yk (zk −βgradf(yk)) = 1 − p µ/L 1/2 zk−1, −⟨gradf(yk), zk⟩yk + β 2 ∥gradf(yk)∥2 yk = 1 2β 1 − p µ/L ∥zk−1∥2 yk−1 −1 2β ∥zk∥2 yk. (7) For general G-convex objectives, we have the following result. Lemma 2 (General G-convex). If f : X →R is G-convex and G-L-smooth, the diameter of X is bounded by D, and {yk} satisfies the equation (5), and zk is defined as zk = k α −1Exp−1 yk (xk) −Dbgk ∈TykM. Then the following results hold: Γyk yk+1zk+1 = zk + (k + α −1)η α −1 gradf(yk), α−1 k+α−1⟨gradf(yk), −zk⟩yk −η 2∥gradf(yk)∥2 yk = 2(α−1)2 η(k+α−1)2 ∥zk∥2 yk −∥zk+1∥2 yk+1 . (8) The proofs of Lemmas 1 and 2 are provided in the Supplementary Materials. 4 Convergence Analysis In this section, we analyze the global convergence properties of the proposed algorithms (i.e., Algorithms 1 and 2) for both geodesically strongly convex and general convex problems. Lemma 3. If f : X →R is G-convex and G-L-smooth for any x ∈X, and {xk} is the sequence produced by Algorithms 1 and 2 with η ≤1/L, then the following result holds: f(xk+1) ≤f(x) + ⟨gradf(yk), −Exp−1 yk (x)⟩yk −η 2∥gradf(yk)∥2 yk. The proof of this lemma can be found in the Supplementary Materials. For the geodesically strongly convex case, we have the following result. Theorem 1 (Strongly G-convex). Let x⋆be the optimal solution of Problem (1), and {xk} be the sequence produced by Algorithm 1. If f : X →R is geodesically µ-strongly convex and G-L-smooth, then the following result holds f(xk+1) −f(x⋆) ≤ 1 − p µ/L k f(x0) −f(x⋆) + 1 2β 1 − p µ/L ∥z0∥2 y0 , where z0 is defined in Lemma 1. 5 Table 1: Comparison of convergence rates for geodesically convex optimization algorithms. Algorithms RGD [31] RSGD [31] Ours Strongly G-convex and smooth O (1 −min{ 1 c , µ L})k O (1/k) O (1 − p µ L)k General G-convex and smooth O c c + k O 1/ √ k O 1/k2 The proof of Theorem 1 can be found in the Supplementary Materials. From this theorem, we can see that the proposed algorithm attains a linear convergence rate of O((1− p µ/L)k) for geodesically strongly convex problems, which is the same as that of its Euclidean space counterparts and significantly faster than that of non-accelerated algorithms such as [31] (i.e., O((1−µ/L)k)), as shown in Table 1. For the geodesically non-strongly convex case, we have the following result. Theorem 2 (General G-convex). Let {xk} be the sequence produced by Algorithm 2. If f :X →R is G-convex and G-L-smooth, and the diameter of X is bounded by D, then f(xk+1) −f(x⋆) ≤ (α −1)2 2η(k + α −2)2 ∥z0∥2 y0, where z0 = −Dbg0, as defined in Lemma 2. The proof of Theorem 2 can be found in the Supplementary Materials. Theorem 2 shows that for general G-convex objectives, our acceleration method improves the theoretical convergence rate from O(1/k) (e.g., RGD [31]) to O(1/k2), which matches the optimal rate for general convex settings in Euclidean space. Please see the detail in Table 1, where the parameter c is defined in [31]. 5 Application for Matrix Karcher Mean Problems In this section, we give a specific accelerated scheme for a type of conic geometric optimization problems [25], e.g., the matrix Karcher mean problem. Specifically, the loss function of the Karcher mean problem for a set of N symmetric positive definite (SPD) matrices {Wi}N i=1 is defined as f(X) := 1 2N N X i=1 ∥log(X−1/2WiX−1/2)∥2 F , (9) where X ∈P := {Z ∈Rd×d, s.t., Z = ZT ≻0}. The loss function f is known to be non-convex in Euclidean space but geodesically 2N-strongly convex. The inner product of two tangent vectors at point X on the manifold is given by ⟨ζ, ξ⟩X = tr(ζX−1ξX−1), ζ, ξ ∈TXP, (10) where tr(·) is the trace of a real square matrix. For any matrices X, Y ∈P, the Riemannian distance is defined as follows: d(X, Y ) = ∥log(X−1 2 Y X−1 2 )∥F . 5.1 Computation of Yk For the accelerated update rules in (3) for Algorithm 1, we need to compute Yk via solving the equation (4). However, for the specific problem in (9) with the inner product in (10), we can derive a simpler form to solve Yk below. We first give the following properties: Property 1. For the loss function f in (9) with the inner product in (10), we have 1. Exp−1 Yk (Xk) = Y 1/2 k log(Y −1/2 k XkY −1/2 k )Y 1/2 k ; 2. gradf(Yk) = 1 N PN i=1 Y 1/2 k log(Y 1/2 k W −1 i Y 1/2 k )Y 1/2 k ; 3. gradf(Yk), Exp−1 Yk (Xk) Yk = ⟨U, V ⟩; 4. ∥gradf(Yk)∥2 Yk = ∥U∥2 F , 6 where U = 1 N PN i=1log(Y 1/2 k W −1 i Y 1/2 k ) ∈Rd×d, and V =log(Y −1/2 k XkY −1/2 k ) ∈Rd×d. Proof. In this part, we only provide the proof of Result 1 in Property 1, and the proofs of the other results are provided in the Supplementary Materials. The inner product in (10) on the Riemannian manifold leads to the following exponential map: ExpX(ξX) = X 1 2 exp(X−1 2 ξXX−1 2 )X 1 2 , (11) where ξX ∈TXP denotes the tangent vector with the geometry, and tangent vectors ξX are expressed as follows (see [17] for details): ξX = X 1 2 sym(∆)X 1 2 , ∆∈Rd×d, where sym(·) extracts the symmetric part of its argument, that is, sym(A)=(AT +A)/2. Then we can set Exp−1 Yk (Xk) = Y 1/2 k sym(∆Xk)Y 1/2 k ∈TYkP. By the definition of Exp−1 Yk (Xk), we have ExpYk(Exp−1 Yk (Xk)) = Xk, that is, ExpYk(Y 1/2 k sym(∆Xk)Y 1/2 k ) = Xk. (12) Using (11) and (12), we have sym(∆Xk) = log(Y −1/2 k XkY −1/2 k ) ∈Rd×d. Therefore, we have Exp−1 Yk (Xk) = Y 1/2 k sym(∆Xk)Y 1/2 k = Y 1/2 k log(Y −1/2 k XkY −1/2 k )Y 1/2 k = −Yk log(X−1 k Yk), where the last equality holds due to the fact that log(X−1Y X) = X−1 log(Y )X. Result 3 in Property 1 shows that the inner product of two tangent vectors at Yk is equal to the Euclidean inner-product of two vectors U, V ∈Rd×d. Thus, we can reformulate (4) as follows: 1− r µ L log(Y −1 2 k XkY −1 2 k ) −β N N X i=1 log(Y 1 2 k W −1 i Y 1 2 k )= 1− r µ L 3 2 log(Y −1 2 k−1X−1 k−1Y −1 2 k−1), (13) where β =4/√µL−1/L. Then Yk can be obtained by solving (13). From a numerical perspective, log(Y 1 2 k W −1 i Y 1 2 k ) can be approximated by log(Y 1 2 k−1W −1 i Y 1 2 k−1), and then Yk is given by Yk = X 1 2 k exp−1 " 1 − r µ L 1 2 log(Y −1 2 k−1Xk−1Y −1 2 k−1) + δβ N N X i=1 log(Y 1 2 k−1W −1 i Y 1 2 k−1) # X 1 2 k , (14) where δ = 1/(1− p µ/L), and Yk ∈P. 6 Experiments In this section, we validate the performance of our accelerated method for averaging SPD matrices under the Riemannian metric, e.g., the matrix Karcher mean problem (9), and also compare our method against the state-of-the-art methods: Riemannian gradient descent (RGD) [31] and limitedmemory Riemannian BFGS (LRBFGS) [29]. The matrix Karcher mean problem has been widely applied to many real-world applications such as elasticity [18], radar signal and image processing [6, 15, 22], and medical imaging [9, 7, 13]. In fact, this problem is geodesically strongly convex, but non-convex in Euclidean space. Other methods for solving this problem include the relaxed Richardson iteration algorithm [10], the approximated joint diagonalization algorithm [12], and Riemannian stochastic gradient descent (RSGD) [31]. Since all the three methods achieve similar performance to RGD, especially in data science applications where N is large and relatively small optimization error is not required [31], we only report the experimental results of RGD. The step-size η of both RGD and LRBFGS is selected with a line search method as in [29] (see [29] for details), while η of our accelerated method is set to 1/L. For the algorithms, we initialize X using the arithmetic mean of the data set as in [29]. 7 0 20 40 60 10 −10 10 −5 10 0 Number of iterations dist(X∗, Xk) RGD LRBFGS Ours 0 5 10 15 20 10 −10 10 −5 10 0 Running time (s) dist(X∗, Xk) RGD LRBFGS Ours 0 20 40 60 10 −10 10 −5 10 0 Number of iterations dist(X∗, Xk) RGD LRBFGS Ours 0 20 40 60 80 100 10 −10 10 −5 10 0 Running time (s) dist(X∗, Xk) RGD LRBFGS Ours Figure 2: Comparison of RGD, LRBFGS and our accelerated method for solving geodesically strongly convex Karcher mean problems on data sets with d = 100 (the first row) and d = 200 (the second row). The vertical axis represents the distance in log scale, and the horizontal axis denotes the number of iterations (left) or running time (right). The input synthetic data are random SPD matrices of size 100×100 or 200×200 generated by using the technique in [29] or the matrix mean toolbox [10], and all matrices are explicitly normalized so that their norms are all equal to 1. We report the experimental results of RGD, LRBFGS and our accelerated method on the two data sets in Figure 2, where N is set to 100, and the condition number C of each matrix {Wi}N i=1 is set to 102. Figure 2 shows the evolution of the distance between the exact Karcher mean and current iterate (i.e., dist(X∗, Xk)) of the methods with respect to number of iterations and running time (seconds), where X∗is the exact Karcher mean. We can observe that our method consistently converges much faster than RGD, which empirically verifies our theoretical result in Theorem 1 that our accelerated method has a much faster convergence rate than RGD. Although LRBFGS outperforms our method in terms of number of iterations, our accelerated method converges much faster than LRBFGS in terms of running time. 7 Conclusions In this paper, we proposed a general Nesterov’s accelerated gradient method for nonlinear Riemannian space, which is a generalization of the famous Nesterov’s accelerated method for Euclidean space. We derived two equations and presented two accelerated algorithms for geodesically strongly-convex and general convex optimization problems, respectively. In particular, our theoretical results show that our accelerated method attains the same convergence rates as the standard Nesterov’s accelerated method in Euclidean space for both strongly G-convex and G-convex cases. Finally, we presented a special iteration scheme for solving matrix Karcher mean problems, which in essence is non-convex in Euclidean space, and the numerical results verify the efficiency of our accelerated method. We can extend our accelerated method to the stochastic setting using variance reduction techniques [14, 16, 24, 28], and apply our method to solve more geodesically convex problems in the future, e.g., the general G-convex problem with a non-smooth regularization term as in [4]. In addition, we can replace exponential mapping by computationally cheap retractions together with corresponding theoretical guarantees [31]. An interesting direction of future work is to design accelerated schemes for non-convex optimization in Riemannian space. 8 Acknowledgments This research is supported in part by Grants (CUHK 14206715 & 14222816) from the Hong Kong RGC, the Major Research Plan of the National Natural Science Foundation of China (Nos. 91438201 and 91438103), and the National Natural Science Foundation of China (No. 61573267). References [1] P.-A. Absil, R. Mahony, and R. Sepulchre. Optimization algorithms on matrix manifolds. Princeton University Press, Princeton, N.J., 2009. [2] Z. Allen-Zhu. Katyusha: The first direct acceleration of stochastic gradient methods. In STOC, pages 1200–1205, 2017. [3] H. Attouch and J. Peypouquet. The rate of convergence of Nesterov’s accelerated forwardbackward method is actually faster than 1/k2. SIAM J. Optim., 26:1824–1834, 2015. [4] D. Azagra and J. Ferrera. Inf-convolution and regularization of convex functions on Riemannian manifolds of nonpositive curvature. Rev. Mat. Complut., 2006. [5] M. Bacak. Convex analysis and optimization in Hadamard spaces. Walter de Gruyter GmbH & Co KG, 2014. [6] F. Barbaresco. New foundation of radar Doppler signal processing based on advanced differential geometry of symmetric spaces: Doppler matrix CFAR radar application. In RADAR, 2009. [7] P. G. Batchelor, M. Moakher, D. Atkinson, F. Calamante, and A. Connelly. A rigorous framework for diffusion tensor calculus. Magn. Reson. Med., 53:221–225, 2005. [8] A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM J. Imaging Sci., 2(1):183–202, 2009. [9] R. Bhatia. Positive definite matrices, Princeton Series in Applied Mathematics. Princeton University Press, Princeton, N.J., 2007. [10] D. A. Bini and B. Iannazzo. Computing the Karcher mean of symmetric positive definite matrices. Linear Algebra Appl., 438:1700–1710, 2013. [11] S. Boyd, S.-J. Kim, L. Vandenberghe, and A. Hassibi. A tutorial on geometric programming. Optim. Eng., 8:67–127, 2007. [12] M. Congedo, B. Afsari, A. Barachant, and M. Moakher. Approximate joint diagonalization and geometric mean of symmetric positive definite matrices. PloS one, 10:e0121423, 2015. [13] P. T. Fletcher and S. Joshi. Riemannian geometry for the statistical analysis of diffusion tensor data. Signal Process., 87:250–262, 2007. [14] R. Johnson and T. Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In NIPS, pages 315–323, 2013. [15] J. Lapuyade-Lahorgue and F. Barbaresco. Radar detection using Siegel distance between autoregressive processes, application to HF and X-band radar. In RADAR, 2008. [16] Y. Liu, F. Shang, and J. Cheng. Accelerated variance reduced stochastic ADMM. In AAAI, pages 2287–2293, 2017. [17] G. Meyer, S. Bonnabel, and R. Sepulchre. Regression on fixed-rank positive semidefinite matrices: A Riemannian approach. J. Mach. Learn. Res., 12:593–625, 2011. [18] M. Moakher. On the averaging of symmetric positive-definite tensors. J. Elasticity, 82:273–296, 2006. [19] Y. Nesterov. A method of solving a convex programming problem with convergence rate O(1/k2). Soviet Mathematics Doklady, 27:372–376, 1983. 9 [20] Y. Nesterov. Introductory Lectures on Convex Optimization: A Basic Course. Kluwer Academic Publ., Boston, 2004. [21] Y. Nesterov. Gradient methods for minimizing composite functions. Math. Program., 140:125– 161, 2013. [22] X. Pennec, P. Fillard, and N. Ayache. A Riemannian framework for tensor computing. International Journal of Computer Vision, 66:41–66, 2006. [23] P. Petersen. Riemannian Geometry. Springer-Verlag, New York, 2016. [24] F. Shang. Larger is better: The effect of learning rates enjoyed by stochastic optimization with progressive variance reduction. arXiv:1704.04966, 2017. [25] S. Sra and R. Hosseini. Conic geometric optimization on the manifold of positive definite matrices. SIAM J. Optim., 25(1):713–739, 2015. [26] W. Su, S. Boyd, and E. J. Candes. A differential equation for modeling Nesterov’s accelerated gradient method: Theory and insights. J. Mach. Learn. Res., 17:1–43, 2016. [27] P. Tseng. On aacelerated proximal gradient methods for convex-concave optimization. 2008. [28] L. Xiao and T. Zhang. A proximal stochastic gradient method with progressive variance reduction. SIAM J. Optim., 24(4):2057–2075, 2014. [29] X. Yuan, W. Huang, P.-A. Absil, and K. Gallivan. A Riemannian limited-memory BFGS algorithm for computing the matrix geometric mean. Procedia Computer Science, 80:2147– 2157, 2016. [30] H. Zhang, S. Reddi, and S. Sra. Riemannian SVRG: Fast stochastic optimization on Riemannian manifolds. In NIPS, pages 4592–4600, 2016. [31] H. Zhang and S. Sra. First-order methods for geodesically convex optimization. In COLT, pages 1617–1638, 2016. 10 | 2017 | 288 |
6,772 | Hierarchical Implicit Models and Likelihood-Free Variational Inference Dustin Tran Columbia University Rajesh Ranganath Princeton University David M. Blei Columbia University Abstract Implicit probabilistic models are a flexible class of models defined by a simulation process for data. They form the basis for theories which encompass our understanding of the physical world. Despite this fundamental nature, the use of implicit models remains limited due to challenges in specifying complex latent structure in them, and in performing inferences in such models with large data sets. In this paper, we first introduce hierarchical implicit models (HIMs). HIMs combine the idea of implicit densities with hierarchical Bayesian modeling, thereby defining models via simulators of data with rich hidden structure. Next, we develop likelihood-free variational inference (LFVI), a scalable variational inference algorithm for HIMs. Key to LFVI is specifying a variational family that is also implicit. This matches the model’s flexibility and allows for accurate approximation of the posterior. We demonstrate diverse applications: a large-scale physical simulator for predator-prey populations in ecology; a Bayesian generative adversarial network for discrete data; and a deep implicit model for text generation. 1 Introduction Consider a model of coin tosses. With probabilistic models, one typically posits a latent probability, and supposes each toss is a Bernoulli outcome given this probability [36, 15]. After observing a collection of coin tosses, Bayesian analysis lets us describe our inferences about the probability. However, we know from the laws of physics that the outcome of a coin toss is fully determined by its initial conditions (say, the impulse and angle of flip) [25, 9]. Therefore a coin toss’ randomness does not originate from a latent probability but in noisy initial parameters. This alternative model incorporates the physical system, better capturing the generative process. Furthermore the model is implicit, also known as a simulator: we can sample data from its generative process, but we may not have access to calculate its density [11, 20]. Coin tosses are simple, but they serve as a building block for complex implicit models. These models, which capture the laws and theories of real-world physical systems, pervade fields such as population genetics [40], statistical physics [1], and ecology [3]; they underlie structural equation models in economics and causality [39]; and they connect deeply to generative adversarial networks (GANs) [18], which use neural networks to specify a flexible implicit density [35]. Unfortunately, implicit models, including GANs, have seen limited success outside specific domains. There are two reasons. First, it is unknown how to design implicit models for more general applications, exposing rich latent structure such as priors, hierarchies, and sequences. Second, existing methods for inferring latent structure in implicit models do not sufficiently scale to high-dimensional or large data sets. In this paper, we design a new class of implicit models and we develop a new algorithm for accurate and scalable inference. For modeling, § 2 describes hierarchical implicit models, a class of Bayesian hierarchical models which only assume a process that generates samples. This class encompasses both simulators in the 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. classical literature and those employed in GANs. For example, we specify a Bayesian GAN, where we place a prior on its parameters. The Bayesian perspective allows GANs to quantify uncertainty and improve data efficiency. We can also apply them to discrete data; this setting is not possible with traditional estimation algorithms for GANs [27]. For inference, § 3 develops likelihood-free variational inference (LFVI), which combines variational inference with density ratio estimation [49, 35]. Variational inference posits a family of distributions over latent variables and then optimizes to find the member closest to the posterior [23]. Traditional approaches require a likelihood-based model and use crude approximations, employing a simple approximating family for fast computation. LFVI expands variational inference to implicit models and enables accurate variational approximations with implicit variational families: LFVI does not require the variational density to be tractable. Further, unlike previous Bayesian methods for implicit models, LFVI scales to millions of data points with stochastic optimization. This work has diverse applications. First, we analyze a classical problem from the approximate Bayesian computation (ABC) literature, where the model simulates an ecological system [3]. We analyze 100,000 time series which is not possible with traditional methods. Second, we analyze a Bayesian GAN, which is a GAN with a prior over its weights. Bayesian GANs outperform corresponding Bayesian neural networks with known likelihoods on several classification tasks. Third, we show how injecting noise into hidden units of recurrent neural networks corresponds to a deep implicit model for flexible sequence generation. Related Work. This paper connects closely to three lines of work. The first is Bayesian inference for implicit models, known in the statistics literature as approximate Bayesian computation (ABC) [3, 33]. ABC steps around the intractable likelihood by applying summary statistics to measure the closeness of simulated samples to real observations. While successful in many domains, ABC has shortcomings. First, the results generated by ABC depend heavily on the chosen summary statistics and the closeness measure. Second, as the dimensionality grows, closeness becomes harder to achieve. This is the classic curse of dimensionality. The second is GANs [18]. GANs have seen much interest since their conception, providing an efficient method for estimation in neural network-based simulators. Larsen et al. [28] propose a hybrid of variational methods and GANs for improved reconstruction. Chen et al. [7] apply information penalties to disentangle factors of variation. Donahue et al. [12], Dumoulin et al. [13] propose to match on an augmented space, simultaneously training the model and an inverse mapping from data to noise. Unlike any of the above, we develop models with explicit priors on latent variables, hierarchies, and sequences, and we generalize GANs to perform Bayesian inference. The final thread is variational inference with expressive approximations [45, 48, 52]. The idea of casting the design of variational families as a modeling problem was proposed in Ranganath et al. [44]. Further advances have analyzed variational programs [42]—a family of approximations which only requires a process returning samples—and which has seen further interest [30]. Implicit-like variational approximations have also appeared in auto-encoder frameworks [32, 34] and message passing [24]. We build on variational programs for inferring implicit models. 2 Hierarchical Implicit Models Hierarchical models play an important role in sharing statistical strength across examples [16]. For a broad class of hierarchical Bayesian models, the joint distribution of the hidden and observed variables is p(x, z, β) = p(β) N Y n=1 p(xn | zn, β)p(zn | β), (1) where xn is an observation, zn are latent variables associated to that observation (local variables), and β are latent variables shared across observations (global variables). See Fig. 1 (left). With hierarchical models, local variables can be used for clustering in mixture models, mixed memberships in topic models [4], and factors in probabilistic matrix factorization [47]. Global variables can be used to pool information across data points for hierarchical regression [16], topic models [4], and Bayesian nonparametrics [50]. Hierarchical models typically use a tractable likelihood p(xn | zn, β). But many likelihoods of interest, such as simulator-based models [20] and generative adversarial networks [18], admit high 2 xn zn β N xn zn ϵn β N Figure 1: (left) Hierarchical model, with local variables z and global variables β. (right) Hierarchical implicit model. It is a hierarchical model where x is a deterministic function (denoted with a square) of noise ϵ (denoted with a triangle). fidelity to the true data generating process and do not admit a tractable likelihood. To overcome this limitation, we develop hierarchical implicit models (HIMs). Hierarchical implicit models have the same joint factorization as Eq.1 but only assume that one can sample from the likelihood. Rather than define p(xn | zn, β) explicitly, HIMs define a function g that takes in random noise ϵn ∼s(·) and outputs xn given zn and β, xn = g(ϵn | zn, β), ϵn ∼s(·). The induced, implicit likelihood of xn ∈A given zn and β is P(xn ∈A | zn, β) = Z {g(ϵn | zn,β)=xn∈A} s(ϵn) dϵn. This integral is typically intractable. It is difficult to find the set to integrate over, and the integration itself may be expensive for arbitrary noise distributions s(·) and functions g. Fig. 1 (right) displays the graphical model for HIMs. Noise (ϵn) are denoted by triangles; deterministic computation (xn) are denoted by squares. We illustrate two examples. Example: Physical Simulators. Given initial conditions, simulators describe a stochastic process that generates data. For example, in population ecology, the Lotka-Volterra model simulates predator-prey populations over time via a stochastic differential equation [55]. For prey and predator populations x1, x2 ∈R+ respectively, one process is dx1 dt = β1x1 −β2x1x2 + ϵ1, ϵ1 ∼Normal(0, 10), dx2 dt = −β2x2 + β3x1x2 + ϵ2, ϵ2 ∼Normal(0, 10), where Gaussian noises ϵ1, ϵ2 are added at each full time step. The simulator runs for T time steps given initial population sizes for x1, x2. Lognormal priors are placed over β. The Lotka-Volterra model is grounded by theory but features an intractable likelihood. We study it in § 4. Example: Bayesian Generative Adversarial Network. Generative adversarial networks (GANs) define an implicit model and a method for parameter estimation [18]. They are known to perform well on image generation [41]. Formally, the implicit model for a GAN is xn = g(ϵn; θ), ϵn ∼s(·), (2) where g is a neural network with parameters θ, and s is a standard normal or uniform. The neural network g is typically not invertible; this makes the likelihood intractable. The parameters θ in GANs are estimated by divergence minimization between the generated and real data. We make GANs amenable to Bayesian analysis by placing a prior on the parameters θ. We call this a Bayesian GAN. Bayesian GANs enable modeling of parameter uncertainty and are inspired by Bayesian neural networks, which have been shown to improve the uncertainty and data efficiency of standard neural networks [31, 37]. We study Bayesian GANs in § 4; Appendix B provides example implementations in the Edward probabilistic programming language [53]. 3 Likelihood-Free Variational Inference We described hierarchical implicit models, a rich class of latent variable models with local and global structure alongside an implicit density. Given data, we aim to calculate the model’s posterior p(z, β | x) = p(x, z, β)/p(x). This is difficult as the normalizing constant p(x) is typically 3 intractable. With implicit models, the lack of a likelihood function introduces an additional source of intractability. We use variational inference [23]. It posits an approximating family q ∈Q and optimizes to find the member closest to p(z, β | x). There are many choices of variational objectives that measure closeness [42, 29, 10]. To choose an objective, we lay out desiderata for a variational inference algorithm for implicit models: 1. Scalability. Machine learning hinges on stochastic optimization to scale to massive data [6]. The variational objective should admit unbiased subsampling with the standard technique, N X n=1 f(xn) ≈N M M X m=1 f(xm), where some computation f(·) over the full data is approximated with a mini-batch of data {xm}. 2. Implicit Local Approximations. Implicit models specify flexible densities; this induces very complex posterior distributions. Thus we would like a rich approximating family for the per-data point approximations q(zn | xn, β). This means the variational objective should only require that one can sample zn ∼q(zn | xn, β) and not evaluate its density. One variational objective meeting our desiderata is based on the classical minimization of the Kullback-Leibler (KL) divergence. (Surprisingly, Appendix C details how the KL is the only possible objective among a broad class.) 3.1 KL Variational Objective Classical variational inference minimizes the KL divergence from the variational approximation q to the posterior. This is equivalent to maximizing the evidence lower bound (ELBO), L = Eq(β,z | x)[log p(x, z, β) −log q(β, z | x)]. (3) Let q factorize in the same way as the posterior, q(β, z | x) = q(β) N Y n=1 q(zn | xn, β), where q(zn | xn, β) is an intractable density and since the data x is constant during inference, we drop conditioning for the global q(β). Substituting p and q’s factorization yields L = Eq(β)[log p(β) −log q(β)] + N X n=1 Eq(β)q(zn | xn,β)[log p(xn, zn | β) −log q(zn | xn, β)]. This objective presents difficulties: the local densities p(xn, zn | β) and q(zn | xn, β) are both intractable. To solve this, we consider ratio estimation. 3.2 Ratio Estimation for the KL Objective Let q(xn) be the empirical distribution on the observations x and consider using it in a “variational joint” q(xn, zn | β) = q(xn)q(zn | xn, β). Now subtract the log empirical log q(xn) from the ELBO above. The ELBO reduces to L ∝Eq(β)[log p(β) −log q(β)] + N X n=1 Eq(β)q(zn | xn,β) log p(xn, zn | β) q(xn, zn | β) . (4) (Here the proportionality symbol means equality up to additive constants.) Thus the ELBO is a function of the ratio of two intractable densities. If we can form an estimator of this ratio, we can proceed with optimizing the ELBO. We apply techniques for ratio estimation [49]. It is a key idea in GANs [35, 54], and similar ideas have rearisen in statistics and physics [19, 8]. In particular, we use class probability estimation: given a sample from p(·) or q(·) we aim to estimate the probability that it belongs to p(·). We model 4 this using σ(r(·; θ)), where r is a parameterized function (e.g., neural network) taking sample inputs and outputting a real value; σ is the logistic function outputting the probability. We train r(·; θ) by minimizing a loss function known as a proper scoring rule [17]. For example, in experiments we use the log loss, Dlog = Ep(xn,zn | β)[−log σ(r(xn, zn, β; θ))] + Eq(xn,zn | β)[−log(1 −σ(r(xn, zn, β; θ)))]. (5) The loss is zero if σ(r(·; θ)) returns 1 when a sample is from p(·) and 0 when a sample is from q(·). (We also experiment with the hinge loss; see § 4.) If r(·; θ) is sufficiently expressive, minimizing the loss returns the optimal function [35], r∗(xn, zn, β) = log p(xn, zn | β) −log q(xn, zn | β). As we minimize Eq.5, we use r(·; θ) as a proxy to the log ratio in Eq.4. Note r estimates the log ratio; it’s of direct interest and more numerically stable than the ratio. The gradient of Dlog with respect to θ is Ep(xn,zn | β)[∇θ log σ(r(xn, zn, β; θ))] + Eq(xn,zn | β)[∇θ log(1 −σ(r(xn, zn, β; θ)))]. (6) We compute unbiased gradients with Monte Carlo. 3.3 Stochastic Gradients of the KL Objective To optimize the ELBO, we use the ratio estimator, L = Eq(β | x)[log p(β) −log q(β)] + N X n=1 Eq(β | x)q(zn | xn,β)[r(xn, zn, β)]. (7) All terms are now tractable. We can calculate gradients to optimize the variational family q. Below we assume the priors p(β), p(zn | β) are differentiable. (We discuss methods to handle discrete global variables in the next section.) We focus on reparameterizable variational approximations [26, 46]. They enable sampling via a differentiable transformation T of random noise, δ ∼s(·). Due to Eq.7, we require the global approximation q(β; λ) to admit a tractable density. With reparameterization, its sample is β = Tglobal(δglobal; λ), δglobal ∼s(·), for a choice of transformation Tglobal(·; λ) and noise s(·). For example, setting s(·) = N(0, 1) and Tglobal(δglobal) = µ + σδglobal induces a normal distribution N(µ, σ2). Similarly for the local variables zn, we specify zn = Tlocal(δn, xn, β; φ), δn ∼s(·). Unlike the global approximation, the local variational density q(zn | xn; φ) need not be tractable: the ratio estimator relaxes this requirement. It lets us leverage implicit models not only for data but also for approximate posteriors. In practice, we also amortize computation with inference networks, sharing parameters φ across the per-data point approximate posteriors. The gradient with respect to global parameters λ under this approximating family is ∇λL = Es(δglobal)[∇λ(log p(β) −log q(β))]] + N X n=1 Es(δglobal)sn(δn)[∇λr(xn, zn, β)]. (8) The gradient backpropagates through the local sampling zn = Tlocal(δn, xn, β; φ) and the global reparameterization β = Tglobal(δglobal; λ). We compute unbiased gradients with Monte Carlo. The gradient with respect to local parameters φ is ∇φL = N X n=1 Eq(β)s(δn)[∇φr(xn, zn, β)]. (9) where the gradient backpropagates through Tlocal.1 5 Algorithm 1: Likelihood-free variational inference (LFVI) Input : Model xn, zn ∼p(· | β), p(β) Variational approximation zn ∼q(· | xn, β; φ), q(β | x; λ), Ratio estimator r(·; θ) Output: Variational parameters λ, φ Initialize θ, λ, φ randomly. while not converged do Compute unbiased estimate of ∇θD (Eq.6), ∇λL (Eq.8), ∇φL (Eq.9). Update θ, λ, φ using stochastic gradient descent. end 3.4 Algorithm Algorithm 1 outlines the procedure. We call it likelihood-free variational inference (LFVI). LFVI is black box: it applies to models in which one can simulate data and local variables, and calculate densities for the global variables. LFVI first updates θ to improve the ratio estimator r. Then it uses r to update parameters {λ, φ} of the variational approximation q. We optimize r and q simultaneously. The algorithm is available in Edward [53]. LFVI is scalable: we can unbiasedly estimate the gradient over the full data set with mini-batches [22]. The algorithm can also handle models of either continuous or discrete data. The requirement for differentiable global variables and reparameterizable global approximations can be relaxed using score function gradients [43]. Point estimates of the global parameters β suffice for many applications [18, 46]. Algorithm 1 can find point estimates: place a point mass approximation q on the parameters β. This simplifies gradients and corresponds to variational EM. 4 Experiments We developed new models and inference. For experiments, we study three applications: a largescale physical simulator for predator-prey populations in ecology; a Bayesian GAN for supervised classification; and a deep implicit model for symbol generation. In addition, Appendix F, provides practical advice on how to address the stability of the ratio estimator by analyzing a toy experiment. We initialize parameters from a standard normal and apply gradient descent with ADAM. Lotka-Volterra Predator-Prey Simulator. We analyze the Lotka-Volterra simulator of § 2 and follow the same setup and hyperparameters of Papamakarios and Murray [38]. Its global variables β govern rates of change in a simulation of predator-prey populations. To infer them, we posit a mean-field normal approximation (reparameterized to be on the same support) and run Algorithm 1 with both a log loss and hinge loss for the ratio estimation problem; Appendix D details the hinge loss. We compare to rejection ABC, MCMC-ABC, and SMC-ABC [33]. MCMC-ABC uses a spherical Gaussian proposal; SMC-ABC is manually tuned with a decaying epsilon schedule; all ABC methods are tuned to use the best performing hyperparameters such as the tolerance error. Fig. 2 displays results on two data sets. In the top figures and bottom left, we analyze data consisting of a simulation for T = 30 time steps, with recorded values of the populations every 0.2 time units. The bottom left figure calculates the negative log probability of the true parameters over the tolerance error for ABC methods; smaller tolerances result in more accuracy but slower runtime. The top figures compare the marginal posteriors for two parameters using the smallest tolerance for the ABC methods. Rejection ABC, MCMC-ABC, and SMC-ABC all contain the true parameters in their 95% credible interval but are less confident than our methods. Further, they required 100, 000 simulations from the model, with an acceptance rate of 0.004% and 2.990% for rejection ABC and MCMC-ABC respectively. 1The ratio r indirectly depends on φ but its gradient w.r.t. φ disappears. This is derived via the score function identity and the product rule (see, e.g., Ranganath et al. [43, Appendix]). 6 Rej. ABC MCMC ABC SMC ABC VI Log VI Hinge −5.5 −5.0 −4.5 −4.0 −3.5 −3.0 −2.5 log β1 True value Rej. ABC MCMC ABC SMC ABC VI Log VI Hinge −2.0 −1.5 −1.0 −0.5 0.0 0.5 1.0 1.5 log β2 True value 100 101 ϵ −5 0 5 10 15 Neg. log probability of true parameters Rej ABC MCMC-ABC SMC-ABC VI Log VI Hinge −5.5 −5.0 −4.5 −4.0 −3.5 −3.0 −2.5 log β1 True value Figure 2: (top) Marginal posterior for first two parameters. (bot. left) ABC methods over tolerance error. (bot. right) Marginal posterior for first parameter on a large-scale data set. Our inference achieves more accurate results and scales to massive data. Test Set Error Model + Inference Crabs Pima Covertype MNIST Bayesian GAN + VI 0.03 0.232 0.154 0.0136 Bayesian GAN + MAP 0.12 0.240 0.185 0.0283 Bayesian NN + VI 0.02 0.242 0.164 0.0311 Bayesian NN + MAP 0.05 0.320 0.188 0.0623 Table 1: Classification accuracy of Bayesian GAN and Bayesian neural networks across small to medium-size data sets. Bayesian GANs achieve comparable or better performance to their Bayesian neural net counterpart. The bottom right figure analyzes data consisting of 100, 000 time series, each of the same size as the single time series analyzed in the previous figures. This size is not possible with traditional methods. Further, we see that with our methods, the posterior concentrates near the truth. We also experienced little difference in accuracy between using the log loss or the hinge loss for ratio estimation. Bayesian Generative Adversarial Networks. We analyze Bayesian GANs, described in § 2. Mimicking a use case of Bayesian neural networks [5, 21], we apply Bayesian GANs for classification on small to medium-size data. The GAN defines a conditional p(yn | xn), taking a feature xn ∈RD as input and generating a label yn ∈{1, . . . , K}, via the process yn = g(xn, ϵn | θ), ϵn ∼N(0, 1), (10) where g(· | θ) is a 2-layer multilayer perception with ReLU activations, batch normalization, and is parameterized by weights and biases θ. We place normal priors, θ ∼N(0, 1). We analyze two choices of the variational model: one with a mean-field normal approximation for q(θ | x), and another with a point mass approximation (equivalent to maximum a posteriori). We compare to a Bayesian neural network, which uses the same generative process as Eq.10 but draws from a Categorical distribution rather than feeding noise into the neural net. We fit it separately using a mean-field normal approximation and maximum a posteriori. Table 1 shows that Bayesian GANs generally outperform their Bayesian neural net counterpart. Note that Bayesian GANs can analyze discrete data such as in generating a classification label. Traditional GANs for discrete data is an open challenge [27]. In Appendix E, we compare Bayesian GANs with point estimation to typical GANs. Bayesian GANs are also able to leverage parameter uncertainty for analyzing these small to medium-size data sets. One problem with Bayesian GANs is that they cannot work with very large neural networks: the ratio estimator is a function of global parameters, and thus the input size grows with the size of the 7 · · · · · · xt−1 xt xt+1 zt−1 zt zt+1 (a) A deep implicit model for sequences. It is a recurrent neural network (RNN) with noise injected into each hidden state. The hidden state is now an implicit latent variable. The same occurs for generating outputs. 1 −x+x/x∗∗x∗//x∗x+ 2 x/x∗x+x∗x/x+x+x+ 3 /+x∗x+x∗x/x/x+x+ 4 /x+∗x+x∗x/x+x−x+ 5 x/x∗x/x∗x+x+x+x− 6 x+x+x/x∗x∗x+x/x+ (b) Generated symbols from the implicit model. Good samples place arithmetic operators between the variable x. The implicit model learned to follow rules from the context free grammar up to some multiple operator repeats. neural network. One approach is to make the ratio estimator not a function of the global parameters. Instead of optimizing model parameters via variational EM, we can train the model parameters by backpropagating through the ratio objective instead of the variational objective. An alternative is to use the hidden units as input which is much lower dimensional [51, Appendix C]. Injecting Noise into Hidden Units. In this section, we show how to build a hierarchical implicit model by simply injecting randomness into hidden units. We model sequences x = (x1, . . . , xT ) with a recurrent neural network. For t = 1, . . . , T, zt = gz(xt−1, zt−1, ϵt,z), ϵt,z ∼N(0, 1), xt = gx(zt, ϵt,x), ϵt,x ∼N(0, 1), where gz and gx are both 1-layer multilayer perceptions with ReLU activation and layer normalization. We place standard normal priors over all weights and biases. See Fig. 3a. If the injected noise ϵt,z combines linearly with the output of gz, the induced distribution p(zt | xt−1, zt−1) is Gaussian parameterized by that output. This defines a stochastic RNN [2, 14], which generalizes its deterministic connection. With nonlinear combinations, the implicit density is more flexible (and intractable), making previous methods for inference not applicable. In our method, we perform variational inference and specify q to be implicit; we use the same architecture as the probability model’s implicit priors. We follow the same setup and hyperparameters as Kusner and Hernández-Lobato [27] and generate simple one-variable arithmetic sequences following a context free grammar, S →x∥S + S∥S −S∥S ∗S∥S/S, where ∥divides possible productions of the grammar. We concatenate the inputs and point estimate the global variables (model parameters) using variational EM. Fig. 3b displays samples from the inferred model, training on sequences with a maximum of 15 symbols. It achieves sequences which roughly follow the context free grammar. 5 Discussion We developed a class of hierarchical implicit models and likelihood-free variational inference, merging the idea of implicit densities with hierarchical Bayesian modeling and approximate posterior inference. This expands Bayesian analysis with the ability to apply neural samplers, physical simulators, and their combination with rich, interpretable latent structure. More stable inference with ratio estimation is an open challenge. This is especially important when we analyze large-scale real world applications of implicit models. Recent work for genomics offers a promising solution [51]. Acknowledgements. We thank Balaji Lakshminarayanan for discussions which helped motivate this work. We also thank Christian Naesseth, Jaan Altosaar, and Adji Dieng for their feedback and comments. DT is supported by a Google Ph.D. Fellowship in Machine Learning and an Adobe Research Fellowship. This work is also supported by NSF IIS-0745520, IIS-1247664, IIS1009542, ONR N00014-11-1-0651, DARPA FA8750-14-2-0009, N66001-15-C-4032, Facebook, Adobe, Amazon, and the John Templeton Foundation. 8 References [1] Anelli, G., Antchev, G., Aspell, P., Avati, V., Bagliesi, M., Berardi, V., Berretti, M., Boccone, V., Bottigli, U., Bozzo, M., et al. (2008). The totem experiment at the CERN large Hadron collider. Journal of Instrumentation, 3(08):S08007. [2] Bayer, J. and Osendorfer, C. (2014). Learning stochastic recurrent networks. arXiv preprint arXiv:1411.7610. [3] Beaumont, M. A. (2010). Approximate Bayesian computation in evolution and ecology. Annual Review of Ecology, Evolution and Systematics, 41(379-406):1. [4] Blei, D. M., Ng, A. Y., and Jordan, M. I. (2003). Latent Dirichlet allocation. Journal of Machine Learning Research, 3(Jan):993–1022. [5] Blundell, C., Cornebise, J., Kavukcuoglu, K., and Wierstra, D. (2015). Weight uncertainty in neural network. In International Conference on Machine Learning. [6] Bottou, L. (2010). Large-scale machine learning with stochastic gradient descent. In Proceedings of COMPSTAT’2010, pages 177–186. Springer. [7] Chen, X., Duan, Y., Houthooft, R., Schulman, J., Sutskever, I., and Abbeel, P. (2016). InfoGAN: Interpretable representation learning by information maximizing generative adversarial nets. In Neural Information Processing Systems. [8] Cranmer, K., Pavez, J., and Louppe, G. (2015). Approximating likelihood ratios with calibrated discriminative classifiers. arXiv preprint arXiv:1506.02169. [9] Diaconis, P., Holmes, S., and Montgomery, R. (2007). Dynamical bias in the coin toss. SIAM, 49(2):211–235. [10] Dieng, A. B., Tran, D., Ranganath, R., Paisley, J., and Blei, D. M. (2017). The χ-Divergence for Approximate Inference. In Neural Information Processing Systems. [11] Diggle, P. J. and Gratton, R. J. (1984). Monte Carlo methods of inference for implicit statistical models. Journal of the Royal Statistical Society: Series B (Methodological), pages 193–227. [12] Donahue, J., Krähenbühl, P., and Darrell, T. (2017). Adversarial feature learning. In International Conference on Learning Representations. [13] Dumoulin, V., Belghazi, I., Poole, B., Lamb, A., Arjovsky, M., Mastropietro, O., and Courville, A. (2017). Adversarially learned inference. In International Conference on Learning Representations. [14] Fraccaro, M., Sønderby, S. K., Paquet, U., and Winther, O. (2016). Sequential neural models with stochastic layers. In Neural Information Processing Systems. [15] Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A., and Rubin, D. B. (2013). Bayesian data analysis. Texts in Statistical Science Series. CRC Press, Boca Raton, FL. [16] Gelman, A. and Hill, J. (2006). Data analysis using regression and multilevel/hierarchical models. Cambridge University Press. [17] Gneiting, T. and Raftery, A. E. (2007). Strictly proper scoring rules, prediction, and estimation. Journal of the American Statistical Association, 102(477):359–378. [18] Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., and Bengio, Y. (2014). Generative adversarial nets. In Neural Information Processing Systems. [19] Gutmann, M. U., Dutta, R., Kaski, S., and Corander, J. (2014). Statistical Inference of Intractable Generative Models via Classification. arXiv preprint arXiv:1407.4981. [20] Hartig, F., Calabrese, J. M., Reineking, B., Wiegand, T., and Huth, A. (2011). Statistical inference for stochastic simulation models–theory and application. Ecology Letters, 14(8):816– 827. 9 [21] Hernández-Lobato, J. M., Li, Y., Rowland, M., Hernández-Lobato, D., Bui, T., and Turner, R. E. (2016). Black-box α-divergence minimization. In International Conference on Machine Learning. [22] Hoffman, M. D., Blei, D. M., Wang, C., and Paisley, J. W. (2013). Stochastic variational inference. Journal of Machine Learning Research, 14(1):1303–1347. [23] Jordan, M. I., Ghahramani, Z., Jaakkola, T. S., and Saul, L. K. (1999). An introduction to variational methods for graphical models. Machine Learning. [24] Karaletsos, T. (2016). Adversarial message passing for graphical models. In NIPS Workshop. [25] Keller, J. B. (1986). The probability of heads. The American Mathematical Monthly, 93(3):191–197. [26] Kingma, D. P. and Welling, M. (2014). Auto-Encoding Variational Bayes. In International Conference on Learning Representations. [27] Kusner, M. J. and Hernández-Lobato, J. M. (2016). GANs for sequences of discrete elements with the Gumbel-Softmax distribution. In NIPS Workshop. [28] Larsen, A. B. L., Sønderby, S. K., Larochelle, H., and Winther, O. (2016). Autoencoding beyond pixels using a learned similarity metric. In International Conference on Machine Learning. [29] Li, Y. and Turner, R. E. (2016). Rényi Divergence Variational Inference. In Neural Information Processing Systems. [30] Liu, Q. and Feng, Y. (2016). Two methods for wild variational inference. arXiv preprint arXiv:1612.00081. [31] MacKay, D. J. C. (1992). Bayesian methods for adaptive models. PhD thesis, California Institute of Technology. [32] Makhzani, A., Shlens, J., Jaitly, N., and Goodfellow, I. (2015). Adversarial autoencoders. arXiv preprint arXiv:1511.05644. [33] Marin, J.-M., Pudlo, P., Robert, C. P., and Ryder, R. J. (2012). Approximate Bayesian computational methods. Statistics and Computing, 22(6):1167–1180. [34] Mescheder, L., Nowozin, S., and Geiger, A. (2017). Adversarial variational Bayes: Unifying variational autoencoders and generative adversarial networks. arXiv preprint arXiv:1701.04722. [35] Mohamed, S. and Lakshminarayanan, B. (2016). Learning in implicit generative models. arXiv preprint arXiv:1610.03483. [36] Murphy, K. (2012). Machine Learning: A Probabilistic Perspective. MIT Press. [37] Neal, R. M. (1994). Bayesian Learning for Neural Networks. PhD thesis, University of Toronto. [38] Papamakarios, G. and Murray, I. (2016). Fast ϵ-free inference of simulation models with Bayesian conditional density estimation. In Neural Information Processing Systems. [39] Pearl, J. (2000). Causality. Cambridge University Press. [40] Pritchard, J. K., Seielstad, M. T., Perez-Lezaun, A., and Feldman, M. W. (1999). Population growth of human Y chromosomes: a study of Y chromosome microsatellites. Molecular Biology and Evolution, 16(12):1791–1798. [41] Radford, A., Metz, L., and Chintala, S. (2016). Unsupervised representation learning with deep convolutional generative adversarial networks. In International Conference on Learning Representations. [42] Ranganath, R., Altosaar, J., Tran, D., and Blei, D. M. (2016a). Operator variational inference. In Neural Information Processing Systems. [43] Ranganath, R., Gerrish, S., and Blei, D. M. (2014). Black box variational inference. In Artificial Intelligence and Statistics. 10 [44] Ranganath, R., Tran, D., and Blei, D. M. (2016b). Hierarchical variational models. In International Conference on Machine Learning. [45] Rezende, D. J. and Mohamed, S. (2015). Variational inference with normalizing flows. In International Conference on Machine Learning. [46] Rezende, D. J., Mohamed, S., and Wierstra, D. (2014). Stochastic backpropagation and approximate inference in deep generative models. In International Conference on Machine Learning. [47] Salakhutdinov, R. and Mnih, A. (2008). Bayesian probabilistic matrix factorization using Markov chain Monte Carlo. In International Conference on Machine Learning, pages 880–887. ACM. [48] Salimans, T., Kingma, D. P., and Welling, M. (2015). Markov chain Monte Carlo and variational inference: Bridging the gap. In International Conference on Machine Learning. [49] Sugiyama, M., Suzuki, T., and Kanamori, T. (2012). Density-ratio matching under the Bregman divergence: A unified framework of density-ratio estimation. Annals of the Institute of Statistical Mathematics. [50] Teh, Y. W. and Jordan, M. I. (2010). Hierarchical Bayesian nonparametric models with applications. Bayesian Nonparametrics, 1. [51] Tran, D. and Blei, D. M. (2017). Implicit causal models for genome-wide association studies. arXiv preprint arXiv:1710.10742. [52] Tran, D., Blei, D. M., and Airoldi, E. M. (2015). Copula variational inference. In Neural Information Processing Systems. [53] Tran, D., Kucukelbir, A., Dieng, A. B., Rudolph, M., Liang, D., and Blei, D. M. (2016). Edward: A library for probabilistic modeling, inference, and criticism. arXiv preprint arXiv:1610.09787. [54] Uehara, M., Sato, I., Suzuki, M., Nakayama, K., and Matsuo, Y. (2016). Generative adversarial nets from a density ratio estimation perspective. arXiv preprint arXiv:1610.02920. [55] Wilkinson, D. J. (2011). Stochastic modelling for systems biology. CRC press. 11 | 2017 | 289 |
6,773 | Best of Both Worlds: Transferring Knowledge from Discriminative Learning to a Generative Visual Dialog Model Jiasen Lu1∗, Anitha Kannan2∗, Jianwei Yang1, Devi Parikh3,1, Dhruv Batra3,1 1 Georgia Institute of Technology, 2 Curai, 3 Facebook AI Research {jiasenlu, jw2yang, parikh, dbatra}@gatech.edu Abstract We present a novel training framework for neural sequence models, particularly for grounded dialog generation. The standard training paradigm for these models is maximum likelihood estimation (MLE), or minimizing the cross-entropy of the human responses. Across a variety of domains, a recurring problem with MLE trained generative neural dialog models (G) is that they tend to produce ‘safe’ and generic responses (‘I don’t know’, ‘I can’t tell’). In contrast, discriminative dialog models (D) that are trained to rank a list of candidate human responses outperform their generative counterparts; in terms of automatic metrics, diversity, and informativeness of the responses. However, D is not useful in practice since it can not be deployed to have real conversations with users. Our work aims to achieve the best of both worlds – the practical usefulness of G and the strong performance of D – via knowledge transfer from D to G. Our primary contribution is an end-to-end trainable generative visual dialog model, where G receives gradients from D as a perceptual (not adversarial) loss of the sequence sampled from G. We leverage the recently proposed Gumbel-Softmax (GS) approximation to the discrete distribution – specifically, a RNN augmented with a sequence of GS samplers, coupled with the straight-through gradient estimator to enable end-to-end differentiability. We also introduce a stronger encoder for visual dialog, and employ a self-attention mechanism for answer encoding along with a metric learning loss to aid D in better capturing semantic similarities in answer responses. Overall, our proposed model outperforms state-of-the-art on the VisDial dataset by a significant margin (2.67% on recall@10). 1 Introduction One fundamental goal of artificial intelligence (AI) is the development of perceptually-grounded dialog agents – specifically, agents that can perceive or understand their environment (through vision, audio, or other sensors), and communicate their understanding with humans or other agents in natural language. Over the last few years, neural sequence models (e.g. [47, 44, 46]) have emerged as the dominant paradigm across a variety of setting and datasets – from text-only dialog [44, 40, 23, 3] to more recently, visual dialog [7, 9, 8, 33, 45], where an agent must answer a sequence of questions grounded in an image, requiring it to reason about both visual content and the dialog history. The standard training paradigm for neural dialog models is maximum likelihood estimation (MLE) or equivalently, minimizing the cross-entropy (under the model) of a ‘ground-truth’ human response. Across a variety of domains, a recurring problem with MLE trained neural dialog models is that they tend to produce ‘safe’ generic responses, such as ‘Not sure’ or ‘I don’t know’ in text-only dialog [23], and ‘I can’t see’ or ‘I can’t tell’ in visual dialog [7, 8]. One reason for this emergent behavior is that ∗Work was done while at Facebook AI Research. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. the space of possible next utterances in a dialog is highly multi-modal (there are many possible paths a dialog may take in the future). In the face of such highly multi-modal output distributions, models ‘game’ MLE by latching on to the head of the distribution or the frequent responses, which by nature tend to be generic and widely applicable. Such safe generic responses break the flow of a dialog and tend to disengage the human conversing with the agent, ultimately rendering the agent useless. It is clear that novel training paradigms are needed; that is the focus of this paper. One promising alternative to MLE training proposed by recent work [36, 27] is sequence-level training of neural sequence models, specifically, using reinforcement learning to optimize taskspecific sequence metrics such as BLEU [34], ROUGE [24], CIDEr [48]. Unfortunately, in the case of dialog, all existing automatic metrics correlate poorly with human judgment [26], which renders this alternative infeasible for dialog models. In this paper, inspired by the success of adversarial training [16], we propose to train a generative visual dialog model (G) to produce sequences that score highly under a discriminative visual dialog model (D). A discriminative dialog model receives as input a candidate list of possible responses and learns to sort this list from the training dataset. The generative dialog model (G) aims to produce a sequence that D will rank the highest in the list, as shown in Fig. 1. Note that while our proposed approach is inspired by adversarial training, there are a number of subtle but crucial differences over generative adversarial networks (GANs). Unlike traditional GANs, one novelty in our setup is that our discriminator receives a list of candidate responses and explicitly learns to reason about similarities and differences across candidates. In this process, D learns a task-dependent perceptual similarity [12, 19, 15] and learns to recognize multiple correct responses in the feature space. For example, as shown in Fig. 1 right, given the image, dialog history, and question ‘Do you see any bird?’, besides the ground-truth answer ‘No, I do not’, D can also assign high scores to other options that are valid responses to the question, including the one generated by G: ‘Not that I can see’. The interaction between responses is captured via the similarity between the learned embeddings. This similarity gives an additional signal that G can leverage in addition to the MLE loss. In that sense, our proposed approach may be viewed as an instance of ‘knowledge transfer’ [17, 5] from D to G. We employ a metric-learning loss function and a self-attention answer encoding mechanism for D that makes it particularly conducive to this knowledge transfer by encouraging perceptually meaningful similarities to emerge. This is especially fruitful since prior work has demonstrated that discriminative dialog models significantly outperform their generative counterparts, but are not as useful since they necessarily need a list of candidate responses to rank, which is only available in a dialog dataset, not in real conversations with a user. In that context, our work aims to achieve the best of both worlds – the practical usefulness of G and the strong performance of D – via this knowledge transfer. Our primary technical contribution is an end-to-end trainable generative visual dialog model, where the generator receives gradients from the discriminator loss of the sequence sampled from G. Note that this is challenging because the output of G is a sequence of discrete symbols, which naïvely is not amenable to gradient-based training. We propose to leverage the recently proposed Gumbel-Softmax (GS) approximation to the discrete distribution [18, 30] – specifically, a Recurrent Neural Network (RNN) augmented with a sequence of GS samplers, which when coupled with the straight-through gradient estimator [2, 18] enables end-to-end differentiability. Our results show that our ‘knowledge transfer’ approach is indeed successful. Specifically, our discriminator-trained G outperforms the MLE-trained G by 1.7% on recall@5 on the VisDial dataset, essentially improving over state-of-the-art [7] by 2.43% recall@5 and 2.67% recall@10. Moreover, our generative model produces more diverse and informative responses (see Table 3). As a side contribution specific to this application, we introduce a novel encoder for neural visual dialog models, which maintains two separate memory banks – one for visual memory (where do we look in the image?) and another for textual memory (what facts do we know from the dialog history?), and outperforms the encoders used in prior work. 2 Related Work GANs for sequence generation. Generative Adversarial Networks (GANs) [16] have shown to be effective models for a wide range of applications involving continuous variables (e.g. images) c.f [10, 35, 22, 55]. More recently, they have also been used for discrete output spaces such as language generation – e.g. image captioning [6, 41], dialog generation [23], or text generation [53] – by either viewing the generative model as a stochastic parametrized policy that is updated using REINFORCE 2 Image I Do you see any birds? Question Qt A gray tiger cat sitting underneath a metal bench. Is it in color? Yes it is. Is it day time? Yes. Is the tiger big? No, it’s a regular cat. t rounds of history HCIAE Encoder Answer Decoder Gumbel Sampler Option answers (D) Score No bird I do not see any birds No No , I do not No , Nope Not that I can see yes … … Mangoes White I see small shops Not that I can see No bird I do not see any birds No No , I do not Nope … yes Mangoes White I see small shops Generator HQI HQI 𝑒" Answer Encoder Deep Metric Loss Discriminator HQI 𝑒" HCIAE Encoder Figure 1: Model architecture of the proposed model. Given the image, history, and question, the discriminator receives as additional input a candidate list of possible responses and learns to sort this list. The generator aims to produce a sequence that discriminator will rank the highest in the list. The right most block is D’s score for different candidate answers. Note that the multiple plausible responses all score high. Image from the COCO dataset [25]. with the discriminator providing the reward [53, 6, 41, 23], or (closer to our approach) through continuous relaxation of discrete variables through Gumbel-Softmax to enable backpropagating the response from the discriminator [21, 41]. There are a few subtle but significant differences w.r.t. to our application, motivation, and approach. In these prior works, both the discriminator and the generator are trained in tandem, and from scratch. The goal of the discriminator in those settings has primarily been to discriminate ‘fake’ samples (i.e. generator’s outputs) from ‘real’ samples (i.e. from training data). In contrast, we would like to transfer knowledge from the discriminator to the generator. We start with pre-trained D and G models suited for the task, and then transfer knowledge from D to G to further improve G, while keeping D fixed. As we show in our experiments, this procedure results in G producing diverse samples that are close in the embedding space to the ground truth, due to perceptual similarity learned in D. One can also draw connections between our work and Energy Based GAN (EBGAN) [54] – without the adversarial training aspect. The “energy” in our case is a deep metric-learning based scoring mechanism, instantiated in the visual dialog application. Modeling image and text attention. Models for tasks at the intersection of vision and language – e.g., image captioning [11, 13, 20, 49], visual question answering [1, 14, 31, 37], visual dialog [7, 9, 8, 45, 33] – typically involve attention mechanisms. For image captioning, this may be attending to relevant regions in the image [49, 51, 28]. For VQA, this may be attending to relevant image regions alone [4, 50, 52] or co-attending to image regions and question words/phrases [29]. In the context of visual dialog, [7] uses attention to identify utterances in the dialog history that may be useful for answering the current question. However, when modeling the image, the entire image embedding is used to obtain the answer. In contrast, our proposed encoder HCIAE (Section 4.1) localizes the region in the image that can help reliably answer the question. In particular, in addition to the history and the question guiding the image attention, our visual dialog encoder also reasons about the history when identifying relevant regions of the image. This allows the model to implicitly resolve co-references in the text and ground them back in the image. 3 Preliminaries: Visual Dialog We begin by formally describing the visual dialog task setup as introduced by Das et al. [7]. The machine learning task is as follows. A visual dialog model is given as input an image I, caption c describing the image, a dialog history till round t −1, H = ( c |{z} H0 , (q1, a1) | {z } H1 , . . . , (qt−1, at−1) | {z } Ht−1 ), and the followup question qt at round t. The visual dialog agent needs to return a valid response to the question. Given the problem setup, there are two broad classes of methods – generative and discriminative models. Generative models for visual dialog are trained by maximizing the log-likelihood of the ground truth answer sequence agt t ∈At given the encoded representation of the input (I, H, qt). 3 On the other hand, discriminative models receive both an encoding of the input (I, H, qt) and as additional input a list of 100 candidate answers At = {a(1) t , . . . , a(100) t }. These models effectively learn to sort the list. Thus, by design, they cannot be used at test time without a list of candidates available. 4 Approach: Backprop Through Discriminative Losses for Generative Training In this section, we describe our approach to transfer knowledge from a discriminative visual dialog model (D) to generative visual dialog model (G). Fig. 1 (a) shows the overview of our approach. Given the input image I, dialog history H, and question qt, the encoder converts the inputs into a joint representation et. The generator G takes et as input, and produces a distribution over answer sequences via a recurrent neural network (specifically an LSTM). At each word in the answer sequence, we use a Gumbel-Softmax sampler S to sample the answer token from that distribution. The discriminator D in it’s standard form takes et, ground-truth answer agt t and N −1 “negative” answers {a− t,i}N−1 i=1 as input, and learns an embedding space such that similarity(et, f(agt t )) > similarity(et, f(a− t,·)), where f(·) is the embedding function. When we enable the communication between D and G, we feed the sampled answer ˆat into discriminator, and optimize the generator G to produce samples that get higher scores in D’s metric space. We now describe each component of our approach in detail. 4.1 History-Conditioned Image Attentive Encoder (HCIAE) An important characteristic in dialogs is the use of co-reference to avoid repeating entities that can be contextually resolved. In fact, in the VisDial dataset [7] nearly all (98%) dialogs involve at least one pronoun. This means that for a model to correctly answer a question, it would require a reliable mechanism for co-reference resolution. A common approach is to use an encoder architecture with an attention mechanism that implicitly performs co-reference resolution by identifying the portion of the dialog history that can help in answering the current question [7, 38, 39, 32]. while using a holistic representation for the image. Intuitively, one would also expect that the answer is also localized to regions in the image, and be consistent with the attended history. With this motivation, we propose a novel encoder architecture (called HCIAE) shown in Fig. 2. Our encoder first uses the current question to attend to the exchanges in the history, and then use the question and attended history to attend to the image, so as to obtain the final encoding. 𝑄" 𝐻$ 𝐻"%& … … 𝐼 CNN … … LSTM Encoder LSTM LSTM 𝑒" Figure 2: Structure of the proposed encoder. Specifically, we use the spatial image features V ∈ Rd×k from a convolution layer of a CNN. qt is encoded with an LSTM to get a vector mq t ∈ Rd. Simultaneously, each previous round of history (H0, . . . , Ht−1) is encoded separately with another LSTM as M h t ∈Rd×t. Conditioned on the question embedding, the model attends to the history. The attended representation of the history and the question embedding are concatenated, and used as input to attend to the image: zh t = wT a tanh(WhM h t + (Wqmq t)1T ) (1) αh t = softmax(zh t ) (2) where 1 ∈Rt is a vector with all elements set to 1. Wh, Wq ∈Rt×d and wa ∈Rk are parameters to be learned. α ∈Rk is the attention weight over history. The attended history feature ˆmh t is a convex combination of columns of Mt, weighted appropriately by the elements of αh t . We further concatenate mq t and ˆmh t as the query vector and get the attended image feature ˆvt in the similar manner. Subsequently, all three components are used to obtain the final embedding et: et = tanh(We[mq t, ˆmh t , ˆvt]) (3) where We ∈Rd×3d is weight parameters and [·] is the concatenation operation. 4 4.2 Discriminator Loss Discriminative visual dialog models produce a distribution over the candidate answer list At and maximize the log-likelihood of the correct option agt t . The loss function for D needs to be conducive for knowledge transfer. In particular, it needs to encourage perceptually meaningful similarities. Therefore, we use a metric-learning multi-class N-pair loss [43] defined as: LD = Ln−pair {et, agt t , {a− t,i}N−1 i=1 }, f = logistic loss z }| { log 1 + N X i=1 exp e⊤ t f(a− t,i) −e⊤ t f(agt t ) | {z } score margin ! (4) where f is an attention based LSTM encoder for the answer. This attention can help the discriminator better deal with paraphrases across answers. The attention weight is learnt through a 1-layer MLP over LSTM output at each time step. The N-pair loss objective encourages learning a space in which the ground truth answer is scored higher than other options, and at the same time, encourages options similar to ground truth answers to score better than dissimilar ones. This means that, unlike the multiclass logistic loss, the options that are correct but different from the correct option may not be overly penalized, and thus can be useful in providing a reliable signal to the generator. See Fig. 1 for an example. Follwing [43], we regularize the L2 norm of the embedding vectors to be small. 4.3 Discriminant Perceptual Loss and Knowledge Transfer from D to G At a high-level, our approach for transferring knowledge from D to G is as follows: G repeatedly queries D with answers ˆat that it generates for an input embedding et to get feedback and update itself. In each such update, G’s goal is to update its parameters to try and have ˆat score higher than the correct answer, agt t , under D’s learned embedding and scoring function. Formally, the perceptual loss that G aims to optimize is given by: LG = L1−pair {et, ˆat, agt t }, f = log 1 + exp e⊤ t f(agt t ) −e⊤ t f(ˆat) (5) where f is the embedding function learned by the discriminator as in (4). Intuitively, updating generator parameters to minimize LG can be interpreted as learning to produce an answer sequence ˆat that ‘fools’ the discriminator into believing that this answer should score higher than the human response agt t under the discriminator’s learned embedding f(·) and scoring function. While it is straightforward to sample an answer ˆat from the generator and perform a forward pass through the discriminator, naïvely, it is not possible to backpropagate the gradients to the generator parameters since sampling discrete symbols results in zero gradients w.r.t. the generator parameters. To overcome this, we leverage the recently introduced continuous relaxation of the categorical distribution – the Gumbel-softmax distribution or the Concrete distribution [18, 30]. At an intuitive level, the Gumbel-Softmax (GS) approximation uses the so called ‘Gumbel-Max trick’ to reparametrize sampling from a categorical distribution and replaces argmax with softmax to obtain a continuous relaxation of the discrete random variable. Formally, let x denote a K-ary categorical random variable with parameters denoted by (p1, . . . pK), or x ∼Cat(p). Let gi K 1 denote K IID samples from the standard Gumbel distribution, gi ∼F(g) = e−e−g. Now, a sample from the Concrete distribution can be produced via the following transformation: yi = e (log pi+gi)/τ PK j=1 e (log pj +gj )/τ ∀i ∈{1, . . . , K} (6) where τ is a temperature parameter that control how close samples y from this Concrete distribution approximate the one-hot encoding of the categorical variable x. As illustrated in Fig. 1, we augment the LSTM in G with a sequence of GS samplers. Specifically, at each position in the answer sequence, we use a GS sampler to sample an answer token from that conditional distribution. When coupled with the straight-through gradient estimator [2, 18] this enables end-to-end differentiability. Specifically, during the forward pass we discretize the GS samples into discrete samples, and in the backward pass use the continuous relaxation to compute gradients. In our experiments, we held the temperature parameter fixed at 0.5. 5 5 Experiments Dataset and Setup. We evaluate our proposed approach on the VisDial dataset [7], which was collected by Das et al. by pairing two subjects on Amazon Mechanical Turk to chat about an image. One person was assigned the role of a ‘questioner’ and the other of ‘answerer’. One worker (the questioner) sees only a single line of text describing an image (caption from COCO [25]); the image remains hidden to the questioner. Their task is to ask questions about this hidden image to “imagine the scene better”. The second worker (the answerer) sees the image and caption and answers the questions. The two workers take turns asking and answering questions for 10 rounds. We perform experiments on VisDial v0.9 (the latest available release) containing 83k dialogs on COCO-train and 40k on COCO-val images, for a total of 1.2M dialog question-answer pairs. We split the 83k into 82k for train, 1k for val, and use the 40k as test, in a manner consistent with [7]. The caption is considered to be the first round in the dialog history. Evaluation Protocol. Following the evaluation protocol established in [7], we use a retrieval setting to evaluate the responses at each round in the dialog. Specifically, every question in VisDial is coupled with a list of 100 candidate answer options, which the models are asked to sort for evaluation purposes. D uses its score to rank these answer options, and G uses the log-likelihood of these options for ranking. Models are evaluated on standard retrieval metrics – (1) mean rank, (2) recall @k, and (3) mean reciprocal rank (MRR) – of the human response in the returned sorted list. Pre-processing. We truncate captions/questions/answers longer than 24/16/8 words respectively. We then build a vocabulary of words that occur at least 5 times in train, resulting in 8964 words. Training Details In our experiments, all 3 LSTMs are single layer with 512d hidden state. We use VGG-19 [42] to get the representation of image. We first rescale the images to be 224 × 224 pixels, and take the output of last pooling layer (512 × 7 × 7) as image feature. We use the Adam optimizer with a base learning rate of 4e-4. We pre-train G using standard MLE for 20 epochs, and D with supervised training based on Eq (4) for 30 epochs. Following [43], we regularize the L2 norm of the embedding vectors to be small. Subsequently, we train G with LG +αLMLE, which is a combination of discriminative perceptual loss and MLE loss. We set α to be 0.5. We found that including LMLE (with teacher-forcing) is important for encouraging G to generate grammatically correct responses. 5.1 Results and Analysis Baselines. We compare our proposed techniques to the current state-of-art generative and discriminative models developed in [7]. Specifically, [7] introduced 3 encoding architectures – Late Fusion (LF), Hierarchical Recurrent Encoder (HRE), Memory Network (MN) – each trained with a generative (-G) and discriminative (-D) decoder. We compare to all 6 models. Our approaches. We present a few variants of our approach to systematically study the individual contributions of our training procedure, novel encoder (HCIAE), self-attentive answer encoding (ATT), and metric-loss (NP). • HCIAE-G-MLE is a generative model with our proposed encoder trained under the MLE objective. Comparing this variant to the generative baselines from [7] establishes the improvement due to our encoder (HCIAE). • HCIAE-G-DIS is a generative model with our proposed encoder trained under the mixed MLE and discriminator loss (knowledge transfer). This forms our best generative model. Comparing this model to HCIAE-G-MLE establishes the improvement due to our discriminative training. • HCIAE-D-MLE is a discriminative model with our proposed encoder, trained under the standard discriminative cross-entropy loss. The answer candidates are encoded using an LSTM (no attention). Comparing this variant to the discriminative baselines from [7] establishes the improvement due to our encoder (HCIAE) in the discriminative setting. • HCIAE-D-NP is a discriminative model with our proposed encoder, trained under the n-pair discriminative loss (as described in Section 4.2). The answer candidates are encoded using an LSTM (no attention). Comparing this variant to HCIAE-D-MLE establishes the improvement due to the n-pair loss. • HCIAE-D-NP-ATT is a discriminative model with our proposed encoder, trained under the n-pair discriminative loss (as described in Section 4.2), and using the self-attentive answer encoding. Comparing this variant to HCIAE-D-NP establishes the improvement due to the self-attention mechanism while encoding the answers. 6 Table 1: Results (generative) on VisDial dataset. “MRR” is mean reciprocal rank and “Mean” is mean rank. Model MRR R@1 R@5 R@10 Mean LF-G [7] 0.5199 41.83 61.78 67.59 17.07 HREA-G [7] 0.5242 42.28 62.33 68.17 16.79 MN-G [7] 0.5259 42.29 62.85 68.88 17.06 HCIAE-G-MLE 0.5386 44.06 63.55 69.24 16.01 HCIAE-G-DIS 0.5467 44.35 65.28 71.55 14.23 Table 2: Results (discriminative) on VisDial dataset. Model MRR R@1 R@5 R@10 Mean LF-D [7] 0.5807 43.82 74.68 84.07 5.78 HREA-D [7] 0.5868 44.82 74.81 84.36 5.66 MN-D [7] 0.5965 45.55 76.22 85.37 5.46 HCIAE-D-MLE 0.6140 47.73 77.50 86.35 5.15 HCIAE-D-NP 0.6182 47.98 78.35 87.16 4.92 HCIAE-D-NP-ATT 0.6222 48.48 78.75 87.59 4.81 Results. Tables 1, 2 present results for all our models and baselines in generative and discriminative settings. The key observations are: 1. Main Results for HCIAE-G-DIS: Our final generative model with all ‘bells and whistles’, HCIAE-G-DIS, uniformly performs the best under all the metrics, outperforming the previous state-of-art model MN-G by 2.43% on R@5. This shows the importance of the knowledge transfer from the discriminator and the benefit from our encoder architecture. 2. Knowledge transfer vs. encoder for G: To understand the relative importance of the proposed history conditioned image attentive encoder (HCIAE) and the knowledge transfer, we compared the performance of HCIAE-G-DIS with HCIAE-G-MLE, which uses our proposed encoder but without any feedback from the discriminator. This comparison highlights two points: first, HCIAE-G-MLE improves R@5 by 0.7% over the current state-of-art method (MN-D) confirming the benefits of our encoder. Secondly, and importantly, its performance is lower than HCIAE-G-DIS by 1.7% on R@5, confirming that the modifications to encoder alone will not be sufficient to gain improvements in answer generation; knowledge transfer from D greatly improves G. 3. Metric loss vs. self-attentive answer encoding: In the purely discriminative setting, our final discriminative model (HCIAE-D-NP-ATT) also beats the performance of the corresponding state-of-art models [7] by 2.53% on R@5. The n-pair loss used in the discriminator is not only helpful for knowledge transfer but it also improves the performance of the discriminator by 0.85% on R@5 (compare HCIAE-D-NP to HCIAE-D-MLE). The improvements obtained by using the answer attention mechanism leads to an additional, albeit small, gains of 0.4% on R@5 to the discriminator performance (compare HCIAE-D-NP to HCIAE-D-NP-ATT). 5.2 Does updating discriminator help? Recall that our model training happens as follows: we independently train the generative model HCIAE-G-MLE and the discriminative model HCIAE-D-NP-ATT. With HCIAE-G-MLE as the initialization, the generative model is updated based on the feedback from HCIAE-D-NP-ATT and this results in our final HCIAE-G-DIS. We performed two further experiments to answer the following questions: • What happens if we continue training HCIAE-D-NP-ATT in an adversarial setting? In particular, we continue training by maximizing the score of the ground truth answer agt t and minimizing the score of the generated answer ˆat, effectively setting up an adversarial training regime LD = −LG. The resulting discriminator HCIAE-GAN1 has significant drop in performance, as can be seen in Table. 4 (32.97% R@5). This is perhaps expected because HCIAE-GAN1 updates its parameters based on only two answers, the ground truth and the generated sample (which is likely to be similar to ground truth). This wrecks the structure that HCIAE-D-NP-ATT had previously learned by leveraging additional incorrect options. • What happens if we continue structure-preserving training of HCIAE-D-NP-ATT? In addition to providing HCIAE-D-NP-ATT samples from G as fake answers, we also include incorrect options as negative answers so that the structure learned by the discriminator is preserved. HCIAE-D-NP-ATT continues to train under loss LD. In this case (HCIAE-GAN2 in Table. 4), we find that there is a small improvement in the performance of G. The additional computational overhead to training the discriminator supersedes the performance improvement. Also note that HCIAE-D-NP-ATT itself gets worse at the dialog task. 7 Table 3: Qualitative comparison. “Ours” are samples from G-DIS model with different gumbel noise z. Images from the COCO dataset [25]. Q: Is it a home or restaurant? A: I think restaurant. G-MLE: I can’t tell. Ours (z1): Hard to say. Ours (z2): It looks like a restaurant. Ours (z3): I can’t tell because it is too close. Q: Can you see his face? A: I am not sure. G-MLE: Yes. Ours (z1): I can only see the back of his body. Ours (z2): No. Ours (z3): No , he’s too far away. Q: How old does the man seem to be? A: 20’s. G-MLE: Late teens. Ours (z1): On his 20s. Ours (z2): In his twenties. Ours (z3): Mid 20’s. Q: Can you see broccoli? A: Yes, 3 larger pieces and some small. G-MLE: No, just the broccoli. Ours (z1): I can see broccoli, slightly butter. Ours (z2): Yes, there is broccoli. Ours (z3): Yes, broccoli is green. Table 4: Adversarial training results on VisDial dataset. Discriminative Generative Model MRR R@1 R@5 R@10 Mean MRR R@1 R@5 R@10 Mean HCIAE-D-NP-ATT 0.6222 48.48 78.75 87.59 4.81 HCIAE-G-DIS 0.5467 44.35 65.28 71.55 14.23 HCIAE-GAN1 0.2177 8.82 32.97 52.14 18.53 0.5298 43.12 62.74 68.58 16.25 HCIAE-GAN2 0.6050 46.20 77.92 87.20 4.97 0.5459 44.33 65.05 71.40 14.34 One might wonder, why not train a GAN for visual dialog? Formulating the task in a GAN setting would involve G and D training in tandem with D providing feedback as to whether a response that G generates is real or fake. We found this to be a particularly unstable setting, for two main reasons: First, consider the case when the ground truth answer and the generated answers are the same. This happens for answers that are typically short or ‘cryptic’ (e.g. ‘yes’). In this case, D can not train itself or provide feedback, as the answer is labeled both positive and negative. Second, in cases where the ground truth answer is descriptive but the generator provides a short answer, D can quickly become powerful enough to discard generated samples as fake. In this case, D is not able to provide any information to G to get better at the task. Our experience suggests that the discriminator, if one were to consider a ‘GANs for visual dialog’ setting, can not merely be focused on differentiating fake from real. It needs to be able to score similarity between the ground truth and other answers. Such a scoring mechanism provides a more reliable feedback to G. In fact, as we show in the previous two results, a pre-trained D that captures this structure is the key ingredient in sharing knowledge with G. The adversarial training of D is not central. 5.3 Qualitative Comparison In Table 3 we present a couple of qualitative examples that compares the responses generated by G-MLE and G-DIS. G-MLE predominantly produces ‘safe’ and less informative answers, such as ‘Yes’ and or ‘I can’t tell’. In contrast, our proposed model G-DIS does so less frequently, and often generates more diverse yet informative responses. 6 Conclusion Generative models for (visual) dialog are typically trained with an MLE objective. As a result, they tend to latch on to safe and generic responses. Discriminative (or retrieval) models on the other hand have been shown to significantly outperform their generative counterparts. However, discriminative models can not be deployed as dialog agents with a real user where canned candidate responses are not available. In this work, we propose transferring knowledge from a powerful discriminative visual dialog model to a generative model. We leverage the Gumbel-Softmax (GS) approximation to the discrete distribution –specifically, a RNN augmented with a sequence of GS samplers, coupled with a ST gradient estimator for end-to-end differentiability. We also propose a novel visual dialog encoder that reasons about image-attention informed by the history of the dialog; and employ a metric learning loss along with a self-attentive answer encoding to enable the discriminator to learn meaningful structure in dialog responses. The result is a generative visual dialog model that significantly outperforms state-of-the-art. 8 References [1] Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C Lawrence Zitnick, and Devi Parikh. Vqa: Visual question answering. In ICCV, 2015. [2] Yoshua Bengio, Nicholas Léonard, and Aaron C. Courville. Estimating or propagating gradients through stochastic neurons for conditional computation. CoRR, abs/1308.3432, 2013. [3] Antoine Bordes and Jason Weston. Learning end-to-end goal-oriented dialog. arXiv preprint arXiv:1605.07683, 2016. [4] Kan Chen, Jiang Wang, Liang-Chieh Chen, Haoyuan Gao, Wei Xu, and Ram Nevatia. Abc-cnn: An attention based convolutional neural network for visual question answering. arXiv preprint arXiv:1511.05960, 2015. [5] Tianqi Chen, Ian Goodfellow, and Jonathon Shlens. Net2net: Accelerating learning via knowledge transfer. arXiv preprint arXiv:1511.05641, 2015. [6] Bo Dai, Dahua Lin, Raquel Urtasun, and Sanja Fidler. Towards diverse and natural image descriptions via a conditional gan. arXiv preprint arXiv:1703.06029, 2017. [7] Abhishek Das, Satwik Kottur, Khushi Gupta, Avi Singh, Deshraj Yadav, José M.F. Moura, Devi Parikh, and Dhruv Batra. Visual dialog. In CVPR, 2017. [8] Abhishek Das, Satwik Kottur, José MF Moura, Stefan Lee, and Dhruv Batra. Learning cooperative visual dialog agents with deep reinforcement learning. arXiv preprint arXiv:1703.06585, 2017. [9] Harm de Vries, Florian Strub, Sarath Chandar, Olivier Pietquin, Hugo Larochelle, and Aaron Courville. Guesswhat?! visual object discovery through multi-modal dialogue. arXiv preprint arXiv:1611.08481, 2016. [10] Emily L. Denton, Soumith Chintala, Arthur Szlam, and Robert Fergus. Deep generative image models using a laplacian pyramid of adversarial networks. NIPS, 2015. [11] Jeff Donahue, Lisa Anne Hendricks, Sergio Guadarrama, Marcus Rohrbach, Subhashini Venugopalan, Kate Saenko, and Trevor Darrell. Long-term Recurrent Convolutional Networks for Visual Recognition and Description. In CVPR, 2015. [12] Alexey Dosovitskiy and Thomas Brox. Generating images with perceptual similarity metrics based on deep networks. In NIPS, 2016. [13] Hao Fang, Saurabh Gupta, Forrest N. Iandola, Rupesh Kumar Srivastava, Li Deng, Piotr Dollár, Jianfeng Gao, Xiaodong He, Margaret Mitchell, John C. Platt, C. Lawrence Zitnick, and Geoffrey Zweig. From Captions to Visual Concepts and Back. In CVPR, 2015. [14] Haoyuan Gao, Junhua Mao, Jie Zhou, Zhiheng Huang, Lei Wang, and Wei Xu. Are you talking to a machine? dataset and methods for multilingual image question answering. In NIPS, 2015. [15] Leon A Gatys, Alexander S Ecker, and Matthias Bethge. A neural algorithm of artistic style. arXiv preprint arXiv:1508.06576, 2015. [16] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS, 2014. [17] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. [18] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144, 2016. [19] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In ECCV, 2016. [20] Andrej Karpathy and Li Fei-Fei. Deep visual-semantic alignments for generating image descriptions. In CVPR, 2015. [21] Matt J. Kusner and José Miguel Hernández-Lobato. Gans for sequences of discrete elements with the gumbel-softmax distribution. CoRR, abs/1611.04051, 2016. [22] Christian Ledig, Lucas Theis, Ferenc Huszar, Jose Caballero, Andrew P. Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, and Wenzhe Shi. Photo-realistic single image super-resolution using a generative adversarial network. CoRR, abs/1609.04802, 2016. [23] Jiwei Li, Will Monroe, Tianlin Shi, Alan Ritter, and Dan Jurafsky. Adversarial learning for neural dialogue generation. arXiv preprint arXiv:1701.06547, 2017. [24] Chin-Yew Lin. Rouge: A package for automatic evaluation of summaries. In ACL 2004 Workshop, 2004. [25] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ECCV, 2014. 9 [26] Chia-Wei Liu, Ryan Lowe, Iulian V Serban, Michael Noseworthy, Laurent Charlin, and Joelle Pineau. How not to evaluate your dialogue system: An empirical study of unsupervised evaluation metrics for dialogue response generation. arXiv preprint arXiv:1603.08023, 2016. [27] Siqi Liu, Zhenhai Zhu, Ning Ye, Sergio Guadarrama, and Kevin Murphy. Optimization of image description metrics using policy gradient methods. arXiv preprint arXiv:1612.00370, 2016. [28] Jiasen Lu, Caiming Xiong, Devi Parikh, and Richard Socher. Knowing when to look: Adaptive attention via a visual sentinel for image captioning. In CVPR, 2016. [29] Jiasen Lu, Jianwei Yang, Dhruv Batra, and Devi Parikh. Hierarchical question-image co-attention for visual question answering. In NIPS, 2016. [30] Chris J Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. arXiv preprint arXiv:1611.00712, 2016. [31] Mateusz Malinowski, Marcus Rohrbach, and Mario Fritz. Ask your neurons: A neural-based approach to answering questions about images. In ICCV, 2015. [32] Hongyuan Mei, Mohit Bansal, and Matthew R Walter. Coherent dialogue with attention-based language models. arXiv preprint arXiv:1611.06997, 2016. [33] Nasrin Mostafazadeh, Chris Brockett, Bill Dolan, Michel Galley, Jianfeng Gao, Georgios P Spithourakis, and Lucy Vanderwende. Image-grounded conversations: Multimodal context for natural question and response generation. arXiv preprint arXiv:1701.08251, 2017. [34] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In ACL, 2002. [35] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. CoRR, abs/1511.06434, 2015. [36] Marc’Aurelio Ranzato, Sumit Chopra, Michael Auli, and Wojciech Zaremba. Sequence level training with recurrent neural networks. arXiv preprint arXiv:1511.06732, 2015. [37] Mengye Ren, Ryan Kiros, and Richard Zemel. Exploring models and data for image question answering. In NIPS, 2015. [38] Iulian V Serban, Alessandro Sordoni, Yoshua Bengio, Aaron Courville, and Joelle Pineau. Building end-to-end dialogue systems using generative hierarchical neural network models. arXiv preprint arXiv:1507.04808, 2015. [39] Iulian Vlad Serban, Alessandro Sordoni, Ryan Lowe, Laurent Charlin, Joelle Pineau, Aaron Courville, and Yoshua Bengio. A hierarchical latent variable encoder-decoder model for generating dialogues. arXiv preprint arXiv:1605.06069, 2016. [40] Iulian Vlad Serban, Alessandro Sordoni, Ryan Lowe, Laurent Charlin, Joelle Pineau, Aaron Courville, and Yoshua Bengio. A hierarchical latent variable encoder-decoder model for generating dialogues. In AAAI, 2017. [41] Rakshith Shetty, Marcus Rohrbach, Lisa Anne Hendricks, Mario Fritz, and Bernt Schiele. Speaking the same language: Matching machine to human captions by adversarial training. CoRR, abs/1703.10476, 2017. [42] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [43] Kihyuk Sohn. Improved deep metric learning with multi-class n-pair loss objective. In NIPS, 2016. [44] Alessandro Sordoni, Michel Galley, Michael Auli, Chris Brockett, Yangfeng Ji, Margaret Mitchell, JianYun Nie, Jianfeng Gao, and Bill Dolan. A neural network approach to context-sensitive generation of conversational responses. arXiv preprint arXiv:1506.06714, 2015. [45] Florian Strub, Harm de Vries, Jeremie Mary, Bilal Piot, Aaron Courville, and Olivier Pietquin. End-to-end optimization of goal-driven and visually grounded dialogue systems. arXiv preprint arXiv:1703.05423, 2017. [46] Sainbayar Sukhbaatar, Jason Weston, Rob Fergus, et al. End-to-end memory networks. In NIPS, 2015. [47] Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In NIPS, 2014. [48] Ramakrishna Vedantam, C Lawrence Zitnick, and Devi Parikh. Cider: Consensus-based image description evaluation. In CVPR, 2015. [49] Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. Show and tell: A neural image caption generator. In CVPR, 2015. [50] Huijuan Xu and Kate Saenko. Ask, attend and answer: Exploring question-guided spatial attention for visual question answering. In ECCV, 2016. 10 [51] Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron C. Courville, Ruslan Salakhutdinov, Richard S. Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. CoRR, abs/1502.03044, 2015. [52] Zichao Yang, Xiaodong He, Jianfeng Gao, Li Deng, and Alex Smola. Stacked attention networks for image question answering. In CVPR, 2016. [53] Lantao Yu, Weinan Zhang, Jun Wang, and Yong Yu. Seqgan: Sequence generative adversarial nets with policy gradient. AAAI, 2017. [54] Junbo Jake Zhao, Michaël Mathieu, and Yann LeCun. Energy-based generative adversarial network. CoRR, abs/1609.03126, 2016. [55] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. arXiv preprint arXiv:1703.10593, 2017. 11 | 2017 | 29 |
6,774 | Learning the Morphology of Brain Signals Using Alpha-Stable Convolutional Sparse Coding Mainak Jas1, Tom Dupré La Tour1, Umut ¸Sim¸sekli1, Alexandre Gramfort1,2 1: LTCI, Telecom ParisTech, Université Paris-Saclay, Paris, France 2: INRIA, Université Paris-Saclay, Saclay, France Abstract Neural time-series data contain a wide variety of prototypical signal waveforms (atoms) that are of significant importance in clinical and cognitive research. One of the goals for analyzing such data is hence to extract such ‘shift-invariant’ atoms. Even though some success has been reported with existing algorithms, they are limited in applicability due to their heuristic nature. Moreover, they are often vulnerable to artifacts and impulsive noise, which are typically present in raw neural recordings. In this study, we address these issues and propose a novel probabilistic convolutional sparse coding (CSC) model for learning shift-invariant atoms from raw neural signals containing potentially severe artifacts. In the core of our model, which we call αCSC, lies a family of heavy-tailed distributions called α-stable distributions. We develop a novel, computationally efficient Monte Carlo expectation-maximization algorithm for inference. The maximization step boils down to a weighted CSC problem, for which we develop a computationally efficient optimization algorithm. Our results show that the proposed algorithm achieves state-of-the-art convergence speeds. Besides, αCSC is significantly more robust to artifacts when compared to three competing algorithms: it can extract spike bursts, oscillations, and even reveal more subtle phenomena such as cross-frequency coupling when applied to noisy neural time series. 1 Introduction Neural time series data, either non-invasive such as electroencephalograhy (EEG) or invasive such as electrocorticography (ECoG) and local field potentials (LFP), are fundamental to modern experimental neuroscience. Such recordings contain a wide variety of ‘prototypical signals’ that range from beta rhythms (12–30 Hz) in motor imagery tasks and alpha oscillations (8–12 Hz) involved in attention mechanisms, to spindles in sleep studies, and the classical P300 event related potential, a biomarker for surprise. These prototypical waveforms are considered critical in clinical and cognitive research [1], thereby motivating the development of computational tools for learning such signals from data. Despite the underlying complexity in the morphology of neural signals, the majority of the computational tools in the community are based on representing the signals with rather simple, predefined bases, such as the Fourier or wavelet bases [2]. While such bases lead to computationally efficient algorithms, they often fall short at capturing the precise morphology of signal waveforms, as demonstrated by a number of recent studies [3, 4]. An example of such a failure is the disambiguation of the alpha rhythm from the mu rhythm [5], both of which have a component around 10 Hz but with different morphologies that cannot be captured by Fourier- or wavelet-based representations. Recently, there have been several attempts for extracting more realistic and precise morphologies directly from unfiltered electrophysiology signals, via dictionary learning approaches [6–9]. These methods all aim to extract certain shift-invariant prototypical waveforms (called ‘atoms’ in this context) to better capture the temporal structure of the signals. As opposed to using generic bases 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. that have predefined shapes, such as the Fourier or the wavelet bases, these atoms provide a more meaningful representation of the data and are not restricted to narrow frequency bands. In this line of research, Jost et al. [6] proposed the MoTIF algorithm, which uses an iterative strategy based on generalized eigenvalue decompositions, where the atoms are assumed to be orthogonal to each other and learnt one by one in a greedy way. More recently, the ‘sliding window matching’ (SWM) algorithm [9] was proposed for learning time-varying atoms by using a correlation-based approach that aims to identify the recurring patterns. Even though some success has been reported with these algorithms, they have several limitations: SWM uses a slow stochastic search inspired by simulated annealing and MoTIF poorly handles correlated atoms, simultaneously activated, or having varying amplitudes; some cases which often occur in practical applications. A natural way to cast the problem of learning a dictionary of shift-invariant atoms into an optimization problem is a convolutional sparse coding (CSC) approach [10]. This approach has gained popularity in computer vision [11–15], biomedical imaging [16] and audio signal processing [10, 17], due to its ability to obtain compact representations of the signals and to incorporate the temporal structure of the signals via convolution. In the neuroscience context, Barthélemy et al. [18] used an extension of the K-SVD algorithm using convolutions on EEG data. In a similar spirit, Brockmeier and Príncipe [7] used the matching pursuit algorithm combined with a rather heuristic dictionary update, which is similar to the MoTIF algorithm. In a very recent study, Hitziger et al. [8] proposed the AWL algorithm, which presents a mathematically more principled CSC approach for modeling neural signals. Yet, as opposed to classical CSC approaches, the AWL algorithm imposes additional combinatorial constraints, which limit its scope to certain data that contain spike-like atoms. Also, since these constraints increase the complexity of the optimization problem, the authors had to resort to dataset-specific initializations and many heuristics in their inference procedure. While the current state-of-the-art CSC methods have a strong potential for modeling neural signals, they might also be limited as they consider an ℓ2 reconstruction error, which corresponds to assuming an additive Gaussian noise distribution. While this assumption could be reasonable for several signal processing tasks, it turns out to be very restrictive for neural signals, which often contain heavy noise bursts and have low signal-to-noise ratio. In this study, we aim to address the aforementioned concerns and propose a novel probabilistic CSC model called αCSC, which is better-suited for neural signals. αCSC is based on a family of heavy-tailed distributions called α-stable distributions [19] whose rich structure covers a broad range of noise distributions. The heavy-tailed nature of the α-stable distributions renders our model robust to impulsive observations. We develop a Monte Carlo expectation maximization (MCEM) algorithm for inference, with a weighted CSC model for the maximization step. We propose efficient optimization strategies that are specifically designed for neural time series. We illustrate the benefits of the proposed approach on both synthetic and real datasets. 2 Preliminaries Notation: For a vector v ∈Rn we denote the ℓp norm by ∥v∥p = (P i |vi|p)1/p. The convolution of two vectors v1 ∈RN and v2 ∈RM is denoted by v1 ∗v2 ∈RN+M−1. We denote by x the observed signals, d the temporal atoms, and z the sparse vector of activations. The symbols U, E, N, S denote the univariate uniform, exponential, Gaussian, and α-stable distributions, respectively. Convolutional sparse coding: The CSC problem formulation adopted in this work follows the Shift Invariant Sparse Coding (SISC) model from [10]. It is defined as follows: min d,z N X n=1 1 2∥xn − K X k=1 dk ∗zk n∥2 2 + λ K X k=1 ∥zk n∥1 , s.t. ∥dk∥2 2 ≤1 and zk n ≥0, ∀n, k , (1) where xn ∈RT denotes one of the N observed segments of signals, also referred to as a trials in this paper. We denote by T as the length of a trial, and K the number of atoms. The aim in this model is to approximate the signals xn by the convolution of certain atoms and their respective activations, which are sparse. Here, dk ∈RL denotes the kth atom of the dictionary d ≡{dk}k, and zk n ∈RT −L+1 + denotes the activation of the kth atom in the nth trial. We denote by z ≡{zk n}n,k. The objective function (1) has two terms, an ℓ2 data fitting term that corresponds to assuming an additive Gaussian noise model, and a regularization term that promotes sparsity with an ℓ1 norm. The 2 -30 -20 -10 0 10 20 30 x 10-5 10-4 10-3 10-2 10-1 100 p(x) α=2.0, β=0 α=1.9, β=0 α=1.8, β=0 α=0.9, β=1 (a) 500 1000 1500 2000 2500 Time (t) -10 0 10 Trial 1 (xn,t) 500 1000 1500 2000 2500 Time (t) -5 0 5 Trial 2 (xn,t) (b) Figure 1: (a) PDFs of α-stable distributions. (b) Illustration of two trials from the striatal LFP data, which contain severe artifacts. The artifacts are illustrated with dashed rectangles. regularization parameter is called λ > 0. Two constraints are also imposed. First, we ensure that dk lies within the unit sphere, which prevents the scale ambiguity between d and z. Second, a positivity constraint on z is imposed to be able to obtain physically meaningful activations and to avoid sign ambiguities between d and z. This positivity constraint is not present in the original SISC model [10]. α-Stable distributions: The α-stable distributions have become increasingly popular in modeling signals that might incur large variations [20–24] and have a particular importance in statistics since they appear as the limiting distributions in the generalized central limit theorem [19]. They are characterized by four parameters: α, β, σ, and µ: (i) α ∈(0, 2] is the characteristic exponent and determines the tail thickness of the distribution: the distribution will be heavier-tailed as α gets smaller. (ii) β ∈[−1, 1] is the skewness parameter. If β = 0, the distribution is symmetric. (iii) σ ∈(0, ∞) is the scale parameter and measures the spread of the random variable around its mode (similar to the standard deviation of a Gaussian distribution). Finally, (iv) µ ∈(−∞, ∞) is the location parameter (for α > 1, it is simply the mean). The probability density function of an α-stable distribution cannot be written in closed-form except for certain special cases; however, the characteristic function can be written as follows: x ∼S(α, β, σ, µ) ⇐⇒E[exp(iωx)] = exp(−|σω|α [1 + i sign(ω)βψα(ω)] + iµω) , where ψα(ω) = log |ω| for α = 1, ψα(ω) = tan(πα/2) for α ̸= 1, and i = √−1. As an important special case of the α-stable distributions, we obtain the Gaussian distribution when α = 2 and β = 0, i.e. S(2, 0, σ, µ) = N(µ, 2σ2). In Fig. 1(a), we illustrate the (approximately computed) probability density functions (PDF) of the α-stable distribution for different values of α and β. The distribution becomes heavier-tailed as we decrease α, whereas the tails vanish quickly when α = 2. The moments of the α-stable distributions can only be defined up to the order α, i.e. E[|x|p] < ∞ if and only if p < α, which implies the distribution has infinite variance when α < 2. Furthermore, despite the fact that the PDFs of α-stable distributions do not admit an analytical form, it is straightforward to draw random samples from them [25]. 3 Alpha-Stable Convolutional Sparse Coding 3.1 The Model From a probabilistic perspective, the CSC problem can be also formulated as a maximum a-posteriori (MAP) estimation problem on the following probabilistic generative model: zk n,t ∼E(λ), xn,t|z, d ∼N(ˆxn,t, 1), where, ˆxn ≜ K X k=1 dk ∗zk n . (2) Here, zk n,t denotes the tth element of zk n. We use the same notations for xn,t and ˆxn,t. It is easy to verify that the MAP estimate for this probabilistic model, i.e. maxd,z log p(d, z|x), is identical to the original optimization problem defined in (1)1. It has been long known that, due to their light-tailed nature, Gaussian models often fail at handling noisy high amplitude observations or outliers [26]. As a result, the ‘vanilla’ CSC model turns out to be highly sensitive to outliers and impulsive noise that frequently occur in electrophysiological 1Note that the positivity constraint on the activations is equivalent to an exponential prior for the regularization term rather than the more common Laplacian prior. 3 recordings, as illustrated in Fig. 1(b). Possible origins of such artifacts are movement, muscle contractions, ocular blinks or electrode contact losses. In this study, we aim at developing a probabilistic CSC model that would be capable of modeling challenging electrophysiological signals. We propose an extension of the original CSC model defined in (2) by replacing the light-tailed Gaussian likelihood (corresponding to the ℓ2 reconstruction loss in (1)) with heavy-tailed α-stable distributions. We define the proposed probabilistic model (αCSC) as follows: zk n,t ∼E(λ), xn,t|z, d ∼S(α, 0, 1/ √ 2, ˆxn,t) , (3) where S denotes the α-stable distribution. While still being able to capture the temporal structure of the observed signals via convolution, the proposed model has a richer structure and would allow large variations and outliers, thanks to the heavy-tailed α-stable distributions. Note that the vanilla CSC defined in (2) appears as a special case of αCSC, as the α-stable distribution coincides with the Gaussian distribution when α = 2. 3.2 Maximum A-Posteriori Inference Given the observed signals x, we are interested in the MAP estimates, defined as follows: (d⋆, z⋆) = arg max d,z X n,t log p(xn,t|d, z) + X k log p(zk n,t) . (4) As opposed to the Gaussian case, unfortunately, this optimization problem is not amenable to classical optimization tools, since the PDF of the α-stable distributions does not admit an analytical expression. As a remedy, we use the product property of the symmetric α-stable densities [19, 27] and re-express the αCSC model as conditionally Gaussian. It leads to: zk n,t ∼E(λ), φn,t ∼S α 2 , 1, 2(cos πα 4 )2/α, 0 , xn,t|z, d, φ ∼N ˆxn,t, 1 2φn,t , (5) where φ is called the impulse variable that is drawn from a positive α-stable distribution (i.e. β = 1), whose PDF is illustrated in Fig. 1(a). It can be shown that both formulations of the αCSC model are identical by marginalizing the joint distribution p(x, d, z, φ) over φ [19, Proposition 1.3.1]. The impulsive structure of the αCSC model becomes more prominent in this formulation: the variances of the Gaussian observations are modulated by stable random variables with infinite variance, where the impulsiveness depends on the value of α. It is also worth noting that when α = 2, φn,t becomes deterministic and we can again verify that αCSC coincides with the vanilla CSC. The conditionally Gaussian structure of the augmented model has a crucial practical implication: if the impulse variable φ were to be known, then the MAP estimation problem over d and z in this model would turn into a ‘weighted’ CSC problem, which is a much easier task compared to the original problem. In order to be able to exploit this property, we propose an expectation-maximization (EM) algorithm, which iteratively maximizes a lower bound of the log-posterior log p(d, z|x), and algorithmically boils down to computing the following steps in an iterative manner: E-Step: B(i)(d, z) = E [log p(x, φ, z|d)]p(φ|x,z(i),d(i)) , (6) M-Step: (d(i+1), z(i+1)) = arg maxd,z B(i)(d, z). (7) where E[f(x)]q(x) denotes the expectation of a function f under the distribution q, i denotes the iterations, and B(i) is a lower bound to log p(d, z|x) and it is tight at the current iterates z(i), d(i). The E-Step: In the first step of our algorithm, we need to compute the EM lower bound B that has the following form: B(i)(d, z) =+ − N X n=1 ∥ q w(i) n ⊙(xn − K X k=1 dk ∗zk n)∥2 2 + λ K X k=1 ∥zk n∥1 , (8) where =+ denotes equality up to additive constants, ⊙denotes the Hadamard (element-wise) product, and the square-root operator is also defined element-wise. Here, w(i) n ∈RT + are the weights that are defined as follows: w(i) n,t ≜E [1/φn,t]p(φ|x,z(i),d(i)). As the variables φn,t are expected to be large when ˆxn,t cannot explain the observation xn,t – typically due to a corruption or a high noise – the weights will accordingly suppress the importance of the particular point xn,t. Therefore, the overall approach will be more robust to corrupted data than the Gaussian models where all weights would be deterministic and equal to 0.5. 4 Algorithm 1 α-stable Convolutional Sparse Coding Require: Regularization: λ ∈R+, Num. atoms: K, Atom length: L, Num. iterations: I , J, M 1: for i = 1 to I do 2: /* E-step: */ 3: for j = 1 to J do 4: Draw φ(i,j) n,t via MCMC (9) 5: end for 6: w(i) n,t ≈(1/J) PJ j=1 1/φ(i,j) n,t 7: /* M-step: */ 8: for m = 1 to M do 9: z(i) = L-BFGS-B on (10) 10: d(i) = L-BFGS-B on the dual of (11) 11: end for 12: end for 13: return w(I), d(I), z(I) Unfortunately, the weights w(i) cannot be computed analytically, therefore we need to resort to approximate methods. In this study, we develop a Markov chain Monte Carlo (MCMC) method to approximately compute the weights, where we approximate the intractable expectations with a finite sample average, given as follows: w(i) n,t ≈ (1/J) PJ j=1 1/φ(i,j) n,t , where φ(i,j) n,t are some samples that are ideally drawn from the posterior distribution p(φ|x, z(i), d(i)). Unfortunately, directly drawing samples from the posterior distribution of φ is not tractable either, and therefore, we develop a MetropolisHastings algorithm [28], that asymptotically generates samples from the target distribution p(φ|·) in two steps. In the j-th iteration of this algorithm, we first draw a random sample for each n and t from the prior distribution (cf. (5)), i.e., φ′ n,t ∼p(φn,t). We then compute an acceptance probability for each φ′ n,t that is defined as follows: acc(φ(i,j) n,t →φ′ n,t) ≜min n 1, p(xn,t|d(i), z(i), φ′ n,t)/p(xn,t|d(i), z(i), φ(i,j) n,t ) o (9) where j denotes the iteration number of the MCMC algorithm. Finally, we draw a uniform random number un,t ∼U([0, 1]) for each n and t. If un,t < acc(φ(i) n,t →φ′ n,t), we accept the sample and set φ(i+1) n,t = φ′ n,t; otherwise we reject the sample and set φ(i+1) n,t = φ(i) n,t. This procedure forms a Markov chain that leaves the target distribution p(φ|·) invariant, where under mild ergodicity conditions, it can be shown that the finite-sample averages converge to their true values when J goes to infinity [29]. More detailed explanation of this procedure is given in the supplementary document. The M-Step: Given the weights wn that are estimated during the E-step, the objective of the Mstep (7) is to solve a weighted CSC problem, which is much easier when compared to our original problem. This objective function is not jointly convex in d and z, yet it is convex if one fix either d or z. Here, similarly to the vanilla CSC approaches [9, 10], we develop a block coordinate descent strategy, where we solve the problem in (7) for either d or z, by keeping respectively z and d fixed. We first focus on solving the problem for z while keeping d fixed, given as follows: min z N X n=1 ∥√wn ⊙(xn − K X k=1 Dk¯zk n)∥2 2 + λ X k ∥zk n∥1 s.t. zk n ≥0, ∀n, k . (10) Here, we expressed the convolution of dk and zk n as the inner product of the zero-padded activations ¯zk n ≜[(zk n)⊤, 0 · · · 0]⊤∈RT +, with a Toeplitz matrix Dk ∈RT ×T , that is constructed from dk. The matrices Dk are never constructed in practice, and all operations are carried out using convolutions. This problem can be solved by various constrained optimization algorithms. Here, we choose the quasi-Newton L-BFGS-B algorithm [30] with a box constraint: 0 ≤zk n,t ≤∞. This approach only requires the simple computation of the gradient of the objective function with respect to z (cf. supplementary material). Note that, since each trial is independent from each other, we can solve this problem for each zn in parallel. We then solve the problem for the atoms d while keeping z fixed. This optimization problem turns out to be a constrained weighted least-squares problem. In the non-weighted case, this problem can be solved either in the time domain or in the Fourier domain [10–12]. The Fourier transform simplifies the convolutions that appear in least-squares problem, but it also induces several difficulties, such as that the atom dk have to be in a finite support L, an important issue ignored in the seminal work of [10] and addressed with an ADMM solver in[11, 12]. In the weighted case, it is not clear how to solve this problem in the Fourier domain. We thus perform all the computations in the time domain. Following the traditional filter identification approach [31], we need to embed the one-dimensional signals zk n into a matrix of delayed signals Zk n ∈RT ×L, where (Zk n)i,j = zk n,i+j−L+1 if L −1 ≤ 5 0 2000 4000 Time (s) 10 3 10 2 10 1 100 101 (objective - best) / best Heide et al (2015) Wohlberg (2016) M-step M-step - 4 parallel (a) K = 10, L = 32. K = 2, L = 32 K = 2, L = 128 K = 10, L = 32 0 1000 2000 3000 4000 5000 6000 Time (s) Heide et al (2015) Wohlberg (2016) M-step M-step - 4 parallel (b) Time to reach a relative precision of 0.01. Figure 2: Comparison of state-of-the-art methods with our approach. (a) Convergence plot with the objective function relative to the obtained minimum, as a function of computational time. (b) Time taken to reach a relative precision of 10−2, for different settings of K and L. i + j < T and 0 elsewhere. Equation (1) then becomes: min d N X n=1 ∥√wn ⊙(xn − K X k=1 Zk ndk)∥2 2, s.t. ∥dk∥2 2 ≤1 . (11) Due to the constraint, we must resort to an iterative approach. The options are to use (accelerated) projected gradient methods such as FISTA [32] applied to (11), or to solve a dual problem as done in [10]. The dual is also a smooth constraint problem yet with a simpler positivity box constraint (cf. supplementary material). The dual can therefore be optimized with L-BFGS-B. Using such a quasi-Newton solver turned out to be more efficient than any accelerated first order method in either the primal or the dual (cf. benchmarks in supplementary material). Our entire EM approach can be summarized in the Algorithm 1. Note that during the alternating minimization, thanks to convexity we can warm start the d update and the z update using the solution from the previous update. This significantly speeds up the convergence of the L-BFGS-B algorithm, particularly in the later iterations of the overall algorithm. 4 Experiments In order to evaluate our approach, we conduct several experiments on both synthetic and real data. First, we show that our proposed optimization scheme for the M-step provides significant improvements in terms of convergence speed over the state-of-the-art CSC methods. Then, we provide empirical evidence that our algorithm is more robust to artifacts and outliers than three competing CSC methods [6, 7, 12]. Finally, we consider LFP data, where we illustrate that our algorithm can reveal interesting properties in electrophysiological signals without supervision, even in the presence of severe artifacts. The source code is publicly available at https://alphacsc.github.io/. Synthetic simulation setup: In our synthetic data experiments, we simulate N trials of length T by first generating K zero mean and unit norm atoms of length L. The activation instants are integers drawn from a uniform distribution in J0, T −LK. The amplitude of the activations are drawn from a uniform distribution in [0, 1]. Atoms are activated only once per trial and are allowed to overlap. The activations are then convolved with the generated atoms and summed up as in (1). M-step performance: In our first set of synthetic experiments, we illustrate the benefits of our M-step optimization approach over state-of-the-art CSC solvers. We set N = 100, T = 2000 and λ = 1, and use different values for K and L. To be comparable, we set α = 2 and add Gaussian noise to the synthesized signals, where the standard deviation is set to 0.01. In this setting, we have wn,t = 1/2 for all n, t, which reduces the problem to a standard CSC setup. We monitor the convergence of ADMM-based methods by Heide et al. [11] and Wohlberg [12] against our M-step algorithm, using both a single-threaded and a parallel version for the z-update. As the problem is non-convex, even if two algorithms start from the same point, they are not guaranteed to reach the same local minimum2. Hence, for a fair comparison, we use a multiple restart strategy with averaging across 24 random seeds. 2Note that the M-step can be viewed as a biconvex problem, for which global convergence guarantees can be shown under certain assumptions [33, 34]. However, we have observed that it is required to use multiple restarts even for vanilla CSC, implying that these assumptions are not satisfied in this particular problem. 6 Brockmeier et al. Atom 1 Atom 2 G. Truth MoTIF CSC αCSC (a) No corruption. Brockmeier et al. MoTIF CSC αCSC (b) 10% corruption. Brockmeier et al. MoTIF CSC αCSC (c) 20% corruption Figure 3: Simulation to compare state-of-the-art methods against αCSC. During our experiments we have observed that the ADMM-based methods do not guarantee the feasibility of the iterates. In other words, the norms of the estimated atoms might be greater than 1 during the iterations. To keep the algorithms comparable, when computing the objective value, we project the atoms to the unit ball and scale the activations accordingly. To be strictly comparable, we also imposed a positivity constraint on these algorithms. This is easily done by modifying the soft-thresholding operator to be a rectified linear function. In the benchmarks, all algorithms use a single thread, except “M-step - 4 parallel” which uses 4 threads during the z update. In Fig. 2, we illustrate the convergence behaviors of the different methods. Note that the y-axis is the precision relative to the objective value obtained upon convergence. In other words, each curve is relative to its own local minimum (see supplementary document for details). In the right subplot, we show how long it takes for the algorithms to reach a relative precision of 0.01 for different settings (cf. supplementary material for more benchmarks). Our method consistently performs better and the difference is even more striking for more challenging setups. This speed improvement on the M-step is crucial for us as this step will be repeatedly executed. Robustness to corrupted data: In our second synthetic data experiment, we illustrate the robustness of αCSC in the presence of corrupted observations. In order to simulate the likely presence of high amplitude artifacts, one way would be to directly simulate the generative model in (3). However, this would give us an unfair advantage, since αCSC is specifically designed for such data. Here, we take an alternative approach, where we corrupt a randomly chosen fraction of the trials (10% or 20%) with strong Gaussian noise of standard deviation 0.1, i.e. one order of magnitude higher than in a regular trial. We used a regularization parameter of λ = 0.1. In these experiments, by CSC we refer to αCSC with α = 2, that resembles using only the M-step of our algorithm with deterministic weights wn,t = 1/2 for all n, t. We used a simpler setup where we set N = 100, T = 512, and L = 64. We used K = 2 atoms, as shown in dashed lines in Fig. 3. For αCSC, we set the number of outer iterations I = 5, the number of iterations of the M-step to M = 50, and the number of iterations of the MCMC algorithm to J = 10. We discard the first 5 samples of the MCMC algorithm as burn-in. To enable a fair comparison, we run the standard CSC algorithm for I × M iterations, i.e. the total number of M-step iterations in αCSC. We also compared αCSC against competing state-of-art methods previously applied to neural time series: Brockmeier and Príncipe [7] and MoTIF [6]. Starting from multiple random initializations, the estimated atoms with the smallest ℓ2 distance with the true atoms are shown in Fig. 3. In the artifact-free scenario, all algorithms perform equally well, except for MoTIF that suffers from the presence of activations with varying amplitudes. This is because it aligns the data using correlations before performing the eigenvalue decomposition, without taking into account the strength of activations in each trial. The performance of Brockmeier and Príncipe [7] and CSC degrades as 9.0 9.5 10.0 10.5 11.0 11.5 12.0 Time (s) 800 600 400 200 0 200 400 µ V (a) LFP spike data from [8] 0.0 0.1 0.2 0.3 Time (s) 0.1 0.0 (b) Estimated atoms Figure 4: Atoms learnt by αCSC on LFP data containing epileptiform spikes with α = 2. 7 0.0 0.2 0.4 0.6 Time (s) 0.10 0.05 0.00 0.05 0.10 0.15 0.0 0.2 0.4 0.6 Time (s) 0.0 0.2 0.4 0.6 Time (s) (a) Atoms learnt by: CSC (clean data), CSC (full data), αCSC (full data) 2.5 5.0 7.5 10.0 Low frequency 25 50 75 100 125 150 175 High frequency 0.000 0.001 0.002 0.003 0.004 0.005 (b) Comodulogram. Figure 5: (a) Three atoms learnt from a rodent striatal LFP channel, using CSC on cleaned data, and both CSC and αCSC on the full data. The atoms capture the cross-frequency coupling of the data (dashed rectangle). (b) Comodulogram presents the cross-frequency coupling intensity computed between pairs of frequency bands on the entire cleaned signal, following [37]. the level of corruption increases. On the other hand, αCSC is clearly more robust to the increasing level of corruption and recovers reasonable atoms even when 20% of the trials are corrupted. Results on LFP data In our last set of experiments, we consider real neural data from two different datasets. We first applied αCSC on an LFP dataset previously used in [8] and containing epileptiform spikes as shown in Fig. 4(a). The data was recorded in the rat cortex, and is free of artifact. Therefore, we used the standard CSC with our optimization scheme, (i.e. αCSC with α = 2). As a standard preprocessing procedure, we applied a high-pass filter at 1 Hz in order to remove drifts in the signal, and then applied a tapered cosine window to down-weight the samples near the edges. We set λ = 6, N = 300, T = 2500, L = 350, and K = 3. The recovered atoms by our algorithm are shown in Fig. 4(b). We can observe that the estimated atoms resemble the spikes in Fig. 4(a). These results show that, without using any heuristics, our approach can recover similar atoms to the ones reported in [8], even though it does not make any assumptions on the shapes of the waveforms, or initializes the atoms with template spikes in order to ease the optimization. The second dataset is an LFP channel in a rodent striatum from [35]. We segmented the data into 70 trials of length 2500 samples, windowed each trial with a tapered cosine function, and detrended the data with a high-pass filter at 1 Hz. We set λ = 10, initialized the weights wn to the inverse of the variance of the trial xn. Atoms are in all experiments initialized with Gaussian white noise. As opposed to the first LFP dataset, this dataset contains strong artifacts, as shown in Fig. 1(b). In order to be able to illustrate the potential of CSC on this data, we first manually identified and removed the trials that were corrupted by artifacts. In Fig. 5(a), we illustrate the estimated atoms with CSC on the manually-cleaned data. We observe that the estimated atoms correspond to canonical waveforms found in the signal. In particular, the high frequency oscillations around 80 Hz are modulated in amplitude by the low-frequency oscillation around 3 Hz, a phenomenon known as cross-frequency coupling (CFC) [36]. We can observe this by computing a comodulogram [37] on the entire signal (Fig. 5(b)). This measures the correlation between the amplitude of the high frequency band and the phase of the low frequency band. Even though CSC is able to provide these excellent results on the cleaned data set, its performance heavily relies on the manual removal of the artifacts. Finally, we repeated the previous experiment on the full data, without removing the artifacts and compared CSC with αCSC, where we set α = 1.2. The results are shown in the middle and the right sub-figures of Fig. 5(a). It can be observed that in the presence of strong artifacts, CSC is not able to recover the atoms anymore. On the contrary, we observe that αCSC can still recover atoms as observed in the artifact-free regime. In particular, the cross-frequency coupling phenomenon is still visible. 5 Conclusion We address the present need in the neuroscience community to better capture the complex morphology of brain waves. Our approach is based on a probabilistic formulation of a CSC model. We propose an inference strategy based on MCEM to deal efficiently with heavy tailed noise and take into account the polarity of neural activations with a positivity constraint. Our problem formulation allows the use of fast quasi-Newton methods that outperform previously proposed state-of-the-art ADMM-based algorithms, even when not making use of our parallel implementation. Results on LFP data demonstrate that such algorithms can be robust to the presence of transient artifacts in data and reveal insights on neural time-series without supervision. 8 6 Acknowledgement The work was supported by the French National Research Agency grants ANR-14-NEUC-0002-01, ANR-13-CORD-0008-02, and ANR-16-CE23-0014 (FBIMATRIX), as well as the ERC Starting Grant SLAB ERC-YStG-676943. References [1] S. R. Cole and B. Voytek. Brain oscillations and the importance of waveform shape. Trends Cogn. Sci., 2017. [2] M. X. Cohen. Analyzing neural time series data: Theory and practice. MIT Press, 2014. ISBN 9780262319560. [3] S. R. Jones. When brain rhythms aren’t ‘rhythmic’: implication for their mechanisms and meaning. Curr. Opin. Neurobiol., 40:72–80, 2016. [4] A. Mazaheri and O. Jensen. Asymmetric amplitude modulations of brain oscillations generate slow evoked responses. The Journal of Neuroscience, 28(31):7781–7787, 2008. [5] R. Hari and A. Puce. MEG-EEG Primer. Oxford University Press, 2017. [6] P. Jost, P. Vandergheynst, S. Lesage, and R. Gribonval. MoTIF: an efficient algorithm for learning translation invariant dictionaries. In Acoustics, Speech and Signal Processing, ICASSP, volume 5. IEEE, 2006. [7] A. J. Brockmeier and J. C. Príncipe. Learning recurrent waveforms within EEGs. IEEE Transactions on Biomedical Engineering, 63(1):43–54, 2016. [8] S. Hitziger, M. Clerc, S. Saillet, C. Benar, and T. Papadopoulo. Adaptive Waveform Learning: A Framework for Modeling Variability in Neurophysiological Signals. IEEE Transactions on Signal Processing, 2017. [9] B. Gips, A. Bahramisharif, E. Lowet, M. Roberts, P. de Weerd, O. Jensen, and J. van der Eerden. Discovering recurring patterns in electrophysiological recordings. J. Neurosci. Methods, 275: 66–79, 2017. [10] R. Grosse, R. Raina, H. Kwong, and A. Y. Ng. Shift-invariant sparse coding for audio classification. In 23rd Conference on Uncertainty in Artificial Intelligence, UAI’07, pages 149–158. AUAI Press, 2007. ISBN 0-9749039-3-0. [11] F. Heide, W. Heidrich, and G. Wetzstein. Fast and flexible convolutional sparse coding. In Computer Vision and Pattern Recognition (CVPR), pages 5135–5143. IEEE, 2015. [12] B. Wohlberg. Efficient algorithms for convolutional sparse representations. Image Processing, IEEE Transactions on, 25(1):301–315, 2016. [13] M. D. Zeiler, D. Krishnan, G.W. Taylor, and R. Fergus. Deconvolutional networks. In Computer Vision and Pattern Recognition (CVPR), pages 2528–2535. IEEE, 2010. [14] M. Šorel and F. Šroubek. Fast convolutional sparse coding using matrix inversion lemma. Digital Signal Processing, 2016. [15] K. Kavukcuoglu, P. Sermanet, Y-L. Boureau, K. Gregor, M. Mathieu, and Y. Cun. Learning convolutional feature hierarchies for visual recognition. In Advances in Neural Information Processing Systems (NIPS), pages 1090–1098, 2010. [16] M. Pachitariu, A. M Packer, N. Pettit, H. Dalgleish, M. Hausser, and M. Sahani. Extracting regions of interest from biological images with convolutional sparse block coding. In Advances in Neural Information Processing Systems (NIPS), pages 1745–1753, 2013. [17] B. Mailhé, S. Lesage, R. Gribonval, F. Bimbot, and P. Vandergheynst. Shift-invariant dictionary learning for sparse representations: extending K-SVD. In 16th Eur. Signal Process. Conf., pages 1–5. IEEE, 2008. 9 [18] Q. Barthélemy, C. Gouy-Pailler, Y. Isaac, A. Souloumiac, A. Larue, and J. I. Mars. Multivariate temporal dictionary learning for EEG. J. Neurosci. Methods, 215(1):19–28, 2013. [19] G. Samorodnitsky and M. S. Taqqu. Stable non-Gaussian random processes: stochastic models with infinite variance, volume 1. CRC press, 1994. [20] E. E. Kuruoglu. Signal processing in α-stable noise environments: a least Lp-norm approach. PhD thesis, University of Cambridge, 1999. [21] B. B. Mandelbrot. Fractals and scaling in finance: Discontinuity, concentration, risk. Selecta volume E. Springer Science & Business Media, 2013. [22] U. ¸Sim¸sekli, A. Liutkus, and A. T. Cemgil. Alpha-stable matrix factorization. IEEE SPL, 22 (12):2289–2293, 2015. [23] Y. Wang, Y. Qi, Y. Wang, Z. Lei, X. Zheng, and G. Pan. Delving into α-stable distribution in noise suppression for seizure detection from scalp EEG. J. Neural. Eng., 13(5):056009, 2016. [24] S. Leglaive, U. ¸Sim¸sekli, A. Liutkus, R. Badeau, and G. Richard. Alpha-stable multichannel audio source separation. In ICASSP, pages 576–580, 2017. [25] J. M. Chambers, C. L. Mallows, and B. W. Stuck. A method for simulating stable random variables. Journal of the american statistical association, 71(354):340–344, 1976. [26] P. J. Huber. Robust Statistics. Wiley, 1981. [27] S. Godsill and E. Kuruoglu. Bayesian inference for time series with heavy-tailed symmetric α-stable noise processes. Proc. Applications of heavy tailed distributions in economics, eng. and stat., 1999. [28] S. Chib and E. Greenberg. Understanding the Metropolis-Hastings algorithm. The American Statistician, 49(4):327–335, 1995. [29] J.S. Liu. Monte Carlo strategies in scientific computing. Springer, 2008. [30] R. H. Byrd, P. Lu, J. Nocedal, and C. Zhu. A limited memory algorithm for bound constrained optimization. SIAM Journal on Scientific Computing, 16(5):1190–1208, 1995. [31] E. Moulines, P. Duhamel, J-F. Cardoso, and S. Mayrargue. Subspace methods for the blind identification of multichannel FIR filters. IEEE Transactions on signal processing, 43(2): 516–525, 1995. [32] A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM journal on imaging sciences, 2(1):183–202, 2009. [33] Alekh Agarwal, Animashree Anandkumar, Prateek Jain, Praneeth Netrapalli, and Rashish Tandon. Learning sparsely used overcomplete dictionaries. In Conference on Learning Theory, pages 123–137, 2014. [34] Jochen Gorski, Frank Pfeuffer, and Kathrin Klamroth. Biconvex sets and optimization with biconvex functions: a survey and extensions. Mathematical Methods of Operations Research, 66(3):373–407, 2007. [35] G. Dallérac, M. Graupner, J. Knippenberg, R. C. R. Martinez, T. F. Tavares, L. Tallot, N. El Massioui, A. Verschueren, S. Höhn, J.B. Bertolus, et al. Updating temporal expectancy of an aversive event engages striatal plasticity under amygdala control. Nature Communications, 8: 13920, 2017. [36] O. Jensen and L. L. Colgin. Cross-frequency coupling between neuronal oscillations. Trends in cognitive sciences, 11(7):267–269, 2007. [37] A. BL. Tort, R. Komorowski, H. Eichenbaum, and N. Kopell. Measuring phase-amplitude coupling between neuronal oscillations of different frequencies. J. Neurophysiol., 104(2): 1195–1210, 2010. 10 | 2017 | 290 |
6,775 | Modulating early visual processing by language Harm de Vries∗ University of Montreal mail@harmdevries.com Florian Strub∗ Univ. Lille, CNRS, Centrale Lille, Inria, UMR 9189 CRIStAL florian.strub@inria.fr Jérémie Mary† Univ. Lille, CNRS, Centrale Lille, Inria, UMR 9189 CRIStAL jeremie.mary@univ-lille3.fr Hugo Larochelle Google Brain hugolarochelle@google.com Olivier Pietquin DeepMind pietquin@google.com Aaron Courville University of Montreal aaron.courville@gmail.com Abstract It is commonly assumed that language refers to high-level visual concepts while leaving low-level visual processing unaffected. This view dominates the current literature in computational models for language-vision tasks, where visual and linguistic inputs are mostly processed independently before being fused into a single representation. In this paper, we deviate from this classic pipeline and propose to modulate the entire visual processing by a linguistic input. Specifically, we introduce Conditional Batch Normalization (CBN) as an efficient mechanism to modulate convolutional feature maps by a linguistic embedding. We apply CBN to a pre-trained Residual Network (ResNet), leading to the MODulatEd ResNet (MODERN) architecture, and show that this significantly improves strong baselines on two visual question answering tasks. Our ablation study confirms that modulating from the early stages of the visual processing is beneficial. 1 Introduction Human beings combine the processing of language and vision with apparent ease. For example, we can use natural language to describe perceived objects and we are able to imagine a visual scene from a given textual description. Developing intelligent machines with such impressive capabilities remains a long-standing research challenge with many practical applications. Towards this grand goal, we have witnessed an increased interest in tasks at the intersection of computer vision and natural language processing. In particular, image captioning [16], visual question answering (VQA)[1, 23] and visually grounded dialogue systems[5, 6] constitute a popular set of example tasks for which large-scale datasets are now available. Developing computational models for language-vision tasks is challenging, especially because of the open question underlying all these tasks: how to fuse/integrate visual and textual representations? To what extent should we process visual and linguistic input separately, and at which stage should we fuse them? And equally important, what fusion mechanism to use? In this paper, we restrict our attention to the domain of visual question answering which is a natural testbed for fusing language and vision. The VQA task concerns answering open-ended questions about images and has received significant attention from the research community [1, 9, 17, 23]. Current state-of-the-art systems often use the following computational pipeline [2, 17, 20] illustrated in Fig 1. They first extract high-level image features from an ImageNet pretrained convolutional network (e.g. the activations from a ResNet network [12]), and obtain a language embedding using a ∗The first two authors contributed equally †Now at Criteo Figure 1: An overview of the classic VQA pipeline (left) vs ours (right). While language and vision modalities are independently processed in the classic pipeline, we propose to directly modulate ResNet processing by language. recurrent neural network (RNN) over word-embeddings. These two high-level representations are then fused by concatenation [17], element-wise product [11, 13, 14, 17], Tucker decomposition [2] or compact bilinear pooling [9], and further processed for the downstream task at hand. Attention mechanisms [27] are often used to have questions attend to specific spatial locations of the extracted higher-level feature maps. There are two main reasons for why the recent literature has focused on processing each modality independently. First, using a pretrained convnet as feature extractor prevents overfitting; Despite a large training set of a few hundred thousand samples, backpropagating the error of the downstream task into the weights of all layers often leads to overfitting. Second, the approach aligns with the dominant view that language interacts with high-level visual concepts. Words, in this view, can be thought of as “pointers” to high-level conceptual representations. To the best of our knowledge, this work is the first to fuse modalities at the very early stages of the image processing. In parallel, the neuroscience community has been exploring to what extent the processing of language and vision is coupled [8]. More and more evidence accumulates that words set visual priors which alter how visual information is processed from the very beginning [3, 15, 24]. More precisely, it is observed that P1 signals, which are related to low-level visual features, are modulated while hearing specific words [3]. The language cue that people hear ahead of an image activates visual predictions and speed up the image recognition process. These findings suggest that independently processing visual and linguistic features might be suboptimal, and fusing them at the early stage may help the image processing. In this paper, we introduce a novel approach to have language modulate the entire visual processing of a pre-trained convnet. We propose to condition the batch normalization [21] parameters on linguistic input (e.g., a question in a VQA task). Our approach, called Conditional Batch Normalization (CBN), is inspired by recent work in style transfer [7]. The key benefit of CBN is that it scales linearly with the number of feature maps in a convnet, which impacts less than 1% of the parameters, greatly reducing the risk of over-fitting. We apply CBN to a pretrained Residual Network, leading to a novel architecture to which we refer as MODERN. We show significant improvements on two VQA datasets, VQAv1 [1] and GuessWhat?! [6], but stress that our approach is a general fusing mechanism that can be applied to other multi-modal tasks. To summarize, our contributions are three fold: • We propose conditional batch normalization to modulate the entire visual processing by language from the early processing stages, • We condition the batch normalization parameters of a pretrained ResNet on linguistic input, leading to a new network architecture: MODERN, • We demonstrate improvements on state-of-the-art models for two VQA tasks and show the contribution of this modulation on the early stages. 2 2 Background In this section we provide preliminaries on several components of our proposed VQA model. 2.1 Residual networks We briefly outline residual networks (ResNets) [12], one of the current top-performing convolutional networks that won the ILSVRC 2015 classification competition. In contrast to precursor convnets (e.g. VGG[22]) that constructs a new representation at each layer, ResNet iteratively refines a representation by adding residuals. This modification enables to train very deep convolutional networks without suffering as much from the vanishing gradient problem. More specifically, ResNets are built from residual blocks: F k+1 = ReLU(F k + R(F k)) (1) where F k denotes the outputted feature map. We will refer to Fi,c,w,h to denote the ith input sample of the cth feature map at location (w, h). The residual function R(F k) is composed of three convolutional layers (with a kernel size of 1, 3 and 1, respectively). See Fig. 2 in the original ResNet paper [12] for a detailed overview of a residual block. A group of blocks is stacked to form a stage of computation in which the representation dimensionality stays identical. The general ResNet architecture starts with a single convolutional layer followed by four stages of computation. The transition from one stage to another is achieved through a projection layer that halves the spatial dimensions and doubles the number of feature maps. There are several pretrained ResNets available, including ResNet-50, ResNet-101 and ResNet-152 that differ in the number of residual blocks per stage. 2.2 Batch Normalization The convolutional layers in ResNets make use of Batch Normalization (BN), a technique that was originally designed to accelarate the training of neural networks by reducing the internal co-variate shift [21]. Given a mini-batch B = {Fi,·,·,·}N i=1 of N examples, BN normalizes the feature maps at training time as follows: BN(Fi,c,h,w|γc, βc) = γc Fi,c,w,h −EB[F·,c,·,·] p VarB[F·,c,·,·] + ϵ + βc, (2) where ϵ is a constant damping factor for numerical stability, and γc and βc are trainable scalars introduced to keep the representational power of the original network. Note that for convolutional layers the mean and variance are computed over both the batch and spatial dimensions (such that each location in the feature map is normalized in the same way). After the BN module, the output is fed to a non-linear activation function. At inference time, the batch mean EB and variance VarB are replaced by the population mean µ and variance σ2, often estimated by an exponential moving average over batch mean and variance during training. 2.3 Language embeddings We briefly recap the most common way to obtain a language embedding from a natural language question. Formally, a question q = [wk]K k=1 is a sequence of length K with each token wk taken from a predefined vocabulary V . We transform each token into a dense word-embedding e(wk) by a learned look-up table. For task with limited linguistic corpora (like VQA), it is common to concatenate pretrained Glove[19] vectors to the word embeddings. The sequence of embeddings [e(wk)]K k=1 is then fed to a recurrent neural network (RNN), which produces a sequence of RNN state vectors [sk]K k=1 by repeatedly applying the transition function f: sk+1 = f(sk, e(wk)). (3) Popular transition functions, like a long-short term memory (LSTM) cell [10] and a Gated Recurrent Unit (GRU)[4], incorporate gating mechanisms to better handle long-term dependencies. In this work, we will use an LSTM cell as our transition function. Finally, we take the last hidden state sI as the embedding of the question, which we denote as eq throughout the rest of this paper. 3 Figure 2: An overview of the computation graph of batch normalization (left) and conditional batch normalization (right). Best viewed in color. 3 Modulated Residual Networks In this section we introduce conditional batch normalization, and show how we can use it to modulate a pretrained ResNet. The key idea is to predict the γ and β of the batch normalization from a language embedding. We first focus on a single convolutional layer with batch normalization module BN(Fi,c,h,w|γc, βc) for which pretrained scalars γc and βc are available. We would like to directly predict these affine scaling parameters from our language embedding eq. When starting the training procedure, these parameters must be close to the pretrained values to recover the original ResNet model as a poor initialization could significantly deteriorate performance. Unfortunately, it is difficult to initialize a network to output the pretrained γ and β. For these reasons, we propose to predict a change ∆βc and ∆γc on the frozen original scalars, for which it is straightforward to initialize a neural network to produce an output with zero-mean and small variance. We use a one-hidden-layer MLP to predict these deltas from the question embedding eq for all feature maps within the layer: ∆β = MLP(eq) ∆γ = MLP(eq) (4) So, given a feature map with C channels, these MLPs output a vector of size C. We then add these predictions to the β and γ parameters: ˆβc = βc + ∆βc ˆγc = γc + ∆γc (5) Finally, these updated ˆβ and ˆγ are used as parameters for the batch normalization: BN(Fi,c,h,w| ˆγc, ˆβc)). We stress that we freeze all ResNet parameters, including γ and β, during training. In Fig. 2, we visualize the difference between the computational flow of the original batch normalization and our proposed modification. As explained in section 2.1, a ResNet consists of four stages of computation, each subdivided in several residual blocks. In each block, we apply CBN to the three convolutional layers, as highlighted in Fig. 3. CBN is a computationally efficient and powerful method to modulate neural activations; It enables the linguistic embedding to manipulate entire feature maps by scaling them up or down, negating them, or shutting them off, etc. As there only two parameters per feature map, the total number of BN parameters comprise less than 1% of the total number of parameters of a pre-trained ResNet. This makes CBN a very scalable method compared to conditionally predicting the weight matrices (or a low-rank approximation to that). 4 Experimental setting We evaluate the proposed conditional batch normalization on two VQA tasks. In the next section, we outline these tasks and describe the neural architectures we use for our experiments. The source code for our experiments is available at https://github.com/GuessWhatGame. The hyperparameters are also provided in Appendix A. 4 Figure 3: An overview of the MODERN architecture conditioned on the language embedding. MODERN modulates the batch norm parameters in all residual blocks. 4.1 VQA The Visual Question Answering (VQA) task consists of open-ended questions about real images. Answering these questions requires an understanding of vision, language and commonsense knowledge. In this paper, we focus on VQAv1 dataset [1], which contains 614K questions on 204K images. Our baseline architecture first obtains a question embedding eq by an LSTM-network, as further detailed in section 2.3. For the image, we extract the feature maps F of the last layer of ResNet-50 (before the pooling layer). For input of size 224x224 these feature maps are of size 7x7, and we incorporate a spatial attention mechanism, conditioned on the question embedding eq, to pool over the spatial dimensions. Formally, given a feature maps Fi,·,·,· and question embedding eq, we obtain a visual embedding ev as follows: ξw,h = MLP([Fi,·,w,h; eq]) ; αw,h = exp(ξw,h) P w,h exp(ξw,h) ; ev = X w,h αw,hFi,·,w,h (6) where [Fi,·,w,h; eq] denotes concatenating the two vectors. We use an MLP with one hidden layer and ReLU activations whose parameters are shared along the spatial dimensions. The visual and question embedding are then fused by an element-wise product [1, 13, 14] as follows: fuse(eq, ev) = P T (tanh(U T eq)) ◦(tanh(V T ev)) + bP , (7) where ◦denotes an element-wise product, and P , U and V are trainable weight matrices and bP is a trainable bias. The linguistic and perceptual representations are first projected to a space of equal dimensionality, after which a tanh non-linearity is applied. A fused vector is then computed by an element-wise product between the two representations. From this joined embedding we finally predict an answer distribution by a linear layer followed by a softmax activation function. We will use the described architecture to study the impact CBN when using it in several stages of the ResNet. As our approach can be combined with any existing VQA architecture, we also apply MODERN to MRN [13, 14], a state-of-the-art network for VQA More specifically, this network replaces the classic attention mechanism with a more advanced one that included g glimpses over the image features: ξg w,h = P T αg(tanh(U ′T q) ◦tanh(V ′T F T i,·,w,h))) ; αg w,h = exp(ξg w,h) P w,h exp(ξg w,h) (8) ev = g X w,h αg w,hFi,·,w,h (9) where Pαg is a trainable weight matrix defined for each glimpse g, U ′ and V ′ are trainable weight matrices shared among the glimpses and ∥concatenate vectors over their last dimension. 5 Table 1: VQA accuracies trained with train set and evaluated on test-dev. Answer type Yes/No Number Other Overall 224x224 Baseline 79.45% 36.63% 44.62% 58.05% Ft Stage 4 78.37% 34.27% 43.72% 56.91% Ft BN 80.18% 35.98% 46.07% 58.98% MODERN 81.17% 37.79% 48.66% 60.82% 448x448 MRN [14] with ResNet-50 80.20% 37.73% 49.53% 60.84% MRN [14] with ResNet-152 80.95% 38.39% 50.59% 61.73% MUTAN+MLB [2] 82.29% 37.27% 48.23% 61.02% MCB + Attention [9] with ResNet-50 60.46% 38.29% 48.68% 60.46% MCB + Attention [9] with ResNet-152 62.50% MODERN 81.38% 36.06% 51.64% 62.16% MODERN + MRN [14] 82.17% 38.06% 52.29% 63.01% Table 2: Ablation study to investigate the impact of leaving out the lower stages of ResNet. (a) VQA, higher is better CBN applied to Val. accuracy ∅ 56.12% Stage 4 57.68% Stages 3 −4 58.29% Stages 2 −4 58.32% All 58.56% (b) GuessWhat?!, lower is better CBN applied to Test error ∅ 29.92% Stage 4 26.42% Stages 3 −4 25.24% Stages 2 −4 25.31% All 25.06% Noticeably, MODERN modulates the entire visual processing pipeline and therefore backpropagates through all convolutional layers. This requires much more GPU memory than using extracted features. To feasibly run such experiments on today’s hardware, we conduct all experiments in this paper with a ResNet-50. As for our training procedure, we select the 2k most-common answers from the training set, and use a cross-entropy loss over the distribution of provided answers. We train on the training set, do early-stopping on the validation set, and report the accuracies on the test-dev using the evaluation script provided by [1]. 4.2 GuessWhat?! GuessWhat?! is a cooperative two-player game in which both players see the image of a rich visual scene with several objects. One player – the Oracle – is randomly assigned an object in the scene. This object is not known by the other player – the questioner – whose goal it is to locate the hidden object by asking a series of yes-no questions which are answered by the Oracle [6]. The full dataset is composed of 822K binary question/answer pairs on 67K images. Interestingly, the GuessWhat?! game rules naturally leads to a rich variety of visually grounded questions. As opposed to the VQAv1 dataset, the dataset contains very few commonsense questions that can be answered without the image. In this paper, we focus on the Oracle task, which is a form of visual question answering in which the answers are limited to yes, no and not applicable. Specifically, the oracle may take as an input the incoming question q, the image I and the target object o∗. This object can be described with its category c, its spatial location and the object crop. We outline here the neural network architecture that was reported in the original GuessWhat?! paper [6]. First, we crop the initial image by using the target object bounding box object and rescale it to a 224 by 224 square. We then extract the activation of the last convolutional layer after the ReLU (stage4) of a pre-trained ResNet-50. We also embed the spatial information of the crop within the image by extracting an 8-dimensional vector of the location of the bounding box [xmin, ymin, xmax, ymax, xcenter, ycenter, wbox, hbox], (10) 6 Table 3: GuessWhat?! test errors for the Oracle model with different embeddings. Lower is better. Raw features ft stage4 Ft BN CBN Crop 29.92% 27.48% 27.94% 25.06% Crop + Spatial + Category 22.55% 22.68% 22.42% 19.52% Spatial + Category 21.5% where wbox and hbox denote the width and height of the bounding box, respectively. We convert the object category c into a dense category embedding using a learned look-up table. Finally, we use an LSTM to encode the current question q. We then concatenate all embeddings into a single vector and feed it as input to a single hidden layer MLP that outputs the final answer distribution using a softmax layer. 4.3 Baselines For both datasets we empirically investigate several modifications to the described architectures. We refer to MODERN when we apply conditional batch normalization to all layers of ResNet-50, as described in section 3. To verify that the gains from MODERN are not coming from increased model capacity, we include two baselines with more capacity. The first model finetunes the layers of stage 4 of ResNet-50 of our baseline model. This is common practice when we transfer a pretrained network to a new task, and we refer it to as Ft Stage 4. We also introduce a novel baseline Ft BN, which consist of finetuning all β and γ parameters of ResNet-50, while freezing all its weights. For VQA, we report the results of two state-of-the-art architectures, namely, Multimodal Compact Bilinear pooling network (MCB) [9] (Winner of the VQA challenge 2016) and MUTAN [2]. Both approaches employ an (approximate) bilinear pooling mechanism to fuse the language and vision embedding by respectively using a random projection and a tensor decomposition. In addition, we re-implement and run the MRN model described in Section 4.1. When benchmarking state-of-the-art models, we train on the training set, proceed early stopping on the validation set and report accuracy on the test set (test-dev in the case of VQA.) 4.4 Results VQA We report the best validation accuracy of the outlined methods on the VQA task in Table1. Note that we use input images of size 224x224 when we compare MODERN against the baselines (as well as for the ablation study presented in Table 2a. Our initial baseline achieves 58.05% accuracy, and we find that finetuning the last layers (Ft Stage 4) does not improve this performance (56.91%). Interestingly, just finetuning the batch norm parameters (Ft BN) significantly improves the accuracy to 58.98%. We see another significant performance jump when we condition the batch normalization on the question input (MODERN), which improves our baseline with almost 2 accuracy points to 60.82%. Because state-of-the-art models use images of size 448x448, we also include the results of the baseline architecture on these larger images. As seen in Table1, this nearly matches the state of the art results with a 62.15%. As MODERN does not rely on a specific attention mechanism, we then combine our proposed method with MRN [13, 14] architecture, and observe that outperforms the state-of-the-art MCB model [9] by half a point. Please note that we select MRN [13, 14] over MCB [9] as the latter requires fewer weight parameters and is more stable to train. Note that the presented results use a ResNet-50 while other models rely on extracted image embedding from a ResNet-152. For sake of comparison, we run the baseline models with extracted image embedding from a ResNet-50. Also for the more advanced MRN architecture, we observe performance gains of approximately 2 accuracy points. GuessWhat?! We report the best test errors for the outlined method on the Oracle task of GuessWhat?! in Table 3. We first compare the results when we only feed the crop of the selected object to the model. We observe the same trend as in VQA. With an error of 25.06%, CBN performs better than than either fine-tuning the final block (27.48% error) or the batch-norm parameters (27.94% 7 (a) Feature map projection from raw ResNet (b) Feature map projection from MODERN Figure 4: t-SNE projection of feature maps (before attention mechanism) of ResNet and MODERN. Points are colored according to the answer type of VQA. Whilst there are no clusters with raw features, MODERN successfully modulates the image feature towards specific answer types. error), which in turn improve over just using the raw features (29.92% error). Note that the relative improvement (5 error points) for CBN is much bigger for GuessWhat?! than for VQA. We therefore also investigate the performance of the methods when we include the spatial and category information. We observe that finetuning the last layers or BN parameters does not improve the performance, while MODERN improves the best reported test error with 2 points to 19.52% error. 4.5 Discussion By analyzing the results from both VQA and GuessWhat?! experiments, it is possible to have a better insight regarding MODERN capabilities. MODERN vs Fine tuning In both experiments, MODERN outperforms Ft BN. Both methods update the same ResNet parameters so this demonstrates that it is important to condition on the language representation. MODERN also outperforms Ft Stage 4 on both tasks which shows that the performance gain of MODERN is not due to the increased model capacity. Conditional embedding In the provided baselines of the Oracle task of GuessWhat?! [6], the authors observed that the best test error (21.5%) is obtained by only providing the object category and its spatial location. For this model, including the raw features of the object crop actually deteriorates the performance to 22.55% error. This means that this baseline fails to extract relevant information from the images which is not in the handcrafted features. Therefore the Oracle can not answer correctly questions which requires more than the use of spatial information and object category. In the baseline model, the embedding of the crop from a generic ResNet does not help even when we finetune stage 4 or BN. In contrast, applying MODERN helps to better answer questions as the test error drops by 2 points. Ablation study We investigate the impact of only modulating the top layers of a ResNet. We report these results in Table 2. Interestingly, we observe that the performance slowly decreases when we apply CBN exclusively to later stages. We stress that for best performance it’s important to modulate all stages, but if computational resources are limited we recommend to apply it to the two last stages. Visualizing the representations In order to gain more insight into our proposed fusion mechanism, we compare visualizations of the visual embeddings created by our baseline model and MODERN. We first randomly picked 1000 unique image/question pairs from the validation set of VQA. For the trained MODERN model, we extract image features just before the attention mechanism of MODERN, which we will compare with extracted raw ResNet-50 features and finetune ResNet-50 (Block4 and batchnorm parameters). We first decrease the dimensionality by average pooling over the spatial dimensions of the feature map, and subsequently apply t-SNE [25] to these set of embeddings. We color the points according to the answer type provided by the VQA dataset, and show these visualizations for both models in Fig 4 and Fig 7 in the Appendix B. Interestingly, we observe that all answer types are spread out for raw image features and finetuned features. In contrast, the representations of MODERN are cleanly grouped into three answer types. This demonstrates that MODERN successfully disentangles the images representations by answer type which is likely to 8 ease the later fusion process. While finetuning models does cluster features, there is no direct link between those clusters and the answer type. These results indicate that MODERN successfully learns representation that differs from classic finetuning strategies. In Appendix B, we visualize the feature disentangling process stage by stage. It is possible to spot some sub-clusters in the t-SNE representation, as in fact they correspond to image and question pairs which are similar but not explicitly tagged in the VQA dataset. For example, in appendix B the Fig. 6 we highlight pairs where the answer is a color. 5 Related work MODERN is related to a lot of recent work in VQA[1]. The majority of proposed methods use a similar computational pipeline introduced by [17, 20]. First, extract high-level image features from a ImageNet pretrained convnet, while independently processing the question using RNN. Some work has focused on the top level fusing mechanism of the language and visual vectors. For instance, it was shown that we can improve upon classic concatenation by an element-wise product [1, 13, 14], Tucker decomposition [2], bilinear pooling [9] or more exotic approaches [18]. Another line of research has investigated the role of attention mechanisms in VQA [26, 11, 28]. The authors of [11] propose a co-attention model over visual and language embeddings, while [28] proposes to stack several spatial attention mechanisms. Although an attention mechanism can be thought of as modulating the visual features by a language, we stress that such mechanism act on the high-level features. In contrast, our work modulates the visual processing from the very start. MODERN is inspired by conditional instance normalization (CIN) [7] that was successfully applied to image style transfer. While previous methods transfered one image style per network, [7] showed that up to 32 styles could be compressed into a single network by sharing the convolutional filters and learning style-specific normalization parameters. There are notable differences with our work. First, [7] uses a non-differentiable table lookup for the normalization parameters while we propose a differentiable mapping from the question embedding. Second, we predict a change on the normalization parameters of a pretrained convolutional network while keeping the convolutional filters fixed. In CIN, all parameters, including the transposed convolutional filters, are trained. To the best of our knowledge, this is the first paper to conditionally modulate the vision processing using the normalization parameters. 6 Conclusion In this paper, we introduce Conditional Batch Normalization (CBN) as a novel fusion mechanism to modulate all layers of a visual processing network. Specifically, we applied CBN to a pre-trained ResNet, leading to the proposed MODERN architecture. Our approach is motivated by recent evidence from neuroscience suggesting that language influences the early stages of visual processing. One of the strengths of MODERN is that it can be incorporated into existing architectures, and our experiments demonstrate that this significantly improves the baseline models. We also found that it is important to modulate the entire visual signal to obtain maximum performance gains. While this paper focuses on text and images, MODERN can be extended to neural architecture dealing with other modalities such as sound or video. More broadly, CBN can could also be applied to modulate the internal representation of any deep network with respect to any embedding regardless of the underlying task. For instance, signal modulation through batch norm parameters may also be beneficial for reinforcement learning, natural language processing or adversarial training tasks. Acknowledgements The authors would like to acknowledge the stimulating research environment of the SequeL lab. We thank Vincent Dumoulin for helpful discussions about conditional batch normalization. We acknowledge the following agencies for research funding and computing support: CHISTERA IGLU and CPER Nord-Pas de Calais/FEDER DATA Advanced data science and technologies 2015-2020, NSERC, Calcul Québec, Compute Canada, the Canada Research Chairs and CIFAR. We thank NVIDIA for providing access to a DGX-1 machine used in this work. 9 References [1] S. Antol, A. Agrawal, J. Lu, M. Mitchell, D. Batra, Z. Lawrence, and D. Parikh. Vqa: Visual question answering. In Proc. of ICCV, 2015. [2] H. Ben-Younes, R. Cadène, N. Thome, and M. Cord. MUTAN: Multimodal Tucker Fusion for Visual Question Answering. arXiv preprint arXiv:1705.06676, 2017. [3] B. Boutonnet and G. Lupyan. Words jump-start vision: A label advantage in object recognition. Journal of Neuroscience, 35(25):9329–9335, 2015. [4] K. Cho, B. Van Merriënboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In Proc. of EMNLP, 2014. [5] A. Das, S. Kottur, K. Gupta, A. Singh, D. Yadav, J. Moura, D. Parikh, and D. Batra. Visual Dialog. In Proc. of CVPR, 2017. [6] H. de Vries, F. Strub, S. Chandar, O. Pietquin, H. Larochelle, and A. Courville. GuessWhat?! Visual object discovery through multi-modal dialogue. In Proc. of CVPR, 2017. [7] V. Dumoulin, J. Shlens, and M. Kudlur. A Learned Representation For Artistic Style. In Proc. of ICLR, 2017. [8] F. Ferreira and M. Tanenhaus. Introduction to the special issue on language–vision interactions. Journal of Memory and Language, 57(4):455–459, 2007. [9] A. Fukui, D. Huk Park, D. Yang, A. Rohrbach, T. Darrell, and M. Rohrbach. Multimodal Compact Bilinear Pooling for Visual Question Answering and Visual Grounding. In Proc. of EMNLP, 2016. [10] S. Hochreiter and J. Schmidhuber. Long short-term memory. In Neural computation, volume 9, pages 1735–1780. MIT Press, 1997. [11] J. Jiasen, J. Yang, D. Batra, and D. Parikh. Hierarchical question-image co-attention for visual question answering. In Proc. of NIPS, 2016. [12] K. Kaiming, Z. Xiangyu, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proc. of CVPR, 2016. [13] J. Kim, S. Lee, D. Kwak, M. Heo, J. Kim, J. Ha, and B. Zhang. Multimodal residual learning for visual qa. In Proc. of NIPS, 2016. [14] J. Kim, K. On, J. Kim, J. Ha, and B. Zhang. Hadamard product for low-rank bilinear pooling. In Proc. of ICLR, 2017. [15] P. Kok, M. Failing, and F. de Lange. Prior expectations evoke stimulus templates in the primary visual cortex. Journal of Cognitive Neuroscience, 26(7):1546–1554, 2014. [16] T. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollár, and L. Zitnick. Microsoft coco: Common objects in context. In Proc of ECCV, 2014. [17] M. Malinowski, M. Rohrbach, and M. Fritz. Ask your neurons: A neural-based approach to answering questions about images. In Proc. of ICCV, 2015. [18] M. Malinowski, M. Rohrbach, and M. Fritz. Ask your neurons: A deep learning approach to visual question answering. arXiv preprint arXiv:1605.02697, 2016. [19] J. Pennington, R. Socher, and C. Manning. Glove: Global Vectors for Word Representation. In Proc. of EMNLP, 2014. [20] M. Ren, R. Kiros, and R. Zemel. Exploring models and data for image question answering. In Proc. of NIPS, 2015. [21] I. Sergey and S. Christian. Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift. In Proc. of ICML, 2015. 10 [22] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. 2015. [23] G. Yashand K. Tejas, S. Douglas, Dhruv B, and P. Devi. Making the V in VQA matter: Elevating the role of image understanding in Visual Question Answering. In Proc. of CVPR, 2017. [24] G. Thierry, P. Athanasopoulos, A. Wiggett, B. Dering, and JR. Kuipers. Unconscious effects of language-specific terminology on preattentive color perception. PNAS, 106(11):4567–4570, 2009. [25] L. Maaten van G. der and Hinton. Visualizing data using t-sne. JMLR, 9(Nov):2579–2605, 2008. [26] H. Xu and K. Saenko. Ask, attend and answer: Exploring question-guided spatial attention for visual question answering. In Proc. of ECCV, 2015. [27] K. Xu, J. Ba, R. Kiros, K. Cho, A. Courville, R. Salakhutdinov, R. Zemel, and Y. Bengio. Show, attend and tell: Neural image caption generation with visual attention. In Proc. of ICML, 2015. [28] Z. Yang, X. He, J. Gao, and L. Deng A. Smola. Stacked attention networks for image question answering. In Proc. of CVPR, 2016. 11 | 2017 | 291 |
6,776 | Discriminative State-Space Models Vitaly Kuznetsov Google Research New York, NY 10011, USA vitaly@cims.nyu.edu Mehryar Mohri Courant Institute and Google Research New York, NY 10011, USA mohri@cims.nyu.edu Abstract We introduce and analyze Discriminative State-Space Models for forecasting nonstationary time series. We provide data-dependent generalization guarantees for learning these models based on the recently introduced notion of discrepancy. We provide an in-depth analysis of the complexity of such models. We also study the generalization guarantees for several structural risk minimization approaches to this problem and provide an efficient implementation for one of them which is based on a convex objective. 1 Introduction Time series data is ubiquitous in many domains including such diverse areas as finance, economics, climate science, healthcare, transportation and online advertisement. The field of time series analysis consists of many different problems, ranging from analysis to classification, anomaly detection, and forecasting. In this work, we focus on the problem of forecasting, which is probably one of the most challenging and important problems in the field. Traditionally, time series analysis and time series prediction, in particular, have been approached from the perspective of generative modeling: particular generative parametric model is postulated that is assumed to generate the observations and these observations are then used to estimate unknown parameters of the model. Autoregressive models are among the most commonly used types of generative models for time series [Engle, 1982, Bollerslev, 1986, Brockwell and Davis, 1986, Box and Jenkins, 1990, Hamilton, 1994]. These models typically assume that the stochastic process that generates the data is stationary up to some known transformation, such as differencing or composition with natural logarithms. In many modern real world applications, the stationarity assumption does not hold, which has led to the development of more flexible generative models that can account for non-stationarity in the underlying stochastic process. State-Space Models [Durbin and Koopman, 2012, Commandeur and Koopman, 2007, Kalman, 1960] provide a flexible framework that captures many of such generative models as special cases, including autoregressive models, hidden Markov models, Gaussian linear dynamical systems and many other models. This framework typically assumes that the time series Y is a noisy observation of some dynamical system S that is hidden from the practitioner: Yt = h(St) + ✏t, St = g(St−1) + ⌘t for all t. (1) In (1), h, g are some unknown functions estimated from data, {✏t}, {⌘t} are sequences of random variables and {St} is an unobserved sequence of states of a hidden dynamical system.1 While this class of models provides a powerful and flexible framework for time series analysis, the theoretical learning properties of these models is not sufficiently well understood. The statistical guarantees available in the literature rely on strong assumptions about the noise terms (e.g. {✏t} and {⌘t} are Gaussian white noise). Furthermore, these results are typically asymptotic and require the model 1A more general formulation is given in terms of distribution of Yt: ph(Yt|St)pg(St|St−1). 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. to be correctly specified. This last requirement places a significant burden on a practitioner since the choice of the hidden state-space is often a challenging problem and typically requires extensive domain knowledge. In this work, we introduce and study Discriminative State-Space Models (DSSMs). We provide the precise mathematical definition of this class of models in Section 2. Roughly speaking, a DSSM follows the same general structure as in (1) and consists of a state predictor g and an observation predictor h. However, no assumption is made about the form of the stochastic process used to generate observations. This family of models includes existing generative models and other statebased discriminative models (e.g. RNNs) as special cases, but also consists of some novel algorithmic solutions explored in this paper. The material we present is organized as follows. In Section 3, we generalize the notion of discrepancy, recently introduced by Kuznetsov and Mohri [2015] to derive learning guarantees for DSSMs. We show that our results can be viewed as a generalization of those of these authors. Our notion of discrepancy is finer, taking into account the structure of state-space representations, and leads to tighter learning guarantees. Additionally, our results provide the first high-probability generalization guarantees for state-space models with possibly incorrectly specified models. Structural Risk Minimization (SRM) for DSSMs is analyzed in Section 4. As mentioned above, the choice of the state-space representation is a challenging problem since it requires carefully balancing the accuracy of the model on the training sample with the complexity of DSSM to avoid overfitting. We show that it is possible to adaptively learn a state-space representation in a principled manner using the SRM technique. This requires analyzing the complexity of several families of DSSMs of interest in Appendix B. In Section 5, we use our theory to design an efficient implementation of our SRM technique. Remarkably, the resulting optimization problem turns out to be convex. This should be contrasted with traditional SSMs that are often derived via Maximum Likelihood Estimation (MLE) with a non-convex objective. We conclude with some promising preliminary experimental results in Appendix D. 2 Preliminaries In this section, we introduce the general scenario of time series prediction as well as the broad family of DSSMs considered in this paper. We study the problem of time series forecasting in which the learner observes a realization (X1, Y1), . . . , (XT , YT ) of some stochastic process, with (Xt, Yt) 2 Z = X ⇥Y. We assume that the learner has access to a family of observation predictors H = {h: X ⇥S ! Y} and state predictors G = {g: X ⇥S ! S}, where S is some pre-defined space. We refer to any pair f = (h, g) 2 H ⇥G = F as a DSSM, which is used to make predictions as follows: yt = h(Xt, st), st = g(Xt, st−1) for all t. (2) Observe that this formulation includes the hypothesis sets used in (1) as special cases. In our setting, h and g both accept an additional argument x 2 X. In practice, if Xt = (Yt−1, . . . , Yt−p) 2 X = Yp for some p, then Xt represents some recent history of the stochastic process that is used to make a prediction of Yt. More generally, X may also contain some additional side information. Elements of the output space Y may further be multi-dimensional, which covers both multi-variate time series forecasting and multi-step forecasting. The performance of the learner is measured using a bounded loss function L: H ⇥S ⇥Z ! [0, M], for some upper bound M ≥0. A commonly used loss function is the squared loss: L(h, s, z) = (h(x, s) −y)2. The objective of the learner is to use the observed realization of the stochastic process up to time T to determine a DSSM f = (h, g) 2 F that has the smallest expected loss at time T + 1, conditioned on the given realization of the stochastic process:2 LT +1(f|ZT 1 ) = E[L(h, sT +1, ZT +1)|ZT 1 ], (3) 2An alternative performance metric commonly considered in the time series literature is the averaged generalization error LT +1(f) = E[L(f, sT +1, ZT +1)]. The path-dependent generalization error that we consider in this work is a finer measure of performance since it only takes into consideration the realized history of the stochastic process, as opposed to an average trajectory. 2 where st for all t is specified by g via the recursive computation in (2). We will use the notation ar s to denote (as, as+1, . . . ar). In the rest of this section, we will introduce the tools needed for the analysis of this problem. The key technical tool that we require is the notion of state-space discrepancy: disc(s) = sup h2H ✓ E[L(h, sT +1, ZT +1)|ZT 1 ] −1 T T X t=1 E[L(h, st, Zt)|Zt−1 1 ] ◆ , (4) where, for simplicity, we used the shorthand s = sT +1 1 . This definition is a strict generalization of the q-weighted discrepancy of Kuznetsov and Mohri [2015]. In particular, redefining L(h, s, z) = seL(h, z) and setting st = Tqt for 1 t T and sT +1 = 1 recovers the definition of q-weighted discrepancy. The discrepancy disc defines an integral probability pseudo-metric on the space of probability distributions that serves as a measure of the non-stationarity of the stochastic process Z with respect to both the loss function L and the hypothesis set H, conditioned on the given state sequence s. For example, if the process Z is i.i.d., then we simply have disc(s) = 0 provided that s is a constant sequence. See [Cortes et al., 2017, Kuznetsov and Mohri, 2014, 2017, 2016, Zimin and Lampert, 2017] for further examples and bounds on discrepancy in terms of other divergences. However, the most important property of the discrepancy disc(s) is that, as shown in Appendix C, under some additional mild assumptions, it can be estimated from data. The learning guarantees that we present are given in terms of data-dependent measures of sequential complexity, such as expected sequential covering number [Rakhlin et al., 2010], that are modified to account for the state-space structure in the hypothesis set. The following definition of a complete binary tree is used throughout this paper: a Z-valued complete binary tree z is a sequence (z1, . . . , zT ) of T mappings zt : {±1}t−1 ! Z, t 2 [1, T]. A path in the tree is σ = (σ1, . . . , σT −1) 2 {±1}T −1. We write zt(σ) instead of zt(σ1, . . . , σt−1) to simplify the notation. Let R = R0 ⇥G be any function class where G is a family of state predictors and R0 = {r: Z ⇥S ! R}. A set V of R-valued trees of depth T is a sequential ↵-cover (with respect to `p norm) of R on a tree z of depth T if for all (r, g) 2 R and all σ 2 {±1}T , there is v 2 V such that " 1 T T X t=1 &&vt(σ) −r(zt(σ), st) &&p # 1 p ↵, where st = g(zt(σ), st−1). The (sequential) covering number Np(↵, R, z) on a given tree z is defined to be the size of the minimal sequential cover. We call Np(↵, R) = supz Np(↵, R, z) the maximal covering number. See Figure 1 for an example. We define the expected covering number to be Ez⇠T (p)[Np(↵, R, z)], where T(p) denotes the distribution of z implicitly defined via the following sampling procedure. Given a stochastic process distributed according to the distribution p with pt(·|zt−1 1 ) denoting the conditional distribution at time t, sample Z1, Z0 1 from p1 independently. In the left child of the root sample Z2, Z0 2 according to p2(·|Z1) and in the right child according to p2(·|Z0 2) all independent from each other. For a node that can be reached by a path (σ1, . . . , σt), we draw Zt, Z0 t according to pt(·|S1(σ1), . . . , St−1(σt−1)), where St(1) = Zt and St(−1) = Z0 t. Expected sequential covering numbers are a finer measure of complexity since they directly take into account the distribution of the underlying stochastic process. For further details on sequential complexity measures, we refer the reader to [Littlestone, 1987, Rakhlin et al., 2010, 2011, 2015a,b]. 3 Theory In this section, we present our generalization bounds for learning with DSSMs. For our first result, we assume that the sequence of states s (or equivalently state predictor g) is fixed and we are only learning the observation predictor h. Theorem 1. Fix s 2 ST +1. For any δ > 0, with probability at least 1 −δ, for all h 2 H and all ↵> 0, the following inequality holds: L(f|ZT 1 ) 1 T T X t=1 L(h, Xt, st) + disc(s) + 2↵+ M s 2 log Ev⇠T (P)[N1(↵,Rs,v)] δ T , 3 where Rs = {(z, s) 7! L(h, s, z): h 2 H} ⇥{s}. The proof of Theorem 1 (as well as the proofs of all other results in this paper) is given in Appendix A. Note that this result is a generalization of the learning guarantees of Kuznetsov and Mohri [2015]. Indeed, setting s = (Tq1, . . . , TqT , 1) for some weight vector q and L(h, s, z) = seL(h, z) recovers Corollary 2 of Kuznetsov and Mohri [2015]. Zimin and Lampert [2017] show that, under some additional assumptions on the underlying stochastic process (e.g. Markov processes, uniform martingales), it is possible to choose these weights to guarantee that the discrepancy disc(s) is small. Alternatively, Kuznetsov and Mohri [2015] show that if the distribution of the stochastic process at times T + 1 and [T −s, T] is sufficiently close (in terms of discrepancy) then disc(s) can be estimated from data. In Theorem 5 in Appendix C, we show that this property holds for arbitrary state sequences s. Therefore, one can use the bound of Theorem 1 that can be computed from data to search for the predictor h 2 H that minimizes this quantity. The quality of the result will depend on the given state-space sequence s. Our next result shows that it is possible to learn h 2 H and s generated by some state predictor g 2 G jointly. Theorem 2. For any δ > 0, with probability at least 1 −δ, for all f = (h, g) 2 H ⇥G and all ↵> 0, the following inequality holds: L(f|ZT 1 ) 1 T T X t=1 L(h, Xt, st) + disc(s) + 2↵+ M s 2 log Ev⇠T (P)[N1(↵,R,v)] δ T , where st = g(Xt, st−1) for all t and R = {(z, s) 7! L(h, s, z): h 2 H} ⇥G. The cost of this significantly more general result is a slightly larger complexity term N1(↵, R, v) ≥ N1(↵, Rs, v). This bound is also much tighter than the one that can be obtained by applying the result of Kuznetsov and Mohri [2015] directly to F = H ⇥G, which would lead to the same bound as in Theorem 2 but with disc(s) replaced by supg2G disc(s). Not only supg2G disc(s) is an upper bound on disc(s), but it is possible to construct examples that lead to learning bounds that are too loose. Consider the stochastic process generated as follows. Let X be uniformly distributed on {±1}. Suppose Y1 = 1 and Yt = −Yt−1 for all t > 1 if X = −1 and Yt = Yt−1 for all t > 1 otherwise. In other words, Y is either periodic or a constant state sequence. If L is the squared loss, for G = {g1, g2} with g1(s) = s and g2(s) = −s and H = {h} with h(s) = s, for odd T, supg2G disc(s) ≥1/2. On the other hand, the bound in terms of disc(s) is much finer and helps us select g such that disc(s) = 0 for that g. This example shows that even for simple deterministic dynamics our learning bounds are finer than existing ones. Since the guarantees of Theorem 2 are data-dependent and hold uniformly over F, they allow us to seek a solution f 2 F that would directly optimize this bound and that could be computed from the given sample. As our earlier example shows, the choice of the family of state predictors G is crucial to achieve good guarantees. For instance, if G = {g1} then it may be impossible to have a non-trivial bound. In other words, if the family of state predictors is not rich enough, then, it may not be possible to handle the non-stationarity of the data. On the other hand, if G is chosen to be too large, then, the complexity term may be too large. In Section 4, we present an SRM technique that enables us to learn the state-space representation and adapt to non-stationarity in a principled way. 4 Structural Risk Minimization Suppose we are given a sequence of families of observation predictors H1 ⇢H2 ⇢· · · Hn . . . and a sequence of families of state predictors G1 ⇢G2 · · · Gn . . . Let Rk = {(s, z) 7! L(h, s, z): h 2 Hk} ⇥Gk and R = [1 k=1Rk. Consider the following objective function: F(h, g, k) = 1 T T X t=1 L(h, st, Zt) + ∆(s) + Bk + M r log k T , (5) where ∆(s) is any upper bound on disc(s) and Bk is any upper bound on M r 2 log Ev⇠T (P)[N1(↵,Rk,v)] δ T . We are presenting an estimatable upper bound on disc(s) in Appendix C, which provides one 4 particular choice for ∆(s). In Appendix B, we also prove upper bounds on the expected sequential covering numbers for several families of hypothesis. Then, we define the SRM solution as follows: (eh, eg, ek) = argminh,g2Hk⇥Gk,k≥1 F(h, g, k). (6) We also define f ⇤by f ⇤= (h⇤, g⇤) 2 argminf2F LT +1(f|ZT 1 ). Then, the following result holds. Theorem 3. For any δ > 0, with probability at least 1 −δ, for all ↵> 0, the following bound holds: LT +1(eh, eg|ZT 1 ) LT +1(f ⇤|ZT 1 ) + 2∆(s⇤) + 2↵+ 2Bk(f ⇤) + M r log k(f ⇤) T + 2M s log 2 δ T , where s⇤ t = g⇤(Xt, s⇤ t−1), and where k(f ⇤) is the smallest integer k such that f ⇤2 Hk ⇥Gk. Theorem 3 provides a learning guarantee for the solution of SRM problem (5). This result guarantees for the SRM solution a performance close to that of the best-in-class model f ⇤modulo a penalty term that includes the discrepancy (of the best-in-class state predictor), similar to the guarantees of Section 3. This guarantee can be viewed as a worst case bound when we are unsure if the state-space predictor captures the non-stationarity of the problem correctly. However, in most cases, by introducing a state-space representation, we hope that it will help us model (at least to some degree) the non-stationarity of the underlying stochastic process. In what follows, we present a more optimistic best-case analysis which shows that, under some additional mild assumptions on the complexity of the hypothesis space with respect to stochastic process, we can simultaneously simplify the SRM optimization and give tighter learning guarantees for this modified version. Assumption 1 (Stability of state trajectories). Assume that there is a decreasing function r such that for any ✏> 0 and δ > 0, with probability 1 −δ, if h⇤, g⇤= argmin(h,g)2F LT +1(h, g|ZT 1 ) and (h, g) 2 F is such that &&&&& 1 T T X t=1 Lt(h, g|Zt−1 1 ) −Lt(h⇤, g⇤|Zt−1 1 ) &&&&& ✏, (7) then, the following holds: LT +1(h, g|ZT 1 ) −LT +1(h⇤, g⇤|ZT 1 ) r(✏). (8) Roughly speaking, this assumption states that, given a sequence of states s1, . . . , sT generated by g such that the performance of some observation predictor h along this sequence of states is close to the performance of the ideal pair h⇤along the ideal sequence generated by g⇤, the performance of h in the near future (at state sT +1) will remain close to that of h⇤(in state s⇤ T +1). Note that, in most cases of interest, r has the form r(✏) = a✏, for some a > 0. Consider the following optimization problem which is similar to (5) but omits the discrepancy upper bound ∆: F0(h, g, k) = 1 T T X t=1 L(h, st, Zt) + Bk + M r log k T , (9) We will refer to F0 as an optimistic SRM objective and we let (h0, g0) be a minimizer of F0. Then, we have the following learning guarantee. Theorem 4. Under Assumption 1, for any δ > 0, with probability at least 1 −δ, for all ↵> 0, the inequality LT +1(h0, g0|ZT 1 ) −LT +1(f ⇤|ZT 1 ) < r(✏) holds with ✏= 2↵+ 2Bk(f ⇤) + M r log k(f ⇤) T + 2M s log 2 δ T , where s⇤ t = g⇤(Xt, s⇤ t−1), and where k(f ⇤) is the smallest integer k such that f ⇤2 Hk ⇥Gk. We remark that a finer analysis can be used to show that Assumption 1 only need to be satisfied for k k(f ⇤) for the Theorem 4. Furthermore, observe that for linear functions r(✏) = a✏, one recovers a guarantee similar to the bound in Theorem 3, but the discrepancy term is omitted making this result tighter. This result suggests that in the optimistic scenarios where our hypothesis set contains a good 5 state predictor that can capture the data non-stationarity, it is possible to achieve a tighter guarantee that avoids the pessimistic discrepancy term. Note that, increasing the capacity of the family of state predictors makes it easier to find such a good state predictor but it also may make the learning problem harder and lead to the violation of Assumption 1. This further motivates the use of an SRM technique for this problem to find the right balance between capturing the non-stationarity in data and the complexity of the models that are being used. Theorem 4 formalizes this intuition by providing theoretical guarantees for this approach. We now consider several illustrative examples showing that this assumption holds in a variety of cases of interest. In all our examples, we will use the squared loss but it is possible to generalize all of them to other sufficiently regular losses. Linear models. Let F be defined by F = {f : y 7! w · (y), kwk ⇤} for some ⇤> 0 and some feature map . Consider a separable case where Yt = w⇤· (Yt−1 t−p) + ✏t, where ✏t represents white noise. One can verify that the following equality holds: Lt(w|Zt−1 1 ) = E[(w · (Yt−1 t−p) −Yt)|Yt−1 1 ] = h (w −w⇤) · (Yt−1 t−p) i2 . In view of that, it follows that (7) is equal to 1 T T X t=1 h (w −w⇤) · (Yt−1 t−p) i2 ≥1 T T X t=1 (wj −w⇤ j)2 j(Yt−1 t−p)2 for any coordinate j 2 [1, N]. Thus, for any coordinate j 2 [1, N], by Hölder’s inequality, we have LT +1(h, g|ZT 1 ) −LT +1(h⇤, g⇤|ZT 1 ) = h (w −w⇤) · (YT T −p+1) i2 r✏ N X j=1 1 σj , where σj = 1 T PT t=1 j(Yt−1 t−p)2 is the empirical variance of the j-th coordinate and where r = supy (y)2 is the empirical `1-norm radius of the data. The special case where is the identity map covers standard autoregressive models. These often serve as basic building blocks for other state-space models, as discussed below. More generally, other feature maps may be induced by a positive definite kernel K. Alternatively, we may take as our hypothesis set F the convex hull of all decision trees of certain depth d. In that case, we can view each coordinate j as the output of a particular decision tree on the given input. Linear trend models. For simplicity, in this example, we consider univariate time series with linear trend. However, this can be easily generalized to the multi-variate setting with different trend models. Define G as G = {s 7! s + c: |c| ⇤} for some ⇤> 0 and let H be a singleton consisting of the identity map. Assume that Yt = c⇤t + ✏t, where ✏t is white noise. As in the previous example, it is easy to check that Lt(h, g|Zt−1 1 ) = |c −c⇤|2t2. Therefore, in this case, one can show that (7) reduces to 1 3(T + 1)(2T + 1)|c −c⇤|2 and therefore, if ✏= O( p 1/T), then we have |c −c⇤|2 = O(1/T 5/2) and thus (8) is |c −c⇤|2(T + 1)2 = O( p 1/T). Periodic signals. We study a multi-resolution setting where the time series of interest are modeled as a linear combination of periodic signals at different frequencies. We express this as a state-space model as follows. Define Ad = −1 −1 Id−1 0 / , where 1 is d −1-dimensional row vector of 1s, 0 is d −1-dimensional column vector of 0 and Id−1 is an identity matrix. It easy to verify that, under the map s 7! Ads, the sequence s1 · e1, s2 · e1 . . . , st · e1 . . ., where ✏1 = (1, 0, . . . , 0)T , is a periodic sequence with period d. Let D = d1, . . . , dk be any collection of positive integers and let A be a block-diagonal matrix with Ad1, . . . , Adk on the diagonal. We set G = {s 7! A · s} and H = {s 7! w · s: kwk < ⇤}, where we also restrict ws to be non-zero only at coordinates 1, 1 + d1, 1 + d1 + d2, . . . , 1 + Pk−1 j=1 dk−1. Once again, to simplify our presentation, we assume that Yt satisfies Yt = w⇤· st + ✏t. Using arguments similar to those of the previous examples, one can show that (7) is lower bounded by (wj −w⇤ j)2 1 T PT t=1 st,j for any coordinate j. Therefore, as before, if (7) is upper bounded by ✏> 0, then (8) is upper bounded by r✏PN j=1 1 σj , where r is the maximal radius of any state and σj a variance of j-th state sequence. 6 Trajectory ensembles. Note that, in our previous example, we did not exploit the fact that the sequences were periodic. Indeed, our argument holds for any g that generates a multi-dimensional trajectory h 2 H = {s 7! w · s: kwk < ⇤} which can be interpreted as learning an ensemble of different state-space trajectories. Structural Time Series Models (STSMs). STSMs are a popular family of state-space models that combine all of the previous examples. For this model, we use (h, g) 2 H ⇥G that have the following structure: h(xt, g(st)) = w· (xt)+ct+w0·st, where st is a vector of periodic sequences described in the previous examples and xt is the vector representing the most recent history of the time series. Note that our formulation is very general and allows for arbitrary feature maps that can correspond either to kernel-based or tree-based models. Arguments similar to those given in previous examples show that Assumption 1 holds in this case. Shifting parameters. We consider the non-realizable case where H is a set of linear models but where the data is generated according to the following procedure. The first T/2 rounds obey the formula Yt = w0Yt−1 + ✏t, the subsequent rounds the formula Yt = w⇤Yt−1 + ✏t. Note that, in this case, we have | 1 T PT t=1 Lt(w0|Zt−1 1 ) −Lt(w⇤|Zt−1 1 )| = 0. However, if w0 and w⇤are sufficiently far apart, it is possible to show that there is a constant lower bound on LT +1(w0|ZT 1 )−LT +1(w⇤|ZT 1 ). One approach to making Assumption 1 hold for this stochastic process is to choose H such that the resulting learning problem is separable. However, that requires us to know the exact nature of the underlying stochastic process. An alternative agnostic approach, is to consider a sequence of states (or equivalently weights) that can assign different weights qt to different training points. Finally, observe that our learning guarantees in Section 3 and 4 are expressed in terms of the expected sequential covering numbers of the family of DSSMs that we are seeking to learn. A priori, it is not clear if it is possible to control the complexity of such models in a meaningful way. However, in Appendix B, we present explicit upper bounds on the expected sequential covering numbers of several families of DSSMs, including several of those discussed above: linear models, tree-based hypothesis, and trajectory ensembles. 5 Algorithmic Solutions The generic SRM procedures described in Section 4 can lead to the design of a range of different algorithmic solutions for forecasting time series, depending on the choice of the families Hk and Fk. The key challenge for the design of an algorithm design in this setting is to come up with a tractable procedure for searching through sets of increasing complexity. In this section, we describe one such procedure that leads to a boosting-style algorithm. Our algorithm learns a structural time series model by adaptively adding various structural subcomponents to the model in order to balance model complexity and the ability of the model to handle non-stationarity in data. We refer to our algorithm as Boosted Structural Time Series Models (BOOSTSM). We will discuss BOOSTSM in the context of the squared loss, but most of our results can be straightforwardly extended to other convex loss functions. The hypothesis set used by our algorithm admits the following form: H = {(x, s) 7! w · (x) + w0 · s: kwk1 ⇤, kw0k1 ⇤0}. Each coordinate j is a binary-valued decision tree maps its inputs to a bounded set. For simplicity, we also assume that ⇤= ⇤0 = 1. We choose G to be any set of state trajectories. For instance, this set may include periodic or trend sequences as described in Section 4. Note that, to make the discussion concrete, we impose an `1-constraint to the parameter vectors, but other regularization penalties are also possible. The particular choice of the regularization defined by H would also lead to sparser solutions, which is an additional advantage given that our state-space representation is high-dimensional. For the squared loss and the aforementioned H, the optimistic SRM objective (9) is given by F(w, w0) = 1 T T X t=1 ⇣ yt −w · (xt) + w0 · st ⌘2 + λ(kwk1 + kw0k1), (10) where we omit log(k) because the index k in our setting tracks the maximal depth of the tree and it suffices to restrict the search to the case k < T as, for deeper trees, we can achieve zero empirical error. With this upper bound on k, O ⇣q log T T ⌘ is small and hence not included in the objective. 7 BOOSTSM(S = ((xi, yi)T t=1) 1 f0 0 2 for k 1 to K do 3 j argminj ✏k,j + λ sgn(wj) 4 j0 argminj0 δk,j0 + λ sgn(w0 j) 5 if ✏k,j + λ sgn(wj) δk,j0 + λ sgn(w0 j) then 6 ⌘k argmin⌘F(w + ⌘✏j, w0) 7 fk fk−1 + ⌘k j 8 else ⌘k argmin⌘F(w, w0 + ⌘✏j0) 9 fk fk−1 + ⌘t✏j0 10 return fK Figure 1: Pseudocode of the BOOSTSM algorithm. On line 3 and 4 two candidates are selected to be added to the ensemble: a state trajectory with j0 or a tree-based predictor with index j. Both of these minimize their subgradients within their family of weak learners. Subgradients are defined by (11). The candidate with the smallest gradient is added to the ensemble. The weight of the new ensemble member is found via line search (line 6 and 8). The regularization penalty is directly derived from the bounds on the expected sequential covering numbers of H given in Appendix B in Lemma 4 and Lemma 5. Observe that (10) is a convex objective function. Our BOOSTSM algorithm is defined by the application of coordinate descent to this objective. Figure 1 gives its pseudocode. The algorithm proceeds in K rounds. At each round, we either add a new predictor tree or a new state-space trajectory to the model, depending on which results in a greater decrease in the objective. In particular, with the following definitions: ✏k,j = 1 T T X t=1 (yt −fk−1(xt, st)) j(xt), δk,j = 1 T T X t=1 (yt −fk−1(xt, st))st,j. (11) the subgradient in tree-space direction j at round k is given by ✏k,j + λ sgn(wk,j). We use the notation wk to denote the tree-space parameter vector after k −1 rounds. Similarly, the subgradient in the trajectory space direction j0 is given by δk,j0 + λ sgn(w0 k,j), where w0 k represents the trajectory space parameter vector after k −1 rounds. By standard results in optimization theory [Luo and Tseng, 1992], BOOSTSM admits a linear convergence guarantee. 6 Conclusion We introduced a new family of models for forecasting non-stationary time series, Discriminative StateSpace Models. This family includes existing generative models and other state-based discriminative models (e.g. RNNs) as special cases, but also covers several novel algorithmic solutions explored in this paper. We presented an analysis of the problem of learning DSSMs in the most general setting of non-stationary stochastic processes and proved finite-sample data-dependent generalization bounds. These learning guarantees are novel even for traditional state-space models since the existing guarantees are only asymptotic and require the model to be correctly specified. We fully analyzed the complexity of several DSSMs that are useful in practice. Finally, we also studied the generalization guarantees of several structural risk minimization approaches to this problem and provided an efficient implementation of one such algorithm which is based on a convex objective. We report some promising preliminary experimental results in Appendix D. Acknowledgments This work was partly funded by NSF CCF-1535987 and NSF IIS-1618662, as well as a Google Research Award. 8 References Rakesh D. Barve and Philip M. Long. On the complexity of learning from drifting distributions. In COLT, 1996. Tim Bollerslev. Generalized autoregressive conditional heteroskedasticity. J Econometrics, 1986. George Edward Pelham Box and Gwilym Jenkins. Time Series Analysis, Forecasting and Control. Holden-Day, Incorporated, 1990. Peter J Brockwell and Richard A Davis. Time Series: Theory and Methods. Springer-Verlag, New York, 1986. J.J.F. Commandeur and S.J. Koopman. An Introduction to State Space Time Series Analysis. OUP Oxford, 2007. Corinna Cortes, Giulia DeSalvo, Vitaly Kuznetsov, Mehryar Mohri, and Scott Yand. Multi-armed bandits with non-stationary rewards. CoRR, abs/1710.10657, 2017. Victor H. De la Peña and Evarist Giné. Decoupling: from dependence to independence: randomly stopped processes, U-statistics and processes, martingales and beyond. Probability and its applications. Springer, NY, 1999. J. Durbin and S.J. Koopman. Time Series Analysis by State Space Methods: Second Edition. Oxford Statistical Science Series. OUP Oxford, 2012. Robert Engle. Autoregressive conditional heteroscedasticity with estimates of the variance of United Kingdom inflation. Econometrica, 50(4):987–1007, 1982. James D. Hamilton. Time series analysis. Princeton, 1994. Rudolph Emil Kalman. A new approach to linear filtering and prediction problems. Transactions of the ASME–Journal of Basic Engineering, 82(Series D), 1960. Vitaly Kuznetsov and Mehryar Mohri. Generalization bounds for time series prediction with nonstationary processes. In ALT, 2014. Vitaly Kuznetsov and Mehryar Mohri. Learning theory and algorithms for forecasting non-stationary time series. In Advances in Neural Information Processing Systems 28, pages 541–549, 2015. Vitaly Kuznetsov and Mehryar Mohri. Time series prediction and on-line learning. In Proceedings of The 29th Conference on Learning Theory, COLT 2016, 2016. Vitaly Kuznetsov and Mehryar Mohri. Generalization bounds for non-stationary mixing processes. Machine Learning, 106(1):93–117, 2017. M. Ledoux and M. Talagrand. Probability in Banach Spaces: Isoperimetry and Processes. Ergebnisse der Mathematik und ihrer Grenzgebiete. U.S. Government Printing Office, 1991. Nick Littlestone. Learning quickly when irrelevant attributes abound: A new linear-threshold algorithm. Machine Learning, 1987. Zhi-Quan Luo and Paul Tseng. On the convergence of coordinate descent method for convex differentiable minimization. Journal of Optimization Theory and Applications, 72(1):7 – 35, 1992. Alexander Rakhlin, Karthik Sridharan, and Ambuj Tewari. Online learning: Random averages, combinatorial parameters, and learnability. In NIPS, 2010. Alexander Rakhlin, Karthik Sridharan, and Ambuj Tewari. Online learning: Stochastic, constrained, and smoothed adversaries. In NIPS, 2011. Alexander Rakhlin, Karthik Sridharan, and Ambuj Tewari. Sequential complexities and uniform martingale laws of large numbers. Probability Theory and Related Fields, 2015a. Alexander Rakhlin, Karthik Sridharan, and Ambuj Tewari. Online learning via sequential complexities. JMLR, 16(1), January 2015b. Alexander Zimin and Christopher H. Lampert. Learning theory for conditional risk minimization. In AISTAT, 2017. 9 | 2017 | 292 |
6,777 | Emergence of Language with Multi-agent Games: Learning to Communicate with Sequences of Symbols Serhii Havrylov ILCC, School of Informatics University of Edinburgh s.havrylov@inf.ed.ac.uk Ivan Titov ILCC, School of Informatics University of Edinburgh ILLC, University of Amsterdam ititov@inf.ed.ac.uk Abstract Learning to communicate through interaction, rather than relying on explicit supervision, is often considered a prerequisite for developing a general AI. We study a setting where two agents engage in playing a referential game and, from scratch, develop a communication protocol necessary to succeed in this game. Unlike previous work, we require that messages they exchange, both at train and test time, are in the form of a language (i.e. sequences of discrete symbols). We compare a reinforcement learning approach and one using a differentiable relaxation (straightthrough Gumbel-softmax estimator (Jang et al., 2017)) and observe that the latter is much faster to converge and it results in more effective protocols. Interestingly, we also observe that the protocol we induce by optimizing the communication success exhibits a degree of compositionality and variability (i.e. the same information can be phrased in different ways), both properties characteristic of natural languages. As the ultimate goal is to ensure that communication is accomplished in natural language, we also perform experiments where we inject prior information about natural language into our model and study properties of the resulting protocol. 1 Introduction With the rapid advances in machine learning in recent years, the goal of enabling intelligent agents to communicate with each other and with humans is turning from a hot topic of philosophical debates into a practical engineering problem. It is believed that supervised learning alone is not going to provide a solution to this challenge (Mikolov et al., 2015). Moreover, even learning natural language from an interaction between humans and an agent may not be the most efficient and scalable approach. These considerations, as well as desire to achieve a better understanding of principles guiding evolution and emergence of natural languages (Nowak and Krakauer, 1999; Brighton, 2002), have motivated previous research into setups where agents invent a communication protocol which lets them succeed in a given collaborative task (Batali, 1998; Kirby, 2002; Steels, 2005; Baronchelli et al., 2006). For an extensive overview of earlier work in this area, we refer the reader to Kirby (2002) and Wagner et al. (2003). We continue this line of research and specifically consider a setting where the collaborative task is a game. Neural network models have been shown to be able to successfully induce a communication protocol for this setting (Lazaridou et al., 2017; Jorge et al., 2016; Foerster et al., 2016; Sukhbaatar et al., 2016). One important difference with these previous approaches is that we assume that messages exchanged between the agents are variable-length strings of symbols rather than atomic categories (as in the previous work). Our protocol would have properties more similar to natural language and, as such, would have more advantages over using atomic categories. For example, it can support compositionality (Werning et al., 2011) and provide an easy way to regulate the amount of 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. information conveyed in a message. Interestingly, in our experiments, we also find that agents develop a protocol faster when we allow them to use longer sequences of symbols. Somewhat surprisingly, we observe that the language derived by our method favours multiple encodings of the same information, reminiscent of synonyms or paraphrases in natural languages. Moreover, with messages being strings of symbols (i.e. words), it is now possible to inject supervision to ensure that the invented protocol is close enough to a natural language and, thus, potentially interpretable by humans. In our experiments, we focus on a referential game (Lewis, 1969), where the goal for one agent is to explain which image the other agent should select. Our setting can be formulated as follows: 1. There is a collection of images {in}N n=1 from which a target image t is sampled as well as K distracting images {dk}K k=1. 2. There are two agents: a sender Sφ and a receiver Rθ. 3. After seeing the target image t, the sender has to come up with a message mt, which is represented by a sequence of symbols from the vocabulary V of a size |V |. The maximum possible length of a sequence is L. 4. Given the message mt and a set of images, which consists of distracting images and the target image, the goal of the receiver is to identify the target image correctly. This setting is inspired by Lazaridou et al. (2017) but there are important differences: for example, we use sequences rather than single symbols, and our sender, unlike theirs, does not have access to distracting images. This makes our setting both arguably more realistic and more challenging from the learning perspective. Generating message mt requires sampling from categorical distributions over vocabulary, which makes backpropagating the error through the message impossible. It is tempting to formulate this game as a reinforcement learning problem. However, the number of possible messages1 is proportional to |V |L. Therefore, naïve Monte Carlo methods will give very high-variance estimates of the gradients which makes the learning process harder. Also, in this setup, because the receiver Rθ tries to adapt to the produced messages it will correspond to the non-stationary environment in which sender Sφ acts making the learning problem even more challenging. Instead, we propose an effective approach where we use straight-through Gumbel-softmax estimators (Jang et al., 2017; Bengio et al., 2013) allowing for end-to-end differentiation, despite using only discrete messages in training. We demonstrate that this approach is much more effective than the reinforcement learning framework employed in previous approaches to referential games, both in terms of convergence times and the resulting communication success. Our main contributions can be summarized as follows: • we are the first to show that structured protocols (i.e. strings of symbols) can be induced from scratch by optimizing reward in collaborative tasks; • we demonstrate that relaxations based on straight-through estimators are more effective than reinforcement learning for our task; • we show that the induced protocol implements hierarchical encoding scheme and there exist multiple paraphrases that encode the same semantic content. 2 Model 2.1 Agents’ architectures The sender and the receiver are implemented as LSTM networks (Hochreiter and Schmidhuber, 1997). Figure 1 shows the sketch of model architecture where diamond-shaped, dashed and solid arrows represent sampling, copying and deterministic functions respectively. The inputs to the sender are target image t and the special token <S> that denotes the start of a message. Given these inputs, the sender generates next token wi in a sequence by sampling from the categorical distribution Cat(pt i) where pt i = softmax(Whs i + b). Here, hs i is the hidden state of sender’s LSTM and can be calculated as2 hs i = LSTM(hs i−1, wi−1). In the first time step we have hs 0 = η(f(t)) where η(·) is an 1In our experiments |V | = 10000 and L is up to 14. 2We omitted the cell state in the equation for brevity. 2 affine transformation of image features f(·) extracted from a convolutional neural network (CNN). Message mt is obtained by sequentially sampling until the maximum possible length L is reached or the special token <S> is generated. Figure 1: Architectures of sender and receiver. The inputs to the receiver are the generated message mt and a set of images that contain the target image t and distracting images {dk}K k=1. Receiver interpretation of the message is given by the affine transformation g(·) of the last hidden state hr l of the LSTM network that reads the message. The loss function for the whole system can be written as: Lφ,θ(t) = Emt∼pφ(·|t) " K X k=1 max[0, 1 −f(t)T g(hr l ) + f(dk)T g(hr l )] # (1) The energy function E(v, mt) = −f(v)T g(hr l (mt)) can be used to define the probability distribution over a set of images p(v|mt) ∝e−E(v,mt). Communication between two agents is successful if the target image has the highest probability according to this distribution. 2.2 Grounding in Natural Language To ensure that communication is accomplished with a language that is understandable by humans, we should favour protocols that resemble, in some respect, a natural language. Also, we would like to check whether using sequences with statistical properties similar to those of a natural language would be beneficial for communication. There are at least two ways how to do this. The indirect supervision can be implemented by using the Kullback-Leibler (KL) divergence regularization DKL (qφ(m|t)∥pNL(m)), from the natural language to the learned protocol. As we do not have access to pNL(m), we train a language model pω using available samples (i.e. texts) and approximate the original KL divergence with DKL (qφ(m|t)∥pω(m)). We estimated the gradient of the divergent with respect to the φ parameters by applying ST-GS estimator to the Monte Carlo approximation calculated with one sampled message from qφ(m|t). This regularization provides indirect supervision by encouraging generated messages to have a high probability in natural language but at the same time maintaining high entropy for the communication protocol. Note that this is a weak form of grounding, as it does not force agents to preserve ‘meanings’ of words: the same word can refer to a very different concept in the induced artificial language and in the natural language. The described indirect grounding of the artificial language in a natural language can be interpreted as a particular instantiation of a variational autoencoder (VAE) (Kingma and Welling, 2014). There are no gold standard messages for images. Thus, a message can be treated as a variable-length sequence of discrete latent variables. On the other hand, image representations are always given. Hence they are equivalent to the observed variable in the VAE framework. The trained language model pω(m) serves as a prior over latent variables. The receiver agent is analogous to the generative part of the VAE, although, it uses a slightly different loss for the reconstruction error (hinge loss instead of log-likelihood). The sender agent is equivalent to an inference network used to approximate the posteriors in VAEs. 3 Minimizing the KL divergence from the natural language distribution to the learned protocol distribution can ensure that statistical properties of the messages are similar to those of natural language. However, words are not likely to preserve their original meaning (e.g. the word ‘red’ may not refer to ‘red’ in the protocol). To address this issue, a more direct form of supervision can be considered. For example, additionally training the sender on the image captioning task (Vinyals et al., 2015), assuming that there is a correct and most informative way to describe an image. 2.3 Learning It is relatively easy to learn the receiver agent. It is end-to-end differentiable, so gradients of the loss function with respect to its parameters can be estimated efficiently. The receiver-type model was investigated before by Chrupała et al. (2015) and known as Imaginet. It was used to learn visually grounded representations of language from coupled textual and visual input. The real challenge is to learn the sender agent. Its computational graph contains sampling, which makes it nondifferentiable. In what follows in this section, we discuss methods for estimating gradients of the loss function in Equation (1). 2.3.1 REINFORCE REINFORCE is a likelihood-ratio method (Williams, 1992) that provides a simple way of estimating gradients of the loss function with respect to parameters of the stochastic policy. We are interested in optimizing the loss function from Equation (1). The REINFORCE algorithm enables the use of gradient-based optimization methods by estimating gradients as: ∂Lφ,θ ∂φ = Epφ(·|t) l(mt)∂log pφ(mt|t) ∂φ (2) Where l(mt) is the learning signal, the inner part of the expectation in Equation (1). However, computing the gradient precisely may not be feasible due to the enormous number of message configurations. Usually, a Monte Carlo approximation of the expectation is used. Training models with REINFORCE can be difficult, due to the high variance of the estimator. We observed more reliable learning when using stabilizing techniques proposed by Mnih and Gregor (2014). Namely, we use a baseline, defined as a moving average of the reward, to control variance of the estimator; this results in centering the learning signal l(mt). We also use a variance-based adaptation of the learning rate that consists of dividing the learning rate by a running estimate of the reward standard deviation. This trick ensures that the learning signal is approximately unit variance, making the learning process less sensitive to dramatic and non-monotonic changes in the centered learning signal. To take into account varying difficulty of describing different images, we use input-dependent baseline implemented as a neural network with two hidden layers. 2.3.2 Gumbel-softmax estimator In the typical RL task formulation, an acting agent does not have access to the complete environment specification, or, even if it does, the environment is non-differentiable. Thus, in our setup, an agent that was trained by any REINFORCE-like algorithm would underuse available information about the environment. As a solution, we consider replacement of one-hot encoded symbols w ∈V sampled from a categorical distribution with a continuous relaxation ˜w obtained from the Gumbel-softmax distribution (Jang et al., 2017; Maddison et al., 2017). Consider a categorical distribution with event probabilities p1, p2, ..., pK, the Gumbel-softmax trick proceeds as follows: obtain K samples {uk}K k=1 from uniformly distributed variable u ∼U(0, 1), transform each sample with function gk = −log (−log (uk)) to get samples from the Gumbel distribution, then compute a continuous relaxation: ˜ wk = exp ((log pk + gk)/τ) PK i=1 exp ((log pi + gi)/τ) (3) Where τ is the temperature that controls accuracy of the approximation arg max with softmax function. As the temperature τ is approaching 0, samples from the Gumbel-softmax distribution 4 are becoming one-hot encoded, and the Gumbel-softmax distribution starts to be identical to the categorical distribution (Jang et al., 2017). As a result of this relaxation, the game becomes completely differentiable and can be trained using the backpropagation algorithm. However, communicating with real values allows the sender to encode much more information into a message compared to using a discrete one and is unrealistic if our ultimate goal is communication in natural language. Also, due to the recurrent nature of the receiver agent, using discrete tokens during test time can lead to completely different dynamics compared to the training time which uses continuous tokens. This manifests itself in a large gap between training and testing performance (up to 20% drop in the communication success rate in our experiments). 2.3.3 Straight-through Gumbel-softmax estimator To prevent the issues mentioned above, we discretize ˜w back with arg max in the forward pass that then becomes an ordinary sample from the original categorical distribution. Nevertheless, we use continuous relaxation in the backward pass, effectively assuming ∂L ∂w ≈∂L ∂˜ w. This biased estimator is known as the straight-through Gumbel-softmax (ST-GS) estimator (Jang et al., 2017; Bengio et al., 2013). As a result of applying this trick, there is no difference in message usage during training and testing stages, which contrasts with previous differentiable frameworks for learning communication protocols (Foerster et al., 2016). Because of using ST-GS, the forward pass does not depend on the temperature. However, it still affects the gradient values during the backward pass. As discussed before, low values for τ provide better approximations of arg max. Because the derivative of arg max is 0 everywhere except at the boundary of state changes, a more accurate approximation would lead to the severe vanishing gradient problem. Nonetheless, with ST-GS we can afford to use large values for τ, which would usually lead to faster learning. In order to reduce the burden of performing extensive hyperparameter search for the temperature, similarly to Gulcehre et al. (2017), we consider learning the inverse-temperature with a multilayer perceptron: 1 τ(hs i) = log(1 + exp(wT τ hs i)) + τ0, (4) where τ0 controls maximum possible value for the temperature. In our experiments, we found that learning process is not very sensitive to the hyperparameter as long as τ0 is less than 1.0. Despite the fact that ST-GS estimator is computationally efficient, it is biased. To understand how reliable the provided direction is, one can check whether it can be regarded as a pseudogradient (for the results see Section 3.1). The direction δ is a pseudogradient of J(u) if the condition δT ∇J(u) > 0 is satisfied. Polyak and Tsypkin (1973) have shown that, given certain assumptions about the learning rate, a very broad class of pseudogradient methods converge to the critical point of function J. To examine whether the direction provided by ST-GS is a pseudogradient, we used a stochastic perturbation gradient estimator that can approximate a dot product between arbitrary direction δ in the parameter space and the true gradient: J(u + ϵδ) −J(u −ϵδ) 2ϵ = δT ∇J(u) + O(ϵ2) (5) In our case J(u) is a Monte Carlo approximation of Equation (1). In order to reduce the variance in dot product estimation (Bhatnagar et al., 2012), the same Gumbel noise samples can be used for evaluating forward and backward perturbations of J(u). 3 Experiments 3.1 Tabula rasa communication We used the Microsoft COCO dataset (Chen et al., 2015) as a source of images. Prior to training, we randomly selected 10% of the images from the MSCOCO 2014 training set as validation data and kept the rest as training data. As a result of this split, more than 74k images were used for training and more than 8k images for validation. To evaluate the learned communication protocol, we used the MSCOCO 2014 validation set that consists of more than 40k images. In our experiments 5 images are represented by outputs of the relu7 layer from the pretrained 16-layer VGG convolutional network (Simonyan and Zisserman, 2015). Figure 2: The performance and properties of learned protocols. We set the following model configuration without tuning: the embedding dimensionality is 256, the dimensionality of LSTM layers is 512, the vocabulary size is 10000, the number of distracting images is 127, the batch size is 128. We used Adam (Kingma and Ba, 2014) as an optimizer, with default hyperparameters and the learning rate of 0.001 for the GS-ST method. For the REINFORCE estimator we tuned learning rate by searching for the optimal value over [10−5; 0.1] interval with a multiplicative step size 10−1. We did not observe significant improvements while using inputdependent baseline and disregarded them for the sake of simplicity. To investigate benefits of learning temperature, first, we found the optimal temperature that is equal to 1.2 by performing a search over interval [0.5; 2.0] with the step size equal to 0.1. As we mentioned before, the learning process with temperature defined by Equation (4) is not very sensitive to τ0 hyperparameter. Nevertheless, we conducted hyperparameter search over interval [0.0; 2.0] with step size 0.1 and found that model τ0 = 0.2 has the best performance. The differences in the performance were not significant unless the τ0 was bigger than 1.0. After training models we tested two encoding strategies: plain sampling and greedy argmax. That means selecting an argmax of the corresponding categorical distribution at each time step. Figure 2 shows the communication success rate as a function of the maximum message length L. Because results for models with learned temperature are very similar to the counterparts with fixed (manually tuned) temperatures, we omitted them from the figure for clarity. However, in average, models with learned temperatures outperform vanilla versions by 0.8%. As expected, argmax encoding slightly but consistently outperforms the sampling strategy. Surprisingly, REINFORCE beats GS-ST for the setup with L = 1. We may speculate that in this relatively easy setting being unbiased (as REINFORCE) is more important than having a low variance (as GS-ST). Interestingly, the number of updates that are required to achieve training convergence with the GS-ST estimator decreases when we let the sender use longer messages (i.e. for larger L). This behaviour is slightly surprising as one could expect that it is harder to learn the protocol when the space of messages is larger. In other words, using longer sequences helps to learn a communication protocol faster. However, this is not at all the case for the REINFORCE estimator: it usually takes five-fold more updates to converge compared to GS-ST, and also there is no clear dependency between the number of updates needed to converge and the maximum possible length of a message. We also plot the perplexity of the encoder. It is relatively high and increasing with sentence length for GS-ST, whereas for REINFORCE the perplexity increase is not as rapid. This implies redundancy in the encodings: there exist multiple paraphrases that encode the same semantic content. A noteworthy feature of GS-ST with learned temperature is that perplexity values of all encoders for different L are always smaller than corresponding values for vanilla GS-ST. Lastly, we calculated an estimate of the dot product between the true gradient of the loss function and the direction provided by GS-ST estimator using Equation (5). We found that after 400 parameter updates there is almost always (> 99%) an acute angle between the two. This suggests that GS-ST gradient can be used as a pseudogradient for our referential game problem. 6 3.2 Qualitative analysis of the learned language To better understand the nature of the learned language, we inspected a small subset of sentences that were produced by the model with maximum possible message length equal to 5. To avoid cherry picking images, we use the following strategy in both food and animal domains. First, we took a random photo of an object and generated a message. Then we iterated over the dataset and randomly selected images with messages that share prefixes of 1, 2 and 3 symbols with the given message. Figure 3 shows some samples from the MSCOCO 2014 validation set that correspond to (5747 * * * *) code.3 Images in this subset depict animals. On the other hand, it seems that images for (* * * 5747 *) code do not correspond to any predefined category. This suggests that word order is crucial in the developed language. Particularly, word 5747 on the first position encodes presence of an animal in the image. The same figure shows that message (5747 5747 7125 * *) corresponds to a particular type of bears. This suggests that the developed language implements some kind of hierarchical coding. This is interesting by itself because the model was not constrained explicitly to use any hierarchical encoding scheme. Presumably, this can help the model efficiently describe unseen images. Nevertheless, natural language uses other principles to ensure compositionality. The model shows similar behaviour for images in the food domain. Figure 3: The samples from MS COCO that correspond to particular codes. 3.3 Indirect grounding of artificial language in natural language We implemented indirect grounding algorithm, as discussed in Section 2.2. We trained language model pω(m) using an LSTM recurrent neural network. It was used as a prior distribution over the messages. To acquire data for estimating the parameters of a language model, we took image captions of randomly selected (50%) images from the previously created training set. These images were not used for training the sender and the receiver. Another half of the set was used for training agents. We evaluated the learned communication protocol on the MSCOCO 2014 validation set. To get an estimate of communication success when using natural language, we trained the receiver with pairs of images and captions. This model is similar to Imaginet (Chrupała et al., 2015). Also, inspired by their analysis, we report the omission score. The omission score of a word is equal to difference between the target image probability given the original message and the probability given a message with the removed word. The sentence omission score is the maximum over all word omission scores in the given sentence. The score quantifies the change in the target image probability after removing the most important word. Natural languages have content words that name objects (i.e. nouns) and encode their qualities (e.g., adjectives). One can expect that a protocol that uses a distinction between content words and function words would have a higher omission score than a protocol that distributes information evenly across tokens. As Table 1 shows, the grounded language has the communication success rate similar to natural language. However, it has a slightly lower omission score. The unregularized model has the lowest omission score which probably means that symbols in the developed protocol have similar nature to characters or syllables rather than words. 3* means any word from the vocabulary or end-of-sentence padding. 7 Table 1: Comparison of the grounded protocol with the natural language and the artificial language Model Comm. success (%) Number of updates Omission score With KL regularization 52.51 11600 0.258 Without regularization 95.65 27600 0.193 Imaginet 52.51 16100 0.287 3.4 Direct grounding of artificial language in natural language As we discussed previously in Section 2.2, minimizing the KL divergence will ensure that statistical properties of the protocol are going to be similar to those of natural language. However, words are not likely to preserve their original meaning (e.g. the word ‘red’ may refer to the concept of ‘blue’ in the protocol). To resolve this issue, we additionally trained the sender on the image captioning task. To understand whether the additional communication loss can help in the setting where the amount of the data is limited we considered next setup for image description generation task. To simulate the semi-supervised setting, we divided the previously created training set into two parts. The randomly selected 25% of the dataset were used to train the sender on the image captioning task Lcaption. The rest 75% were used to train the sender and the receiver to solve the referential game Lgame. The final loss is a weighted sum of losses for the two tasks L = Lcaption + λLgame. We did not perform any preprocessing of the gold standard captions apart from lowercasing. It is important to mention that in this setup the communication loss is equivalent to the variational lower bound of mutual information (Barber and Agakov, 2003) of image features and the corresponding caption. Table 2: Metrics for image captioning models with and without communication loss Model BLEU-2 BLEU-3 BLEU-4 ROUGE-L CIDEr Avg. length w/ comm. loss 0.435 0.290 0.195 0.492 0.590 13.93 w/o comm. loss 0.436 0.290 0.195 0.491 0.594 12.85 We used the greedy decoding strategy to sample image descriptions. As Table 2 shows, both systems have comparable performance across different image captioning metrics. We believe that the model did not achieve better peroformance as discriminative captions are different in nature compared to reference captions. In fact generating discriminative descriptions may be useful for certain applications (e.g., generating reference expressions in navigation instructions (Byron et al., 2009)) but it is hard to evaluate them intrinsically. Note that using the communication loss yield, in average, longer captions. It is not surprising, taking into account the mutual information interpretation of the referential game, a longer sequence can retain more information about image features. 4 Related work There is a long history of work on language emergence in multi-agent systems (Kirby, 2002; Wagner et al., 2003; Steels, 2005; Nolfiand Mirolli, 2009; Golland et al., 2010). The recent generation relied on deep learning techniques. More specifically, Foerster et al. (2016) proposed a differentiable inter-agent learning (DIAL) framework where it was used to solve puzzles in a multi-agent setting. The agents in their work were allowed to communicate by sending one-bit messages. Jorge et al. (2016) adopted DIAL to solve the interactive image search task with two agents participating in the task. These actors successfully developed a language consisting of one-hot encoded atomic symbols. By contrast, Lazaridou et al. (2017) applied the policy gradient method to learn agents that are involved in a referential game. Unlike us, they used atomic symbols rather than sequences of tokens. Learning dialogue systems for collaborative activities between machine and human were previously considered by Lemon et al. (2002). Usually, they are represented by hybrid models that combine reinforcement learning with supervised learning (Henderson et al., 2008; Schatzmann et al., 2006). The idea of using the Gumbel-softmax distribution for learning language in a multi-agent environment was concurrently considered by Mordatch and Abbeel (2017). They studied a simulated 8 two-dimensional environment in continuous space and discrete time with several agents where, in addition to performing physical actions, agents can also utter verbal communication symbols at every timestep. Similarly to us, the induced language exhibits compositional structure and to a large degree interpretable. Das et al. (2017), also in concurrent work, investigated a cooperative ‘image guessing’ game with two agents communicating in natural language. They use the policy gradient method for learning, hence their framework can benefit from the approach proposed in this paper. One important difference with our approach is that they pretrain their model on an available dialog dataset. By contrast, we induce the communication protocol from scratch. VAE-based approaches that use sequences of discrete latent variables were studied recently by Miao and Blunsom (2016) and Koˇcisk`y et al. (2016) for text summarization and semantic parsing, correspondingly. The variational lower bound for these models involves expectation with respect to the distribution over sequences of symbols, so the learning strategy proposed here may be beneficial in their applications. 5 Conclusion In this paper, we have shown that agents, modeled using neural networks, can successfully invent a language that consists of sequences of discrete tokens. Despite the common belief that it is hard to train such models, we proposed an efficient learning strategy that relies on the straight-through Gumbel-softmax estimator. We have performed analysis of the learned language and corresponding learning dynamics. We have also considered two methods for injecting prior knowledge about natural language. In the future work, we would like to extend this approach to modelling practical dialogs. The ‘game’ can be played between two agents rather than an agent and a human while human interpretability would be ensured by integrating supervised loss into the learning objective (as we did in section 3.5 where we used captions). Hopefully, this will reduce the amount of necessary human supervision. Acknowledgments This project is supported by SAP ICN, ERC Starting Grant BroadSem (678254) and NWO Vidi Grant (639.022.518). We would like to thank Jelle Zuidema and anonymous reviewers for their helpful suggestions and comments. References David Barber and Felix V Agakov. The IM Algorithm: A Variational Approach to Information Maximization. In Advances in Neural Information Processing Systems, 2003. Andrea Baronchelli, Maddalena Felici, Vittorio Loreto, Emanuele Caglioti, and Luc Steels. Sharp transition towards shared vocabularies in multi-agent systems. Journal of Statistical Mechanics: Theory and Experiment, 2006(06):P06014, 2006. John Batali. Computational simulations of the emergence of grammar. Approaches to the evolution of language: Social and cognitive bases, 405:426, 1998. Yoshua Bengio, Nicholas Léonard, and Aaron Courville. Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432, 2013. Shalabh Bhatnagar, HL Prasad, and LA Prashanth. Stochastic recursive algorithms for optimization: simultaneous perturbation methods, volume 434. Springer, 2012. Henry Brighton. Compositional syntax from cultural transmission. Artificial life, 8(1):25–54, 2002. Donna Byron, Alexander Koller, Kristina Striegnitz, Justine Cassell, Robert Dale, Johanna Moore, and Jon Oberlander. Report on the first NLG challenge on generating instructions in virtual environments (GIVE). In Proceedings of the 12th European workshop on natural language generation, 2009. Xinlei Chen, Hao Fang, Tsung-Yi Lin, Ramakrishna Vedantam, Saurabh Gupta, Piotr Dollár, and C Lawrence Zitnick. Microsoft COCO captions: Data collection and evaluation server. arXiv preprint arXiv:1504.00325, 2015. 9 Grzegorz Chrupała, Akos Kádár, and Afra Alishahi. Learning language through pictures. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics, 2015. Abhishek Das, Satwik Kottur, José MF Moura, Stefan Lee, and Dhruv Batra. Learning Cooperative Visual Dialog Agents with Deep Reinforcement Learning. In Proceedings of International Conference on Computer Vision and Image Processing, 2017. Jakob Foerster, Yannis M Assael, Nando de Freitas, and Shimon Whiteson. Learning to communicate with deep multi-agent reinforcement learning. In Advances in Neural Information Processing Systems, pages 2137–2145, 2016. Dave Golland, Percy Liang, and Dan Klein. A game-theoretic approach to generating spatial descriptions. In Proceedings of the 2010 conference on empirical methods in natural language processing, pages 410–419. Association for Computational Linguistics, 2010. Caglar Gulcehre, Sarath Chandar, and Yoshua Bengio. Memory Augmented Neural Networks with Wormhole Connections. arXiv preprint arXiv:1701.08718, 2017. James Henderson, Oliver Lemon, and Kallirroi Georgila. Hybrid reinforcement/supervised learning of dialogue policies from fixed data sets. Computational Linguistics, 34(4):487–511, 2008. Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8): 1735–1780, 1997. Eric Jang, Shixiang Gu, and Ben Poole. Categorical Reparameterization with Gumbel-Softmax. In Proceedings of the International Conference on Learning Representations, 2017. Emilio Jorge, Mikael Kågebäck, and Emil Gustavsson. Learning to Play Guess Who? and Inventing a Grounded Language as a Consequence. In Neural Information Processing Systems, the 3rd Deep Reinforcement Learning Workshop, 2016. Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceedings of the 3rd International Conference for Learning Representations, 2014. Diederik P Kingma and Max Welling. Auto-encoding Variational Bayes. In Proceedings of the 3rd International Conference for Learning Representations, 2014. Simon Kirby. Natural language from artificial life. Arificial Life, 8:185–215, 2002. Tomáš Koˇcisk`y, Gábor Melis, Edward Grefenstette, Chris Dyer, Wang Ling, Phil Blunsom, and Karl Moritz Hermann. Semantic parsing with semi-supervised sequential autoencoders. arXiv preprint arXiv:1609.09315, 2016. Angeliki Lazaridou, Alexander Peysakhovich, and Marco Baroni. Multi-agent cooperation and the emergence of (natural) language. In Proceedings of the International Conference on Learning Representations, 2017. Oliver Lemon, Alexander Gruenstein, and Stanley Peters. Collaborative activities and multi-tasking in dialogue systems: Towards natural dialogue with robots. TAL. Traitement automatique des langues, 43(2):131–154, 2002. David Lewis. Convention: A philosophical study. 1969. Chris J Maddison, Andriy Mnih, and Yee Whye Teh. The Concrete Distribution: A Continuous Relaxation of Discrete Random Variables. In Proceedings of the International Conference on Learning Representations, 2017. Yishu Miao and Phil Blunsom. Language as a latent variable: Discrete generative models for sentence compression. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, 2016. Tomas Mikolov, Armand Joulin, and Marco Baroni. A roadmap towards machine intelligence. In Neural Information Processing Systems, Reasoning, Attention, and Memory Workshop, 2015. 10 Andriy Mnih and Karol Gregor. Neural variational inference and learning in belief networks. In Proceedings of the 31st International Conference on Machine Learning, 2014. Igor Mordatch and Pieter Abbeel. Emergence of Grounded Compositional Language in Multi-Agent Populations. arXiv preprint arXiv:1703.04908, 2017. Stefano Nolfiand Marco Mirolli. Evolution of communication and language in embodied agents. Springer Science & Business Media, 2009. M. A. Nowak and D. Krakauer. The evolution of language. PNAS, 96(14):8028–8033, 1999. doi: 10.1073/pnas.96.14.8028. URL http://groups.lis.illinois.edu/amag/langev/paper/ nowak99theEvolution.html. BT Polyak and Ya Z Tsypkin. Pseudogradient adaptation and training algorithms. 1973. Jost Schatzmann, Karl Weilhammer, Matt Stuttle, and Steve Young. A survey of statistical user simulation techniques for reinforcement-learning of dialogue management strategies. The knowledge engineering review, 21(2):97–126, 2006. Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In Proceedings of the International Conference on Learning Representations, 2015. Luc Steels. What triggers the emergence of grammar. 2005. Sainbayar Sukhbaatar, Arthur Szlam, and Rob Fergus. Learning Multiagent Communication with Backpropagation. In Advances in Neural Information Processing Systems, pages 2244–2252, 2016. Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. Show and tell: A neural image caption generator. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3156–3164, 2015. Kyle Wagner, James A Reggia, Juan Uriagereka, and Gerald S Wilkinson. Progress in the simulation of emergent communication and language. Adaptive Behavior, 11(1):37–69, 2003. M. Werning, W. Hinzen, and M. Machery. The Oxford handbook of compositionality. Oxford, UK, 2011. Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992. 11 | 2017 | 293 |
6,778 | Wider and Deeper, Cheaper and Faster: Tensorized LSTMs for Sequence Learning Zhen He1,2, Shaobing Gao3, Liang Xiao2, Daxue Liu2, Hangen He2, and David Barber ∗ 1,4 1University College London, 2National University of Defense Technology, 3Sichuan University, 4Alan Turing Institute Abstract Long Short-Term Memory (LSTM) is a popular approach to boosting the ability of Recurrent Neural Networks to store longer term temporal information. The capacity of an LSTM network can be increased by widening and adding layers. However, usually the former introduces additional parameters, while the latter increases the runtime. As an alternative we propose the Tensorized LSTM in which the hidden states are represented by tensors and updated via a cross-layer convolution. By increasing the tensor size, the network can be widened efficiently without additional parameters since the parameters are shared across different locations in the tensor; by delaying the output, the network can be deepened implicitly with little additional runtime since deep computations for each timestep are merged into temporal computations of the sequence. Experiments conducted on five challenging sequence learning tasks show the potential of the proposed model. 1 Introduction We consider the time-series prediction task of producing a desired output yt at each timestep t∈{1, . . . , T} given an observed input sequence x1:t = {x1, x2, · · · , xt}, where xt ∈RR and yt ∈RS are vectors1. The Recurrent Neural Network (RNN) [17, 43] is a powerful model that learns how to use a hidden state vector ht ∈RM to encapsulate the relevant features of the entire input history x1:t up to timestep t. Let hcat t−1 ∈RR+M be the concatenation of the current input xt and the previous hidden state ht−1: hcat t−1 = [xt, ht−1] (1) The update of the hidden state ht is defined as: at = hcat t−1W h + bh (2) ht = φ(at) (3) where W h ∈R(R+M)×M is the weight, bh ∈RM the bias, at ∈RM the hidden activation, and φ(·) the element-wise tanh function. Finally, the output yt at timestep t is generated by: yt = ϕ(htW y + by) (4) where W y ∈RM×S and by ∈RS, and ϕ(·) can be any differentiable function, depending on the task. However, this vanilla RNN has difficulties in modeling long-range dependencies due to the vanishing/exploding gradient problem [4]. Long Short-Term Memories (LSTMs) [19, 24] alleviate ∗Corresponding authors: Shaobing Gao <gaoshaobing@scu.edu.cn> and Zhen He <hezhen.cs@gmail.com>. 1Vectors are assumed to be in row form throughout this paper. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. these problems by employing memory cells to preserve information for longer, and adopting gating mechanisms to modulate the information flow. Given the success of the LSTM in sequence modeling, it is natural to consider how to increase the complexity of the model and thereby increase the set of tasks for which the LSTM can be profitably applied. We consider the capacity of a network to consist of two components: the width (the amount of information handled in parallel) and the depth (the number of computation steps) [5]. A naive way to widen the LSTM is to increase the number of units in a hidden layer; however, the parameter number scales quadratically with the number of units. To deepen the LSTM, the popular Stacked LSTM (sLSTM) stacks multiple LSTM layers [20]; however, runtime is proportional to the number of layers and information from the input is potentially lost (due to gradient vanishing/explosion) as it propagates vertically through the layers. In this paper, we introduce a way to both widen and deepen the LSTM whilst keeping the parameter number and runtime largely unchanged. In summary, we make the following contributions: (a) We tensorize RNN hidden state vectors into higher-dimensional tensors which allow more flexible parameter sharing and can be widened more efficiently without additional parameters. (b) Based on (a), we merge RNN deep computations into its temporal computations so that the network can be deepened with little additional runtime, resulting in a Tensorized RNN (tRNN). (c) We extend the tRNN to an LSTM, namely the Tensorized LSTM (tLSTM), which integrates a novel memory cell convolution to help to prevent the vanishing/exploding gradients. 2 Method 2.1 Tensorizing Hidden States It can be seen from (2) that in an RNN, the parameter number scales quadratically with the size of the hidden state. A popular way to limit the parameter number when widening the network is to organize parameters as higher-dimensional tensors which can be factorized into lower-rank sub-tensors that contain significantly fewer elements [6, 15, 18, 26, 32, 39, 46, 47, 51], which is is known as tensor factorization. This implicitly widens the network since the hidden state vectors are in fact broadcast to interact with the tensorized parameters. Another common way to reduce the parameter number is to share a small set of parameters across different locations in the hidden state, similar to Convolutional Neural Networks (CNNs) [34, 35]. We adopt parameter sharing to cutdown the parameter number for RNNs, since compared with factorization, it has the following advantages: (i) scalability, i.e., the number of shared parameters can be set independent of the hidden state size, and (ii) separability, i.e., the information flow can be carefully managed by controlling the receptive field, allowing one to shift RNN deep computations to the temporal domain (see Sec. 2.2). We also explicitly tensorize the RNN hidden state vectors, since compared with vectors, tensors have a better: (i) flexibility, i.e., one can specify which dimensions to share parameters and then can just increase the size of those dimensions without introducing additional parameters, and (ii) efficiency, i.e., with higher-dimensional tensors, the network can be widened faster w.r.t. its depth when fixing the parameter number (see Sec. 2.3). For ease of exposition, we first consider 2D tensors (matrices): we tensorize the hidden state ht ∈RM to become Ht ∈RP×M, where P is the tensor size, and M the channel size. We locally-connect the first dimension of Ht in order to share parameters, and fully-connect the second dimension of Ht to allow global interactions. This is analogous to the CNN which fully-connects one dimension (e.g., the RGB channel for input images) to globally fuse different feature planes. Also, if one compares Ht to the hidden state of a Stacked RNN (sRNN) (see Fig. 1(a)), then P is akin to the number of stacked hidden layers, and M the size of each hidden layer. We start to describe our model based on 2D tensors, and finally show how to strengthen the model with higher-dimensional tensors. 2.2 Merging Deep Computations Since an RNN is already deep in its temporal direction, we can deepen an input-to-output computation by associating the input xt with a (delayed) future output. In doing this, we need to ensure that the output yt is separable, i.e., not influenced by any future input xt′ (t′ > t). Thus, we concatenate the projection of xt to the top of the previous hidden state Ht−1, then gradually shift the input 2 Figure 1: Examples of sRNN, tRNNs and tLSTMs. (a) A 3-layer sRNN. (b) A 2D tRNN without (–) feedback (F) connections, which can be thought as a skewed version of (a). (c) A 2D tRNN. (d) A 2D tLSTM without (–) memory (M) cell convolutions. (e) A 2D tLSTM. In each model, the blank circles in column 1 to 4 denote the hidden state at timestep t−1 to t+2, respectively, and the blue region denotes the receptive field of the current output yt. In (b)-(e), the outputs are delayed by L−1=2 timesteps, where L=3 is the depth. information down when the temporal computation proceeds, and finally generate yt from the bottom of Ht+L−1, where L−1 is the number of delayed timesteps for computations of depth L. An example with L=3 is shown in Fig. 1(b). This is in fact a skewed sRNN as used in [1] (also similar to [48]). However, our method does not need to change the network structure and also allows different kinds of interactions as long as the output is separable, e.g, one can increase the local connections and use feedback (see Fig. 1(c)), which can be beneficial for sRNNs [10]. In order to share parameters, we update Ht using a convolution with a learnable kernel. In this manner we increase the complexity of the input-to-output mapping (by delaying outputs) and limit parameter growth (by sharing transition parameters using convolutions). To describe the resulting tRNN model, let Hcat t−1 ∈R(P +1)×M be the concatenated hidden state, and p∈Z+ the location at a tensor. The channel vector hcat t−1,p ∈RM at location p of Hcat t−1 is defined as: hcat t−1,p = xtW x + bx if p = 1 ht−1,p−1 if p > 1 (5) where W x ∈RR×M and bx ∈RM. Then, the update of tensor Ht is implemented via a convolution: At = Hcat t−1 ⊛{W h, bh} (6) Ht = φ(At) (7) where W h ∈RK×M i×M o is the kernel weight of size K, with M i =M input channels and M o =M output channels, bh ∈RM o is the kernel bias, At ∈RP×M o is the hidden activation, and ⊛is the convolution operator (see Appendix A.1 for a more detailed definition). Since the kernel convolves across different hidden layers, we call it the cross-layer convolution. The kernel enables interaction, both bottom-up and top-down across layers. Finally, we generate yt from the channel vector ht+L−1,P ∈RM which is located at the bottom of Ht+L−1: yt = ϕ(ht+L−1,P W y + by) (8) where W y ∈RM×S and by ∈RS. To guarantee that the receptive field of yt only covers the current and previous inputs x1:t (see Fig. 1(c)), L, P, and K should satisfy the constraint: L = l 2P K −K mod 2 m (9) where ⌈·⌉is the ceil operation. For the derivation of (9), please see Appendix B. We call the model defined in (5)-(8) the Tensorized RNN (tRNN). The model can be widened by increasing the tensor size P, whilst the parameter number remains fixed (thanks to the convolution). Also, unlike the sRNN of runtime complexity O(TL), tRNN breaks down the runtime complexity to O(T +L), which means either increasing the sequence length T or the network depth L would not significantly increase the runtime. 3 2.3 Extending to LSTMs To allow the tRNN to capture long-range temporal dependencies, one can straightforwardly extend it to an LSTM by replacing the tRNN tensor update equations of (6)-(7) as follows: [Ag t , Ai t, Af t , Ao t] = Hcat t−1 ⊛{W h, bh} (10) [Gt, It, Ft, Ot] = [φ(Ag t ), σ(Ai t), σ(Af t ), σ(Ao t)] (11) Ct = Gt ⊙It + Ct−1 ⊙Ft (12) Ht = φ(Ct) ⊙Ot (13) where the kernel {W h, bh} is of size K, with M i=M input channels and M o=4M output channels, Ag t ,Ai t,Af t ,Ao t ∈RP×M are activations for the new content Gt, input gate It, forget gate Ft, and output gate Ot, respectively, σ(·) is the element-wise sigmoid function, ⊙is the element-wise multiplication, and Ct ∈RP×M is the memory cell. However, since in (12) the previous memory cell Ct−1 is only gated along the temporal direction (see Fig. 1(d)), long-range dependencies from the input to output might be lost when the tensor size P becomes large. Memory Cell Convolution. To capture long-range dependencies from multiple directions, we additionally introduce a novel memory cell convolution, by which the memory cells can have a larger receptive field (see Fig. 1(e)). We also dynamically generate this convolution kernel so that it is both time- and location-dependent, allowing for flexible control over long-range dependencies from different directions. This results in our tLSTM tensor update equations: [Ag t , Ai t, Af t , Ao t, Aq t] = Hcat t−1 ⊛{W h, bh} (14) [Gt, It, Ft, Ot, Qt] = [φ(Ag t ), σ(Ai t), σ(Af t ), σ(Ao t), ς(Aq t)] (15) W c t (p) = reshape (qt,p, [K, 1, 1]) (16) Cconv t−1 = Ct−1 ⊛W c t (p) (17) Ct = Gt ⊙It + Cconv t−1 ⊙Ft (18) Ht = φ(Ct) ⊙Ot (19) Figure 2: Illustration of generating the memory cell convolution kernel, where (a) is for 2D tensors and (b) for 3D tensors. where, in contrast to (10)-(13), the kernel {W h, bh} has additional ⟨K⟩output channels2 to generate the activation Aq t ∈RP×⟨K⟩for the dynamic kernel bank Qt ∈RP×⟨K⟩, qt,p ∈R⟨K⟩is the vectorized adaptive kernel at the location p of Qt, and W c t (p) ∈RK×1×1 is the dynamic kernel of size K with a single input/output channel, which is reshaped from qt,p (see Fig. 2(a) for an illustration). In (17), each channel of the previous memory cell Ct−1 is convolved with W c t (p) whose values vary with p, forming a memory cell convolution (see Appendix A.2 for a more detailed definition), which produces a convolved memory cell Cconv t−1 ∈RP×M. Note that in (15) we employ a softmax function ς(·) to normalize the channel dimension of Qt, which, similar to [37], can stabilize the value of memory cells and help to prevent the vanishing/exploding gradients (see Appendix C for details). The idea of dynamically generating network weights has been used in many works [6, 14, 15, 23, 44, 46], where in [14] locationdependent convolutional kernels are also dynamically generated to improve CNNs. In contrast to these works, we focus on broadening the receptive field of tLSTM memory cells. Whilst the flexibility is retained, fewer parameters are required to generate the kernel since the kernel is shared by different memory cell channels. Channel Normalization. To improve training, we adapt Layer Normalization (LN) [3] to our tLSTM. Similar to the observation in [3] that LN does not work well in CNNs where channel vectors at different locations have very different statistics, we find that LN is also unsuitable for tLSTM where lower level information is near the input while higher level information is near the output. We 2The operator ⟨·⟩returns the cumulative product of all elements in the input variable. 4 therefore normalize the channel vectors at different locations with their own statistics, forming a Channel Normalization (CN), with its operator CN (·): CN (Z; Γ, B) = bZ ⊙Γ + B (20) where Z, bZ, Γ, B ∈RP ×M z are the original tensor, normalized tensor, gain parameter, and bias parameter, respectively. The mz-th channel of Z, i.e. zmz ∈RP , is normalized element-wisely: bzmz = (zmz −zµ)/zσ (21) where zµ, zσ ∈RP are the mean and standard deviation along the channel dimension of Z, respectively, and bzmz ∈RP is the mz-th channel of bZ. Note that the number of parameters introduced by CN/LN can be neglected as it is very small compared to the number of other parameters in the model. Using Higher-Dimensional Tensors. One can observe from (9) that when fixing the kernel size K, the tensor size P of a 2D tLSTM grows linearly w.r.t. its depth L. How can we expand the tensor volume more rapidly so that the network can be widened more efficiently? We can achieve this goal by leveraging higher-dimensional tensors. Based on previous definitions for 2D tLSTMs, we replace the 2D tensors with D-dimensional (D>2) tensors, obtaining Ht, Ct ∈RP1×P2×...×PD−1×M with the tensor size P=[P1, P2, . . . , PD−1]. Since the hidden states are no longer matrices, we concatenate the projection of xt to one corner of Ht−1, and thus (5) is extended as: hcat t−1,p = xtW x + bx if pd = 1 for d = 1, 2, . . . , D −1 ht−1,p−1 if pd > 1 for d = 1, 2, . . . , D −1 0 otherwise (22) where hcat t−1,p ∈RM is the channel vector at location p ∈ZD−1 + of the concatenated hidden state Hcat t−1 ∈R(P1+1)×(P2+1)×...×(PD−1+1)×M. For the tensor update, the convolution kernel W h and W c t (·) also increase their dimensionality with kernel size K = [K1, K2, . . . , KD−1]. Note that W c t (·) is reshaped from the vector, as illustrated in Fig. 2(b). Correspondingly, we generate the output yt from the opposite corner of Ht+L−1, and therefore (8) is modified as: yt = ϕ(ht+L−1,PW y + by) (23) For convenience, we set Pd = P and Kd = K for d = 1, 2, . . . , D −1 so that all dimensions of P and K can satisfy (9) with the same depth L. In addition, CN still normalizes the channel dimension of tensors. 3 Experiments We evaluate tLSTM on five challenging sequence learning tasks under different configurations: (a) sLSTM (baseline): our implementation of sLSTM [21] with parameters shared across all layers. (b) 2D tLSTM: the standard 2D tLSTM, as defined in (14)-(19). (c) 2D tLSTM–M: removing (–) memory (M) cell convolutions from (b), as defined in (10)-(13). (d) 2D tLSTM–F: removing (–) feedback (F) connections from (b). (e) 3D tLSTM: tensorizing (b) into 3D tLSTM. (f) 3D tLSTM+LN: applying (+) LN [3] to (e). (g) 3D tLSTM+CN: applying (+) CN to (e), as defined in (20). To compare different configurations, we also use L to denote the number of layers of a sLSTM, and M to denote the hidden size of each sLSTM layer. We set the kernel size K to 2 for 2D tLSTM–F and 3 for other tLSTMs, in which case we have L=P according to (9). For each configuration, we fix the parameter number and increase the tensor size to see if the performance of tLSTM can be boosted without increasing the parameter number. We also investigate how the runtime is affected by the depth, where the runtime is measured by the average GPU milliseconds spent by a forward and backward pass over one timestep of a single example. Next, we compare tLSTM against the state-of-the-art methods to evaluate its ability. Finally, we visualize the internal working mechanism of tLSTM. Please see Appendix D for training details. 5 3.1 Wikipedia Language Modeling Figure 3: Performance and runtime of different configurations on Wikipedia. The Hutter Prize Wikipedia dataset [25] consists of 100 million characters taken from 205 different characters including alphabets, XML markups and special symbols. We model the dataset at the character-level, and try to predict the next character of the input sequence. We fix the parameter number to 10M, corresponding to channel sizes M of 1120 for sLSTM and 2D tLSTM–F, 901 for other 2D tLSTMs, and 522 for 3D tLSTMs. All configurations are evaluated with depths L = 1, 2, 3, 4. We use Bits-per-character (BPC) to measure the model performance. Results are shown in Fig. 3. When L ≤2, sLSTM and 2D tLSTM–F outperform other models because of a larger M. With L increasing, the performances of sLSTM and 2D tLSTM–M improve but become saturated when L≥3, while tLSTMs with memory cell convolutions improve with increasing L and finally outperform both sLSTM and 2D tLSTM–M. When L = 4, 2D tLSTM–F is surpassed by 2D tLSTM, which is in turn surpassed by 3D tLSTM. The performance of 3D tLSTM+LN benefits from LN only when L ≤2. However, 3D tLSTM+CN consistently improves 3D tLSTM with different L. Table 1: Test BPC on Wikipedia. BPC # Param. MI-LSTM [51] 1.44 ≈17M mLSTM [32] 1.42 ≈20M HyperLSTM+LN [23] 1.34 26.5M HM-LSTM+LN [11] 1.32 ≈35M Large RHN [54] 1.27 ≈46M Large FS-LSTM-4 [38] 1.245 ≈47M 2 × Large FS-LSTM-4 [38] 1.198 ≈94M 3D tLSTM+CN (L=6, M =1200) 1.264 50.1M Whilst the runtime of sLSTM is almost proportional to L, it is nearly constant in each tLSTM configuration and largely independent of L. We compare a larger model, i.e. a 3D tLSTM+CN with L=6 and M = 1200, to the state-of-the-art methods on the test set, as reported in Table 1. Our model achieves 1.264 BPC with 50.1M parameters, and is competitive to the best performing methods [38, 54] with similar parameter numbers. 3.2 Algorithmic Tasks Figure 4: Performance and runtime of different configurations on the addition (left) and memorization (right) tasks. (a) Addition: The task is to sum two 15-digit integers. The network first reads two integers with one digit per timestep, and then predicts the summation. We follow the processing of [30], where a symbol ‘-’ is used to delimit the integers as well as pad the input/target sequence. A 3-digit integer addition task is of the form: Input: - 1 2 3 - 9 0 0 - - - - Target: - - - - - - - - 1 0 2 3 (b) Memorization: The goal of this task is to memorize a sequence of 20 random symbols. Similar to the addition task, we use 65 different 6 symbols. A 5-symbol memorization task is of the form: Input: - a b c c b - - - - - Target: - - - - - - a b c c b We evaluate all configurations with L=1, 4, 7, 10 on both tasks, where M is 400 for addition and 100 for memorization. The performance is measured by the symbol prediction accuracy. Fig. 4 show the results. In both tasks, large L degrades the performances of sLSTM and 2D tLSTM– M. In contrast, the performance of 2D tLSTM–F steadily improves with L increasing, and is further enhanced by using feedback connections, higher-dimensional tensors, and CN, while LN helps only when L=1. Note that in both tasks, the correct solution can be found (when 100% test accuracy is achieved) due to the repetitive nature of the task. In our experiment, we also observe that for the addition task, 3D tLSTM+CN with L = 7 outperforms other configurations and finds the solution with only 298K training samples, while for the memorization task, 3D tLSTM+CN with L=10 beats others configurations and achieves perfect memorization after seeing 54K training samples. Also, unlike in sLSTM, the runtime of all tLSTMs is largely unaffected by L. Table 2: Test accuracies on two algorithmic tasks. Addition Memorization Acc. # Samp. Acc. # Samp. Stacked LSTM [21] 51% 5M >50% 900K Grid LSTM [30] >99% 550K >99% 150K 3D tLSTM+CN (L=7) >99% 298K >99% 115K 3D tLSTM+CN (L=10) >99% 317K >99% 54K We further compare the best performing configurations to the state-of-the-art methods for both tasks (see Table 2). Our models solve both tasks significantly faster (i.e., using fewer training samples) than other models, achieving the new state-of-the-art results. 3.3 MNIST Image Classification Figure 5: Performance and runtime of different configurations on sequential MNIST (left) and sequential pMNIST (right). The MNIST dataset [35] consists of 50000/10000/10000 handwritten digit images of size 28×28 for training/validation/test. We have two tasks on this dataset: (a) Sequential MNIST: The goal is to classify the digit after sequentially reading the pixels in a scanline order [33]. It is therefore a 784 timestep sequence learning task where a single output is produced at the last timestep; the task requires very long range dependencies in the sequence. (b) Sequential Permuted MNIST: We permute the original image pixels in a fixed random order as in [2], resulting in a permuted MNIST (pMNIST) problem that has even longer range dependencies across pixels and is harder. In both tasks, all configurations are evaluated with M =100 and L=1, 3, 5. The model performance is measured by the classification accuracy. Results are shown in Fig. 5. sLSTM and 2D tLSTM–M no longer benefit from the increased depth when L = 5. Both increasing the depth and tensorization boost the performance of 2D tLSTM. However, removing feedback connections from 2D tLSTM seems not to affect the performance. On the other hand, CN enhances the 3D tLSTM and when L ≥3 it outperforms LN. 3D tLSTM+CN with L=5 achieves the highest performances in both tasks, with a validation accuracy of 99.1% for MNIST and 95.6% for pMNIST. The runtime of tLSTMs is negligibly affected by L, and all tLSTMs become faster than sLSTM when L=5. 7 Figure 6: Visualization of the diagonal channel means of the tLSTM memory cells for each task. In each horizontal bar, the rows from top to bottom correspond to the diagonal locations from pin to pout, the columns from left to right correspond to different timesteps (from 1 to T +L−1 for the full sequence, where L−1 is the time delay), and the values are normalized to be in range [0, 1] for better visualization. Both full sequences in (d) and (e) are zoomed out horizontally. Table 3: Test accuracies (%) on sequential MNIST/pMNIST. MNIST pMNIST iRNN [33] 97.0 82.0 LSTM [2] 98.2 88.0 uRNN [2] 95.1 91.4 Full-capacity uRNN [49] 96.9 94.1 sTANH [53] 98.1 94.0 BN-LSTM [13] 99.0 95.4 Dilated GRU [8] 99.2 94.6 Dilated CNN [40] in [8] 98.3 96.7 3D tLSTM+CN (L=3) 99.2 94.9 3D tLSTM+CN (L=5) 99.0 95.7 We also compare the configurations of the highest test accuracies to the state-of-the-art methods (see Table 3). For sequential MNIST, our 3D tLSTM+CN with L=3 performs as well as the state-of-the-art Dilated GRU model [8], with a test accuracy of 99.2%. For the sequential pMNIST, our 3D tLSTM+CN with L = 5 has a test accuracy of 95.7%, which is close to the state-of-the-art of 96.7% produced by the Dilated CNN [40] in [8]. 3.4 Analysis The experimental results of different model configurations on different tasks suggest that the performance of tLSTMs can be improved by increasing the tensor size and network depth, requiring no additional parameters and little additional runtime. As the network gets wider and deeper, we found that the memory cell convolution mechanism is crucial to maintain improvement in performance. Also, we found that feedback connections are useful for tasks of sequential output (e.g., our Wikipedia and algorithmic tasks). Moreover, tLSTM can be further strengthened via tensorization or CN. It is also intriguing to examine the internal working mechanism of tLSTM. Thus, we visualize the memory cell which gives insight into how information is routed. For each task, the best performing tLSTM is run on a random example. We record the channel mean (the mean over channels, e.g., it is of size P ×P for 3D tLSTMs) of the memory cell at each timestep, and visualize the diagonal values of the channel mean from location pin =[1, 1] (near the input) to pout =[P, P] (near the output). Visualization results in Fig. 6 reveal the distinct behaviors of tLSTM when dealing with different tasks: (i) Wikipedia: the input can be carried to the output location with less modification if it is sufficient to determine the next character, and vice versa; (ii) addition: the first integer is gradually encoded into memories and then interacts (performs addition) with the second integer, producing the sum; (iii) memorization: the network behaves like a shift register that continues to move the input symbol to the output location at the correct timestep; (iv) sequential MNIST: the network is more sensitive to the pixel value change (representing the contour, or topology of the digit) and can gradually accumulate evidence for the final prediction; (v) sequential pMNIST: the network is sensitive to high value pixels (representing the foreground digit), and we conjecture that this is because the permutation destroys the topology of the digit, making each high value pixel potentially important. From Fig. 6 we can also observe common phenomena for all tasks: (i) at each timestep, the values at different tensor locations are markedly different, implying that wider (larger) tensors can encode more information, with less effort to compress it; (ii) from the input to the output, the values become increasingly distinct and are shifted by time, revealing that deep computations are indeed performed together with temporal computations, with long-range dependencies carried by memory cells. 8 Figure 7: Examples of models related to tLSTMs. (a) A single layer cLSTM [48] with vector array input. (b) A 3-layer sLSTM [21]. (c) A 3-layer Grid LSTM [30]. (d) A 3-layer RHN [54]. (e) A 3-layer QRNN [7] with kernel size 2, where costly computations are done by temporal convolution. 4 Related Work Convolutional LSTMs. Convolutional LSTMs (cLSTMs) are proposed to parallelize the computation of LSTMs when the input at each timestep is structured (see Fig. 7(a)), e.g., a vector array [48], a vector matrix [41, 42, 50, 52], or a vector tensor [9, 45]. Unlike cLSTMs, tLSTM aims to increase the capacity of LSTMs when the input at each timestep is non-structured, i.e., a single vector, and is advantageous over cLSTMs in that: (i) it performs the convolution across different hidden layers whose structure is independent of the input structure, and integrates information bottom-up and top-down; while cLSTM performs the convolution within each hidden layer whose structure is coupled with the input structure, thus will fall back to the vanilla LSTM if the input at each timestep is a single vector; (ii) it can be widened efficiently without additional parameters by increasing the tensor size; while cLSTM can be widened by increasing the kernel size or kernel channel, which significantly increases the number of parameters; (iii) it can be deepened with little additional runtime by delaying the output; while cLSTM can be deepened by using more hidden layers, which significantly increases the runtime; (iv) it captures long-range dependencies from multiple directions through the memory cell convolution; while cLSTM struggles to capture long-range dependencies from multiple directions since memory cells are only gated along one direction. Deep LSTMs. Deep LSTMs (dLSTMs) extend sLSTMs by making them deeper (see Fig. 7(b)-(d)). To keep the parameter number small and ease training, Graves [22], Kalchbrenner et al. [30], Mujika et al. [38], Zilly et al. [54] apply another RNN/LSTM along the depth direction of dLSTMs, which, however, multiplies the runtime. Though there are implementations to accelerate the deep computation [1, 16], they generally aim at simple architectures such sLSTMs. Compared with dLSTMs, tLSTM performs the deep computation with little additional runtime, and employs a cross-layer convolution to enable the feedback mechanism. Moreover, the capacity of tLSTM can be increased more efficiently by using higher-dimensional tensors, whereas in dLSTM all hidden layers as a whole only equal to a 2D tensor (i.e., a stack of hidden vectors), the dimensionality of which is fixed. Other Parallelization Methods. Some methods [7, 8, 28, 29, 36, 40] parallelize the temporal computation of the sequence (e.g., use the temporal convolution, as in Fig. 7(e)) during training, in which case full input/target sequences are accessible. However, during the online inference when the input presents sequentially, temporal computations can no longer be parallelized and will be blocked by deep computations of each timestep, making these methods potentially unsuitable for real-time applications that demand a high sampling/output frequency. Unlike these methods, tLSTM can speed up not only training but also online inference for many tasks since it performs the deep computation by the temporal computation, which is also human-like: we convert each signal to an action and meanwhile receive new signals in a non-blocking way. Note that for the online inference of tasks that use the previous output yt−1 for the current input xt (e.g., autoregressive sequence generation), tLSTM cannot parallel the deep computation since it requires to delay L−1 timesteps to get yt−1. 5 Conclusion We introduced the Tensorized LSTM, which employs tensors to share parameters and utilizes the temporal computation to perform the deep computation for sequential tasks. We validated our model on a variety of tasks, showing its potential over other popular approaches. 9 Acknowledgements This work is supported by the NSFC grant 91220301, the Alan Turing Institute under the EPSRC grant EP/N510129/1, and the China Scholarship Council. References [1] Jeremy Appleyard, Tomas Kocisky, and Phil Blunsom. Optimizing performance of recurrent neural networks on gpus. arXiv preprint arXiv:1604.01946, 2016. 3, 9 [2] Martin Arjovsky, Amar Shah, and Yoshua Bengio. Unitary evolution recurrent neural networks. In ICML, 2016. 7, 8 [3] Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. 4, 5 [4] Yoshua Bengio, Patrice Simard, and Paolo Frasconi. Learning long-term dependencies with gradient descent is difficult. IEEE TNN, 5(2):157–166, 1994. 1 [5] Yoshua Bengio. Learning deep architectures for ai. Foundations and trends R⃝in Machine Learning, 2009. 2 [6] Luca Bertinetto, João F Henriques, Jack Valmadre, Philip Torr, and Andrea Vedaldi. Learning feed-forward one-shot learners. In NIPS, 2016. 2, 4 [7] James Bradbury, Stephen Merity, Caiming Xiong, and Richard Socher. Quasi-recurrent neural networks. In ICLR, 2017. 9 [8] Shiyu Chang, Yang Zhang, Wei Han, Mo Yu, Xiaoxiao Guo, Wei Tan, Xiaodong Cui, Michael Witbrock, Mark Hasegawa-Johnson, and Thomas Huang. Dilated recurrent neural networks. In NIPS, 2017. 8, 9 [9] Jianxu Chen, Lin Yang, Yizhe Zhang, Mark Alber, and Danny Z Chen. Combining fully convolutional and recurrent neural networks for 3d biomedical image segmentation. In NIPS, 2016. 9 [10] Junyoung Chung, Caglar Gulcehre, Kyunghyun Cho, and Yoshua Bengio. Gated feedback recurrent neural networks. In ICML, 2015. 3, 13 [11] Junyoung Chung, Sungjin Ahn, and Yoshua Bengio. Hierarchical multiscale recurrent neural networks. In ICLR, 2017. 6 [12] Ronan Collobert, Koray Kavukcuoglu, and Clément Farabet. Torch7: A matlab-like environment for machine learning. In NIPS Workshop, 2011. 13 [13] Tim Cooijmans, Nicolas Ballas, César Laurent, and Aaron Courville. Recurrent batch normalization. In ICLR, 2017. 8 [14] Bert De Brabandere, Xu Jia, Tinne Tuytelaars, and Luc Van Gool. Dynamic filter networks. In NIPS, 2016. 4 [15] Misha Denil, Babak Shakibi, Laurent Dinh, Nando de Freitas, et al. Predicting parameters in deep learning. In NIPS, 2013. 2, 4 [16] Greg Diamos, Shubho Sengupta, Bryan Catanzaro, Mike Chrzanowski, Adam Coates, Erich Elsen, Jesse Engel, Awni Hannun, and Sanjeev Satheesh. Persistent rnns: Stashing recurrent weights on-chip. In ICML, 2016. 9 [17] Jeffrey L Elman. Finding structure in time. Cognitive science, 14(2):179–211, 1990. 1 [18] Timur Garipov, Dmitry Podoprikhin, Alexander Novikov, and Dmitry Vetrov. Ultimate tensorization: compressing convolutional and fc layers alike. In NIPS Workshop, 2016. 2 [19] Felix A Gers, Jürgen Schmidhuber, and Fred Cummins. Learning to forget: Continual prediction with lstm. Neural computation, 12(10):2451–2471, 2000. 1 [20] Alex Graves, Abdel-rahman Mohamed, and Geoffrey Hinton. Speech recognition with deep recurrent neural networks. In ICASSP, 2013. 2 [21] Alex Graves. Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850, 2013. 5, 7, 9 [22] Alex Graves. Adaptive computation time for recurrent neural networks. arXiv preprint arXiv:1603.08983, 2016. 9 [23] David Ha, Andrew Dai, and Quoc V Le. Hypernetworks. In ICLR, 2017. 4, 6 [24] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. 1 [25] Marcus Hutter. The human knowledge compression contest. URL http://prize.hutter1.net, 2012. 6 [26] Ozan Irsoy and Claire Cardie. Modeling compositionality with multiplicative recurrent neural networks. In ICLR, 2015. 2 10 [27] Rafal Jozefowicz, Wojciech Zaremba, and Ilya Sutskever. An empirical exploration of recurrent network architectures. In ICML, 2015. 13 [28] Łukasz Kaiser and Samy Bengio. Can active memory replace attention? In NIPS, 2016. 9 [29] Łukasz Kaiser and Ilya Sutskever. Neural gpus learn algorithms. In ICLR, 2016. 9 [30] Nal Kalchbrenner, Ivo Danihelka, and Alex Graves. Grid long short-term memory. In ICLR, 2016. 6, 7, 9, 13 [31] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. 13 [32] Ben Krause, Liang Lu, Iain Murray, and Steve Renals. Multiplicative lstm for sequence modelling. In ICLR Workshop, 2017. 2, 6 [33] Quoc V Le, Navdeep Jaitly, and Geoffrey E Hinton. A simple way to initialize recurrent networks of rectified linear units. arXiv preprint arXiv:1504.00941, 2015. 7, 8 [34] Yann LeCun, Bernhard Boser, John S Denker, Donnie Henderson, Richard E Howard, Wayne Hubbard, and Lawrence D Jackel. Backpropagation applied to handwritten zip code recognition. Neural computation, 1(4):541–551, 1989. 2 [35] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. 2, 7 [36] Tao Lei and Yu Zhang. Training rnns as fast as cnns. arXiv preprint arXiv:1709.02755, 2017. 9 [37] Gundram Leifert, Tobias Strauß, Tobias Grüning, Welf Wustlich, and Roger Labahn. Cells in multidimensional recurrent neural networks. JMLR, 17(1):3313–3349, 2016. 4, 13 [38] Asier Mujika, Florian Meier, and Angelika Steger. Fast-slow recurrent neural networks. In NIPS, 2017. 6, 9 [39] Alexander Novikov, Dmitrii Podoprikhin, Anton Osokin, and Dmitry P Vetrov. Tensorizing neural networks. In NIPS, 2015. 2 [40] Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. Wavenet: A generative model for raw audio. arXiv preprint arXiv:1609.03499, 2016. 8, 9 [41] Viorica Patraucean, Ankur Handa, and Roberto Cipolla. Spatio-temporal video autoencoder with differentiable memory. In ICLR Workshop, 2016. 9 [42] Bernardino Romera-Paredes and Philip Hilaire Sean Torr. Recurrent instance segmentation. In ECCV, 2016. 9 [43] David E Rumelhart, Geoffrey E Hinton, and Ronald J Williams. Learning representations by backpropagating errors. Nature, 323(6088):533–536, 1986. 1 [44] Jürgen Schmidhuber. Learning to control fast-weight memories: An alternative to dynamic recurrent networks. Neural Computation, 4(1):131–139, 1992. 4 [45] Marijn F Stollenga, Wonmin Byeon, Marcus Liwicki, and Juergen Schmidhuber. Parallel multi-dimensional lstm, with application to fast biomedical volumetric image segmentation. In NIPS, 2015. 9 [46] Ilya Sutskever, James Martens, and Geoffrey E Hinton. Generating text with recurrent neural networks. In ICML, 2011. 2, 4 [47] Graham W Taylor and Geoffrey E Hinton. Factored conditional restricted boltzmann machines for modeling motion style. In ICML, 2009. 2 [48] Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. In ICML, 2016. 3, 9 [49] Scott Wisdom, Thomas Powers, John Hershey, Jonathan Le Roux, and Les Atlas. Full-capacity unitary recurrent neural networks. In NIPS, 2016. 8 [50] Lin Wu, Chunhua Shen, and Anton van den Hengel. Deep recurrent convolutional networks for video-based person re-identification: An end-to-end approach. arXiv preprint arXiv:1606.01609, 2016. 9 [51] Yuhuai Wu, Saizheng Zhang, Ying Zhang, Yoshua Bengio, and Ruslan Salakhutdinov. On multiplicative integration with recurrent neural networks. In NIPS, 2016. 2, 6 [52] SHI Xingjian, Zhourong Chen, Hao Wang, Dit-Yan Yeung, Wai-kin Wong, and Wang-chun Woo. Convolutional lstm network: A machine learning approach for precipitation nowcasting. In NIPS, 2015. 9 [53] Saizheng Zhang, Yuhuai Wu, Tong Che, Zhouhan Lin, Roland Memisevic, Ruslan R Salakhutdinov, and Yoshua Bengio. Architectural complexity measures of recurrent neural networks. In NIPS, 2016. 8 [54] Julian Georg Zilly, Rupesh Kumar Srivastava, Jan Koutník, and Jürgen Schmidhuber. Recurrent highway networks. In ICML, 2017. 6, 9 11 | 2017 | 294 |
6,779 | Online Influence Maximization under Independent Cascade Model with Semi-Bandit Feedback Zheng Wen Adobe Research zwen@adobe.com Branislav Kveton Adobe Research kveton@adobe.com Michal Valko SequeL team, INRIA Lille - Nord Europe michal.valko@inria.fr Sharan Vaswani University of British Columbia sharanv@cs.ubc.ca Abstract We study the online influence maximization problem in social networks under the independent cascade model. Specifically, we aim to learn the set of “best influencers” in a social network online while repeatedly interacting with it. We address the challenges of (i) combinatorial action space, since the number of feasible influencer sets grows exponentially with the maximum number of influencers, and (ii) limited feedback, since only the influenced portion of the network is observed. Under a stochastic semi-bandit feedback, we propose and analyze IMLinUCB, a computationally efficient UCB-based algorithm. Our bounds on the cumulative regret are polynomial in all quantities of interest, achieve near-optimal dependence on the number of interactions and reflect the topology of the network and the activation probabilities of its edges, thereby giving insights on the problem complexity. To the best of our knowledge, these are the first such results. Our experiments show that in several representative graph topologies, the regret of IMLinUCB scales as suggested by our upper bounds. IMLinUCB permits linear generalization and thus is both statistically and computationally suitable for large-scale problems. Our experiments also show that IMLinUCB with linear generalization can lead to low regret in real-world online influence maximization. 1 Introduction Social networks are increasingly important as media for spreading information, ideas, and influence. Computational advertising studies models of information propagation or diffusion in such networks [16, 6, 10]. Viral marketing aims to use this information propagation to spread awareness about a specific product. More precisely, agents (marketers) aim to select a fixed number of influencers (called seeds or source nodes) and provide them with free products or discounts. They expect that these users will influence their neighbours and, transitively, other users in the social network to adopt the product. This will thus result in information propagating across the network as more users adopt or become aware of the product. The marketer has a budget on the number of free products and must choose seeds in order to maximize the influence spread, which is the expected number of users that become aware of the product. This problem is referred to as influence maximization (IM) [16]. For IM, the social network is modeled as a directed graph with the nodes representing users, and the edges representing relations (e.g., friendships on Facebook, following on Twitter) between them. Each directed edge (i, j) is associated with an activation probability w(i, j) that models the strength of influence that user i has on user j. We say a node j is a downstream neighbor of node i if there is a directed edge (i, j) from i to j. The IM problem has been studied under a number of 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. diffusion models [16, 13, 23]. The best known and studied are the models in [16], and in particular the independent cascade (IC) model. In this work, we assume that the diffusion follows the IC model and describe it next. After the agent chooses a set of source nodes S, the independent cascade model defines a diffusion (influence) process: At the beginning, all nodes in S are activated (influenced); subsequently, every activated node i can activate its downstream neighbor j with probability w(i, j) once, independently of the history of the process. This process runs until no activations are possible. In the IM problem, the goal of the agent is to maximize the expected number of the influenced nodes subject to a cardinality constraint on S. Finding the best set S is an NP-hard problem, but under common diffusion models including IC, it can be efficiently approximated to within a factor of 1 −1/e [16]. In many social networks, however, the activation probabilities are unknown. One possibility is to learn these from past propagation data [25, 14, 24]. However in practice, such data are hard to obtain and the large number of parameters makes this learning challenging. This motivates the learning framework of IM bandits [31, 28, 29], where the agent needs to learn to choose a good set of source nodes while repeatedly interacting with the network. Depending on the feedback to the agent, the IM bandits can have (1) full-bandit feedback, where only the number of influenced nodes is observed; (2) node semi-bandit feedback, where the identity of influenced nodes is observed; or (3) edge semi-bandit feedback, where the identity of influenced edges (edges going out from influenced nodes) is observed. In this paper, we give results for the edge semi-bandit feedback model, where we observe for each influenced node, the downstream neighbors that this node influences. Such feedback is feasible to obtain in most online social networks. These networks track activities of users, for instance, when a user retweets a tweet of another user. They can thus trace the propagation (of the tweet) through the network, thereby obtaining edge semi-bandit feedback. The IM bandits problem combines two main challenges. First, the number of actions (possible sets) S grows exponentially with the cardinality constraint on S. Second, the agent can only observe the influenced portion of the network as feedback. Although IM bandits have been studied in the past [21, 8, 31, 5, 29] (see Section 6 for an overview and comparison), there are a number of open challenges [28]. One challenge is to identify reasonable complexity metrics that depend on both the topology and activation probabilities of the network and characterize the information-theoretic complexity of the IM bandits problem. Another challenge is to develop learning algorithms such that (i) their performance scales gracefully with these metrics and (ii) are computationally efficient and can be applied to large social networks with millions of users. In this paper, we address these two challenges under the IC model with access to edge semi-bandit feedback. We refer to our model as an independent cascade semi-bandit (ICSB). We make four main contributions. First, we propose IMLinUCB, a UCB-like algorithm for ICSBs that permits linear generalization and is suitable for large-scale problems. Second, we define a new complexity metric, referred to as maximum observed relevance for ICSB, which depends on the topology of the network and is a non-decreasing function of activation probabilities. The maximum observed relevance C∗ can also be upper bounded based on the network topology or the size of the network in the worst case. However, in real-world social networks, due to the relatively low activation probabilities [14], C∗ attains much smaller values as compared to the worst case upper bounds. Third, we bound the cumulative regret of IMLinUCB. Our regret bounds are polynomial in all quantities of interest and have near-optimal dependence on the number of interactions. They reflect the structure and activation probabilities of the network through C∗and do not depend on inherently large quantities, such as the reciprocal of the minimum probability of being influenced (unlike [8]) and the cardinality of the action set. Finally, we evaluate IMLinUCB on several problems. Our empirical results on simple representative topologies show that the regret of IMLinUCB scales as suggested by our topologydependent regret bounds. We also show that IMLinUCB with linear generalization can lead to low regret in real-world online influence maximization problems. 2 Influence Maximization under Independence Cascade Model In this section, we define notation and give the formal problem statement for the IM problem under the IC model. Consider a directed graph G = (V, E) with a set V = {1, 2, . . . , L} of L = |V| nodes, a set E = {1, 2, . . . , |E|} of directed edges, and an arbitrary binary weight function w : E →{0, 1}. 2 We say that a node v2 ∈V is reachable from a node v1 ∈V under w if there is a directed path1 p = (e1, e2, . . . , el) from v1 to v2 in G satisfying w(ei) = 1 for all i = 1, 2, . . . , l, where ei is the i-th edge in p. For a given source node set S ⊆V and w, we say that node v ∈V is influenced if v is reachable from at least one source node in S under w; and denote the number of influenced nodes in G by f(S, w). By definition, the nodes in S are always influenced. The influence maximization (IM) problem is characterized by a triple (G, K, w), where G is a given directed graph, K ≤L is the cardinality of source nodes, and w : E →[0, 1] is a probability weight function mapping each edge e ∈E to a real number w(e) ∈[0, 1]. The agent needs to choose a set of K source nodes S ⊆V based on (G, K, w). Then a random binary weight function w, which encodes the diffusion process under the IC model, is obtained by independently sampling a Bernoulli random variable w(e) ∼Bern (w(e)) for each edge e ∈E. The agent’s objective is to maximize the expected number of the influenced nodes: maxS: |S|=K f(S, w), where f(S, w) ∆= Ew [f(S, w)] is the expected number of influenced nodes when the source node set is S and w is sampled according to w.2 It is well-known that the (offline) IM problem is NP-hard [16], but can be approximately solved by approximation/randomized algorithms [6] under the IC model. In this paper, we refer to such algorithms as oracles to distinguish them from the machine learning algorithms discussed in following sections. Let Sopt be the optimal solution of this problem, and S∗= ORACLE(G, K, w) be the (possibly random) solution of an oracle ORACLE. For any α, γ ∈[0, 1], we say that ORACLE is an (α, γ)-approximation oracle for a given (G, K) if for any w, f(S∗, w) ≥γf(Sopt, w) with probability at least α. Notice that this further implies that E [f(S∗, w)] ≥αγf(Sopt, w). We say an oracle is exact if α = γ = 1. 3 Influence Maximization Semi-Bandit In this section, we first describe the IM semi-bandit problem. Next, we state the linear generalization assumption and describe IMLinUCB, our UCB-based semi-bandit algorithm. 3.1 Protocol The independent cascade semi-bandit (ICSB) problem is also characterized by a triple (G, K, w), but w is unknown to the agent. The agent interacts with the independent cascade semi-bandit for n rounds. At each round t = 1, 2, . . . , n, the agent first chooses a source node set St ⊆V with cardinality K based on its prior information and past observations. Influence then diffuses from the nodes in St according to the IC model. Similarly to the previous section, this can be interpreted as the environment generating a binary weight function wt by independently sampling wt(e) ∼Bern (w(e)) for each e ∈E. At round t, the agent receives the reward f(St, wt), that is equal to the number of nodes influenced at that round. The agent also receives edge semi-bandit feedback from the diffusion process. Specifically, for any edge e = (u1, u2) ∈E, the agent observes the realization of wt(e) if and only if the start node u1 of the directed edge e is influenced in the realization wt. The agent’s objective is to maximize the expected cumulative reward over the n steps. 3.2 Linear generalization Since the number of edges in real-world social networks tends to be in millions or even billions, we need to exploit some generalization model across activation probabilities to develop efficient and deployable learning algorithms. In particular, we assume that there exists a linear-generalization model for the probability weight function w. That is, each edge e ∈E is associated with a known feature vector xe ∈ℜd (here d is the dimension of the feature vector) and that there is an unknown coefficient vector θ∗∈ℜd such that for all e ∈E, w(e) is “well approximated" by xT eθ∗. Formally, we assume that ρ ∆= maxe∈E |w(e) −xT eθ∗| is small. In Section 5.2, we see that such a linear generalization leads to efficient learning in real-world networks. Note that all vectors in this paper are column vectors. 1As is standard in graph theory, a directed path is a sequence of directed edges connecting a sequence of distinct nodes, under the restriction that all edges are directed in the same direction. 2Notice that the definitions of f(S, w) and f(S, w) are consistent in the sense that if w ∈{0, 1}|E|, then f(S, w) = f(S, w) with probability 1. 3 Algorithm 1 IMLinUCB: Influence Maximization Linear UCB Input: graph G, source node set cardinality K, oracle ORACLE, feature vector xe’s, and algorithm parameters σ, c > 0, Initialization: B0 ←0 ∈ℜd, M0 ←I ∈ℜd×d for t = 1, 2, . . . , n do 1. set θt−1 ←σ−2M−1 t−1Bt−1 and the UCBs as Ut(e) ←Proj[0,1] xT eθt−1 + c q xTeM−1 t−1xe for all e ∈E 2. choose St ∈ORACLE(G, K, Ut), and observe the edge-level semi-bandit feedback 3. update statistics: (a) initialize Mt ←Mt−1 and Bt ←Bt−1 (b) for all observed edges e ∈E, update Mt ←Mt + σ−2xexT e and Bt ←Bt + xewt(e) Similar to the existing approaches for linear bandits [1, 9], we exploit the linear generalization to develop a learning algorithm for ICSB. Without loss of generality, we assume that ∥xe∥2 ≤1 for all e ∈E. Moreover, we use X ∈ℜ|E|×d to denote the feature matrix, i.e., the row of X associated with edge e is xT e. Note that if a learning agent does not know how to construct good features, it can always choose the naïve feature matrix X = I ∈ℜ|E|×|E| and have no generalization model across edges. We refer to the special case X = I ∈ℜ|E|×|E| as the tabular case. 3.3 IMLinUCB algorithm In this section, we propose Influence Maximization Linear UCB (IMLinUCB), detailed in Algorithm 1. Notice that IMLinUCB represents its past observations as a positive-definite matrix (Gram matrix) Mt ∈ℜd×d and a vector Bt ∈ℜd. Specifically, let Xt be a matrix whose rows are the feature vectors of all observed edges in t steps and Yt be a binary column vector encoding the realizations of all observed edges in t steps. Then Mt = I + σ−2XT tXt and Bt = XT tYt. At each round t, IMLinUCB operates in three steps: First, it computes an upper confidence bound Ut(e) for each edge e ∈E. Note that Proj[0,1](·) projects a real number into interval [0, 1] to ensure that Ut ∈[0, 1]|E|. Second, it chooses a set of source nodes based on the given ORACLE and Ut, which is also a probability-weight function. Finally, it receives the edge semi-bandit feedback and uses it to update Mt and Bt. It is worth emphasizing that IMLinUCB is computationally efficient as long as ORACLE is computationally efficient. Specifically, at each round t, the computational complexities of both Step 1 and 3 of IMLinUCB are O |E|d2 .3 It is worth pointing out that in the tabular case, IMLinUCB reduces to CUCB [7], in the sense that the confidence radii in IMLinUCB are the same as those in CUCB, up to logarithmic factors. That is, CUCB can be viewed as a special case of IMLinUCB with X = I. 3.4 Performance metrics Recall that the agent’s objective is to maximize the expected cumulative reward, which is equivalent to minimizing the expected cumulative regret. The cumulative regret is the loss in reward (accumulated over rounds) because of the lack of knowledge of the activation probabilities. Observe that in each round t, IMLinUCB needs to use an approximation/randomized algorithm ORACLE for solving the offline IM problem. Naturally, this can lead to O(n) cumulative regret, since at each round there is a non-diminishing regret due to the approximation/randomized nature of ORACLE. To analyze the performance of IMLinUCB in such cases, we define a more appropriate performance metric, the scaled cumulative regret, as Rη(n) = Pn t=1 E [Rη t ], where n is the number of steps, η > 0 is the scale, and Rη t = f(Sopt, wt) −1 ηf(St, wt) is the η-scaled realized regret Rη t at round t. When η = 1, Rη(n) reduces to the standard expected cumulative regret R(n). 3Notice that in a practical implementation, we store M−1 t instead of Mt. Moreover, Mt ←Mt + σ−2xexT e is equivalent to M−1 t ←M−1 t − M−1 t xexT eM−1 t xTeM−1 t xe+σ2 . 4 (a) (b) (c) (d) Figure 1: a. Bar graph on 8 nodes. b. Star graph on 4 nodes. c. Ray graph on 10 nodes. d. Grid graph on 9 nodes. Each undirected edge denotes two directed edges in opposite directions. 4 Analysis In this section, we give a regret bound for IMLinUCB for the case when w(e) = xT eθ∗for all e ∈E, i.e., the linear generalization is perfect. Our main contribution is a regret bound that scales with a new complexity metric, maximum observed relevance, which depends on both the topology of G and the probability weight function w, and is defined in Section 4.1. We highlight this as most known results for this problem are worst case, and some of them do not depend on probability weight function at all. 4.1 Maximum observed relevance We start by defining some terminology. For given directed graph G = (V, E) and source node set S ⊆V, we say an edge e ∈E is relevant to a node v ∈V \ S under S if there exists a path p from a source node s ∈S to v such that (1) e ∈p and (2) p does not contain another source node other than s. Notice that with a given S, whether or not a node v ∈V \ S is influenced only depends on the binary weights w on its relevant edges. For any edge e ∈E, we define NS,e as the number of nodes in V \ S it is relevant to, and define PS,e as the conditional probability that e is observed given S, NS,e ∆= P v∈V\S 1 {e is relevant to v under S} and PS,e ∆= P (e is observed | S) . (1) Notice that NS,e only depends on the topology of G, while PS,e depends on both the topology of G and the probability weight w. The maximum observed relevance C∗is defined as the maximum (over S) 2-norm of NS,e’s weighted by PS,e’s, C∗ ∆= maxS: |S|=K qP e∈E N 2 S,ePS,e. (2) As is detailed in the proof of Lemma 1 in Appendix A, C∗arises in the step where Cauchy-Schwarz inequality is applied. Note that C∗also depends on both the topology of G and the probability weight w. However, C∗can be bounded from above only based on the topology of G or the size of the problem, i.e., L = |V| and |E|. Specifically, by defining CG ∆= maxS: |S|=K qP e∈E N 2 S,e, we have C∗≤CG = maxS: |S|=K qP e∈E N 2 S,e ≤(L −K) p |E| = O L p |E| = O L2 , (3) where CG is the maximum/worst-case (over w) C∗for the directed graph G, and the maximum is obtained by setting w(e) = 1 for all e ∈E. Since CG is worst-case, it might be very far away from C∗if the activation probabilities are small. Indeed, this is what we expect in typical realworld situations. Notice also that if maxe∈E w(e) →0, then PS,e →0 for all e /∈E(S) and PS,e = 1 for all e ∈E(S), where E(S) is the set of edges with start node in S, hence we have C∗→C0 G ∆= maxS: |S|=K qP e∈E(S) N 2 S,e. In particular, if K is small, C0 G is much less than CG in many topologies. For example, in a complete graph with K = 1, CG = Θ(L2) while C0 G = Θ(L 3 2 ). Finally, it is worth pointing out that there exist situations (G, w) such that C∗= Θ(L2). One such example is when G is a complete graph with L nodes and w(e) = L/(L + 1) for all edges e in this graph. To give more intuition, in the rest of this subsection, we illustrate how CG, the worst-case C∗, varies with four graph topologies in Figure 1: bar, star, ray, and grid, as well as two other topologies: 5 general tree and complete graph. We fix the node set V = {1, 2, . . . , L} for all graphs. The bar graph (Figure 1a) is a graph where nodes i and i + 1 are connected when i is odd. The star graph (Figure 1b) is a graph where node 1 is central and all remaining nodes i ∈V \ {1} are connected to it. The distance between any two of these nodes is 2. The ray graph (Figure 1c) is a star graph with k = √ L −1 arms, where node 1 is central and each arm contains either ⌈(L −1)/k⌉or ⌊(L −1)/k⌋nodes connected in a line. The distance between any two nodes in this graph is O( √ L). The grid graph (Figure 1d) is a classical non-tree graph with O(L) edges. To see how CG varies with the graph topology, we start with the simplified case when K = |S| = 1. In the bar graph (Figure 1a), only one edge is relevant to a node v ∈V \ S and all the other edges are not relevant to any nodes. Therefore, CG ≤1. In the star graph (Figure 1b), for any s, at most one edge is relevant to at most L −1 nodes and the remaining edges are relevant to at most one node. In this case, CG ≤ √ L2 + L = O(L). In the ray graph (Figure 1c), for any s, at most O( √ L) edges are relevant to L −1 nodes and the remaining edges are relevant to at most O( √ L) nodes. In this case, CG = O( p L 1 2 L2 + LL) = O(L 5 4 ). Finally, recall that for all graphs we can bound CG by O(L p |E|), regardless of K. Hence, for the grid graph (Figure 1d) and general tree graph, CG = O(L 3 2 ) since |E| = O(L); for the complete graph CG = O(L2) since |E| = O(L2). Clearly, CG varies widely with the topology of the graph. The second column of Table 1 summarizes how CG varies with the above-mentioned graph topologies for general K = |S|. 4.2 Regret guarantees Consider C∗defined in Section 4.1 and recall the worst-case upper bound C∗≤(L −K) p |E|, we have the following regret guarantees for IMLinUCB. Theorem 1 Assume that (1) w(e) = xT eθ∗for all e ∈E and (2) ORACLE is an (α, γ)-approximation algorithm. Let D be a known upper bound on ∥θ∗∥2, if we apply IMLinUCB with σ = 1 and c = s d log 1 + n|E| d + 2 log (n(L + 1 −K)) + D, (4) then we have Rαγ(n) ≤2cC∗ αγ s dn|E| log2 1 + n|E| d + 1 = e O dC∗ p |E|n/(αγ) (5) ≤e O d(L −K)|E|√n/(αγ) . (6) Moreover, if the feature matrix X = I ∈ℜ|E|×|E| (i.e., the tabular case), we have Rαγ(n) ≤2cC∗ αγ p n|E| log2 (1 + n) + 1 = e O |E|C∗ √n/(αγ) (7) ≤e O (L −K)|E| 3 2 √n/(αγ) . (8) Please refer to Appendix A for the proof of Theorem 1, that we outline in Section 4.3. We now briefly comment on the regret bounds in Theorem 1. Topology-dependent bounds: Since C∗is topology-dependent, the regret bounds in Equations 5 and 7 are also topology-dependent. Table 1 summarizes the regret bounds for each topology4 discussed in Section 4.1. Since the regret bounds in Table 1 are the worst-case regret bounds for a given topology, more general topologies have larger regret bounds. For instance, the regret bounds for tree are larger than their counterparts for star and ray, since star and ray are special trees. The grid and tree can also be viewed as special complete graphs by setting w(e) = 0 for some e ∈E, hence complete graph has larger regret bounds. Again, in practice we expect C∗to be far smaller due to activation probabilities. 4The regret bound for bar graph is based on Theorem 2 in the appendix, which is a stronger version of Theorem 1 for disconnected graph. 6 topology CG (worst-case C∗) Rαγ(n) for general X Rαγ(n) for X = I bar graph O( √ K) e O (dK√n/(αγ)) e O L √ Kn/(αγ) star graph O(L √ K) e O dL 3 2 √ Kn/(αγ) e O L2√ Kn/(αγ) ray graph O(L 5 4 √ K) e O dL 7 4 √ Kn/(αγ) e O L 9 4 √ Kn/(αγ) tree graph O(L 3 2 ) e O dL2√n/(αγ) e O L 5 2 √n/(αγ) grid graph O(L 3 2 ) e O dL2√n/(αγ) e O L 5 2 √n/(αγ) complete graph O(L2) e O dL3√n/(αγ) e O L4√n/(αγ) Table 1: CG and worst-case regret bounds for different graph topologies. Tighter bounds in tabular case and under exact oracle: Notice that for the tabular case with feature matrix X = I and d = |E|, e O( p |E|) tighter regret bounds are obtained in Equations 7 and 8. Also notice that the e O(1/(αγ)) factor is due to the fact that ORACLE is an (α, γ)-approximation oracle. If ORACLE solves the IM problem exactly (i.e., α = γ = 1), then Rαγ(n) = R(n). Tightness of our regret bounds: First, note that our regret bound in the bar case with K = 1 matches the regret bound of the classic LinUCB algorithm. Specifically, with perfect linear generalization, this case is equivalent to a linear bandit problem with L arms and feature dimension d. From Table 1, our regret bound in this case is e O (d√n), which matches the known regret bound of LinUCB that can be obtained by the technique of [1]. Second, we briefly discuss the tightness of the regret bound in Equation 6 for a general graph with L nodes and |E| edges. Note that the e O(√n)-dependence on time is near-optimal, and the e O(d)-dependence on feature dimension is standard in linear bandits [1, 33], since e O( √ d) results are only known for impractical algorithms. The e O(L −K) factor is due to the fact that the reward in this problem is from K to L, rather than from 0 to 1. To explain the e O(|E|) factor in this bound, notice that one e O( p |E|) factor is due to the fact that at most e O(|E|) edges might be observed at each round (see Theorem 3), and is intrinsic to the problem similarly to combinatorial semi-bandits [19]; another e O( p |E|) factor is due to linear generalization (see Lemma 1) and might be removed by better analysis. We conjecture that our e O (d(L −K)|E|√n/(αγ)) regret bound in this case is at most e O( p |E|d) away from being tight. 4.3 Proof sketch We now outline the proof of Theorem 1. For each round t ≤n, we define the favorable event ξt−1 = {|xT e(θτ−1 −θ∗)| ≤c q xTeM−1 τ−1xe, ∀e ∈E, ∀τ ≤t}, and the unfavorable event ξt−1 as the complement of ξt−1. If we decompose E[Rαγ t ], the (αγ)-scaled expected regret at round t, over events ξt−1 and ξt−1, and bound Rαγ t on event ξt−1 using the naïve bound Rαγ t ≤L −K, then, E[Rαγ t ] ≤P (ξt−1) E [Rαγ t |ξt−1] + P ξt−1 [L −K]. By choosing c as specified by Equation 4, we have P ξt−1 [L −K] < 1/n (see Lemma 2 in the appendix). On the other hand, notice that by definition of ξt−1, w(e) ≤Ut(e), ∀e ∈E under event ξt−1. Using the monotonicity of f in the probability weight, and the fact that ORACLE is an (α, γ)-approximation algorithm, we have E [Rαγ t |ξt−1] ≤E [f(St, Ut) −f(St, w)|ξt−1] /(αγ). The next observation is that, from the linearity of expectation, the gap f(St, Ut) −f(St, w) decomposes over nodes v ∈V \ St. Specifically, for any source node set S ⊆V, any probability weight function w : E →[0, 1], and any node v ∈V, we define f(S, w, v) as the probability that node v is influenced if the source node set is S and the probability weight is w. Hence, we have f(St, Ut) −f(St, w) = P v∈V\St [f(St, Ut, v) −f(St, w, v)] . 7 8 16 24 32 L 210 212 214 216 Regret ! = 0.8, X = I Star Ray 8 16 24 32 L 29 211 213 215 Regret ! = 0.7, X = I 8 16 24 32 L 28 29 210 211 Regret ! = 0.8, X = X4 (a) Stars and rays: The log-log plots of the n-step regret of IMLinUCB in two graph topologies after n = 104 steps. We vary the number of nodes L and the mean edge weight ω. 0 1000 2000 3000 4000 5000 Number of Rounds 0 0.5 1 1.5 2 2.5 Cumulative Regret #105 CUCB IMLinUCB with d=10 (b) Subgraph of Facebook network Figure 2: Experimental results In the appendix, we show that under any weight function, the diffusion process from the source node set St to the target node v can be modeled as a Markov chain. Hence, weight function Ut and w give us two Markov chains with the same state space but different transition probabilities. f(St, Ut, v) − f(St, w, v) can be recursively bounded based on the state diagram of the Markov chain under weight function w. With some algebra, Theorem 3 in Appendix A bounds f(St, Ut, v) −f(St, w, v) by the edge-level gap Ut(e) −w(e) on the observed relevant edges for node v, f(St, Ut, v) −f(St, w, v) ≤P e∈ESt,v E [1 {Ot(e)} [Ut(e) −w(e)]|Ht−1, St] , (9) for any t, any “history" (past observations) Ht−1 and St such that ξt−1 holds, and any v ∈V \ St, where ESt,v is the set of edges relevant to v and Ot(e) is the event that edge e is observed at round t. Based on Equation 9, we can prove Theorem 1 using the standard linear-bandit techniques (see Appendix A). 5 Experiments In this section, we present a synthetic experiment in order to empirically validate our upper bounds on the regret. Next, we evaluate our algorithm on a real-world Facebook subgraph. 5.1 Stars and rays In the first experiment, we evaluate IMLinUCB on undirected stars and rays (Figure 1) and validate that the regret grows with the number of nodes L and the maximum observed relevance C∗as shown in Table 1. We focus on the tabular case (X = I) with K = |S| = 1, where the IM problem can be solved exactly. We vary the number of nodes L; and edge weight w(e) = ω, which is the same for all edges e. We run IMLinUCB for n = 104 steps and verify that it converges to the optimal solution in each experiment. We report the n-step regret of IMLinUCB for 8 ≤L ≤32 in Figure 2a. Recall that from Table 1, R(n) = e O(L2) for star and R(n) = e O(L 9 4 ) for ray. We numerically estimate the growth of regret in L, the exponent of L, in the log-log space of L and regret. In particular, since log(f(L)) = p log(L) + log(c) for any f(L) = cLp and c > 0, both p and log(c) can be estimated by linear regression in the new space. For star graphs with ω = 0.8 and ω = 0.7, our estimated growth are respectively O(L2.040) and O(L2.056), which are close to the expected e O(L2). For ray graphs with ω = 0.8 and ω = 0.7, our estimated growth are respectively O(L2.488) and O(L2.467), which are again close to the expected e O(L 9 4 ). This shows that maximum observed relevance C∗proposed in Section 4.1 is a reasonable complexity metric for these two topologies. 5.2 Subgraph of Facebook network In the second experiment, we demonstrate the potential performance gain of IMLinUCB in realworld influence maximization semi-bandit problems by exploiting linear generalization across edges. Specifically, we compare IMLinUCB with CUCB in a subgraph of Facebook network from [22]. The subgraph has L = |V| = 327 nodes and |E| = 5038 directed edges. Since the true probability weight 8 function w is not available, we independently sample w(e)’s from the uniform distribution U(0, 0.1) and treat them as ground-truth. Note that this range of probabilities is guided by empirical evidence in [14, 3]. We set n = 5000 and K = 10 in this experiment. For IMLinUCB, we choose d = 10 and generate edge feature xe’s as follows: we first use node2vec algorithm [15] to generate a node feature in ℜd for each node v ∈V; then for each edge e, we generate xe as the element-wise product of node features of the two nodes connected to e. Note that the linear generalization in this experiment is imperfect in the sense that minθ∈ℜd maxe∈E |w(e) −xT e θ| > 0. For both CUCB and IMLinUCB, we choose ORACLE as the state-of-the-art offline IM algorithm proposed in [27]. To compute the cumulative regret, we compare against a fixed seed set S∗obtained by using the true w as input to the oracle proposed in [27]. We average the empirical cumulative regret over 10 independent runs, and plot the results in Figure 2b. The experimental results show that compared with CUCB, IMLinUCB can significantly reduce the cumulative regret by exploiting linear generalization across w(e)’s. 6 Related Work There exist prior results on IM semi-bandits [21, 8, 31]. First, Lei et al. [21] gave algorithms for the same feedback model as ours. The algorithms are not analyzed and cannot solve large-scale problems because they estimate each edge weight independently. Second, our setting is a special case of stochastic combinatorial semi-bandit with a submodular reward function and stochastically observed edges [8]. Their work is the closest related work. Their gap-dependent and gap-free bounds are both problematic because they depend on the reciprocal of the minimum observation probability p∗of an edge: Consider a line graph with |E| edges where all edge weights are 0.5. Then 1/p∗is 2|E|−1. On the other hand, our derived regret bounds in Theorem 1 are polynomial in all quantities of interest. A very recent result of Wang and Chen [32] removes the 1/p∗factor in [8] for the tabular case and presents a worst-case bound of e O(L|E|√n), which in the tabular complete graph case improves over our result by e O(L). On the other hand, their analysis does not give structural guarantees that we provide with maximum observed relevance C∗obtaining potentially much better results for the case in hand and giving insights for the complexity of IM bandits. Moreover, both Chen et al. [8] and Wang and Chen [32] do not consider generalization models across edges or nodes, and therefore their proposed algorithms are unlikely to be practical for real-world social networks. In contrast, our proposed algorithm scales to large problems by exploiting linear generalization across edges. IM bandits for different influence models and settings: There exist a number of extensions and related results for IM bandits. We only mention the most related ones (see [28] for a recent survey). Vaswani et al. [31] proposed a learning algorithm for a different and more challenging feedback model, where the learning agent observes influenced nodes but not the edges, but they do not give any guarantees. Carpentier and Valko [5] give a minimax optimal algorithm for IM bandits but only consider a local model of influence with a single source and a cascade of influences never happens. In related networked bandits [11], the learner chooses a node and its reward is the sum of the rewards of the chosen node and its neighborhood. The problem gets more challenging when we allow the influence probabilities to change [2], when we allow the seed set to be chosen adaptively [30], or when we consider a continuous model [12]. Furthermore, Sigla et al. [26] treats the IM setting with an additional observability constraints, where we face a restriction on which nodes we can choose at each round. This setting is also related to the volatile multi-armed bandits where the set of possible arms changes [4]. Vaswani et al. [29] proposed a diffusion-independent algorithm for IM semi-bandits with a wide range of diffusion models, based on the maximum-reachability approximation. Despite its wide applicability, the maximum reachability approximation introduces an additional approximation factor to the scaled regret bounds. As they have discussed, this approximation factor can be large in some cases. Lagrée et al. [20] treat a persistent extension of IM bandits when some nodes become persistent over the rounds and no longer yield rewards. This work is also a generalization and extension of recent work on cascading bandits [17, 18, 34], since cascading bandits can be viewed as variants of online influence maximization problems with special topologies (chains). Acknowledgements The research presented was supported by French Ministry of Higher Education and Research, Nord-Pas-de-Calais Regional Council and French National Research Agency projects ExTra-Learn (n.ANR-14-CE24-0010-01) and BoB (n.ANR-16-CE23-0003). We would also like to thank Dr. Wei Chen and Mr. Qinshi Wang for pointing out a mistake in an earlier version of this paper. 9 References [1] Yasin Abbasi-Yadkori, Dávid Pál, and Csaba Szepesvári. Improved algorithms for linear stochastic bandits. In Neural Information Processing Systems, 2011. [2] Yixin Bao, Xiaoke Wang, Zhi Wang, Chuan Wu, and Francis C. M. Lau. Online influence maximization in non-stationary social networks. In International Symposium on Quality of Service, apr 2016. [3] Nicola Barbieri, Francesco Bonchi, and Giuseppe Manco. Topic-aware social influence propagation models. Knowledge and information systems, 37(3):555–584, 2013. [4] Zahy Bnaya, Rami Puzis, Roni Stern, and Ariel Felner. Social network search as a volatile multi-armed bandit problem. Human Journal, 2(2):84–98, 2013. [5] Alexandra Carpentier and Michal Valko. Revealing graph bandits for maximizing local influence. In International Conference on Artificial Intelligence and Statistics, 2016. [6] Wei Chen, Chi Wang, and Yajun Wang. Scalable influence maximization for prevalent viral marketing in large-scale social networks. In Knowledge Discovery and Data Mining, 2010. [7] Wei Chen, Yajun Wang, and Yang Yuan. Combinatorial multi-armed bandit: General framework, results and applications. In International Conference on Machine Learning, 2013. [8] Wei Chen, Yajun Wang, and Yang Yuan. Combinatorial multi-armed bandit and its extension to probabilistically triggered arms. Journal of Machine Learning Research, 17, 2016. [9] Varsha Dani, Thomas P Hayes, and Sham M Kakade. Stochastic linear optimization under bandit feedback. In Conference on Learning Theory, 2008. [10] David Easley and Jon Kleinberg. Networks, Crowds, and Markets: Reasoning About a Highly Connected World. Cambridge University Press, 2010. [11] Meng Fang and Dacheng Tao. Networked bandits with disjoint linear payoffs. In International Conference on Knowledge Discovery and Data Mining, 2014. [12] Mehrdad Farajtabar, Xiaojing Ye, Sahar Harati, Le Song, and Hongyuan Zha. Multistage campaigning in social networks. In Neural Information Processing Systems, 2016. [13] M Gomez Rodriguez, B Schölkopf, Langford J Pineau, et al. Influence maximization in continuous time diffusion networks. In International Conference on Machine Learning, 2012. [14] Amit Goyal, Francesco Bonchi, and Laks VS Lakshmanan. Learning influence probabilities in social networks. In Proceedings of the third ACM international conference on Web search and data mining, pages 241–250. ACM, 2010. [15] Aditya Grover and Jure Leskovec. node2vec: Scalable feature learning for networks. In Knowledge Discovery and Data Mining. ACM, 2016. [16] David Kempe, Jon Kleinberg, and Éva Tardos. Maximizing the spread of influence through a social network. Knowledge Discovery and Data Mining, page 137, 2003. [17] Branislav Kveton, Csaba Szepesvari, Zheng Wen, and Azin Ashkan. Cascading bandits: Learning to rank in the cascade model. In Proceedings of the 32nd International Conference on Machine Learning, 2015. [18] Branislav Kveton, Zheng Wen, Azin Ashkan, and Csaba Szepesvari. Combinatorial cascading bandits. In Advances in Neural Information Processing Systems 28, pages 1450–1458, 2015. [19] Branislav Kveton, Zheng Wen, Azin Ashkan, and Csaba Szepesvari. Tight regret bounds for stochastic combinatorial semi-bandits. In Proceedings of the 18th International Conference on Artificial Intelligence and Statistics, 2015. [20] Paul Lagrée, Olivier Cappé, Bogdan Cautis, and Silviu Maniu. Effective large-scale online influence maximization. In International Conference on Data Mining, 2017. 10 [21] Siyu Lei, Silviu Maniu, Luyi Mo, Reynold Cheng, and Pierre Senellart. Online influence maximization. In Knowledge Discovery and Data mining, 2015. [22] Jure Leskovec and Andrej Krevl. Snap datasets: Stanford large network dataset collection. http://snap.stanford.edu/data, jun 2014. [23] Yanhua Li, Wei Chen, Yajun Wang, and Zhi-Li Zhang. Influence diffusion dynamics and influence maximization in social networks with friend and foe relationships. In ACM international conference on Web search and data mining. ACM, 2013. [24] Praneeth Netrapalli and Sujay Sanghavi. Learning the graph of epidemic cascades. In ACM SIGMETRICS Performance Evaluation Review, volume 40, pages 211–222. ACM, 2012. [25] Kazumi Saito, Ryohei Nakano, and Masahiro Kimura. Prediction of information diffusion probabilities for independent cascade model. In Knowledge-Based Intelligent Information and Engineering Systems, pages 67–75, 2008. [26] Adish Singla, Eric Horvitz, Pushmeet Kohli, Ryen White, and Andreas Krause. Information gathering in networks via active exploration. In International Joint Conferences on Artificial Intelligence, 2015. [27] Youze Tang, Xiaokui Xiao, and Shi Yanchen. Influence maximization: Near-optimal time complexity meets practical efficiency. 2014. [28] Michal Valko. Bandits on graphs and structures. habilitation, École normale supérieure de Cachan, 2016. [29] Sharan Vaswani, Branislav Kveton, Zheng Wen, Mohammad Ghavamzadeh, Laks VS Lakshmanan, and Mark Schmidt. Model-independent online learning for influence maximization. In International Conference on Machine Learning, 2017. [30] Sharan Vaswani and Laks V. S. Lakshmanan. Adaptive influence maximization in social networks: Why commit when you can adapt? Technical report, 2016. [31] Sharan Vaswani, Laks. V. S. Lakshmanan, and Mark Schmidt. Influence maximization with bandits. In NIPS workshop on Networks in the Social and Information Sciences 2015, 2015. [32] Qinshi Wang and Wei Chen. Improving regret bounds for combinatorial semi-bandits with probabilistically triggered arms and its applications. In Neural Information Processing Systems, mar 2017. [33] Zheng Wen, Branislav Kveton, and Azin Ashkan. Efficient learning in large-scale combinatorial semi-bandits. In International Conference on Machine Learning, 2015. [34] Shi Zong, Hao Ni, Kenny Sung, Nan Rosemary Ke, Zheng Wen, and Branislav Kveton. Cascading bandits for large-scale recommendation problems. In Uncertainty in Artificial Intelligence, 2016. 11 | 2017 | 295 |
6,780 | Smooth Primal-Dual Coordinate Descent Algorithms for Nonsmooth Convex Optimization Ahmet Alacaoglu1 Quoc Tran-Dinh2 Olivier Fercoq3 Volkan Cevher1 1Laboratory for Information and Inference Systems (LIONS), EPFL, Lausanne, Switzerland {ahmet.alacaoglu, volkan.cevher}@epfl.ch 2 Department of Statistics and Operations Research, UNC-Chapel Hill, NC, USA quoctd@email.unc.edu 3 LTCI, Télécom ParisTech, Université Paris-Saclay, Paris, France olivier.fercoq@telecom-paristech.fr Abstract We propose a new randomized coordinate descent method for a convex optimization template with broad applications. Our analysis relies on a novel combination of four ideas applied to the primal-dual gap function: smoothing, acceleration, homotopy, and coordinate descent with non-uniform sampling. As a result, our method features the first convergence rate guarantees among the coordinate descent methods, that are the best-known under a variety of common structure assumptions on the template. We provide numerical evidence to support the theoretical results with a comparison to state-of-the-art algorithms. 1 Introduction We develop randomized coordinate descent methods to solve the following composite convex problem: F ⋆= min x∈Rp {F(x) = f(x) + g(x) + h(Ax)} , (1) where f : Rp →R, g : Rp →R ∪{+∞}, and h : Rm →R ∪{+∞} are proper, closed and convex functions, A ∈Rm×p is a given matrix. The optimization template (1) covers many important applications including support vector machines, sparse model selection, logistic regression, etc. It is also convenient to formulate generic constrained convex problems by choosing an appropriate h. Within convex optimization, coordinate descent methods have recently become increasingly popular in the literature [1–6]. These methods are particularly well-suited to solve huge-scale problems arising from machine learning applications where matrix-vector operations are prohibitive [1]. To our knowledge, there is no coordinate descent method for the general three-composite form (1) within our structure assumptions studied here that has rigorous convergence guarantees. Our paper specifically fills this gap. For such a theoretical development, coordinate descent algorithms require specific assumptions on the convex optimization problems [1, 4, 6]. As a result, to rigorously handle the three-composite case, we assume that (i) f is smooth, (ii) g is non-smooth but decomposable (each component has an “efficiently computable” proximal operator), and (iii) h is non-smooth. Our approach: In a nutshell, we generalize [4, 7] to the three composite case (1). For this purpose, we combine several classical and contemporary ideas: We exploit the smoothing technique in [8], the efficient implementation technique in [4, 14], the homotopy strategy in [9], and the nonuniform coordinate selection rule in [7] in our algorithm, to achieve the best known complexity estimate for the template. Surprisingly, the combination of these ideas is achieved in a very natural and elementary primal-dual gap-based framework. However, the extension is indeed not trivial since it requires to deal with the composition of a non-smooth function h and a linear operator A. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. While our work has connections to the methods developed in [7, 10, 11], it is rather distinct. First, we consider a more general problem (1) than the one in [4, 7, 10]. Second, our method relies on Nesterov’s accelerated scheme rather than a primal-dual method as in [11]. Moreover, we obtain the first rigorous convergence rate guarantees as opposed to [11]. In addition, we allow using any sampling distribution for choosing the coordinates. Our contributions: We propose a new smooth primal-dual randomized coordinate descent method for solving (1) where f is smooth, g is nonsmooth, separable and has a block-wise proximal operator, and h is a general nonsmooth function. Under such a structure, we show that our algorithm achieves the best known O(n/k) convergence rate, where k is the iteration count and to our knowledge, this is the first time that this convergence rate is proven for a coordinate descent algorithm. We instantiate our algorithm to solve special cases of (1) including the case g = 0 and constrained problems. We analyze the convergence rate guarantees of these variants individually and discuss the choices of sampling distributions. Exploiting the strategy in [4, 14], our algorithm can be implemented in parallel by breaking up the full vector updates. We also provide a restart strategy to enhance practical performance. Paper organization: We review some preliminary results in Section 2. The main contribution of this paper is in Section 3 with the main algorithm and its convergence guarantee. We also present special cases of the proposed algorithm. Section 4 provides numerical evidence to illustrate the performance of our algorithms in comparison to existing methods. The proofs are deferred to the supplementary document. 2 Preliminaries Notation: Let [n] := {1, 2, · · · , n} be the set of n positive integer indices. Let us decompose the variable vector x into n-blocks denoted by xi as x = [x1; x2; · · · ; xn] such that each block xi has the size pi ≥1 with Pn i=1 pi = p. We also decompose the identity matrix Ip of Rp into n block as Ip = [U1, U2, · · · , Un], where Ui ∈Rp×pi has pi unit vectors. In this case, any vector x ∈Rp can be written as x = Pn i=1 Uixi, and each block becomes xi = U ⊤ i x for i ∈[n]. We define the partial gradients as ∇if(x) = U ⊤ i ∇f(x) for i ∈[n]. For a convex function f, we use dom (f) to denote its domain, f ∗(x) := supu u⊤x −f(u) to denote its Fenchel conjugate, and proxf(x) := arg minu f(u) + (1/2)∥u −x∥2 to denote its proximal operator. For a convex set X, δX (·) denotes its indicator function. We also need the following weighted norms: ∥xi∥2 (i) = ⟨Hixi, xi⟩, (∥yi∥∗ (i))2 = ⟨H−1 i yi, yi⟩, ∥x∥2 [α] = Pn i=1 Lα i ∥xi∥2 (i), (∥y∥∗ [α])2 = Pn i=1 L−α i (∥yi∥∗ (i))2. (2) Here, Hi ∈Rpi×pi is a symmetric positive definite matrix, and Li ∈(0, ∞) for i ∈[n] and α > 0. In addition, we use ∥· ∥to denote ∥· ∥2. Formal assumptions on the template: We require the following assumptions to tackle (1): Assumption 1. The functions f, g and h are all proper, closed and convex. Moreover, they satisfy (a) The partial derivative ∇if(·) of f is Lipschitz continuous with the Lipschitz constant ˆLi ∈[0, +∞), i.e., ∥∇if(x + Uidi) −∇if(x)∥∗ (i) ≤ˆLi∥di∥(i) for all x ∈Rp, di ∈Rpi. (b) The function g is separable, which has the following form g(x) = Pn i=1 gi(xi). (c) One of the following assumptions for h holds for Subsections 3.3 and 3.4, respectively: i. h is Lipschitz continuous which is equivalent to the boundedness of dom (h∗). ii. h is the indicator function for an equality constraint, i.e., h(Ax) := δ{c}(Ax). Now, we briefly describe the main techniques used in this paper. Acceleration: Acceleration techniques in convex optimization date back to the seminal work of Nesterov in [13], and is one of standard techniques in convex optimization. We exploit such a scheme to achieve the best known O(1/k) rate for the nonsmooth template (1). Nonuniform distribution: We assume that ξ is a random index on [n] associated with a probability distribution q = (q1, · · · , qn)⊤such that P {ξ = i} = qi > 0, i ∈[n], and n X i=1 qi = 1. (3) 2 When qi = 1 n for all i ∈[n], we obtain the uniform distribution. Let i0, i1, · · · , ik be i.i.d. realizations of the random index ξ after k iteration. We define Fk+1 = σ(i0, i1, · · · , ik) as the σ-field generated by these realizations. Smoothing techniques: We can write the convex function h(u) = supy {⟨u, y⟩−h∗(y)} using its Fenchel conjugate h∗. Since h in (1) is convex but possibly nonsmooth, we smooth h as hβ(u) := max y∈Rm n ⟨u, y⟩−h∗(y) −β 2 ∥y −˙y∥2o , (4) where ˙y ∈Rm is given and β > 0 is the smoothness parameter. Moreover, the quadratic function b(y, ˙y) = 1 2∥y −˙y∥2 is defined based on a given norm in Rm. Let us denote by y∗ β(u), the unique solution of this concave maximization problem in (4), i.e.: y∗ β(u) := arg max y∈Rm n ⟨u, y⟩−h∗(y) −β 2 ∥y −˙y∥2o = proxβ−1h∗ ˙y + β−1u , (5) where proxh∗is the proximal operator of h∗. If we assume that h is Lipschitz continuous, or equivalently that dom (h∗) is bounded, then it holds that hβ(u) ≤h(u) ≤hβ(u) + βD2 h∗ 2 , where Dh∗:= max y∈dom(h∗) ∥y −˙y∥< +∞. (6) Let us define a new smoothed function ψβ(x) := f(x) + hβ(Ax). Then, ψβ is differentiable, and its block partial gradient ∇iψβ(x) = ∇if(x) + A⊤ i y∗ β(Ax) (7) is also Lipschitz continuous with the Lipschitz constant Li(β) := ˆLi + ∥Ai∥2 β , where ˆLi is given in Assumption 1, and Ai ∈Rm×pi is the i-th block of A. Homotopy: In smoothing-based methods, the choice of the smoothness parameter is critical. This choice may require the knowledge of the desired accuracy, number of maximum iterations or the diameters of the primal and/or dual domains as in [8]. In order to make this choice flexible and our method applicable to the constrained problems, we employ a homotopy strategy developed in [9] for deterministic algorithms, to gradually update the smoothness parameter while making sure that it converges to 0. 3 Smooth primal-dual randomized coordinate descent In this section, we develop a smoothing primal-dual method to solve (1). Or approach is to combine the four key techniques mentioned above: smoothing, acceleration, homotopy, and randomized coordinate descent. Similar to [7] we allow to use arbitrary nonuniform distribution, which may allow to design a good distribution that captures the underlying structure of specific problems. 3.1 The algorithm Algorithm 1 below smooths, accelerates, and randomizes the coordinate descent method. Algorithm 1. SMooth, Accelerate, Randomize The Coordinate Descent (SMART-CD) Input: Choose β1 > 0 and α ∈[0, 1] as two input parameters. Choose x0 ∈Rp. 1 Set B0 i := ˆLi + ∥Ai∥2 β1 for i ∈[n]. Compute Sα := Pn i=1(B0 i )α and qi := (B0 i )α Sα for all i ∈[n]. 2 Set τ0 := min {qi | 1 ≤i ≤n} ∈(0, 1] for i ∈[n]. Set ¯x0 = ˜x0 := x0. 3 for k ←0, 1, · · · , kmax do 4 Update ˆxk := (1 −τk)¯xk + τk˜xk and compute ˆuk := Aˆxk. 5 Compute the dual step y∗ k := y∗ βk+1(ˆuk) = proxβ−1 k+1h∗ ˙y + β−1 k+1ˆuk . 6 Select a block coordinate ik ∈[n] according to the probability distribution q. 7 Set ˜xk+1 := ˜xk, and compute the primal ik-block coordinate: ˜xk+1 ik := argmin xik ∈R pik n ⟨∇ikf(ˆxk) + A⊤ iky∗ k, xik −ˆxk ik⟩+ gik(xik) + τkBk ik 2τ0 ∥xik −˜xk ik∥2 (ik) o . 8 Update ¯xk+1 := ˆxk + τk τ0 (˜xk+1 −˜xk). 9 Compute τk+1 ∈(0, 1) as the unique positive root of τ 3 + τ 2 + τ 2 kτ −τ 2 k = 0. 10 Update βk+2 := βk+1 1+τk+1 and Bk+1 i := ˆLi + ∥Ai∥2 βk+2 for i ∈[n]. 11 end for 3 From the update ¯xk := ˆxk−1 + τk−1 τ0 (˜xk −˜xk−1) and ˆxk := (1 −τk)¯xk + τk˜xk, it directly follows that ˆxk := (1 −τk) ˆxk−1 + τk−1 τ0 (˜xk −˜xk−1) + τk˜xk. Therefore, it is possible to implement the algorithm without forming ¯xk. 3.2 Efficient implementation While the basic variant in Algorithm 1 requires full vector updates at each iteration, we exploit the idea in [4, 14] and show that we can partially update these vectors in a more efficient manner. Algorithm 2. Efficient SMART-CD Input: Choose a parameter β1 > 0 and α ∈[0, 1] as two input parameters. Choose x0 ∈Rp. 1 Set B0 i := ˆLi + ∥Ai∥2 β1 for i ∈[n]. Compute Sα := Pn i=1(B0 i )α and qi := (B0 i )α Sα for all i ∈[n]. 2 Set τ0 := min {qi | 1 ≤i ≤n} ∈(0, 1] for i ∈[n] and c0 = (1 −τ0). Set u0 = ˜z0 := x0. 3 for k ←0, 1, · · · , kmax do 4 Compute the dual step y∗ βk+1(ckAuk + A˜zk) := proxβ−1 k+1h∗ ˙y + β−1 k+1(ckAuk + A˜zk) . 5 Select a block coordinate ik ∈[n] according to the probability distribution q. 6 Let ∇k i := ∇ikf(ckuk + ˜zk) + A⊤ iky∗ βk+1(ckAuk + A˜zk). Compute tk+1 ik := arg min t∈R pik n ⟨∇k i , t⟩+ gik(t + ˜zk ik) + τkBk ik 2τ0 ∥t∥2 (ik) o . 7 Update ˜zk+1 ik := ˜zk ik + tk+1 ik . 8 Update uk+1 ik := uk ik −1−τk/τ0 ck tk+1 ik . 9 Compute τk+1 ∈(0, 1) as the unique positive root of τ 3 + τ 2 + τ 2 kτ −τ 2 k = 0. 10 Update βk+2 := βk+1 1+τk+1 and Bk+1 i := ˆLi + ∥Ai∥2 βk+2 for i ∈[n]. 11 end for We present the following result which shows the equivalence between Algorithm 1 and Algorithm 2, the proof of which can be found in the supplementary document. Proposition 3.1. Let ck = Qk l=0(1 −τl), ˆzk = ckuk + ˜zk and ¯zk = ck−1uk + ˜zk. Then, ˜xk = ˜zk, ˆxk = ˆzk and ¯xk = ¯zk, for all k ≥0, where ˜xk, ˆxk, and ¯xk are defined in Algorithm 1. According to Algorithm 2, we never need to form or update full-dimensional vectors. Only times that we need ˆxk are when computing the gradient and the dual variable y∗ βk+1. We present two special cases which are common in machine learning, in which we can compute these steps efficiently. Remark 3.2. Under the following assumptions, we can characterize the per-iteration complexity explicitly. Let A, M ∈Rm×p, and (a) f has the form f(x) = Pm j=1 φj(e⊤ j Mx), where ej is the jth standard unit vector. (b) h is separable as in h(Ax) = δ{c}(Ax) or h(Ax) = ∥Ax∥1. Assuming that we store and maintain the residuals rk u,f = Muk, rk ˜z,f = M ˜zk, rk u,h = Auk, rk ˜z,h = A˜zk, then we have the per-iteration cost as O(max{|{j | Aji ̸= 0}|, |{j | Mji ̸= 0}|}) arithmetic operations. If h is partially separable as in [3], then the complexity of each iteration will remain moderate. 3.3 Case 1: Convergence analysis of SMART-CD for Lipschitz continuous h We provide the following main theorem, which characterizes the convergence rate of Algorithm 1. Theorem 3.3. Let x⋆be an optimal solution of (1) and let β1 > 0 be given. In addition, let τ0 := min {qi | i ∈[n]} ∈(0, 1] and β0 := (1 + τ0)β1 be given parameters. For all k ≥1, the sequence ¯xk generated by Algorithm 1 satisfies: E F(¯xk) −F ⋆ ≤ C∗(x0) τ0(k −1) + 1 + β1(1 + τ0)D2 h∗ 2(τ0k + 1) , (8) where C∗(x0) := (1 −τ0)(Fβ0(x0) −F ⋆) + Pn i=1 τ0B0 i 2qi ∥x⋆ i −x0 i ∥2 (i) and Dh∗is as defined by (6). 4 In the special case when we use uniform distribution, τ0 = qi = 1/n, the convergence rate reduces to E F(¯xk) −F ⋆ ≤nC∗(x0) k + n −1 + (n + 1)β0D2 h∗ 2k + 2n , where C∗(x0) := (1 −1 n)(Fβ0(x0) −F ⋆) + Pn i=1 B0 i 2 ∥x⋆ i −x0 i ∥2 (i). This estimate shows that the convergence rate of Algorithm 1 is O n k , which is the best known so far to the best of our knowledge. 3.4 Case 2: Convergence analysis of SMART-CD for non-smooth constrained optimization In this section, we instantiate Algorithm 1 to solve constrained convex optimization problem with possibly non-smooth terms in the objective. Clearly, if we choose h(·) = δ{c}(·) in (1) as the indicator function of the set {c} for a given vector c ∈Rm, then we obtain a constrained problem: F ⋆:= min x∈Rp {F(x) = f(x) + g(x) | Ax = c} , (9) where f and g are defined as in (1), A ∈Rm×p, and c ∈Rm. We can specify Algorithm 1 to solve this constrained problem by modifying the following two steps: (a) The update of y∗ βk+1(Aˆxk) at Step 5 is changed to y∗ βk+1(Aˆxk) := ˙y + 1 βk+1 (Aˆxk −c), (10) which requires one matrix-vector multiplication in Aˆxk. (b) The update of τk at Step 9 and βk+1 at Step 10 are changed to τk+1 := τk 1+τk and βk+2 := (1 −τk+1)βk+1. (11) Now, we analyze the convergence of this algorithm by providing the following theorem. Theorem 3.4. Let ¯xk be the sequence generated by Algorithm 1 for solving (9) using the updates (10) and (11) and let y⋆be an arbitrary optimal solution of the dual problem of (9). In addition, let τ0 := min {qi | i ∈[n]} ∈(0, 1] and β0 := (1 + τ0)β1 be given parameters. Then, we have the following estimates: E F(¯xk) −F ⋆ ≤ C∗(x0) τ0(k−1)+1 + β1∥y⋆−˙y∥2 2(τ0(k−1)+1) + ∥y⋆∥E ∥A¯xk −b∥ , E ∥A¯xk −b∥ ≤ β1 τ0(k−1)+1 h ∥y⋆−˙y∥+ ∥y⋆−˙y∥2 + 2β−1 1 C∗(x0) 1/2i , (12) where C∗(x0) := (1 −τ0)(Fβ0(x0) −F ⋆) + Pn i=1 τ0B0 i 2qi ∥x⋆ i −x0 i ∥2 (i). We note that the following lower bound always holds −∥y⋆∥E ∥A¯xk −b∥ ≤E F(¯xk) −F ⋆ . 3.5 Other special cases We consider the following special cases of Algorithm 1: The case h = 0: In this case, we obtain an algorithm similar to the one studied in [7] except that we have non-uniform sampling instead of importance sampling. If the distribution is uniform, then we obtain the method in [4]. The case g = 0: In this case, we have F(x) = f(x) + h(Ax), which can handle the linearly constrained problems with smooth objective function. In this case, we can choose τ0 = 1, and the coordinate proximal gradient step, Step 7 in Algorithm 1, is simplified as ˜xk+1 ik := ˜xk ik − qik τkBk ik H−1 ik ∇ikf(ˆxk) + A⊤ iky∗ βk+1(ˆuk) . (13) In addition, we replace Step 8 with ¯xk+1 i = ˆxk i + τk qi (˜xk+1 i −˜xk i ), ∀i ∈[n]. (14) We then obtain the following results: 5 Corollary 3.5. Assume that Assumption 1 holds. Let τ0 = 1, β1 > 0 and Step 7 and 8 of Algorithm 1 be updated by (13) and (14), respectively. If, in addition, h is Lipschitz continuous, then we have E F(¯xk) −F ⋆ ≤1 k n X i=1 B0 i 2q2 i ∥x⋆ i −x0 i ∥2 (i) + β1D2 h∗ k + 1 , (15) where Dh∗is defined by (6). If, instead of Lipschitz continuous h, we have h(·) = δ{c}(·) to solve the constrained problem (9) with g = 0, then we have E F(¯xk) −F ⋆ ≤C∗(x0) k + β1∥y⋆−˙y∥2 2k + ∥y⋆∥E ∥A¯xk −b∥ , E ∥A¯xk −b∥ ≤β1 k h ∥y⋆−˙y∥+ ∥y⋆−˙y∥2 + 2β−1 1 C∗(x0) 1/2i , (16) where C∗(x0) := nP i=1 B0 i 2q2 i ∥x⋆ i −x0 i ∥2 (i). 3.6 Restarting SMART-CD It is known that restarting an accelerated method significantly enhances its practical performance when the underlying problem admits a (restricted) strong convexity condition. As a result, we describe below how to restart (i.e., the momentum term) in Efficient SMART-CD. If the restart is injected in the k-th iteration, then we restart the algorithm with the following steps: uk+1 ←0, rk+1 u,f ←0, rk+1 u,h ←0, ˙y ←y∗ βk+1(ckrk u,h + rk ˜z,h), βk+1 ←β1, τk+1 ←τ0, ck ←1. The first three steps of the restart procedure is for restarting the primal variable which is classical [15]. Restarting ˙y is also suggested in [9]. The cost of this procedure is essentially equal to the cost of one iteration as described in Remark 3.2, therefore even restarting once every epoch will not cause a significant difference in terms of per-iteration cost. 4 Numerical evidence We illustrate the performance of Efficient SMART-CD in brain imaging and support vector machines applications. We also include one representative example of a degenerate linear program to illustrate why the convergence rate guarantees of our algorithm matter. We compare SMART-CD with VuCondat-CD [11], which is a coordinate descent variant of Vu-Condat’s algorithm [16], FISTA [17], ASGARD [9], Chambolle-Pock’s primal-dual algorithm [18], L-BFGS [19] and SDCA [5]. 4.1 A degenerate linear program: Why do convergence rate guarantees matter? We consider the following degenerate linear program studied in [9]: min x∈Rp 2xp s.t. Pp−1 k=1 xk = 1, xp −Pp−1 k=1 xk = 0, (2 ≤j ≤d), xp ≥0. (17) Here, the constraint xp −Pp−1 k=1 xk = 0 is repeated d times. This problem satisfies the linear constraint qualification condition, which guarantees the primal-dual optimality. If we define f(x) = 2xp, g(x) = δ{xp≥0}(xp), h(Ax) = δ{c}(Ax), where Ax = "p−1 X k=1 xk, xp − p−1 X k=1 xk, . . . , xp − p−1 X k=1 xk #⊤ , c = [1, 0, . . . , 0]⊤, we can fit this problem and its dual form into our template (1). 6 0 200 400 600 800 1000 epoch 10-6 10-4 10-2 100 102 F(x)-F* SMART-CD SMART-CD-Restart Vu-Condat-CD 0 200 400 600 800 1000 epoch 10-6 10-4 10-2 100 102 ||Ax-c|| Figure 1: The convergence behavior of 3 algorithms on a degenerate linear program. For this experiment, we select the dimensions p = 10 and d = 200. We implement our algorithm and compare it with Vu-Condat-CD. We also combine our method with the restarting strategy proposed above. We use the same mapping to fit the problem into the template of Vu-Condat-CD. Figure 1 illustrates the convergence behavior of Vu-Condat-CD and SMART-CD. We compare primal suboptimality and feasibility in the plots. The explicit solution of the problem is used to generate the plot with primal suboptimality. We observe that degeneracy of the problem prevents Vu-Condat-CD from making any progress towards the solution, where SMART-CD preserves O(1/k) rate as predicted by theory. We emphasize that the authors in [11] proved almost sure convergence for Vu-Condat-CD but they did not provide a convergence rate guarantee for this method. Since the problem is certainly non-strongly convex, restarting does not significantly improve performance of SMART-CD. 4.2 Total Variation and ℓ1-regularized least squares regression with functional MRI data In this experiment, we consider a computational neuroscience application where prediction is done based on a sequence of functional MRI images. Since the images are high dimensional and the number of samples that can be taken is limited, TV-ℓ1 regularization is used to get stable and predictive estimation results [20]. The convex optimization problem we solve is of the form: min x∈Rp 1 2∥Mx −b∥2 + λr∥x∥1 + λ(1 −r)∥x∥TV. (18) This problem fits to our template with f(x) = 1 2∥Mx −b∥2, g(x) = λr∥x∥1, h(u) = λ(1 −r)∥u∥1, where D is the 3D finite difference operator to define a total variation norm ∥· ∥TV and u = Dx. We use an fMRI dataset where the primal variable x is 3D image of the brain that contains 33177 voxels. Feature matrix M has 768 rows, each representing the brain activity for the corresponding example [20]. We compare our algorithm with Vu-Condat’s algorithm, FISTA, ASGARD, ChambollePock’s primal-dual algorithm, L-BFGS and Vu-Condat-CD. 0 20 40 60 80 100 time (s) 8000 8500 9000 9500 F(x) Chambolle-Pock Vu-Condat FISTA ASGARD L-BFGS Vu-Condat-CD SMART-CD 0 20 40 60 80 100 time (s) 8000 8500 9000 9500 F(x) 0 20 40 60 80 100 time (s) 8000 8500 9000 9500 F(x) Figure 2: The convergence of 7 algorithms for problem (18). The regularization parameters for the first plot are λ = 0.001, r = 0.5, for the second plot are λ = 0.001, r = 0.9, for the third plot are λ = 0.01, r = 0.5 . Figure 2 illustrates the convergence behaviour of the algorithms for different values of the regularization parameters. Per-iteration cost of SMART-CD and Vu-Condat-CD is similar, therefore the behavior of these two algorithms are quite similar in this experiment. Since Vu-Condat’s, 7 Chambolle-Pock’s, FISTA and ASGARD methods work with full dimensional variables, they have slow convergence in time. L-BFGS has a close performance to coordinate descent methods. The simulation in Figure 2 is performed using benchmarking tool of [20]. The algorithms are tuned for the best parameters in practice. 4.3 Linear support vector machines problem with bias In this section, we consider an application of our algorithm to support vector machines (SVM) problem for binary classification. Given a training set with m examples {a1, a2, . . . , am} such that ai ∈Rp and class labels {b1, b2, . . . bm} such that bi ∈{−1, +1}, we define the soft margin primal support vector machines problem with bias as min w∈Rp m X i=1 Ci max 0, 1 −bi(⟨ai, w⟩+ w0) + λ 2 ∥w∥2. (19) As it is a common practice, we solve its dual formulation, which is a constrained problem: min x∈Rm 1 2λ∥MD(b)x∥2 −Pm i=1 xi s.t. 0 ≤xi ≤Ci, i = 1, · · · , m, b⊤x = 0, (20) where D(b) represents a diagonal matrix that has the class labels bi in its diagonal and M ∈Rp×m is formed by the example vectors. If we define f(x) = 1 2λ∥MD(b)x∥2 − m X i=1 xi, gi(xi) = δ{0≤xi≤Ci}, c = 0, A = b⊤, then, we can fit this problem into our template in (9). We apply the specific version of SMART-CD for constrained setting from Section 3.4 and compare with Vu-Condat-CD and SDCA. Even though SDCA is a state-of-the-art method for SVMs, we are not able to handle the bias term using SDCA. Hence, it only applies to (20) when b⊤x = 0 constraint is removed. This causes SDCA not to converge to the optimal solution when there is bias term in the problem (19). The following table summarizes the properties of the classification datasets we used. Data Set Training Size Number of Features Convergence Plot rcv1.binary [21, 22] 20,242 47,236 Figure 3, plot 1 a8a [21, 23] 22,696 123 Figure 3, plot 2 gisette [21, 24] 6,000 5,000 Figure 3, plot 3 Figure 3 illustrates the performance of the algorithms for solving the dual formulation of SVM in (20). We compute the duality gap for each algorithm and present the results with epochs in the horizontal axis since per-iteration complexity of the algorithms is similar. As expected, SDCA gets stuck at a low accuracy since it ignores one of the constraints in the problem. We demonstrate this fact in the first experiment and then limit the comparison to SMART-CD and Vu-Condat-CD. Equipped with restart strategy, SMART-CD shows the fastest convergence behavior due to the restricted strong convexity of (20). 100 101 102 epoch 10-4 10-3 10-2 10-1 100 Duality gap SMART-CD SMART-CD-Restart Vu-Condat-CD SDCA 100 101 102 epoch 10-4 10-3 10-2 10-1 100 Duality gap SMART-CD SMART-CD-Restart Vu-Condat-CD 100 101 102 epoch 10-5 10-4 10-3 10-2 10-1 100 Duality gap SMART-CD SMART-CD-Restart Vu-Condat-CD Figure 3: The convergence of 4 algorithms on the dual SVM (20) with bias. We only used SDCA in the first dataset since it stagnates at a very low accuracy. 5 Conclusions Coordinate descent methods have been increasingly deployed to tackle huge scale machine learning problems in recent years. The most notable works include [1–6]. Our method relates to several works 8 in the literature including [1, 4, 7, 9, 10, 12]. The algorithms developed in [2–4] only considered a special case of (1) with h = 0, and cannot be trivially extended to apply to general setting (1). Here, our algorithm can be viewed as an adaptive variant of the method developed in [4] extended to the sum of three functions. The idea of homotopy strategies relate to [9] for first-order primal-dual methods. This paper further extends such an idea to randomized coordinate descent methods for solving (1). We note that a naive application of the method developed in [4] to the smoothed problem with a carefully chosen fixed smoothness parameter would result in the complexity O(n2/k), whereas using our homotopy strategy on the smoothness parameter, we reduced this complexity to O(n/k). With additional strong convexity assumption on problem template (1), it is possible to obtain O(1/k2) rate by using deterministic first-order primal-dual algorithms [9, 18]. It remains as future work to incorporate strong convexity to coordinate descent methods for solving nonsmooth optimization problems with a faster convergence rate. Acknowledgments The work of O. Fercoq was supported by a public grant as part of the Investissement d’avenir project, reference ANR-11-LABX-0056-LMH, LabEx LMH. The work of Q. Tran-Dinh was partly supported by NSF grant, DMS-1619884, USA. The work of A. Alacaoglu and V. Cevher was supported by European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement no 725594 - time-data). References [1] Y. Nesterov, “Efficiency of coordinate descent methods on huge-scale optimization problems,” SIAM Journal on Optimization, vol. 22, no. 2, pp. 341–362, 2012. [2] P. Richtárik and M. Takáˇc, “Iteration complexity of randomized block-coordinate descent methods for minimizing a composite function,” Mathematical Programming, vol. 144, no. 1-2, pp. 1–38, 2014. [3] P. Richtárik and M. Takáˇc, “Parallel coordinate descent methods for big data optimization,” Mathematical Programming, vol. 156, no. 1-2, pp. 433–484, 2016. [4] O. Fercoq and P. Richtárik, “Accelerated, parallel, and proximal coordinate descent,” SIAM Journal on Optimization, vol. 25, no. 4, pp. 1997–2023, 2015. [5] S. Shalev-Shwartz and T. Zhang, “Stochastic dual coordinate ascent methods for regularized loss minimization,” Journal of Machine Learning Research, vol. 14, pp. 567–599, 2013. [6] I. Necoara and D. Clipici, “Parallel random coordinate descent method for composite minimization: Convergence analysis and error bounds,” SIAM J. on Optimization, vol. 26, no. 1, pp. 197–226, 2016. [7] Z. Qu and P. Richtárik, “Coordinate descent with arbitrary sampling i: Algorithms and complexity,” Optimization Methods and Software, vol. 31, no. 5, pp. 829–857, 2016. [8] Y. Nesterov, “Smooth minimization of non-smooth functions,” Math. Prog., vol. 103, no. 1, pp. 127–152, 2005. [9] Q. Tran-Dinh, O. Fercoq, and V. Cevher, “A smooth primal-dual optimization framework for nonsmooth composite convex minimization,” arXiv preprint arXiv:1507.06243, 2015. [10] O. Fercoq and P. Richtárik, “Smooth minimization of nonsmooth functions with parallel coordinate descent methods,” arXiv preprint arXiv:1309.5885, 2013. [11] O. Fercoq and P. Bianchi, “A coordinate descent primal-dual algorithm with large step size and possibly non separable functions,” arXiv preprint arXiv:1508.04625, 2015. [12] Y. Nesterov and S.U. Stich, “Efficiency of the accelerated coordinate descent method on structured optimization problems,” SIAM J. on Optimization, vol. 27, no. 1, pp. 110–123, 2017. [13] Y. Nesterov, “A method for unconstrained convex minimization problem with the rate of convergence O(1/k2),” Doklady AN SSSR, vol. 269, translated as Soviet Math. Dokl., pp. 543– 547, 1983. [14] Y. T. Lee and A. Sidford, “Efficient accelerated coordinate descent methods and faster algorithms for solving linear systems,” in Foundations of Computer Science (FOCS), 2013 IEEE Annual Symp. on, pp. 147–156, IEEE, 2013. 9 [15] B. O’Donoghue and E. Candes, “Adaptive restart for accelerated gradient schemes,” Foundations of computational mathematics, vol. 15, no. 3, pp. 715–732, 2015. [16] B. C. V˜u, “A splitting algorithm for dual monotone inclusions involving cocoercive operators,” Advances in Computational Mathematics, vol. 38, no. 3, pp. 667–681, 2013. [17] A. Beck and M. Teboulle, “A fast iterative shrinkage-thresholding algorithm for linear inverse problems,” SIAM journal on imaging sciences, vol. 2, no. 1, pp. 183–202, 2009. [18] A. Chambolle and T. Pock, “A first-order primal-dual algorithm for convex problems with applications to imaging,” Journal of mathematical imaging and vision, vol. 40, no. 1, pp. 120– 145, 2011. [19] R. H. Byrd, P. Lu, J. Nocedal, and C. Zhu, “A limited memory algorithm for bound constrained optimization,” SIAM Journal on Scientific Computing, vol. 16, no. 5, pp. 1190–1208, 1995. [20] E. D. Dohmatob, A. Gramfort, B. Thirion, and G. Varoquaux, “Benchmarking solvers for tv-ℓ1 least-squares and logistic regression in brain imaging,” in Pattern Recognition in Neuroimaging, 2014 International Workshop on, pp. 1–4, IEEE, 2014. [21] C.-C. Chang and C.-J. Lin, “Libsvm: a library for support vector machines,” ACM transactions on intelligent systems and technology (TIST), vol. 2, no. 3, p. 27, 2011. [22] D. D. Lewis, Y. Yang, T. G. Rose, and F. Li, “Rcv1: A new benchmark collection for text categorization research,” Journal of Machine Learning Research, vol. 5, no. Apr, pp. 361–397, 2004. [23] M. Lichman, “UCI machine learning repository,” 2013. [24] I. Guyon, S. Gunn, A. Ben-Hur, and G. Dror, “Result analysis of the nips 2003 feature selection challenge,” in Advances in neural information processing systems, pp. 545–552, 2005. [25] P. Tseng, “On accelerated proximal gradient methods for convex-concave optimization,” Submitted to SIAM J. Optim, 2008. 10 | 2017 | 296 |
6,781 | Linearly constrained Gaussian processes Carl Jidling Department of Information Technology Uppsala University, Sweden carl.jidling@it.uu.se Niklas Wahlström Department of Information Technology Uppsala University, Sweden niklas.wahlstrom@it.uu.se Adrian Wills School of Engineering University of Newcastle, Australia adrian.wills@newcastle.edu.au Thomas B. Schön Department of Information Technology Uppsala University, Sweden thomas.schon@it.uu.se Abstract We consider a modification of the covariance function in Gaussian processes to correctly account for known linear operator constraints. By modeling the target function as a transformation of an underlying function, the constraints are explicitly incorporated in the model such that they are guaranteed to be fulfilled by any sample drawn or prediction made. We also propose a constructive procedure for designing the transformation operator and illustrate the result on both simulated and real-data examples. 1 Introduction 3 2 x1 [m] 1 0 -1 -3 -2 x2 [m] -1 0 1 2 1.5 1 0.5 0 x3 [m] 0.7 0.8 0.9 1 1.1 1.2 1.3 Predicted magnetic field strength [a.u.] Figure 1: Predicted strength of a magnetic field at three heights, given measured data sampled from the trajectory shown (blue curve). The three components (x1, x2, x3) denote the Cartesian coordinates, where the x3-coordinate is the height above the floor. The magnetic field is curl-free, which can be formulated in terms of three linear constraints. The method proposed in this paper can exploit these constraints to improve the predictions. See Section 5.2 for details. Bayesian non-parametric modeling has had a profound impact in machine learning due, in no small part, to the flexibility of these model structures in combination with the ability to encode prior knowledge in a principled manner [6]. These properties have been exploited within the class of Bayesian non-parametric models known as Gaussian Processes (GPs), which have received significant research attention and have demonstrated utility across a very large range of real-world applications [16]. Abstracting from the myriad number of these applications, it has been observed that the efficacy of GPs modeling is often intimately dependent on the appropriate choice of mean and covariance functions, and the appropriate tuning of their associated hyper-parameters. Often, the most appropriate mean and covariance functions are connected to prior knowledge of the underlying problem. For example, [10] uses functional expectation constraints to consider the problem of gene-disease association, and [13] employs a multivariate generalized von Mises distribution to produce a GP-like regression that handles circular variable problems. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. At the same time, it is not always obvious how one might construct a GP model that obeys underlying principles, such as equilibrium conditions and conservation "laws". One straightforward approach to this problem is to add fictitious measurements that observe the constraints at a finite number of points of interest. This has the benefit of being relatively straightforward to implement, but has the sometimes significant drawback of increasing the problem dimension and at the same time not enforcing the constraints between the points of interest. A different approach to constraining the GP model is to construct mean and covariance functions that obey the constraints. For example, curl and divergence free covariance functions are used in [22] to improve the accuracy for regression problems. The main benefit of this approach is that the problem dimension does not grow, and the constraints are enforced everywhere, not pointwise. However, it is not obvious how these approaches can be scaled for an arbitrary set of linear operator constraints. The contribution of this paper is a new way to include constraints into multivariate GPs. In particular, we develop a method that transforms a given GP into a new, derived, one that satisfies the constraints. The procedure relies upon the fact that GPs are closed under linear operators, and we propose an algorithm capable of constructing the required transformation. We will demonstrate the utility of this new method on both simulated examples and on a real-world application, the latter in form of predicting the components of a magnetic field, as illustrated in Figure 1. To make these ideas more concrete, we present a simple example that will serve as a focal point several times throughout the paper. To that end, assume that we have a two-dimensional function f(x) : R2 7→R2 on which we put a GP prior f(x) ∼GP (µ(x), K(x, x′)) . We further know that f(x) should obey the differential equation ∂f1 ∂x1 + ∂f2 ∂x2 = 0. (1) In this paper we show how to modify K(x, x′) and µ(x) such that any sample from the new GP is guaranteed to obey the constraints like (1), considering any kind of linear operator constraint. 2 Problem formulation Assume that we are given a data set of N observations {xk, yk}N k=1 where xk denotes the input and yk the output. Both the input and output are potentially vector-valued, where xk ∈RD and yk ∈RK. We consider the regression problem where the data can be described by a non-parametric model yk = f(xk) + ek, where ek is zero-mean white noise representing the measurement uncertainty. In this work, we place a vector-valued GP prior on f f(x) ∼GP (µ(x), K(x, x′)) , (2) with the mean function and the covariance function µ(·) : RD 7→RK, K(·, ·) : RD × RD 7→RK × RK. (3) Based on the data {xk, yk}N k=1, we would now like to find a posterior over the function f(x). In addition to the data, we know that the function f should fulfill certain constraints Fx[f] = 0, (4) where Fx is an operator mapping the function f(x) to another function g(x) as Fx[f] = g(x). We further require Fx to be a linear operator meaning that Fx h λ1f 1 + λ2f 2 i = λ1Fx[f 1] + λ2Fx[f 2], where λ1, λ2 ∈R. The operator Fx can for example be a linear transform Fx[f] = Cf(x) which together with the constraint (4) forces a certain linear combination of the outputs to be linearly dependent. The operator Fx could also include other linear operations on the function f(x). For example, we might know that the function f(x) : R2 →R2 should obey a certain partial differential equation Fx[f] = ∂f1 ∂x1 + ∂f2 ∂x2 . A few more linear operators are listed in Section 1 of the Supplementary material, including integration as one the most well-known. The constraints (4) can either come from known physical laws or other prior knowledge of the process generating the data. Our objective is to encode these constraints in the mean and covariance functions (3) such that any sample from the corresponding GP prior (2) always obeys the constraint (4). 2 3 Building a constrained Gaussian process 3.1 Approach based on artificial observations Just as Gaussian distributions are closed under linear transformations, so are GPs closed under linear operations (see Section 2 in the Supplementary material). This can be used for a straightforward way of embedding linear operator constraints of the form (4) into GP regression. The idea is to treat the constraints as noise-free artificial observations {˜xk, ˜yk} ˜ N k=1 with ˜yk = 0 for all k = 1 . . . ˜N. The regression is then performed on the model ˜yk = F˜xk[f], where ˜xk are input points in the domain of interest. For example, one could let these artificial inputs ˜xk coincide with the points of prediction. An advantage of this approach is that it allows constraints of the type (4) with a non-zero right hand side. Furthermore, there is no theoretical limit on how many constraints we can include (i.e. number of rows in Fx) – although in practice, of course, there is. However, this is problematic mainly for two reasons. First of all, it makes the problem size grow. This increases memory requirements and execution time, and the numerical stability is worsen due to an increased condition number. This is especially clear from the fact that we want these observations to be noise-free, since the noise usually has a regularizing effect. Secondly, the constraints are only enforced point-wise, so a sample drawn from the posterior fulfills the constraint only in our chosen points. The obvious way of compensating for this is by increasing the number of points in which the constraints are observed – but that exacerbates the first problem. Clearly, the challenge grows quickly with the dimension of the inferred function. Embedding the constraints in the covariance function removes these issues – it makes the enforcement continuous while the problem size is left unchanged. We will now address the question of how to design such a covariance function. 3.2 A new construction We want to find a GP prior (2) such that any sample f(x) from that prior obeys the constraints (4). In turn, this leads to constraints on the mean and covariance functions (3) of that prior. However, instead of posing these constraints on the mean and covariance functions directly, we consider f(x) to be related to another function g(x) via some operator Gx f(x) = Gx[g]. (5) The constraints (4) then amounts to Fx[Gx[g]] = 0. (6) We would like this relation to be true for any function g(x). To do that, we will interpret Fx and Gx as matrices and use a similar procedure to that of solving systems of linear equations. Since Fx and Gx are linear operators, we can think of Fx[f] and Gx[g] as matrix-vector multiplications where Fx[f] = Fxf, with (Fxf)i = PK j=1(Fx)ijfj where each element (Fx)ij in the operator matrix Fx is a scalar operator. With this notation, (6) can be written as Fx Gx = 0. (7) This reformulation imposes constraints on the operator Gx rather than on the GP prior for f(x) directly. We can now proceed by designing a GP prior for g(x) and transform it using the mapping (5). We further know that GPs are closed under linear operations. More specifically, if g(x) is modeled as a GP with mean µg(x) and covariance Kg(x, x′), then f(x) is also a GP with f(x) = Gxg ∼GP Gx µg, GxKg GT x′ . (8) We use (GxKg GT x′)ij to denote that (GxKg GT x′)ij = (Gx)ik(Gx′)jl(Kg)kl, where Gx and Gx′ act on the first and second argument of Kg(x, x′), respectively. See Section 2 in the Supplementary material for further details on linear operations on GPs. The procedure to find the desired GP prior for f can now be divided into the following three steps 1. Find an operator Gx that fulfills the condition (6). 3 2. Choose a mean and covariance function for g(x). 3. Find the mean and covariance functions for f(x) according to (8). In addition to being resistant to the disadvantages of the approach described in Section 3.1, there are some additional strengths worth pointing out with this method. First of all, we have separated the task of encoding the constraints and encoding other desired properties of the kernel. The constraints are encoded in Fx and the remaining properties are determined by the prior for g(x), such as smoothness assumptions. Hence, satisfying the constraints does not sacrifice any desired behavior of the target function. Secondly, K(x, x′) is guaranteed to be a valid covariance function provided that Kg(x, x′) is, since GPs are closed under linear functional transformations. From (8), it is clear that each column of K must fulfill all constraints encoded in Fx. Possibly K could be constructed only with this knowledge, assuming a general form and solving the resulting equation system. However, a solution may not just be hard to find, but one must also make sure that it is indeed a valid covariance function. Furthermore, this approach provides a simple and straightforward way of constructing the covariance function even if the constraints have a complicated form. It makes no difference if the linear operators relate the components of the target function explicitly or implicitly – the procedure remains the same. 3.3 Illustrating example We will now illustrate the method using the example (1) introduced already in the introduction. Consider a function f(x) : R2 7→R2 satisfying ∂f1 ∂x1 + ∂f2 ∂x2 = 0, where x = [x1, x2]T and f(x) = [f1(x), f2(x)]T. This equation describes all two-dimensional divergence-free vector fields. The constraint can be written as a linear constraint on the form (4) where Fx = [ ∂ ∂x1 ∂ ∂x2 ] and f(x) = [f1(x) f2(x)]T. Modeling this function with a GP and building the covariance structure as described above, we first need to find the transformation Gx such that (7) is fulfilled. For example, we could pick Gx = −∂ ∂x2 ∂ ∂x1 T . (9) If the underlying function g(x) : R2 7→R is given by g(x) ∼GP 0, kg(x, x′) , then we can make use of (8) to obtain f(x) ∼GP 0, K(x, x′) where K(x, x′) = Gxkg(x, x′)GT x = ∂2 ∂x2x′ 2 − ∂2 ∂x2x′ 1 − ∂2 ∂x1x′ 2 ∂2 ∂x1x′ 1 kg(x, x′). Using a covariance function with the following structure, we know that the constraint will be fulfilled by any function generated from the corresponding GP. 4 Finding the operator Gx In a general setting it might be hard to find an operator Gx that fulfills the constraint (7). Ultimately, we want an algorithm that can construct Gx from a given Fx. In more formal terms, the function Gxg forms the nullspace of Fx. The concept of nullspaces for linear operators is well-established [11], and does in many ways relate to real-number linear algebra. However, an important difference is illustrated by considering a one-dimensional function f(x) subject to the constraint Fxf = 0 where Fx = ∂ ∂x. The solution to this differential equation can not be expressed in terms of an arbitrary underlying function, but it requires f(x) to be constant. Hence, the nullspace of ∂ ∂x consists of the set of horizontal lines. Compare this with the real number equation ab = 0, a ̸= 0, which is true only if b = 0. Since the nullspace differs between operators, we must be careful when discussing the properties of Fx and Gx based on knowledge from real-number algebra. Let us denote the rows in Fx as fT 1 , . . . ,fT L. We now want to find all solutions g such that Fxg = 0 ⇒ fT i g = 0, ∀ i = 1, . . . , L. (10) The solutions g1, . . . , gP to (10) will then be the columns of Gx. Each row vector fj can be written as fi = Φiξf where Φi ∈RK×Mf and ξf = [ξ1, . . . , ξMf]T is a vector of Mf scalar operators 4 Algorithm 1 Constructing Gx Input: Operator matrix Fx Output: Operator matrix Gx where Fx Gx = 0 Step 1: Make an ansatz g = Γξg for the columns in Gx. Step 2: Expand FxΓξg and collect terms. Step 3: Construct A · vec(Γ) = 0 and find the vectors Γ1 . . . ΓP spanning its nullspace. Step 4: If P = 0, go back to Step 1 and make a new ansatz, i.e. extend the set of operators. Step 5: Construct Gx = [Γ1ξg, . . . , ΓP ξg]. included in Fx. We now assume that g also can be written in a similar form g = Γξg where Γ ∈RK×Mg and ξg = [ξ1, . . . , ξMg]T is a vector of Mg scalar operators. One may make the assumption that the same set of operators that are used to describe fi also can be used to describe g, i.e., ξg = ξf. However, this assumption might need to be relaxed. The constraints (10) can then be written as (ξf)TΦiΓξg = 0, ∀ i = 1, . . . , L. (11) We perform the multiplication and collect the terms in ξf and ξg. The condition (11) then results in conditions on the parameters in Γ resulting a in a homogeneous system of linear equations A · vec(Γ) = 0. (12) The vectors vec(Γ1), . . . , vec(ΓP ) spanning the nullspace of A in (12) are then used to compute the columns in Gx = [g1, . . . gP ] where gp = Γpξg . If it turns out that the nullspace of A is empty, one should start over with a new ansatz and extend the set of operators in ξg. The outline of the procedure as described above is summarized in Algorithm 1. The algorithm is based upon a parametric ansatz rather than directly upon the theory for linear operators. Not only is it more intuitive, but it does also remove any conceptual challenges that theory may provide. A problem with this is that one may have to iterate before having found the appropriate set of operators in Gx. It might be of interest to examine possible alternatives to this algorithm that does not use a parametric approach. Let us now illustrate the method with an example. 4.1 Divergence-free example revisited Let us return to the example discussed in Section 3.3, and show how the solution found by visual inspection also can be found with the algorithm described above. Since Fx only contains first-order derivative operators, we assume that a column in Gx does so as well. Hence, let us propose the following ansatz (step 1) g = γ11 γ12 γ21 γ22 " ∂ ∂x1 ∂ ∂x2 # = Γξg. (13) Applying the constraint, expanding and collecting terms (step 2) we find FxΓξg = ∂ ∂x1 ∂ ∂x2 γ11 γ12 γ21 γ22 " ∂ ∂x1 ∂ ∂x2 # = γ11 ∂2 ∂x2 1 + (γ12 + γ21) ∂2 ∂x1∂x2 + γ22 ∂2 ∂x2 2 , (14) where we have used the fact that ∂2 ∂xi∂xj = ∂2 ∂xj∂xi assuming continuous second derivatives. The expression (14) equals zero if "1 0 0 0 0 1 1 0 0 0 0 1 # γ11 γ12 γ21 γ22 = A · vec(Γ) = 0. (15) The nullspace is spanned by a single vector (step 3) [γ11 γ12 γ21 γ22]T = λ[0 −1 1 0]T, λ ∈R. Choosing λ = 1, we get Gx = −∂ ∂x2 ∂ ∂x1 T (step 5), which is the same as in (9). 5 4.2 Generalization Although there are no conceptual problems with the algorithm introduced above, the procedure of expanding and collecting terms appears a bit informal. In a general form, the algorithm is reformulated such that the operators are completely left out from the solution process. The drawback of this is a more cumbersome notation, and we have therefore limited the presentation to this simplified version. However, the general algorithm is found in the Supplementary material of this paper. 5 Experimental results 5.1 Simulated divergence-free function Consider the example in Section 3.3. An example of a function fulfilling ∂f1 ∂x1 + ∂f2 ∂x2 = 0 is f1(x1, x2) = e−ax1x2 ax1 sin(x1x2) −x1 cos(x1x2) , f2(x1, x2) = e−ax1x2 x2 cos(x1x2) −ax2 sin(x1x2) , (16) where a denotes a constant. We will now study how the regression of this function differs when using the covariance function found in Section 3.3 as compared to a diagonal covariance function K(x, x′) = k(x, x′)I. The measurements generated are corrupted with Gaussian noise such that yk = f(xk) + ek, where ek ∼N(0, σ2I). The squared exponential covariance function k(x, x′) = σ2 f exp −1 2l−2∥x −x′∥2 has been used for kg and k with hyperparameters chosen by maximizing the marginal likelihood. We have used the value a = 0.01 in (16). We have used 50 measurements randomly picked over the domain [0 4] × [0 4], generated with the noise level σ = 10−4. The points for prediction corresponds to a discretization using 20 uniformly distributed points in each direction, and hence a total of NP = 202 = 400. We have included the approach described is Section 3.1 for comparison. The number of artificial observations have been chosen as random subsets of the prediction points, up to and including the full set. The comparison is made with regard to the root mean squared error erms = q 1 NP ¯f T ∆¯f ∆, where ¯f ∆= ˆ¯f −¯f and ¯f is a concatenated vector storing the true function values in all prediction points and ˆ¯f denotes the reconstructed equivalent. To decrease the impact of randomness, each error value has been formed as an average over 50 reconstructions given different sets of measurements. An example of the true field, measured values and reconstruction errors using the different methods is seen in Figure 2. The result from the experiment is seen in Figure 3a. Note that the error from the approach with artificial observations is decreasing as the number of observations is increased, but only to a certain point. Have in mind, however, that the Gram matrix is growing, making the problem larger and worse conditioned. The result from our approach is clearly better, while the problem size is kept small and numerical problems are therefore avoided. Figure 2: Left: Example of field plots illustrating the measurements (red arrows) and the true field (gray arrows). Remaining three plots: reconstructed fields subtracted from the true field. The artificial observations of the constraint have been made in the same points as the predictions are made. 5.2 Real data experiment Magnetic fields can mathematically be considered as a vector field mapping a 3D position to a 3D magnetic field strength. Based on the magnetostatic equations, this can be modeled as a curl-free 6 Nc 25 100 400 erms 0.5 0.7 0.9 Our approach Diagonal Artificial obs (a) Simulated experiment Nc 10 1 10 2 10 3 erms 0.034 0.036 0.038 Our approach Diagonal Artificial obs (b) Real-data experiment Figure 3: Accuracy of the different approaches as the number of artificial observations Nc is increased. vector field. Following Section 3.1 in the Supplementary material, our method can be used to encode the constraints in the following covariance function (which also has been presented elsewhere [22]) Kcurl(x, x′) = σ2 fe−∥x−x′∥2 2l2 I3− x −x′ l x −x′ l T! . (17) With a magnetic sensor and an optical positioning system, both position and magnetic field data have been collected in a magnetically distorted indoor environment, see the Supplementary material for details about the experimental details. In Figure 1 the predicted magnitude of the magnetic field over a two-dimensional domain for three different heights above the floor is displayed. The predictions have been made based on 500 measurements sampled from the trajectory given by the blue curve. Similar to the simulated experiment in Section 5.1, we compare the predictions of the curl-free covariance function (17) with the diagonal covariance function and the diagonal covariance function using artificial observations. The results have been formed by averaging the error over 50 reconstructions. In each iteration, training data and test data were randomly selected from the data set collected in the experiment. 500 train data points and 1 000 test data points were used. The result is seen in Figure 3b. We recognize the same behavior as we saw for the simulated experiment in Figure 3a. Note that the accuracy of the artificial observation approach gets very close to our approach for a large number of artificial observations. However, in the last step of increasing the artificial observations, the accuracy decreases. This is probably caused by the numerical errors that follows from an ill-conditioned Gram matrix. 6 Related work Many problems in which GPs are used contain some kind of constraint that could be well exploited to improve the quality of the solution. Since there are a variety of ways in which constraints may appear and take form, there is also a variety of methods to deal with them. The treatment of inequality constraints in GP regression have been considered for instance in [1] and [5], based on local representations in a limited set of points. The paper [12] proposes a finite-dimensional GP-approximation to allow for inequality constraints in the entire domain. It has been shown that linear constraints satisfied by the training data will be satisfied by the GP prediction as well [19]. The same paper shows how this result can be extended to quadratic forms through a parametric reformulation and minimization of the Frobenious norm, with application demonstrated for pose estimation. Another approach on capturing human body features is described in [18], where a face-shape model is included in the GP framework to imply anatomic correctness. A rigorous theoretical analysis of degeneracy and invariance properties of Gaussian random fields is found in [7], including application examples for one-dimensional GP problems. The concept of learning the covariance function with respect to algebraic invariances is explored in [9]. Although constraints in most situations are formulated on the outputs of the GP, there are also situations in which they are acting on the inputs. An example of this is given in [21], describing a method of benefit from ordering constraints on the input to reduce the negative impact of input noise. Applications within medicine include gene-disease association through functional expectation constraints [10] and lung disease sub-type identification using a mixture of GPs and constraints encoded with Markov random fields [17]. Another way of viewing constraints is as modified prior distributions. By making use of the so-called multivariate generalized von Mises distribution, [13] ends up in a version of GP regression customized for circular variable problems. Other fields of interest include using GPs in approximately solving one-dimensional partial differential equations [8, 14, 15]. 7 Generally speaking, the papers mentioned above consider problems in which the constraints are dealt with using some kind of external enforcement – that is, they are not explicitly incorporated into the model, but rely on approximations or finite representations. Therefore, the constraints may just be approximately satisfied and not necessarily in a continuous manner, which differs from the method proposed in this paper. Of course, comparisons can not be done directly between methods that have been developed for different kinds of constraints. The interest in this paper is multivariate problems where the constraints are linear combinations of the outputs that are known to equal zero. For multivariate problems, constructing the covariance function is particularly challenging due to the correlation between the output components. We refer to [2] for a very useful review. The basic idea behind the so-called separable kernels is to separate the process of modeling the covariance function for each component and the process of modeling the correlation between them. The final covariance function is chosen for example according to some method of regularization. Another class of covariance functions is the invariant kernels. Here, the correlation is inherited from a known mathematical relation. The curl- and divergence free covariance functions are such examples where the structure follows directly from the underlying physics, and has been shown to improve the accuracy notably for regression problems [22]. Another example is the method proposed in [4], where the Taylor expansion is used to construct a covariance model given a known relationship between the outputs. A very useful property on linear transformations is given in [20], based on the GPs natural inheritance of features imposed by linear operators. This fact has for example been used in developing a method for monitoring infectious diseases [3]. The method proposed in this work is exploiting the transformation property to build a covariance function of the invariant kind for a multivariate GP. We show how this property can be exploited to incorporate knowledge of linear constraints into the covariance function. Moreover, we present an algorithm of constructing the required transformation. This way, the constraints are built into the prior and are guaranteed to be fulfilled in the entire domain. 7 Conclusion and future work We have presented a method for designing the covariance function of a multivariate Gaussian process subject to known linear operator constraints on the target function. The method will by construction guarantee that any sample drawn from the resulting process will obey the constraints in all points. Numerical simulations show the benefits of this method as compared to alternative approaches. Furthermore, it has been demonstrated to improve the performance on real data as well. As mentioned in Section 4, it would be desirable to describe the requirements on Gx more rigorously. That might allow us to reformulate the construction algorithm for Gx in a way that allows for a more straightforward approach as compared to the parametric ansatz that we have proposed. In particular, our method relies upon the requirement that the target function can be expressed in terms of an underlying potential function g. This leads to the intriguing and nontrivial question: Is it possible to mathematically guarantee the existence of such a potential? If the answer to this question is yes, the next question will of course be what it look like and how it relates to the target function. Another possible topic of further research is the extension to constraints including nonlinear operators, which for example might rely upon a linearization in the domain of interest. Furthermore, it may be of potential interest to study the extension to a non-zero right-hand side of (4). Acknowledgements This research is financially supported by the Swedish Foundation for Strategic Research (SSF) via the project ASSEMBLE (Contract number: RIT 15-0012). The work is also supported by the Swedish Research Council (VR) via the project Probabilistic modeling of dynamical systems (Contract number: 621-2013-5524). We are grateful for the help and equipment provided by the UAS Technologies Lab, Artificial Intelligence and Integrated Computer Systems Division (AIICS) at the Department of Computer and Information Science (IDA), Linköping University, Sweden. The real data set used in this paper has been collected by some of the authors together with Manon Kok, Arno Solin, and Simo Särkkä. We thank them for allowing us to use this data. We also thank Manon Kok for supporting us with the data processing. Furthermore, we would like to thank Carl Rasmussen and Marc Deisenroth for fruitful discussions on constrained GPs. 8 References [1] Petter Abrahamsen and Fred Espen Benth. Kriging with inequality constraints. Math. Geol., 33(6):719–744, 2001. [2] Mauricio A. Álvarez, Lorenzo Rosasco, and Neil D. Lawrence. Kernels for vector-valued functions: A review. Foundations and Trends in Machine Learning, 4(3):195–266, March 2012. [3] Ricardo Andrade-Pacheco, Martin Mubangizi, John Quinn, and Neil Lawrence. Monitoring Short Term Changes of Infectious Diseases in Uganda with Gaussian Processes, pages 95–110. Springer International Publishing, 2016. [4] Emil. M. Constantinescu and Mihai Anitescu. Physics-based covariance models for Gaussian processes with multiple outputs. International Journal for Uncertainty Quantification, 3(1):47– 71, 2013. [5] Sébastien Da Veiga and Amandine Marrel. Gaussian process modeling with inequality constraints. Annales de la faculté des sciences de Toulouse Mathématiques, 21(3):529–555, 2012. [6] Zoubin Ghahramani. Probabilistic machine learning and artificial intelligence. Nature, 521:452– 459, 2015. [7] David Ginsbourger, Olivier Roustant, and Nicolas Durrande. On degeneracy and invariances of random fields paths with applications in Gaussian process modelling. Journal of Statistical Planning and Inference, 170:117–128, 2016. [8] Thore Graepel. Solving noisy linear operator equations by Gaussian processes: Application to ordinary and partial differential equations. In Proceedings of the Twentieth International Conference on Machine Learning (ICML), August 2003. [9] Franz J. Király, Andreas Ziehe, and Klaus-Robert Müller. Learning with algebraic invariances, and the invariant kernel trick. Technical report, arXiv:1411.7817, November 2014. [10] Oluwasanmi Koyejo, Cheng Lee, and Joydeep Ghosh. Constrained Gaussian process regression for gene-disease association. Proceedings of the IEEE 13th International Conference on Data Mining Workshops, 00:72–79, 2013. [11] David G. Luenberger. Optimization by vector space methods. John Wiley & Sons, Inc, 1969. [12] Hassan Maatouk and Xavier Bay. Gaussian process emulators for computer experiments with inequality constraints. Mathematical Geosciences, 49(5):557–582, 2017. [13] Alexandre K. W. Navarro, Jes Frellsen, and Richard E. Turner. The multivariate generalised von Mises distribution: inference and applications. Technical report, arXiv:1602.05003, February 2016. [14] Ngoc Cuong Nguyen and Jaime Peraire. Gaussian functional regression for linear partial differential equations. Computer Methods in Applied Mechanics and Engineering, 287:69–89, 2015. [15] Ngoc Cuong Nguyen and Jaime Peraire. Gaussian functional regression for output prediction: Model assimilation and experimental design. Journal of Computational Physics, 309:52–68, 2016. [16] Carl E. Rasmussen and Christopher K. I. Williams. Gaussian processes for machine learning. MIT press, Cambridge, MA, 2006. [17] James Ross and Jennifer Dy. Nonparametric mixture of Gaussian processes with constraints. In Proceedings of the 30th International Conference on Machine Learning (ICML-13), volume 28, pages 1346–1354. JMLR Workshop and Conference Proceedings, 2013. [18] Ognjen Rudovic and Maja Pantic. Shape-constrained gaussian process regression for facialpoint-based head-pose normalization”. In Proceedings of the International Conference on Computer Vision (ICCV), 2011. [19] Mathieu Salzmann and Raquel Urtasun. Implicitly constrained Gaussian process regression for monocular non-rigid pose estimation. In Neural Information Processing Systems (NIPS), 2010. [20] Simo Särkkä. Linear operators and stochastic partial differential equations in Gaussian process regression. In Proceedings of the Artificial Neural Networks and Machine Learning (ICANN), pages 151–158. Springer, 2011. 9 [21] Cuong Tran, Vladimir Pavlovic, and Robert Kopp. Gaussian process for noisy inputs with ordering constraints. Technical report, arXiv:1507.00052, July 2015. [22] Niklas Wahlström. Modeling of Magnetic Fields and Extended Objects for Localization Applications. PhD thesis, Division of Automatic Control, Linköping University, 2015. 10 | 2017 | 297 |
6,782 | Solid Harmonic Wavelet Scattering: Predicting Quantum Molecular Energy from Invariant Descriptors of 3D Electronic Densities Michael Eickenberg Department of computer science Ecole normale supérieure PSL Research University, 75005 Paris, France michael.eickenberg@nsup.org Georgios Exarchakis Department of computer science Ecole normale supérieure PSL Research University, 75005 Paris, France georgios.exarchakis@ens.fr Matthew Hirn Department of Computational Mathematics, Science and Engineering; Department of Mathematics Michigan State University East Lansing, MI 48824, USA mhirn@msu.edu Stéphane Mallat Collège de France Ecole Normale Supérieure PSL Research University 75005 Paris, France Abstract We introduce a solid harmonic wavelet scattering representation, invariant to rigid motion and stable to deformations, for regression and classification of 2D and 3D signals. Solid harmonic wavelets are computed by multiplying solid harmonic functions with Gaussian windows dilated at different scales. Invariant scattering coefficients are obtained by cascading such wavelet transforms with the complex modulus nonlinearity. We study an application of solid harmonic scattering invariants to the estimation of quantum molecular energies, which are also invariant to rigid motion and stable with respect to deformations. A multilinear regression over scattering invariants provides close to state of the art results over small and large databases of organic molecules. 1 Introduction Deep convolutional neural networks provide state of the art results over most classification and regression problems when there is enough training data. The convolutional architecture builds a representation which translates when the input is translated. It can compute invariants to translations with a global spatial pooling operator such as averaging or max pooling. A major issue is to understand if one can reduce the amount of training data, by refining the architecture or specifying network weights, from prior information on the classification or regression problem. Beyond translation invariance, such prior information can be provided by invariance over other known groups of transformations. This paper studies the construction of generic translation and rotation invariant representations for any 2D and 3D signals, and their application. Rotation invariant representations have been developed for 2D images, for instance in [20], where a descriptor based on oriented wavelets was used to create a jointly translation and rotation-invariant representation of texture images which retained all identity information necessary for classification. These representations have not been extended to 3D because 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. an oriented wavelet representation in 3D requires covering the unit sphere instead of the unit circle leading to much heavier computational requirements. Section 2 introduces a 2D or 3D rotation invariant representation calculated with a cascade of convolutions with spherical harmonic wavelets, and modulus non-linearities. Invariance to rotations results from specific properties of spherical harmonics, which leads to efficient computations. A wavelet scattering can be implemented as a deep convolutional network where all filters are predefined by the wavelet choice [13]. In that case, prior information on invariants fully specifies the network weights. Besides translation and rotation invariance, such scattering representations linearize small deformations. Invariants to small deformations are thus obtained with linear operators applied to scattering coefficients, and scattering coefficients can provide accurate regressions of functions which are stable to deformations. Translation and rotation invariance is often encountered in physical functionals. For example energies of isolated physical systems are usually translation and rotation invariant, and are stable to small deformations. This paper concentrates on applications to computations of quantum energies of organic molecules. Computing the energy of a molecule given the charges and the relative positions of the nuclei is a fundamental topic in computational chemistry. It has considerable industrial applications, for example to test and design materials or pharmaceuticals [4]. Density functional theory is currently the most efficient numerical technique to compute approximate values of quantum energies, but it requires considerable amounts of calculations which limit the size of molecules and the number of tests. Machine learning methods have gained traction to estimate quantum molecular energies from existing quantum chemistry databases, because they require much less computation time after training. State of the art learning approaches have been adapted to the specificities of the underlying physics. Best results on large databases are obtained with deep neural networks whose architectures are tailored to this quantum chemistry problem. Numerical experiments in Section 4 show that applying a standard multilinear regression on our generic 3D invariant solid harmonic scattering representation yields nearly state of the art results compared to all methods, including deep neural networks, and on both small and large databases. 2 Solid harmonic wavelet scattering Wavelet scattering transforms have been introduced to define representations which are invariant to translations and Lipschitz continuous to deformations [12]. In two dimensions they have been extended to define rotationally invariant representations [20] but in 3D this approach requires covering the unit sphere with multiple oriented wavelets (as opposed to the unit circle in 2D), which requires too much computation. This section introduces a solid harmonic wavelet scattering transform whose rotation invariance results from symmetries of solid harmonics. In contrast to oriented wavelets, every solid harmonic wavelet can yield its own rotation invariant descriptor because it operates in a rotational frequency space. 2.1 Solid harmonics in 2D and 3D Solid harmonics are solutions of the Laplace equation ∆f = 0, usually expressed in spherical coordinates, where the Laplacian is the sum of unmixed second derivatives. In 2D, interpreting R2 as the complex plane, we find that z 7→zℓis a solution for all ℓ∈N due to its holomorphicity1. Expressing this solution in polar coordinates gives (r, ϕ) 7→rℓeiℓϕ, revealing an ℓth- order polynomial in radius and a so-called circular harmonic with ℓangular oscillations per circle. Solving the Laplace equation in 3D spherical coordinates (r, ϑ, ϕ) gives rise to spherical harmonics, the eigenvectors of the Laplacian on the sphere. Imposing separability of azimuthal and elevation contributions yields the functions Y m ℓ(ϑ, ϕ) = C(ℓ, m)P m ℓ(cos ϑ)eimϕ, where P m ℓ is an associated Legendre polynomial and C(ℓ, m) = q (2ℓ+1)(ℓ−m)! 4π(ℓ+m)! , for ℓ≥0 and −ℓ≤m ≤ℓ. They form an orthogonal basis of L2 functions on the sphere. Analogously to the 2D case, 3D solid harmonics are 1Real and imaginary parts of holomorphic functions are harmonic - their Laplacian is 0 2 then defined as (r, ϑ, ϕ) 7→ r 4π 2ℓ+ 1rℓY m ℓ(ϑ, ϕ). 2.2 Solid harmonic wavelets We now define solid harmonic wavelets in 2D and 3D. A wavelet ψ(u) is a spatial filter with zero sum, which is localized around the origin in the sense that it has a fast decay along ∥u∥. Let ψj(u) = 2−djψ(2−ju) be a normalized dilation of ψ by 2j in dimension d. A multiscale wavelet transform of a signal ρ(u) computes convolutions with these dilated wavelets at all scales 2j to obtain the set of wavelet coefficients {ρ ⋆ψj(u)}j∈Z . They are translation covariant. Let us denote by ˆρ(ω) the Fourier transform of ρ(u). The Fourier transforms of these convolutions are ˆρ(ω) ˆψ(2jω), which yields fast computational algorithms using FFTs. A wavelet is defined from a solid harmonic by multiplying it by a Gaussian, which localizes its support. In the 2D case we obtain the following family of wavelets: ψℓ(r, ϕ) = 1 p (2π)2 e−1 2 r2 rℓeiℓϕ. For ℓ> 0, these functions have zero integrals and are localized around the origin. In 2D frequency polar coordinates ω = λ (cos α, sin α)T , one can verify that the Fourier transform of this solid harmonic wavelet is very similar to itself in signal space: ˆψℓ(λ, α) = (−i)ℓe−1 2 λ2 λℓeiℓα. The solid harmonic wavelet transform inherits the rotation properties of the solid harmonics. In 2D, the rotation of a solid harmonic incurs a complex phase shift. Let Rγ ∈SO(2) be a rotation of angle γ. We first observe that Rγψj,ℓ(r, ϕ) = ψj,ℓ(r, ϕ −γ) = e−ilγψ(r, ϕ). One can derive that rotating a signal ρ produces the same rotation on its wavelet convolution, multiplied by a phase factor encoding the rotational angle: Rγρ ⋆ψj,ℓ(u) = eilγRγ(ρ ⋆ψj,ℓ)(u). If we eliminate the phase with a modulus U[j, ℓ]ρ(u) = |ρ ⋆ψj,ℓ(u)| then it becomes covariant to rotations: U[j, ℓ] Rγρ(u) = RγU[j, ℓ]ρ(u). The left of Figure 1 shows the real part of 2D solid harmonic wavelets at different scales and angular frequencies. In 3D, solid harmonics wavelet are defined by ψℓ,m(r, ϑ, ϕ) = 1 p (2π)3 e−1 2 r2 rℓY m ℓ(ϑ, ϕ). We write ψℓ,m,j its dilation by 2j. Let us write ω with 3D polar coordinates: ω = λ(cos α cos β, cos α sin β, sin α)T . The Fourier transform of the wavelet has the same analytical expression up to a complex factor: ˆψℓ,m(λ, α, β) = (−i)ℓe−1 2 λ2 λℓY m ℓ(α, β). The 3D covariance to rotations is more involved. The asymmetry of the azimuthal and elevation components of the spherical harmonics requires them to be treated differently. In order to obtain a rotation covariance property, it is necessary to sum the energy over all indices m for a fixed ℓ. We thus define the wavelet modulus operator of a 3D signal ρ(u) by U[ℓ, j]ρ(u) = ℓ X m=−ℓ |ρ ⋆ψℓ,m,j(u)|2 !1/2 . Using the properties of spherical harmonics, one can prove that this summation over m defines a wavelet transform modulus which is covariant to 3D rotations. For a general rotation R ∈SO(3) U[j, ℓ] Rρ = R U[j, ℓ]ρ. 3 2.3 Solid harmonic scattering invariants We showed that the wavelet modulus U[j, ℓ]ρ is covariant to translations and rotations in 2D and 3D. Summing these coefficients over the spatial variable u thus defines a translation and rotation invariant representation. This property remains valid under pointwise transformations, e.g. if we raise the modulus coefficients to any power q. Since U[j, ℓ]ρ(u) is obtained by a wavelet scaled by 2j, it is a smooth function and its integral can be computed by subsampling u at intervals 2j−α where α is an oversampling factor typically equal to 1, to avoid aliasing. First order solid harmonic scattering coefficients in 2D and 3D are defined for any (j1, ℓ) and any exponent q by: S[j1, ℓ, q]ρ = X u U[j1, ℓ]ρ(2j1−αu) q Translating or rotating ρ does not modify S[j1, ℓ, q]ρ. Let J > 0 denote the number of scales j1, and L > 0 the number of angular oscillations ℓ. We choose q ∈Q = {1/2, 1, 2, 3, 4} which yields |Q|JL invariant coefficients. The summation eliminates the variability of the U[j1, ℓ]ρ(u) along u. To avoid loosing too much information, a scattering transform retransforms this function along u in order to capture the lost variabilities. This is done by calculating a convolution with a second family of wavelets at different scales 2j2 and again computing a modulus in order to obtain coefficients which remain covariant to translations and rotations. This means that U[j1, ℓ]ρ(u) is retransformed by the wavelet tranform modulus operator U[j2, ℓ]. Clearly U[j2, ℓ] U[j1, ℓ]ρ(u) is still covariant to translations and rotations of ρ, since U[j1, ℓ] and U[j2, ℓ] are covariant to translations and rotations. The variable u is again subsampled at intervals 2j2−α with an oversampling factor α adjusted to eliminate the aliasing. Second order scattering invariants are computed by summing over the subsampled spatial variable u: S[j1, j2, ℓ, q]ρ = X u U[j2, ℓ] U[j1, ℓ]ρ(2j2−αu) q . These coefficients are computed only for j2 > j1 because one can verify [12] that the amplitude of these invariant coefficients is negligible for j2 ≤j1. The total number of computed second order invariants is thus |Q|LJ(J −1)/2. In the following, we shall write Sρ = {S[p]ρ}p the scattering representation of ρ, defined by the indices p = (j1, ℓ, q) and p = (j1, j2, ℓ, q). These coefficients are computed with iterated convolutions with wavelets, modulus non-linearities, and averaging. It is proved in [13] that such wavelet convolutions and non-linearities can be implemented with a deep convolutional network, whose filters depend upon the wavelets and whose depth J is the maximum scale index of all wavelets j1 < j2 ≤J. Besides translation and rotation invariance, one can prove that a scattering transform is Lipschitz continuous to deformations [12]. This means that if ρ(u) is deformed by a small (in maximum gradient norm) diffeomorphism applied to u, then the scattering vector stays within an error radius proportional to the size of the diffeomorphism. This property is particularly important to linearly regress functions which are also stable to deformations. 3 Solid harmonic scattering for quantum energy regression We study the application of solid harmonic scattering invariants to the regression of quantum molecular energies. The next section introduces the translation and rotation invariance properties of these energies. 3.1 Molecular regression invariances A molecule containing K atoms is entirely defined by its nuclear charges zk and its nuclear position vectors rk indexed by k. Denoting by x the state vector of a molecule, we have x = {(rk, zk) ∈R3 × R : k = 1, . . . , K}. The ground-state energy of a molecule has the following invariance properties outlined in [1]: 4 Invariance to permutations Energies do not depend on the indexation order k of each nuclei; Isometry invariance Energies are invariance to rigid translations, rotations, and reflections of the molecule and hence of the rk; Deformation stability The energy is Lipschitz continuous with respect to scaling of distances between atoms. Multiscale interactions The energy has a multiscale structure, with highly energetic bonds between neighboring atoms, and weaker interactions at larger distances, such as Van-der-Waals interactions. To regress quantum energies, a machine learning representation must satisfy the same invariance and stability properties while providing a set of descriptors which is rich enough to accurately estimate the atomization energy of a diverse collection of molecules. A rotation invariant scattering transform has been proposed to regress quantum energies of planar molecules [9]. However this approach involves too much computations in 3D because it requires to use a large number of oriented wavelets to cover the 3D spheres. The following sections explains how to regress the energies of 3D molecules from a spherical harmonic scattering. 3.2 Scattering transform of an electronic density Density Functional Theory computes molecular energies by introducing an electronic density ρ(u) which specifies the probability density of presence of an electron at a point u. Similarly, we associate to the state vector x of the molecule to a naive electronic density ρ which is a sum of Gaussians densities centered on each nuclei. This density incorporates no information on chemical bounds that may arise in the molecule. For K atoms placed at {rk}K k=1 having charges {zk}K k=1, the resulting density is ρx(r) = K X k=1 c(zk)g(r −rk), where g is a Gaussian, roughly representing an electron density localized around the nucleus, and c(zk) is a vector-valued “electronic channel”. It encodes different aspects of the atomic structure. We shall use three channels: the total nuclear charge zk of the atom, the valence electronic charge vk which specifies the number of electrons which can be involved in chemical bounds, and the core electronic charge zk −vk. It results that c(zk) = (zk, vk, zk −vk)T . The molecule embedding verifies Z ρx(u)du = X k (zk, vk, zk −vk)T . This integral gives the total number of nucleus charges and valence and core electrons. This naive density is invariant to permutations of atom indices k. The density ρx is invariant to permutations of atom indices but it is not invariant to isometries and it can not separate multiscale interactions. These missing invariances and the separation of scales into different channels are obtained by computing its scattering representation Sρx with solid harmonic wavelets. In Figure 1, there is an example of a 2D solid harmonic wavelet modulus U[j, ℓ]ρx for one molecule at different scales and angular frequencies. 3.3 Multilinear regression Molecular energies are regressed with multilinear combinations of scattering coefficients Sρx[p]. A multilinear regression of order r is defined by: ˜Er(ρx) = b + X i (νi r Y j=1 (⟨Sρx, w(j) i ⟩+ c(j) i )). For r = 1 this is a standard linear regression. For r = 2 this form introduces a non-linearity similar to those found in factored gated autoencoders [14]. Trilinear regressions for r = 3 are also used. 5 Figure 1: Left: Real parts of 2D solid harmonic wavelets ψℓ,j(u). The ℓparameters increases from 0 to 4 vertically where as the scale 2j increases from left to right. Cartesian slices of 3D spherical harmonic wavelets yield similar patterns. Right: Solid harmonic wavelet moduli S[j, ℓ, 1](ρx)(u) = |ρx ∗ψj,ℓ|(u) of a molecule ρx. The interference patterns at the different scales are reminiscent of molecular orbitals obtained in e.g. density functional theory. Figure 2: Mean absolute error (MAE) on the validation set as a function of the number of training points used. We observe a fast drop to low estimation errors with as few as 2000 training examples. While it is still always better to sample more of chemical space, it shows that the representation carries useful information easily amenable to further analysis, while keeping sufficient complexity to benefit from when more datapoints are available. Here we extend the interactions to an arbitrary number of multiplicative factors. We optimize the parameters of the multilinear model by minimizing a quadratic loss function L(y, ρx) = (y −˜Er(ρx))2 using the Adam algorithm for stochastic gradient descent [11]. The model described above is non-linear in the parameter space and therefore it is reasonable to assume that stochastic gradient descent will converge to a local optimum. We find that we can mitigate the effects of local optimum convergence by averaging the predictions of multiple models trained with different initializations2. 4 Numerical Experiments on Chemical Databases Quantum energy regressions are computed on two standard datasets: QM7 (GDB7-12) [18] has 7165 molecules of up to 23 atoms among H, C, O, N and S, and QM9 (GDB9-14) [17] has 133885 2For implementation details see http://www.di.ens.fr/data/software/ 6 molecules of up to 29 atoms among H, C, O, N and F. We first review results of existing maching learning algorithms before giving results obtained with the solid harmonic scattering transform. 4.1 State of the art algorithms Tables 1 and 2 gives the mean absolute error for each algorithm described below. The first machine learning approaches for quantum energy regressions were based on kernel ridge regression algorithms, optimized with different types of kernels. Kernels were first computed with Coulomb matrices, which encode pairwise nucleus-nucleus repulsion forces for each molecule [18, 15, 8, 16]. Coulomb matrices are not invariant to permutations of indices of atoms in the molecules, which leads to regression instabilities. Improvements have been obtained with bag-of-bonds descriptors [7], which groups matrix entries according to bond type, or with fixed-length smooth bond-distance histograms [2]. The BAML method (Bonds, Angles, etc, and machine learning) [10] refines the kernel by collecting atomic information, bond information, bond angle information and bond torsion information. The HDAD (Histograms of Distances, Angles, and Dihedral angles) kernels [5] improve results with computing histograms of these quantities. Smooth overlap of atomic positions (SOAP) kernels [3] can also obtain precise regression results with local descriptors computed with spherical harmonics. They are invariant to translations and rotations. However, these kernels only involve local interactions, and regression results thus degrade in presence of large-scale interactions. Deep neural networks have also been optimized to estimate quantum molecular energies. They hold the state of the art on large databases as shown in Tables 1 and 2. Deep tensor networks [19] combine pairwise distance matrix representations in a deep learning architecture. MPNN (Message Passing Neural Networks) learns a neural network representation on the molecules represented as bond graphs. It obtains the best results on the larger QM9 data base. 4.2 Solid harmonic scattering results We performed rigid affine coordinate transforms to align each molecule with its principle axis, making it possible to fit every molecule in a box of one long sidelength and two shorter ones. The Gaussian width of the electronic embedding is adjusted so that Gaussians located around the two atoms with minimal distance do not overlap too much. In all computations, the sampling grid is adjusted to keep aliasing errors negligible. Scattering vectors are standardized to have a 0 mean and unit variance before computing the multilayer regression. QM7 Scattering vectors are computed with L = 5. We estimated quantum energies with a linear ridge regression from scattering coefficients. The dataset comes with a split into 5 folds, where the energy properties are approximately stratified. The average of the mean absolute error (MAE) over 5 folds is 2.4 kcal/mol. It shows that scattering coefficients are sufficiently discriminative to obtain competitive results with a linear regression. Bilinear regressions involve more parameters and provides near state of the art performance. We average 5 differently initialized models over the 5 folds to obtain a mean absolute error of 1.2. Figure 2 evaluates the performance of the bilinear regression on invariant scattering descriptors. From as few as 2000 training samples onward, the test set error drops below 3kcal/mol indicating that the invariant representation gives immediate access to relevant molecular properties. The fact that we observe improvement with larger data samples means that the representation also exhibits sufficient flexibility to accommodate relevant information from larger sweeps over chemical space. QM9 Scattering vectors are computed with L = 2. Quantum energies were estimated from scattering vectors with linear, bilinear and trilinear regressions. For cross-validation, the dataset is split into 5 folds, where the energy properties are approximately stratified. The average of the mean absolute error (MAE) over 5 folds with a trilinear regression across the 5 folds is 0.55. 4.3 Discussion The solid harmonic scattering transform followed by a multilinear regression is a domain agnostic regression scheme which only relies on prior knowledge of translation and rotation invariance as well as deformation stability. However, it leads to close to state of the art results on each data base. 7 QM7 RSCM BoB SOAP DTN CBoB L-Scat B-Scat MAE 3.1 1.5 0.9 1 1.2 2.4 1.2 Table 1: Mean Absolute Error in kcal/mol of quantum energy regression in QM7 for different algorithms. (RSCM: Random Sorted Coulomb Matrix[8], BoB: Bag of Bonds[7], SOAP: smooth overlap of atomic positions[3], DTN: deep tensor networks[19], CBoB: Continuous bag of bonds[2], L-Scat: Linear regression on Scattering invariants, B-Scat: Bilinear regression on Scattering invariants QM9 HDAD BAML CM BOB DTN MPNN T-Scat MAE 0.59 1.20 2.97 1.42 0.84 0.44 0.55 Table 2: QM9 regression results. (HDAD: Histograms of Distances, Angles and Dihedral Angles [5], BAML: Bonds, Angles and Machine Learning [10] , RSCM: Random Sorted Coulomb Matrices, BOB: Bags of Bonds, DTN: Deep Tensor Networks, MPNN: Message Passing Neural Networks [6], T-Scat: Trilinear regression on scattering invariants The size of a scattering descriptor set grows logarithmically with the maximum number of atoms in the molecule (with increasing molecule size one continues to add scales to the wavelet transform, which adds logarithmically many coefficients) as opposed to most other methods such as [3] whose descriptor size grows linearly in the number of atoms in the molecule. Indeed, these techniques are based on measurements of local individual interactions within neighborhoods of atoms. The representation splits the information across scales and provides scale interaction coefficients which can be related to physical phenomena as opposed to millions of deep neural net weights which are difficult to interpret. Introducing multilinear regression between solid harmonic wavelet invariants further improves the performance on the energy regression task, achieving near state of the art performance. This may also be related to multilinear expansions of physical potentials. It is important to issue a word of caution on the chemical interpretation of these algorithmic regressions. Indeed, all data bases are computed with DFT numerical codes, which only approximate the energy. For the QM9 database, validation errors are on average 5 kcal/mol [17] on calculated energies compared to true chemical energies of ground state molecules. Refined results of fractions of kcal/mol thus no longer add true chemical information but rather reflect the ability to estimate the values produced by DFT numerical codes. 5 Conclusion We introduced a 2D and 3D solid harmonic wavelet scattering transform which is invariant to translations and rotations and stable to deformations. It is computed with two successive convolutions with solid harmonic wavelets and complex modulus. Together with multilinear regressions, this representation provides near state of the art results for estimation of quantum molecular energies. The same representation is used for small and large data bases. The mathematical simplicity of these descriptors opens the possibility to relate these regression to multiscale properties of quantum chemical interactions. Acknowledgements M.E., G.E. and S.M. are supported by ERC grant InvariantClass 320959; M.H. is supported by the Alfred P. Sloan Fellowship, the DARPA YFA, and NSF grant 1620216. References [1] Albert P. Bartók, Risi Kondor, and Gábor Csányi. On representing chemical environments. Physical Review B, 87(18), may 2013. [2] Christopher R. Collins, Geoffrey J. Gordon, O. Anatole von Lilienfeld, and David J. Yaron. Constant size molecular descriptors for use with machine learning. arXiv, 2017. [3] Sandip De, Albert P. Bartók, Gábor Csányi, and Michele Ceriotti. Comparing molecules and solids across structural and alchemical space. Phys. Chem. Chem. Phys., 18(20):13754–13769, 2016. 8 [4] Peter Deglmann, Ansgar Schäfer, and Christian Lennartz. Application of quantum calculations in the chemical industry - an overview. International Journal of Quantum Chemistry, 115(3):107– 136, 2014. [5] Felix A. Faber, Luke Hutchison, Bing Huang, Justin Gilmer, Samuel S. Schoenholz, George E. Dahl, Oriol Vinyals, Steven Kearnes, Patrick F. Riley, and O. Anatole von Lilienfeld. Prediction errors of molecular machine learning models lower than hybrid dft error. Journal of Chemical Theory and Computation, 0(0):null, 0. PMID: 28926232. [6] Justin Gilmer, Samuel S. Schoenholz, Patrick F. Riley, Oriol Vinyals, and George E. Dahl. Neural message passing for quantum chemistry. CoRR, abs/1704.01212, 2017. [7] Katja Hansen, Franziska Biegler, Raghunathan Ramakrishnan, Wiktor Pronobis, O. Anatole von Lilienfeld, Klaus-Robert Müller, and Alexandre Tkatchenko. Machine learning predictions of molecular properties: Accurate many-body potentials and nonlocality in chemical space. The Journal of Physical Chemistry Letters, 6(12):2326–2331, 2015. PMID: 26113956. [8] Katja Hansen, Grégoire Montavon, Franziska Biegler, Siamac Fazli, Matthias Rupp, Matthias Scheffler, O. Anatole von Lilienfeld, Alexandre Tkatchenko, and Klaus-Robert Müller. Assessment and validation of machine learning methods for predicting molecular atomization energies. Journal of Chemical Theory and Computation, 9(8):3404–3419, 2013. [9] Matthew Hirn, Stéphane Mallat, and Nicolas Poilvert. Wavelet scattering regression of quantum chemical energies. Multiscale Modeling and Simulation, 15(2):827–863, 2017. arXiv:1605.04654. [10] Bing Huang and O. Anatole von Lilienfeld. Communication: Understanding molecular representations in machine learning: The role of uniqueness and target similarity. The Journal of Chemical Physics, 145(16):161102, 2016. [11] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [12] Stéphane Mallat. Group invariant scattering. Communications on Pure and Applied Mathematics, 65(10):1331–1398, October 2012. [13] Stéphane Mallat. Understanding deep convolutional networks. Phil. Trans. R. Soc. A, 374(2065):20150203, 2016. [14] Roland Memisevic. Gradient-based learning of higher-order image features. In Computer Vision (ICCV), 2011 IEEE International Conference on, pages 1591–1598. IEEE, 2011. [15] Grégoire Montavon, Katja Hansen, Siamac Fazli, Matthias Rupp, Franziska Biegler, Andreas Ziehe, Alexandre Tkatchenko, O. Anatole von Lilienfeld, and Klaus-Robert Müller. Learning invariant representations of molecules for atomization energy prediction. In P. Bartlett, F.C.N. Pereira, C.J.C. Burges, L. Bottou, and K.Q. Weinberger, editors, Advances in Neural Information Processing Systems 25, pages 449–457. 2012. [16] Grégoire Montavon, Matthias Rupp, Vivekanand Gobre, Alvaro Vazquez-Mayagoitia, Katja Hansen, Alexandre Tkatchenko, Klaus-Robert Müller, and O Anatole von Lilienfeld. Machine learning of molecular electronic properties in chemical compound space. New Journal of Physics, 15(9):095003, 2013. [17] Raghunathan Ramakrishnan, Pavlo O. Dral, Matthias Rupp, and O. Anatole von Lilienfeld. Quantum chemistry structures and properties of 134 kilo molecules. Scientific Data, 1:140022 EP –, 08 2014. [18] M. Rupp, A. Tkatchenko, K.-R. Müller, and O. A. von Lilienfeld. Fast and accurate modeling of molecular atomization energies with machine learning. Physical Review Letters, 108:058301, 2012. [19] Kristof T. Schütt, Farhad Arbabzadah, Stefan Chmiela, Klaus R. Müller, and Alexandre Tkatchenko. Quantum-chemical insights from deep tensor neural networks. Nature Communications, 8:13890 EP –, Jan 2017. Article. 9 [20] Laurent Sifre and Stéphane Mallat. Rotation, scaling and deformation invariant scattering for texture discrimination. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1233–1240, 2013. 10 | 2017 | 298 |
6,783 | On Frank-Wolfe and Equilibrium Computation Jacob Abernethy Georgia Institute of Technology prof@gatech.edu Jun-Kun Wang Georgia Institute of Technology jimwang@gatech.edu Abstract We consider the Frank-Wolfe (FW) method for constrained convex optimization, and we show that this classical technique can be interpreted from a different perspective: FW emerges as the computation of an equilibrium (saddle point) of a special convex-concave zero sum game. This saddle-point trick relies on the existence of no-regret online learning to both generate a sequence of iterates but also to provide a proof of convergence through vanishing regret. We show that our stated equivalence has several nice properties, as it exhibits a modularity that gives rise to various old and new algorithms. We explore a few such resulting methods, and provide experimental results to demonstrate correctness and efficiency. 1 Introduction There has been a burst of interest in a technique known as the Frank-Wolfe method (FW) [10], also known as conditional gradient, for solving constrained optimization problems. FW is entirely a first-order method, does not require any projection operation, and instead relies on access to a linear optimization oracle. Given a compact and convex constraint set X ⊂Rd, we require the ability to (quickly) answer queries of the form O(v) := arg minx∈X x⊤v, for any vector v ∈Rd. Other techniques such as gradient descent methods require repeated projections into the constraint set which can be prohibitively expensive. Interior point algorithms, such as Newton path following schemes [1], require computing a hessian inverse at each iteration which generally does not scale well with the dimension. In the present paper we aim to give a new perspective on the Frank-Wolfe method by showing that, in a broad sense, it can be viewed as a special case of equilibrium computation via online learning. Indeed, when the optimization objective is cast as a particular convex-concave payoff function, then we are able to extract the desired optimal point via the equilibrium of the associated zero-sum game. Within Machine Learning there has been a lot of attention paid to the computation of optimal strategies for zero-sum games using online learning techniques. An amazing result, attributed to [12] yet now practically folklore in the literature, says that we can compute the optimal equilibrium in a zero sum game by pitting two online learning strategies against each other and, as long as they achieve the desired regret-minimization guarantee, the long-run empirical average of their actions (strategy choices) must converge to the optimal equilibrium. This trick is both very beautiful but also extremely useful: it was in some sense the core of early work in Boosting [11], has been shown to generalize many linear programming techniques [3], it serves as the key tool for recent advances in flow optimization problems [8], and has been instrumental in understanding differential privacy [9]. We begin in Section 2 by reviewing the method of proving a generalized minimax theorem using regret minimization, and we show how this proof is actually constructive and gives rise to a generic meta-algorithm. This meta-algorithm is especially modular, and allows for the substitution of various algorithmic tools that achieve, up to convergence rates, essentially the same core result. We then show that the original Frank-Wolfe algorithm is simply one instantiation of this meta-algorithm, yet where the convergence rate follows as a trivial consequence of main theorem, albeit with an additional O(log T) factor. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. We build upon this by showing that a number of variants of Frank-Wolfe are also simple instantiations of our meta-algorithm, with a convergence rate that follows easily. For example, we propose the cumulative gradient variant of Frank-Wolfe and prove that the same guarantee holds, yet relies on a potentially more stable optimization oracle. We show that techniques of [31] using stochastic smoothing corresponding to implement a Follow-the-perturbed-leader variant of our meta-algorithm. And finally, we use our framework to prove an entirely new result, showing that one obtains an O(log T/T) convergence rate even when the objective f(·) is not smooth, but instead the constraint set satisfies strong convexity. The results laid out in this paper provide value not only in proving rates and establishing new and existing algorithms but also in setting forth a perspective on Frank-Wolfe-style methods that can leverage the wealth of results we have available from online learning and online convex optimization. At present, the possibilities and limits of various online learning problems has been thoroughly worked out [20, 7] with incredibly tight bounds. Using the connections we put forth, many of these results can provide a stronger theoretical framework towards understanding projection-free conditional gradient methods. Related works of projection-free algorithms [25] gives an analysis of FW for smooth objectives, and shows that FW converges at a O(1/T) rate even when the linear oracle is solved approximately, under certain conditions. [30] develops a block-wise update strategy for FW on the dual objective of structural SVM, where only a subset of dual variables are updated at each iteration. In the algorithm, a smaller oracle is called due to the block-wise update, which reduces the computational time per iteration and leads to the speedup overall. [37] proposes updating multiple blocks at a time. [34] proposes using various measures to select a block for update. In another direction, some results have aimed at obtaining improved convergence rates. [14] shows that for strongly convex and smooth objective functions, FW can achieve a O(1/T 2) convergence rate over a strongly convex set. [13, 15] first show that one can achieve linear convergence for strongly convex and smooth objectives over polytopes using a projection-free algorithm. The algorithm constructs a stronger oracle which can be efficiently implemented for certain polytopes like simplex. [29] shows that some variants of FW such as away-step FW [38] or pairwise FW enjoy an exponential convergence rate when the feasible set is a polytope. [5] provides a refined analysis for the awaystep FW. [17] extends [29] to some saddle-point optimization problems, where the constraint set is assumed to be a polytope and the objective is required to be strongly convex for one variable and strongly concave for the other. A drawback of away-step FW [38] is that it requires storing the previous outputs from the oracle. Very recently, [16] develop a new variant that avoids this issue for specific polytopes, which also enjoys exponential convergence for strongly convex and smooth objectives. Note that all of the exponential convergence results depend on some geometric properties of the underlying polytope. Other works include variants for stochastic setting [23], online learning setting [22], minimizing some structural norms [19, 39], or reducing the number of gradient evaluations [32]. There is also a connection between subgradient descent and FW; Bach [4] shows that for certain types of objectives, subgradient descent applied to the primal domain is equivalent to FW applied to the dual domain. Preliminaries and Notation Definition 1: A convex set Y ⊆Rm is an α-strongly convex set w.r.t. a norm ∥· ∥if for any u, v ∈Y , any θ ∈[0, 1], the ∥· ∥ball centered at θu + (1 −θ)v with radius θ(1 −θ) α 2 ∥u −v∥2 is contained in Y . Please see [14] for examples about strongly-convex sets. Definition 2 A function is β-strongly smooth w.r.t. a norm ∥· ∥if f is everywhere differentiable and f(u) ≤f(v) + ∇f(v)⊤(u −v) + β 2 ∥u −v∥2. A function is β-strongly convex w.r.t. a norm ∥· ∥if f(u) ≥f(v) + ∇f(v)⊤(u −v) + β 2 ∥u −v∥2. Definition 3 For a convex function f(·), its Fenchel conjugate is f ∗(x) := supy⟨x, y⟩−f(y). Note that if f is convex then so is its conjugate f ∗, since it is defined as the maximum over linear functions of x [6]. Furthermore, the biconjugate f ∗∗equals f if and only if f is closed and convex. It is known that f is β-strongly convex w.r.t. ∥· ∥if and only if f ∗is 1/β strongly smooth w.r.t the dual norm ∥· ∥∗[26], assuming that f is a closed and convex function. 2 2 Minimax Duality via No-Regret Learning 2.1 Brief review of online learning In the task of online convex optimization, we assume a learner is provided with a compact and convex set K ⊂Rn known as the decision set. Then, in an online fashion, the learner is presented with a sequence of T loss functions ℓ1(·), ℓ2(·), . . . , ℓT (·) : K →R. On each round t, the learner must select a point xt ∈K, and is then “charged” a loss of ℓt(xt) for this choice. Typically it is assumed that, when the learner selects xt on round t, she has observed all loss functions ℓ1(·), . . . , ℓt−1(·) up to, but not including, time t. However, we will also consider learners that are prescient, i.e. that can choose xt with knowledge of the loss functions up to and including time t. The objective of interest in most of the online learning literature is the learner’s regret, defined as RT := PT t=1 ℓt(xt) −minx∈K PT t=1 ℓt(x). Oftentimes we will want to refer to the average regret, or the regret normalized by the time horizon T, which we will call RT := RT T . What has become a cornerstone of online learning research has been the existence of no-regret algorithms, i.e. learning strategies that guarantee RT →0 as T →∞. Let us consider three very simple learning strategies, and we note the available guarantees for each. (FollowTheLeader) Perhaps the most natural algorithm one might think of is to simply select xt as the best point in hindsight. That is, the learner can choose xt = arg minx∈K Pt−1 s=1 ℓs(x). Lemma 1 ([21]). If each ℓt(·) is 1-lipschitz and 1-strongly convex, then FollowTheLeader achieves RT ≤c log T T for some constant c. (BeTheLeader) When the learner is prescient, then we can do slightly better than FollowTheLeader by incorporating the current loss function: xt = arg minx∈K Pt s=1 ℓs(x). This algorithm was named BeTheLeader by [28], who also proved that it actually guarantees non-positive regret! Lemma 2 ([28]). For any sequence of loss functions, BeTheLeader achieves RT ≤0. (BestResponse) But perhaps the most trivial strategy for a prescient learner is to ignore the history of the ℓs’s, and simply play the best choice of xt on the current round. We call this algorithm BestResponse, defined as xt = arg minx∈K ℓt(x). A quick inspection reveals that BestResponse satisfies RT ≤0. 2.2 Minimax Duality The celebrated minimax theorem for zero-sum games, first discovered by John von Neumann in the 1920s [36, 33], is certainly a foundational result in the theory of games. It states that two players, playing a game with zero-sum payoffs, each have an optimal randomized strategy that can be played obliviously – that is, even announcing their strategy in advance to an optimal opponent would not damage their own respective payoff, in expectation. In this paper we will focus on more general minimax result, establishing duality for a class of convex/concave games, and we will show how this theorem can be proved without the need for Brouwer’s Fixed Point Theorem [27]. The key inequality can be established through the use of no-regret learning strategies in online convex optimization, which we detail in the following section. The theorem below can be proved as well using Sion’s Minimax Theorem [35]. Theorem 1. Let X, Y be compact convex subsets of Rn and Rm respectively. Let g : X × Y →R be convex in its first argument and concave in its second. Then we have that min x∈X max y∈Y g(x, y) = max y∈Y min x∈X g(x, y) (1) We want to emphasize that a meta-algorithm (Algorithm 1) actually emerges from our proof for Theorem 1, please see the supplementary for details. It is important to point out that the meta algorithm, as a routine for computing equlibria, is certainly not a novel technique, it has served implicitly as the underpinning of many works, including those already mentioned [11, 9, 8]. We close this section by summarizing the approximate equilibrium computation guarantee that follows from the above algorithm. This result is classical, and we explore it in great detail in the 3 Algorithm 1 Meta Algorithm for equilibrium computation 1: Input: convex-concave payoff g : X × Y →R, algorithms OAlgX and OAlgY 2: for t = 1, 2, . . . , T do 3: xt := OAlgX(g(·, y1), . . . , g(·, yt−1)) 4: yt := OAlgY (g(x1, ·), . . . , g(xt−1, ·), g(xt, ·)) 5: end for 6: Output: ¯xT = 1 T PT t=1 xt and ¯yT := 1 T PT t=1 yt Appendix. We let ¯xT := 1 T PT t=1 xt and ¯yT := 1 T PT t=1 yt, and let V ∗be the value of the game, which is the quantity in (1). Theorem 2. Algorithm 1 outputs ¯xT and ¯yT satisfying max y∈Y g(¯xT , y) ≤V ∗+ ϵT + δT and min x∈X g(x, ¯yT ) ≥V ∗−(ϵT + δT ). (2) as long as OAlgX and OAlgY guarantee average regret bounded by ϵT and δT , respectively. 3 Relation to the Frank-Wolfe Method We now return our attention to the problem of constrained optimization, and we review the standard Frank-Wolfe algorithm. We then use the technologies presented in the previous section to recast Frank-Wolfe as an equilibrium computation, and we show that indeed the vanilla algorithm is an instantiation of our meta-algorithm (Alg. 1). We then proceed to show that the modularity of the minimax duality perspective allows us to immediately reproduce existing variants of Frank-Wolfe, as well as construct new algorithms, with convergence rates provided immediately by Theorem 2. To begin, let us assume that we have a compact set Y ⊂Rn and a convex function f : Y →R. Our primary goal is to solve the objective min y∈Y f(y). (3) We say that y0 is an ϵ-approximate solution as long as f(y0) −miny∈Y f(y) ≤ϵ. 3.1 A Brief Overview of Frank-Wolfe Algorithm 2 Standard Frank-Wolfe algorithm 1: Input: obj. f : Y →R, oracle O(·), learning rate {γt ∈[0, 1]}t=1,2,..., init. w0 ∈Y 2: for t = 1, 2, 3 . . . , T do 3: vt ←O(∇f(wt−1)) = arg min v∈Y ⟨v, ∇f(wt−1)⟩ 4: wt ←(1 −γt)wt−1 + γtvt. 5: end for 6: Output: wT The standard Frank-Wolfe algorithm (Algorithm 2) consists of making repeated calls to a linear optimization oracle (line 6), followed by a convex averaging step of the current iterate and the oracle’s output (line 7). It initializes a w1 in the constraint set Y . Due to the convex combination step, the iterate wt is always within the constraint set, which is the reason why it is called projection free. We restate a proposition from [10], who established the convergence rate of their algorithm. Theorem 3 ([10]). Assume that f(·) is 1-strongly smooth. If Algorithm 2 is run for T rounds, then there exists a sequence {γt} such that the output wT is a O 1 T -approximate solution to (3). It is worth noting that the typical learning rate used throughout the literature is γt = 2 2+t [31, 25]. This emerges as the result of a recursive inequality. 4 3.2 Frank-Wolfe via the Meta-Algorithm We now show that the meta-algorithm generalizes Frank-Wolfe, and provides a much more modular framework for producing similar algorithms. We will develop some of these novel methods and establish their convergence via Theorem 2. In order to utilize minimax duality, we have to define decision sets for two players, and we must produce a convex-concave payoff function. First we will assume, for convenience, that f(y) := ∞for any y /∈Y . That is, it takes the value ∞outside of the convex/compact set Y , which ensures that f is lower semi-continuous and convex. Now, let the x-player be given the set X := {∇f(y) : y ∈Y }. One can check that the closure of the set X is a convex set. Please see Appendix 2 for the proof. Theorem 4. The closure of (sub-)gradient space {∂f(y)|y ∈Y } is a convex set. The y-player’s decision set will be Y , the constraint set of the primary objective (3). The payoff g(·, ·) will be defined as g(x, y) := −x⊤y + f ∗(x). (4) The function f ∗(·) is the Fenchel conjugate of f. We observe that g(x, y) is indeed linear, and hence concave, in y, and it is also convex in x. Let’s notice a few things about this particular game. Looking at the max min expression, max y∈Y min x∈X g(x, y) = max y∈Y −max x∈X x⊤y −f ∗(x) = − min y∈Y f(y) = V ∗, (5) which follows by the fact that f ∗∗= f.1 Note, crucially, that the last term above corresponds to the objective we want to solve up to a minus sign. Any ¯y which is an ϵ-approximate equilibrium strategy for the y-player will also be an ϵ-approximate solution to (3). We now present the main result of this section, which is the connection between Frank-Wolfe (Alg. 2) and Alg. 1. Theorem 5. When both are run for exactly T rounds, the output ¯yT of Algorithm 1 is identically the output wT of Algorithm 2 as long as: (I) Init. x1 in Alg 1 equals ∇f(w0) in Alg. 2; (II) Alg. 2 uses learning rate γt := 1 t ; (III) Alg. 1 receives g(·, ·) defined in (4); (IV) Alg. 1 sets OAlgX := FollowTheLeader; (V) Alg. 1 sets OAlgY := BestResponse. Proof. We will prove that the following three equalities are maintained throughout both algorithms. We emphasize that the objects on the left correspond to Alg. 1 and those on the right to Alg. 2. xt = ∇f(wt−1) (6) yt = vt (7) ¯yt = wt. (8) We first note that the first condition of the theorem ensures that (6) holds for t = 1. Second, the choice of learning rate γt = 1 t already guarantees that (7) implies (8), since this choice of rate ensures that wt is always a uniform average of the updates vt. It remains to establish (6) and (7) via induction. We begin with the former. Recall that xt is selected via FollowTheLeader against the sequence of loss functions ℓt(·) := g(·, yt). To write precisely what this means, xt := arg minx∈X n 1 t−1 Pt−1 s=1 ℓs(x) o = arg minx∈X n 1 t−1 Pt−1 s=1(−y⊤ s x + f ∗(x)) o = arg max x∈X ¯y⊤ t−1x −f ∗(x) = ∇f(¯yt−1). The final line follows as a result of the Legendre transform [6]. Of course, by induction, we have that ¯yt−1 = wt−1, and hence we have established (6). 1It was important how we defined X here, as the fenchel conjugate takes the value of ∞at any point x /∈{∇f(y) : y ∈Y }, hence the unconstrained supremum is the same as maxx∈X(·) 5 Finally, let us consider how yt is chosen according to BestResponse. Recall that sequence of loss functions presented to the y-player is ht(·) := −g(xt, ·). Utilizing BestResponse for this sequence implies that yt = arg min y∈Y ht(y) = arg min y∈Y x⊤ t y −f ∗(xt) = arg min y∈Y x⊤ t y ((6) by induc.) = arg min y∈Y ∇f(¯yt−1)⊤y = arg min y∈Y ∇f(wt−1)⊤y ( which is vt). Where the last equality follows by induction via (8). This completes the proof. Note that the algorithm does not need to compute the conjugate, f ∗. While the Frank-Wolfe algorithm can be viewed as implicitly operating on the conjugate, it is only through the use of arg maxx∈X ¯y⊤ t−1x −f ∗(x) . Yet, this operation does not need to be computed in the naive way (i.e. by first computing f ∗and then doing the maximization). Instead, the expression actually boils down to ∇f(y) which is just a gradient computation! The equivalence we just established has several nice features. But it does not provide a convergence rate for Algorithm 2. This should perhaps not be surprising, as nowhere did we even use the smoothness of f anywhere in the equivalence. Instead, this actually follows via a key application of Theorem 2, utilizing the fact that f ∗is strongly convex on the interior of the set X 2, granting FollowTheLeader a logarithmic regret rate. Corollary 1. Assume that f(·) is 1-strongly smooth. Then Algorithm 2, with learning rate γt := 1 t , outputs wT with approximation error O log T T . Proof. As a result of Theorem 5, we have established that Alg. 2 is a special case of Alg. 1, with the parameters laid out in the previous theorem. As a result of Theorem 2, the approximation error of wT is precisely the error ϵT + δT of the point ¯yT when generated via Alg. 1 with subroutines OAlgX := FollowTheLeader and OAlgY = BestResponse, assuming that these two learning algorithms guarantee average regret no more than ϵT and δT , respectively. We noted that BestResponse does not suffer regret, so δT = 0. To bound the regret of FollowTheLeader on the sequence of functions g(·, y1), . . . , g(·, yT ), we observe that the smoothness of f implies that f ∗is 1-strongly convex, which in turn implies that g(x, yt) = −x⊤yt + f ∗(x) is also 1-strongly convex (in x). Hence Lemma 1 guarantees that FollowTheLeader has average regret ϵT := O log T T , which completes the proof. We emphasize that the above result leans entirely on existing work on regret bounds for online learning, and these tools are doing the heavy lifting. We explore this further in the following section. 4 Frank-Wolfe-style Algs, New and Old We now have a factory for generating new algorithms using the approach laid out in Section 3. Theorem 5 shows that the standard Frank-Wolfe algorithm (with a particular learning rate) is obtained via the meta-algorithm using two particular online learning algorithms OAlgX, OAlgY . But we have full discretion to choose these two algorithms, as long as they provide the appropriate regret guarantees to ensure convergence. 4.1 Cumulative Gradients We begin with one simple variant, which we call Cumulative-Gradient Frank-Wolfe, laid out in Algorithm 3. The one significant difference with vanilla Frank-Wolfe is that the linear optimization oracle receives as input the average of the gradients obtained thus far, as opposed to the last one. 2 We only need to assume f is "smooth on the interior of Y " to get the result. (That f is technically not smooth outside of Y is not particularly relevant) The result that f ∗is strongly convex on the interior of the set X is essentially proven by [26] in their appendix. This argument has been made elsewhere in various forms in the literature (e.g. [18]). 6 Algorithm 3 Cumulative-Gradient Frank-Wolfe 1: Initialize: any w0 ∈Y . 2: for t = 1, 2, 3 . . . , T do 3: vt ←arg min v∈Y D y, 1 t−1 Pt−1 s=1 ∇f(ws) E 4: wt ←(1 −γt)wt−1 + γtvt. 5: end for 6: Output: wT The proof of convergence requires little effort. Corollary 2. Assume that f(·) is 1-strongly smooth. Then Algorithm 3, with learning rate γt := 1 t , outputs wT with approximation error O log T T . Proof. The result follows almost identically to Corollary 1. It requires a quick inspection to verify that the new linear optimization subroutine corresponds to implementing BeTheLeader as OAlgY instead of BestResponse. However, both BestResponse and BeTheLeader have non-positive regret (δT ≤0) (Lemma 2 in the supplementary), and thus they achieve the same convergence. We note that a similar algorithm to the above can be found in [31], although in their results they consider more general weighted averages over the gradients. 4.2 Perturbation Methods and Stochastic Smoothing Looking carefully at the proof of Corollary 1, the fact that FollowTheLeader was suitable for the vanilla FW analysis relies heavily on the strong convexity of the functions ℓt(·) := g(·, yt), which in turn results from the smoothness of f(·). But what about when f(·) is not smooth, is there an alternative algorithm available? We observe that one of the nice techniques to grow out of the online learning community is the use of perturbations as a type of regularization to obtain vanishing regret guarantees [28] – their method is known as Follow the Perturbed Leader (FTPL). The main idea is to solve an optimization problem that has a random linear function added to the input, and to select3 as xt the expectation of the arg min under this perturbation. More precisely, xt := EZ h arg minx∈X n Z⊤x + Pt−1 s=1 ℓs(x) oi . Here Z is some random vector drawn according to an appropriately-chosen distribution and ℓs(x) is the loss function of the x-player on round s; with the definition of payoff function g, ℓs(x) is −x⊤ys + f ∗(x) (4). One can show that, as long as Z is chosen from the right distribution, then this algorithm guarantees average regret on the order of O 1 √ T , although obtaining the correct dimension dependence relies on careful probabilistic analysis. Recent work of [2] shows that the analysis of perturbation-style algorithm reduces to curvature properties of a stochastically-smoothed Fenchel conjugate. What is intriguing about this perturbation approach is that it ends up being equivalent to an existing method proposed by [31] (Section 3.3), who also uses a stochastically smoothed objective function. We note that EZ h arg minx∈X n Z⊤x + Pt−1 s=1 ℓs(x) oi = EZ arg maxx∈X (¯yt−1 + Z/(t −1))⊤x −f ∗(x) = EZ[∇f(¯yt−1 + Z/(t −1))] = ∇˜ft−1(¯yt−1) (9) where ˜fα(x) := E[f(x + Z/α)]. [31] suggests using precisely this modified ˜f, and they prove a rate on the order of O 1 √ T . As discussed, the same would follow from vanishing regret of FTPL. 3Technically speaking, the results of [28] only considered linear loss functions and hence their analysis did not require taking averages over the input perturbation. While we will not address computational issues here due to space, actually computing the average arg min is indeed non-trivial. 7 4.3 Boundary Frank-Wolfe Algorithm 4 Modified meta-algorithm, swapped roles 1: Input: convex-concave payoff g : X × Y →R, algorithms OAlgX and OAlgY 2: for t = 1, 2, . . . , T do 3: yt := OAlgY (g(x1, ·), . . . , g(xt−1, ·)) 4: xt := OAlgX(g(·, y1), . . . , g(·, yt−1), g(·, yt)) 5: end for 6: Output: ¯xT = 1 T PT t=1 xt and ¯yT := 1 T PT t=1 yt We observe that the meta-algorithm previously discussed assumed that the x-player was first to act, followed by the y-player who was allowed to be prescient. Here we reverse their roles, and we instead allow the x-player to be prescient. The new meta-algorithm is described in Algorithm 4. We are going to show that this framework lead to a new projection-free algorithm that works for non-smooth objective functions. Specifically, if the constraint set is strongly convex, then this exhibits a novel projection free algorithm that grants a O(log T/T) convergence even for non-smooth objective functions. The result relies on very recent work showing that FollowTheLeader for strongly convex sets [24] grants a O(log T) regret rate. Prior work has considered strongly convex decision sets [14], yet with the additional assumption that the objective is smooth and strongly convex, leading to O(1/T 2) convergence. Boundary Frank-Wolfe requires neither smoothness nor strong convexity of the objective. What we have shown, essentially, is that a strongly convex boundary of the constraint set can be used in place of smoothness of f(·) in order to achieve O(1/T) convergence. Algorithm 5 Boundary Frank-Wolfe 1: Input: objective f : Y →R, oracle O(·) for Y , init. y1 ∈Y . 2: for t = 2, 3 . . . , T do 3: yt ←arg miny∈Y 1 t−1 Pt−1 s=1⟨y, ∂f(ys)⟩ 4: end for 5: Output: ¯yT = 1 T PT t=1 yt We may now prove a result about Algorithm 5 using the same techniques laid out in Theorem 5. Theorem 6. Algorithm 5 is a instance of Algorithm 4 if (I) Init. y1 in Alg 5 equals y1 in Alg. 4; (II) Alg. 1 sets OAlgY := FollowTheLeader; and (III) Alg. 1 sets OAlgX := BestResponse. Furthermore, when Y is strongly convex, and Pt s=1 ∂f(ys) has non-zero norm, then f(¯yT ) −min y∈Y f(y) = O(M log T αLT T ) where M := supy∈Y ∥∂f(y)∥, LT := min1≤t≤T ∥Θt∥, Θt = Pt s=1 1 t ∂f(ys). Proof. Please see Appendix 3 for the proof. Note that the rate depends crucially on LT , which is the smallest averaged-gradient norm computed during the optimization. Depending on the underlying optimization problem, LT can be as small as O(1/ √ T) or can even be 0. Now let us discuss when the boundary FW works; namely, the condition that causes the cumulative gradient being nonzero. If a linear combination of gradients is 0 then clearly 0 is in the convex hull of subgradients ∂f(x) for boundary points x. Since the closure of {∇f(x)|x ∈Y } is convex, according to Theorem 4, this implies that 0 is in {∇f(x)|x ∈Y }. If we know in advance that 0 /∈cl({∇f(x)|x ∈Y }) we are assured that the cumulative gradient will not be 0. Hence, the proposed algorithm may only be useful when it is known, a priori, that the solution y∗will occur not in the interior but on the boundary of Y . It is indeed an odd condition, but it does hold in many typical scenarios. One may add a perturbed vector to the gradient and show that with high probability, LT is a non-zero number. The downside of this approach is that it would generally grant a slower convergence rate; it cannot achieve log(T)/T as the inclusion of the perturbation requires managing an additional trade-off. 8 References [1] Jacob Abernethy and Elad Hazan. Faster convex optimization: Simulated annealing with an efficient universal barrier. In Proceedings of The 33rd International Conference on Machine Learning, pages 2520–2528, 2016. [2] Jacob Abernethy, Chansoo Lee, Abhinav Sinha, and Ambuj Tewari. Online linear optimization via smoothing. In COLT, pages 807–823, 2014. [3] Sanjeev Arora, Elad Hazan, and Satyen Kale. The multiplicative weights update method: a meta-algorithm and applications. Theory of Computing, 8(1):121–164, 2012. [4] Francis Bach. Duality between subgradient and conditional gradient methods. SIAM Journal of Optimization, 2015. [5] Amir Beck and Shimrit Shtern. Linearly convergent away-step conditional gradient for non-strongly convex functions. Mathematical Programming, 2016. [6] Stephen Boyd. Convex optimization. Cambridge University Press, 2004. [7] Nicolo Cesa-Bianchi and Gábor Lugosi. Prediction, learning, and games. Cambridge university press, 2006. [8] Paul Christiano, Jonathan A Kelner, Aleksander Madry, Daniel A Spielman, and Shang-Hua Teng. Electrical flows, laplacian systems, and faster approximation of maximum flow in undirected graphs. In Proceedings of the forty-third annual ACM symposium on Theory of computing, pages 273–282. ACM, 2011. [9] Cynthia Dwork, Aaron Roth, et al. The algorithmic foundations of differential privacy. Foundations and Trends R⃝in Theoretical Computer Science, 9(3–4):211–407, 2014. [10] Marguerite Frank and Philip Wolfe. An algorithm for quadratic programming. Naval research logistics quarterly, 3(1-2):95–110, 1956. [11] Yoav Freund and Robert E Schapire. Game theory, on-line prediction and boosting. In Proceedings of the ninth annual conference on Computational learning theory, pages 325–332. ACM, 1996. [12] Yoav Freund and Robert E Schapire. Adaptive game playing using multiplicative weights. Games and Economic Behavior, 29(1-2):79–103, 1999. [13] Dan Garber and Elad Hazan. Playing non-linear games with linear oracles. FOCS, 2013. [14] Dan Garber and Elad Hazan. Faster rates for the frank-wolfe method over strongly-convex sets. ICML, 2015. [15] Dan Garber and Elad Hazan. A linearly convergent conditional gradient algorithm with applications to online and stochastic optimization. SIAM Journal on Optimization, 2016. [16] Dan Garber and Ofer Meshi. Linear-memory and decomposition-invariant linearly convergent conditional gradient algorithm for structured polytopes. NIPS, 2016. [17] G. Gidel, T. Jebara, and S. Lacoste-Julien. Frank-wolfe algorithms for saddle point problems. AISTATS, 2016. [18] Gianluca Gorni. Conjugation and second-order properties of convex functions. Journal of Mathematical Analysis and Applications, 1991. [19] Zaid Harchaoui, Anatoli Juditsky, and Arkadi Nemirovski. Conditional gradient algorithms for normregularized smooth convex optimization. Math. Prog., Series A, 2013. [20] Elad Hazan. Introduction to online convex optimization. 2014. [21] Elad Hazan, Amit Agarwal, and Satyen Kale. Logarithmic regret algorithms for online convex optimization. Machine Learning, 69(2-3):169–192, 2007. [22] Elad Hazan and Satyen Kale. Projection-free online learning. ICML, 2012. [23] Elad Hazan and Haipeng Luo. Variance-reduced and projection-free stochastic optimization. ICML, 2016. [24] Ruitong Huang, Tor Lattimore, András György, and Csaba Szepesvari. Following the leader and fast rates in linear prediction: Curved constraint sets and other regularities. 2016. 9 [25] Martin Jaggi. Revisiting frank-wolfe: Projection-free sparse convex optimization. ICML, 2013. [26] Sham M. Kakade, Shai Shalev-shwartz, and Ambuj Tewari. On the duality of strong convexity and strong smoothness: Learning applications and matrix regularization. 2009. [27] Shizuo Kakutani. A generalization of brouwer’s fixed point theorem. 1941. [28] Adam Kalai and Santosh Vempala. Efficient algorithms for online decision problems. Journal of Computer and System Sciences, 71(3):291–307, 2005. [29] Simon Lacoste-Julien and Martin Jaggi. On the global linear convergence of frank-wolfe optimization variants. NIPS, 2015. [30] Simon Lacoste-Julien, Martin Jaggi, Mark Schmidt, and Patrick Pletscher. Block-coordinate frank-wolfe optimization for structural svms. ICML, 2013. [31] Guanghui Lan. The complexity of large-scale convex programming under a linear optimization oracle. https://arxiv.org/abs/1309.5550, 2013. [32] Guanghui Lan and Yi Zhou. Conditional gradient sliding for convex optimization. SIAM Journal on Optimization,, 2014. [33] J von Neumann, Oskar Morgenstern, et al. Theory of games and economic behavior, 1944. [34] Anton Osokin, Jean-Baptiste Alayrac, Isabella Lukasewitz, Puneet K. Dokania, and Simon Lacoste-Julien. Minding the gaps for block frank-wolfe optimization for structural svms. ICML, 2016. [35] Maurice Sion. On general minimax theorems. Pacific J. Math, 8(1):171–176, 1958. [36] J v. Neumann. Zur theorie der gesellschaftsspiele. Mathematische annalen, 100(1):295–320, 1928. [37] Yu-Xiang Wang, Veeranjaneyulu Sadhanala, Wei Dai, Willie Neiswanger, Suvrit Sra, and Eric Xing. Parallel and distributed block-coordinate frank-wolfe algorithms. ICML, 2016. [38] P. Wolf. Convergence theory in nonlinear programming. Integer and Nonlinear Programming, 1970. [39] Y. Yu, X. Zhang, and D. Schuurmans. Generalized conditional gradient for structured estimation. arXiv:1410.4828, 2014. 10 | 2017 | 299 |
6,784 | Learning A Structured Optimal Bipartite Graph for Co-Clustering Feiping Nie1, Xiaoqian Wang2, Cheng Deng3, Heng Huang2∗ 1 School of Computer Science, Center for OPTIMAL, Northwestern Polytechnical University, China 2 Department of Electrical and Computer Engineering, University of Pittsburgh, USA 3 School of Electronic Engineering, Xidian University, China feipingnie@gmail.com,xqwang1991@gmail.com chdeng@mail.xidian.edu.cn,heng.huang@pitt.edu Abstract Co-clustering methods have been widely applied to document clustering and gene expression analysis. These methods make use of the duality between features and samples such that the co-occurring structure of sample and feature clusters can be extracted. In graph based co-clustering methods, a bipartite graph is constructed to depict the relation between features and samples. Most existing co-clustering methods conduct clustering on the graph achieved from the original data matrix, which doesn’t have explicit cluster structure, thus they require a post-processing step to obtain the clustering results. In this paper, we propose a novel co-clustering method to learn a bipartite graph with exactly k connected components, where k is the number of clusters. The new bipartite graph learned in our model approximates the original graph but maintains an explicit cluster structure, from which we can immediately get the clustering results without post-processing. Extensive empirical results are presented to verify the effectiveness and robustness of our model. 1 Introduction Clustering has long been a fundamental topic in unsupervised learning. The goal of clustering is to partition data into different groups. Clustering methods have been successfully applied to various areas, such as document clustering [3, 17], image segmentation [18, 7, 8] and bioinformatics [16, 14]. In clustering problems, the input data is usually formatted as a matrix, where one dimension represents samples and the other denotes features. Each sample can be seen as a data point characterized by a vector in the feature space. Alternatively, each feature can be regarded as a vector spanning in the sample space. Traditional clustering methods propose to cluster samples according to their distribution on features, or conversely, cluster features in terms of their distribution on samples. In several types of data, such as document data and gene expression data, duality exists between samples and features. For example, in document data, we can reasonably assume that documents can be clustered based on their relations with different word clusters, while word clusters are formed according to their associations with distinct document clusters. However, in the one-sided clustering mechanism, the duality between samples and features is not taken into consideration. To make full use of the duality information, co-clustering methods (also known as bi-clustering methods) are proposed. The co-clustering mechanism takes advantage of the co-occurring cluster structure among features and samples to strengthen the clustering performance and gain better interpretation of the pragmatic meaning of the clusters. ∗This work was partially supported by U.S. NSF-IIS 1302675, NSF-IIS 1344152, NSF-DBI 1356628, NSF-IIS 1619308, NSF-IIS 1633753, NIH AG049371. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Several co-clustering methods have been put forward to depict the relations between samples and features. In the graph based methods, the co-occurring structure between samples and features is usually treated as a bipartite graph, where the weights of edges indicate the relations between sample-feature pairs. In the left part of Fig. 1 we show an illustration of such bipartite graph, where the blue nodes on the left represent features while red nodes on the right show samples. The affinity between the features and samples is denoted by the weight of the corresponding edge. For example, Bij denotes the affinity between the i-th feature and the j-sample. In [4], the authors propose to minimize the cut between samples and features, which is equivalent to conducting spectral clustering on the bipartite graph. However, in this method, since the original graph doesn’t display an explicit cluster structure, it still calls for the post-processing step like K-mean clustering to obtain the final clustering indicators, which may not be optimal. To address this problem, in this paper, we propose a novel graph based co-clustering model to learn a bipartite graph with exactly k connected components, where k is the number of clusters. The new bipartite graph learned in our model approximates the original graph but maintains an explicit cluster structure, from which we can directly get the clustering results without post-processing steps. To achieve such an ideal structure of the new bipartite graph, we impose constraints on the rank of its Laplacian or normalized Laplacian matrix and derive algorithms to optimize the objective. We conduct several experiments to evaluate the effectiveness and robustness of our model. On both synthetic and benchmark datasets we gain equivalent or even better clustering results than other related methods. Notations: Throughout the paper, all the matrices are written as uppercase. For matrix M, the ij-th element of M is denoted by mij. The trace of matrix M is denoted by Tr(M). The ℓ2-norm of vector v is denoted by ∥v∥2, the Frobenius norm of matrix M is denoted by ∥M∥F . 2 Bipartite Spectral Graph Partitioning Revisited The classic Bipartite Spectral Graph Partitioning (BSGP) method [4] is very effective for co-clustering. In order to simultaneously partition the rows and columns of a data matrix B ∈Rn1×n2, we first view B as the weight matrix of a bipartite graph, where the left-side nodes are the n1 rows of B, the right-side nodes are the n2 columns of B, and the weight to connect the i-th left-side node and the j-th right-side node is bij (see Fig.1). The procedure of BSGP is as follows: 1) Calculate ˜A = D −1 2 u BD −1 2 v , where the diagonal matrices Du and Dv are defined in Eq.(6). 2) Calculate U and V , which are the leading k left and right singular vectors of ˜A, respectively. 3) Run the K-means on the rows of F defined in Eq. (6) to obtain the final clustering results. The bipartite graph can be viewed as an undirected weighted graph G = {V, A} with n = n1 + n2 nodes, where V is the node set and the affinity matrix A ∈Rn×n is A = 0 B BT 0 (1) In the following, we will show that the BSGP method essentially performs spectral clustering with normalized cut on the graph G. Suppose the graph G is partitioned into k components V = {V1, V2, ..., Vk} . According to the spectral clustering, the normalized cut on the graph G = {V, A} is defined as Ncut = k X i=1 cut(Vi, V\Vi) assoc(Vi, V) (2) where cut(Vi, V\Vi) = P i∈Vi,j∈V\Vi aij; assoc(Vi, V) = P i∈Vi,j∈V aij. Let Y ∈Rn×k be the partition indicator matrix, i.e., yij = 1 indicates the i-th node is partitioned into the j-th component. Then minimizing the normalized cut defined in Eq.(2) can be rewritten as the following problem: min Y k X i=1 yT i Lyi yT i Dyi (3) 2 Figure 1: Illustration of the structured optimal bipartite graph. where yi is the i-th column of Y , L = D −A ∈Rn×n is the Laplacian matrix, and D ∈Rn×n is the diagonal degree matrix defined as dii = P j aij. Let Z = Y (Y T DY )−1 2 , and denote the identity matrix by I, then problem (3) can be rewritten as min ZT DZ=I Tr(ZT LZ) (4) Further, denotes F = D 1 2 Z = D 1 2 Y (Y T DY )−1 2 , then the problem (4) can be rewritten as min F T F =I Tr(F T ˜LF) (5) where ˜L = I −D−1 2 AD−1 2 is the normalized Laplacian matrix. We rewrite F and D as the following block matrices: F = U V , D = Du Dv (6) where U ∈Rn1×k, V ∈Rn2×k, Du ∈Rn1×n1, Dv ∈Rn2×n2. Then according to the definition of A in Eq. (1), the problem (5) can be further rewritten as max U T U+V T V =I Tr(U T D −1 2 u BD −1 2 v V ) (7) Note that in addition to the constraint U T U + V T V = I, the U, V should be constrained to be discrete values according to the definitions of U and V . This discrete constraint makes the problem very difficult to solve. To address it, we first remove the discrete constraint to make the problem (7) solvable with Lemma 1 , and then run K-means on U and V to get the discrete solution. Lemma 1 Suppose M ∈Rn1×n2, X ∈Rn1×k, Y ∈Rn2×k. The optimal solutions to the problem max XT X+Y T Y =I Tr(XT MY ) (8) are X = √ 2 2 U1, Y = √ 2 2 V1, where U1, V1 are the leading k left and right singular vectors of M, respectively. Proof: Denote the Lagrangian function of the problem is L(X, Y, Λ) = Tr(XT AY )−Tr(Λ(XT X+ Y T Y −I)) By setting the derivative of L(X, Y, Λ) w.r.t. X to zero, we have AY = XΛ. By taking the derivative of L(X, Y, Λ) w.r.t. Y to zero, we have AT X = Y Λ. Thus AAT X = AY Λ = XΛ2. Therefore, the optimal solution X should be the eigenvectors of AAT , i.e, the left singular vectors of M. Similarly, the optimal solution Y should be the right singular vectors of M. Since it is a maximization problem, the optimal solution X, Y should be the leading k left and right singular vectors of M, respectively. □ According to Lemma 1, if the discrete constraint on U and V is not considered, the optimal solution U and V to the problem (7) are the leading k left and right singular vectors of ˜A = D −1 2 u BD −1 2 v , respectively. Since the solution U and V are not discrete values, we need to run the K-means on the rows of F defined in Eq.(6) to obtain the final clustering results. 3 3 Learning Structured Optimal Bipartite Graph for Co-Clustering 3.1 Motivation We can see from the previous section that the given B or A does not have a very clear clustering structure (i.e., A is not a block diagonal matrix with proper permutation) and the U and V are not discrete values, thus we need run the K-means to obtain the final clustering results. However, K-means is very sensitive to the initialization, which makes the clustering performance unstable and suboptimal. To address this challenging and fundamental problem, we target to learn a new graph similarity matrix S ∈Rn×n or P ∈Rn1×n2 as S = 0 P P T 0 , (9) such that the new graph is more suitable for clustering task. In our strategy, we learn an S that has exact k connected components, see Fig. 1. Obviously such a new graph can be considered as the ideal graph for clustering task with providing clear clustering structure. If S has exact k connected components, we can directly obtain the final clustering result based on S, without running K-means or other discretization procedures as traditional graph based clustering methods have to do. The learned structured optimal graph similarity matrix S should be as close as possible to the given graph affinity matrix A, so we propose to solve the following problem: min P ≥0,P 1=1,S∈Ω∥S −A∥2 F (10) where Ωis the set of matrices S ∈Rn×n which have exact k connected components. According to the special structure of A and S in Eq. (1) and Eq. (9), the problem (10) can be written as min P ≥0,P 1=1,S∈Ω∥P −B∥2 F (11) The problem (11) seems very difficult to solve since the constraint S ∈Ωis intractable to handle. In the next subsection, we will propose a novel and efficient algorithm to solve this problem. 3.2 Optimization If the similarity matrix S is nonnegative, then the Laplacian matrix LS = DS −S associated with S has an important property as follows [13, 12, 11, 2]. Theorem 1 The multiplicity k of the eigenvalue 0 of the Laplacian matrix LS is equal to the number of connected components in the graph associated with S. Theorem 1 indicates that if rank(LS) = n −k, the constraint S ∈Ωwill be held. Therefore, the problem (11) can be rewritten as: min P ≥0,P 1=1,rank(LS)=n−k ∥P −B∥2 F (12) Suppose σi(LS) is the i-th smallest eigenvalue of LS. Note that σi(LS) ≥0 because LS is positive semi-definite. The problem (12) is equivalent to the following problem for a large enough λ: min P ≥0,P 1=1 ∥P −B∥2 F + λ k X i=1 σi(LS) (13) When λ is large enough (note that σi(LS) ≥0 for every i), the optimal solution S to the problem (13) will make the second term Pk i=1 σi(LS) to be zero, and thus the constraint rank(LS) = n −k in the problem (12) would be satisfied. According to the Ky Fan’s Theorem [6], we have: k X i=1 σi(LS) = min F ∈Rn×k,F T F =I Tr(F T LSF) (14) 4 Therefore, the problem (13) is further equivalent to the following problem min P,F ∥P −B∥2 F + λTr(F T LSF) s.t. P ≥0, P1 = 1, F ∈Rn×k, F T F = I (15) The problem (15) is much easier to solve compared with the rank constrained problem (12). We can apply the alternating optimization technique to solve this problem. When P is fixed, the problem (15) becomes: min F ∈Rn×k,F T F =I Tr(F T LSF) (16) The optimal solution F is formed by the k eigenvectors of LS corresponding to the k smallest eigenvalues. When F is fixed, the problem (15) becomes min P ≥0,P 1=1 ∥P −B∥2 F + λTr(F T LSF) (17) According to the property of Laplacian matrix, we have the following relationship: Tr(F T LSF) = 1 2 n X i=1 n X j=1 ∥fi −fj∥2 2 sij (18) where fi is the i-th row of F. Thus according to the structure of S defined in Eq.(9), Eq.(18) can be rewritten as Tr(F T LSF) = n1 X i=1 n2 X j=1 ∥fi −fj∥2 2 pij (19) Based on Eq. (19), the problem (17) can be rewritten as min P ≥0,P 1=1 n1 X i=1 n2 X j=1 (pij −bij)2 + λ∥fi −fj∥2 2 pij (20) Note that the problem (20) is independent between different i, so we can solve the following problem individually for each i. Denote vij = ∥fi −fj∥2 2, and denote vi as a vector with the j-th element as vij (same for pi and bi), then for each i, the problem (20) can be written in the vector form as min pT i 1=1,pi≥0
pi −(bi −λ 2 vi)
2 2 (21) This problem can be solved by an efficient iterative algorithm [9]. The detailed algorithm to solve the problem (15) is summarized in Algorithm 1. In the algorithm, we can only update the m nearest similarities for each data points in P and thus the complexity of updating P and updating F (only need to compute top k eigenvectors on very sparse matrix) can be reduced significantly. Nevertheless, Algorithm 1 needs to conduct eigen-decomposition on an n × n(n = n1 + n2) matrix in each iteration, which is time consuming. In the next section, we will propose another optimization algorithm, which only needs to conduct SVD on an n1 × n2 matrix in each iteration, and thus is much more efficient than Algorithm 1. Algorithm 1 Algorithm to solve the problem (15). input B ∈Rn1×n2, cluster number k, a large enough λ. output P ∈Rn1×n2 and thus S ∈Rn×n defined in Eq.(9) with exact k connected components. Initialize F ∈Rn×k, which is formed by the k eigenvectors of L = D −A corresponding to the k smallest eigenvalues, A is defined in Eq. (1). while not converge do 1. For each i, update the i-th row of P by solving the problem (21), where the j-th element of vi is vij = ∥fi −fj∥2 2. 2. Update F, which is formed by the k eigenvectors of LS = DS −S corresponding to the k smallest eigenvalues. end while 5 4 Speed Up the Model If the similarity matrix S is nonnegative, then the normalized Laplacian matrix ˜LS = I −D −1 2 S SD −1 2 S associated with S also has an important property as follows [11, 2]. Theorem 2 The multiplicity k of the eigenvalue 0 of the normalized Laplacian matrix ˜LS is equal to the number of connected components in the graph associated with S. Theorem 2 indicates that if rank(˜LS) = n −k, the constraint S ∈Ωwill be hold. Therefore, the problem (11) can also be rewritten as min P ≥0,P 1=1,rank(˜LS)=n−k ∥P −B∥2 F (22) Similarly, the problem (22) is equivalent to the following problem for a large enough value of λ: min P,F ∥P −B∥2 F + λTr(F T ˜LSF) s.t. P ≥0, P1 = 1, F ∈Rn×k, F T F = I (23) Again, we can apply the alternating optimization technique to solve problem (23). When P is fixed, since ˜LS = I −D −1 2 S SD −1 2 S , the problem (23) becomes max F ∈Rn×k,F T F =I Tr(F T D −1 2 S SD −1 2 S F) (24) We rewrite F and DS as the following block matrices: F = U V , DS = DSu DSv (25) where U ∈Rn1×k, V ∈Rn2×k, DSu ∈Rn1×n1, DSv ∈Rn2×n2. Then according to the definition of S in Eq. (9), the problem (24) can be further rewritten as max U T U+V T V =I Tr(U T D −1 2 Su PD −1 2 Sv V ) (26) According to Lemma 1, the optimal solution U and V to the problem (26) are the leading k left and right singular vectors of ˜S = D −1 2 Su PD −1 2 Sv , respectively. When F is fixed, the problem (23) becomes min P ∥P −B∥2 F + λTr(F T ˜LSF) s.t. P ≥0, P1 = 1 (27) According to the property of normalized Laplacian matrix, we have the following relationship: Tr(F T ˜LSF) = 1 2 n X i=1 n X j=1
fi √di − fj p dj
2 2 sij (28) Thus according to the structure of S defined in Eq.(9), and denote vij =
fi √di − fj √ dj
2 2 ,the problem (27) can be rewritten as min P ≥0,P 1=1 n1 X i=1 n2 X j=1 (pij −bij)2 + λvijpij, which has the same form as in Eq. (20) and thus can be solved efficiently. The detailed algorithm to solve the problem (23) is summarized in Algorithm 2. In the algorithm, we can also only update the m nearest similarities for each data points in P and thus the complexity of updating P and updating F can be reduced significantly. 6 Note that Algorithm 2 only needs to conduct SVD on an n1 × n2 matrix in each iteration. In some cases, min(n1, n2) ≪(n1 + n2), thus Algorithm 2 is much more efficient than Algorithm 1. Therefore, in the next section, we use Algorithm 2 to conduct the experiments. Algorithm 2 Algorithm to solve the problem (23). input B ∈Rn1×n2, cluster number k, a large enough λ. output P ∈Rn1×n2 and thus S ∈Rn×n defined in Eq.(9) with exact k connected components. Initialize F ∈Rn×k, which is formed by the k eigenvectors of ˜L = I −D−1 2 AD−1 2 corresponding to the k smallest eigenvalues, A is defined in Eq. (1). while not converge do 1. For each i, update the i-th row of P by solving the problem (21), where the j-th element of vi is vij =
fi √di − fj √ dj
2 2 . 2. Update F = U V , where U and V are the leading k left and right singular vectors of ˜S = D −1 2 Su PD −1 2 Sv respectively and DS = DSu DSv . end while 5 Experimental Results In this section, we conduct multiple experiments to evaluate our model. We will first introduce the experimental settings throughout the section and then present evaluation results on both synthetic and benchmark datasets. 5.1 Experimental Settings We compared our method (denoted by SOBG) with two related co-clustering methods, including Bipartite Spectral Graph Partition (BSGP) [4] and Orthogonal Nonnegative Matrix Tri-Factorizations (ONMTF) [5]. Also, we introduced several one-sided clustering methods to the comparison, which are K-means clustering, Normalized Cut (NCut) and Nonnegative Matrix Factorization (NMF). For methods requiring a similarity graph as the input, i.e., NCut and NMF, we adopted the self-tuning Gaussian method [19] to construct the graph, where the number of neighbors was set to be 5 and the σ value was self-tuned. In the experiment, there are four methods involving K-means clustering, which are K-means, NCut, BSGP and ONMTF (the latter three methods need K-means as the post-processing step to get the clustering results). When running K-means we used 100 random initializations for all these four methods and recorded the average performance over these 100 runs as well as the best one with respect to the K-means objective function value. In our method, to accelerate the algorithmic procedure, we determined the parameter λ in an heuristic way: first specify the value of λ with an initial guess; next, we computed the number of zero eigenvalues in ˜LS in each iteration, if it was larger than k, then divided λ by 2; if smaller then multiplied λ by 2; otherwise we stopped the iteration. The number of clusters was set to be the ground truth. The evaluation of different methods was based on the percentage of correctly clustered samples, i.e., clustering accuracy. 5.2 Results on Synthetic Data In this subsection, we first apply our method to the synthetic data as a sanity check. The synthetic data is constructed as a two-dimensional matrix, where rows and columns come from three clusters respectively. Row clusters and column clusters maintain mutual dependence, i.e., rows and columns from the first cluster form a block along the diagonal of the data matrix, and this also holds true for the second and third cluster. The number of rows for each cluster is 20, 30 and 40 respectively, while the number of columns is 30, 40 and 50. Each block is generated randomly with elements i.i.d. sampled from Gaussian distribution N(0, 1). Also, we add noise to the “non-block" area of the data matrix, i.e., all entries in the matrix excluding elements in the three clusters. The noise can be denoted as r ∗δ, where δ is Gaussian noise i.i.d. sampled from Gaussian distribution N(0, 1) and r 7 0.2 0.4 0.6 0.8 (a) Noise = 0.6 (b) Noise = 0.6 0.2 0.4 0.6 0.8 (c) Noise = 0.7 (d) Noise = 0.7 0.2 0.4 0.6 0.8 (e) Noise = 0.8 (f) Noise = 0.8 0.2 0.4 0.6 0.8 (g) Noise = 0.9 (h) Noise = 0.9 Figure 2: Illustration of the data matrix in different settings of noise. Different rows of figures come from different settings of noise. In each row, figures on the left column are the original data matrices generated in the experiment, while on the right column display the bipartite matrix B learned in our model which approximates the original data matrix and maintains the block structure. Methods Noise = 0.6 Noise = 0.7 Noise = 0.8 Noise = 0.9 Clustering Accuracy(%) on Rows K-means 99.17 97.50 71.67 39.17 NCut 99.17 95.00 46.67 38.33 NMF 98.33 95.00 46.67 37.50 BSGP 100.00 93.33 62.50 40.00 ONMTF 99.17 97.50 71.67 39.17 SOBG 100.00 100.00 98.33 84.17 Clustering Accuracy(%) on Columns K-means 100.00 95.56 51.11 46.67 NCut 100.00 91.11 60.00 38.89 NMF 100.00 90.00 47.78 37.78 BSGP 100.00 93.33 63.33 46.67 ONMTF 100.00 95.56 51.11 46.67 SOBG 100.00 100.00 100.00 87.78 Table 1: Clustering accuracy comparison on rows and columns of the synthetic data in different portion of noise. is the portion of noise. We set r to be {0.6, 0.7, 0.8, 0.9} respectively so as to evaluate the robustness of different methods under the circumstances of various disturbance. We apply all comparing methods to the synthetic data and assess their ability to cluster the rows and columns. One-sided clustering methods are applied to the data twice (once to cluster rows and the other time to cluster columns) such that clustering accuracy on these two dimensions can be achieved. Co-clustering methods can obtain clustering results on both dimensions simultaneously in one run. In Table 1 we summarize the clustering accuracy comparison on both rows and columns under different settings of noise. In Fig. 2 we display the corresponding original data matrix and the bipartite matrix B learned in our model. We can notice that when the portion of noise r is relatively low, i.e., 0.6 and 0.7, the block structure of the original data is clear, then all methods perform fairly well in clustering both rows and columns. However, as r increases, the block structure in the original data blurs thus brings obstacles to the clustering task. With high portion of noise, all other methods seem to be disturbed to a large extent while our method shows apparent robustness. Even when the portion of noise becomes as high as 0.9, such that the structure of clusters in the original data becomes hard to distinguish with eyes, our method still excavates a reasonable block arrangement with a clustering accuracy of over 80%. Also, we can find that co-clustering methods usually outperform one-sided clustering methods since they utilize the interrelations between rows and columns. The interpretation of the co-clustering structure strengthens the performance, which conforms to our theoretical analysis. 8 Methods Reuters21578 LUNG Prostate-MS prostateCancerPSA410 K-means Ave 40.86±4.59 61.91±6.00 46.47±3.26 64.15±9.40 Best 32.77 71.43 45.34 62.92 NCut Ave 26.92±0.93 69.67±14.26 46.86±1.19 55.06±0.00 Best 29.18 79.80 47.20 55.06 NMF 30.91 75.86 47.83 55.06 BSGP Ave 11.44±0.39 64.95±5.06 46.27±0.00 57.30±0.00 Best 11.26 70.94 46.27 57.30 ONMTF Ave 17.57±1.95 61.31±10.34 45.46±3.18 62.92±0.00 Best 27.90 71.43 45.34 62.92 SOBG 43.94 78.82 62.73 69.66 Table 2: Clustering accuracy comparison on four benchmark datasets. For the four methods involving K-means clustering, i.e., K-means, NCut, BSGP and ONMTF, their average performance (Ave) over 100 repetitions and the best one (Best) w.r.t. K-means objective function value were both reported. 5.3 Results on Benchmark Data In this subsection, we use four benchmark datasets for the evaluation. There are one document dataset and three gene expression datasets participating in the experiment, the property of which is introduced in details as below. Reuters21578 dataset is processed and downloaded from http://www.cad.zju.edu.cn/ home/dengcai/Data/TextData.html. It contains 8293 documents in 65 topics. Each document is depicted by its frequency on 18933 terms. LUNG dataset [1] provides a source for the study of lung cancer. It has 203 samples in five classes, among which there are 139 adenocarcinoma (AD), 17 normal lung (NL), 6 small cell lung cancer (SMCL), 21 squamous cell carcinoma (SQ) as well as 20 pulmonary carcinoid (COID) samples. Each sample has 3312 genes. Prostate-MS dataset [15] contains a total of 332 samples from three different classes, which are 69 samples diagnosed as prostate cancer, 190 samples of benign prostate hyperplasia, as well as 63 normal samples showing no evidence of disease. Each sample has 15154 genes. ProstateCancerPSA410 dataset [10] describes gene information of patients with prostate-specific antigen (PSA)-recurrent prostate cancer. It includes a total of 89 samples from two classes. Each sample has 15154 genes. Before the clustering process, feature scaling was performed on each dataset such that features are on the same scale of [0, 1]. Also, the ℓ2-norm of each feature was normalized to 1. Table 2 summarizes the clustering accuracy comparison on these benchmark datasets. Our method performs equally or even better than the alternatives on all these datasets. This verifies the effectiveness of our method in the practical situation. There is an interesting phenomenon that the advantage of our method tends to be more obvious for higher dimensional data. This is because high-dimensional features make the differences in the distance between samples to be smaller thus the cluster structure of the original data becomes vague. In this case, since our model is more robust compared with the alternative methods (verified in the synthetic experiments), we can get better clustering results. 6 Conclusions In this paper, we proposed a novel graph based co-clustering model. Different from existing methods which conduct clustering on the graph achieved from the original data, our model learned a new bipartite graph with explicit cluster structure. By imposing the rank constraint on the Laplacian matrix of the new bipartite graph, we guaranteed the learned graph to have exactly k connected components, where k is the number of clusters. From this ideal structure of the new bipartite graph learned in our model, the obvious clustering structure can be obtained without resorting to post-processing steps. We presented experimental results on both synthetic data and four benchmark datasets, which validated the effectiveness and robustness of our model. 9 References [1] A. Bhattacharjee, W. G. Richards, J. Staunton, C. Li, S. Monti, P. Vasa, C. Ladd, J. Beheshti, R. Bueno, M. Gillette, et al. Classification of human lung carcinomas by mrna expression profiling reveals distinct adenocarcinoma subclasses. Proceedings of the National Academy of Sciences, 98(24):13790–13795, 2001. [2] F. R. K. Chung. Spectral Graph Theory. CBMS Regional Conference Series in Mathematics, No. 92, American Mathematical Society, February 1997. [3] X. Cui and T. E. Potok. Document clustering analysis based on hybrid pso+ k-means algorithm. Journal of Computer Sciences (special issue), 27:33, 2005. [4] I. S. Dhillon. Co-clustering documents and words using bipartite spectral graph partitioning. In Proceedings of the seventh ACM SIGKDD international conference on Knowledge discovery and data mining, pages 269–274. ACM, 2001. [5] C. Ding, T. Li, W. Peng, and H. Park. Orthogonal nonnegative matrix t-factorizations for clustering. In Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 126–135. ACM, 2006. [6] K. Fan. On a theorem of weyl concerning eigenvalues of linear transformations. i. 35(11):652– 655, 1949. [7] P. F. Felzenszwalb and D. P. Huttenlocher. Efficient graph-based image segmentation. International Journal of Computer Vision, 59(2):167–181, 2004. [8] M. Gong, Y. Liang, J. Shi, W. Ma, and J. Ma. Fuzzy c-means clustering with local information and kernel metric for image segmentation. Image Processing, IEEE Transactions on, 22(2):573– 584, 2013. [9] J. Huang, F. Nie, and H. Huang. A new simplex sparse learning model to measure data similarity for clustering. In Proceedings of the 24th International Conference on Artificial Intelligence, pages 3569–3575, 2015. [10] Z. Liao and M. W. Datta. A simple computer program for calculating psa recurrence in prostate cancer patients. BMC urology, 4(1):8, 2004. [11] B. Mohar. The laplacian spectrum of graphs. In Graph Theory, Combinatorics, and Applications, pages 871–898. Wiley, 1991. [12] F. Nie, X. Wang, and H. Huang. Clustering and projected clustering with adaptive neighbors. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 977–986, 2014. [13] F. Nie, X. Wang, M. I. Jordan, and H. Huang. The constrained laplacian rank algorithm for graph-based clustering. In AAAI, pages 1969–1976, 2016. [14] H.-W. Nützmann and A. Osbourn. Gene clustering in plant specialized metabolism. Current opinion in biotechnology, 26:91–99, 2014. [15] E. F. Petricoin, D. K. Ornstein, C. P. Paweletz, A. Ardekani, P. S. Hackett, B. A. Hitt, A. Velassco, C. Trucco, L. Wiegand, K. Wood, et al. Serum proteomic patterns for detection of prostate cancer. Journal of the National Cancer Institute, 94(20):1576–1578, 2002. [16] F. Piano, A. J. Schetter, D. G. Morton, K. C. Gunsalus, V. Reinke, S. K. Kim, and K. J. Kemphues. Gene clustering based on rnai phenotypes of ovary-enriched genes in c. elegans. Current Biology, 12(22):1959–1964, 2002. [17] F. Shahnaz, M. W. Berry, V. P. Pauca, and R. J. Plemmons. Document clustering using nonnegative matrix factorization. Information Processing & Management, 42(2):373–386, 2006. [18] J. Shi and J. Malik. Normalized cuts and image segmentation. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 22(8):888–905, 2000. [19] L. Zelnik-Manor and P. Perona. Self-tuning spectral clustering. In NIPS, 2004. 10 | 2017 | 3 |
6,785 | PASS-GLM: polynomial approximate sufficient statistics for scalable Bayesian GLM inference Jonathan H. Huggins CSAIL, MIT jhuggins@mit.edu Ryan P. Adams Google Brain and Princeton rpa@princeton.edu Tamara Broderick CSAIL, MIT tbroderick@csail.mit.edu Abstract Generalized linear models (GLMs)—such as logistic regression, Poisson regression, and robust regression—provide interpretable models for diverse data types. Probabilistic approaches, particularly Bayesian ones, allow coherent estimates of uncertainty, incorporation of prior information, and sharing of power across experiments via hierarchical models. In practice, however, the approximate Bayesian methods necessary for inference have either failed to scale to large data sets or failed to provide theoretical guarantees on the quality of inference. We propose a new approach based on constructing polynomial approximate sufficient statistics for GLMs (PASS-GLM). We demonstrate that our method admits a simple algorithm as well as trivial streaming and distributed extensions that do not compound error across computations. We provide theoretical guarantees on the quality of point (MAP) estimates, the approximate posterior, and posterior mean and uncertainty estimates. We validate our approach empirically in the case of logistic regression using a quadratic approximation and show competitive performance with stochastic gradient descent, MCMC, and the Laplace approximation in terms of speed and multiple measures of accuracy—including on an advertising data set with 40 million data points and 20,000 covariates. 1 Introduction Scientists, engineers, and companies increasingly use large-scale data—often only available via streaming—to obtain insights into their respective problems. For instance, scientists might be interested in understanding how varying experimental inputs leads to different experimental outputs; or medical professionals might be interested in understanding which elements of patient histories lead to certain health outcomes. Generalized linear models (GLMs) enable these practitioners to explicitly and interpretably model the effect of covariates on outcomes while allowing flexible noise distributions—including binary, count-based, and heavy-tailed observations. Bayesian approaches further facilitate (1) understanding the importance of covariates via coherent estimates of parameter uncertainty, (2) incorporating prior knowledge into the analysis, and (3) sharing of power across different experiments or domains via hierarchical modeling. In practice, however, an exact Bayesian analysis is computationally infeasible for GLMs, so an approximation is necessary. While some approximate methods provide asymptotic guarantees on quality, these methods often only run successfully in the small-scale data regime. In order to run on (at least) millions of data points and thousands of covariates, practitioners often turn to heuristics with no theoretical guarantees on quality. In this work, we propose a novel and simple approximation framework for probabilistic inference in GLMs. We demonstrate theoretical guarantees on the quality of point estimates in the finite-sample setting and on the quality of Bayesian posterior approximations produced by our framework. We show that our framework trivially extends to streaming data and to distributed architectures, with no additional compounding of error in these settings. We empirically demonstrate the practicality 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. of our framework on datasets with up to tens of millions of data points and tens of thousands of covariates. Large-scale Bayesian inference. Calculating accurate approximate Bayesian posteriors for large data sets together with complex models and potentially high-dimensional parameter spaces is a longstanding problem. We seek a method that satisfies the following criteria: (1) it provides a posterior approximation; (2) it is scalable; (3) it comes equipped with theoretical guarantees; and (4) it provides arbitrarily good approximations. By posterior approximation we mean that the method outputs an approximate posterior distribution, not just a point estimate. By scalable we mean that the method examines each data point only a small number of times, and further can be applied to streaming and distributed data. By theoretical guarantees we mean that the posterior approximation is certified to be close to the true posterior in terms of, for example, some metric on probability measures. Moreover, the distance between the exact and approximate posteriors is an efficiently computable quantity. By an arbitrarily good approximation we mean that, with a large enough computational budget, the method can output an approximation that is as close to the exact posterior as we wish. Markov chain Monte Carlo (MCMC) methods provide an approximate posterior, and the approximation typically becomes arbitrarily good as the amount of computation time grows asymptotically; thereby MCMC satisfies criteria 1, 3, and 4. But scalability of MCMC can be an issue. Conversely, variational Bayes (VB) and expectation propagation (EP) [27] have grown in popularity due to their scalability to large data and models—though they typically lack guarantees on quality (criteria 3 and 4). Subsampling methods have been proposed to speed up MCMC [1, 5, 6, 21, 25, 41] and VB [18]. Only a few of these algorithms preserve guarantees asymptotic in time (criterion 4), and they often require restrictive assumptions. On the scalability front (criterion 2), many though not all subsampling MCMC methods have been found to require examining a constant fraction of the data at each iteration [2, 6, 7, 30, 31, 38], so the computational gains are limited. Moreover, the random data access required by these methods may be infeasible for very large datasets that do not fit into memory. Finally, they do not apply to streaming and distributed data, and thus fail criterion 2 above. More recently, authors have proposed subsampling methods based on piecewise deterministic Markov processes (PDMPs) [8, 9, 29]. These methods are promising since subsampling data here does not change the invariant distribution of the continuous-time Markov process. But these methods have not yet been validated on large datasets nor is it understood how subsampling affects the mixing rates of the Markov processes. Authors have also proposed methods for coalescing information across distributed computation (criterion 2) in MCMC [12, 32, 34, 35], VB [10, 11], and EP [15, 17]—and in the case of VB, across epochs as streaming data is collected [10, 11]. (See Angelino et al. [3] for a broader discussion of issues surrounding scalable Bayesian inference.) While these methods lead to gains in computational efficiency, they lack rigorous justification and provide no guarantees on the quality of inference (criteria 3 and 4). To address these difficulties, we are inspired in part by the observation that not all Bayesian models require expensive posterior approximation. When the likelihood belongs to an exponential family, Bayesian posterior computation is fast and easy. In particular, it suffices to find the sufficient statistics of the data, which require computing a simple summary at each data point and adding these summaries across data points. The latter addition requires a single pass through the data and is trivially streaming or distributed. With the sufficient statistics in hand, the posterior can then be calculated via, e.g., MCMC, and point estimates such as the MLE can be computed—all in time independent of the data set size. Unfortunately, sufficient statistics are not generally available (except in very special cases) for GLMs. We propose to instead develop a notion of approximate sufficient statistics. Previously authors have suggested using a coreset—a weighted data subset—as a summary of the data [4, 13, 14, 16, 19, 24]. While these methods provide theoretical guarantees on the quality of inference via the model evidence, the resulting guarantees are better suited to approximate optimization and do not translate to guarantees on typical Bayesian desiderata, such as the accuracy of posterior mean and uncertainty estimates. Moreover, while these methods do admit streaming and distributed constructions, the approximation error is compounded across computations. Our contributions. In the present work we instead propose to construct our approximate sufficient statistics via a much simpler polynomial approximation for generalized linear models. We therefore call our method polynomial approximate sufficient statistics for generalized linear models (PASSGLM). PASS-GLM satisfies all of the criteria laid of above. It provides a posterior approximation with theoretical guarantees (criteria 1 and 3). It is scalable since is requires only a single pass over 2 the data and can be applied to streaming and distributed data (criterion 2). And by increasing the number of approximate sufficient statistics, PASS-GLM can produce arbitrarily good approximations to the posterior (criterion 4). The Laplace approximation [39] and variational methods with a Gaussian approximation family [20, 22] may be seen as polynomial (quadratic) approximations in the log-likelihood space. But we note that the VB variants still suffer the issues described above. A Laplace approximation relies on a Taylor series expansion of the log-likelihood around the maximum a posteriori (MAP) solution, which requires first calculating the MAP—an expensive multi-pass optimization in the large-scale data setting. Neither Laplace nor VB offers the simplicity of sufficient statistics, including in streaming and distributed computations. The recent work of Stephanou et al. [36] is similar in spirit to ours, though they address a different statistical problem: they construct sequential quantile estimates using Hermite polynomials. In the remainder of the paper, we begin by describing generalized linear models in more detail in Section 2. We construct our novel polynomial approximation and specify our PASS-GLM algorithm in Section 3. We will see that streaming and distributed computation are trivial for our algorithm and do not compound error. In Section 4.1, we demonstrate finite-sample guarantees on the quality of the MAP estimate arising from our algorithm, with the maximum likelihood estimate (MLE) as a special case. In Section 4.2, we prove guarantees on the Wasserstein distance between the exact and approximate posteriors—and thereby bound both posterior-derived point estimates and uncertainty estimates. In Section 5, we demonstrate the efficacy of our approach in practice by focusing on logistic regression. We demonstrate experimentally that PASS-GLM can be scaled with almost no loss of efficiency to multi-core architectures. We show on a number of real-world datasets—including a large, high-dimensional advertising dataset (40 million examples with 20,000 dimensions)—that PASS-GLM provides an attractive trade-off between computation and accuracy. 2 Background Generalized linear models. Generalized linear models (GLMs) combine the interpretability of linear models with the flexibility of more general outcome distributions—including binary, ordinal, and heavy-tailed observations. Formally, we let Y ⊆R be the observation space, X ⊆Rd be the covariate space, and Θ ⊆Rd be the parameter space. Let D := {(xn, yn)}N n=1 be the observed data. We write X ∈RN×d for the matrix of all covariates and y ∈RN for the vector of all observations. We consider GLMs log p(y | X, θ) = PN n=1 log p(yn | g−1(xn · θ)) = PN n=1 φ(yn, xn · θ), where µ := g−1(xn · θ) is the expected value of yn and g−1 : R →R is the inverse link function. We call φ(y, s) := log p(y | g−1(s)) the GLM mapping function. Examples include some of the most widely used models in the statistical toolbox. For instance, for binary observations y ∈{±1}, the likelihood model is Bernoulli, p(y = 1 | µ) = µ, and the link function is often either the logit g(µ) = log µ 1−µ (as in logistic regression) or the probit g(µ) = Φ−1(µ), where Φ is the standard Gaussian CDF. When modeling count data y ∈N, the likelihood model might be Poisson, p(y | µ) = µye−µ/y!, and g(µ) = log(µ) is the typical log link. Other GLMs include gamma regression, robust regression, and binomial regression, all of which are commonly used for large-scale data analysis (see Examples A.1 and A.3). If we place a prior π0(dθ) on the parameters, then a full Bayesian analysis aims to approximate the (typically intractable) GLM posterior distribution πD(dθ), where πD(dθ) = p(y | X, θ) π0(dθ) R p(y | X, θ′) π0(dθ′). The maximum a posteriori (MAP) solution gives a point estimate of the parameter: θMAP := arg max θ∈Θ πD(θ) = arg max θ∈Θ log π0(θ) + LD(θ), (1) where LD(θ) := log p(y | X, θ) is the data log-likelihood. The MAP problem strictly generalizes finding the maximum likelihood estimate (MLE), since the MAP solution equals the MLE when using the (possibly improper) prior π0(θ) = 1. 3 Algorithm 1 PASS-GLM inference Require: data D, GLM mapping function φ : R →R, degree M, polynomial basis (ψm)m∈N with base measure ς 1: Calculate basis coefficients bm ← R φψmdς using numerical integration for m = 0, . . . , M 2: Calculate polynomial coefficients b(M) m ←PM k=m αk,mbm for m = 0, . . . , M 3: for k ∈Nd with P j kj ≤M do 4: Initialize tk ←0 5: for n = 1, . . . , N do ▷Can be done with any combination of batch, parallel, or streaming 6: for k ∈Nd with P j kj ≤M do 7: Update tk ←tk + (ynxn)k 8: Form approximate log-likelihood ˜LD(θ) = P k∈Nd:P j kj≤m m k b(M) m tkθk 9: Use ˜LD(θ) to construct approximate posterior ˜πD(θ) Computation and exponential families. In large part due to the high-dimensional integral implicit in the normalizing constant, approximating the posterior, e.g., via MCMC or VB, is often prohibitively expensive. Approximating this integral will typically require many evaluations of the (log-)likelihood, or its gradient, and each evaluation may require Ω(N) time. Computation is much more efficient, though, if the model is in an exponential family (EF). In the EF case, there exist functions t, η : Rd →Rm, such that1 log p(yn | xn, θ) = t(yn, xn) · η(θ) =: LD,EF(θ; t(yn, xn)). Thus, we can rewrite the log-likelihood as LD(θ) = PN n=1 LD,EF(θ; t(yn, xn)) =: LD,EF(θ; t(D)), where t(D) := PN n=1 t(yn, xn). The sufficient statistics t(D) can be calculated in O(N) time, after which each evaluation of LD,EF(θ; t(D)) or ∇LD,EF(θ; t(D)) requires only O(1) time. Thus, instead of K passes over N data (requiring O(NK) time), only O(N + K) time is needed. Even for moderate values of N, the time savings can be substantial when K is large. The Poisson distribution is an illustrative example of a one-parameter exponential family with t(y) = (1, y, log y!) and η(θ) = (θ, log θ, 1). Thus, if we have data y (there are no covariates), t(y) = (N, P n yn, P log yn!). In this case it is easy to calculate that the maximum likelihood estimate of θ from t(y) as t1(y)/t0(y) = N −1 P n yn. Unfortunately, GLMs rarely belong to an exponential family – even if the outcome distribution is in an exponential family, the use of a link destroys the EF structure. In logistic regression, we write (overloading the φ notation) log p(yn | xn, θ) = φlogit(ynxn · θ), where φlogit(s) := −log(1 + e−s). For Poisson regression with log link, log p(yn | xn, θ) = φPoisson(yn, xn · θ), where φPoisson(y, s) := ys −es −log y!. In both cases, we cannot express the log-likelihood as an inner product between a function solely of the data and a function solely of the parameter. 3 PASS-GLM Since exact sufficient statistics are not available for GLMs, we propose to construct approximate sufficient statistics. In particular, we propose to approximate the mapping function φ with an order-M polynomial φM. We therefore call our method polynomial approximate sufficient statistics for GLMs (PASS-GLM). We illustrate our method next in the logistic regression case, where log p(yn | xn, θ) = φlogit(ynxn · θ). The fully general treatment appears in Appendix A. Let b(M) 0 , b(M) 1 . . . , b(M) M be constants such that φlogit(s) ≈φM(s) := PM m=0 b(M) m sm. 1Our presentation is slightly different from the standard textbook account because we have implicitly absorbed the base measure and log-partition function into t and η. 4 Let vk := Qd j=1 vkj j for vectors v, k ∈Rd. Taking s = yx · θ, we obtain φlogit(yx · θ) ≈φM(yx · θ) = PM m=0 b(M) m (yx · θ)m = PM m=0 b(M) m P k∈Nd P j kj=m m k (yx)kθk = PM m=0 P k∈Nd:P j kj=m a(k, m, M)(yx)kθk, where m k is the multinomial coefficient and a(k, m, M) := m k b(M) m . Thus, φM is an M-degree polynomial approximation to φlogit(yx · θ) with the d+M d monomials of degree at most M serving as sufficient statistics derived from yx. Specifically, we have a exponential family model with t(yx) = ([yx]k)k and η(θ) = (a(k, m, M)θk)k, where k is taken over all k ∈Nd such that P j kj ≤M. We next discuss the calculation of the b(M) m and the choice of M. Choosing the polynomial approximation. To calculate the coefficients b(M) m , we choose a polynomial basis (ψm)m∈N orthogonal with respect to a base measure ς, where ψm is degree m [37]. That is, ψm(s) = Pm j=0 αm,jsj for some αm,j, and R ψmψm′dς = δmm′, where δmm′ = 1 if m = m′ and zero otherwise. If bm := R φψmdς, then φ(s) = P∞ m=0 bmψm(s) and the approximation φM(s) = PM m=0 bmψm(s). Conclude that b(M) m = PM k=m αk,mbm. The complete PASS-GLM framework appears in Algorithm 1. Choices for the orthogonal polynomial basis include Chebyshev, Hermite, Leguerre, and Legendre polynomials [37]. We choose Chebyshev polynomials since they provide a uniform quality guarantee on a finite interval, e.g., [−R, R] for some R > 0 in what follows. If φ is smooth, the choice of Chebyshev polynomials (scaled appropriately, along with the base measure ς, based on the choice of R) yields error exponentially small in M: sups∈[−R,R] |φ(s) −φM(s)| ≤CρM for some 0 < ρ < 1 and C > 0 [26]. We show in Appendix B that the error in the approximate derivative φ′ M is also exponentially small in M: sups∈[−R,R] |φ′(s) −φ′ M(s)| ≤C′ρM, where C′ > C. Choosing the polynomial degree. For fixed d, the number of monomials is O(M d) while for fixed M the number of monomials is O(dM). The number of approximate sufficient statistics can remain manageable when either M or d is small but becomes unwieldy if M and d are both large. Since our experiments (Section 5) generally have large d, we focus on the small M case here. In our experiments we further focus on the choice of logistic regression as a particularly popular GLM example with p(yn | xn, θ) = φlogit(ynxn · θ), where φlogit(s) := −log(1 + e−s). In general, the smallest and therefore most compelling choice of M a priori is 2, and we demonstrate the reasonableness of this choice empirically in Section 5 for a number of large-scale data analyses. In addition, in the logistic regression case, M = 6 is the next usable choice beyond M = 2. This is because b(M) 2k+1 = 0 for all integer k ≥1 with 2k + 1 ≤M. So any approximation beyond M = 2 must have M ≥4. Also, b(M) 4k > 0 for all integers k ≥1 with 4k ≤M. So choosing M = 4k, k ≥1, leads to a pathological approximation of φlogit where the log-likelihood can be made arbitrarily large by taking ∥θ∥2 →∞. Thus, a reasonable polynomial approximation for logistic regression requires M = 2 + 4k, k ≥0. We have discussed the relative drawbacks of other popular quadratic approximations, including the Laplace approximation and variational methods, in Section 1. 4 Theoretical Results We next establish quality guarantees for PASS-GLM. We first provide finite-sample and asymptotic guarantees on the MAP (point estimate) solution, and therefore on the MLE, in Section 4.1. We then provide guarantees on the Wasserstein distance between the approximate and exact posteriors, and show these bounds translate into bounds on the quality of posterior mean and uncertainty estimates, in Section 4.2. See Appendix C for extended results, further discussion, and all proofs. 4.1 MAP approximation In Appendix C, we state and prove Theorem C.1, which provides guarantees on the quality of the MAP estimate for an arbitrary approximation ˜LD(θ) to the log-likelihood LD(θ). The approximate 5 MAP (i.e., the MAP under ˜LD) is (cf. Eq. (1)) ˜θMAP := arg max θ∈Θ log π0(θ) + ˜LD(θ). Roughly, we find in Theorem C.1 that the error in the MAP estimate naturally depends on the error of the approximate log-likelihood as well as the peakedness of the posterior near the MAP. In the latter case, if log πD is very flat, then even a small error from using ˜LD in place of LD could lead to a large error in the approximate MAP solution. We measure the peakedness of the distribution in terms of the strong convexity constant2 of −log πD near θMAP. We apply Theorem C.1 to PASS-GLM for logistic regression and robust regression. We require the assumption that φM(t) ≤φ(t) ∀t /∈[−R, R], (2) which in the cases of logistic regression and smoothed Huber regression, we conjecture holds for M = 2 + 4k, k ∈N. For a matrix A, ∥A∥2 denotes its spectral norm. Corollary 4.1. For the logistic regression model, assume that ∥(∇2LD(θMAP))−1∥2 ≤cd/N for some constant c > 0 and that ∥xn∥2 ≤1 for all n = 1, . . . , N. Let φM be the order-M Chebyshev approximation to φlogit on [−R, R] such that Eq. (2) holds. Let ˜πD(θ) denote the posterior approximation obtained by using φM with a log-concave prior. Then there exist numbers r = r(R) > 1, ε = ε(M) = O(r−M), and α∗≥ 27 εd3c3+54, such that if R −∥θMAP∥2 ≥2 q cdε α∗, then ∥θMAP −˜θMAP∥2 2 ≤4cdε α∗ ≤4 27c4d4ε2 + 8cdε. The main takeaways from Corollary 4.1 are that (1) the error decreases exponentially in M thanks to the ε term, (2) the error does not depend on the amount of data, and (3) in order for the bound on the approximate MAP solution to hold, the norm of the true MAP solution must be sufficiently smaller than R. Remark 4.2. Some intuition for the assumption on the Hessian of LD, i.e., ∇2LD(θ) = PN n=1 φ′′ logit(ynxn · θ)xnx⊤ n , is as follows. Typically for θ near θMAP, the minimum eigenvalue of ∇2LD(θ) is at least N/(cd) for some c > 0. The minimum eigenvalue condition in Corollary 4.1 holds if, for example, a constant fraction of the data satisfies 0 < b ≤∥xn∥2 ≤B < ∞and that subset of the data does not lie too close to any (d −1)-dimensional hyperplane. This condition essentially requires the data not to be degenerate and is similar to ones used to show asymptotic consistency of logistic regression [40, Ex. 5.40]. The approximate MAP error bound in the robust regression case using, for example, the smoothed Huber loss (Example A.1), is quite similar to the logistic regression result. Corollary 4.3. For robust regression with smoothed Huber loss, assume that a constant fraction of the data satisfies |xn · θMAP −yn| ≤b/2 and that ∥xn∥2 ≤1 for all n = 1, . . . , N. Let φM be the order M Chebyshev approximation to φHuber on [−R, R] such that Eq. (2) holds. Let ˜πD(θ) denote the posterior approximation obtained by using φM with a log-concave prior. Then if R ≫∥θMAP∥2, there exists r > 1 such that for M sufficiently large, ∥θMAP −˜θMAP∥2 2 = O(dr−M). 4.2 Posterior approximation We next establish guarantees on how close the approximate and exact posteriors are in Wasserstein distance, dW. For distributions P and Q on Rd, dW(P, Q) := supf:∥f∥L≤1 | R fdP − R fdQ|, where ∥f∥L denotes the Lipschitz constant of f.3 This choice of distance is particularly useful since, if dW(πD, ˜πD) ≤δ, then ˜πD can be used to estimate any function with bounded gradient with error at most δ supw ∥∇f(w)∥2. Wasserstein error bounds therefore give bounds on the mean estimates (corresponding to f(θ) = θi) as well as uncertainty estimates such as mean absolute deviation (corresponding to f(θ) = |¯θi −θi|, where ¯θi is the expected value of θi). 2Recall that a twice-differentiable function f : Rd →R is ϱ-strongly convex at θ if the minimum eigenvalue of the Hessian of f evaluated at θ is at least ϱ > 0. 3The Lipschitz constant of function f : Rd →R is ∥f∥L := supv,w∈Rd ∥φ(v)−φ(w)∥2 ∥v−w∥2 . 6 -4 -2 0 2 4 -4 -3 -2 -1 0 ϕ(t) ϕ2(t) -4 -2 0 2 4 -4 -3 -2 -1 0 ϕ(t) ϕ2(t) (a) 6 4 2 0 2 4 6 ynxn, MAP 0.0 0.5 1.0 1.5 ChemReact 6 4 2 0 2 4 6 ynxn, MAP 0.0 0.1 0.2 0.3 CovType 6 4 2 0 2 4 6 ynxn, MAP 0.0 0.5 1.0 1.5 2.0 Webspam 12 4 4 12 20 ynxn, MAP 0.0 0.1 0.2 CodRNA (b) Figure 1: Validating the use of PASS-GLM with M = 2. (a) The second-order Chebyshev approximation to φ = φlogit on [−4, 4] is very accurate, with error of at most 0.069. (b) For a variety of datasets, the inner products ⟨ynxn, θMAP⟩are mostly in the range of [−4, 4]. Our general result (Theorem C.3) is stated and proved in Appendix C. Similar to Theorem C.1, the result primarily depends on the peakedness of the approximate posterior and the error of the approximate gradients. If the gradients are poorly approximated then the error can be large while if the (approximate) posterior is flat then even small gradient errors could lead to large shifts in expected values of the parameters and hence large Wasserstein error. We apply Theorem C.3 to PASS-GLM for logistic regression and Poisson regression. We give simplified versions of these corollaries in the main text and defer the more detailed versions to Appendix C. For logistic regression we assume M = 2 and Θ = Rd since this is the setting we use for our experiments. The result is similar in spirit to Corollary 4.1, though more straightforward since M = 2. Critically, we see in this result how having small error depends on |ynxn · ¯θ| ≤R with high probability. Otherwise the second term in the bound will be large. Corollary 4.4. Let φ2 be the second-order Chebyshev approximation to φlogit on [−R, R] and let ˜πD(θ) = N(θ | ˜θMAP, ˜Σ) denote the posterior approximation obtained by using φ2 with a Gaussian prior π0(θ) = N(θ | θ0, Σ0). Let ¯θ := R θπD(dθ), let δ1 := N −1 PN n=1⟨ynxn, ¯θ⟩, and let σ1 be the subgaussianity constant of the random variable ⟨ynxn, ¯θ⟩−δ1, where n ∼Unif{1, . . . , N}. Assume that |δ1| ≤R, that ∥˜Σ∥2 ≤cd/N, and that ∥xn∥2 ≤1 for all n = 1, . . . , N. Then with σ2 0 := ∥Σ0∥2, we have dW(πD, ˜πD) = O dR4 + dσ0 exp σ2 1σ−2 0 − √ 2 σ−1 0 (R −|δ1|) . The main takeaway from Corollary 4.4 is that if (a) for most n, |⟨xn, ¯θ⟩| < R, so that φ2 is a good approximation to φlogit, and (b) the approximate posterior concentrates quickly, then we get a highquality approximate posterior. This result matches up with the experimental results (see Section 5 for further discussion). For Poisson regression, we return to the case of general M. Recall that in the Poisson regression model that the expectation of yn is µ = exn·θ. If yn is bounded and has non-trivial probability of being greater than zero, we lose little by restricting xn · θ to be bounded. Thus, we will assume that the parameter space is bounded. As in Corollaries 4.1 and 4.3, the error is exponentially small in M and, as long as ∥PN n=1 xnx⊤ n ∥2 grows linearly in N, does not depend on the amount of data. Corollary 4.5. Let fM(s) be the order-M Chebyshev approximation to et on the interval [−R, R], and let ˜πD(θ) denote the posterior approximation obtained by using the approximation log ˜p(yn | xn, θ) := ynxn · θ −fM(xn · θ) −log yn! with a log-concave prior on Θ = BR(0). If infs∈[−R,R] f ′′ M(s) ≥˜ϱ > 0, ∥PN n=1 xnx⊤ n ∥2 = Ω(N/d), and ∥xn∥2 ≤1 for all n = 1, . . . , N, then dW(πD, ˜πD) = O d˜ϱ−1M 2eR2−M . 7 0.1 1.0 10.0 100.0 time (sec) 0.62 0.64 0.66 0.68 Negative Test LL PASSLR2 Laplace SGD True Posterior MALA 1.0 10.0 100.0 time (sec) 0.1 1.0 average mean error 1.0 10.0 100.0 time (sec) 0.01 0.032 0.1 0.32 1.0 average variance error (a) WEBSPAM 1.0 100.0 time (sec) 0.5 0.6 Negative Test LL 0.1 1.0 10.0 100.0 time (sec) 0.1 0.32 1.0 3.2 average mean error 0.1 1.0 10.0 100.0 time (sec) 0.032 0.1 0.32 1.0 average variance error (b) COVTYPE 0.01 0.1 1.0 10.0 time (sec) 0.12 0.14 0.16 Negative Test LL 0.01 0.1 1.0 10.0 time (sec) 0.01 0.032 0.1 0.32 1.0 average mean error 0.1 1.0 10.0 time (sec) 0.01 0.1 1.0 average variance error (c) CHEMREACT 0.01 1.0 100.0 time (sec) 0.2 0.3 0.4 0.5 0.6 Negative Test LL 1.0 100.0 time (sec) 1.0 3.2 10.0 average mean error 1.0 100.0 time (sec) 1.0 1.6 2.5 4.0 average variance error (d) CODRNA Figure 2: Batch inference results. In all metrics smaller is better. Note that although ˜ϱ−1 does depend on R and M, as M becomes large it converges to eR. Observe that if we truncate a prior on Rd to be on BR(0), by making R and M sufficiently large, the Wasserstein distance between πD and the PASS-GLM posterior approximation ˜πD can be made arbitarily small. Similar results could be shown for other GLM likelihoods. 5 Experiments In our experiments, we focus on logistic regression, a particularly popular GLM example.4 As discussed in Section 3, we choose M = 2 and call our algorithm PASS-LR2. Empirically, we observe that M = 2 offers a high-quality approximation of φ on the interval [−4, 4] (Fig. 1a). In fact sups∈[−4,4] |φ2(s) −φ(s)| < 0.069. Moreover, we observe that for many datasets, the inner products ynxn · θMAP tend to be concentrated within [−4, 4], and therefore a high-quality approximation on this range is sufficient for our analysis. In particular, Fig. 1b shows histograms of ynxn · θMAP for four datasets from our experiments. In all but one case, over 98% of the data points satisfy |ynxn · θMAP| ≤4. In the remaining dataset (CODRNA), only ∼80% of the data satisfy this condition, and this is the dataset for which PASS-LR2 performed most poorly (cf. Corollary 4.4). 5.1 Large dataset experiments In order to compare PASS-LR2 to other approximate Bayesian methods, we first restrict our attention to datasets with fewer than 1 million data points. We compare to the Laplace approximation and the adaptive Metropolis-adjusted Langevin algorithm (MALA). We also compare to stochastic gradient descent (SGD) although SGD provides only a point estimate and no approximate posterior. In all experiments, no method performs as well as PASS-LR2 given the same (or less) running time. Datasets. The CHEMREACT dataset consists of N = 26,733 chemicals, each with d = 100 properties. The goal is to predict whether each chemical is reactive. The WEBSPAM corpus consists of N = 350,000 web pages and the covariates consist of the d = 127 features that each appear in at least 25 documents. The cover type (COVTYPE) dataset consists of N = 581,012 cartographic observations with d = 54 features. The task is to predict the type of trees that are present at each observation location. The CODRNA dataset consists of N = 488,565 and d = 8 RNA-related features. The task is to predict whether the sequences are non-coding RNA. Fig. 2 shows average errors of the posterior mean and variance estimates as well as negative test loglikelihood for each method versus the time required to run the method. SGD was run for between 1 and 20 epochs. The true posterior was estimated by running three chains of adaptive MALA for 50,000 iterations, which produced Gelman-Rubin statistics well below 1.1 for all datasets. 4Code is available at https://bitbucket.org/jhhuggins/pass-glm. 8 0.00 0.25 0.50 0.75 1.00 False Positive Rate 0.00 0.25 0.50 0.75 1.00 True Positive Rate PASSLR2 (area = 0.696) SGD (area = 0.725) (a) 0 10 20 cores 2.5 5.0 7.5 10.0 speedup (b) Figure 3: (a) ROC curves for streaming inference on 40 million CRITEO data points. SGD and PASS-LR2 had negative test log-likelihoods of, respectively, 0.07 and 0.045. (b) Cores vs. speedup (compared to one core) for parallelization experiment on 6 million examples from the CRITEO dataset. Speed. For all four datasets, PASS-LR2 was an order of magnitude faster than SGD and 2–3 orders of magnitude faster than the Laplace approximation. Mean and variance estimates. For CHEMREACT, WEBSPAM, and COVTYPE, PASS-LR2 was superior to or competitive with SGD, with MALA taking 10–100x longer to produce comparable results. Laplace again outperformed all other methods. Critically, on all datasets the PASS-LR2 variance estimates were competitive with Laplace and MALA. Test log-likelihood. For CHEMREACT and WEBSPAM, PASS-LR2 produced results competitive with all other methods. MALA took 10–100x longer to produce comparable results. For COVTYPE, PASS-LR2 was competitive with SGD but took a tenth of the time, and MALA took 1000x longer for comparable results. Laplace outperformed all other methods, but was orders of magnitude slower than PASS-LR2. CODRNA was the only dataset where PASS-LR2 performed poorly. However, this performance was expected based on the ynxn · θMAP histogram (Fig. 1a). 5.2 Very large dataset experiments using streaming and distributed PASS-GLM We next test PASS-LR2, which is streaming without requiring any modifications, on a subset of 40 million data points from the Criteo terabyte ad click prediction dataset (CRITEO). The covariates are 13 integer-valued features and 26 categorical features. After one-hot encoding, on the subset of the data we considered, d ≈3 million. For tractability we used sparse random projections [23] to reduce the dimensionality to 20,000. At this scale, comparing to the other fully Bayesian methods from Section 5.1 was infeasible; we compare only to the predictions and point estimates from SGD. PASSLR2 performs slightly worse than SGD in AUC (Fig. 3a), but outperforms SGD in negative test loglikelihood (0.07 for SGD, 0.045 for PASS-LR2). Since PASS-LR2 estimates a full covariance, it was about 10x slower than SGD. A promising approach to speeding up and reducing memory usage of PASS-LR2 would be to use a low-rank approximation to the second-order moments. To validate the efficiency of distributed computation with PASS-LR2, we compared running times on 6M examples with dimensionality reduced to 1,000 when using 1–22 cores. As shown in Fig. 3b, the speed-up is close to optimal: K cores produces a speedup of about K/2 (baseline 3 minutes using 1 core). We used Ray to implement the distributed version of PASS-LR2 [28].5 6 Discussion We have presented PASS-GLM, a novel framework for scalable parameter estimation and Bayesian inference in generalized linear models. Our theoretical results provide guarantees on the quality of point estimates as well as approximate posteriors derived from PASS-GLM. We validated our approach empirically with logistic regression and a quadratic approximation. We showed competitive performance on a variety of real-world data, scaling to 40 million examples with 20,000 covariates, and trivial distributed computation with no compounding of approximation error. There a number of important directions for future work. The first is to use randomization methods along the lines of random projections and random feature mappings [23, 33] to scale to larger M and d. We conjecture that the use of randomization will allow experimentation with other GLMs for which quadratic approximations are insufficient. 5https://github.com/ray-project/ray 9 Acknowledgments JHH and TB are supported in part by ONR grant N00014-17-1-2072, ONR MURI grant N00014-11-1-0688, and a Google Faculty Research Award. RPA is supported by NSF IIS-1421780 and the Alfred P. Sloan Foundation. References [1] S. Ahn, A. Korattikara, and M. Welling. Bayesian posterior sampling via stochastic gradient Fisher scoring. In International Conference on Machine Learning, 2012. [2] P. Alquier, N. Friel, R. Everitt, and A. Boland. Noisy Monte Carlo: convergence of Markov chains with approximate transition kernels. Statistics and Computing, 26:29–47, 2016. [3] E. Angelino, M. J. Johnson, and R. P. Adams. Patterns of scalable Bayesian inference. Foundations and Trends R⃝in Machine Learning, 9(2-3):119–247, 2016. [4] O. Bachem, M. Lucic, and A. Krause. Practical coreset constructions for machine learning. arXiv.org, Mar. 2017. [5] R. Bardenet, A. Doucet, and C. C. Holmes. Towards scaling up Markov chain Monte Carlo: an adaptive subsampling approach. In International Conference on Machine Learning, pages 405–413, 2014. [6] R. Bardenet, A. Doucet, and C. C. Holmes. On Markov chain Monte Carlo methods for tall data. Journal of Machine Learning Research, 18:1–43, 2017. [7] M. J. Betancourt. The fundamental incompatibility of Hamiltonian Monte Carlo and data subsampling. In International Conference on Machine Learning, 2015. [8] J. Bierkens, P. Fearnhead, and G. O. Roberts. The zig-zag process and super-efficient sampling for Bayesian analysis of big data. arXiv.org, July 2016. [9] A. Bouchard-Cˆot´e, S. J. Vollmer, and A. Doucet. The bouncy particle sampler: A non-reversible rejectionfree Markov chain Monte Carlo method. arXiv.org, pages 1–37, Jan. 2016. [10] T. Broderick, N. Boyd, A. Wibisono, A. C. Wilson, and M. I. Jordan. Streaming variational Bayes. In Advances in Neural Information Processing Systems, Dec. 2013. [11] T. Campbell, J. Straub, J. W. Fisher, III, and J. P. How. Streaming, distributed variational inference for Bayesian nonparametrics. In Advances in Neural Information Processing Systems, 2015. [12] R. Entezari, R. V. Craiu, and J. S. Rosenthal. Likelihood inflating sampling algorithm. arXiv.org, May 2016. [13] D. Feldman, M. Faulkner, and A. Krause. Scalable training of mixture models via coresets. In Advances in Neural Information Processing Systems, pages 2142–2150, 2011. [14] W. Fithian and T. Hastie. Local case-control sampling: Efficient subsampling in imbalanced data sets. The Annals of Statistics, 42(5):1693–1724, Oct. 2014. [15] A. Gelman, A. Vehtari, P. Jyl¨anki, T. Sivula, D. Tran, S. Sahai, P. Blomstedt, J. P. Cunningham, D. Schiminovich, and C. Robert. Expectation propagation as a way of life: A framework for Bayesian inference on partitioned data. arXiv.org, Dec. 2014. [16] L. Han, T. Yang, and T. Zhang. Local uncertainty sampling for large-scale multi-class logistic regression. arXiv.org, Apr. 2016. [17] L. Hasenclever, S. Webb, T. Lienart, S. Vollmer, B. Lakshminarayanan, C. Blundell, and Y. W. Teh. Distributed Bayesian learning with stochastic natural-gradient expectation propagation and the posterior server. Journal of Machine Learning Research, 18:1–37, 2017. [18] M. D. Hoffman, D. M. Blei, C. Wang, and J. Paisley. Stochastic variational inference. Journal of Machine Learning Research, 14:1303–1347, 2013. [19] J. H. Huggins, T. Campbell, and T. Broderick. Coresets for scalable Bayesian logistic regression. In Advances in Neural Information Processing Systems, May 2016. [20] T. Jaakkola and M. I. Jordan. A variational approach to Bayesian logistic regression models and their extensions. In Sixth International Workshop on Artificial Intelligence and Statistics, volume 82, 1997. 10 [21] A. Korattikara, Y. Chen, and M. Welling. Austerity in MCMC land: Cutting the Metropolis-Hastings budget. In International Conference on Machine Learning, 2014. [22] A. Kucukelbir, R. Ranganath, A. Gelman, and D. M. Blei. Automatic variational inference in Stan. In Advances in Neural Information Processing Systems, June 2015. [23] P. Li, T. J. Hastie, and K. W. Church. Very sparse random projections. In SIGKDD Conference on Knowledge Discovery and Data Mining, 2006. [24] M. Lucic, M. Faulkner, A. Krause, and D. Feldman. Training mixture models at scale via coresets. arXiv.org, Mar. 2017. [25] D. Maclaurin and R. P. Adams. Firefly Monte Carlo: Exact MCMC with subsets of data. In Uncertainty in Artificial Intelligence, Mar. 2014. [26] J. C. Mason and D. C. Handscomb. Chebyshev Polynomials. Chapman and Hall/CRC, New York, 2003. [27] T. P. Minka. Expectation propagation for approximate Bayesian inference. In Uncertainty in Artificial Intelligence. Morgan Kaufmann Publishers Inc, Aug. 2001. [28] R. Nishihara, P. Moritz, S. Wang, A. Tumanov, W. Paul, J. Schleier-Smith, R. Liaw, M. Niknami, M. I. Jordan, and I. Stoica. Real-time machine learning: The missing pieces. In Workshop on Hot Topics in Operating Systems, 2017. [29] A. Pakman, D. Gilboa, D. Carlson, and L. Paninski. Stochastic bouncy particle sampler. In International Conference on Machine Learning, Sept. 2017. [30] N. S. Pillai and A. Smith. Ergodicity of approximate MCMC chains with applications to large data sets. arXiv.org, May 2014. [31] M. Pollock, P. Fearnhead, A. M. Johansen, and G. O. Roberts. The scalable Langevin exact algorithm: Bayesian inference for big data. arXiv.org, Sept. 2016. [32] M. Rabinovich, E. Angelino, and M. I. Jordan. Variational consensus Monte Carlo. arXiv.org, June 2015. [33] A. Rahimi and B. Recht. Weighted sums of random kitchen sinks: Replacing minimization with randomization in learning. In Advances in Neural Information Processing Systems, pages 1313–1320, 2009. [34] S. L. Scott, A. W. Blocker, F. V. Bonassi, H. A. Chipman, E. I. George, and R. E. McCulloch. Bayes and big data: The consensus Monte Carlo algorithm. In Bayes 250, 2013. [35] S. Srivastava, V. Cevher, Q. Tran-Dinh, and D. Dunson. WASP: Scalable Bayes via barycenters of subset posteriors. In International Conference on Artificial Intelligence and Statistics, 2015. [36] M. Stephanou, M. Varughese, and I. Macdonald. Sequential quantiles via Hermite series density estimation. Electronic Journal of Statistics, 11(1):570–607, 2017. [37] G. Szeg¨o. Orthogonal Polynomials. American Mathematical Society, 4th edition, 1975. [38] Y. W. Teh, A. H. Thiery, and S. Vollmer. Consistency and fluctuations for stochastic gradient Langevin dynamics. Journal of Machine Learning Research, 17(7):1–33, Mar. 2016. [39] L. Tierney and J. B. Kadane. Accurate approximations for posterior moments and marginal densities. Journal of the American Statistical Association, 81(393):82–86, 1986. [40] A. W. van der Vaart. Asymptotic Statistics. University of Cambridge, 1998. [41] M. Welling and Y. W. Teh. Bayesian learning via stochastic gradient Langevin dynamics. In International Conference on Machine Learning, 2011. 11 | 2017 | 30 |
6,786 | Generalizing GANs: A Turing Perspective Roderich Groß and Yue Gu Department of Automatic Control and Systems Engineering The University of Sheffield {r.gross,ygu16}@sheffield.ac.uk Wei Li Department of Electronics The University of York wei.li@york.ac.uk Melvin Gauci Wyss Institute for Biologically Inspired Engineering Harvard University mgauci@g.harvard.edu Abstract Recently, a new class of machine learning algorithms has emerged, where models and discriminators are generated in a competitive setting. The most prominent example is Generative Adversarial Networks (GANs). In this paper we examine how these algorithms relate to the Turing test, and derive what—from a Turing perspective—can be considered their defining features. Based on these features, we outline directions for generalizing GANs—resulting in the family of algorithms referred to as Turing Learning. One such direction is to allow the discriminators to interact with the processes from which the data samples are obtained, making them “interrogators”, as in the Turing test. We validate this idea using two case studies. In the first case study, a computer infers the behavior of an agent while controlling its environment. In the second case study, a robot infers its own sensor configuration while controlling its movements. The results confirm that by allowing discriminators to interrogate, the accuracy of models is improved. 1 Introduction Generative Adversarial Networks [1] (GANs) are a framework for inferring generative models from training data. They place two neural networks—a model and a discriminator—in a competitive setting. The discriminator’s objective is to correctly label samples from either the model or the training data. The model’s objective is to deceive the discriminator, in other words, to produce samples that are categorized as training data by the discriminator. The networks are trained using a gradient-based optimization algorithm. Since their inception in 2014, GANs have been applied in a range of contexts [2, 3], but most prominently for the generation of photo-realistic images [1, 4]. In this paper we analyze the striking similarities between GANs and the Turing test [5]. The Turing test probes a machine’s ability to display behavior that, to an interrogator, is indistinguishable from that of a human. Developing machines that pass the Turing test could be considered as a canonical problem in computer science [6]. More generally, the problem is that of imitating (and hence inferring) the structure and/or behavior of any system, such as an organism, a device, a computer program, or a process. The idea to infer models in a competitive setting (model versus discriminator) was first proposed in [7]. The paper considered the problem of inferring the behavior of an agent in a simple environment. The behavior was deterministic, simplifying the identification task. In a subsequent work [8], the method, named Turing Learning, was used to infer the behavioral rules of a swarm of memoryless 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Figure 1: Illustration of the Turing test setup introduced in [5]. Player C (the interrogator) poses questions to and receives labelled answers from players A and B. Player C does not know which label (blue square or red disk) corresponds to which player. Player C has to determine this after questioning. robots. The robot’s movements were tracked using an external camera system, providing the training data. Additional robots executed the rules defined by the models. The contributions of this paper are • to examine the defining features of GANs (and variants)—assuming a Turing perspective; • to outline directions for generalizing GANs, in particular, to encourage alternative implementations and novel applications; for example, ones involving physical systems; • to show, using two case studies, that more accurate models can be obtained if the discriminators are allowed to interact with the processes from which data samples are obtained (as the interrogators in the Turing test).1 2 A Turing Perspective In 1950, Turing proposed an imitation game [5] consisting of three players A, B and C. Figure 1 shows a schematic of this game. Player C, also referred to as the interrogator, is unable to see the other players. However, the interrogator can pose questions to and receive answers from them. Answers from the same player are consistently labelled (but not revealing its identity, A or B). At the end of the game, the interrogator has to guess which label belongs to which player. There are two variants of the game, and we focus on the one where player A is a machine, while player B is human (the interrogator is always human). This variant, depicted in Figure 1, is commonly referred to as the Turing test [9, 10]. To pass the test, the machine would have to produce answers that the interrogator believes to originate from a human. If a machine passed this test, it would be considered intelligent. For GANs (and variants), player C, the interrogator, is no longer human, but rather a computer program that learns to discriminate between information originating from players A and B. Player A is a computer program that learns to trick the interrogator. Player B could be any system one wishes to imitate, including humans. 2.1 Defining Features of GANs Assuming a Turing perspective, we consider the following as the defining features of GANs (and variants): • a training agent, T , providing genuine data samples (the training data); • a model agent, M, providing counterfeit data samples; 1Different to [7], we consider substantially more complex case studies, where the discriminators are required to genuinely interact with the systems, as a pre-determined sequence of interventions would be unlikely to reveal all the observable behavioral features. 2 • a discriminator agent, D, labelling data samples as either genuine or counterfeit; • a process by which D observes or interacts with M and T ; • D and M are being optimized: – D is rewarded for labelling data samples of T as genuine; – D is rewarded for labelling data samples of M as counterfeit; – M is rewarded for misleading D (to label its data samples as genuine). It should be noted that in the Turing test there is a bi-directional exchange of information between player C and either player A or B. In GANs, however, during any particular “game”, data flows only in one direction: The discriminator agent receives data samples, but is unable to influence the agent at the origin during the sampling process. In the case studies presented in this paper, this limitation is overcome, and it is shown that this can lead to improved model accuracy. This, of course, does not imply that active discriminators are beneficial for every problem domain. 2.2 Implementation Options of (Generalized) GANs GANs and their generalizations, that is, algorithms that possess the aforementioned defining features, are instances of Turing Learning [8]. The Turing Learning formulation removes (from a Turing perspective unnecessary) restrictions of the original GAN formulation, for example, the need for models and discriminators to be represented as neural networks, or the need for optimizing these networks using gradient descent. As a result of this, the Turing Learning formulation is very general, and applicable to a wide range of problems (e.g., using models with discrete, continuous or mixed representations). In the following, we present the aspects of implementations that are not considered as defining features, but rather as implementation options. They allow Turing Learning to be tailored, for example, by using the most suitable model representation and optimization algorithm for the given problem domain. Moreover, users can choose implementation options they are familiar with, making the overall framework2 more accessible. • Training data. The training data could take any form. It could be artificial (e.g., audio, visual, textual data in a computer), or physical (e.g., a geological sample, engine, painting or human being). • Model presentation. The model could take any form. In GANs [1], it takes the form of a neural network that generates data when provided with a random input. Other representations include vectors, graphs, and computer programs. In any case, the representation should be expressive enough, allowing a model to produce data with the same distribution as the training data. The associated process could involve physical objects (e.g., robots [8]). If the training data originates from physical objects, but the model data originates from simulation, special attention is needed to avoid the so called reality gap [11]. Any difference caused not by the model but rather the process to collect the data (e.g., tracking equipment) may be detected by the discriminators, which could render model inference impossible. • Discriminator representation. The discriminator could take any form. Its representation should be expressive enough to distinguish between genuine and counterfeit data samples. These samples could be artificial or physical. For example, a discriminator could be networked to an experimental platform, observing and manipulating some physical objects or organisms. • Optimization algorithms. The optimization algorithms could take any form as long as they are compatible with the solution representations. They could use a single candidate solution or a population of candidate solutions [8, 12]. In the context of GANs, gradient-based optimization algorithms are widely applied [13]. These algorithms however require the objective function to be differentiable and (ideally) unimodal. A wide range of metaheuristic algorithms [14] could be explored for domains with more complex objective functions. For example, if the model was represented using a computer program, genetic programming algorithms could be used. 2For an algorithmic description of Turing Learning, see [8]. 3 Figure 2: In Case Study 1, we consider a non-embodied agent that is subjected to a stimulus, S, which can be either low (L) or high (H). The task is to infer how the agent responds to the stimulus. The discriminator controls the stimulus while observing the behavior of the agent (expressed as v), which is governed by above probabilistic finite-state machine. Label S&p denotes that if the stimulus is S ∈{L, H}, the corresponding transition occurs with probability p. We assume that the structure of the state machine is known, and that the parameters (p1, p2, v2, v3, . . . , vn) are to be inferred. • Coupling mechanism between the model and discriminator optimizers. The optimization processes for the model and discriminator solutions are dependent on each other. Hence they may require careful synchronization [1]. Moreover, if using multiple models and/or multiple discriminators, choices have to be made for which pairs of solutions to evaluate. Elaborate evaluation schemes may take into account the performance of the opponents in other evaluations (e.g., using niching techniques). Synchronization challenges include those reported for coevolutionary systems.3 In particular, due to the so-called Red Queen Effect, the absolute quality of solutions in a population may increase while the quality of solutions relative to the other population may decrease, or vice versa [18]. Cycling [20] refers to the phenomenon that some solutions that have been lost, may get rediscovered in later generations. A method for overcoming the problem is to retain promising solutions in an archive—the “hall of fame” [21]. Disengagement can occur when one population (e.g., the discriminators) outperforms the other population, making it hard to reveal differences among the solutions. Methods for addressing disengagement include “resource sharing” [22] and “reducing virulence” [20]. • Termination criterion. Identifying a suitable criterion for terminating the optimization process can be challenging, as the performance is defined in relative rather than absolute terms. For example, a model that is found to produce genuine data by each of a population of discriminators may still not be useful (the discriminators may have performed poorly). In principle, however, any criterion can be applied (e.g., convergence data, fixed time limit, etc). 3 Case Study 1: Inferring Stochastic Behavioral Processes Through Interaction 3.1 Problem Formulation This case study is inspired from ethology—the study of animal behavior. Animals are sophisticated agents, whose actions depend on both their internal state and the stimuli present in their environment. Additionally, their behavior can have a stochastic component. In the following, we show how Turing Learning can infer the behavior of a simple agent that captures the aforementioned properties. The agent’s behavior is governed by the probabilistic finite-state machine (PFSM)4 shown in Figure 2. It has n states, and it is assumed that each state leads to some observable behavioral feature, v ∈R, hereafter referred to as the agent’s velocity. The agent responds to a stimulus that can take two levels, low (L) or high (H). The agent starts in state 1. If the stimulus is L, it remains in state 1 with certainty. 3Coevolutionary algorithms have been studied in a range of contexts [15, 16, 17], including system identification [18, 19], though these works differ from GANs and Turing Learning in that no discriminators evolve, but rather pre-defined metrics gauge on how similar the model and training data are. For some system identification problems, the use of such pre-defined metrics can result in poor model accuracy, as shown in [8]. 4PFSMs generalize the concept of Markov chains [23, 24]. 4 If the stimulus is H, it transitions to state 2 with probability p1, and remains in state 1 otherwise. In other words, on average, it transitions to state 2 after 1/p1 steps. In state k = 2, 3, . . . , n −1, the behavior is as follows. If the stimulus is identical to that which brings the agent into state k from state k −1, the state reverts to k −1 with probability p2 and remains at k otherwise. If the stimulus is different to that which brings the agent into state k from state k −1, the state progresses to k + 1 with probability p1 and remains at k otherwise. In state n, the only difference is that if the stimulus is different to that which brought about state n, the agent remains in state n with certainty (as there is no next state to progress to). By choosing p1 close to 0 and p2 = 1, we force the need for interaction if the higher states are to be observed for a meaningful amount of time. This is because once a transition to a higher state happens, the interrogator must immediately toggle the stimulus to prevent the agent from regressing back to the lower state. 3.2 Turing Learning Implementation We implement Turing Learning for this problem as follows: • Training data. To obtain the training data, the discriminator interacts with the PFSM, shown in Figure 2. The number of states are set to four (n = 4). The parameters used to generate the (genuine) data samples are given by: q = (p∗ 1, p∗ 2, v∗ 2, v∗ 3, v∗ 4) = (0.1, 1.0, 0.2, 0.4, 0.6). (1) • Model representation. It is assumed that the structure of the PFSM is known, while the parameters, q, are to be inferred. All parameters can vary in R. To interpret p1 and p2 as probabilities, they are mapped to the closest point in [0, 1], if outside this interval. The model data is derived analogously to that of the training data. • Discriminator representation. The discriminator is implemented as an Elman neural network [25] with 1 input neuron, 5 hidden neurons, and 2 output neurons. At each time step t, the observable feature (the agent’s velocity v) is fed into the input neuron.5 After updating the neural network, the output from one of the output neurons is used to determine the stimulus at time step t + 1, L or H. At the end of a trial (100 time steps), the output from the other output neuron is used to determine whether the discriminator believes the agent under investigation to be the training agent (T ) or model agent (M). • Optimization Algorithms. We use a standard (µ + λ) evolution strategy with self-adapting mutation strengths [26] for both the model and the discriminator populations. We use µ = λ = 50 in both cases. The populations are initialized at random. The parameter values of the optimization algorithm are set as described in [26]. • Coupling mechanism between the model and discriminator optimizers. The coupling comes from the evaluation process, which in turn affects the population selection. Each of the 100 candidate discriminators is evaluated once with each of the 100 models, as well as an additional 100 times with the training agent. It receives a point every time it correctly labels the data as either genuine or counterfeit. At the same time, each model receives a point for each time a discriminator mistakenly judges its data as genuine. • Termination criterion. The optimization process is stopped after 1000 generations. 3.3 Results To validate the advantages of the interactive approach, we use three setups for the Turing Learning algorithm. In the default setup, hereafter “Interactive” setup, the discriminator controls the environmental stimulus while observing the agent. In the other two setups, the discriminator observes the agent in a passive manner; that is, its output is not used to update the stimulus. Instead, the stimulus is uniformly randomly chosen at the beginning of the trial, and it is toggled with probability 0.1 at any time step (the stimulus is hence expected to change on average every 10 time steps). In setup “Passive 1”, the discriminator has the same input as in the “Interactive" setup (the observable feature, v). In setup “Passive 2”, the discriminator has one additional input, the current stimulus (S). All other aspects of the passive setups are identical to the “Interactive” setup. 5To emulate a noisy tracking process, the actual speed value is multiplied with a number chosen with a uniform distribution in the range (0.95, 1.05). 5 p1 p2 v2 v3 v4 -1 0 1 2 model parameters parameter value Interactive Passive 1 Passive 2 (a) 0 20 40 60 80 100 0.0 0.5 1.0 1.5 time step discriminator input and output velocity (v) stimulus (S) (b) Figure 3: Results from Case Study 1. (a) Model parameters Turing Learning inferred about a simulated agent. In the “Interactive" setup, the discriminator observes the agent while controlling a stimulus that the agent responds to. In the two passive setups, the discriminator observes the agent and/or stimulus, while the latter is randomly generated (for details, see text). The models are those with the highest evaluation value in the final generation (20 runs per setup). The dashed lines indicate the optimal parameter value (which is to be identified). (b) Example showing how one of the discriminators interacted with the agent during a trial. For the stimulus (blue), L and H are shown as 0 and 1, respectively. For each setup, we performed 20 runs of the Turing Learning algorithm. Figure 3(a) shows the distribution of the inferred models that achieved the highest evaluation value in the 1000th generation. The “Interactive” setup is the only one that inferred all parameters with good accuracy. Figure 3(b) shows a typical example of how a discriminator interacts with the agent. The discriminator initially sets the environmental stimulus to alternating values (i.e., toggling between H and L). Once the agent advances from state 1 to state 2, the discriminator instantly changes the stimulus to L and holds it constant. Once the agent advances to higher states, the stimulus is switched again, and so forth. This strategy allows the discriminator to observe the agent’s velocity in each state. 4 Case Study 2: A Robot Inferring Its Own Sensor Configuration 4.1 Problem Formulation The reality gap is a well-known problem in robotics: Often, behaviors that work well in simulation do not translate effectively into real-world implementations [11]. This is because simulations are generally unable to capture the full range of features of the real world, and therefore make simplifying assumptions. Yet, simulations can be important, even on-board a physical robot, as they facilitate planning and optimization. This case study investigates how a robot can use Turing Learning to improve the accuracy of a simulation model of itself, though a process of self-discovery, similar to [27]. In a practical scenario, the inference could take place on-board a physical platform. For convenience, we use an existing simulation platform [28], which has been extensively verified and shown to be able to cross the reality gap [29]. The robot, an e-puck [30], is represented as a cylinder of diameter 7.4 cm, height 4.7 cm and mass 152 g. It has two symmetrically aligned wheels. Their ground contact velocity (vleft and vright) can be set within [-12.8, 12.8] (cm/s). During the motion, random noise is applied to each wheel velocity, by multiplying it with a number chosen with a uniform distribution in the range (0.95, 1.05). 6 (a) (b) Figure 4: In Case Study 2, we consider a miniature mobile robot, the e-puck, that perceives its environment via eight infrared (IR) proximity sensors. The robot is unaware of the spatial configuration of these sensors, and has to infer it. The discriminator controls the movements of the robot, while observing the reading values of the sensors. (a) The sensor configuration to be inferred is the one of the physical e-puck robot. It comprises of 16 parameters, representing the orientations (θ) and displacements (d) of the 8 proximity sensors. (b) The robot is placed at random into an environment with nine moveable obstacles. The robot has eight infrared proximity sensors distributed around its cylindrical body, see Figure 4(a). The sensors provide noisy reading values (s1, s2, . . . , s8). We assume that the robot does not know where the sensors are located (neither their orientations, nor their displacements from the center). Situations like this are common in robotics, where uncertainties are introduced when sensors get mounted manually or when the sensor configuration may change during operation (e.g., at the time of collision with an object, or when the robot itself reconfigures the sensors). The sensor configuration can be described as follows: q = (θ1, θ2, . . . , θ8, d1, d2, . . . , d8) , (2) where di ∈(0, R] defines the distance of sensor i from the robot’s center (R is the robot’s radius), and θi ∈[−π, π] defines the bearing of sensor i relative to the robot’s front. The robot operates in a bounded square environment with sides 50 cm, shown in Figure 4(b). The environment also contains nine movable, cylindrical obstacles, arranged in a grid. The distance between the obstacles is just wide enough for an e-puck to pass through. 4.2 Turing Learning Implementation We implement Turing Learning for this problem as follows: • Training data. The training data comes from the eight proximity sensors of a “real” epuck robot, that is, using sensor configuration q as defined by the robot (see Figure 4(a)). The discriminator controls the movements of the robot within the environment shown in Figure 4(b), while observing the readings of its sensors. • Model representation. It is assumed that the sensor configuration, q, is to be inferred. In other words, a total of 16 parameters have to be estimated. • Discriminator representation. As in Case Study 1, the discriminator is implemented as an Elman neural network with 5 hidden neurons. The network has 8 inputs that receive values from the robot’s proximity sensors (s1, s2, . . . , s8). In addition to the classification output, the discriminator has two control outputs, which are used to set the robot’s wheel velocities (vleft and vright). In each trial, the robot starts from a random position and random orientation within the environment.6 The evaluation lasts for 10 seconds. As the robot’s sensors and actuators are updated 10 times per second, this results in 100 time steps. • The remaining aspects are implemented exactly as in Case Study 1. 6As the robot knows neither its relative position to the obstacles, nor its sensor configuration, the scenario can be considered as a chicken-and-egg problem. 7 -4 -2 0 2 4 6 θ1 θ2 θ3 θ4 θ5 θ6 θ7 θ8 model parameters parameter value (rad) Interactive Passive 1 Passive 2 (a) 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 d1 d2 d3 d4 d5 d6 d7 d8 model parameters parameter value (cm) Interactive Passive 1 Passive 2 (b) Figure 5: Results from Case Study 2. Model parameters Turing Learning inferred about the sensor configuration of the e-puck robot: (a) sensor orientations, (b) sensor displacements. In the “Interactive" setup, the discriminator observes the sensor reading values while controlling the movements of the robot. In the two passive setups, the discriminator observes the sensor reading values and/or movements while the latter are randomly generated (for details, see text). The models are those with the highest evaluation value in the final generation (20 runs per setup). The dashed lines indicate the optimal parameter value (which is to be identified). 4.3 Results To validate the advantages of the interactive approach, we use again three setups. In the “Interactive” setup the discriminator controls the movements of the robot while observing its sensor readings. In the other two setups, the discriminator observes the robot’s sensor readings in a passive manner; that is, its output is not used to update the movements of the robot. Rather, the pair of wheel velocities is uniformly randomly chosen at the beginning of the trial, and, with probability 0.1 at any time step (the movement pattern hence is expected to change on average every 10 time steps). In setup “Passive 1”, the discriminator has the same inputs as in the “Interactive” setup (the reading values of the robot’s sensors, s1, s2, . . . , s8). In setup “Passive 2”, the discriminator has two additional inputs, indicating the velocities of the left and right wheels (vleft and vright). All other aspects of the passive setups are identical to the “Interactive” setup. For each setup, we performed 20 runs of the Turing Learning algorithm. Figure 5 shows the distribution of the inferred models that achieved the highest evaluation value in the 1000th generation. The “Interactive” setup is the only one that inferred the orientations of the proximity sensors with good accuracy. The displacement parameters were inferred with all setups, though none of them was able to provide accurate estimates. Figure 6 shows a typical example of how a discriminator controls the robot. At the beginning, the robot rotates clockwise, registering an obstacle with sensors s7, s6, . . . , s2 (in that order). The robot then moves forward, and registers the obstacle with sensors s1 and/or s8, while pushing it. This confirms that s1 and s8 are indeed forward-facing. Once the robot has no longer any obstacle in its front, it repeats the process. To validate if the sensor-to-motor coupling was of any significance for the discrimination task, we recorded the movements of a robot controlled by the best discriminator of each of the 20 runs. The robot used either the genuine sensor configuration (50 trials) or the best model configuration of the corresponding run (50 trials). In these 2000 “closed-loop” experiments, the discriminator made correct judgments in 69.45% of the cases. We then repeated the 2000 trials, now ignoring the discriminator’s control outputs, but rather using the movements recorded earlier. In these 2000 “open-loop” experiments, the discriminator made correct judgments in 58.60% of the cases—a significant drop, though still better than guessing (50%). 8 0 20 40 60 80 100 time step 0.2 0.4 0.6 0.8 1 scaled sensor readings s1 s2 s3 s4 s5 s6 s7 s8 0 20 40 60 80 100 time step -10 -5 0 5 10 speed values (cm/s) vleft vright Figure 6: Example showing how one of the discriminators in Case Study 2 controlled the robot’s movements during the trial. The discriminator takes as input the robot’s eight sensor reading values (shown at the top), and controls the velocities of the wheels (shown at the bottom). The discriminator has to decide whether the sensor configuration of the robot corresponds to the one of the physical e-puck robot. For details, see text. 5 Conclusion In this paper we analyzed how Generative Adversarial Networks (GANs) relate to the Turing test. We identified the defining features of GANs, if assuming a Turing perspective. Other features, including choice of model representation, discriminator representation, and optimization algorithm, were viewed as implementation options of a generalized version of GANs, also referred to as Turing Learning. It was noted that the discriminator in GANs does not directly influence the sampling process, but rather is provided with a (static) data sample from either the generative model or training data set. This is in stark contrast to the Turing test, where the discriminator (the interrogator) plays an active role; it poses questions to the players, to reveal the information most relevant to the discrimination task. Such interactions are by no means always useful. For the purpose for generating photo-realistic images, for example, they may not be needed.7 For the two case studies presented here, however, interactions were shown to cause an improvement in the accuracy of models. The first case study showed how one can infer the behavior of an agent while controlling a stimulus present in its environment. It could serve as a template for studies of animal/human behavior, especially where some behavioral traits are revealed only through meaningful interactions. The inference task was not simple, as the agent’s actions depended on a hidden stochastic process. The latter was influenced by the stimulus, which was set to either low or high by the discriminator (100 times). It was not known in advance which of the 2100 sequences are useful. The discriminator thus needed to dynamically construct a suitable sequence, taking the observation data into account. The second case study focused on a different class of problems: active self-discovery. It showed that a robot can infer its own sensor configuration through controlled movements. This case study could serve as a template for modelling physical devices. The inference task was not simple, as the robot started from a random position in the environment, and its motors and sensors were affected by noise. The discriminator thus needed to dynamically construct a control sequence that let the robot approach an obstacle and perform movements for testing its sensor configuration. Future work could attempt to build models of more complex behaviors, including those of humans. Acknowledgments The authors thank Nathan Lepora for stimulating discussions. 7Though if the discriminator could request additional images by the same model or training agent, problems like mode collapse might be prevented. 9 References [1] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems 27, pages 2672–2680. Curran Associates, Inc., 2014. [2] A. Dosovitskiy, J. Tobias-Springenberg, and T. Brox. Learning to generate chairs with convolutional neural networks. In Proceedings of the 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1538–1546. IEEE, 2015. [3] K. Schawinski, C. Zhang, H. Zhang, L. Fowler, and G. K. Santhanam. Generative adversarial networks recover features in astrophysical images of galaxies beyond the deconvolution limit. Monthly Notices of the Royal Astronomical Society: Letters, 467(1):L110, 2017. [4] A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. CoRR, abs/1511.06434, 2015. [5] A. M. Turing. Computing machinery and intelligence. Mind, 59(236):433–460, 1950. [6] R. M. French. The Turing test: The first 50 years. Trends in Cognitive Sciences, 4(3):115–122, 2000. [7] W. Li, M. Gauci, and R Groß. A coevolutionary approach to learn animal behavior through controlled interaction. In Proceedings of the 15th Annual Conference on Genetic and Evolutionary Computation (GECCO 2013), pages 223–230. ACM, 2013. [8] W. Li, M. Gauci, and R. Groß. Turing Learning: A metric-free approach to inferring behavior and its application to swarms. Swarm Intelligence, 10(3):211–243, 2016. [9] S. Harnad. Minds, machines and Turing: The indistinguishability of indistinguishables. Journal of Logic, Language and Information, 9(4):425–445, 2000. [10] A. Pinar Saygin, I. Cicekli, and V. Akman. Turing test: 50 years later. Minds and Machines, 10(4):463–518, 2000. [11] N. Jacobi, P. Husbands, and I. Harvey. Noise and the reality gap: The use of simulation in evolutionary robotics. In Proceedings of the 3rd European Conference on Advances in Artificial Life, pages 704–720. Springer-Verlag, 1995. [12] D. J. Im, H. Ma, C. Kim, and G. W. Taylor. Generative adversarial parallelization. CoRR, abs/1612.04021, 2016. [13] I. J. Goodfellow. NIPS 2016 tutorial: Generative adversarial networks. CoRR, abs/1701.00160, 2017. [14] F. Glover and K. Sörensen. Metaheuristics. Scholarpedia, 10(4):6532, 2015. [15] W. D. Hillis. Co-evolving parasites improve simulated evolution as an optimization procedure. Physica D: Nonlinear Phenomena, 42(1):228–234, 1990. [16] Geoffrey F. Miller and Dave Cliff. Protean behavior in dynamic games: Arguments for the co-evolution of pursuit-evasion tactics. In Proceedings of the 3rd International Conference on Simulation of Adaptive Behavior: From Animals to Animats 3 (SAB 1994), pages 411–420. MIT Press, 1994. [17] S. Nolfiand D. Floreano. Coevolving predator and prey robots: Do “arms races" arise in artificial evolution? Artificial Life, 4(4):311–335, 1998. [18] J. C. Bongard and H. Lipson. Nonlinear system identification using coevolution of models and tests. IEEE Transactions on Evolutionary Computation, 9(4):361–384, 2005. [19] J. C. Bongard and H. Lipson. Active coevolutionary learning of deterministic finite automata. The Journal of Machine Learning Research, 6:1651–1678, 2005. [20] J. Cartlidge and S. Bullock. Combating coevolutionary disengagement by reducing parasite virulence. Evolutionary Computation, 12(2):193–222, 2004. 10 [21] C. Rosin and R. Belew. New methods for competitive coevolution. Evolutionary Computation, 5(10):1–29, 1997. [22] Hugues Juille and Jordan B. Pollack. Coevolving the “ideal" trainer: Application to the discovery of cellular automata rules. In Genetic Programming 1998: Proceedings of the Third Annual Conference, pages 519–527. Morgan Kaufmann, 1998. [23] E. Vidal, F. Thollard, C. de la Higuera, F. Casacuberta, and R. C. Carrasco. Probabilistic finite-state machines – Part I. IEEE Transactions on Pattern Analysis and Machine Intelligence, 27(7):1013–1025, 2005. [24] E. Vidal, F. Thollard, C. de la Higuera, F. Casacuberta, and R. C. Carrasco. Probabilistic finite-state machines – Part II. IEEE Transactions on Pattern Analysis and Machine Intelligence, 27(7):1026–1039, 2005. [25] J. L Elman. Finding structure in time. Cognitive Science, 14(2):179–211, 1990. [26] H. G. Beyer and H. P. Schwefel. Evolution strategies – A comprehensive introduction. Natural Computing, 1(1):3–52, 2002. [27] Josh Bongard, Victor Zykov, and Hod Lipson. Resilient machines through continuous selfmodeling. Science, 314(5802):1118–1121, 2006. [28] S. Magnenat, M. Waibel, and A. Beyeler. Enki: The fast 2D robot simulator, 2011. https: //github.com/enki-community/enki. [29] M. Gauci, J. Chen, W. Li, T. J. Dodd, and R. Groß. Self-organized aggregation without computation. The International Journal of Robotics Research, 33(8):1145–1161, 2014. [30] F. Mondada, M. Bonani, X. Raemy, J. Pugh, C. Cianci, A. Klaptocz, et al. The e-puck, a robot designed for education in engineering. In Proceedings of the 9th Conference on Autonomous Robot Systems and Competitions, pages 59–65. IPCB, 2009. 11 | 2017 | 300 |
6,787 | Predicting Scene Parsing and Motion Dynamics in the Future Xiaojie Jin1, Huaxin Xiao2, Xiaohui Shen3, Jimei Yang3, Zhe Lin3 Yunpeng Chen2, Zequn Jie4, Jiashi Feng2, Shuicheng Yan5,2 1NUS Graduate School for Integrative Science and Engineering (NGS), NUS 2Department of ECE, NUS 3Adobe Research 4Tencent AI Lab 5Qihoo 360 AI Institute Abstract The ability of predicting the future is important for intelligent systems, e.g. autonomous vehicles and robots to plan early and make decisions accordingly. Future scene parsing and optical flow estimation are two key tasks that help agents better understand their environments as the former provides dense semantic information, i.e. what objects will be present and where they will appear, while the latter provides dense motion information, i.e. how the objects will move. In this paper, we propose a novel model to simultaneously predict scene parsing and optical flow in unobserved future video frames. To our best knowledge, this is the first attempt in jointly predicting scene parsing and motion dynamics. In particular, scene parsing enables structured motion prediction by decomposing optical flow into different groups while optical flow estimation brings reliable pixel-wise correspondence to scene parsing. By exploiting this mutually beneficial relationship, our model shows significantly better parsing and motion prediction results when compared to well-established baselines and individual prediction models on the large-scale Cityscapes dataset. In addition, we also demonstrate that our model can be used to predict the steering angle of the vehicles, which further verifies the ability of our model to learn latent representations of scene dynamics. 1 Introduction Future prediction is an important problem for artificial intelligence. To enable intelligent systems like autonomous vehicles and robots to react to their environments, it is necessary to endow them with the ability of predicting what will happen in the near future and plan accordingly, which still remains an open challenge for modern artificial vision systems. In a practical visual navigation system, scene parsing and dense motion estimation are two essential components for understanding the scene environment. The former provides pixel-wise prediction of semantic categories (thus the system understands what and where the objects are) and the latter describes dense motion trajectories (thus the system learns how the objects move). The visual system becomes “smarter” by leveraging the prediction of these two types of information, e.g. predicting how the car coming from the opposite direction moves to plan the path ahead of time and predict/control the steering angle of the vehicle. Despite numerous models have been proposed on scene parsing [4, 7, 17, 26, 28, 30, 15] and motion estimation [2, 9, 21], most of them focus on processing observed images, rather than predicting in unobserved future scenes. Recently, a few works [22, 16, 3] explore how to anticipate the scene parsing or motion dynamics, but they all tackle these two tasks separately and fail to utilize the benefits that one task brings to the other. In this paper, we try to close this research gap by presenting a novel model for jointly predicting scene parsing and motion dynamics (in terms of the dense optical flow) for future frames. More importantly, we leverage one task as the auxiliary of the other in a mutually boosting way. See Figure 1 for 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 4 t X Input 3 t X Input 2 t X Input 1 t X Input t Output tS Output 1 tS Input 2 tS Input 3 tS Input 4 tS Input … … d t Output d tS Output Figure 1: Our task. The proposed model jointly predicts scene parsing and optical flow in the future. Top: Future flow (highlighted in red) anticipated using preceding frames. Bottom: Future scene parsing (highlighted in red) anticipated using preceding scene parsing results. We use the flow field color coding from [2]. an illustration of our task. For the task of predictive scene parsing, we use the discriminative and temporally consistent features learned in motion prediction to produce parsing prediction with more fine details. For the motion prediction task, we utilize the semantic segmentations produced by predictive parsing to separately estimate motion for pixels with different categories. In order to perform the results for multiple time steps, we take the predictions as input and iterate the model to predict subsequent frames. The proposed model has a generic framework which is agnostic to backbone deep networks and can be conveniently trained in an end-to-end manner. Taking Cityscapes [5] as testbed, we conduct extensive experiments to verify the effectiveness of our model in future prediction. Our model significantly improves mIoU of parsing predictions and reduces the endpoint error (EPE) of flow predictions compared to strongly competitive baselines including a warping method based on optical flow, standalone parsing prediction or flow prediction and other state-of-the-arts methods [22]. We also present how to predict steering angles using the proposed model. 2 Related work For the general field of classic flow (motion) estimation and image semantic segmentation, which is out of this paper’s scope, we refer the readers to comprehensive review articles [2, 10]. Below we mainly review existing works that focus on predictive tasks. Flow and scene parsing prediction The research on predictive scene parsing or motion prediction is still relatively under-explored. All existing works in this direction tackle the parsing prediction and flow prediction as independent tasks. With regards to motion prediction, Luo et al. [19] employed a convolutional LSTM architecture to predict sequences of 3D optical flow. Walker et al. [35] made long-term motion and appearance prediction via a transition and context model. [31] trained CNN for predicting motion of handwritten characters in a synthetic dataset. [36] predicted future optical flow given a static image. Different from above works, our model not only predicts the flow but also scene parsing at the same time, which definitely provides richer information to visual systems. There are also only a handful number of works exploring the prediction of scene parsing in future frames. Jin et al. [16] trained a deep model to predict the segmentations of the next frame from preceding input frames, which is shown to be beneficial for still-image parsing task. Based on the network proposed in [20], Natalia et al. [22] predicted longer-term parsing maps for future frames using the preceding frames’ parsing maps. Different from [22], we simultaneously predict optical flows for future frames. Benefited from the discriminative local features learned from flow prediction, the model produces more accurate parsing results. Another related work to ours is [24] which employed an RNN to predict the optical flow and used the flow to warp preceding segmentations. Rather than simply producing the future parsing map through warping, our model predicts flow and scene parsing jointly using learning methods. More importantly, we leverage the benefit that each task brings to the other to produce better results for both flow prediction and parsing prediction. Predictive learning While there are few works specifically on predictive scene parsing or dense motion prediction, learning to prediction in general has received a significant attention from the 2 4 t X 1 t X … CNN1 2 Res. Blocks Up-sampling Conv Transform Layer 4 tS 1 tS … CNN2 OBJ OTH flow L seg L OBJ STA flow L OBJ MOV flow L Flow Anticipating Network Parsing Anticipating Network Figure 2: The framework of our model for predicting future scene parsing and optical flow for one time step ahead. Our model is motivated by the assumption that flow and parsing prediction are mutually beneficial. We design the architecture to promote such mutual benefits. The model consists of two module networks, i.e. the flow anticipating network (blue) which takes preceding frames: Xt−4:t−1 as input and predicts future flow and the parsing anticipating network (yellow) which takes the preceding parsing results: St−4:t−1 as input and predicts future scene parsing. By providing pixel-level class information (i.e. St−1), the parsing anticipating network benefits the flow anticipating network to enable the latter to semantically distinguish different pixels (i.e. moving/static/other objects) and predict their flows more accurately in the corresponding branch. Through the transform layer, the discriminative local features learned by the flow anticipating network are combined with the parsing anticipating network to facilitate parsing over small objects and avoid over-smooth in parsing predictions. When predicting multiple time-steps ahead, the prediction of the parsing network in a time-step is used as the input in the next time-step. research community in recent years. Research in this area has explored different aspects of this problem. [37] focused on predicting the trajectory of objects given input image. [13] predicted the action class in the future frames. Generative adversarial networks (GAN) are firstly introduced in [11] to generate natural images from random noise, and have been widely used in many fields including image synthesis [11], future prediction [18, 20, 34, 36, 32, 33] and semantic inpainting [23]. Different from above methods, our model explores a new predictive task, i.e. predicting the scene parsing and motion dynamics in the future simultaneously. Multi-task learning Multi-task learning [1, 6] aims to solve multiple tasks jointly by taking advantage of the shared domain knowledge in related tasks. Our work is partially related to multi-task learning in that both the parsing results and motion dynamics are predicted jointly in a single model. However, we note that predicting parsing and motion “in the future” is a novel and challenging task which cannot be straightforwardly tackled by conventional multi-task learning methods. To our best knowledge, our work is the first solution to this challenging task. 3 Predicting scene parsing and motion dynamics in the future In this section, we first propose our model for predicting semantics and motion dynamics one time step ahead, and then extend our model to perform predictions for multiple time steps. Due to high cost of acquiring dense human annotations of optical flow and scene parsing for natural scene videos, only subset of frames are labeled for scene parsing in the current datasets. Following [22], to circumvent the need for datasets with dense annotations, we train an adapted Res101 model (denoted as Res101-FCN, more details are given in Sec. 4.1) for scene parsing to produce the target semantic segmentations for frames without human annotations. Similarly, to obtain the dense flow map for each frame, we use the output of the state-of-the-art epicflow [25] as our target optical flow. Note that our model is orthogonal to specific flow methods since they are only used to produce the target flow for training the flow anticipating network. Notations used in the following text are as follows. Xi denotes the i-th frame of a video and Xt−k:t−1 denotes the sequence of frames with length k from Xt−k to Xt−1. The semantic segmentation of Xt is denoted as St, which is the 3 output of the penultimate layer of Res101-FCN. St has the same spatial size as Xt and is a vector of length C at each location, where C is the number of semantic classes. We denote Ot as the pixel-wise optical flow map from Xt−1 to Xt, which is estimated via epicflow [25]. Correspondingly, ˆSt and ˆOt denote the predicted semantic segmentation and optical flow. 3.1 Prediction for one time step ahead Model overview The key idea of our approach is to model flow prediction and parsing prediction jointly, which are potentially mutually beneficial. As illustrated in Figure 2, the proposed model consists of two module networks that are trained jointly, i.e. the flow anticipating network that takes preceding frames Xt−k:t−1 as input to output the pixelwise flow prediction for Ot (from Xt−1 to Xt), and the parsing anticipating network that takes the segmentation of preceding frames St−k:t−1 as input to output pixelwise semantic prediction for an unobserved frame Xt. The mutual influences of each network on the other are exploited in two aspects. First, the last segmentations St−1 produced by the parsing anticipating network convey pixel-wise class labels, which are used by the flow anticipating network to predict optical flow values for each pixel according to its belonging object group, e.g. moving objects or static objects. Second, the parsing anticipating network combines the discriminative local feature learned by the flow anticipating network to produce sharper and more accurate parsing predictions. Since both parsing prediction and flow prediction are essentially both the dense classification problem, we use the same deep architecture (Res101-FCN) for predicting parsing results and optical flow. Note the Res101-FCN used in this paper can be replaced by any CNNs. We adjust the input/output layers of these two networks according to the different channels of their input/output. The features extracted by feature encoders (CNN1 and CNN2) are spatially enlarged via up-sampling layers and finally fed to a convolutional layer to produce pixel-wise predictions which have the same spatial size as input. Flow anticipating network In videos captured for autonomous driving or navigation, regions with different class labels have different motion patterns. For example, the motion of static objects like road is only caused by the motion of the camera while the motion of moving objects is a combination of motions from both the camera and objects themselves. Therefore compared to methods that predict all pixels’ optical flow in a single output layer, it would largely reduce the difficulty of feature learning by separately modeling the motion of regions with different classes. Following [29], we assign each class into one of three pre-defined object groups, i.e. G = {moving objects (MOV-OBJ), static objects (STA-OBJ), other objects (OTH-OBJ)} in which MOV-OBJ includes pedestrians, truck, etc., STA-OBJ includes sky, road, etc., and OTH-OBJ includes vegetation and buildings, etc. which have diverse motion patterns and shapes. We append a small network (consisting of two residual blocks) to the feature encoder (CNN1) for each object group to learn specified motion representations. During training, the loss for each pixel is only generated at the branch that corresponds to the object group to which the pixel belongs. Similarly, in testing, the flow prediction for each pixel is generated by the corresponding branch. The loss function between the model output ˆOt and target output Ot is Lflow( ˆOt, Ot) = X g∈G Lg flow; Lg flow = 1 |Ng| X (i,j)∈Ng
Oi,j t −ˆOi,j t
2 (1) where (i, j) index the pixel in the region Ng. Parsing anticipating network The input of the parsing anticipating network is a sequence of preceding segmentations St−k:t−1. We also explore other input space alternatives, including preceding frames Xt−k:t−1, and the combination of preceding frames and corresponding segmentations Xt−k:t−1St−k:t−1, and we observe that the input St−k:t−1 achieves the best prediction performance. We conjecture it is easier to learn the mapping between variables in the same domain (i.e. both are semantic segmentations). However, there are two drawbacks brought by this strategy. Firstly, St−k:t−1 lose the discriminative local features e.g. color, texture and shape etc., leading to the missing of small objects in predictions, as illustrated in Figure 3 (see yellow boxes). The flow prediction network may learn such features from the input frames. Secondly, due to the lack of local features in St−k:t−1, it is difficult to learn accurate pixel-wise correspondence in the parsing anticipating 4 network, which causes the predicted labeling maps to be over-smooth, as shown in Figure 3. The flow prediction network can provide reliable dense pixel-wise correspondence by regressing to the target optical flow. Therefore, we integrate the features learned by the flow anticipating network with the parsing prediction network through a transform layer (a shallow CNN) to improve the quality of predicted labeling maps. Depending on whether human annotations are available, the loss function is defined as Lseg( ˆS, S) = − P (i,j)∈Xt log( ˆSi,j t (c)), Xt has human annotation, Lℓ1( ˆS, S) + Lgdl( ˆS, S), otherwise (2) where c is the ground truth class for the pixel at location (i, j). It is a conventional pixel-wise cross-entropy loss when Xt has human annotations. Lℓ1 and Lgdl are ℓ1 loss and gradient difference loss [20] which are defined as Lℓ1( ˆS, S) = X (i,j)∈Xt Si,j t −ˆSi,j t , Lgdl = X (i,j)∈Xt |Si,j t −Si−1,j t | −| ˆSi,j t −ˆSi−1,j t | + |Si,j−1 t −Si,j t | −| ˆSi,j−1 t −ˆSi,j t | . The ℓ1 loss encourages predictions to regress to the target values while the gradient difference loss produces large errors in the gradients of the target and predictions. The reason for using different losses for human and non-human annotated frames in Eq. 2 is that the automatically produced parsing ground-truth (by the pre-trained Res101-FCN) of the latter may contain wrong annotations. The cross-entropy loss using one-hot vectors as labels is sensitive to the wrong annotations. Comparatively, the ground-truth labels used in the combined loss (Lℓ1 + Lgdl) are inputs of the softmax layer (ref. Sec. 3) which allow for non-zero values in more than one category, thus our model can learn useful information from the correct category even if the annotation is wrong. We find replacing Lℓ1 + Lgdl with the cross-entropy loss reduces the mIoU of the baseline S2S (i.e. the parsing participating network) by 1.5 from 66.1 when predicting the results one time-step ahead. Now we proceed to explain the role of the transform layer which transforms the features of CNN1 before combining them with those of CNN2. Compared with naively combining the features from two networks (e.g., concatenation), the transform layer brings the following two advantages: 1) naturally normalize the feature maps to proper scales; 2) align the features of semantic meaning such that the integrated features are more powerful for parsing prediction. Effectiveness of this transform layer is clearly validated in the ablation study in Sec. 4.2.1. The final objective of our model is to minimize the combination of losses from the flow anticipating network and the parsing anticipating network as follows L(Xt−k:t−1, St−k:t−1, ˆXt, ˆSt) = Lflow( ˆOt, Ot) + Lseg( ˆS, S). 3.2 Prediction for multiple time steps ahead Based on the above model which predicts scene parsing and flow for the single future time step, we explore two ways to predict further into the future. Firstly, we iteratively apply the model to predict one more time step into the future by treating the prediction as input in a recursive way. Specifically, for predicting multiple time steps in the flow anticipating network, we warp the most recent frame Xt−1 using the output prediction ˆOt to get the ˆXt which is then combined with Xt−k−1:t−1 to feed the flow anticipating network to generate ˆOt+1, and so forth. For the parsing anticipating network, we combine the predicted parsing map ˆSt with St−k−1:t−1 as the input to generate the parsing prediction at t + 1. This scheme is easy to implement and allows us to predict arbitrarily far into the future without increasing training complexity w.r.t. with the number of time-steps we want to predict. Secondly, we fine-tune our model by taking into account the influence that the recurrence has on prediction for multiple time steps. We apply our model recurrently as described above to predict two time steps ahead and apply the back propagation through time (BPTT) [14] to update the weight. We have verified through experiments that the fine-tuning approach can further improve the performance as it models longer temporal dynamics during training. 5 Figure 3: Two examples of prediction results for predicting one time step ahead. Odd row: The images from left to right are Xt−2, Xt−1, the target optical flow map Ot, the flow predictions from PredFlow and the flow predictions from our model. Even row: The images from left to right are St−2, St−1, the ground truth semantic annotations at the time t, the parsing prediction from S2S and the parsing prediction from our model. The flow predictions from our model show clearer object boundaries and predict more accurate values for moving objects (see black boxes) compared to PredFlow. Our model is superior to S2S by being more discriminative to the small objects in parsing predictions (see yellow boxes). Figure 4: An example of prediction results for predicting ten time steps ahead. Top (from left to right): Xt−11, Xt−10, the target optical flow map Ot, the flow prediction from PredFlow and the flow prediction from our model. Bottom (from left to right): St−11, St−10, the ground truth semantic annotation at the time t, the parsing prediction from S2S and the parsing prediction from our model. Our model outputs better prediction compared to PredFlow (see black boxes) and S2S (see yellow boxes). 4 Experiment 4.1 Experimental settings Datasets We verify our model on the large scale Cityscapes [5] dataset which contains 2,975/500 train/val video sequences with 19 semantic classes. Each video sequence lasts for 1.8s and contains 30 frames, among which the 20th frame has fine human annotations. Every frame in Cityscapes has a resolution of 1,024 × 2,048 pixels. Evaluation criteria We use the mean IoU (mIoU) for evaluating the performance of predicted parsing results on those 500 frames in the val set with human annotations. For evaluating the performance of flow prediction, we use the average endpoint error (EPE) [2] following conventions [8] which is defined as 1 N p (u −uGT)2 + (v −vGT)2 where N is the number of pixels per-frame, and u and v are the components of optical flow along x and y directions, respectively. To be consistent with mIoU, EPEs are also reported on the 20th frame in each val sequence. Baselines To fully demonstrate the advantages of our model on producing better predictions, we compare our model against the following baseline methods: 6 Table 1: The performance of parsing prediction on Cityscapes val set. For each competing model, we list the mIoU/EPE when predicting one time step ahead. Best results in bold. Model mIoU EPE Copy last input 59.7 3.03 Warp last input 61.3 3.03 PredFlow 61.3 2.71 S2S [22] 62.6 ours (w/o Trans. layer) 64.7 2.42 ours 66.1 2.30 Table 2: The performance of motion prediction on Cityscapes val set. For each model, we list the mIoU/EPE when predicting one time step ahead. Best results in bold. Model mIoU EPE Copy last input 41.3 9.40 Warp last input 42.0 9.40 PredFlow 43.6 8.10 S2S [22] 50.8 ours (w/o Recur. FT) 52.6 6.63 ours 53.9 6.31 • Copy last input Copy the last optical flow (Ot−1) and parsing map (St−1) at time t −1 as predictions at time t. • Warp last input Warp the last segmentation St−1 using Ot−1 to get the parsing prediction at the next time step. In order to make flow applicable to the correct locations, we also warp the flow field using the optical flow in each time step. • PredFlow Perform flow prediction without the object masks generated from segmentations. The architecture is the same as the flow prediction net in Figure 2 which generates pixel-wise flow prediction in a single layer, instead of multiple branches. For fair comparison with our joint model, in the following we report the average result of two independent PredFlow with different random initializations. When predicting the segmentations at time t, we use the flow prediction output by PredFlow at time t to warp the segmentations at time t −1. This baseline aims to verify the advantages brought by parsing prediction when predicting flow. • S2S [22] Use only parsing anticipating network. The difference is that the former does not leverage features learned by the flow anticipating network to produce parsing predictions. We replace the backbone network in the original S2S as the same one of ours, i.e. Res101FCN and retrain S2S with the same configurations as those of ours. Similar to the PredFlow, the average performance of two randomly initialized S2S is reported. This baseline aims to verify the advantages brought by flow prediction when predicting parsing. Implementation details Throughout the experiments, we set the length of the input sequence as 4 frames, i.e. k = 4 in Xt−k:t−1 and St−k:t−1 (ref. Sec. 3). The original frames are firstly downsampled to the resolution of 256 × 512 to accelerate training. In the flow anticipating network, we assign 19 semantic classes into three object groups which are defined as follows: MOV-OBJ including person, rider, car, truck, bus, train, motorcycle and bicycle, STA-OBJ including road, sidewalk, sky, pole, traffic light and traffic sign and OTH-OBJ including building, wall, fence, terrain and vegetation. For data augmentation, we randomly crop a patch with the size of 256 × 256 and perform random mirror for all networks. All results of our model are based on single-model singlescale testing. For other hyperparameters including weight decay, learning rate, batch size and epoch number etc., please refer to the supplementary material. All of our experiments are carried out on NVIDIA Titan X GPUs using the Caffe library. 4.2 Results and analysis Examples of the flow predictions and parsing predictions output by our model for one-time step and ten-time steps are illustrated in Figure 3 and Figure 4 respectively. Compared to baseline models, our model produces more visually convincing prediction results. 4.2.1 One-time step anticipation Table 1 lists the performance of parsing and flow prediction on the 20th frame in the val set which has ground truth semantic annotations. It can be observed that our model achieves the best performance on both tasks, demonstrating the effectiveness on learning the latent representations for future prediction. Based on the results, we analyze the effect of each component in our model as follows. 7 The effect of flow prediction on parsing prediction Compared with S2S which does not leverage flow predictions, our model improves the mIoU with a large margin (3.5%). As shown in Figure 3, compared to S2S, our model performs better on localizing the small objects in the predictions e.g. pedestrian and traffic sign, because it combines the discriminative local features learned in the flow anticipating network. These results clearly demonstrate the benefit of flow prediction for parsing prediction. The effect of parsing prediction on flow prediction Compared with the baseline PredFlow which has no access to the semantic information when predicting the flow, our model reduces the average EPE from 2.71 to 2.30 (a 15% improvement), which demonstrates parsing prediction is beneficial to flow prediction. As illustrated in Figure 3, the improvement our model makes upon PredFlow comes from two aspects. First, since the segmentations provide boundary information of objects, the flow map predicted by our model has clearer object boundaries while the flow map predicted by PredFlow is mostly blurry. Second, our model shows more accurate flow predictions on the moving objects (ref. Sec. 4.1 for the list of moving objects). We calculate the average EPE for only the moving objects, which is 2.45 for our model and 3.06 for PredFlow. By modeling the motion of different objects separately, our model learns better representation for each motion mode. If all motions are predicted in one layer as in PredFlow, then the moving objects which have large displacement than other regions are prone to smoothness. Benefits of the transform layer As introduced in Sec. 3.1, the transform layer improves the performance of our model by learning the latent feature space transformations from CNN1 to CNN2. In our experiments, the transform layer contains one residual block [12] which has been widely used due to its good performance and easy optimization. Details of the residual block used in our experiments are included in the supplementary material. Compared to the variant of our model w/o the transform layer, adding the transform layer improves the mIoU by 1.4 and reduces EPE by 0.12. We observe that stacking more residual blocks only leads to marginal improvements at larger computational costs. 4.2.2 Longer duration prediction The comparison of the prediction performance among all methods for ten time steps ahead is listed in Table 2, from which one can observe that our model performs the best in this challenging task. The effect of each component in our model is also verified in this experiment. Specifically, compared with S2S, our model improves the mIoU by 3.1% due to the synergy with the flow anticipating network. The parsing prediction helps reducing the EPE of PredFlow by 1.79. Qualitative results are illustrated in Figure 4. The effect of recurrent fine-tuning As explained in Sec. 3.2, it helps our model to capture long term video dynamics by fine-tuning the weights when recurrently applying the model to predict the next time step in the future. As shown in Table 2, compared to the variant w/o recurrent ft, our model w/ recurrent fine-tuning improves the mIoU by 1.3% and reduces the EPE by 0.32, therefore verifying the effect of recurrent fine-tuning. 4.3 Application for predicting the steering angle of a vehicle Table 3: Comparison results of steering angle prediction on a dataset from Comma.ai [27]. The criteria is the mean square error (MSE, in degree2) between the prediction and groud truth. Model MSE (degrees2) Copy last prediction 4.81 Comma.ai1 [27] ∼4 ours 2.96 With the parsing prediction and flow prediction available, one can enable the moving agent to be more alert about the environments and get “smarter”. Here, we investigate one application: predicting the steering angle of the vehicle. The intuition is it is convenient to infer the steering angle given the predicted flow of static objects, e.g. road and sky, the motion of which is only caused by ego-motion of the camera mounted on the vehicle. Specifically, we append a fully connected layer to take the features learned in the STA-OBJ branch in the flow anticipating network as input and perform regression to steering angles. We test our model on the dataset from Comma.ai [27] which consists of 11 videos 1https://github.com/commaai/research 8 amounting to about 7 hours. The data of steering angles have been recorded for each frame captured at 20Hz with the resolution of 160 × 320. We randomly sample 50K/5K frames from the train set for training and validation purpose. Since there are videos captured at night, we normalize all training frames to [0, 255]. Similar to Cityscapes, we use epicflow and Res101-FCN to produce the target output for flow prediction and parsing prediction, respectively. We first train our model following Sec. 3 and then fine-tune the whole model with the MSE loss after adding the fully connected layer for steering angle prediction. During training, random crop with the size of 160 × 160 and random mirror are employed and other hyperparameter settings follow Sec. 4.1. The testing results are listed in Table 3. Compared to the model from Comma.ai which uses a five-layer CNN to estimate the steering angle from a single frame and is trained end-to-end on all the training frames (396K), our model achieves much better performance (2.84 versus ∼4 in degrees2). Although we do not push the performance by using more training data and more complex prediction models (only a fully connected layer is used in our model for output steering angle), this preliminary experiment still verifies the advantage of our model in learning the underlying latent parameters. We think it is just an initial attempt in validating the dense prediction results through applications, which hopefully can stimulate researchers to explore other interesting ways to utilize the parsing prediction and flow prediction. 5 Conclusion In this paper, we proposed a novel model to predict the future scene parsing and motion dynamics. To our best knowledge, this is the first research attempt to anticipate visual dynamics for building intelligent agents. The model consists of two networks: the flow anticipating network and the parsing anticipating network which are jointly trained and benefit each other. On the large scale Cityscapes dataset, the experimental results demonstrate that the proposed model generates more accurate prediction than well-established baselines both on single time step prediction and multiple time prediction. In addition, we also presented a method to predict the steering angle of a vehicle using our model and achieve promising preliminary results on the task. Acknowledgements The work of Jiashi Feng was partially supported by National University of Singapore startup grant R-263-000-C08-133, Ministry of Education of Singapore AcRF Tier One grant R-263-000-C21-112 and NUS IDS grant R-263-000-C67-646. References [1] Andreas Argyriou, Theodoros Evgeniou, and Massimiliano Pontil. Multi-task feature learning. In NIPS, 2007. [2] Simon Baker, Daniel Scharstein, JP Lewis, Stefan Roth, Michael J Black, and Richard Szeliski. A database and evaluation methodology for optical flow. International Journal of Computer Vision, 92(1):1–31, 2011. [3] Yu-Wei Chao, Jimei Yang, Brian Price, Scott Cohen, and Jia Deng. Forecasting human dynamics from static images. In CVPR, 2017. [4] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Semantic image segmentation with deep convolutional nets and fully connected crfs. In ICLR, 2015. [5] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. arXiv preprint arXiv:1604.01685, 2016. [6] Theodoros Evgeniou and Massimiliano Pontil. Regularized multi–task learning. In SIGKDD, 2004. [7] Clement Farabet, Camille Couprie, Laurent Najman, and Yann LeCun. Learning hierarchical features for scene labeling. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 35(8):1915–1929, 2013. [8] Philipp Fischer, Alexey Dosovitskiy, Eddy Ilg, Philip Häusser, Caner Hazırba¸s, Vladimir Golkov, Patrick van der Smagt, Daniel Cremers, and Thomas Brox. Flownet: Learning optical flow with convolutional networks. arXiv preprint arXiv:1504.06852, 2015. [9] David F Fouhey and C Lawrence Zitnick. Predicting object dynamics in scenes. In CVPR, 2014. [10] Alberto Garcia-Garcia, Sergio Orts-Escolano, Sergiu Oprea, Victor Villena-Martinez, and Jose GarciaRodriguez. A review on deep learning techniques applied to semantic segmentation. arXiv preprint arXiv:1704.06857, 2017. [11] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS, 2014. [12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 9 [13] Minh Hoai and Fernando De la Torre. Max-margin early event detectors. International Journal of Computer Vision, 107(2):191–202, 2014. [14] Herbert Jaeger. Tutorial on training recurrent neural networks, covering BPPT, RTRL, EKF and the" echo state network" approach, volume 5. GMD-Forschungszentrum Informationstechnik, 2002. [15] Xiaojie Jin, Yunpeng Chen, Jiashi Feng, Zequn Jie, and Shuicheng Yan. Multi-path feedback recurrent neural network for scene parsing. In AAAI, 2017. [16] Xiaojie Jin, Xin Li, Huaxin Xiao, Xiaohui Shen, Zhe Lin, Jimei Yang, Yunpeng Chen, Jian Dong, Luoqi Liu, Zequn Jie, et al. Video scene parsing with predictive feature learning. In ICCV, 2017. [17] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015. [18] William Lotter, Gabriel Kreiman, and David Cox. Unsupervised learning of visual structure using predictive generative networks. arXiv preprint arXiv:1511.06380, 2015. [19] Zelun Luo, Boya Peng, De-An Huang, Alexandre Alahi, and Li Fei-Fei. Unsupervised learning of long-term motion dynamics for videos. arXiv preprint arXiv:1701.01821, 2017. [20] Michael Mathieu, Camille Couprie, and Yann LeCun. Deep multi-scale video prediction beyond mean square error. arXiv preprint arXiv:1511.05440, 2015. [21] Rudolf Mester. Motion estimation revisited: an estimation-theoretic approach. In Image Analysis and Interpretation (SSIAI), 2014 IEEE Southwest Symposium on, pages 113–116. IEEE, 2014. [22] Natalia Neverova, Pauline Luc, Camille Couprie, Jakob Verbeek, and Yann LeCun. Predicting deeper into the future of semantic segmentation. arXiv preprint arXiv:1703.07684, 2017. [23] Deepak Pathak, Philipp Krahenbuhl, Jeff Donahue, Trevor Darrell, and Alexei A Efros. Context encoders: Feature learning by inpainting. In CVPR, 2016. [24] Viorica Patraucean, Ankur Handa, and Roberto Cipolla. Spatio-temporal video autoencoder with differentiable memory. arXiv preprint arXiv:1511.06309, 2015. [25] Jerome Revaud, Philippe Weinzaepfel, Zaid Harchaoui, and Cordelia Schmid. Epicflow: Edge-preserving interpolation of correspondences for optical flow. In CVPR, 2015. [26] Anirban Roy and Sinisa Todorovic. Scene labeling using beam search under mutex constraints. In CVPR, 2014. [27] Eder Santana and George Hotz. Learning a driving simulator. CoRR, abs/1608.01230, 2016. [28] Alexander G Schwing and Raquel Urtasun. Fully connected deep structured networks. arXiv preprint arXiv:1503.02351, 2015. [29] Laura Sevilla-Lara, Deqing Sun, Varun Jampani, and Michael J Black. Optical flow with semantic segmentation and localized layers. In CVPR, 2016. [30] Richard Socher, Cliff C Lin, Chris Manning, and Andrew Y Ng. Parsing natural scenes and natural language with recursive neural networks. In ICML, 2011. [31] Nitish Srivastava, Elman Mansimov, and Ruslan Salakhudinov. Unsupervised learning of video representations using lstms. In ICML, 2015. [32] Ruben Villegas, Jimei Yang, Seunghoon Hong, Xunyu Lin, and Honglak Lee. Decomposing motion and content for natural video sequence prediction. In ICLR, 2017. [33] Ruben Villegas, Jimei Yang, Yuliang Zou, Sungryull Sohn, Xunyu Lin, and Honglak Lee. Learning to generate long-term future via hierarchical prediction. In ICML, 2017. [34] Carl Vondrick, Hamed Pirsiavash, and Antonio Torralba. Generating videos with scene dynamics. In NIPS, 2016. [35] Jacob Walker, Abhinav Gupta, and Martial Hebert. Patch to the future: Unsupervised visual prediction. In CVPR, 2014. [36] Jacob Walker, Abhinav Gupta, and Martial Hebert. Dense optical flow prediction from a static image. In ICCV, 2015. [37] Jenny Yuen and Antonio Torralba. A data-driven approach for event prediction. In ECCV, 2010. 10 | 2017 | 301 |
6,788 | A Screening Rule for ℓ1-Regularized Ising Model Estimation Zhaobin Kuang1, Sinong Geng2, David Page3 University of Wisconsin zkuang@wisc.edu1, sgeng2@wisc.edu2, page@biostat.wisc.edu3 Abstract We discover a screening rule for ℓ1-regularized Ising model estimation. The simple closed-form screening rule is a necessary and sufficient condition for exactly recovering the blockwise structure of a solution under any given regularization parameters. With enough sparsity, the screening rule can be combined with various optimization procedures to deliver solutions efficiently in practice. The screening rule is especially suitable for large-scale exploratory data analysis, where the number of variables in the dataset can be thousands while we are only interested in the relationship among a handful of variables within moderate-size clusters for interpretability. Experimental results on various datasets demonstrate the efficiency and insights gained from the introduction of the screening rule. 1 Introduction While the field of statistical learning with sparsity [Hastie et al., 2015] has been steadily rising to prominence ever since the introduction of the lasso (least absolute shrinkage and selection operator) at the end of the last century [Tibshirani, 1996], it was not until the recent decade that various screening rules debuted to further equip the ever-evolving optimization arsenals for some of the most fundamental problems in sparse learning such as ℓ1-regularized generalized linear models (GLMs, Friedman et al. 2010) and inverse covariance matrix estimation [Friedman et al., 2008]. Screening rules, usually in the form of an analytic formula or an optimization procedure that is extremely fast to solve, can accelerate learning drastically by leveraging the inherent sparsity of many high-dimensional problems. Generally speaking, screening rules can identify a significant portion of the zero components of an optimal solution beforehand at the cost of minimal computational overhead, and hence substantially reduce the dimension of the parameterization, which makes possible efficient computation for large-scale sparse learning problems. Pioneered by Ghaoui et al. 2010, various screening rules have emerged to speed up learning for generative models (e.g. Gaussian graphical models) as well as for discriminative models (e.g. GLMs), and for continuous variables (e.g. lasso) as well as for discrete variables (e.g. logistic regression, support vector machines). Table 1 summarizes some of the iconic work in the literature, where, to the best of our knowledge, screening rules for generative models with discrete variables are still notably absent. Contrasted with this notable absence is the ever stronger craving in the big data era for scaling up the learning of generative models with discrete variables, especially in a blockwise structure identification setting. For example, in gene mutation analysis [Wan et al., 2015, 2016], among tens of thousands of sparse binary variables representing mutations of genes, we are interested in identifying a handful of mutated genes that are connected into various blocks and exert synergistic effects on the cancer. While a sparse Ising model is a desirable choice, for such an application the scalability of the model could fail due to the innate NP-hardness [Karger and Srebro, 2001] of inference, and hence maximum likelihood learning, owing to the partition function. To date, even with modern 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Table 1: Screening rules in the literature at a glance Discriminative Models Generative Models Continuous Variables Ghaoui et al. 2010, Tibshirani et al. 2012 Liu et al. 2013, Wang et al. 2013, Fercoq et al. 2015, Xiang et al. 2016, Lee et al. 2017 Banerjee et al. 2008 Honorio and Samaras 2010 Witten et al. 2011,Mazumder and Hastie 2012 Danaher et al. 2014, Luo et al. 2014 Yang et al. 2015 Discrete Variables Ghaoui et al. 2010, Tibshirani et al. 2012 Wang et al. 2014, Ndiaye et al. 2015 ? approximation techniques, a typical application with sparse discrete graphical models usually involves only hundreds of variables [Viallon et al., 2014, Barber et al., 2015, Vuffray et al., 2016]. Between the need for the scalability of high-dimensional Ising models and the absence of screening rules that are deemed crucial to accelerated and scalable learning, we have a technical gap to bridge: can we identify screening rules that can speed up the learning of ℓ1-regularized Ising models? The major contribution of this paper is to give an affirmative answer to this question. Specifically, we show the following. • The screening rule is a simple closed-form formula that is a necessary and sufficient condition for exact blockwise structure recovery of the solution with a given regularization parameter. Upon the identification of blockwise structures, different blocks of variables can be considered as different Ising models and can be solved separately. The various blocks can even be solved in parallel to attain further efficiency. Empirical results on both simulated and real-world datasets demonstrate the tremendous efficiency, scalability, and insights gained from the introduction of the screening rule. Efficient learning of ℓ1-regularized Ising models from thousands of variables on a single machine is hence readily attainable. • As an initial attempt to fill in the vacancy illustrated in Table 1, our work is instructive to further exploration of screening rules for other graphical models with discrete random variables, and to combining screening rules with various optimization methods to facilitate better learning. Furthermore, compared with its Gaussian counterpart, where screening rules are available (Table 1) and learning is scalable [Hsieh et al., 2013], the proposed screening rule is especially valuable and desperately needed to address the more challenging learning problem of sparse Ising models. We defer all the proofs in the paper to the supplement and focus on providing intuition and interpretation of the technical results in the paper. 2 Notation and Background 2.1 Ising Models Let X = [X1, X2, · · · , Xp]⊤be a p × 1 binary random vector, with Xi ∈{−1, 1}, and i ∈ {1, 2, · · · , p} ≜V . Let there be a dataset X with n independent and identically distributed samples of X, denoted as X = x(1), x(2), · · · , x(n) . Here, x(k) is a p×1 vector of assignments that realizes X, where k ∈{1, 2, · · · , n}. We further use x(k) i to denote the ith component of the kth sample in the dataset. Let θ ∈Θ be a p × p symmetric matrix whose diagonal entries are zeros. An Ising model [Wan et al., 2016] with the parameterization θ is: Pθ(x) = 1 Z(θ) exp p−1 X i=1 p X j>i θijxixj , (1) where θij represents the component of θ at the ith row and the jth column, and xi and xj represent the ith and the jth components of x, respectively. Z(θ) is a normalization constant, partition function, that ensures the probabilities sum up to one. The partition function is given as Z(θ) = P x∈{−1,1}p exp Pp−1 i=1 Pp j>i θijxixj . Note that for ease of presentation, we consider Ising models with only pairwise interaction/potential here. Generalization to Ising models with unary potentials is given in Section 6. 2 2.2 Graphical Interpretation With the notion of the probability given by an Ising model in (1), estimating an ℓ1-regularized Ising model is defined as finding ˆθ, the penalized maximum likelihood estimator (MLE) under the lasso penalty: ˆθ = arg max θ 1 n n X k=1 log Pθ x(k) −λ 2 ∥θ∥1 = arg min θ −1 n n X k=1 p−1 X i=1 p X j>i θijx(k) i x(k) j + A(θ) + λ 2 ∥θ∥1. (2) Here, A(θ) = log Z(θ) is the log-partition function; ∥θ∥1 = Pp i=1 Pp j=1|θij| is the lasso penalty that encourages a sparse parameterization. λ ≥0 is a given regularization parameter. Using λ 2 is suggestive of the symmetry of θ so that λ 2 ∥θ∥1 = λ Pp−1 i=1 Pp j>i|θij|, which echoes the summations in the negative log-likelihood function. Note that θ corresponds to the adjacency matrix constructed by the p components of X as nodes, and θij ̸= 0 indicates that there is an edge between Xi and Xj. We further denote a partition of V into L blocks as {C1, C2, · · · , CL}, where Cl, Cl′ ⊆V , Cl ∩Cl′ = ∅, SL l=1 Cl = V , l ̸= l′, and for all l, l′ ∈{1, 2, · · · , L}. Without loss of generality, we assume that the nodes in different blocks are ordered such that if i ∈Cl, j ∈Cl′, and l < l′, then i < j. 2.3 Blockwise Solutions We introduce the definition of a blockwise parameterization: Definition 1. We call θ blockwise with respect to the partition {C1, C2, · · · , CL} if ∀l and l′ ∈ {1, 2, · · · , L}, where l ̸= l′, and ∀i ∈Cl, ∀j ∈Cl′, we have θij = 0. When θ is blockwise, we can represent θ in a block diagonal fashion: θ = diag (θ1, θ2, · · · , θL) , (3) where θ1, θ2, · · · , and θL are symmetric matrices that correspond to C1, C2, · · · , and CL, respectively. Note that if we can identify the blockwise structure of ˆθ in advance, we can solve each block independently (See A.1). Since the size of each block could be much smaller than the size of the original problem, each block could be much easier to learn compared with the original problem. Therefore, efficient identification of blockwise structure could lead to substantial speedup in learning. 3 The Screening Rule 3.1 Main Results The preparation in Section 2 leads to the discovery of the following strikingly simple screening rule presented in Theorem 1. Theorem 1. Let a partition of V, {C1, C2, · · · , CL}, be given. Let the dataset X = x(1), x(2), · · · , x(n) be given. Define EXXiXj = 1 n Pn k=1 x(k) i x(k) j . A necessary and sufficient condition for ˆθ to be blockwise with respect to the given partition is that |EXXiXj| ≤λ, (4) for all l and l′ ∈{1, 2, · · · , L}, where l ̸= l′, and for all i ∈Cl, j ∈Cl′. In terms of exact blockwise structure identification, Theorem 1 provides a foolproof (necessary and sufficient) and yet easily checkable result by comparing the absolute second empirical moments |EXXiXj|’s with the regularization parameter λ. We also notice the remarkable similarity between the proposed screening rule and the screening rule for Gaussian graphical model blockwise structure identification in Witten et al. 2011, Mazumder and Hastie 2012. In the Gaussian case, the screening rule can be attained by simply replacing the second empirical moment matrix in (4) with the sample 3 Algorithm 1 Blockwise Minimization 1: Input: dataset X, regularization parameter λ. 2: Output: ˆθ. 3: ∀i, j ∈V such that j > i, compute the second empirical moments EXXiXj’s . 4: Identify the partition {C1, C2, · · · , CL} using the second empirical moments from the previous step and according to Witten et al. [2011], Mazumder and Hastie [2012]. 5: ∀l ∈L, perform blockwise optimization over Cl for ˆθl. 6: Ensemble ˆθl’s according to (3) for ˆθ. 7: Return ˆθ. covariance matrix. While the exact solution in the Gaussian case can be computed in polynomial time, estimating an Ising model via maximum likelihood in general is NP-hard . However, as a consequence of applying the screening rule, the blockwise structure of an ℓ1-regularized Ising model can be determined as easily as the blockwise structure of a Gaussian graphical model, despite the fact that within each block, exact learning of a sparse Ising model could still be challenging. Furthermore, the screening rule also provides us a principal approach to leverage sparsity for the gain of efficiency: by increasing λ, the nodes of the Ising model will be shattered into smaller and smaller blocks, according to the screening rule. Solving many Ising models with small blocks of variables is amenable to both estimation algorithm and parallelism. 3.2 Regularization Parameters The screening rule also leads to a significant implication to the range of regularization parameters in which ˆθ ̸= 0. Specifically, we have the following theorem. Theorem 2. Let the dataset X = x(1), x(2), · · · , x(n) be given, and let λ = λmax represent the smallest regularization parameter such that ˆθ = 0 in (2). Then λmax = maxi,j∈V,i̸=j|EXXiXj| ≤1. With λmax, one can decide the range of regularization parameters, [0, λmax], that generates graphs with nonempty edge sets, which is an important first step for pathwise optimization algorithms (a.k.a. homotopy algorithms) that learn the solutions to the problem under a range of λ’s. Furthermore, the fact that λmax ≤1 for any given dataset X suggests that comparison across different networks generated by different datasets is comprehensible. Finally, in Section 4, λmax will also help to establish the connection between the screening rule for exact learning and some of the popular inexact (alternative) learning algorithms in the literature. 3.3 Fully Disconnected Nodes Another consequence of the screening rule is the necessary and sufficient condition that determines the regularization parameter with which a node is fully disconnected from the remaining nodes: Corollary 1. Let the dataset X = x(1), x(2), · · · , x(n) be given. Xi is fully disconnected from the remaining nodes in ˆθ, where i ∈V (i.e., ˆθij = ˆθji = 0, ∀j ∈V \ {i}), if and only if λ ≥maxj∈V \{i}|EXXiXj|. In high-dimensional exploratory data analysis, it is usually the case that most of the variables are fully disconnected [Danaher et al., 2014, Wan et al., 2016]. In this scenario, Corollary 1 provides a regularization parameter threshold with which we can identify exactly the subset of fully disconnected nodes. Since we can choose a threshold large enough to make any nodes fully disconnected, we can discard a significant portion of the variables efficiently and flexibly at will with exact optimization guarantees due to Corollary 1. By discarding the large portion of fully disconnected variables, the learning algorithm can focus on only a moderate number of connected variables, which potentially results in a substantial efficiency gain. 3.4 Blockwise Minimization We conclude this section by providing the blockwise minimization algorithm in Algorithm 1 due to the screening rule. Note that both the second empirical moments and the partition of V in the 4 algorithm can be computed in O(p2) operations [Witten et al., 2011, Mazumder and Hastie, 2012]. On the contrary, the complexity of the exact optimization of a block of variables grows exponentially with respect to the maximal clique size of that block. Therefore, by encouraging enough sparsity, the blockwise minimization due to the screening rule can provide remarkable speedup by not only shrinking the size of the blocks in general but also potentially reducing the size of cliques within each block via eliminating enough edges. 4 Applications to Inexact (Alternative) Methods We now discuss the interplay between the screening rule and two popular inexact (alternative) estimation methods: node-wise (NW) logistic regression [Wainwright et al., 2006, Ravikumar et al., 2010] and the pseudolikelihood (PL) method [Höfling and Tibshirani, 2009]. In what follows, we use ˆθNW and ˆθPL to denote the solutions given by the node-wise logistic regression method and the pseudolikelihood method, respectively. NW can be considered as an asymmetric pseudolikelihood method (i.e., ∃i,j ∈V such that i ̸= j and ˆθNW ij ̸= ˆθNW ji ), while PL is a pseudolikelihood method that is similar to NW but imposes additional symmetric constraints on the parameterization (i.e., ∀i,j ∈V where i ̸= j, we have ˆθPL ij = ˆθPL ji ). Our incorporation of the screening rule to the inexact methods is straightforward: after using the screening rule to identify different blocks in the solution, we use inexact methods to solve each block for the solution. As shown in Section 3, when combined with exact optimization, the screening rule is foolproof for blockwise structure identification. However, in general, when combined with inexact methods, the proposed screening rule is not foolproof any more because the screening rule is derived from the exact problem in (2) instead of the approximate problems such as NW and PL. We provide a toy example in A.6 to illustrate mistakes made by the screening rule when combined with inexact methods. Nonetheless, as we will show in this section, NW and PL are deeply connected to the screening rule, and when given a large enough regularization parameter, the application of the screening rule to NW and PL can be lossless in practice (see Section 5). Therefore, when applied to NW and PL, the proposed screening rule can be considered as a strong rule (i.e., a rule that is not foolproof but barely makes mistakes) and an optimal solution can be safeguarded by adjusting the screened solution to optimality based on the KKT conditions of the inexact problem [Tibshirani et al., 2012]. 4.1 Node-wise (NW) Logistic Regression and the Pseudolikelihood (PL) Method In NW, for each i ∈V , we consider the conditional probability of Xi upon X\i, where X\i = {Xt | t ∈V \ {i}}. This is equivalent to solving p ℓ1-regularized logistic regression problems separately, i.e., ∀i ∈V : ˆθNW \i = arg min θ\i 1 n n X k=1 h −y(k) i η(k) \i + log 1 + exp η(k) \i i + λ
θ\i
1 , (5) where η(k) \i = θ⊤ \i(2x(k) \i ), y(k) i = 1 represents a successful event x(k) i = 1, y(k) i = 0 represents an unsuccessful event x(k) i = −1, and θ\i = θi1 θi2 · · · θi(i−1) θi(i+1) · · · θip ⊤, x(k) \i = h x(k) i1 x(k) i2 · · · x(k) i(i−1) x(k) i(i+1) · · · x(k) ip i⊤ . Note that ˆθNW constructed from ˆθNW \i ’s is asymmetric, and ad hoc post processing techniques are used to generate a symmetric estimation such as setting each pair of elements from ˆθNW in symmetric positions to the one with a larger (or smaller) absolute value. On the other hand, PL can be considered as solving all p ℓ1-regularized logistic regression problems in (5) jointly with symmetric constraints over the parameterization [Geng et al., 2017]: ˆθPL = arg min θ∈Θ 1 n n X k=1 p X i=1 h −y(k) i ξ(k) i + log 1 + exp ξ(k) i i + λ 2 ∥θ∥1 , (6) 5 where ξ(k) i = P j∈V \{i} 2θmin{i,j},max{i,j}x(k) j .That is to say, if i < j, then θmin{i,j},max{i,j} = θij; if i > j, then θmin{i,j},max{i,j} = θji. Recall that Θ in (6) defined in Section 2.1 represents a space of symmetric matrices whose diagonal entries are zeros. 4.2 Regularization Parameters in NW and PL Since the blockwise structure of a solution is given by the screening rule under a fixed regularization parameter, the ranges of regularization parameters under which NW and PL can return nonzero solutions need to be linked to the range [0, λmax] in the exact problem. Theorem 3 and Theorem 4 establish such relationships for NW and PL, respectively. Theorem 3. Let the dataset X = x(1), x(2), · · · , x(n) be given, and let λ = λNW max represent the smallest regularization parameter such that ˆθNW \i = 0 in (5), ∀i ∈V . Then λNW max = λmax. Theorem 4. Let the dataset X = x(1), x(2), · · · , x(n) be given, and let λ = λPL max represent the smallest regularization parameter such that ˆθPL = 0 in (6), then λPL max = 2λmax. Let λ be the regularization parameter used in the exact problem. A strategy is to set the corresponding λNW = λ when using NW and λPL = 2λ when using PL, based on the range of regularization parameters given in Theorem 3 and Theorem 4 for NW and PL. Since the magnitude of the regularization parameter is suggestive of the magnitude of the gradient of the unregulated objective, the proposed strategy leverages that the magnitudes of the gradients of the unregulated objectives for NW and PL are roughly the same as, and roughly twice as large as, that of the unregulated exact objective, respectively. This observation has been made in the literature of binary pairwise Markov networks [Höfling and Tibshirani, 2009, Viallon et al., 2014]. Here, by Theorem 3 and Theorem 4, we demonstrate that this relationship is exactly true if the optimal parameterization is zero. Höfling and Tibshirani 2009 even further exploits this observation in PL for exact optimization. Their procedure can be viewed as iteratively solving adjusted PL problems regularized by λPL = 2λ in order to obtain an exact solution regularized by λ. The close quantitative correspondence between the derivatives of the inexact objectives and that of the exact objective also provides insights into why combing the screening rule with inexact methods does not lose much in practice. 4.3 Preservation for Fully Disconnectedness While the screening rule is not foolproof when combined with NW and PL, it turns out that in terms of identifying fully disconnected nodes, the necessary and sufficient condition in Corollary 1 can be preserved when applying NW with caution, as shown in the following. Theorem 5. Let the dataset X = x(1), x(2), · · · , x(n) be given. Let ˆθNW min ∈Θ denote a symmetric matrix derived from ˆθNW by setting each pair of elements from ˆθNW in symmetric positions to the one with a smaller absolute value. A sufficient condition for Xi to be fully disconnected from the remaining nodes in ˆθNW min, where i ∈V , is that λNW ≥maxj∈V \{i}|EXXiXj|. Furthermore, when ˆθNW \i = 0, the sufficient condition is also necessary. In practice, the utility of Theorem 5 is to provide us a lower bound for λ above which we can fully disconnect Xi (sufficiency). Moreover, if ˆθNW \i = 0 also happens to be true, which is easily verifiable, we can conclude that such a lower bound is tight (necessity). 5 Experiments Experiments are conducted on both synthetic data and real world data. We will focus on efficiency in Section 5.1 and discuss support recovery performance in Section 5.2. We consider three synthetic networks (Table 2) with 20, 35, and 50 blocks of 20-node, 35-node, and 50-node subnetworks, respectively. To demonstrate the estimation of networks with unbalanced-size subnetworks, we also consider a 46-block network with power law degree distributed subnetworks of sizes ranging from 5 to 50. Within each network, the subnetwork is generated according to a power law degree distribution, which mimics the structure of a biological network and is believed to be more challenging to recover 6 50 100 400 800 1200 1600 Sample Size Runtime (s) Methods PL NW PL+screen NW+screen (a) Network 1 0 250 500 750 1000 400 800 1200 1600 Sample Size Runtime (s) Methods PL NW PL+screen NW+screen (b) Network 2 250 500 750 1000 1250 400 800 1200 1600 Sample Size Runtime (s) Methods NW PL+screen NW+screen (c) Network 3 0 500 1000 1500 400 800 1200 1600 Sample Size Runtime (s) Methods PL NW PL+screen NW+screen (d) Network 4 Figure 1: Runtime of pathwise optimization on networks in Table 2. Runtime plotted is the median runtime over five trials. The experiments of the baseline method PL without screening can not be fully conducted on larger networks due to high memory cost. NW: Node-wise logistic regression without screening; NW+screen: Node-wise logistic regression with screening; PL: Pseudolikelihood without screening; PL+screen: Pseudolikelihood with screening. compared with other less complicated structures [Chen and Sharp, 2004, Peng et al., 2009, Danaher et al., 2014]. Each edge of each network is associated with a weight first sampled from a standard normal distribution, and then increased or decreased by 0.2 to further deviate from zero. For each network, 1600 samples are generated via Gibbs sampling within each subnetwork. Experiments on exact optimization are reported in B.2. 5.1 Pathwise Optimization Pathwise optimization aims to compute solutions over a range of different λ’s. Formally, we denote the set of λ’s used in (2) as Λ = {λ1, λ2, · · · , λτ}, and without loss of generality, we assume that λ1 < λ2 < · · · < λτ. The introduction of the screening rule provides us insightful heuristics for the determination of Λ. We start by choosing a λ1 that reflects the sparse blockwise structural assumption on the data. To achieve sparsity and avoid densely connected structures, we assume that the number of edges in the ground truth network is O(p). This assumption coincides with networks generated according to a power law degree distribution and hence is a faithful representation of the prior knowledge stemming from many biological problems. As a heuristic, we relax and apply the screening rule in (4) on each of the p 2 second empirical moments and choose λ1 such that the number of the absolute second empirical moments that are greater than λ1 is about p log p. Given a λ1 chosen this way, one can check how many blocks ˆθ(λ1) has by the screening rule. To encourage blockwise structures, we magnify λ1 via λ1 ←1.05λ1 until the current ˆθ(λ1) has more than one block. We then choose λτ such that the number of absolute second empirical moments that are greater than λτ is about p. In our experiments, we use an evenly spaced Λ with τ = 25. To estimate the networks in Table 2, we implement both NW and PL with and without screening using glmnet [Friedman et al., 2010] in R as a building block for logistic regression according to Ravikumar et al. 2010 and Geng et al. 2017. To generate a symmetric parameterization for NW, we set each pair of elements from θNW in symmetric positions to the element with a larger absolute value. Given Λ, we screen only at λ1 to identify various blocks. Each block is then solved separately in a pathwise fashion under Λ without further screening. The rationale of performing only one screening is that starting from a λ1 chosen in the aforementioned way has provided us a sparse blockwise structure that sets a significant portion of the parameterization to zeros; further screening over larger λ’s hence does not necessarily offer more efficiency gain. Figure 1 summarizes the runtime of pathwise optimization on the four synthetic networks in Table 2. The experiments are conducted on a PowerEdge R720 server with two Intel(R) Xeon(R) E5-2620 CPUs and 128GB RAM. As many as 24 threads can be run in parallel. For robustness, each runtime reported is the median runtime over five trials. When the sample size is less than 1600, each trial uses a subset of samples (subsamples) that are randomly drawn from the original datasets without replacement. As illustrated in Figure 1, the efficiency gain due to the screening rule is self-evident. Both NW and PL benefit substantially from the application of the screening rule. The speedup is more apparent with the increase of sample size as well as the increase of the dimension of the data. In our experiments, we observe that even with arguably the state-of-the-art implementation [Geng et al., 7 indx #blk #nd/blk TL#nd 1 20 20 400 2 35 35 1225 3 50 50 2500 4 46 5-50 1265 Table 2: Summary of the four synthetic networks used in the experiments. indx represents the index of each network. #blk represents the number of blocks each network has. #nd/blk represents the number of nodes each block has. TL#nd represents the total number of nodes each network has. 0.00 0.25 0.50 0.75 1.00 1 2 3 4 Network Index AUC Methods PL NW PL+screen NW+screen Mix (a) Edge recovery AUC 0 300 600 900 1 2 3 4 Network Index Runtime (s) Methods PL NW PL+screen NW+screen Mix (b) Model selection runtime Figure 2: Model selection performance. Mix: provide PL +screen with the regularization parameter chosen by the model selection of NW+screen. Other legend labels are the same as in Figure 1. 2017], PL without screening still has a significantly larger memory footprint compared with that of NW. Therefore, the experiments for PL without screening are not fully conducted in Figure 1b,1c, and 1d for networks with thousands of nodes. On the contrary, PL with the screening rule has a comparable memory footprint with that of NW. Furthermore, as shown in Figure 1, after applying the screening rule, PL also has a similar runtime with NW. This phenomenon demonstrates the utility of the screening rule for effectively reducing the memory footprint of PL, making PL readily available for large-scale problems. 5.2 Model Selection Our next experiment performs model selection by choosing an appropriate λ from the regularization parameter set Λ. We leverage the Stability Approach to Regularization Selection (StARS, Liu et al. 2010) for this task. In a nutshell, StARS learns a set of various models, denoted as M, over Λ using many subsamples that are drawn randomly from the original dataset without replacement. It then picks a λ∗∈Λ that strikes the best balance between network sparsity and edge selection stability among the models in M. After the determination of λ∗, it is used on the entire original dataset to learn a model with which we compare the ground truth model and calculate its support recovery Area Under Curve (AUC). Implementation details of model selection are provided in B.1. In Figure 2, we summarize the experimental results of model selection, where 24 subsamples are used for pathwise optimization in parallel to construct M. In Figure 2a, NW with and without screening achieve the same high AUC values over all four networks, while the application of the screening rule to NW provides roughly a 2x speedup, according to Figure 2b. The same AUC value shared by the two variants of NW is due to the same λ∗chosen by the model selection procedure. Even more importantly, it is also because that under the same λ∗, the screening rule is able to perfectly identify the blockwise structure of the parameterization. Due to high memory cost, the model selection for PL without screening (green bars in Figure 2) is omitted in some networks. To control the memory footprint, the model selection for PL with screening (golden bars in Figure 2) also needs to be carried out meticulously by avoiding small λ’s in Λ that correspond to dense structures in M during estimation from subsamples. While avoiding dense structures makes PL with screening the fastest among all (Figure 2b), it comes at the cost of delivering the least accurate (though still reasonably effective) support recovery performance (Figure 2a). To improve the accuracy of this approach, we also leverage the connection between NW and PL by substituting 2λ∗ NW for the resultant regularization parameter from model selection of PL, where λ∗ NW is the regularization parameter selected for NW. This strategy results in better performance in support recovery (purple bars in Figure 2a). 5.3 Real World Data Our real world data experiment applies NW with and without screening to a real world gene mutation dataset collected from 178 lung squamous cell carcinoma samples [Weinstein et al., 2013]. Each sample contains 13,665 binary variables representing the mutation statuses of various genes. For ease 8 FN1 ALPK2 UNC13C KIAA1109 STAB2 PLXNA4 C20orf26 MYH1 UNC5D ZNF676 SYNE2 FAT1 VPS13B RIMS2 COL6A6 SCN1A TPR ROS1 MAGEC1 THSD7B CNTNAP2 ANKRD30A WDR17 VCAN BAI3 COL12A1 TMEM132D PDE4DIP PTPRT FBN2 CDH9 MYH4 DYNC1H1 ZNF804A HRNR ELTD1 NRXN1 ASTN2 ADAMTS20 USP34 Figure 3: Connected components learned from lung squamous cell carcinoma mutation data. Genes in red are (lung) cancer and other disease related genes [Uhlén et al., 2015]. Mutation data are extracted via the TCGA2STAT package [Wan et al., 2015] in R and the figure is rendered by Cytoscape. of interpretation, we keep genes whose mutation rates are at least 10% across all samples, yielding a subset of 145 genes in total. We use the model selection procedure introduced in Section 5.2 to determine a λ∗ NW with which we learn the gene mutation network whose connected components are shown in Figure 3. For model selection, other than the configuration in B.1, we choose τ = 25. 384 trials are run in parallel using all 24 threads. We also choose λ1 such that about 2p log(p) absolute second empirical moments are greater than λ1. We choose λτ such that about 0.25p absolute second empirical moments are greater than λτ. In our experiment, NW with and without screening select the same λ∗ NW, and generate the same network. Since the dataset in question has a lower dimension and a smaller sample size compared with the synthetic data, NW without screening is adequately efficient. Nonetheless, with screening NW is still roughly 20% faster. This phenomenon once again indicates that in practice the screening rule can perfectly identify the blockwise sparsity pattern in the parameterization and deliver a significant efficiency gain. The genes in red in Figure 3 represent (lung) cancer and other disease related genes, which are scattered across the seven subnetworks discovered by the algorithm. In our experiment, we also notice that all the weights on the edges are positive. This is consistent with the biological belief that associated genes tend to mutate together to cause cancer. 6 Generalization With unary potentials, the ℓ1-regularized MLE for the Ising model is defined as: ˆθ = arg min θ −1 n n X k=1 p X i=1 θiix(k) i + p−1 X i=1 p X j>i θijx(k) i x(k) j + A(θ) + λ 2 ∥θ∥1,off, (7) where ∥θ∥1,off = Pp i=1 Pp j̸=i|θij|. Note that the unary potentials are not penalized, which is a common practice [Wainwright et al., 2006, Höfling and Tibshirani, 2009, Ravikumar et al., 2010, Viallon et al., 2014] to ensure a hierarchical parameterization. The screening rule here is to replace (4) in Theorem 3 with: |EXXiXj −EXXiEXXj| ≤λ. (8) Exhaustive justification, interpretation, and experiments are provided in Supplement C. 7 Conclusion We have proposed a screening rule for ℓ1-regularized Ising model estimation. The simple closed-form screening rule is a necessary and sufficient condition for exact blockwise structural identification. Experimental results suggest that the proposed screening rule can provide drastic speedups for learning when combined with various optimization algorithms. Future directions include deriving screening rules for more general undirected graphical models [Liu et al., 2012, 2014b,a, Liu, 2014, Liu et al., 2016], and deriving screening rules for other inexact optimization algorithms [Liu and Page, 2013]. Further theoretical justifications regarding the conditions upon which the screening rule can be combined with inexact algorithms to recover block structures losslessly are also desirable. Acknowledgment: The authors would like to gratefully acknowledge the NIH BD2K Initiative grant U54 AI117924 and the NIGMS grant 2RO1 GM097618. 9 References O. Banerjee, L. E. Ghaoui, and A. d’Aspremont. Model selection through sparse maximum likelihood estimation for multivariate gaussian or binary data. Journal of Machine Learning Research, 9 (Mar):485–516, 2008. R. F. Barber, M. Drton, et al. High-dimensional ising model selection with bayesian information criteria. Electronic Journal of Statistics, 9(1):567–607, 2015. H. Chen and B. M. Sharp. Content-rich biological network constructed by mining pubmed abstracts. BMC Bioinformatics, 5(1):147, 2004. P. Danaher, P. Wang, and D. M. Witten. The joint graphical lasso for inverse covariance estimation across multiple classes. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 76(2):373–397, 2014. O. Fercoq, A. Gramfort, and J. Salmon. Mind the duality gap: safer rules for the lasso. In Proceedings of The 32nd International Conference on Machine Learning, pages 333–342, 2015. J. Friedman, T. Hastie, and R. Tibshirani. Sparse inverse covariance estimation with the graphical lasso. Biostatistics, 9(3):432–441, 2008. J. Friedman, T. Hastie, and R. Tibshirani. Regularization paths for generalized linear models via coordinate descent. Journal of Statistical Software, 33(1):1, 2010. S. Geng, Z. Kuang, and D. Page. An efficient pseudo-likelihood method for sparse binary pairwise Markov network estimation. arXiv Preprint, 2017. L. E. Ghaoui, V. Viallon, and T. Rabbani. Safe feature elimination for the lasso and sparse supervised learning problems. arXiv Preprint, 2010. T. Hastie, R. Tibshirani, and M. Wainwright. Statistical learning with sparsity: the lasso and generalizations. CRC Press, 2015. H. Höfling and R. Tibshirani. Estimation of sparse binary pairwise Markov networks using pseudolikelihoods. Journal of Machine Learning Research, 10(Apr):883–906, 2009. J. Honorio and D. Samaras. Multi-task learning of gaussian graphical models. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), pages 447–454, 2010. C.-J. Hsieh, M. A. Sustik, I. S. Dhillon, P. K. Ravikumar, and R. Poldrack. Big & quic: Sparse inverse covariance estimation for a million variables. In Advances in Neural Information Processing Systems, pages 3165–3173, 2013. D. Karger and N. Srebro. Learning Markov networks: Maximum bounded tree-width graphs. In Proceedings of the Twelfth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 392–401. Society for Industrial and Applied Mathematics, 2001. D. Koller and N. Friedman. Probabilistic graphical models: principles and techniques. MIT press, 2009. S. Lee, N. Gornitz, E. P. Xing, D. Heckerman, and C. Lippert. Ensembles of lasso screening rules. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017. H. Liu, K. Roeder, and L. Wasserman. Stability approach to regularization selection (stars) for high dimensional graphical models. In Advances in Neural Information Processing Systems, pages 1432–1440, 2010. J. Liu. Statistical Methods for Genome-wide Association Studies and Personalized Medicine. PhD thesis, The University of Wisconsin-Madison, 2014. J. Liu and D. Page. Structure learning of undirected graphical models with contrastive divergence. ICML 2013 Workshop on Structured Learning: Inferring Graphs from Structured and Unstructured Inputs, 2013. 10 J. Liu, P. Peissig, C. Zhang, E. Burnside, C. McCarty, and D. Page. Graphical-model based multiple testing under dependence, with applications to genome-wide association studies. In Uncertainty in Artificial Intelligence, volume 2012, page 511. NIH Public Access, 2012. J. Liu, Z. Zhao, J. Wang, and J. Ye. Safe screening with variational inequalities and its application to lasso. arXiv Preprint arXiv:1307.7577, 2013. J. Liu, C. Zhang, E. Burnside, and D. Page. Learning heterogeneous hidden Markov random fields. In Artificial Intelligence and Statistics, pages 576–584, 2014a. J. Liu, C. Zhang, E. Burnside, and D. Page. Multiple testing under dependence via semiparametric graphical models. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 955–963, 2014b. J. Liu, C. Zhang, D. Page, et al. Multiple testing under dependence via graphical models. The Annals of Applied Statistics, 10(3):1699–1724, 2016. P.-L. Loh, M. J. Wainwright, et al. Structure estimation for discrete graphical models: Generalized covariance matrices and their inverses. In Advances in Neural Information Processing Systems, pages 2096–2104, 2012. P.-L. Loh, M. J. Wainwright, et al. Structure estimation for discrete graphical models: Generalized covariance matrices and their inverses. The Annals of Statistics, 41(6):3022–3049, 2013. S. Luo, R. Song, and D. Witten. Sure screening for gaussian graphical models. arXiv Preprint arXiv:1407.7819, 2014. R. Mazumder and T. Hastie. Exact covariance thresholding into connected components for large-scale graphical lasso. Journal of Machine Learning Research, 13(Mar):781–794, 2012. E. Ndiaye, O. Fercoq, A. Gramfort, and J. Salmon. Gap safe screening rules for sparse multi-task and multi-class models. In Advances in Neural Information Processing Systems, pages 811–819, 2015. J. Pena and R. Tibshirani. Lecture notes in machine learning 10-725/statistics 36-725-convex optimization (fall 2016), 2016. J. Peng, P. Wang, N. Zhou, and J. Zhu. Partial correlation estimation by joint sparse regression models. Journal of the American Statistical Association, 104(486):735–746, 2009. P. Ravikumar, M. J. Wainwright, J. D. Lafferty, et al. High-dimensional ising model selection using l1-regularized logistic regression. The Annals of Statistics, 38(3):1287–1319, 2010. R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society. Series B (Methodological), pages 267–288, 1996. R. Tibshirani, J. Bien, J. Friedman, T. Hastie, N. Simon, J. Taylor, and R. J. Tibshirani. Strong rules for discarding predictors in lasso-type problems. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 74(2):245–266, 2012. M. Uhlén, L. Fagerberg, B. M. Hallström, C. Lindskog, P. Oksvold, A. Mardinoglu, Å. Sivertsson, C. Kampf, E. Sjöstedt, A. Asplund, et al. Tissue-based map of the human proteome. Science, 347 (6220):1260419, 2015. V. Viallon, O. Banerjee, E. Jougla, G. Rey, and J. Coste. Empirical comparison study of approximate methods for structure selection in binary graphical models. Biometrical Journal, 56(2):307–331, 2014. M. Vuffray, S. Misra, A. Lokhov, and M. Chertkov. Interaction screening: Efficient and sampleoptimal learning of ising models. In Advances in Neural Information Processing Systems, pages 2595–2603, 2016. M. J. Wainwright, J. D. Lafferty, and P. K. Ravikumar. High-dimensional graphical model selection using l1-regularized logistic regression. In Advances in Neural Information Processing Systems, pages 1465–1472, 2006. 11 Y.-W. Wan, G. I. Allen, and Z. Liu. Tcga2stat: simple tcga data access for integrated statistical analysis in r. Bioinformatics, page btv677, 2015. Y.-W. Wan, G. I. Allen, Y. Baker, E. Yang, P. Ravikumar, M. Anderson, and Z. Liu. Xmrf: an r package to fit Markov networks to high-throughput genetics data. BMC Systems Biology, 10(3):69, 2016. J. Wang, J. Zhou, P. Wonka, and J. Ye. Lasso screening rules via dual polytope projection. In Advances in Neural Information Processing Systems, pages 1070–1078, 2013. J. Wang, J. Zhou, J. Liu, P. Wonka, and J. Ye. A safe screening rule for sparse logistic regression. In Advances in Neural Information Processing Systems, pages 1053–1061, 2014. J. N. Weinstein, E. A. Collisson, G. B. Mills, K. R. M. Shaw, B. A. Ozenberger, K. Ellrott, I. Shmulevich, C. Sander, J. M. Stuart, C. G. A. R. Network, et al. The cancer genome atlas pan-cancer analysis project. Nature Genetics, 45(10):1113–1120, 2013. D. M. Witten, J. H. Friedman, and N. Simon. New insights and faster computations for the graphical lasso. Journal of Computational and Graphical Statistics, 20(4):892–900, 2011. Z. J. Xiang, Y. Wang, and P. J. Ramadge. Screening tests for lasso problems. IEEE Transactions on Pattern Analysis and Machine Intelligence, PP(99):1–1, 2016. ISSN 0162-8828. doi: 10.1109/ TPAMI.2016.2568185. S. Yang, Z. Lu, X. Shen, P. Wonka, and J. Ye. Fused multiple graphical lasso. SIAM Journal on Optimization, 25(2):916–943, 2015. 12 | 2017 | 302 |
6,789 | A Minimax Optimal Algorithm for Crowdsourcing Thomas Bonald Telecom ParisTech thomas.bonald@telecom-paristech.fr Richard Combes Centrale-Supelec / L2S richard.combes@supelec.fr Abstract We consider the problem of accurately estimating the reliability of workers based on noisy labels they provide, which is a fundamental question in crowdsourcing. We propose a novel lower bound on the minimax estimation error which applies to any estimation procedure. We further propose Triangular Estimation (TE), an algorithm for estimating the reliability of workers. TE has low complexity, may be implemented in a streaming setting when labels are provided by workers in real time, and does not rely on an iterative procedure. We prove that TE is minimax optimal and matches our lower bound. We conclude by assessing the performance of TE and other state-of-the-art algorithms on both synthetic and real-world data. 1 Introduction The performance of many machine learning techniques, and in particular data classification, strongly depends on the quality of the labeled data used in the initial training phase. A common way to label new datasets is through crowdsourcing: many workers are asked to label data, typically texts or images, in exchange of some low payment. Of course, crowdsourcing is prone to errors due to the difficulty of some classification tasks, the low payment per task and the repetitive nature of the job. Some workers may even introduce errors on purpose. Thus it is essential to assign the same classification task to several workers and to learn the reliability of each worker through her past activity so as to minimize the overall error rate and to improve the quality of the labeled dataset. Learning the reliability of each worker is a tough problem because the true label of each task, the so-called ground truth, is unknown; it is precisely the objective of crowdsourcing to guess the true label. Thus the reliability of each worker must be inferred from the comparison of her labels on some set of tasks with those of other workers on the same set of tasks. In this paper, we consider binary labels and study the problem of estimating the workers reliability based on the answers they provide to tasks. We make two novel contributions to that problem: (i) We derive a lower bound on the minimax estimation error which applies to any estimator of the workers reliability. In doing so we identify "hard" instances of the problem, and show that the minimax error depends on two factors: the reliability of the three most informative workers and the mean reliability of all workers. (ii) We propose TE (Triangular Estimation), a novel algorithm for estimating the reliability of each worker based on the correlations between triplets of workers. We analyze the performance of TE and prove that it is minimax optimal in the sense that it matches the lower bound we previously derived. Unlike most prior work, we provide non-asymptotic performance guarantees which hold even for a finite number of workers and tasks. As our analysis reveals, non-asymptotic performance guarantees require to use finer concentration arguments than asymptotic ones. TE has low complexity in terms of memory space and computation time, does not require to store the whole data set in memory and can be easily applied in a setting in which answers to tasks arrive 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. sequentially, i.e., in a streaming setting. Finally, we compare the performance of TE to state-of-theart algorithms through numerical experiments using both synthetic and real datasets. 2 Related Work The first problems of data classification using independent workers appeared in the medical context, where each label refers to the state of a patient (e.g., sick or sane) and the workers are clinicians. [Dawid and Skene, 1979] proposed an expectation-maximization (EM) algorithm, admitting that the accuracy of the estimate was unknown. Several versions and extensions of this algorithm have since been proposed and tested in various settings [Hui and Walter, 1980, Smyth et al., 1995, Albert and Dodd, 2004, Raykar et al., 2010, Liu et al., 2012]. A number of Bayesian techniques have also been proposed and applied to this problem by [Raykar et al., 2010, Welinder and Perona, 2010, Karger et al., 2011, Liu et al., 2012, Karger et al., 2014, 2013] and references therein. Of particular interest is the belief-propagation (BP) algorithm of [Karger et al., 2011], which is provably order-optimal in terms of the number of workers required per task for any given target error rate, in the limit of an infinite number of tasks and an infinite population of workers. Another family of algorithms is based on the spectral analysis of some matrix representing the correlations between tasks or workers. [Ghosh et al., 2011] work on the task-task matrix whose entries correspond to the number of workers having labeled two tasks in the same manner, while [Dalvi et al., 2013] work on the worker-worker matrix whose entries correspond to the number of tasks labeled in the same manner by two workers. Both obtain performance guarantees by the perturbation analysis of the top eigenvector of the corresponding expected matrix. The BP algorithm of Karger, Oh and Shah is in fact closely related to these spectral algorithms: their message-passing scheme is very similar to the power-iteration method applied to the task-worker matrix, as observed in [Karger et al., 2011]. Two notable recent contributions are [Chao and Dengyong, 2015] and [Zhang et al., 2014]. The former provides performance guarantees for two versions of EM, and derives lower bounds on the attainable prediction error (the probability of estimating labels incorrectly). The latter provides lower bounds on the estimation error of the workers’ reliability as well as performance guarantees for an improved version of EM relying on spectral methods in the initialization phase. Our lower bound cannot be compared to that of [Chao and Dengyong, 2015] because it applies to the workers’ reliability and not the prediction error; and our lower bound is tighter than that of [Zhang et al., 2014]. Our estimator shares some features of the algorithm proposed by [Zhang et al., 2014] to initialize EM, which suggests that the EM phase itself is not essential to attain minimax optimality. All these algorithms require the storage of all labels in memory and, to the best of our knowledge, the only known streaming algorithm is the recursive EM algorithm of [Wang et al., 2013], for which no performance guarantees are available. The remainder of the paper is organized as follows. In section 3 we state the problem and introduce our notations. The important question of identifiability is addressed in section 4. In section 5 we present a lower bound on the minimax error rate of any estimator. In section 6 we present TE, discuss its compexity and prove that it is minimax optimal. In section 7 we present numerical experiments on synthetic and real-world data sets and section 8 concludes the paper. Due to space constraints, we only provide proof outlines for our two main results in this document. Complete proofs are presented in the supplementary material. 3 Model Consider n workers, for some integer n ≥3. Each task consists in determining the answer to a binary question. The answer to task t, the “ground-truth", is denoted by G(t) ∈{+1, −1}. We assume that the random variables G(1), G(2), . . . are i.i.d. and centered, so that there is no bias towards one of the answers. Each worker provides an answer with probability α ∈(0, 1]. When worker i ∈{1, ..., n} provides an answer, this answer is correct with probability 1 2(1 + θi), independently of the other workers, for some parameter θi ∈[−1, 1] that we refer to as the reliability of worker i. If θi > 0 then worker 2 i tends to provide correct answers; if θi < 0 then worker i tends to provide incorrect anwsers; if θi = 0 then worker i is non-informative. We denote by θ = (θ1, . . . , θn) the reliability vector. Both α and θ are unknown. Let Xi(t) ∈{−1, 0, 1} be the output of worker i for task t, where the output 0 corresponds to the absence of an answer. We have: Xi(t) = G(t) w.p. α 1+θi 2 , −G(t) w.p. α 1−θi 2 0 w.p. 1 −α. (1) Since the workers are independent, the random variables X1(t), ..., Xn(t) are independent given G(t), for each task t. We denote by X(t) the corresponding vector. The goal is to estimate the ground-truth G(t) as accurately as possible by designing an estimator ˆG(t) that minimizes the error probability P( ˆG(t) ̸= G(t)). The estimator ˆG(t) is adaptive and may be a function of X(1), ..., X(t) but not of the unknown parameters α, θ. It is well-known that, given θ and α = 1, an optimal estimator of G(t) is the weighted majority vote [Nitzan and Paroush, 1982, Shapley and Grofman, 1984], namely ˆG(t) = 1{W(t) > 0} −1{W(t) < 0} + Z1{W(t) = 0}, (2) where W(t) = 1 n Pn i=1 wiXi(t), wi = ln( 1+θi 1−θi ) is the weight of worker i (possibly infinite), and Z is a Bernoulli random variable of parameter 1 2 over {+1, −1} (for random tie-breaking). We prove this result for any α ∈(0, 1]. Proposition 1 Assuming that θ is known, the estimator (2) is an optimal estimator of G(t). Proof. Finding an optimal estimator of G(t) amounts to finding an optimal statistical test between hypotheses {G(t) = +1} and {G(t) = −1}, under a symmetry constraint so that type I and type II error probability are equal. For any x ∈{−1, 0, 1}n, let L+(x) and L−(x) be the probabilities that X(t) = x under hypotheses {G(t) = +1} and {G(t) = −1}, respectively. We have L+(x) = H(x) n Y i=1 (1 + θi)1{xi=+1}(1 −θi)1{xi=−1}, L−(x) = H(x) n Y i=1 (1 + θi)1{xi=−1}(1 −θi)1{xi=+1}, where ℓ= Pn i=1 |xi| is the number of answers and H(x) = 1 2ℓαℓ(1 −α)n−ℓ. We deduce the log-likelihood ratio ln L+(x) L−(x) = Pn i=1 wixi. By the Neyman-Pearson theorem, for any level of significance, there exists a and b such that the uniformly most powerful test for that level is: 1{wT x > a} −1{wT x < a} + Z1{wT x = a}, where Z is a Bernoulli random variable of parameter b over {+1, −1}. By symmetry, we must have a = 0 and b = 1 2, as announced. □ This result shows that estimating the true answer G(t) reduces to estimating the unknown parameters α and θ, which is the focus of the paper. Note that the problem of estimating θ is important in itself, due to the presence of "spammers" (i.e., workers with low reliability); a good estimator can be used by the crowdsourcing platform to incentivize good workers. 4 Identifiability Estimating α and θ from X(1), ..., X(t) is not possible unless we have identifiability, namely there cannot exist two distinct sets of parameters α, θ and α′, θ′ under which the distribution of X(1), ..., X(t) is the same. Let X ∈{−1, 0, 1}n be any sample, for some parameters α ∈(0, 1] and θ ∈[−1, 1]n. The parameter α is clearly identifiable since α = P(X1 ̸= 0). The identifiability of θ is less obvious. Assume for instance that θi = 0 for all i ≥3. It follows from (1) that for any x ∈{−1, 0, 1}n, with H(x) defined as in the proof of Proposition 1: P(X = x) = H(x) × ( 1 + θ1θ2 if x1x2 = 1, 1 −θ1θ2 if x1x2 = −1, 1 if x1x2 = 0. 3 In particular, two parameters θ, θ′ such that θ1θ2 = θ′ 1θ′ 2 and θi = θ′ i = 0 for all i ≥3 cannot be distinguished. Similarly, by symmetry, two parameters θ, θ′ such that θ′ = −θ cannot be distinguished. Let: Θ = ( θ ∈[−1, 1]n : n X i=1 1{θi ̸= 0} ≥3, n X i=1 θi > 0 ) . The first condition states that there are at least 3 informative workers, the second that the average reliability is positive. Proposition 2 Any parameter θ ∈Θ is identifiable. Proof. Any parameter θ ∈Θ can be expressed as a function of the covariance matrix of X (section 6 below): the absolute value and the sign of θ follow from (4) and (5), respectively. □ 5 Lower bound on the minimax error The estimation of α is straightforward and we here focus on the best estimation of θ one can expect, assuming α is known. Specifically, we derive a lower bound on the minimax error of any estimator ˆθ of θ. Define ||ˆθ −θ||∞= maxi=1,...,n |ˆθi −θi| and for all θ ∈[−1, 1]n, A(θ) = mink maxi,j̸=k p |θiθj| and B(θ) = Pn i=1 θi. Observe that Θ = {θ ∈[−1, 1]n : A(θ) > 0, B(θ) > 0}. This suggests that the estimation of θ becomes hard when either A(θ) or B(θ) is small. Define for any a, b ∈(0, 1), Θa,b = {θ ∈[−1, 1]n : A(θ) ≥a , B(θ) ≥b}. We have the following lower bound on the minimax error. As the proof reveals, the parameters a and b characterize the difficulty of estimating the absolute value and the sign of θ, respectively. Theorem 1 (Minimax error) Consider any estimator ˆθ(t) of θ. For any ǫ ∈(0, min(a, (1 −a)/2, 1/4)) and δ ∈(0, 1/4), we have min θ∈Θa,b P ||ˆθ(t) −θ||∞≥ǫ ≥δ , ∀t ≤max(T1, T2), with T1 = c1 1−a α2a4ǫ2 ln 1 4δ , T2 = c2 (1−a)4(n−4) α2a2b2 ln 1 4δ and c1, c2 > 0 two universal constants. Outline of proof. The proof is based on an information theoretic argument. Denote by Pθ the distribution of X under parameter θ ∈Θ, and D(.||.) the Kullback-Leibler (KL) divergence. The main element of proof is lemma 1, where we bound D(Pθ′||Pθ) for two well chosen pairs of parameters. The pair θ, θ′ in statement (i) is hard to distinguish when a is small, hence it is hard to estimate the absolute value of θ. The pair θ, θ′ of statement (ii) is also hard to distinguish when a or b are small, which shows that it is difficult to estimate the sign of θ. Proving lemma 1 is involved because of the particular form of distribution Pθ, and requires careful manipulations of the likelihood ratio. We conclude by reduction to a binary hypothesis test between θ and θ′ using lemma 2. Lemma 1 (i) Let a ∈(0, 1), θ = (1, a, a, 0, . . . , 0) and θ′ = (1 −2ǫ, a 1−2ǫ, a 1−2ǫ, 0, . . . , 0). Then: D(Pθ′||Pθ) ≤ 1 c1 α2a4ǫ2 1−a (ii) Let n > 4, define c = b/(n −4), and θ = (a, a, −a, −a, c, . . ., c), θ′ = (−a, −a, a, a, c, . . ., c). Then: D(Pθ′||Pθ) ≤ 1 c2 α2a2b2 (n−4)(1−a)4 . Lemma 2 [Tsybakov, 2008, Theorem 2.2] Consider any estimator ˆθ(t). For any θ, θ′ ∈Θ with ||θ −θ′||∞≥2ǫ we have: min Pθ(||ˆθ(t) −θ||∞≥ǫ), Pθ′(||ˆθ(t) −θ′||∞≥ǫ) ≥ 1 4 exp(−tD(Pθ′||Pθ)). Relation with prior work. The lower bound derived in [Zhang et al., 2014][Theorem 3] shows that the minimax error of any estimator ˆθ must be greater than O((αt)−1 2 ). Our lower bound is stricter, and shows that the minimax error is in fact greater than O(a−2α−1t−1 2 ). Another lower bound was derived in [Chao and Dengyong, 2015][Theorems 3.4 and 3.5], but this concerns the prediction error rate, that is P( ˆG ̸= G), so that it cannot be easily compared to our result. 4 6 Triangular estimation We here present our estimator. The absolute value of the reliability of each worker k is estimated through the correlation of her answers with those of the most informative pair i, j ̸= k. We refer to this algorithm as triangular estimation (TE). The sign of the reliability of each worker is estimated in a second step. We use the convention that sign(0) = +. Covariance matrix. Let X ∈{−1, 0, 1}n be any sample, for some parameters α ∈(0, 1] and θ ∈Θ. We shall see that the parameter θ could be recovered exactly if the covariance matrix of X were perfectly known. For any i ̸= j, let Cij be the covariance of Xi and Xj given that XiXj ̸= 0 (that is, both workers i and j provide an answer). In view of (1), Cij = E(XiXj) E(|XiXj|) = θiθj. (3) In particular, for any distinct indices i, j, k, CikCjk = θiθjθ2 k = Cijθ2 k. We deduce that, for any k = 1, . . . , n and any pair i, j ̸= k such that Cij ̸= 0, θ2 k = CikCjk Cij . (4) Note that such a pair exists for each k because θ ∈Θ. To recover the sign of θk, we use the fact that θk Pn i=1 θi = θ2 k + P i̸=k Cik. Since θ ∈Θ, we get sign(θk) = sign θ2 k + X i̸=k Cik . (5) The TE algorithm consists in estimating the covariance matrix to recover θ from the above expressions. TE algorithm. At any time t, define ∀i, j = 1, . . . , n, ˆCij = Pt s=1 Xi(s)Xj(s) max Pt s=1 |Xi(s)Xj(s)|, 1 . (6) For all k = 1, . . . , n, find the most informative pair (ik, jk) ∈arg maxi̸=j̸=k | ˆCij| and let |ˆθk| = s ˆ Cikk ˆ Cjkk ˆ Cikjk if | ˆCikjk(t)| > 0, 0 otherwise. Next, define k∗= arg maxk ˆθ2 k + P i̸=k ˆCik and let sign(ˆθk) = ( sign(ˆθ2 k∗+ P i̸=k∗ˆCik∗) if k = k∗, sign(ˆθk∗ˆCkk∗) otherwise, Complexity. First note that the TE algorithm is a streaming algorithm since ˆCij(t) can be written ˆCij = Mij max(Nij, 1) with Mij = t X s=1 Xi(s)Xj(s) and Nij = t X s=1 |Xi(s)Xj(s)|. Thus TE requires O(n2) memory space (to store the matrices M and N) and has a time complexity of O(n2ln(n)) per task: O(n2) operations to update ˆC, O(n2ln(n)) operations to sort the entries of | ˆC(t)|, O(n2) operations to compute |ˆθ|, O(n2) operations to compute the sign of ˆθ. 5 Minimax optimality. The following result shows that the proposed estimator is minimax optimal. Namely the sample complexity of our estimator matches the lower bound up to an additive logarithmic term ln(n) and a multiplicative constant. Theorem 2 Let θ ∈Θa,b and denote by ˆθ(t) the estimator defined above. For any ǫ ∈(0, min( b 3, 1)) and δ ∈(0, 1), we have P(||ˆθ(t) −θ||∞≥ǫ) ≤δ , ∀t ≥max(T ′ 1, T ′ 2), with T ′ 1 = c′ 1 1 α2a4ǫ2 ln 6n2 δ , T ′ 2 = c′ 2 n α2a2b2 ln 4n2 δ , and c′ 1, c′ 2 > 0 two universal constants. Outline of proof. Define || ˆC −C||∞= maxi,j:i̸=j | ˆCij −Cij|. The TE estimator is a function of the empirical pairwise correlations ( ˆCij)i,j and the sums P j̸=i ˆCij. The main difficulty is to prove lemma 3, a concentration inequality for P j̸=i ˆCij. Lemma 3 For all i = 1, . . . , n and all ε > 0, P | X j̸=i ( ˆCij −Cij)| ≥ε ≤2 exp − ε2α2t 30 max(B(θ)2, n) + 2n exp − tα2 8(n −1) . Consider i fixed. We dissociate the set of tasks answered by each worker from the actual answers and the truth. Let U = (Uj(t))j,t be i.i.d Bernoulli random variables with E(Uj(t)) = α and V = (Vj(t))j,t be independent random variables on {−1, 1} with E(Vj(t)) = θj. One may readily check that (Xj(t))j,t has the same distribution as (G(t)Uj(t)Vj(t))j,t. Hence, in distribution: X j̸=i ˆCij = X j̸=i t X s=1 Ui(s)Uj(s)Vi(s)Vj(s) Nj with Nj = t X s=1 Ui(s)Uj(s). We prove lemma 3 by conditionning with respect to U. Denote by PU the conditional probability with respect to U. Define N = minj̸=i Nij. We prove that for all ε ≥0: PU X j̸=i ( ˆCij −Cij) ≥ε ≤e−ε2 σ2 with S = t X s=1 X j̸=i Ui(s)Uj(s)θj 2 and σ2 = (n −1)N + S N 2 . The quantity σ is an upper bound on the conditional variance of P j̸=i ˆCij, which we control by applying Chernoff’s inequality to both N and S. We get: P(N ≤α2t/2) ≤(n −1)e−tα2 8 and P(S ≥2tα2 max(Bi(θ)2, n −1)) ≤e− tα2 3(n−1) . Removing the conditionning on U yields the result. We conclude the proof of theorem 2 by linking the fluctuations of ˆC to that of ˆθ in lemma 4. Lemma 4 If (a) || ˆC−C||∞≤ε ≤A2(θ) min( 1 2, B(θ) 64 ) and (b) maxi | P j̸=i ˆCij−Cij| ≤A(θ)B(θ) 8 , then ||ˆθ −θ||∞≤ 24ε A2(θ). Relation with prior work. Our upper bound brings improvement over [Zhang et al., 2014] as follows. Two conditions are required for the upper bound of [Zhang et al., 2014][Theorem 4] to hold: (i) it is required that maxi |θi| < 1, and (ii) the number of workers n must grow with both δ and t, and in fact must depend on a and b, so that n has to be large if b is smaller than √n. Our result does not require condition (i) to hold. Further there are values of a and b such that condition (ii) is never satisfied, for instance n ≥5, a = 1 2, b = √n−4 2 and θ = (a, −a, a, −a, b n−4, ..., b n−4) ∈Θa,b. For [Zhang et al., 2014][Theorem 4] to hold, n should satisfy n ≥c3nln(t2n/δ) with c3 a universal constant (see discussion in the supplement) and for t or 1/δ large enough no such n exists. It is noted that for such values of a and b, our result remains informative. Our result shows that one can obtain a minimax optimal algorithm for crowdsourcing which does not involve any EM step. The analysis of [Chao and Dengyong, 2015] also imposes n to grow with t and conditions on the minimal value of b. Specifically the first and the last condition of [Chao and Dengyong, 2015][Theorem 6 3.3], require that n ≥ln(t) and that P i θ2 i ≥6ln(t). Using the previous example (even for t = 3), this translates to b ≥2√n −4. In fact, the value b = O(√n) seems to mark the transition between "easy" and "hard" instances of the crowdsourcing problem. Indeed, when n is large and b is large with respect to √n, then the majority vote outputs the truth with high probability by the Central Limit Theorem. 7 Numerical Experiments Synthetic data. We consider three instances: (i) n = 50, t = 103, α = 0.25, θi = a if i ≤n/2 and 0 otherwise; (ii) n = 50, t = 104, α = 0.25, θ = (1, a, a, 0, ..., 0); (iii) n = 50, t = 104, α = 0.25, a = 0.9, θ = (a, −a, a, −a, b n−4, ..., b n−4). Instance (i) is an "easy" instance where half of the workers are informative, with A(θ) = a and B(θ) = na/2. Instance (ii) is a "hard" instance, the difficulty being to estimate the absolute value of θ accurately by identifying the 3 informative workers. Instance (iii) is another "hard" instance, where estimating the sign of the components of θ is difficult. In particular, one must distinguish θ from θ′ = (−a, a, −a, a, b n−4, ..., b n−4), otherwise a large error occurs. Both "hard" instances (ii) and (iii) are inspired by our derivation of the lower bound and constitute the hardest instances in Θa,b. For each instance we average the performance of algorithms on 103 independent runs and apply a random permutation of the components of θ before each run. We consider the following algorithms: KOS (the BP algorithm of [Karger et al., 2011]), Maj (majority voting), Oracle (weighted majority voting with optimal weights, the optimal estimator of the ground truth), RoE (first spectral algorithm of [Dalvi et al., 2013]), EoR (second spectral algorithm of [Dalvi et al., 2013]), GKM (spectral algorithm of [Ghosh et al., 2011]), S-EMk (EM algorithm with spectral initialization of [Zhang et al., 2014] with k iterations of EM) and TE (our algorithm). We do not present the estimation error of KOS, Maj and Oracle since these algorithms only predict the ground truth but do not estimate θ directly. The results are shown in Tables 1 and 2, where the best results are indicated in bold. The spectral algorithms RoE, EoR and GKM tend to be outperformed by the other algorithms. To perform well, GKM needs θ1 to be positive and large (see [Ghosh et al., 2011]); whenever θ1 ≤0 or |θ1| is small, GKN tends to make a sign mistake causing a large error. Also the analysis of RoE and EoR assumes that the task-worker graph is a random D-regular graph (so that the worker-worker matrix has a large spectral gap). Here this assumption is violated and the practical performance suffers noticeably, so that this limitation is not only theoretical. KOS performs consistently well, and seems immune to sign ambiguity, see instance (iii). Further, while the analysis of KOS also assumes that the task-worker graph is random D-regular, its practical performance does not seem sensitive to that assumption. The performance of S-EM is good except when sign estimation is hard (instance (iii), b = 1). This seems due to the fact that the initialization of S-EM (see the algorithm description) is not good in this case. Hence the limitation of b being of order √n is not only theoretical but practical as well. In fact (combining our results and the ideas of [Zhang et al., 2014]), this suggests a new algorithm where one uses EM with TE as the initial value of θ. Further, the number of iterations of EM brings significant gains in some cases and should affect the universal constants in front of the various error bounds (providing theoretical evidence for this seems non trival). TE performs consistently well except for (i) a = 0.3 (which we believe is due to the fact that t is relatively small in that instance). In particular when sign estimation is hard TE clearly outperforms the competing algorithms. This indeed suggests two regimes for sign estimation: b = O(1) (hard regime) and b = O(√n) (easy regime). Real-world data. We next consider 6 publicly available data sets (see [Whitehill et al., 2009, Zhou et al., 2015] and summary information in Table 3), each consisting of labels provided by workers and the ground truth. The density is the average number of labels per worker, i.e., α in our model. The worker degree is the average number of tasks labeled by a worker. First, for data sets with more than 2 possible label values, we split the label values into two groups and associate them with −1 and +1 respectively. The partition of the labels is given in Table 3. Second, we remove any worker who provides less than 10 labels. Our preliminary numerical experiments (not shown here for concision) show that without this, none of the studied algorithms 7 even match the majority consistently. Workers with low degree create noise and (to the best of our knowledge) any theoretical analysis of crowdsourcing algorithms assumes that the worker degree is sufficiently large. The performance of various algorithms is reported in Table 4. No information about the workers reliability is available so we only report the prediction error P( ˆG ̸= G). Further, one cannot compare algorithms to the Oracle, so that the main goal is to outperform the majority. Apart from "Bird" and "Web", none of the algorithms seem to be able to significantly outperform the majority and are sometimes noticeably worse. For "Web" which has both the largest number of labels and a high worker degree, there is a significant gain over the majority vote, and TE, despite its low complexity, slightly outperforms S-EM and is competitive with KOS and GKM which both perform best on this dataset. Instance RoE EoR GKM S-EM1 S-EM10 TE (i) a = 0.3 0.200 0.131 0.146 0.100 0.041 0.134 (i) a = 0.9 0.274 0.265 0.271 0.022 0.022 0.038 (ii) a = 0.55 0.551 0.459 0.479 0.045 0.044 0.050 (ii) a = 0.95 0.528 0.522 0.541 0.034 0.033 0.039 (iii) b = 1 0.253 0.222 0.256 0.533 0.389 0.061 (iii) b = √n 0.105 0.075 0.085 0.437 0.030 0.045 Table 1: Synthetic data: estimation error E(||ˆθ −θ||∞). Instance Oracle Maj KOS RoE EoR GKM S-EM1 S-EM10 TE (i) a = 0.3 0.227 0.298 0.228 0.402 0.398 0.374 0.251 0.228 0.250 (i) a = 0.9 0.004 0.046 0.004 0.217 0.218 0.202 0.004 0.004 0.004 (ii) a = 0.55 0.284 0.441 0.292 0.496 0.497 0.495 0.284 0.285 0.284 (ii) a = 0.95 0.219 0.419 0.220 0.495 0.496 0.483 0.219 0.219 0.219 (iii) b = 1 0.181 0.472 0.185 0.443 0.455 0.386 0.388 0.404 0.192 (iii) b = √n 0.126 0.315 0.133 0.266 0.284 0.207 0.258 0.127 0.128 Table 2: Synthetic data: prediction error P( ˆG ̸= G). Data Set # Tasks # Workers # Labels Density Worker Degree Label Domain Bird 108 39 4,212 1 108 {0} vs {1} Dog 807 109 8,070 0.09 74 {0,2} vs {1,3} Duchenne 159 64 1,221 0.12 19 {0} vs {1} RTE 800 164 8,000 0.06 49 {0} vs {1} Temp 462 76 4,620 0.13 61 {1} vs {2} Web 2,653 177 15,539 0.03 88 {1,2,3} vs {4,5} Table 3: Summary of the real-world datasets. Data Set Maj KOS RoE EoR GKM S-EM1 S-EM10 TE Bird 0.24 0.28 0.29 0.29 0.28 0.20 0.28 0.18 Dog 0.18 0.19 0.18 0.18 0.20 0.24 0.17 0.20 Duchenne 0.28 0.30 0.29 0.28 0.29 0.28 0.30 0.26 RTE 0.10 0.50 0.50 0.89 0.49 0.32 0.16 0.38 Temp 0.06 0.43 0.24 0.10 0.43 0.06 0.06 0.08 Web 0.14 0.02 0.13 0.14 0.02 0.04 0.06 0.03 Table 4: Real-world data: prediction error P( ˆG ̸= G). 8 Conclusion We have derived a minimax error lower bound for the crowdsourcing problem and have proposed TE, a low-complexity algorithm which matches this lower bound. Our results open several questions of interest. First, while recent work has shown that one can obtain strong theoretical guarantees by combining one step of EM with a well-chosen initialization, we have shown that, at least in the case of binary labels, one can forgo the EM phase altogether and still obtain both minimax optimality and good numerical performance. It would be interesting to know if this is still possible when there are more than two possible labels, and also if one can do so using a streaming algorithm. 8 References Paul S Albert and Lori E Dodd. A cautionary note on the robustness of latent class models for estimating diagnostic error without a gold standard. Biometrics, 60(2):427–435, 2004. Gao Chao and Zhou Dengyong. Minimax optimal convergence rates for estimating ground truth from crowdsourced labels. Tech Report http://arxiv.org/abs/1310.5764, 2015. Nilesh Dalvi, Anirban Dasgupta, Ravi Kumar, and Vibhor Rastogi. Aggregating crowdsourced binary ratings. In Proc. of WWW, 2013. A. P. Dawid and A. M. Skene. Maximum likelihood estimation of observer error-rates using the EM algorithm. Journal of the Royal Statistical Society. Series C (Applied Statistics), 28(1):20–28, 1979. Arpita Ghosh, Satyen Kale, and R. Preston McAfee. Who moderates the moderators?: crowdsourcing abuse detection in user-generated content. In Proc. of ACM EC, 2011. Sui L Hui and Steven D Walter. Estimating the error rates of diagnostic tests. Biometrics, pages 167–171, 1980. David R. Karger, Sewoong Oh, and Devavrat Shah. Iterative learning for reliable crowdsourcing systems. In Proc. of NIPS, 2011. David R Karger, Sewoong Oh, and Devavrat Shah. Efficient crowdsourcing for multi-class labeling. ACM SIGMETRICS Performance Evaluation Review, 41(1):81–92, 2013. David R Karger, Sewoong Oh, and Devavrat Shah. Budget-optimal task allocation for reliable crowdsourcing systems. Operations Research, 62(1):1–24, 2014. Qiang Liu, Jian Peng, and Alex T Ihler. Variational inference for crowdsourcing. In Proc. of NIPS, 2012. Shmuel Nitzan and Jacob Paroush. Optimal decision rules in uncertain dichotomous choice situations. International Economic Review, pages 289–297, 1982. Vikas C Raykar, Shipeng Yu, Linda H Zhao, Gerardo Hermosillo Valadez, Charles Florin, Luca Bogoni, and Linda Moy. Learning from crowds. Journal of Machine Learning Research, 11: 1297–1322, 2010. Lloyd Shapley and Bernard Grofman. Optimizing group judgmental accuracy in the presence of interdependencies. Public Choice, 43(3):329–343, 1984. Padhraic Smyth, Usama Fayyad, Michael Burl, Pietro Perona, and Pierre Baldi. Inferring ground truth from subjective labelling of venus images. In Proc. of NIPS, 1995. Alexandre B. Tsybakov. Introduction to non-parametric estimation. Springer, 2008. Dong Wang, Tarek Abdelzaher, Lance Kaplan, and Charu C Aggarwal. Recursive fact-finding: A streaming approach to truth estimation in crowdsourcing applications. In Proc. of IEEE ICDCS, 2013. Peter Welinder and Pietro Perona. Online crowdsourcing: rating annotators and obtaining costeffective labels. In Proc. of IEEE CVPR (Workshops), 2010. Jacob Whitehill, Ting-fan Wu, Jacob Bergsma, Javier R Movellan, and Paul L Ruvolo. Whose vote should count more: Optimal integration of labels from labelers of unknown expertise. In Proc. of NIPS, 2009. Yuchen Zhang, Xi Chen, Dengyong Zhou, and Michael I Jordan. Spectral methods meet EM: A provably optimal algorithm for crowdsourcing. In Proc. of NIPS, 2014. Dengyong Zhou, Qiang Liu, John C Platt, Christopher Meek, and Nihar B Shah. Regularized minimax conditional entropy for crowdsourcing. Tech Report, http://arxiv.org/pdf/1503.07240, 2015. 9 | 2017 | 303 |
6,790 | Communication-Efficient Distributed Learning of Discrete Probability Distributions Ilias Diakonikolas CS, USC diakonik@usc.edu Elena Grigorescu CS, Purdue elena-g@purdue.edu Jerry Li EECS & CSAIL, MIT jerryzli@mit.edu Abhiram Natarajan CS, Purdue nataraj2@purdue.edu Krzysztof Onak IBM Research, NY konak@us.ibm.com Ludwig Schmidt EECS & CSAIL, MIT ludwigs@mit.edu Abstract We initiate a systematic investigation of distribution learning (density estimation) when the data is distributed across multiple servers. The servers must communicate with a referee and the goal is to estimate the underlying distribution with as few bits of communication as possible. We focus on non-parametric density estimation of discrete distributions with respect to the ℓ1 and ℓ2 norms. We provide the first non-trivial upper and lower bounds on the communication complexity of this basic estimation task in various settings of interest. Specifically, our results include the following: 1. When the unknown discrete distribution is unstructured and each server has only one sample, we show that any blackboard protocol (i.e., any protocol in which servers interact arbitrarily using public messages) that learns the distribution must essentially communicate the entire sample. 2. For the case of structured distributions, such as k-histograms and monotone distributions, we design distributed learning algorithms that achieve significantly better communication guarantees than the naive ones, and obtain tight upper and lower bounds in several regimes. Our distributed learning algorithms run in near-linear time and are robust to model misspecification. Our results provide insights on the interplay between structure and communication efficiency for a range of fundamental distribution estimation tasks. 1 Introduction 1.1 Background and Motivation We study the problem of distribution learning (or density estimation) in a distributed model, where the data comes from an unknown distribution and is partitioned across multiple servers. The main goal of this work is to explore the inherent tradeoff between sample size and communication for nonparametric density estimation of discrete distributions. We seek answers to the following questions: What is the minimum amount of communication required to learn the underlying distribution of the data? Is there a communication-efficient learning algorithm that runs in polynomial time? We obtain the first non-trivial algorithms and lower bounds for distributed density estimation. Before we state our results, we provide the relevant background. Density Estimation. Distribution learning or density estimation is the following prototypical inference task: Given samples drawn from an unknown target distribution that belongs to (or is 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. well-approximated by) a given family of distributions P, the goal is to approximately estimate (learn) the target distribution. Estimating a distribution from samples is a fundamental unsupervised learning problem that has been studied in statistics since the late nineteenth century [36]. The classical statistics literature focuses primarily on the sample complexity of distribution learning, i.e., on the informationtheoretic aspects of the problem. More recently, there has been a large body of work in computer science on this topic with an explicit focus on computational efficiency [12, 11, 7, 8, 1, 13, 2]. We emphasize that the aforementioned literature studies density estimation in the centralized setting, where all the data samples are available on a single machine. Distributed Computation. In recent years, we have seen an explosion in the amount of data that has been generated and collected across various scientific and technological domains [10]. Due to the size and heterogeneity of modern datasets, there is a real need for the design of efficient algorithms that succeed in the distributed model, when the data is partitioned across multiple servers. A major bottleneck in distributed computation is the communication cost between individual machines. In practice, communication may be limited by bandwidth constraints and power consumption, leading to either slow or expensive systems (see, e.g., [23] for a survey). Hence, the general problem of designing communication-efficient distributed protocols is of fundamental importance in this setting. In recent years, a number of statistical estimation problems have been algorithmically studied in the distributed setting [3, 16, 15, 40, 21, 30, 24, 33, 5, 29]. To the best of our knowledge, the problem of nonparametric density estimation has not been previously studied in this context. This Work: Distributed Density Estimation. We initiate a systematic investigation of density estimation in the distributed model. We believe that this is a fundamental problem that merits investigation in its own right. Also, the problem of distributed density estimation arises in various realdata applications when it is required to reconstruct the data distribution from scattered measurements. Examples include sensor networks and P2P systems (see, e.g., [35, 32, 27, 41, 37] and references therein). We explore the tradeoff between communication and statistical efficiency for a number of fundamental nonparametric density estimation problems. Specifically, we insist that our algorithms are sample-efficient and our goal is to design distributed protocols using a minimum amount of communication. As our main contribution, we provide the first non-trivial upper and lower bounds on the communication complexity of density estimation for a range of natural distribution families that have been extensively studied in the centralized regime. The main conceptual message of our findings is the following: When the underlying discrete distribution is unstructured, no non-trivial communication protocol is possible. In sharp contrast, for various families of structured distributions, there are non-trivial algorithms whose communication complexity significantly improves over naive protocols. It should be noted that all our algorithms are in addition computationally efficient. Communication Model for Density Estimation. We now informally describe the communication model used in this paper. We refer to the preliminaries in Section 2 for formal definitions. The model is parameterized by the number of samples per server (player), which we denote by s. There are a specific number of servers, each holding s independent samples from an unknown distribution P. We call these servers sample-holding players. Additionally, there is a server that holds no samples from P. We call this server a referee or fusion center. In communication protocols considered in this work, servers exchange messages, and at the end of the protocol, the referee outputs an accurate hypothesis distribution bP. More precisely, we want the the hypothesis bP to satisfy d( bP, P) ≤ϵ with high probability (over the samples and internal randomness), where the metric d is either the ℓ1-norm (statistical distance) or the ℓ2-norm. We study two variants of this model. In the simultaneous communication model, each sample-holding player sends a message (of one or more bits) to the referee once, based only on the samples she holds and public randomness. In the blackboard model, the sample-holding players’ messages are public, and the communication protocol does not restrict the number of times a player may speak. The goal is to minimize the amount of communication between the players and the referee, while transmitting enough information about the samples so that the underlying distribution P can be approximately recovered from the transcript of the communication. 2 Table 1: Communication complexity bounds for density estimation of unstructured distributions (for success probability 9/10) Regime CCs,1/10(ADE(Dn, 1, ε, α)) CC→ s,1/10(ADE(Dn, 1, ε, α)) s = 1 Ω( n ε2 log n) O( n ε2 log n) s = Θ(n) Ω(n log 1 ε) O( n ε2 ) s = Θ( n ε2 ) Ω(n log 1 ε) O(n log 1 ε) 1.2 Our Contributions In this section, we provide informal statements of our main results. For the formal statements of all our results the reader is referred to the full version of the paper. We will require the following notation.‘ We use n to denote an upper bound on the domain size of our distributions and α to denote the total sample size. Without loss of generality, we will assume that the domain of the distributions is the set [n] := {1, 2, . . . , n}. The ℓ1 (resp. ℓ2) distance between two discrete distributions is the ℓ1 (resp. ℓ2) norm of the difference between their probability vectors. We note that the sample sizes in this section correspond to high constant probability of success. This can be boosted to high probability by standard techniques. We start by pointing out the baseline result that we compare against. The naive protocol to perform distribution density estimation is the following: all the servers (players) communicate their entire sample to the referee, who applies a centralized estimator to output an accurate hypothesis. The communication complexity of this approach is Θ(α log n) bits. The obvious question is whether there exists a protocol with significantly smaller communication complexity. Unstructured Discrete Distributions. Our starting point is the basic setting in which the underlying distribution over n elements is potentially arbitrary and each server (player) holds exactly one sample from an unknown distribution over a domain of size n. (This basic setting is motivated by practical applications, e.g., aggregation of cell-phone data, etc.) In the centralized setting, it is a folklore fact (see, e.g., [19]) that Θ(n/ε2) samples are necessary and sufficient to learn an unstructured distribution supported on n elements within ℓ1-error ε. This fact in turn implies that the naive distributed protocol uses O( n ε2 log n) bits. We show that this protocol is best possible, up to constant factors: Theorem 1. Suppose Θ(n/ε2) samples from an unknown distribution P over [n] are distributed such that each player has exactly one sample. Then learning P within ℓ1-distance ε requires Ω((n/ε2) log n) bits of communication in the blackboard model. We remark that a blackboard model captures a very general interaction between sample-holding players and the referee. The players are allowed to send messages in arbitrary order and share partial information about their samples from [n], perhaps using much fewer than log n bits. For instance, if one of the players has revealed her sample, other players may just notify everyone that they hold the same (or a correlated) sample, using O(1) extra bits. Thus, our lower bound excludes the possibility of non-trivial protocols that do better than essentially having each machine transmit its entire sample. This statement might seem intuitively obvious, but its proof is not straightforward. By a standard packing argument, we also show a communication lower bound of Ω(n log 1 ε) for all protocols that estimate an unstructured discrete distribution over [n] in ℓ1-distance. In the regime where there are Θ(n/ε2) samples per machine, we show that there is a simple estimator that achieves this lower bound. (See Table 1 for instantiations of the theorems, and Section 2 for the formal definitions.) Structured Discrete Distributions. In contrast to the unstructured case, we design non-trivial protocols that significantly improve upon the naive protocols in several regimes of interest. Our main algorithmic results are the first communication-efficient algorithms for robust learning of histogram distributions. A k-histogram distribution over [n] is a probability distribution that is piecewise constant over some set of k intervals over [n]. Histograms have been extensively studied in statistics and computer science. In the database community, histograms constitute the most common 3 tool for the succinct approximation of data [9, 38, 25, 26, 1]. In statistics, many methods have been proposed to estimate histogram distributions in a variety of settings [22, 34, 17, 31]. The algorithmic difficulty in learning histograms lies in the fact that the location and “size” of these intervals is a priori unknown. In the centralized setting, sample and computationally efficient algorithms for learning histograms have been recently obtained [7, 8, 2]. Our distributed learning algorithm for the ℓ1-metric builds on the recent centralized algorithm of [2]. In particular, we have the following: Theorem 2. For the problem of learning k-histograms with ℓ1 error ε, the following hold: 1. In the regime of one sample per player, there exists a protocol that uses O( k ε log n+ k ε3 log k ε ) bits of communication. Furthermore, any successful protocol must use Ω(k log n k + k ε2 log k) bits of communication. 2. In the regime of Θ( k ε2 ) samples per player, there exists a successful protocol with O( k ε log n) bits of communication. Furthermore, any protocol must use Ω(k log n k + k log 1 ε) bits of communication. We now turn our attention to learning under the ℓ2-metric. Previous centralized algorithms for this problem [1] work in a “bottom-up” fashion. Unfortunately, this approach does not seem amenable to distributed computation for the following reason: it seems impossible to keep track of a large number of intervals with limited communication. Instead, we devise a new “top-down” algorithm that starts with a small number of large intervals and iteratively splits them based on the incurred ℓ2-error. A careful application of this idea in conjunction with some tools from the streaming literature— specifically, an application of the Johnson-Lindenstrauss tranform to estimate the ℓ2 2 error using few bits of communication—yields the following result: Theorem 3. For the problem of learning k-histograms with ℓ2 error ε, the following hold: 1. In the regime of s = ˜O(k log n) samples per player, there exists a protocol that uses O( 1 ε2 log n) bits of communication. Furthermore, any successful protocol must use Ω(k log n k + 1 ε log εk) bits of communication. 2. In the regime of s = ω(k log n) samples per player, there exists a protocol with ˜O( k sε2 log n) bits of communication. Furthermore, any successful protocol must use Ω(k log n k + 1 ε log εk) bits. We remark that the above algorithms are robust to model misspecification, i.e., they provide nearoptimal error guarantees even if the input distribution is only close a histogram. As an immediate corollary, we also obtain communication efficient learners for all families of structured discrete distributions that can be well-approximated by histograms. Specifically, by using the structural approximation results of [6, 7, 20], we obtain sample-optimal distributed estimators for various well-studied classes of structured densities including monotone, unimodal, log-concave, monotone hazard rate (MHR) distributions, and others. The interested reader is referred to the aforementioned works. For specific families of structured distributions, we may be able to do better by exploiting additional structure. An example of interest is the family of monotone distributions. By a result of Birge [4] (see also [14] for an adaptation to the discrete case), every monotone distribution over [n] is ε-close in ℓ1-distance to a k-histogram distribution, for k = O(ε−1 log n). Hence, an application of the above theorem yields a distributed estimation algorithm for monotone distributions. The main insight here is that each monotone distribution is well-approximated by an oblivious histogram, i.e., one whose intervals are the same for each monotone distribution. This allows us to essentially reduce the learning problem to that of learning a discrete distribution over the corresponding domain size. A reduction in the opposite direction yields the matching lower bound. Please refer to the full version for more details. 1.3 Comparison to Related Work Recent works [40, 21, 24, 5] study the communication cost of mean estimation problems of structured, parametrized distributions. These works develop powerful information theoretic tools to obtain lower 4 bounds for parameter estimation problems. In what follows, we briefly comment why we need to develop new techniques by pointing out fundamental differences between the two problems. First, our most general results on distributed density estimation do not assume any structure on the distribution (and thus, our learning algorithms are agnostic). This is in contrast to the problems considered before, where the concept classes are restricted (Gaussians, linear separators) and enjoy a lot of structure, which is often leveraged during the design of estimators. Secondly, while we also consider more structured distributions (monotone, k-histograms), the techniques developed in the study of distributed parameter estimation do not apply to our problems. Specifically, those results reduce to the problem of learning a high-dimensional vector (say, where each coordinate parametrizes a spherical Gaussian distribution), where the value at each coordinate is independent of the others. The results in distributed parameter estimation crucially use the coordinate independence feature. The lower bounds essentially state that the communication cost of a d-dimensional parameter vector with independent components grows proportionally to the dimension d, and hence one needs to estimate each coordinate separately. 2 Preliminaries Notation. For any positive integer n, we write [n] to denote {1, . . . , n}, the set of integers between 1 and n. We think of a probability distribution P on [n] as a vector of probabilities (p1, . . . , pn) that sum up to 1. We write X ∼P to denote that a random variable X is drawn from P. Sometimes we use the notation P(i) to denote P[X = i], where X ∼P. We consider three families of discrete distributions: • Dn: the family of unstructured discrete distributions on [n], • Hn,k: the family of k-histogram distributions on [n], • Mn: the family of monotone distributions on [n]. We use ℓp metrics on spaces of probability distributions. For two distributions P and P ′ on [n], their ℓp-distance, where p ∈[1, ∞), is defined as ∥P −P ′∥p := n X i=1 |P(i) −P ′(i)|p !1/p . In this work we focus on the cases of p = 1 and p = 2, in which ∥P −P ′∥1 = Pn i=1 |P(i) −P ′(i)| and ∥P −P ′∥2 = pPn i=1(P(i) −P ′(i))2. For a given distribution Q ∈Dn and family P ⊆Dn of distributions, we denote the ℓp-distance of Q to P as distp(Q, P) := infP ∈P ∥Q −P∥p. Packings and the Packing Number. Let (X, ∥· ∥p) be a normed space, E ⊂X, and r > 0 be a radius. E′ = {e1, . . . , en} ⊂E is an (r, p)-packing of E if mini̸=j ∥ei −ej∥p > r. The (r, p)packing number N pack r (E, p) is the cardinality of the largest (r, p)-packing of E, i.e., N pack r (E, p) := sup{|E′| | E′ ⊂E is an (r, p)-packing of E}. Density Estimation. We now formally introduce density estimation problems considered in this paper. First, for a given n ∈Z+, let P ⊆Dn be a family of distributions on [n], ε ∈[0, ∞), and p ∈[1, ∞). The goal of the density estimation problem DE(P, p, ε) is to output, for any unknown distribution P ∈P, a distribution Q ∈Dn such that ∥P −Q∥p ≤ε. Note that in this problem, we are guaranteed that the unknown distribution belongs to P. Now we define a version of the problem that allows inputs from outside of the class of interest. For a given n ∈Z+, let P ⊆P be a family of distributions on [n]. Also let ε ∈[0, ∞), p ∈[1, ∞), and α ∈[1, ∞). The goal of the agnostic density estimation problem ADE(P, p, ε, α) is to output, for any unknown distribution P ∈Dn, a distribution Q ∈Dn such that ∥P −Q∥p ≤α·distp(P, P)+ε, with high probability. The reason for this version of the problem is that in practice one often has to deal with noisy or non-ideal data. Hence if the unknown distribution is close to belonging to a class P, we wish to output a near distribution as well. 5 Estimators and Sample Complexity. For any distribution estimation problem A involving an unknown distribution P—such as DE(P, p, ε) and ADE(P, p, ε, α) defined above—we now introduce the notion of an estimator. For any m ∈N, an estimator θ : [n]m × {0, 1}∞→Dn is a function that takes a sequence ⃗X = (X1, . . . Xm) of m independent samples from P and sequence R of uniformly and independently distributed random bits, and outputs a hypothesis distribution bP := θ(⃗X, R). We say that the estimator solves A with probability 1 −δ if for any unknown distribution P allowed by the formulation of problem A, the probability that bP is a correct solution to A is at least 1 −δ. For instance, if A is the ADE(P, p, ε, α) problem, the hypothesis distribution bP produced by the estimator should satisfy the following inequality for any distribution P ∈Dn: P h ∥bP −P∥p ≤α · distp(P, P) + ε i ≥1 −δ. The sample complexity of A with error δ, which we denote SCδ(A), is the minimum number of samples m, for which there exists an estimator θ : [n]m × {0, 1}∞→Dn that solves A with probability 1 −δ. As a simple application of this notation, note that SCδ(DE(P, p, ε)) ≤SCδ(ADE(P, p, ε, α)) for any α ∈[1, ∞). This follows from the fact that in DE(P, p, ε), one has to solve exactly the same problem but only for a subset of input distributions in ADE(P, p, ε, α). Since the input P for DE(P, p, ε)) comes from P, we have distp(P, P) = 0. Communication Complexity of Density Estimation. In all of our communication models, when a player wants to send a message, the set of possible messages is prefix-free, i.e., after fixing both the randomness and the set of previous messages known to the player, there are no two possible messages such that one is a proper prefix of the other. Furthermore, for a protocol Π in any of them, we write CostP(Π) to denote the (worst-case) communication cost of Π on P defined as the maximum length of messages that can be generated in the protocol if the unknown distribution belongs to P. Similarly, we write CostP(Π) to denote the expected communication cost of Π on P defined as the maximum expected total length of messages exchanged, where the maximum is taken over all unknown distributions in P and the expectation is taken over all assignments of samples to machines and settings of public randomness. The following inequality always holds: CostP(Π) ≤CostP(Π). Simultaneous communication. In the simultaneous communication model, each sample-holding player sends a message to the referee once, based only on the samples she holds and public randomness. For a density estimation problem A, let P be the family of possible unknown distributions P. We write CC→ s,δ(A) to denote (s, δ)-simultaneous communication complexity of A defined as the minimum CostP(Π) over all simultaneous communication protocols Π that solve A with probability at least 1 −δ for any P ∈P with s samples per sample-holding player and an arbitrary number of sample-holding players. Blackboard communication. In this model, each message sent by each player is visible to all players. The next player speaking is uniquely determined by the previously exchanged messages and public randomness. We use this model to prove lower bounds. Any lower bound in this model applies to the previous communication models. More specifically, we show lower bounds for the average communication complexity, which we define next. For a density estimation problem A, let P be the family of possible unknown distributions P. We write CCs,δ(A) to denote (s, δ)-average communication complexity of A defined as the infimum CostP(Π) over all blackboard protocols Π that solve A with probability at least 1 −δ for any P ∈P with s samples per sample-holding player and an arbitrary number of sample-holding players. The communication complexity notions that we just introduced remain in the following relationship. Claim 1. For any density estimation problem A, CCs,δ(A) ≤CC→ s,δ(A). The claim follows from the fact that simultaneous communication is a specific case of blackboard communication. Additionally, expected communication cost lower bounds worst-case communication 6 cost. All lower bounds that we prove are on the average communication complexity in blackboard communication. A Trivial Upper Bound. There is always a trivial protocol that leverages the sample complexity of the density estimation. Since SCδ(A) samples are enough to solve the problem, it suffices that sample-holding players communicate this number of samples to the referee. Since each sample can be communicated with at most ⌈log n⌉bits, we obtain the following upper bound on the simultaneous communication complexity. Claim 2. For any density estimation problem A and any s ≥1, CC→ s,δ(A) ≤SCδ(A) · ⌈log n⌉. In this paper, we investigate whether there exist protocols that significantly improve on this direct upper bound. Randomness. All our protocols are deterministic (more precisely, depend only the randomness coming from samples provided by the samples from the hidden distribution). On the other hand our lower bounds apply to all protocols, also those using an arbitrary amount of public randomness (i.e., pre-shared randomness). 3 Our Techniques In this section, we provide a high-level description of the main ideas in our upper and lower bounds. We defer the details of upper and lower bounds for monotone distributions to the full version of the paper. 3.1 Overview of Algorithmic Ideas We start by describing the main ideas in our distributed learning algorithms. Robustly Learning Histograms in ℓ1-Distance. We will require the following definition: Definition 1. (Distribution flattening) Let P be a distribution over [n] and let I = {Ii}ℓ i=1 be a partition of [n] into disjoint intervals. We denote by ¯PI the distribution over [n], where ¯PI(i) = P k∈Ij P(k) |Ij| , ∀j ∈[ℓ], i ∈Ij . This means that ¯PI is obtained by spreading the total mass of an interval uniformly in the interval. Our upper bounds in this setting crucially depend on the following norm from Vapnik-Chervonenkis (VC) theory [39], known as the Ak norm (see, e.g., [18]). Definition 2 (Ak norm). For any function f : [n] →R, we define the Ak norm of f as ∥f∥Ak = sup I1,...,Ik k X i=1 |f(Ii)| , where for any set S ⊆[n], we let f(S) = P i∈S f(i) and the supremum is taken over disjoint intervals. In other words, the Ak norm of f is the maximum norm of any flattening of f into k interval pieces. Our distributed algorithms crucially rely on the following building blocks: Theorem 4 ([2]). Let P : [n] →R be a distribution, and let bP : [n] →R be a distribution such that ∥P −bP∥Ak ≤ε. There is an efficient algorithm LEARNHIST( bP, k, ε) that given bP, outputs a k-histogram h such that ∥P −h∥1 ≤3OPTk + O(ε), where OPTk = minh∈Hn,k ∥P −h∥1. This theorem says that if we know a proxy to P that is close in Ak-norm to P, then this gives us enough information to construct the best k-histogram fit to P. Moreover, this is the only information we need to reconstruct a good k-histogram fit to P. The following well-known version of the VCinequality states that the empirical distribution after O(k/ε2) samples is close to the true distribution in Ak-norm: 7 Theorem 5 (VC inequality, e.g., [18]). Fix ε, δ > 0. Let P : [n] →R be a distribution, and let Q be the empirical distribution after O( k+log 1/δ ε2 ) samples from P. Then with probability at least 1 −δ, we have that ∥P −Q∥Ak ≤ε. These two theorems together imply (via the triangle inequality) that in order to learn P, it suffices to construct some distribution bP such that the empirical distribution Q is close to bP in Ak-norm. After we construct this bP, we can run LEARNHIST at a centralized server, and simply output the resulting hypothesis distribution. Thus, the crux of our distributed algorithm is a communication-efficient way of constructing such a bP. We achieve this as follows. First, we learn a partition I of [n] such that on each interval I ∈I, either |I| = 1 and Q(I) ≥Ω(ε/k), or we have Q(I) ≤O(ε/k). We then show that if we let bP be the flattening of Q over this partition, then bP is ε-close to P in Ak-norm. To find this partition, we repeatedly perform binary search over the the domain to find intervals of maximal length, starting at some fixed left endpoint ℓ, such that the mass of Q over that interval is at most O(ε/k). We show that the intervals in I can be found iteratively, using O(m log ms log n) bits of communication each, and that there are at most O(k/ε) intervals in I. This in turn implies a total upper bound of ˜O(mk log n/ε) bits of communication, as claimed. We also show a black-box reduction for robustly learning k-histograms. It improves on the communication cost when the domain size is very large. Specifically, we show: Lemma 1. Fix n ∈N, and ε, δ > 0. Suppose for all 1 ≤n′ ≤n, there is a robust learning algorithm for Hn′,k with s samples per server and m servers, using B(k, n,′ m, s, ε) bits of communication, where ms ≥Ω((k + log 1/δ)/ε2). Then there is an algorithm which solves Hn,k using O(B(k, O(k/ε), s, ε) + k ε log n) bits of communication. In other words, by increasing the communication by an additive factor of k ε log n, we can replace the domain size n with O(k/ε). This is crucial for getting tighter bounds in certain regimes. Learning Histograms in ℓ2-Distance. We now describe our algorithm for learning k-histograms in ℓ2. We first require the following folklore statistical bound: Lemma 2 (see e.g. [1]). Fix ε, δ > 0 and a distribution P : [n] →R. Let Q be the empirical distribution with O(log(1/δ)/ε) i.i.d. samples from P. Then with probability 1 −δ, we have ∥P −Q∥2 2 ≤ε. This lemma states that it suffices to approximate the empirical distribution Q in ℓ2 norm. We now describe how to do so. Our first key primitive is that using the celebrated Johnson-Lindenstrauss lemma [28], it is possible to get an accurate estimate of ∥x∥2 2 when server i has access to xi and x = P xi, where each server communicates at most logarithmically many bits, regardless of the dimension of x. Moreover, we can do this for poly(n) many different x’s, even without shared randomness, by communicating only O(log n log log n) bits once at the beginning of the algorithm and constantly many bits per call afterwards. In particular, we use this to approximate eI = X i∈I (Q(i) −Q(I))2 , for all intervals I ⊆[n]. Perhaps surprisingly, we are now able to give an algorithm that outputs the best O(k log n)-histogram approximation to Q in ℓ2, which only accesses the distribution via the eI. Moreover, we show that this algorithm needs to query only O(k log n) such eI. Since each query to eI can be done with logarithmically many bits per server, this yields the claimed communication bound of ˜O(mk log n). Roughly speaking, our algorithm proceeds as follows. At each step, it maintains a partition of [n]. Initially, this is the trivial partition containing just one element: [n]. Then in every iteration it finds the 2k intervals in its current partition with largest eI, and splits them in half (or splits them all in half if there are less than 2k intervals). It then repeats this process for log n iterations, and returns the flattening over the set of intervals returned. By being somewhat careful with how we track error, we are able to show that this in fact only ever requires O(k log n) queries to eI. While this algorithm is quite simple, proving correctness requires some work and we defer it to the full version. 8 3.2 Proof Ideas for the Lower Bounds We now give an overview of proofs of our lower bounds. Interactive Learning of Unstructured Distributions. We start with the most sophisticated of our lower bounds: a lower bound for unstructured distributions with one sample per player and arbitrary communication in the blackboard model. We show that Ω((n/ε2) log n) bits of communication are needed. Thid is optimal and implies that in this case, there is no non-trivial protocol that saves more than a constant factor over the trivial one (in which O(n/ε2) samples are fully transmitted). In order to prove the lower bound, we apply the information complexity toolkit. Our lower bound holds for a family of nearly uniform distributions on [n], in which each pair of consecutive elements, (2i −1, 2i), have slightly perturbed probabilities. In the uniform distribution each element has probability 1/n. Here for each pair of elements 2i −1 and 2i, we set the probabilities to be 1 n(1 + 100δiε) and 1 n(1 −100δiε), where each δi is independently selected from the uniform distribution on {−1, 1}. Each such pair can be interpreted as a single slightly biased coin. We show that the output of any good learning protocol can be used to learn the bias δi of most of the pairs. This implies that messages exchanged in any protocol that is likely to learn the distribution have to reveal most of the biases with high constant probability. Intuitively, the goal in our analysis is to show that if a player sends much fewer than log n bits overall, this is unlikely to provide much information about that player’s sample and help much with predicting δi’s. This is done by bounding the mutual information between the transcript and the δi’s. It should be noted that our lower bound holds in the interactive setting. That is, players are unlikely to gain much by adaptively selecting when to continue providing more information about their samples. The details of the proof are deferred to the full version. Packing Lower Bounds. Some of our lower bounds are obtained via the construction of a suitable packing set. We use the well-known result that the logarithm of the size of the packing set is a lower bound on the communication complexity. This follows from using the well-known reduction from estimation to testing, in conjunction with Fano’s inequality. 4 Conclusion and Open Problems This work provides the first rigorous study of the communication complexity of nonparametric distribution estimation. We have obtained both negative results (tight lower bounds in certain regimes) and the first non-trivial upper bounds for a range of structured distributions. A number of interesting directions remain. We outline a few of them here: 1. The positive results of this work focused on discrete univariate structured distributions (e.g., histograms and monotone distributions). For what other families of structured distributions can one obtain communication-efficient algorithms? Studying multivariate structured distributions in this setting is an interesting direction for future work. 2. The results of this paper do not immediately extend to the continuous setting. Can we obtain positive results for structured continuous distributions? 3. It would be interesting to study related inference tasks in the distributed setting, including hypothesis testing and distribution property estimation. Acknowledgments The authors would like to thank the reviewers for their insightful and constructive comments. ID was supported by NSF Award CCF-1652862 (CAREER) and a Sloan Research Fellowship. EG was supported by NSF Award CCF-1649515. JL was supported by NSF CAREER Award CCF-1453261, CCF-1565235, a Google Faculty Research Award, and an NSF Graduate Research Fellowship. AN was supported in part by a grant from the Purdue Research Foundation and NSF Awards CCF-1618981 and CCF-1649515. LS was funded by a Google PhD Fellowship. 9 References [1] J. Acharya, I. Diakonikolas, C. Hegde, J. Li, and L. Schmidt. Fast and near-optimal algorithms for approximating distributions by histograms. In Proceedings of the 34th ACM Symposium on Principles of Database Systems (PODS), pages 249–263. ACM, 2015. [2] J. Acharya, I. Diakonikolas, J. Li, and L. Schmidt. Sample-optimal density estimation in nearly-linear time. In Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 1278–1289. SIAM, 2017. [3] M. F. Balcan, A. Blum, S. Fine, and Y. Mansour. Distributed learning, communication complexity and privacy. In Conference on Learning Theory, pages 26–1, 2012. [4] L. Birgé. Estimating a density under order restrictions: Nonasymptotic minimax risk. The Annals of Statistics, pages 995–1012, 1987. [5] M. Braverman, A. Garg, T. Ma, H. L. Nguyen, and D. P. Woodruff. Communication lower bounds for statistical estimation problems via a distributed data processing inequality. In Proceedings of the 48th Annual ACM Symposium on Theory of Computing, STOC 2016, pages 1011–1020, 2016. [6] S. Chan, I. Diakonikolas, R. Servedio, and X. Sun. Learning mixtures of structured distributions over discrete domains. In SODA, pages 1380–1394, 2013. [7] S. Chan, I. Diakonikolas, R. Servedio, and X. Sun. Efficient density estimation via piecewise polynomial approximation. In STOC, pages 604–613, 2014. [8] S. Chan, I. Diakonikolas, R. Servedio, and X. Sun. Near-optimal density estimation in near-linear time using variable-width histograms. In NIPS, pages 1844–1852, 2014. [9] S. Chaudhuri, R. Motwani, and V. R. Narasayya. Random sampling for histogram construction: How much is enough? In SIGMOD Conference, pages 436–447, 1998. [10] N. R. Council. Frontiers in Massive Data Analysis. The National Academies Press, Washington, DC, 2013. [11] C. Daskalakis, I. Diakonikolas, R. ODonnell, R. Servedio, and L. Y. Tan. Learning sums of independent integer random variables. In Foundations of Computer Science (FOCS), 2013 IEEE 54th Annual Symposium on, pages 217–226. IEEE, 2013. [12] C. Daskalakis, I. Diakonikolas, and R. Servedio. Learning k-modal distributions via testing. In SODA, pages 1371–1385, 2012. [13] C. Daskalakis, I. Diakonikolas, and R. Servedio. Learning poisson binomial distributions. Algorithmica, 72(1):316–357, 2015. [14] C. Daskalakis, I. Diakonikolas, R. A. Servedio, G. Valiant, and P. Valiant. Testing k-modal distributions: Optimal algorithms via reductions. In Proceedings of the Twenty-Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2013, pages 1833–1852, 2013. [15] H. Daumé III, J. Phillips, A. Saha, and S. Venkatasubramanian. Efficient protocols for distributed classification and optimization. In Algorithmic Learning Theory, pages 154–168. Springer, 2012. [16] H. Daumé III, J. Phillips, A. Saha, and S. Venkatasubramanian. Protocols for learning classifiers on distributed data. In Artificial Intelligence and Statistics, pages 282–290, 2012. [17] L. Devroye and G. Lugosi. Bin width selection in multivariate histograms by the combinatorial method. Test, 13(1):129–145, 2004. [18] L. Devroye and G. Lugosi. Combinatorial methods in density estimation. Springer Science & Business Media, 2012. [19] I. Diakonikolas. Learning structured distributions. In P. Bühlmann, P. Drineas, M. Kane, and M. van Der Laan, editors, Handbook of Big Data, Chapman & Hall/CRC Handbooks of Modern Statistical Methods, chapter 15, pages 267–284. Taylor & Francis, 2016. [20] I. Diakonikolas, D. M. Kane, and A. Stewart. Efficient robust proper learning of log-concave distributions. CoRR, abs/1606.03077, 2016. [21] J. C. Duchi, M. I. Jordan, M. J. Wainwright, and Y. Zhang. Optimality guarantees for distributed statistical estimation. ArXiv e-prints, 2014. 10 [22] D. Freedman and P. Diaconis. On the histogram as a density estimator:l2 theory. Zeitschrift für Wahrscheinlichkeitstheorie und Verwandte Gebiete, 57(4):453–476, 1981. [23] S. H. Fuller and L. I. Millett. The Future of Computing Performance: Game Over Or Next Level? National Academy Press, Washington, DC, 2011. [24] A. Garg, T. Ma, and H. Nguyen. On communication cost of distributed statistical estimation and dimensionality. In Advances in Neural Information Processing Systems (NIPS), pages 2726–2734, 2014. [25] A. C. Gilbert, S. Guha, P. Indyk, Y. Kotidis, S. Muthukrishnan, and M. Strauss. Fast, small-space algorithms for approximate histogram maintenance. In STOC, pages 389–398, 2002. [26] S. Guha, N. Koudas, and K. Shim. Approximation and streaming algorithms for histogram construction problems. ACM Trans. Database Syst., 31(1):396–438, 2006. [27] Y. Hu, H. Chen, J. g. Lou, and J. Li. Distributed density estimation using non-parametric statistics. In 27th International Conference on Distributed Computing Systems (ICDCS ’07), pages 28–28, 2007. [28] W. B. Johnson and J. Lindenstrauss. Extensions of lipschitz mappings into a hilbert space. Contemporary mathematics, 26(189-206):1–1, 1984. [29] M. I. Jordan, J. D. Lee, and Y. Yang. Communication-efficient distributed statistical learning. CoRR, abs/1605.07689, 2016. [30] R. Kannan, S. Vempala, and D. Woodruff. Principal component analysis and higher correlations for distributed data. In Conference on Learning Theory, pages 1040–1057, 2014. [31] J. Klemela. Multivariate histograms with data-dependent partitions. Statistica Sinica, 19(1):159–176, 2009. [32] W. Kowalczyk and N. A. Vlassis. Newscast EM. In Advances in Neural Information Processing Systems 17 (NIPS 2004), pages 713–720, 2004. [33] Y. Liang, M. F. Balcan, V. Kanchanapally, and D. Woodruff. Improved distributed principal component analysis. In Advances in Neural Information Processing Systems (NIPS), pages 3113–3121, 2014. [34] G. Lugosi and A. Nobel. Consistency of data-driven histogram methods for density estimation and classification. Ann. Statist., 24(2):687–706, 04 1996. [35] R. D. Nowak. Distributed EM algorithms for density estimation in sensor networks. In 2003 IEEE International Conference on Acoustics, Speech, and Signal Processing, ICASSP ’03, Hong Kong, April 6-10, 2003, pages 836–839, 2003. [36] K. Pearson. Contributions to the mathematical theory of evolution. ii. skew variation in homogeneous material. Philosophical Trans. of the Royal Society of London, 186:343–414, 1895. [37] V. Slavov and P. R. Rao. A gossip-based approach for internet-scale cardinality estimation of xpath queries over distributed semistructured data. VLDB J., 23(1):51–76, 2014. [38] N. Thaper, S. Guha, P. Indyk, and N. Koudas. Dynamic multidimensional histograms. In SIGMOD Conference, pages 428–439, 2002. [39] V. Vapnik and A. Chervonenkis. On the uniform convergence of relative frequencies of events to their probabilities. Theory Probab. Appl., 16:264–280, 1971. [40] Y. Zhang, J. Duchi, M. Jordan, and M. J. Wainwright. Information-theoretic lower bounds for distributed statistical estimation with communication constraints. In Advances in Neural Information Processing Systems (NIPS), pages 2328–2336, 2013. [41] M. Zhou, H. T. Shen, X. Zhou, W. Qian, and A. Zhou. Effective data density estimation in ring-based P2P networks. In IEEE 28th International Conference on Data Engineering (ICDE 2012), pages 594–605, 2012. 11 | 2017 | 304 |
6,791 | VAIN: Attentional Multi-agent Predictive Modeling Yedid Hoshen Facebook AI Research, NYC yedidh@fb.com Abstract Multi-agent predictive modeling is an essential step for understanding physical, social and team-play systems. Recently, Interaction Networks (INs) were proposed for the task of modeling multi-agent physical systems. One of the drawbacks of INs is scaling with the number of interactions in the system (typically quadratic or higher order in the number of agents). In this paper we introduce VAIN, a novel attentional architecture for multi-agent predictive modeling that scales linearly with the number of agents. We show that VAIN is effective for multiagent predictive modeling. Our method is evaluated on tasks from challenging multi-agent prediction domains: chess and soccer, and outperforms competing multi-agent approaches. 1 Introduction Modeling multi-agent interactions is essential for understanding the world. The physical world is governed by (relatively) well-understood multi-agent interactions including fundamental forces (e.g. gravitational attraction, electrostatic interactions) as well as more macroscopic phenomena (electrical conductors and insulators, astrophysics). The social world is also governed by multi-agent interactions (e.g. psychology and economics) which are often imperfectly understood. Games such as Chess or Go have simple and well defined rules but move dynamics are governed by very complex policies. Modeling and inference of multi-agent interaction from observational data is therefore an important step towards machine intelligence. Deep Neural Networks (DNNs) have had much success in machine perception e.g. Computer Vision [1, 2, 3], Natural Language Processing [4] and Speech Recognition [5, 6]. These problems usually have temporal and/or spatial structure, which makes them amenable to particular neural architectures - Convolutional and Recurrent Neural Networks (CNN [7] and RNN [8]). Multi-agent interactions are different from machine perception in several ways: • The data is no longer sampled on a spatial or temporal grid. • The number of agents changes frequently. • Systems are quite heterogeneous, there is not a canonical large network that can be used for finetuning. • Multi-agent systems have an obvious factorization (into point agents), whereas signals such as images and speech do not. To model simple interactions in a physics simulation context, Interaction Networks (INs) were proposed by Battaglia et al. [9]. Interaction networks model each interaction in the physical interaction graph (e.g. force between every two gravitating bodies) by a neural network. By the additive sum of the vector outputs of all the interactions, a global interaction vector is obtained. The global interaction alongside object features are then used to predict the future velocity of the object. It was shown that Interaction Networks can be trained for different numbers of physical agents 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. and generate accurate results for simple physical scenarios in which the nature of the interaction is additive and binary (i.e. pairwise interaction between two agents) and while the number of agents is small. Although Interaction Networks are suitable for the physical domain for which they were introduced, they have significant drawbacks that prevent them from being efficiently extensible to general multiagent interaction scenarios. The network complexity is O(N d) where N is the number of objects and d is the typical interaction clique size. Fundamental physics interactions simulated by the method have d = 2, resulting in a quadratic dependence and higher order interactions become completely unmanageable. In Social LSTM [10], this was remedied by pooling a local neighborhood of interactions. The solution however cannot work for scenarios with long-range interactions. Another solution offered by Battaglia et al. [9] is to add several fully connected layers modeling the high-order interactions. This approach struggles when the objective is to select one of the agents (e.g. which agent will move), as it results in a distributed representation and loses the structure of the problem. In this work we present VAIN (Vertex Attention Interaction Network), a novel multi-agent attentional neural network for predictive modeling. VAIN’s attention mechanism helps with modeling the locality of interactions and improves performance by determining which agents will share information. VAIN can be said to be a CommNet [11] with a novel attention mechanism or a factorized Interaction Network [9]. This will be made more concrete in Sec. 2. We show that VAIN can model high-order interactions with linear complexity in the number of vertices while preserving the structure of the problem, this has lower complexity than IN in cases where there are many fewer vertices than edges (in many cases linear vs quadratic in the number of agents). For evaluation we introduce two non-physical tasks which more closely resemble real-world and game-playing multi-agent predictive modeling, as well as a physical Bouncing Balls task. Our non-physical tasks are taken from Chess and Soccer and contain different types of interactions and different data regimes. The interaction graph on these tasks is not known apriori, as is typical in nature. An informal analysis of our architecture is presented in Sec. 2. Our method is presented in Sec. 3. Description of our experimental evaluation scenarios and our results are provided in Sec. 4. Conclusion and future work are presented in Sec. 5. Related Work This work is primarily concerned with learning multi-agent interactions with graph structures. The seminal works in graph neural networks were presented by Scarselli et al. [12, 13] and Li et al. [14]. Another notable iterative graph-like neural algorithm is the Neural-GPU [15]. Notable works in graph NNs includes Spectral Networks [16] and work by Duvenaud et al. [17] for fingerprinting of chemical molecules. Two related approaches that learn multi-agent interactions on a graph structure are: Interaction Networks [9] which learn a physical simulation of objects that exhibit binary relations and Communication Networks (CommNets) [11], presented for learning optimal communications between agents. The differences between our approach VAIN and previous approaches INs and CommNets are analyzed in detail in Sec. 2. Another recent approach is PointNet [18] where every point in a point cloud is embedded by a deep neural net, and all embeddings are pooled globally. The resulting descriptor is used for classification and segmentation. Although a related approach, the paper is focused on 3D point clouds rather than multi-agent systems. A different approach is presented by Social LSTM [10] which learns social interaction by jointly training multiple interacting LSTMs. The complexity of that approach is quadratic in the number of agents requiring the use of local pooling that only deals with short range interactions to limit the number of interacting bodies. The attentional mechanism in VAIN has some connection to Memory Networks [19, 20] and Neural Turning Machines [21]. Other works dealing with multi-agent reinforcement learning include [22] and [23]. There has been much work on board game bots (although the approach of modeling board games as interactions in a neural network multi agent system is new). Approaches include [24, 25] for Chess, [26, 27, 28] for Backgammons [29] for Go. 2 Concurrent work: We found on Arxiv two concurrent submissions which are relevant to this work. Santoro et al. [30] discovered that an architecture nearly identical to Interaction Nets achieves excellent performance on the CLEVR dataset [31]. We leave a comparison on CLEVR for future work. Vaswani et al. [32] use an architecture that bears similarity to VAIN for achieving state-ofthe-art performance for machine translation. The differences between our work and Vaswani et al.’s concurrent work are substantial in application and precise details. 2 Factorizing Multi-Agent Interactions In this section we give an informal analysis of the multi-agent interaction architectures presented by Interaction Networks [9], CommNets [11] and VAIN. Interaction Networks model each interaction by a neural network. For simplicity of analysis, let us restrict the interactions to be of 2nd order. Let ψint(xi, xj) be the interaction between agents Ai and Aj, and φ(xi) be the non-interacting features of agent Ai. The output is given by a function θ() of the sum of all of the interactions of Ai, P j ψint(xi, xj) and of the non-interacting features φ(xi). oi = θ( X j̸=i ψint(xi, xj), φ(xi)) (1) A single step evaluation of the output for the entire system requires O(N 2) evaluations of ψint(). An alternative architecture is presented by CommNets, where interactions are not modeled explicitly. Instead an interaction vector is computed for each agent ψcom(xi). The output is computed by: oi = θ( X j̸=i ψcom(xj), φ(xi)) (2) A single step evaluation of the CommNet architecture requires O(N) evaluations of ψcom(). A significant drawback of this representation is not explicitly modeling the interactions and putting the whole burden of modeling on θ. This can often result in weaker performance (as shown in our experiments). VAIN’s architecture preserves the complexity advantages of CommNet while addressing its limitations in comparison to IN. Instead of requiring a full network evaluation for every interaction pair ψint(xi, xj) it learns a communication vector ψc vain(xi) for each agent and additionally an attention vector ai = ψa vain(xi). The strength of interaction between agents is modulated by kernel function e|ai−aj|2. The interaction is approximated by: ψint(xi, xj) = e|ai−aj|2ψvain(xj) (3) The output is given by: oi = θ( X j̸=i e|ai−aj|2ψvain(xj), φ(xi)) (4) In cases where the kernel function is a good approximation for the relative strength of interaction (in some high-dimensional linear space), VAIN presents an efficient linear approximation for IN which preserves CommNet’s complexity in ψ(). Although physical interactions are often additive, many other interesting cases (Games, Social, Team Play) are not additive. In such cases the average instead the sum of ψ should be used (in [9] only physical scenarios were presented and therefore the sum was always used, whereas in [11] only non-physical cases were considered and therefore only averaging was used). In non-additive cases VAIN uses a softmax: Ki,j = e|ai−aj|2/ X j e|ai−aj|2 (5) 3 Model Architecture In this section we model the interaction between N agents denoted by A1...AN. The output can be either be a prediction for every agent or a system-level prediction (e.g. predict which agent will act 3 Figure 1: A schematic of a single-hop VAIN: i) The agent features Fi are embedded by singleton encoder Es() to yield encoding es i and communications encoder Ec() to yield vector ec i and attention vector ai ii) For each agent an attention-weighted sum of all embeddings ec i is computed Pi = P j wi,j ∗ec j. The attention weights wi,j are computed by a Softmax over −||ai −aj||2. The diagonal wi,i is set to zero to exclude self-interactions. iii) The singleton codes es i are concatenated with the pooled feature Pi to yield intermediate feature Ci iv) The feature is passed through decoding network D() to yield per-agent vector oi. For Regression: oi is the final output of the network. vii) For Classification: oi is scalar and is passed through a Softmax. next). Although it is possible to use multiple hops, our presentation here only uses a single hop (and they did not help in our experiments). Features are extracted for every agent Ai and we denote the features by Fi. The features are guided by basic domain knowledge (such as agent type or position). We use two agent encoding functions: i) a singleton encoder for single-agent features Es() ii) A communication encoder for interaction with other agents Ec(). The singleton encoding function Es() is applied on all agent features Fi to yield singleton encoding es i Es(Fi) = es i (6) We define the communication encoding function Ec(). The encoding function is applied to all agent features Fi to yield both encoding ec i and attention vector ai. The attention vector is used for addressing the agents with whom information exchange is sought. Ec() is implemented by fully connected neural networks (from now FCNs). Ec(Fi) = (ec i, ai) (7) For each agent we compute the pooled feature Pi, the interaction vectors from other agents weighted by attention. We exclude self-interactions by setting the self-interaction weight to 0: Pi = X j ej ∗Softmax(−||ai −aj||2) ∗(1 −δj=i) (8) This is in contrast to the average pooling mechanism used in CommNets and we show that it yields better results. The motivation is to average only information from relevant agents (e.g. nearby or particularly influential agents). The weights wi,j = Softmaxj(−||ai −aj||2) give a measure of the interaction between agents. Although naively this operation scales quadratically in the number of agents, it is multiplied by the feature dimension rather by a full E() evaluation and is therefore significantly smaller than the cost of the (linear number) of E() calculations carried out by the algorithm. In case the number of agents is very large (>1000) the cost can still be mitigated: The Softmax operation often yields a sparse matrix, in such cases the interaction can be modeled by the K-Nearest neighbors (measured by attention). The calculation is far cheaper than evaluating Ec() 4 O(N 2) times as in IN. In cases where even this cheap operation is too expensive we recommend to using CommNets as a default as they truly have an O(N) complexity. The pooled-feature Pi is concatenated to the original features Fi to form intermediate features Ci: Ci = (Pi, ei) (9) The features Ci are passed through decoding function D() which is also implemented by FCNs. The result is denoted by oi: oi = D(Ci) (10) For regression problems, oi is the per-agent output of VAIN. For classification problems, D() is designed to give scalar outputs. The result is passed through a softmax layer yielding agent probabilities: Prob(i) = Softmax(oi) (11) Several advantages of VAIN over Interaction Networks [9] are apparent: Representational Power: VAIN does not assume that the interaction graph is pre-specified (in fact the attention weights wi,j learn the graph). Pre-specifying the graph structure is advantageous when it is clearly known e.g. spring-systems where locality makes a significant difference. In many multi-agent scenarios the graph structure is not known apriori. Multiple-hops can give VAIN the potential to model higher-order interactions than IN, although this was not found to be advantageous in our experiments. Complexity: As explained in Sec. 2, VAIN features better complexity than INs. The complexity advantage increases with the order of interaction. 4 Evaluation We presented VAIN, an efficient attentional model for predictive modeling of multi-agent interactions. In this section we show that our model achieves better results than competing methods while having a lower computational complexity. We perform experiments on tasks from different multi-agent domains to highlight the utility and generality of VAIN: chess move, soccer player prediction and physical simulation. 4.1 Chess Piece Prediction Chess is a board game involving complex multi-agent interactions. Chess is difficult from a multiagent perspective due to having 12 different types of agents and non-local high-order interactions. In this experiment we do not attempt to create an optimal chess player. Rather, we are given a board position from a professional game. Our task is to identify the piece that will move next (MPP). There are 32 possible pieces, each encoded by one-hot encodings of piecetype, x position, y position. Missing pieces are encoded with all zeros. The output is the id of the piece that will move next. For training and evaluation of this task we downloaded 10k games from the FICS Games Dataset, an on-line repository of chess games. All the games used are standard games between professionally ranked players. 9k randomly sampled games were used for training, and the remaining 1k games for evaluation. Moves later in the game than 100 (i.e. 50 Black and 50 White moves), were dropped from the dataset so as not to bias it towards particularly long games. The total number of moves is around 600k. We use the following methods for evaluation: Rand: Random piece selection. FC: A standard FCN with three hidden layers (64 hidden nodes each). This method requires indexing to be learned. SMax: Each piece is encoded by neural network into a scalar "vote". The "votes" from all input pieces are fed to a Softmax classifier predicting the output label. This approach does not require learning to index, but cannot model interactions. 1hop −FC: Each piece is encoded as in SMax but to a vector rather than a scalar. A deep (3 layer) classifier predicts the MPP from the concatenation of the vectors. CommNet: A standard CommNet (no attention) [11]. The protocol for CommNet is the same as VAIN. IN: An Interaction Network followed by Softmax (as for VAIN). Inference for this IN required around 8 times more computation than VAIN and CommNet. ours −V AIN. 5 Table 1: Accuracy (%) for the Next Moving Piece (MPP) experiments. Rand FC SMax 1hop −FC CommNet IN ours 4.5 21.6 13.3 18.6 27.2 28.3 30.1 The results for next moving chess piece prediction can be seen in Table. 1. Our method clearly outperforms the competing baselines illustrating that VAIN is effective at selection type problems - i.e. selecting 1 - of- N agents according to some criterion (in this case likelihood to move). The non-interactive method SMax performs much better than Rand (+9%) due to use of statistics of moves. Interactive methods (FC, 1hot −FC, CommNet, IN and V AIN) naturally perform better as the interactions between pieces are important for deciding the next mover. It is interesting that the simple FC method performs better than 1hop −FC (+3%), we think this is because the classifier in 1hop−FC finds it hard to recover the indexes after the average pooling layer. This shows that one-hop networks followed by fully connected classifiers (such as the original formulation of Interaction Networks) struggle at selection-type problems. Our method V AIN performs much better than 1hop −IN (11.5%) due to the per-vertex outputs oi, and coupling between agents. V AIN also performs significantly better than FC (+8.5%) as it does not have to learn indexing. It outperforms vanilla CommNet by 2.9%, showing the advantages of our attentional mechanism. It also outperforms INs followed by a per-agent Softmax (similarly to the formulation for VAIN) by 1.8% even though the IN performs around 8 times more computation than VAIN. 4.2 Soccer Players Team-player interaction is a promising application area for end-to-end multi-agent modeling as the rules of sports interaction are quite complex and not easily formulated by hand-coded rules. An additional advantage is that predictive modeling can be self-supervised and no labeled data is necessary. In team-play situations many agents may be present and interacting at the same time making the complexity of the method critical for its application. In order to evaluate the performance of VAIN on team-play interactions, we use the Soccer Video and Player Position Dataset (SVPP) [33]. The SVPP dataset contains the parameters of soccer players tracked during two home matches played by Tromsø IL, a Norwegian soccer team. The sensors were positioned on each home team player, and recorded the player’s location, heading direction and movement velocity (as well as other parameters that we did not use in this work). The data was re-sampled by [33] to occur at regular 20 Hz intervals. We further subsampled the data to 2 Hz. We only use sensor data rather than raw-pixels. End-to-end inference from raw-pixel data is left to future work. The task that we use for evaluation is predicting from the current state of all players, the position of each player for each time-step during the next 4 seconds (i.e. at T + 0.5, T + 1.0 ... T + 4.0). Note that for this task, we just use a single frame rather than several previous frames, and therefore do not use RNN encoders for this task. We use the following methods for evaluation: Static: trivial prediction of 0-motion. PALV : Linearly extrapolating the agent displacement by the current linear velocity. PALAF: A linear regressor predicting the agent’s velocity using all features including the velocity, but also the agent’s heading direction and most significantly the agent’s current field position. PAD: a predictive model using all the above features but using three fully-connected layers (with 256, 256 and 16 nodes). CommNet: A standard CommNet (no attention) [11]. The protocol for CommNet is the same as VAIN. IN: An Interaction Network [9], requiring O(N 2) network evaluations. ours: VAIN. We excluded the second half of the Anzhi match due to large sensor errors for some of the players (occasional 60m position changes in 1-2 seconds). A few visualizations of the Soccer scenario can be seen in Fig. 4. The positions of the players are indicated by green circles, apart from a target player (chosen by us), that is indicated by a blue circle. The brightness of each circle is chosen to be proportional to the strength of attention between each player and the target player. Arrows are proportional to player velocity. We can see in this scenario that the attention to nearest players (attackers to attackers, midfielder to midfielders) is strongest, but attention is given to all field players. The goal keeper normally receives no attention (due to being 6 Figure 2: a) A soccer match used for the Soccer task. b) A chess position illustrating the high-order nature of the interactions in next move prediction. Note that in both cases, VAIN uses agent positional and sensor data rather than raw-pixels. Table 2: Soccer Prediction errors (meters). Experiments Methods Dataset Time-step Static PALV PALAF PAD IN CommNet ours 0.5 0.54 0.14 0.14 0.14 0.16 0.15 0.14 1103a 2.0 1.99 1.16 1.14 1.13 1.09 1.10 1.09 4.0 3.58 2.67 2.62 2.58 2.47 2.48 2.47 0.5 0.49 0.13 0.13 0.13 0.14 0.13 0.13 1103b 2.0 1.81 1.06 1.06 1.04 1.02 1.02 1.02 4.0 3.27 2.42 2.41 2.38 2.30 2.31 2.30 0.5 0.61 0.17 0.17 0.17 0.17 0.17 0.17 1107a 2.0 2.23 1.36 1.34 1.32 1.26 1.26 1.25 4.0 3.95 3.10 3.03 2.99 2.82 2.81 2.79 Mean 1.84 1.11 1.10 1.08 1.04 1.04 1.03 far away, and in normal situations not affecting play). This is an example of mean-field rather than sparse attention. We evaluated our methods on the SVPP dataset. The prediction errors in Table. 2 are broken down for different time-steps and for different train / test datasets splits. It can be seen that the non-interactive baselines generally fare poorly on this task as the general configuration of agents is informative for the motion of agents beyond a simple extrapolation of motion. Examples of patterns than can be picked up include: running back to the goal to help the defenders, running up to the other team’s goal area to join an attack. A linear model including all the features performs better than a velocity only model (as position is very informative). A non-linear per-player model with all features improves on the linear models. The interaction network, CommNet and VAIN significantly outperform the non-interactive methods. VAIN outperformed CommNet and IN, achieving this with only 4% of the number of encoder evaluations performed by IN. This validates our premise that VAIN’s architecture can model object interactions without modeling each interaction explicitly. 4.3 Bouncing Balls Following Battaglia et al. [9], we present a simple physics-based experiment. In this scenario, balls are bouncing inside a 2D square container of size L. There are N identical balls (we use N = 50) which are of constant size and are perfectly elastic. The balls are initialized at random positions and with initial velocities sampled at random from [−v0..v0] (we use v0 = 3ms−1). The balls collide with other balls and with the walls, where the collisions are governed by the laws of elastic collisions. The task which we evaluate is the prediction of the displacement and change in velocity of each ball in the next time step. We evaluate the prediction accuracy of our method V AIN as well as Interaction Networks [9] and CommNets [11]. We found it useful to replace VAIN’s attention mechanism by an unnormalized attention function due to the additive nature of physical forces: pi,j = e−||ai−aj||2 −δi,j (12) In Fig. 4 we can observe the attention maps for two different balls in the Bouncing Balls scenario. The position of the ball is represented by a circle. The velocity of each ball is indicated by a line 7 Figure 3: Accuracy differences between VAIN and IN for different computation budgets: VAIN outperforms IN by spending its computation budget on a few larger networks (one for each agent) rather than many small networks (one for every pair of agents). This is even more significant for small computation budgets. Table 3: RMS accuracy of Bouncing Ball next step prediction. VEL0 VEL-CONST COMMNET IN VAIN RMS 0.561 0.547 0.510 0.139 0.135 extending from the center of the circle, the length of the line is proportional to the speed of the ball. For each figure we choose a target ball Ai, and paint it blue. The attention strength of each agent Aj with respect to Ai is indicated by the shade of the circle. The brighter the circle, the stronger the attention. In the first scenario we observe that the two balls near the target receive attention whereas other balls are suppressed. This shows that the system exploits the sparsity due to locality that is inherent to this multi-agent system. In the second scenario we observe, that the ball on a collision course with the target receives much stronger attention, relative to a ball that is much closer to the target but is not likely to collide with it. This indicates VAIN learns important attention features beyond the simple positional hand-crafted features typically used. The results of our bouncing balls experiments can be seen in Tab. 3. We see that in this physical scenario VAIN significantly outperformed CommNets, and achieves better performance than Interaction Networks for similar computation budgets. In Fig. 4.2 we see that the difference increases for small computation budgets. The attention mechanism is shown to be critical to the success of the method. 4.4 Analysis and Limitations Our experiments showed that VAIN achieves better performance than other architectures with similar complexity and equivalent performance to higher complexity architectures, mainly due to its attention mechanism. There are two ways in which the attention mechanism implicitly encodes the interactions of the system: i) Sparse: if only a few agents significantly interact with agent ao, the attention mechanism will highlight these agents (finding K spatial nearest neighbors is a special case of such attention). In this case CommNets will fail. ii) Mean-field: if a space can be found where the important interactions act in an additive way, (e.g. in soccer team dynamics scenario), the attention mechanism would find the correct weights for the mean field. In this case CommNets would work, but VAIN can still improve on them. VAIN is less well-suited for cases where both: interactions are not sparse such that the K most important interactions will not give a good representation and where the interactions are strong and highly non-linear so that a mean-field approximation is non-trivial. One such scenario is the M body gravitation problem. Interaction Networks are particularly well suited for this scenario and VAIN’s factorization will not yield an advantage. Implementation 8 Bouncing Balls (a) Bouncing Balls (b) Soccer (a) Soccer (b) Figure 4: A visualization of attention in the Bouncing Balls and Soccer scenarios. The target ball is blue, and others are green. The brightness of each ball indicates the strength of attention with respect to the (blue) target ball. The arrows indicate direction of motion. Bouncing Balls: Left image: The ball nearer to target ball receives stronger attention. Right image: The ball on collision course with the target ball receives much stronger attention than the nearest neighbor of the target ball. Soccer: This is an example of mean-field type attention, where the nearest-neighbors receive privileged attention, but also all other field players receive roughly equal attention. The goal keeper typically receives no attention due to being far away. Soccer: The encoding and decoding functions Ec(), Es() and D() were implemented by fullyconnected neural networks with two layers, each of 256 hidden units and with ReLU activations. The encoder outputs had 128 units. For IN each layer was followed by a BatchNorm layer (otherwise the system converged slowly to a worse minimum). For VAIN no BatchNorm layers were used. Chess: The encoding and decoding functions E() and D() were implemented by fully-connected neural networks with three layers, each of width 64 and with ReLU activations. They were followed by BatchNorm layers for both IN and VAIN. Bouncing Balls: The encoding and decoding function Ec(), Es() and D() were implemented with FCNs with 256 hidden units and three layer. The encoder outputs had 128 units. No BatchNorm units were used. For Soccer, Ec() and D() architectures for VAIN and IN was the same. For Chess we evaluate INs with Ec() being 4 times smaller than for VAIN, this still takes 8 times as much computation as used by VAIN. For Bouncing Balls the computation budget was balanced between VAIN and IN by decreasing the number of hidden units in Ec() for IN by a constant factor. In all scenarios the attention vector ai is of dimension 10 and shared features with the encoding vectors ei. Regression problems were trained with L2 loss, and classification problems were trained with cross-entropy loss. All methods were implemented in PyTorch [34] in a Linux environment. End-to-end optimization was carried out using ADAM [35] with α = 1e−3 and no L2 regularization was used. The learning rate was halved every 10 epochs. The chess prediction training for the MPP took several hours on a M40 GPU, other tasks had shorter training times due to smaller datasets. 5 Conclusion and Future Work We have shown that VAIN, a novel architecture for factorizing interaction graphs, is effective for predictive modeling of multi-agent systems with a linear number of neural network encoder evaluations. We analyzed how our architecture relates to Interaction Networks and CommNets. Examples were shown where our approach learned some of the rules of the multi-agent system. An interesting future direction to pursue is interpreting the rules of the game in symbolic form, from VAIN’s attention maps wi,j. Initial experiments that we performed have shown that some chess rules can be learned (movement of pieces, relative values of pieces), but further research is required. Acknowledgement We thank Rob Fergus for significant contributions to this work. We also thank Gabriel Synnaeve and Arthur Szlam for fruitful comments on the manuscript. 9 References [1] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [2] Yaniv Taigman, Ming Yang, Marc’Aurelio Ranzato, and Lior Wolf. Deepface: Closing the gap to human-level performance in face verification. In CVPR, 2014. [3] Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In CVPR, 2015. [4] Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016. [5] Geoffrey Hinton, Li Deng, Dong Yu, George E Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara N Sainath, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 2012. [6] Dario Amodei, Rishita Anubhai, Eric Battenberg, Carl Case, Jared Casper, Bryan Catanzaro, Jingdong Chen, Mike Chrzanowski, Adam Coates, Greg Diamos, et al. Deep speech 2: End-toend speech recognition in english and mandarin. In ICML, 2016. [7] Yann LeCun, Bernhard Boser, John S Denker, Donnie Henderson, Richard E Howard, Wayne Hubbard, and Lawrence D Jackel. Backpropagation applied to handwritten zip code recognition. Neural computation, 1989. [8] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 1997. [9] Peter Battaglia, Razvan Pascanu, Matthew Lai, Danilo Jimenez Rezende, et al. Interaction networks for learning about objects, relations and physics. In NIPS, 2016. [10] Alexandre Alahi, Kratarth Goel, Vignesh Ramanathan, Alexandre Robicquet, Li Fei-Fei, and Silvio Savarese. Social lstm: Human trajectory prediction in crowded spaces. In CVPR, 2016. [11] Sainbayar Sukhbaatar, Rob Fergus, et al. Learning multiagent communication with backpropagation. In NIPS, 2016. [12] Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 2009. [13] Marco Gori, Gabriele Monfardini, and Franco Scarselli. A new model for learning in graph domains. In IJCNN, 2005. [14] Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. Gated graph sequence neural networks. ICLR, 2016. [15] Łukasz Kaiser and Ilya Sutskever. Neural gpus learn algorithms. ICLR, 2016. [16] Joan Bruna, Wojciech Zaremba, Arthur Szlam, and Yann LeCun. Spectral networks and locally connected networks on graphs. ICLR, 2014. [17] David K Duvenaud, Dougal Maclaurin, Jorge Iparraguirre, Rafael Bombarell, Timothy Hirzel, Alán Aspuru-Guzik, and Ryan P Adams. Convolutional networks on graphs for learning molecular fingerprints. In NIPS, 2015. [18] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. CVPR, 2017. [19] Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. arXiv preprint arXiv:1410.3916, 2014. 10 [20] Sainbayar Sukhbaatar, Jason Weston, and Rob Fergus. End-to-end memory networks. In NIPS, 2015. [21] Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014. [22] Nicolas Usunier, Gabriel Synnaeve, Zeming Lin, and Soumith Chintala. Episodic exploration for deep deterministic policies: An application to starcraft micromanagement tasks. ICLR, 2017. [23] Peng Peng, Quan Yuan, Ying Wen, Yaodong Yang, Zhenkun Tang, Haitao Long, and Jun Wang. Multiagent bidirectionally-coordinated nets for learning to play starcraft combat games. arXiv preprint arXiv:1703.10069, 2017. [24] David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016. [25] Yuandong Tian and Yan Zhu. Better computer go player with neural network and long-term prediction. ICLR, 2016. [26] Murray Campbell, A Joseph Hoane, and Feng-hsiung Hsu. Deep blue. Artificial intelligence, 2002. [27] Matthew Lai. Giraffe: Using deep reinforcement learning to play chess. arXiv preprint arXiv:1509.01549, 2015. [28] Omid E David, Nathan S Netanyahu, and Lior Wolf. Deepchess: End-to-end deep neural network for automatic learning in chess. In ICANN, 2016. [29] Gerald Tesauro. Neurogammon: A neural-network backgammon program. In IJCNN, 1990. [30] Adam Santoro, David Raposo, David GT Barrett, Mateusz Malinowski, Razvan Pascanu, Peter Battaglia, and Timothy Lillicrap. A simple neural network module for relational reasoning. arXiv preprint arXiv:1706.01427, 2017. [31] Justin Johnson, Bharath Hariharan, Laurens van der Maaten, Li Fei-Fei, C Lawrence Zitnick, and Ross Girshick. Clevr: A diagnostic dataset for compositional language and elementary visual reasoning. arXiv preprint arXiv:1612.06890, 2016. [32] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017. [33] Svein Arne Pettersen, Dag Johansen, Håvard Johansen, Vegard Berg-Johansen, Vamsidhar Reddy Gaddam, Asgeir Mortensen, Ragnar Langseth, Carsten Griwodz, Håkon Kvale Stensland, and Pål Halvorsen. Soccer video and player position dataset. In Proceedings of the 5th ACM Multimedia Systems Conference, pages 18–23. ACM, 2014. [34] https://github.com/pytorch/pytorch/, 2017. [35] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. ICLR, 2015. 11 | 2017 | 305 |
6,792 | Hierarchical Attentive Recurrent Tracking Adam R. Kosiorek Department of Engineering Science University of Oxford adamk@robots.ox.ac.uk Alex Bewley Department of Engineering Science University of Oxford bewley@robots.ox.ac.uk Ingmar Posner Department of Engineering Science University of Oxford ingmar@robots.ox.ac.uk Abstract Class-agnostic object tracking is particularly difficult in cluttered environments as target specific discriminative models cannot be learned a priori. Inspired by how the human visual cortex employs spatial attention and separate “where” and “what” processing pathways to actively suppress irrelevant visual features, this work develops a hierarchical attentive recurrent model for single object tracking in videos. The first layer of attention discards the majority of background by selecting a region containing the object of interest, while the subsequent layers tune in on visual features particular to the tracked object. This framework is fully differentiable and can be trained in a purely data driven fashion by gradient methods. To improve training convergence, we augment the loss function with terms for auxiliary tasks relevant for tracking. Evaluation of the proposed model is performed on two datasets: pedestrian tracking on the KTH activity recognition dataset and the more difficult KITTI object tracking dataset. 1 Introduction In computer vision, designing an algorithm for model-free tracking of anonymous objects is challenging, since no target-specific information can be gathered a priori and yet the algorithm has to handle target appearance changes, varying lighting conditions and occlusion. To make it even more difficult, the tracked object often constitutes but a small fraction of the visual field. The remaining parts may contain distractors, which are visually salient objects resembling the target but hold no relevant information. Despite this fact, recent models often process the whole image, which exposes them to noise and increases the associated computational cost or they use heuristic methods to decrease the size of search regions. This in contrast to human visual perception, which does not process the visual field in its entirety, but rather acknowledges it briefly and focuses on processing small fractions thereof, which we dub visual attention. Attention mechanisms have recently been explored in machine learning in a wide variety of contexts [27, 14], often providing new capabilities to machine learning algorithms [11, 12, 7]. While they improve efficiency [22] and performance on state-of-the-art machine learning benchmarks [27], their architecture is much simpler than that of the mechanisms found in the human visual cortex [5]. Attention has also been long studied by neuroscientists [18], who believe that it is crucial for visual perception and cognition [4], since it is inherently tied to the architecture of the visual cortex and can affect the information flow inside it. Whenever more than one visual stimulus is present in the receptive field of a neuron, all the stimuli compete for computational resources due to the limited processing capacity. Visual attention can lead to suppression of distractors by reducing the size of 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. (a) (b) (c) Figure 1: KITTI image with the ground-truth and predicted bounding boxes and an attention glimpse. The lower row corresponds to the hierarchical attention of our model: 1st layer extracts an attention glimpse (a), the 2nd layer uses appearance attention to build a location map (b). The 3rd layer uses the location map to suppress distractors, visualised in (c). the receptive field of a neuron and by increasing sensitivity at a given location in the visual field (spatial attention). It can also amplify activity in different parts of the cortex, which are specialised in processing different types of features, leading to response enhancement with respect to those features (appearance attention). The functional separation of the visual cortex is most apparent in two distinct processing pathways. After leaving the eye, the sensory inputs enter the primary visual cortex (known as V1) and then split into the dorsal stream, responsible for estimating spatial relationships (where), and the ventral stream, which targets appearance-based features (what). Inspired by the general architecture of the human visual cortex and the role of attention mechanisms, this work presents a biologically-inspired recurrent model for single object tracking in videos (cf. section 3). Tracking algorithms typically use simple motion models and heuristics to decrease the size of the search region. It is interesting to see whether neuroscientific insights can aid our computational efforts, thereby improving the efficiency and performance of single object tracking. It is worth noting that visual attention can be induced by the stimulus itself (due to, e. g., high contrast) in a bottom-up fashion or by back-projections from other brain regions and working memory as top-down influence. The proposed approach exploits this property to create a feedback loop that steers the three layers of visual attention mechanisms in our hierarchical attentive recurrent tracking (HART) framework, see Figure 1. The first stage immediately discards spatially irrelevant input, while later stages focus on producing target-specific filters to emphasise visual features particular to the object of interest. The resulting framework is end-to-end trainable and we resort to maximum likelihood estimation (MLE) for parameter learning. This follows from our interest in estimating the distribution over object locations in a sequence of images, given the initial location from whence our tracking commenced. Formally, given a sequence of images x1:T ∈RH×W ×C, where the superscript denotes height, width and the number of channels of the image, respectively, and an initial location for the tracked object given by a bounding box b1 ∈R4, the conditional probability distribution factorises as p(b2:T | x1:T , b1) = Z p(h1 | x1, b1) T Y t=2 Z p(bt | ht)p(ht | xt, bt−1, ht−1) dht dh1, (1) where we assume that motion of an object can be described by a Markovian state ht. Our bounding box estimates are given by bb2:T , found by the MLE of the model parameters. In sum, our contributions are threefold: Firstly, a hierarchy of attention mechanisms that leads to suppressing distractors and computational efficiency is introduced. Secondly, a biologically plausible combination of attention mechanisms and recurrent neural networks is presented for object tracking. Finally, our attentionbased tracker is demonstrated using real-world sequences in challenging scenarios where previous recurrent attentive trackers have failed. Next we briefly review related work (Section 2) before describing how information flows through the components of our hierarchical attention in Section 3. Section 4 details the losses applied to guide the attention. Section 5 presents experiments on KTH and KITTI datasets with comparison to related attention-based trackers. Section 6 discusses the results and intriguing properties of our framework and Section 7 concludes the work. Code and results are available online1. 1https://github.com/akosiorek/hart 2 2 Related Work A number of recent studies have demonstrated that visual content can be captured through a sequence of spatial glimpses or foveation [22, 12]. Such a paradigm has the intriguing property that the computational complexity is proportional to the number of steps as opposed to the image size. Furthermore, the fovea centralis in the retina of primates is structured with maximum visual acuity in the centre and decaying resolution towards the periphery, Cheung et al. [4] show that if spatial attention is capable of zooming, a regular grid sampling is sufficient. Jaderberg et al. [14] introduced the spatial transformer network (STN) which provides a fully differentiable means of transforming feature maps, conditioned on the input itself. Eslami et al. [7] use the STN as a form of attention in combination with a recurrent neural network (RNN) to sequentially locate and identify objects in an image. Moreover, Eslami et al. [7] use a latent variable to estimate the presence of additional objects, allowing the RNN to adapt the number of time-steps based on the input. Our spatial attention mechanism is based on the two dimensional Gaussian grid filters of [16] which is both fully differentiable and more biologically plausible than the STN. Whilst focusing on a specific location has its merits, focusing on particular appearance features might be as important. A policy with feedback connections can learn to adjust filters of a convolutional neural network (CNN), thereby adapting them to features present in the current image and improving accuracy [25]. De Brabandere et al. [6] introduced dynamic filter network (DFN), where filters for a CNN are computed on-the-fly conditioned on input features, which can reduce model size without performance loss. Karl et al. [17] showed that an input-dependent state transitions can be helpful for learning latent Markovian state-space system. While not the focus of this work, we follow this concept in estimating the expected appearance of the tracked object. In the context of single object tracking, both attention mechanisms and RNNs appear to be perfectly suited, yet their success has mostly been limited to simple monochromatic sequences with plain backgrounds [16]. Cheung [3] applied STNs [14] as attention mechanisms for real-world object tracking, but failed due to exploding gradients potentially arising from the difficulty of the data. Ning et al. [23] achieved competitive performance by using features from an object detector as inputs to a long-short memory network (LSTM), but requires processing of the whole image at each time-step. Two recent state-of-the-art trackers employ convolutional Siamese networks which can be seen as an RNN unrolled over two time-steps [13, 26]. Both methods explicitly process small search areas around the previous target position to produce a bounding box offset [13] or a correlation response map with the maximum corresponding to the target position [26]. We acknowledge the recent work2 of Gordon et al. [10] which employ an RNN based model and use explicit cropping and warping as a form of non-differentiable spatial attention. The work presented in this paper is closest to [16] where we share a similar spatial attention mechanism which is guided through an RNN to effectively learn a motion model that spans multiple time-steps. The next section describes our additional attention mechanisms in relation to their biological counterparts. 3 Hierarchical Attention xt Spatial Attention gt V1 Dorsal Stream Ventral Stream st νt ⊙ vt ht−1 LSTM ht ot ˜st ot MLP αt+1 ∆bbt at+1 Figure 2: Hierarchical Attentive Recurrent Tracking. Spatial attention extracts a glimpse gt from the input image xt. V1 and the ventral stream extract appearance-based features νt while the dorsal stream computes a foreground/background segmentation st of the attention glimpse. Masked features vt contribute to the working memory ht. The LSTM output ot is then used to compute attention at+1, appearance αt+1 and a bounding box correction ∆bbt. Dashed lines correspond to temporal connections, while solid lines describe information flow within one time-step. 2[10] only became available at the time of submitting this paper. 3 gt Shared CNN DFN CNN ⊙ vt αt Figure 3: Architecture of the appearance attention. V1 is implemented as a CNN shared among the dorsal stream (DFN) and the ventral stream (CNN). The ⊙symbol represents the Hadamard product and implements masking of visual features by the foreground/background segmentation. Inspired by the architecture of the human visual cortex, we structure our system around working memory responsible for storing the motion pattern and an appearance description of the tracked object. If both quantities were known, it would be possible to compute the expected location of the object at the next time step. Given a new frame, however, it is not immediately apparent which visual features correspond to the appearance description. If we were to pass them on to an RNN, it would have to implicitly solve a data association problem. As it is non-trivial, we prefer to model it explicitly by outsourcing the computation to a separate processing stream conditioned on the expected appearance. This results in a location-map, making it possible to neglect features inconsistent with our memory of the tracked object. We now proceed with describing the information flow in our model. Given attention parameters at, the spatial attention module extracts a glimpse gt from the input image xt. We then apply appearance attention, parametrised by appearance αt and comprised of V1 and dorsal and ventral streams, to obtain object-specific features vt, which are used to update the hidden state ht of an LSTM. The LSTM’s output is then decoded to predict both spatial and appearance attention parameters for the next time-step along with a bounding box correction ∆bbt for the current time-step. Spatial attention is driven by top-down signal at, while appearance attention depends on top-down αt as well as bottom-up (contents of the glimpse gt) signals. Bottom-up signals have local influence and depend on stimulus salience at a given location, while top-down signals incorporate global context into local processing. This attention hierarchy, further enhanced by recurrent connections, mimics that of the human visual cortex [18]. We now describe the individual components of the system. Spatial Attention Our spatial attention mechanism is similar to the one used by Kahoú et al. [16]. Given an input image xt ∈RH×W , it creates two matrices Ax t ∈Rw×W and Ay t ∈Rh×H, respectively. Each matrix contains one Gaussian per row; the width and positions of the Gaussians determine which parts of the image are extracted as the attention glimpse. Formally, the glimpse gt ∈Rh×w is defined as gt = Ay t xt (Ax t )T . (2) Attention is described by centres µ of the Gaussians, their variances σ2 and strides γ between centers of Gaussians of consecutive rows of the matrix, one for each axis. In contrast to the work by Kahoú et al. [16], only centres and strides are estimated from the hidden state of the LSTM, while the variance depends solely on the stride. This prevents excessive aliasing during training caused when predicting a small variance (compared to strides) leading to smoother convergence. The relationship between variance and stride is approximated using linear regression with polynomial basis functions (up to 4th order) before training the whole system. The glimpse size we use depends on the experiment. Appearance Attention This stage transforms the attention glimpse gt into a fixed-dimensional vector vt comprising appearance and spatial information about the tracked object. Its architecture depends on the experiment. In general, however, we implement V1 : Rh×w →Rhv×wv×cv as a number of convolutional and max-pooling layers. They are shared among later processing stages, which corresponds to the primary visual cortex in humans [5]. Processing then splits into ventral and dorsal streams. The ventral stream is implemented as a CNN, and handles visual features and outputs feature maps νt. The dorsal stream, implemented as a DFN, is responsible for handling spatial relationships. Let MLP(·) denote a multi-layered perceptron. The dorsal stream uses appearance αt to dynamically compute convolutional filters ψa×b×c×d t , where the superscript denotes the size of the filters and the number of input and output feature maps, as Ψt = n ψai×bi×ci×di t oK i=1 = MLP(αt). (3) The filters with corresponding nonlinearities form K convolutional layers applied to the output of V1. Finally, a convolutional layer with a 1 × 1 kernel and a sigmoid non-linearity is applied to transform the output into a spatial Bernoulli distribution st. Each value in st represents the probability of the tracked object occupying the corresponding location. 4 The location map of the dorsal stream is combined with appearance-based features extracted by the ventral stream, to imitate the distractor-suppressing behaviour of the human brain. It also prevents drift and allows occlusion handling, since object appearance is not overwritten in the hidden state when input does not contain features particular to the tracked object. Outputs of both streams are combined as3 vt = MLP(vec(νt ⊙st)), (4) with ⊙being the Hadamard product. State Estimation Our approach relies on being able to predict future object appearance and location, and therefore it heavily depends on state estimation. We use an LSTM, which can learn to trade-off spatio-temporal and appearance information in a data-driven fashion. It acts like a working memory, enabling the system to be robust to occlusions and oscillating object appearance e. g., when an object rotates and comes back to the original orientation. ot, ht = LSTM(vt, ht−1), (5) αt+1, ∆at+1, ∆bbt = MLP(ot, vec(st)), (6) at+1 = at + tanh(c)∆at+1, (7) bbt = at + ∆bbt (8) Equations (5) to (8) detail the state updates. Spatial attention at time t is formed as a cumulative sum of attention updates from times t = 1 to t = T, where c is a learnable parameter initialised to a small value to constrain the size of the updates early in training. Since the spatial-attention mechanism is trained to predict where the object is going to go (Section 4), the bounding box bbt is estimated relative to attention at time t. 4 Loss We train our system by minimising a loss function comprised of: a tracking loss term, a set of terms for auxiliary tasks and regularisation terms. Auxiliary tasks are essential for real-world data, since convergence does not occur without them. They also speed up learning and lead to better performance for simpler datasets. Unlike the auxiliary tasks used by Jaderberg et al. [15], ours are relevant for our main objective — object tracking. In order to limit the number of hyperparameters, we automatically learn loss weighting. The loss L(·) is given by LHART(D, θ) = λtLt(D, θ) + λsLs(D, θ) + λaLa(D, θ) + R(λ) + βR(D, θ), (9) with dataset D = n (x1:T , b1:T )ioM i=1, network parameters θ, regularisation terms R(·), adaptive weights λ = {λt, λs, λd} and a regularisation weight β. We now present and justify components of our loss, where expectations E[·] are evaluated as an empirical mean over a minibatch of samples xi 1:T , bi 1:T M i=1, where M is the batch size. Tracking To achieve the main tracking objective (localising the object in the current frame), we base the first loss term on Intersection-over-Union (IoU) of the predicted bounding box w. r. t. the ground truth, where the IoU of two bounding boxes is defined as IoU(a, b) = a∩b a∪b = area of overlap area of union . The IoU is invariant to object and image scale, making it a suitable proxy for measuring the quality of localisation. Even though it (or an exponential thereof) does not correspond to any probability distribution (as it cannot be normalised), it is often used for evaluation [20]. We follow the work by Yu et al. [28] and express the loss term as the negative log of IoU: Lt(D, θ) = Ep(bb1:T |x1:T ,b1) h −log IoU(bbt, bt) i , (10) with IoU clipped for numerical stability. 3vec : Rm×n →Rmn is the vectorisation operator, which stacks columns of a matrix into a column vector. 5 time Figure 4: Tracking results on KTH dataset [24]. Starting with the first initialisation frame where all three boxes overlap exactly, time flows from left to right showing every 16th frame of the sequence captured at 25fps. The colour coding follows from Figure 1. The second row shows attention glimpses multiplied with appearance attention. Spatial Attention Spatial attention singles out the tracked object from the image. To estimate its parameters, the system has to predict the object’s motion. In case of an error, especially when the attention glimpse does not contain the tracked object, it is difficult to recover. As the probability of such an event increases with decreasing size of the glimpse, we employ two loss terms. The first one constrains the predicted attention to cover the bounding box, while the second one prevents it from becoming too large, where the logarithmic arguments are appropriately clipped to avoid numerical instabilities: Ls(D, θ) = Ep(a1:T |x1:T ,b1) −log at ∩bt area(bt) −log(1 −IoU(at, xt)) . (11) Appearance Attention The purpose of appearance attention is to suppress distractors while keeping full view of the tracked object e. g., focus on a particular pedestrian moving within a group. To guide this behaviour, we put a loss on appearance attention that encourages picking out only the tracked object. Let τ(at, bt) : R4 × R4 →{0, 1}hv×wv be a target function. Given the bounding box b and attention a, it outputs a binary mask of the same size as the output of V1. The mask corresponds to the the glimpse g, with the value equal to one at every location where the bounding box overlaps with the glimpse and equal to zero otherwise. If we take H(p, q) = −P z p(z) log q(z) to be the cross-entropy, the loss reads La(D, θ) = Ep(a1:T ,s1:T |x1:T ,b1)[H(τ(at, bt), st)]. (12) Regularisation We apply the L2 regularisation to the model parameters θ and to the expected value of dynamic parameters ψt(αt) as R(D, θ) = 1 2∥θ∥2 2 + 1 2
Ep(α1:T |x1:T ,b1)[Ψt | αt]
2 2. Adaptive Loss Weights To avoid hyper-parameter tuning, we follow the work by Kendall et al. [19] and learn the loss weighting λ. After initialising the weights with a vector of ones, we add the following regularisation term to the loss function: R(λ) = −P i log(λ−1 i ). 5 Experiments 5.1 KTH Pedestrian Tracking Kahoú et al. [16] performed a pedestrian tracking experiment on the KTH activity recognition dataset [24] as a real-world case-study. We replicate this experiment for comparison. We use code provided by the authors for data preparation and we also use their pre-trained feature extractor. Unlike them, we did not need to upscale ground-truth bounding boxes by a factor of 1.5 and then downscale them again for evaluation. We follow the authors and set the glimpse size (h, w) = (28, 28). We replicate the training procedure exactly, with the exception of using the RMSProp optimiser [9] with learning rate of 3.33 × 10−5 and momentum set to 0.9 instead of the stochastic gradient descent with momentum. The original work reported an IoU of 55.03% on average, on test data, while the presented work achieves an average IoU score of 77.11%, reducing the relative error by almost a factor of two. Figure 4 presents qualitative results. 5.2 Scaling to Real-World Data: KITTI Since we demonstrated that pedestrian tracking is feasible using the proposed architecture, we proceed to evaluate our model in a more challenging multi-class scenario on the KITTI dataset [8]. It consists 6 Figure 5: IoU curves on KITTI over 60 timesteps. HART (train) presents evaluation on the train set (we do not overfit). Method Avg. IoU Kahoú et al. [16] 0.14 Spatial Att 0.60 App Att 0.78 HART 0.81 Table 1: Average IoU on KITTI over 60 time-steps. of 21 high resolution video sequences with multiple instances of the same class posing as potential distractors. We split all sequences into 80/20 sequences for train and test sets, respectively. As images in this dataset are much more varied, we implement V1 as the first three convolutional layers of a modified AlexNet [1]. The original AlexNet takes inputs of size 227 × 227 and downsizes them to 14 × 14 after conv3 layer. Since too low resolution would result in low tracking performance, and we did not want to upsample the extracted glimpse, we decided to replace the initial stride of four with one and to skip one of the max-pooling operations to conserve spatial dimensions. This way, our feature map has the size of 14 × 14 × 384 with the input glimpse of size (h, w) = (56, 56). We apply dropout with probability 0.25 at the end of V1. The ventral stream is comprised of a single convolutional layer with a 1 × 1 kernel and five output feature maps. The dorsal stream has two dynamic filter layers with kernels of size 1 × 1 and 3 × 3, respectively and five feature maps each. We used 100 hidden units in the RNN with orthogonal initialisation and Zoneout [21] with probability set to 0.05. The system was trained via curriculum learning [2], by starting with sequences of length five and increasing sequence length every 13 epochs, with epoch length decreasing with increasing sequence length. We used the same optimisation settings, with the exception of the learning rate, which we set to 3.33 × 10−6. Table 1 and Figure 5 contain results of different variants of our model and of the RATM tracker by Kahoú et al. [16] related works. Spatial Att does not use appearance attention, nor loss on attention parameters. App Att does not apply any loss on appearance attention, while HART uses all described modules; it is also our biggest model with 1.8 million parameters. Qualitative results in the form of a video with bounding boxes and attention are available online 4. We implemented the RATM tracker of Kahoú et al. [16] and trained with the same hyperparameters as our framework, since both are closely related. It failed to learn even with the initial curriculum of five time-steps, as RATM cannot integrate the frame xt into the estimate of bt (it predicts location at the next time-step). Furthermore, it uses feature-space distance between ground-truth and predicted attention glimpses as the error measure, which is insufficient on a dataset with rich backgrounds. It did better when we initialised its feature extractor with weights of our trained model but, despite passing a few stags of the curriculum, it achieved very poor final performance. 6 Discussion The experiments in the previous section show that it is possible to track real-world objects with a recurrent attentive tracker. While similar to the tracker by Kahoú et al. [16], our approach uses additional building blocks, specifically: (i) bounding-box regression loss, (ii) loss on spatial attention, (iii) appearance attention with an additional loss term, and (iv) combines all of these in a unified approach. We now discuss properties of these modules. Spatial Attention Loss prevents Vanishing Gradients Our early experiments suggest that using only the tracking loss causes an instance of the vanishing gradient problem. Early in training, the system is not able to estimate object’s motion correctly, leading to cases where the extracted glimpse does not contain the tracked object or contains only a part thereof. In such cases, the supervisory signal is only weakly correlated with the model’s input, which prevents learning. Even when the object is contained within the glimpse, the gradient path from the loss function is rather long, since any teaching signal has to pass to the previous timestep through the feature extractor stage. Penalising attention parameters directly seems to solve this issue. 4https://youtu.be/Vvkjm0FRGSs 7 (a) The model with appearance attention loss (top) learns to focus on the tracked object, which prevents an ID swap when a pedestrian is occluded by another one (bottom). (b) Three examples of glimpses and locations maps for a model with and without appearance loss (left to right). Attention loss forces the appearance attention to pick out only the tracked object, thereby suppressing distractors. Figure 6: Glimpses and corresponding location maps for models trained with and without appearance loss. The appearance loss encourages the model to learn foreground/background segmentation of the input glimpse. Is Appearance Attention Loss Necessary? Given enough data and sufficiently high model capacity, appearance attention should be able to filter out irrelevant input features before updating the working memory. In general, however, this behaviour can be achieved faster if the model is constrained to do so by using an appropriate loss. Figure 6 shows examples of glimpses and corresponding location maps for a model with and without loss on the appearance attention. In figure 6a the model with loss on appearance attention is able to track a pedestrian even after it was occluded by another human. Figure 6b shows that, when not penalised, location map might not be very object-specific and can miss the object entirely (right-most figure). By using the appearance attention loss, we not only improve results but also make the model more interpretable. Spatial Attention Bias is Always Positive To condition the system on the object’s appearance and make it independent of the starting location, we translate the initial bounding box to attention parameters, to which we add a learnable bias, and create the hidden state of LSTM from corresponding visual features. In our experiments, this bias always converged to positive values favouring attention glimpse slightly larger than the object bounding box. It suggests that, while discarding irrelevant features is desirable for object tracking, the system as a whole learns to trade off attention responsibility between the spatial and appearance based attention modules. 7 Conclusion Inspired by the cascaded attention mechanisms found in the human visual cortex, this work presented a neural attentive recurrent tracking architecture suited for the task of object tracking. Beyond the biological inspiration, the proposed approach has a desirable computational cost and increased interpretability due to location maps, which select features essential for tracking. Furthermore, by introducing a set of auxiliary losses we are able to scale to challenging real world data, outperforming predecessor attempts and approaching state-of-the-art performance. Future research will look into extending the proposed approach to multi-object tracking, as unlike many single object tracking, the recurrent nature of the proposed tracker offers the ability to attend each object in turn. Acknowledgements We would like to thank Oiwi Parker Jones and Martin Engelcke for discussions and valuable insights and Neil Dhir for his help with editing the paper. Additionally, we would like to acknowledge the support of the UK’s Engineering and Physical Sciences Research Council (EPSRC) through the Programme Grant EP/M019918/1 and the Doctoral Training Award (DTA). The donation from Nvidia of the Titan Xp GPU used in this work is also gratefully acknowledged. References [1] A. Krizhevsky, I. Sutskever, and Geoffrey E. Hinton. ImageNet Classification with Deep Convolutional 8 Neural Networks. In NIPS, pages 1097–1105, 2012. [2] Yoshua Bengio, Jérôme Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In ICML, New York, New York, USA, 2009. ACM Press. [3] Brian Cheung. Neural Attention for Object Tracking. In GPU Technol. Conf., 2016. [4] Brian Cheung, Eric Weiss, and Bruno Olshausen. Emergence of foveal image sampling from learning to attend in visual scenes. ICLR, 2017. [5] Peter. Dayan and L. F. Abbott. Theoretical neuroscience : computational and mathematical modeling of neural systems. Massachusetts Institute of Technology Press, 2001. [6] Bert De Brabandere, Xu Jia, Tinne Tuytelaars, and Luc Van Gool. Dynamic Filter Networks. NIPS, 2016. [7] S. M. Ali Eslami, Nicolas Heess, Theophane Weber, Yuval Tassa, David Szepesvari, Koray Kavukcuoglu, and Geoffrey E. Hinton. Attend, Infer, Repeat: Fast Scene Understanding with Generative Models. In NIPS, 2016. [8] A. Geiger, P. Lenz, C. Stiller, and R. Urtasun. Vision meets robotics: The KITTI dataset. Int. J. Rob. Res., 32(11):1231–1237, sep 2013. [9] Hinton Geoffrey, Nitish Srivastava, and Kevin Swersky. Overview of mini-batch gradient descent, 2012. [10] Daniel Gordon, Ali Farhadi, and Dieter Fox. Re3 : Real-Time Recurrent Regression Networks for Object Tracking. In arXiv:1705.06368, 2017. [11] Alex Graves, Greg Wayne, Malcolm Reynolds, Tim Harley, Ivo Danihelka, Agnieszka Grabska-Barwi´nska, Sergio Gómez Colmenarejo, Edward Grefenstette, Tiago Ramalho, John Agapiou, Adrià Puigdomènech Badia, Karl Moritz Hermann, Yori Zwols, Georg Ostrovski, Adam Cain, Helen King, Christopher Summerfield, Phil Blunsom, Koray Kavukcuoglu, and Demis Hassabis. Hybrid computing using a neural network with dynamic external memory. Nature, 538(7626):471–476, oct 2016. [12] K Gregor, I Danihelka, A Graves, and D Wierstra. DRAW: A Recurrent Neural Network For Image Generation. ICML, 2015. [13] David Held, Sebastian Thrun, and Silvio Savarese. Learning to track at 100 FPS with deep regression networks. In ECCV Work. Springer, 2016. [14] Max Jaderberg, Karen Simonyan, Andrew Zisserman, and Koray Kavukcuoglu. Spatial Transformer Networks. In NIPS, 2015. [15] Max Jaderberg, Volodymyr Mnih, Wojciech Marian Czarnecki, Tom Schaul, Joel Z Leibo, David Silver, and Koray Kavukcuoglu. Reinforcement Learning with Unsupervised Auxiliary Tasks. In arXiv:1611.05397, 2016. [16] Samira Ebrahimi Kahoú, Vincent Michalski, and Roland Memisevic. RATM: Recurrent Attentive Tracking Model. CVPR Work., 2017. [17] Maximilian Karl, Maximilian Soelch, Justin Bayer, and Patrick van der Smagt. Deep Variational Bayes Filters: Unsupervised Learning of State Space Models from Raw Data. In ICLR, 2017. [18] Sabine Kastner and Leslie G. Ungerleider. Mechanisms of visual attention in the human cortex. Annu. Rev. Neurosci., 23(1):315–341, 2000. [19] Alex Kendall, Yarin Gal, and Roberto Cipolla. Multi-Task Learning Using Uncertainty to Weigh Losses for Scene Geometry and Semantics. arXiv:1705.07115, may 2017. [20] Matej Kristan, Jiri Matas, Aleš Leonardis, Michael Felsberg, Luk Cehovin, Gustavo Fernández, Tomáš Vojí, Gustav Häger, Georg Nebehay, Roman Pflugfelder, Abhinav Gupta, Adel Bibi, Alan Lukežiˇc, Alvaro Garcia-Martin, Amir Saffari, Philip H S Torr, Qiang Wang, Rafael Martin-Nieto, Rengarajan Pelapur, Richard Bowden, Chun Zhu, Stefan Becker, Stefan Duffner, Stephen L Hicks, Stuart Golodetz, Sunglok Choi, Tianfu Wu, Thomas Mauthner, Tony Pridmore, Weiming Hu, Wolfgang Hübner, Xiaomeng Wang, Xin Li, Xinchu Shi, Xu Zhao, Xue Mei, Yao Shizeng, Yang Hua, Yang Li, Yang Lu, Yuezun Li, Zhaoyun Chen, Zehua Huang, Zhe Chen, Zhe Zhang, Zhenyu He, and Zhibin Hong. The Visual Object Tracking VOT2016 challenge results. In ECCV Work., 2016. [21] David Krueger, Tegan Maharaj, János Kramár, Mohammad Pezeshki, Nicolas Ballas, Nan Rosemary Ke, Anirudh Goyal, Yoshua Bengio, Aaron Courville, and Chris Pal. Zoneout: Regularizing RNNs by Randomly Preserving Hidden Activations. In ICLR, 2017. [22] Volodymyr Mnih, Nicolas Heess, Alex Graves, and Koray Kavukcuoglu. Recurrent Models of Visual Attention. In NIPS, 2014. [23] Guanghan Ning, Zhi Zhang, Chen Huang, Zhihai He, Xiaobo Ren, and Haohong Wang. Spatially Supervised Recurrent Convolutional Neural Networks for Visual Object Tracking. arXiv Prepr. arXiv1607.05781, 2016. [24] Christian Schuldt, Ivan Laptev, and Barbara Caputo. Recognizing human actions: A local SVM approach. In ICPR. IEEE, 2004. [25] Marijn Stollenga, Jonathan Masci, Faustino Gomez, and Juergen Schmidhuber. Deep Networks with Internal Selective Attention through Feedback Connections. In arXiv Prepr. arXiv . . ., page 13, 2014. [26] Jack Valmadre, Luca Bertinetto, João F. Henriques, Andrea Vedaldi, and Philip H. S. Torr. End-to-end representation learning for Correlation Filter based tracking. In CVPR, 2017. [27] Oriol Vinyals, Lukasz Kaiser, Terry Koo, Slav Petrov, Ilya Sutskever, and Geoffrey Hinton. Grammar as a Foreign Language. In NIPS, 2015. [28] Jiahui Yu, Yuning Jiang, Zhangyang Wang, Zhimin Cao, and Thomas Huang. UnitBox: An Advanced Object Detection Network. In Proc. 2016 ACM Multimed. Conf., pages 516–520. ACM, 2016. 9 | 2017 | 306 |
6,793 | Sobolev Training for Neural Networks Wojciech Marian Czarnecki, Simon Osindero, Max Jaderberg Grzegorz Swirszcz, and Razvan Pascanu DeepMind, London, UK {lejlot,osindero,jaderberg,swirszcz,razp}@google.com Abstract At the heart of deep learning we aim to use neural networks as function approximators – training them to produce outputs from inputs in emulation of a ground truth function or data creation process. In many cases we only have access to input-output pairs from the ground truth, however it is becoming more common to have access to derivatives of the target output with respect to the input – for example when the ground truth function is itself a neural network such as in network compression or distillation. Generally these target derivatives are not computed, or are ignored. This paper introduces Sobolev Training for neural networks, which is a method for incorporating these target derivatives in addition the to target values while training. By optimising neural networks to not only approximate the function’s outputs but also the function’s derivatives we encode additional information about the target function within the parameters of the neural network. Thereby we can improve the quality of our predictors, as well as the data-efficiency and generalization capabilities of our learned function approximation. We provide theoretical justifications for such an approach as well as examples of empirical evidence on three distinct domains: regression on classical optimisation datasets, distilling policies of an agent playing Atari, and on large-scale applications of synthetic gradients. In all three domains the use of Sobolev Training, employing target derivatives in addition to target values, results in models with higher accuracy and stronger generalisation. 1 Introduction Deep Neural Networks (DNNs) are one of the main tools of modern machine learning. They are consistently proven to be powerful function approximators, able to model a wide variety of functional forms – from image recognition [8, 24], through audio synthesis [27], to human-beating policies in the ancient game of GO [22]. In many applications the process of training a neural network consists of receiving a dataset of input-output pairs from a ground truth function, and minimising some loss with respect to the network’s parameters. This loss is usually designed to encourage the network to produce the same output, for a given input, as that from the target ground truth function. Many of the ground truth functions we care about in practice have an unknown analytic form, e.g. because they are the result of a natural physical process, and therefore we only have the observed input-output pairs for supervision. However, there are scenarios where we do know the analytic form and so are able to compute the ground truth gradients (or higher order derivatives), alternatively sometimes these quantities may be simply observable. A common example is when the ground truth function is itself a neural network; for instance this is the case for distillation [9, 20], compressing neural networks [7], and the prediction of synthetic gradients [12]. Additionally, if we are dealing with an environment/data-generation process (vs. a pre-determined set of data points), then even though we may be dealing with a black box we can still approximate derivatives using finite differences. In this work, we consider how this additional information can be incorporated in the learning process, and what advantages it can provide in terms of data efficiency and performance. We 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. x f m D2 xf D2 xm Dxm Dxf D_{\mathbf{x}} f l l2 l1 @ @x @ @x @ @x @ @x x f m l l2 l1 @ @x @ @x mv1 = Dxhm, v1i DxhDxhm, v1i, v2i D_{\mathbf{x}} \langle D_{\mathbf{x}} \langle m, v_1 \rangle, v_2 \rangle v1 @ @x @ @x DxhDxhf, v1i, v2i Dxhf, v1i v2 a) b) Figure 1: a) Sobolev Training of order 2. Diamond nodes m and f indicate parameterised functions, where m is trained to approximate f. Green nodes receive supervision. Solid lines indicate connections through which error signal from loss l, l1, and l2 are backpropagated through to train m. b) Stochastic Sobolev Training of order 2. If f and m are multivariate functions, the gradients are Jacobian matrices. To avoid computing these high dimensional objects, we can efficiently compute and fit their projections on a random vector vj sampled from the unit sphere. propose Sobolev Training (ST) for neural networks as a simple and efficient technique for leveraging derivative information about the desired function in a way that can easily be incorporated into any training pipeline using modern machine learning libraries. The approach is inspired by the work of Hornik [10] which proved the universal approximation theorems for neural networks in Sobolev spaces – metric spaces where distances between functions are defined both in terms of their differences in values and differences in values of their derivatives. In particular, it was shown that a sigmoid network can not only approximate a function’s value arbitrarily well, but that the network’s derivatives with respect to its inputs can approximate the corresponding derivatives of the ground truth function arbitrarily well too. Sobolev Training exploits this property, and tries to match not only the output of the function being trained but also its derivatives. There are several related works which have also exploited derivative information for function approximation. For instance Wu et al. [30] and antecedents propose a technique for Bayesian optimisation with Gaussian Processess (GP), where it was demonstrated that the use of information about gradients and Hessians can improve the predictive power of GPs. In previous work on neural networks, derivatives of predictors have usually been used either to penalise model complexity (e.g. by pushing Jacobian norm to 0 [19]), or to encode additional, hand crafted invariances to some transformations (for instance, as in Tangentprop [23]), or estimated derivatives for dynamical systems [6] and very recently to provide additional learning signal during attention distillation [31]1. Similar techniques have also been used in critic based Reinforcement Learning (RL), where a critic’s derivatives are trained to match its target’s derivatives [29, 15, 5, 4, 26] using small, sigmoid based models. Finally, Hyvärinen proposed Score Matching Networks [11], which are based on the somewhat surprising observation that one can model unknown derivatives of the function without actual access to its values – all that is needed is a sampling based strategy and specific penalty. However, such an estimator has a high variance [28], thus it is not really useful when true derivatives are given. To the best of our knowledge and despite its simplicity, the proposal to directly match network derivatives to the true derivatives of the target function has been minimally explored for deep networks, especially modern ReLU based models. In our method, we show that by using the additional knowledge of derivatives with Sobolev Training we are able to train better models – models which achieve lower approximation errors and generalise to test data better – and reduce the sample complexity of learning. The contributions of our paper are therefore threefold: (1): We introduce 1Please relate to Supplementary Materials, section 5 for details 2 Sobolev Training – a new paradigm for training neural networks. (2): We look formally at the implications of matching derivatives, extending previous results of Hornik [10] and showing that modern architectures are well suited for such training regimes. (3): Empirical evidence demonstrating that Sobolev Training leads to improved performance and generalisation, particularly in low data regimes. Example domains are: regression on classical optimisation problems; policy distillation from RL agents trained on the Atari domain; and training deep, complex models using synthetic gradients – we report the first successful attempt to train a large-scale ImageNet model using synthetic gradients. 2 Sobolev Training We begin by introducing the idea of training using Sobolev spaces. When learning a function f, we may have access to not only the output values f(xi) for training points xi, but also the values of its j-th order derivatives with respect to the input, Dj xf(xi). In other words, instead of the typical training set consisting of pairs {(xi, f(xi))}N i=1 we have access to (K + 2)-tuples {(xi, f(xi), D1 xf(xi), ..., DK x f(xi))}N i=1. In this situation, the derivative information can easily be incorporated into training a neural network model of f by making derivatives of the neural network match the ones given by f. Considering a neural network model m parameterised with θ, one typically seeks to minimise the empirical error in relation to f according to some loss function ℓ N X i=1 ℓ(m(xi|θ), f(xi)). When learning in Sobolev spaces, this is replaced with: N X i=1 ℓ(m(xi|θ), f(xi)) + K X j=1 ℓj Dj xm(xi|θ), Dj xf(xi) , (1) where ℓj are loss functions measuring error on j-th order derivatives. This causes the neural network to encode derivatives of the target function in its own derivatives. Such a model can still be trained using backpropagation and off-the-shelf optimisers. A potential concern is that this optimisation might be expensive when either the output dimensionality of f or the order K are high, however one can reduce this cost through stochastic approximations. Specifically, if f is a multivariate function, instead of a vector gradient, one ends up with a full Jacobian matrix which can be large. To avoid adding computational complexity to the training process, one can use an efficient, stochastic version of Sobolev Training: instead of computing a full Jacobian/Hessian, one just computes its projection onto a random vector (a direct application of a known estimation trick [19]). In practice, this means that during training we have a random variable v sampled uniformly from the unit sphere, and we match these random projections instead: N X i=1 ℓ(m(xi|θ), f(xi)) + K X j=1 Evj ℓj Dj xm(xi|θ), vj , Dj xf(xi), vj . (2) Figure 1 illustrates compute graphs for non-stochastic and stochastic Sobolev Training of order 2. 3 Theory and motivation While in the previous section we defined Sobolev Training, it is not obvious that modeling the derivatives of the target function f is beneficial to function approximation, or that optimising such an objective is even feasible. In this section we motivate and explore these questions theoretically, showing that the Sobolev Training objective is a well posed one, and that incorporating derivative information has the potential to drastically reduce the sample complexity of learning. Hornik showed [10] that neural networks with non-constant, bounded, continuous activation functions, with continuous derivatives up to order K are universal approximators in the Sobolev spaces of order K, thus showing that sigmoid-networks are indeed capable of approximating elements of these 3 Figure 2: Left: From top: Example of the piece-wise linear function; Two (out of a continuum of) hypotheses consistent with 3 training points, showing that one needs two points to identify each linear segment; The only hypothesis consistent with 3 training points enriched with derivative information. Right: Logarithm of test error (MSE) for various optimisation benchmarks with varied training set size (20, 100 and 10000 points) sampled uniformly from the problem’s domain. spaces arbitrarily well. However, nowadays we often use activation functions such as ReLU which are neither bounded nor have continuous derivatives. The following theorem shows that for K = 1 we can use ReLU function (or a similar one, like leaky ReLU) to create neural networks that are universal approximators in Sobolev spaces. We will use a standard symbol C1(S) (or simply C1) to denote a space of functions which are continuous, differentiable, and have a continuous derivative on a space S [14]. All proofs are given in the Supplementary Materials (SM). Theorem 1. Let f be a C1 function on a compact set. Then, for every positive ε there exists a single hidden layer neural network with a ReLU (or a leaky ReLU) activation which approximates f in Sobolev space S1 up to ϵ error. This suggests that the Sobolev Training objective is achievable, and that we can seek to encode the values and derivatives of the target function in the values and derivatives of a ReLU neural network model. Interestingly, we can show that if we seek to encode an arbitrary function in the derivatives of the model then this is impossible not only for neural networks but also for any arbitrary differentiable predictor on compact sets. Theorem 2. Let f be a C1 function. Let g be a continuous function satisfying ∥g −∂f ∂x∥∞> 0. Then, there exists an η > 0 such that for any C1 function h either ∥f −h∥∞≥η or
g −∂h ∂x
∞≥η. However, when we move to the regime of finite training data, we can encode any arbitrary function in the derivatives (as well as higher order signals if the resulting Sobolev spaces are not degenerate), as shown in the following Proposition. Proposition 1. Given any two functions f : S →R and g : S →Rd on S ⊆Rd and a finite set Σ ⊂S, there exists neural network h with a ReLU (or a leaky ReLU) activation such that ∀x ∈Σ : f(x) = h(x) and g(x) = ∂h ∂x(x) (it has 0 training loss). Having shown that it is possible to train neural networks to encode both the values and derivatives of a target function, we now formalise one possible way of showing that Sobolev Training has lower sample complexity than regular training. Let F denote the family of functions parametrised by ω. We define Kreg = Kreg(F) to be a measure of the amount of data needed to learn some target function f. That is Kreg is the smallest number for which there holds: for every fω ∈F and every set of distinct Kreg points (x1, ..., xKreg) such that ∀i=1,...,Kregf(xi) = fω(xi) ⇒f = fω. Ksob is defined analogously, but the final implication is of form f(xi) = fω(xi) ∧∂f ∂x(xi) = ∂fω ∂x (xi) ⇒f = fω. Straight from the definition there follows: Proposition 2. For any F, there holds Ksob(F) ≤Kreg(F). For many families, the above inequality becomes sharp. For example, to determine the coefficients of a polynomial of degree n one needs to compute its values in at least n + 1 distinct points. If we know values and the derivatives at k points, it is a well-known fact that only ⌈n 2 ⌉points suffice to determine all the coefficients. We present two more examples in a slightly more formal way. Let FG denote a family of Gaussian PDF-s (parametrised by µ, σ). Let Rd ⊃D = D1 ∪. . . ∪Dn and let FPL be a family of functions from D1 × ... × Dn (Cartesian product of sets Di) to Rn of form f(x) = [A1x1 + b1, . . . , Anxn + bn] (linear element-wise) (Figure 2 Left). 4 Dataset 20 training samples 100 training samples Regular Sobolev Regular Sobolev Figure 3: Styblinski-Tang function (on the left) and its models using regular neural network training (left part of each plot) and Sobolev Training (right part). We also plot the vector field of the gradients of each predictor underneath the function plot. Proposition 3. There holds Ksob (FG) < Kreg(FG) and Ksob(FPL) < Kreg(FPL). This result relates to Deep ReLU networks as they build a hyperplanes-based model of the target function. If those were parametrised independently one could expect a reduction of sample complexity by d+1 times, where d is the dimension of the function domain. In practice parameters of hyperplanes in such networks are not independent, furthermore the hinges positions change so the Proposition cannot be directly applied, but it can be seen as an intuitive way to see why the sample complexity drops significantly for Deep ReLU networks too. 4 Experimental Results We consider three domains where information about derivatives is available during training2. 4.1 Artificial Data First, we consider the task of regression on a set of well known low-dimensional functions used for benchmarking optimisation methods. We train two hidden layer neural networks with 256 hidden units per layer with ReLU activations to regress towards function values, and verify generalisation capabilities by evaluating the mean squared error on a hold-out test set. Since the task is standard regression, we choose all the losses of Sobolev Training to be L2 errors, and use a first order Sobolev method (second order derivatives of ReLU networks with a linear output layer are constant, zero). The optimisation is therefore: min θ 1 N N X i=1 ∥f(xi) −m(xi|θ)∥2 2 + ∥∇xf(xi) −∇xm(xi|θ)∥2 2. Figure 2 right shows the results for the optimisation benchmarks. As expected, Sobolev trained networks perform extremely well – for six out of seven benchmark problems they significantly reduce the testing error with the obtained errors orders of magnitude smaller than the corresponding errors of the regularly trained networks. The stark difference in approximation error is highlighted in Figure 3, where we show the Styblinski-Tang function and its approximations with both regular and Sobolev Training. It is clear that even in very low data regimes, the Sobolev trained networks can capture the functional shape. Looking at the results, we make two important observations. First, the effect of Sobolev Training is stronger in low-data regimes, however it does not disappear even in the high data regime, when one has 10,000 training examples for training a two-dimensional function. Second, the only case where regular regression performed better is the regression towards Ackley’s function. This particular 2All experiments were performed using TensorFlow [2] and the Sonnet neural network library [1]. 5 Test action prediction error Test DKL Regular distillation Sobolev distillation Figure 4: Test results of distillation of RL agents on three Atari games. Reported test action prediction error (left) is the error of the most probable action predicted between the distilled policy and target policy, and test DKL (right) is the Kulblack-Leibler divergence between policies. Numbers in the column title represents the percentage of the 100K recorded states used for training (the remaining are used for testing). In all scenarios the Sobolev distilled networks are significantly more similar to the target policy. example was chosen to show that one possible weak point of our approach might be approximating functions with a very high frequency signal component in the relatively low data regime. Ackley’s function is composed of exponents of high frequency cosine waves, thus creating an extremely bumpy surface, consequently a method that tries to match the derivatives can behave badly during testing if one does not have enough data to capture this complexity. However, once we have enough training data points, Sobolev trained networks are able to approximate this function better. 4.2 Distillation Another possible application of Sobolev Training is to perform model distillation. This technique has many applications, such as network compression [21], ensemble merging [9], or more recently policy distillation in reinforcement learning [20]. We focus here on a task of distilling a policy. We aim to distill a target policy π∗(s) – a trained neural network which outputs a probability distribution over actions – into a smaller neural network π(s|θ), such that the two policies π∗and π have the same behaviour. In practice this is often done by minimising an expected divergence measure between π∗and π, for example, the Kullback–Leibler divergence DKL(π(s)∥π∗(s)), over states gathered while following π∗. Since policies are multivariate functions, direct application of Sobolev Training would mean producing full Jacobian matrices with respect to the s, which for large actions spaces is computationally expensive. To avoid this issue we employ a stochastic approximation described in Section 2, thus resulting in the objective min θ DKL(π(s|θ)∥π∗(s)) + αEv [∥∇s⟨log π∗(s), v⟩−∇s⟨log π(s|θ), v⟩∥] , where the expectation is taken with respect to v coming from a uniform distribution over the unit sphere, and Monte Carlo sampling is used to approximate it. As target policies π∗, we use agents playing Atari games [17] that have been trained with A3C [16] on three well known games: Pong, Breakout and Space Invaders. The agent’s policy is a neural network consisting of 3 layers of convolutions followed by two fully-connected layers, which we distill to a smaller network with 2 convolutional layers and a single smaller fully-connected layer (see SM for details). Distillation is treated here as a purely supervised learning problem, as our aim is not to re-evaluate known distillation techniques, but rather to show that if the aim is to minimise a given divergence measure, we can improve distillation using Sobolev Training. Figure 4 shows test error during training with and without Sobolev Training3. The introduction of Sobolev Training leads to similar effects as in the previous section – the network generalises much more effectively, and this 3Testing is performed on a held out set of episodes, thus there are no temporal nor causal relations between training and testing 6 Table 1: Various techniques for producing synthetic gradients. Green shaded nodes denote nodes that get supervision from the corresponding object from the main network (gradient or loss value). We report accuracy on the test set ± standard deviation. Backpropagation results are given in parenthesis. (a) (b) x y x y Synthetic error gradient ˆL p(h|✓) @ @h SG(h, y) h y ˆL p(h|✓) @ @h SG(h, y) h y ˆL p(h|✓) @ @h SG(h, y) h y SG(h, y) h y f(h, y|✓) hy 0 (a) (b) x y x y Synthetic error gradient ˆL p(h|✓) @ @h SG(h, y) h y ˆL p(h|✓) @ @h SG(h, y) h y ˆL p(h|✓) @ @h SG(h, y) h y SG(h, y) h y f(h, y|✓) hy 0 (a) (b) x y x y Synthetic error gradient ˆL p(h|✓) @ @h SG(h, y) h y ˆL p(h|✓) @ @h SG(h, y) h y ˆL p(h|✓) @ @h SG(h, y) h y SG(h, y) h y f(h, y|✓) hy 0 (a) (b) x y x y Synthetic error gradient ˆL p(h|✓) @ @h SG(h, y) h y ˆL p(h|✓) @ @h SG(h, y) h y ˆL p(h|✓) @ @h SG(h, y) h y SG(h, y) h y f(h, y|✓) hy 0 (a) (b) x y x y Synthetic error gradient ˆL p(h|✓) @ @h SG(h, y) h y ˆL p(h|✓) @ @h SG(h, y) h y ˆL p(h|✓) @ @h SG(h, y) h y SG(h, y) h y f(h, y|✓) hy 0 Noprop Direct SG [12] VFBN [25] Critic Sobolev CIFAR-10 with 3 synthetic gradient modules Top 1 (94.3%) 54.5% ±1.15 79.2% ±0.01 88.5% ±2.70 93.2% ±0.02 93.5% ±0.01 ImageNet with 1 synthetic gradient module Top 1 (75.0%) 54.0% ±0.29 57.9% ±2.03 71.7% ±0.23 72.0% ±0.05 Top 5 (92.3%) 77.3% ±0.06 81.5% ±1.20 90.5% ±0.15 90.8% ±0.01 ImageNet with 3 synthetic gradient modules Top 1 (75.0%) 18.7% ±0.18 28.3% ±5.24 65.7% ±0.56 66.5% ±0.22 Top 5 (92.3%) 38.0% ±0.34 52.9% ±6.62 86.9% ±0.33 87.4% ±0.11 is especially true in low data regimes. Note the performance gap on Pong is small due to the fact that optimal policy is quite degenerate for this game4. In all remaining games one can see a significant performance increase from using our proposed method, and as well as minor to no overfitting. Despite looking like a regularisation effect, we stress that Sobolev Training is not trying to find the simplest models for data or suppress the expressivity of the model. This training method aims at matching the original function’s smoothness/complexity and so reduces overfitting by effectively extending the information content of the training set, rather than by imposing a data-independent prior as with regularisation. 4.3 Synthetic Gradients The previous experiments have shown how information about the derivatives can boost approximating function values. However, the core idea of Sobolev Training is broader than that, and can be employed in both directions. Namely, if one ultimately cares about approximating derivatives, then additionally approximating values can help this process too. One recent technique, which requires a model of gradients is Synthetic Gradients (SG) [12] – a method for training complex neural networks in a decoupled, asynchronous fashion. In this section we show how we can use Sobolev Training for SG. The principle behind SG is that instead of doing full backpropagation using the chain-rule, one splits a network into two (or more) parts, and approximates partial derivatives of the loss L with respect to some hidden layer activations h with a trainable function SG(h, y|θ). In other words, given that network parameters up to h are denoted by Θ ∂L ∂Θ = ∂L ∂h ∂h ∂Θ ≈SG(h, y|θ) ∂h ∂Θ. In the original SG paper, this module is trained to minimise LSG(θ) =
SG(h, y|θ) −∂L(ph,y) ∂h
2 2 , where ph is the final prediction of the main network for hidden activations h. For the case of learning a classifier, in order to apply Sobolev Training in this context we construct a loss predictor, composed 4For majority of the time the policy in Pong is uniform, since actions taken when the ball is far away from the player do not matter at all. Only in crucial situations it peaks so the ball hits the paddle. 7 of a class predictor p(·|θ) followed by the log loss, which gets supervision from the true loss, and the gradient of the prediction gets supervision from the true gradient: m(h, y|θ) := L(p(h|θ), y), SG(h, y|θ) := ∂m(h, y|θ)/∂h, Lsob SG(θ) = ℓ(m(h, y|θ), L(ph, y))) + ℓ1 ∂m(h,y|θ) ∂h , ∂L(ph,y) ∂h . In the Sobolev Training framework, the target function is the loss of the main network L(ph, y) for which we train a model m(h, y|θ) to approximate, and in addition ensure that the model’s derivatives ∂m(h, y|θ)/∂h are matched to the true derivatives ∂L(ph, y)/∂h. The model’s derivatives ∂m(h, y|θ)/∂h are used as the synthetic gradient to decouple the main network. This setting closely resembles what is known in reinforcement learning as critic methods [13]. In particular, if we do not provide supervision on the gradient part, we end up with a loss critic. Similarly if we do not provide supervision at the loss level, but only on the gradient component, we end up in a method that resembles VFBN [25]. In light of these connections, our approach in this application setting can be seen as a generalisation and unification of several existing ones (see Table 1 for illustrations of these approaches). One could ask why we need these additional constraints, and what is gained over using a neural network based approximator directly [12]. The answer lies in the fact that gradient vector fields are a tiny subset of all vector fields, and while each neural network produces a valid vector field, almost no (standard) neural network produces valid gradient vector fields. Using non-gradient vector fields as update directions for learning can have catastrophic consequences – learning divergence, oscillations, chaotic behaviour, etc. The following proposition makes this observation more formal: Proposition 4. If an approximator SG(h, y|θ) produces a valid gradient vector field of some scalar function L then the approximator’s Jacobian matrix must be symmetric. It is worth noting that having a symmetric Jacobian is an extremely rare property for a neural network model. For example, a linear model has a symmetric Jacobian if and only if its weight matrix is symmetric. If we sample weights iid from typical distribution (like Gaussian or uniform on an interval), the probability of sampling such a matrix is 0, but it could be easy to learn with strong, symmetric-enforcing updates. On the other hand, for highly non-linear neural networks, it is not only improbable to randomly find such a model, but enforcing this constraint during learning becomes much harder too. This might be one of the reasons why linear SG modules work well in Jaderberg et al. [12], but non-linear convolutional SG struggled to achieve state-of-the-art performance. When using Sobolev-like approach SG always produces a valid gradient vector field by construction, thus avoiding the problem described. We perform experiments on decoupling deep convolutional neural network image classifiers using synthetic gradients produced by loss critics that are trained with Sobolev Training, and compare to regular loss critic training, and regular synthetic gradient training. We report results on CIFAR-10 for three network splits (and therefore three synthetic gradient modules) and on ImageNet with one and three network splits 5. The results are shown in Table 1. With a naive SG model, we obtain 79.2% test accuracy on CIFAR-10. Using an SG architecture which resembles a small version of the rest of the model makes learning much easier and led to 88.5% accuracy, while Sobolev Training achieves 93.5% final performance. The regular critic also trains well, achieving 93.2%, as the critic forces the lower part of the network to provide a representation which it can use to reduce the classification (and not just prediction) error. Consequently it provides a learning signal which is well aligned with the main optimisation. However, this can lead to building representations which are suboptimal for the rest of the network. Adding additional gradient supervision by constructing our Sobolev SG module avoids this issue by making sure that synthetic gradients are truly aligned and gives an additional boost to the final accuracy. For ImageNet [3] experiments based on ResNet50 [8], we obtain qualitatively similar results. Due to the complexity of the model and an almost 40% gap between no backpropagation and full backpropagation results, the difference between methods with vs without loss supervision grows significantly. This suggests that at least for ResNet-like architectures, loss supervision is a crucial 5N.b. the experiments presented use learning rates, annealing schedule, etc. optimised to maximise the backpropagation baseline, rather than the synthetic gradient decoupled result (details in the SM). 8 component of a SG module. After splitting ResNet50 into four parts the Sobolev SG achieves 87.4% top 5 accuracy, while the regular critic SG achieves 86.9%, confirming our claim about suboptimal representation being enforced by gradients from a regular critic. Sobolev Training results were also much more reliable in all experiments (significantly smaller standard deviation of the results). 5 Discussion and Conclusion In this paper we have introduced Sobolev Training for neural networks – a simple and effective way of incorporating knowledge about derivatives of a target function into the training of a neural network function approximator. We provided theoretical justification that encoding both a target function’s value as well as its derivatives within a ReLU neural network is possible, and that this results in more data efficient learning. Additionally, we show that our proposal can be efficiently trained using stochastic approximations if computationally expensive Jacobians or Hessians are encountered. In addition to toy experiments which validate our theoretical claims, we performed experiments to highlight two very promising areas of applications for such models: one being distillation/compression of models; the other being the application to various meta-optimisation techniques that build models of other models dynamics (such as synthetic gradients, learning-to-learn, etc.). In both cases we obtain significant improvement over classical techniques, and we believe there are many other application domains in which our proposal should give a solid performance boost. In this work we focused on encoding true derivatives in the corresponding ones of the neural network. Another possibility for future work is to encode information which one believes to be highly correlated with derivatives. For example curvature [18] is believed to be connected to uncertainty. Therefore, given a problem with known uncertainty at training points, one could use Sobolev Training to match the second order signal to the provided uncertainty signal. Finite differences can also be used to approximate gradients for black box target functions, which could help when, for example, learning a generative temporal model. Another unexplored path would be to apply Sobolev Training to internal derivatives rather than just derivatives with respect to the inputs. References [1] Sonnet. https://github.com/deepmind/sonnet. 2017. [2] Martín Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467, 2016. [3] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pages 248–255. IEEE, 2009. [4] Michael Fairbank and Eduardo Alonso. Value-gradient learning. In Neural Networks (IJCNN), The 2012 International Joint Conference on, pages 1–8. IEEE, 2012. [5] Michael Fairbank, Eduardo Alonso, and Danil Prokhorov. Simple and fast calculation of the second-order gradients for globalized dual heuristic dynamic programming in neural networks. IEEE transactions on neural networks and learning systems, 23(10):1671–1676, 2012. [6] A Ronald Gallant and Halbert White. On learning the derivatives of an unknown mapping with multilayer feedforward networks. Neural Networks, 5(1):129–138, 1992. [7] Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015. [8] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770–778, 2016. [9] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. [10] Kurt Hornik. Approximation capabilities of multilayer feedforward networks. Neural networks, 4(2):251– 257, 1991. 9 [11] Aapo Hyvärinen. Estimation of non-normalized statistical models using score matching. Journal of Machine Learning Research, pages 695–709, 2005. [12] Max Jaderberg, Wojciech Marian Czarnecki, Simon Osindero, Oriol Vinyals, Alex Graves, and Koray Kavukcuoglu. Decoupled neural interfaces using synthetic gradients. arXiv preprint arXiv:1608.05343, 2016. [13] Vijay R Konda and John N Tsitsiklis. Actor-critic algorithms. In NIPS, volume 13, pages 1008–1014, 1999. [14] Steven G Krantz. Handbook of complex variables. Springer Science & Business Media, 2012. [15] W Thomas Miller, Paul J Werbos, and Richard S Sutton. Neural networks for control. MIT press, 1995. [16] Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International Conference on Machine Learning, pages 1928–1937, 2016. [17] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602, 2013. [18] Razvan Pascanu and Yoshua Bengio. Revisiting natural gradient for deep networks. arXiv preprint arXiv:1301.3584, 2013. [19] Salah Rifai, Grégoire Mesnil, Pascal Vincent, Xavier Muller, Yoshua Bengio, Yann Dauphin, and Xavier Glorot. Higher order contractive auto-encoder. Machine Learning and Knowledge Discovery in Databases, pages 645–660, 2011. [20] Andrei A Rusu, Sergio Gomez Colmenarejo, Caglar Gulcehre, Guillaume Desjardins, James Kirkpatrick, Razvan Pascanu, Volodymyr Mnih, Koray Kavukcuoglu, and Raia Hadsell. Policy distillation. arXiv preprint arXiv:1511.06295, 2015. [21] Bharat Bhusan Sau and Vineeth N Balasubramanian. Deep model compression: Distilling knowledge from noisy teachers. arXiv preprint arXiv:1610.09650, 2016. [22] David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016. [23] Patrice Simard, Bernard Victorri, Yann LeCun, and John S Denker. Tangent prop-a formalism for specifying selected invariances in an adaptive network. In NIPS, volume 91, pages 895–903, 1991. [24] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [25] Shin-ichi Maeda Koyama Masanori Takeru Miyato, Daisuke Okanohara. Synthetic gradient methods with virtual forward-backward networks. ICLR workshop proceedings, 2017. [26] Yuval Tassa and Tom Erez. Least squares solutions of the hjb equation with neural network value-function approximators. IEEE transactions on neural networks, 18(4):1031–1041, 2007. [27] Aäron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. Wavenet: A generative model for raw audio. CoRR abs/1609.03499, 2016. [28] Pascal Vincent. A connection between score matching and denoising autoencoders. Neural computation, 23(7):1661–1674, 2011. [29] Paul J Werbos. Approximate dynamic programming for real-time control and neural modeling. Handbook of intelligent control, 1992. [30] Anqi Wu, Mikio C Aoi, and Jonathan W Pillow. Exploiting gradients and hessians in bayesian optimization and bayesian quadrature. arXiv preprint arXiv:1704.00060, 2017. [31] Sergey Zagoruyko and Nikos Komodakis. Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. arXiv preprint arXiv:1612.03928, 2016. 10 | 2017 | 307 |
6,794 | Doubly Accelerated Stochastic Variance Reduced Dual Averaging Method for Regularized Empirical Risk Minimization Tomoya Murata NTT DATA Mathematical Systems Inc. , Tokyo, Japan murata@msi.co.jp Taiji Suzuki Department of Mathematical Informatics Graduate School of Information Science and Technology, The University of Tokyo, Tokyo, Japan PRESTO, Japan Science and Technology Agency, Japan Center for Advanced Integrated Intelligence Research, RIKEN, Tokyo, Japan taiji@mist.i.u-tokyo.ac.jp Abstract We develop a new accelerated stochastic gradient method for efficiently solving the convex regularized empirical risk minimization problem in mini-batch settings. The use of mini-batches has become a golden standard in the machine learning community, because the mini-batch techniques stabilize the gradient estimate and can easily make good use of parallel computing. The core of our proposed method is the incorporation of our new “double acceleration” technique and variance reduction technique. We theoretically analyze our proposed method and show that our method much improves the mini-batch efficiencies of previous accelerated stochastic methods, and essentially only needs size √n mini-batches for achieving the optimal iteration complexities for both non-strongly and strongly convex objectives, where n is the training set size. Further, we show that even in non-mini-batch settings, our method achieves the best known convergence rate for non-strongly convex and strongly convex objectives. 1 Introduction We consider a composite convex optimization problem associated with regularized empirical risk minimization, which often arises in machine learning. In particular, our goal is to minimize the sum of finite smooth convex functions and a relatively simple (possibly) non-differentiable convex function by using first order methods in mini-batch settings. The use of mini-batches is now a golden standard in the machine learning community, because it is generally more efficient to execute matrix-vector multiplications over a mini-batch than an equivalent amount of vector-vector ones each over a single instance; and more importantly, mini-batch techniques can easily make good use of parallel computing. Traditional and effective methods for solving the abovementioned problem are the “proximal gradient” (PG) method and “accelerated proximal gradient” (APG) method [10, 3, 20]. These methods are well known to achieve linear convergence for strongly convex objectives. Particularly, APG achieves optimal iteration complexities for both non-strongly and strongly convex objectives. However, these methods need a per iteration cost of O(nd), where n denotes the number of components of the finite sum, and d is the dimension of the solution space. In typical machine learning tasks, n and d 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. correspond to the number of instances and features respectively, which can be very large. Then, the per iteration cost of these methods can be considerably high. A popular alternative is the “stochastic gradient descent” (SGD) method [19, 5, 17]. As the per iteration cost of SGD is only O(d) in non-mini-batch settings, SGD is suitable for many machine learning tasks. However, SGD only achieves sublinear rates and is ultimately slower than PG and APG. Recently, a number of stochastic gradient methods have been proposed; they use a variance reduction technique that utilizes the finite sum structure of the problem (“stochastic averaged gradient” (SAG) method [15, 16], “stochastic variance reduced gradient" (SVRG) method [6, 22] and SAGA [4]). Even though the per iteration costs of these methods are same as that of SGD, they achieve a linear convergence for strongly convex objectives. Consequently, these methods dramatically improve the total computational cost of PG. However, in size b mini-batch settings, the rate is essentially b times worse than in non-mini-batch settings (the extreme situation is b = n which corresponds to PG). This means that there is little benefit in applying mini-batch scheme to these methods. More recently, several authors have proposed accelerated stochastic methods for the composite finite sum problem (“accelerated stochastic dual coordinate ascent” (ASDCA) method [18], Universal Catalyst (UC) [8], “accelerated proximal coordinate gradient” (APCG) method [9], “stochastic primal-dual coordinate” (SPDC) method [23], and Katyusha [1]). ASDCA (UC), APCG, SPDC and Katyusha essentially achieve the optimal total computational cost1 for strongly convex objectives2 in non-mini-batch settings. However, in size b mini-batch settings, the rate is essentially √ b times worse than that in non-mini-batch settings, and these methods need size O(n) mini-batches for achieving the optimal iteration complexity3, which is essentially the same as APG. In addition, [12, 13] has proposed the “accelerated mini-batch proximal stochastic variance reduced gradient” (AccProxSVRG) method and its variant, the “accelerated efficient mini-batch stochastic variance reduced gradient” (AMSVRG) method. In non-mini-batch settings, AccProxSVRG only achieves the same rate as SVRG. However, in mini-batch settings, AccProxSVRG significantly improves the minibatch efficiency of non-accelerated variance reduction methods, and surprisingly, AccProxSVRG essentially only needs size O(√κ) mini-batches for achieving the optimal iteration complexity for strongly convex objectives, where κ is the condition number of the problem. However, the necessary size of mini-batches depends on the condition number and gradually increases when the condition number increases and ultimately matches with O(n) for a large condition number. Main contribution We propose a new accelerated stochastic variance reduction method that achieves better convergence than existing methods do, and it particularly takes advantages of mini-batch settings well; it is called the “doubly accelerated stochastic variance reduced dual averaging” (DASVRDA) method. We describe the main feature of our proposed method below and list the comparisons of our method with several preceding methods in Table 1. Our method significantly improves the mini-batch efficiencies of state-of-the-art methods. As a result, our method essentially only needs size O(√n) mini-batches4for achieving the optimal iteration complexities for both non-strongly and strongly convex objectives. 1More precisely, the rate of ASDCA (UC) is with extra log-factors, and near but worse than the one of APCG, SPDC and Katyusha. This means that ASDCA (UC) cannot be optimal. 2Katyusha also achieves a near optimal total computational cost for non-strongly convex objectives. 3We refer to “optimal iteration complexity” as the iteration complexity of deterministic Nesterov’s acceleration method [11]. 4Actually, when L/ε ≤n and L/µ ≤n, our method needs size O(n p ε/L) and O(n p µ/L) mini-batches, respectively, which are larger than O(√n), but smaller than O(n). Achieving optimal iteration complexity for solving high accuracy and bad conditioned problems is much more important than doing ones with low accuracy and well-conditioned ones, because the former needs more overall computational cost than the latter. 2 Table 1: Comparisons of our method with SVRG (SVRG++ [2]), ASDCA (UC), APCG, SPDC, Katyusha and AccProxSVRG. n is the number of components of the finite sum, d is the dimension of the solution space, b is the mini-batch size, L is the smoothness parameter of the finite sum, µ is the strong convexity parameter of objectives, and ε is accuracy. “Necessary mini-batch size” indicates the order of the necessary size of mini-batches for achieving the optimal iteration complexities O( p L/µlog(1/ε)) and O( p L/ε) for strongly and non-strongly convex objectives, respectively. We regard one computation of a full gradient as n/b iterations in size b mini-batch settings, for a fair comparison. “Unattainable” implies that the algorithm cannot achieve the optimal iteration complexity even if it uses size n mini-batches. eO hides extra log-factors. µ-strongly convex Non-strongly convex Total computational cost Necessary mini-batch size Total computational cost Necessary mini-batch size in size b mini-batch settings L/µ ≥n otherwise in size b mini-batch settings L/ε ≥nlog2(1/ε) otherwise SVRG (++) O d n + bL µ log 1 ε Unattainable Unattainable O d nlog 1 ε + bL ε Unattainable Unattainable ASDCA (UC) eO d n + q nbL µ log 1 ε Unattainable Unattainable eO d n+ √ nbL √ε Unattainable Unattainable APCG O d n + q nbL µ log 1 ε O(n) O(n) No direct analysis Unattainable Unattainable SPDC O d n + q nbL µ log 1 ε O(n) O(n) No direct analysis Unattainable Unattainable Katyusha O d n + q nbL µ log 1 ε O(n) O(n) O d nlog 1 ε + q nbL ε O(n) O(n) AccProxSVRG O d n + n−b n−1 L µ + b q L µ log 1 ε O q L µ O n p µ L No direct analysis Unattainable Unattainable DASVRDA O d n + (b + √n) q L µ log 1 ε O (√n) O n p µ L O d nlog 1 ε + (b + √n) q L ε O (√n) eO np ε L 2 Preliminary In this section, we formally describe the problem to be considered in this paper and the assumptions for our theory. We use ∥· ∥to denote the Euclidean L2 norm ∥· ∥2: ∥x∥= ∥x∥2 = pP i x2 i . For natural number n, [n] denotes set {1, . . . , n}. In this paper, we consider the following composite convex minimization problem: min x∈Rd {P(x) def = F(x) + R(x)}, (1) where F(x) = 1 n Pn i=1 fi(x). Here each fi : Rd →R is a Li-smooth convex function and R : Rd →R is a relatively simple and (possibly) non-differentiable convex function. Problems of this form often arise in machine learning and fall under regularized empirical risk minimization (ERM). In ERM problems, we are given n training examples {(ai, bi)}n i=1, where each ai ∈Rd is the feature vector of example i, and each bi ∈R is the label of example i. Important examples of ERM in our setting include linear regression and logistic regression with Elastic Net regularizer R(x) = λ1∥· ∥1 + (λ2/2)∥· ∥2 2 (λ1, λ2 ≥0). We make the following assumptions for our analysis: Assumption 1. There exists a minimizer x∗of (1). Assumption 2. Each fi is convex, and is Li-smooth, i.e., ∥∇fi(x) −∇fi(y)∥≤Li∥x −y∥(∀x, y ∈Rd). Assumption 3. Regularization function R is convex, and is relatively simple, which means that computing the proximal mapping of R at y, proxR(y) = argmin x∈Rd 1 2∥x −y∥2 + R(x) , takes O(d) computational cost, for any y ∈Rd. We always consider Assumptions 1, 2 and 3 in this paper. Assumption 4. There exists µ > 0 such that objective function P is µ-optimally strongly convex, i.e., P has a minimizer and satisfies µ 2 ∥x −x∗∥2 ≤P(x) −P(x∗) (∀x ∈Rd, ∀x∗∈argminx∈Rdf(x)). Note that the requirement of optimally strong convexity is weaker than the one of ordinary strong convexity (for the definition of ordinary strong convexity, see [11]). We further consider Assumption 4 when we deal with strongly convex objectives. 3 3 Our Approach: Double Acceleration In this section, we provide high-level ideas of our main contribution called “double acceleration.” First, we consider deterministic PG (Algorithm 1) and (non-mini-batch) SVRG (Algorithm 2). PG is an extension of the steepest descent to proximal settings. SVRG is a stochastic gradient method using the variance reduction technique, which utilizes the finite sum structure of the problem, and it achieves a faster convergence rate than PG does. As SVRG (Algorithm 2) matches with PG (Algorithm 1) when the number of inner iterations m equals 1, SVRG can be seen as a generalization of PG. The key element of SVRG is employing a simple but powerful technique called the variance reduction technique for gradient estimate. The variance reduction of the gradient is realized by setting gk = ∇fik(xk−1) −∇fik(ex) + ∇F(ex) rather than vanilla stochastic gradient ∇fik(xk−1). Generally, stochastic gradient ∇fik(xk−1) is an unbiased estimator of ∇F(xk−1), but it may have high variance. In contrast, gk is also unbiased, and one can show that its variance is “reduced”; that is, the variance converges to zero as xk−1 and ex to x∗. Algorithm 1: PG (ex0, η, S) for s = 1 to S do exs = One Stage PG(exs−1, η). end for return 1 S PS s=1 exs. Algorithm 2: SVRG (ex0, η, m, S) for s = 1 to S do exs = One Stage SVRG(exs−1, η, m). end for return 1 S PS s=1 exs. Algorithm 3: One Stage PG (ex, η) ex+ = proxηR(ex −η∇F(ex)). return ex+. Algorithm 4: One Stage SVRG (ex, η, m) x0 = ex. for k = 1 to m do Pick ik ∈[1, n] randomly. gk = ∇fik(xk−1) −∇fik(ex) + ∇F(ex). xk = proxηR(xk−1 −ηgk). end for return 1 n Pn k=1 xk. Algorithm 5: APG (ex0, η, S) ex−1 = ex0, eθ0 = 0. for s = 1 to S do eθs = s+1 2 , eys = exs−1 + eθs−1−1 eθs (exs−1 −exs−2). exs = One Stage PG(eys, η). end for return xS. Next, we explain the method of accelerating SVRG and obtaining an even faster convergence rate based on our new but quite natural idea “outer acceleration.” First, we would like to remind you that the procedure of deterministic APG is given as described in Algorithm 5. APG uses the famous “momentum” scheme and achieves the optimal iteration complexity. Our natural idea is replacing One Stage PG in Algorithm 5 with One Stage SVRG. With slight modifications, we can show that this algorithm improves the rates of PG, SVRG and APG, and is optimal. We call this new algorithm outerly accelerated SVRG. However, this algorithm has poor mini-batch efficiency, because in size b mini-batch settings, the rate of this algorithm is essentially √ b times worse than that of non-mini-batch settings. State-of-the-art methods APCG, SPDC, and Katyusha also suffer from the same problem in the mini-batch setting. Now, we illustrate that for improving the mini-batch efficiency, using the “inner acceleration” technique is beneficial. The author of [12] has proposed AccProxSVRG in mini-batch settings. AccProxSVRG applies the momentum scheme to One Stage SVRG, and we call this technique “inner” acceleration. He showed that the inner acceleration could significantly improve the mini-batch efficiency of vanilla SVRG. This fact indicates that inner acceleration is essential to fully utilize the mini-batch settings. However, AccProxSVRG is not a truly accelerated method, because in non-mini-batch settings, the rate of AccProxSVRG is same as that of vanilla SVRG. In this way, we arrive at our main high-level idea called “double” acceleration, which involves applying momentum scheme to both outer and inner algorithms. This enables us not only to lead to 4 the optimal total computational cost in non-mini-batch settings, but also to improving the mini-batch efficiency of vanilla acceleration methods. We have considered SVRG and its accelerations so far; however, we actually adopt stochastic variance reduced dual averaging (SVRDA) rather than SVRG itself, because we can construct lazy update rules of (innerly) accelerated SVRDA for sparse data. In Section G of supplementary material, we briefly discuss a SVRG version of our proposed method and provide its convergence analysis. 4 Algorithm Description In this section, we describe the concrete procedure of the proposed algorithm in detail. 4.1 DASVRDA for non-strongly convex objectives Algorithm 6: DASVRDAns(ex0, ez0, γ, {Li}n i=1, m, b, S) ex−1 = ez0, eθ0 = 0, ¯L = 1 n Pn i=1 Li, Q = {qi} = Li n¯L , η = 1 (1+ γ(m+1) b )¯L. for s = 1 to S do eθs = 1 −1 γ s+2 2 , eys = exs−1 + eθs−1−1 eθs (exs−1 −exs−2) + eθs−1 eθs (ezs−1 −exs−1). (exs, ezs) = One Stage AccSVRDA(eys, exs−1, η, m, b, Q). end for return exS. Algorithm 7: One Stage AccSVRDA (ey, ex, η, m, b, Q) x0 = z0 = ey, ¯g0 = 0, θ0 = 1 2. for k = 1 to m do Pick independently i1 k, . . . , ib k ∈[1, n] according to Q, set Ik = {iℓ k}b ℓ=1. θk = k+1 2 , yk = 1 −1 θk xk−1 + 1 θk zk−1. gk = 1 b P i∈Ik 1 nqi (∇fi(yk) −∇fi(ex)) + ∇F(ex), ¯gk = 1 −1 θk ¯gk−1 + 1 θk gk. zk = argmin z∈Rd n ⟨¯gk, z⟩+ R(z) + 1 2ηθkθk−1 ∥z −z0∥2o = proxηθkθk−1R (z0 −ηθkθk−1¯gk) . xk = 1 −1 θk xk−1 + 1 θk zk. end for return (xm, zm). We provide details of the doubly accelerated SVRDA (DASVRDA) method for non-strongly convex objectives in Algorithm 6. Our momentum step is slightly different from that of vanilla deterministic accelerated methods: we not only add momentum term ((eθs−1 −1)/eθs)(exs−1 −exs−2) to the current solution exs−1 but also add term (eθs−1/eθs)(ezs−1 −exs−1), where ezs−1 is the current more “aggressively” updated solution rather than exs−1; thus, this term also can be interpreted as momentum5. Then, we feed eys to One Stage Accelerated SVRDA (Algorithm 7) as an initial point. Note that Algorithm 6 can be seen as a direct generalization of APG, because if we set m = 1, One Stage Accelerated SVRDA is essentially the same as one iteration PG with initial point eys; then, we can see that ezs = exs, and Algorithm 6 essentially matches with deterministic APG. Next, we move to One Stage Accelerated SVRDA (Algorithm 7). Algorithm 7 is essentially a combination of the “accelerated regularized dual averaging” (AccSDA) method [21] with the variance reduction technique of SVRG. It updates zk by using the weighted average of all past variance reduced gradients ¯gk instead of only using a single variance reduced gradient gk. Note that for constructing variance reduced gradient gk, we use the full gradient of F at exs−1 rather than the initial point eys. The 5This form also arises in Monotone APG [7]. In Algorithm 7, ex = xm can be rewritten as (2/(m(m + 1)) Pm k=1 kzk, which is a weighted average of zk; thus, we can say that ez is updated more “aggressively” than ex. For the outerly accelerated SVRG (that is a combination of Algorithm 6 with vanilla SVRG, see section 3), ez and ex correspond to xm and (1/m) Pm k=1 xk in [22], respectively. Thus, we can also see that ez is updated more “aggressively” than ex. 5 Adoption of (Innerly) Accelerated SVRDA rather than (Innerly) Accelerated SVRG enables us to construct lazy updates for sparse data (for more details, see Section E of supplementary material). 4.2 DASVRDA for strongly convex objectives Algorithm 8: DASVRDAsc(ˇx0, γ, {Li}n i=1, m, b, S, T) for t = 1 to T do ˇxt = DASVRDAns(ˇxt−1, ˇxt−1, γ, {Li}n i=1, m, b, S). end for return ˇxT . Algorithm 8 is our proposed method for strongly convex objectives. Instead of directly accelerating the algorithm using a constant momentum rate, we restart Algorithm 6. Restarting scheme has several advantages both theoretically and practically. First, the restarting scheme only requires the optimal strong convexity of the objective instead of the ordinary strong convexity. Whereas, non-restarting accelerated algorithms essentially require the ordinary strong convexity of the objective. Second, for restarting algorithms, we can utilize adaptive restart schemes [14]. The adaptive restart schemes have been originally proposed for deterministic cases. The schemes are heuristic but quite effective empirically. The most fascinating property of these schemes is that we need not prespecify the strong convexity parameter µ, and the algorithms adaptively determine the restart timings. [14] have proposed two heuristic adaptive restart schemes: the function scheme and gradient scheme. We can easily apply these ideas to our method, because our method is a direct generalization of the deterministic APG. For the function scheme, we restart Algorithm 6 if P(exs) > P(exs−1). For the gradient scheme, we restart the algorithm if (eys −exs)⊤(eys+1 −exs) > 0. Here eys −exs can be interpreted as a “one stage” gradient mapping of P at eys. As eys+1 −exs is the momentum, this scheme can be interpreted such that we restart whenever the momentum and negative one Stage gradient mapping form an obtuse angle (this means that the momentum direction seems to be “bad”). We numerically demonstrate the effectiveness of these schemes in Section 6. Parameter tunings For DASVRDAns, only learning rate η needs to be tuned, because we can theoretically obtain the optimal choice of γ, and we can naturally use m = n/b as a default epoch length (see Section 5). For DASVRDAsc, both learning rate η and fixed restart interval S need to be tuned. 5 Convergence Analysis of DASVRDA Method In this section, we provide the convergence analysis of our algorithms. Unless otherwise specified, serial computation is assumed. First, we consider the DASVRDAns algorithm. Theorem 5.1. Suppose that Assumptions 1, 2 and 3 hold. Let ex0, ez0 ∈Rd, γ ≥3, m ∈N, b ∈[n] and S ∈N. Then DASVRDAns(ex0, ez0, γ, {Li}n i=1, m, b, S) satisfies E [P(exS) −P(x∗)] ≤ 4 1 −1 γ 2 (S + 2)2 1 −1 γ 2 (P(ex0) −P(x∗)) + 2 η(m + 1)m∥ez0 −x∗∥2 ! . The proof of Theorem 5.1 is found in the supplementary material (Section A). We can easily see that the optimal choice of γ is (3+ p 9 + 8b/(m + 1))/2 = O(1+b/m) (see Section B of supplementary material). We denote this value as γ∗. From Theorem 5.1, we obtain the following corollary: Corollary 5.2. Suppose that Assumptions 1, 2, and 3 hold. Let ex0 ∈Rd, γ = γ∗, m ∝n/b and b ∈ [n]. If we appropriately choose S = O( p (P(ex0) −P(x∗))/ε+(1/m+1/ √ mb) p¯L∥ex0 −x∗∥2/ε), then a total computational cost of DASVRDAns (ex0, γ∗, {Li}n i=1, m, b, S) for E [P(exS) −P(x∗)] ≤ ε is O d n r P(ex0) −P(x∗) ε + b + √n r ¯L∥ex0 −x∗∥2 ε !! . 6 Remark. If we adopt a warm start scheme for DASVRDAns, we can further improve the rate to O d nlog P(ex0) −P(x∗) ε + (b + √n) r L∥ex0 −x∗∥2 ε !! (see Section C and D of supplementary material). Next, we analyze the DASVRDAsc algorithm for optimally strongly convex objectives. Combining Theorem 5.1 with the optimal strong convexity of the objective function immediately yields the following theorem, which implies that the DASVRDAsc algorithm achieves a linear convergence. Theorem 5.3. Suppose that Assumptions 1, 2, 3 and 4 hold. Let ˇx0 ∈Rd, γ = γ∗, m ∈N, b ∈[n] and T ∈N. Define ρ def = 4{(1 −1/γ∗)2 + 4/(η(m + 1)mµ)}/{(1 −1/γ∗)2(S + 2)2}. If S is sufficiently large such that ρ ∈(0, 1), then DASVRDAsc(ˇx0, γ∗, {Li}n i=1, m, b, S, T) satisfies E[P(ˇxT ) −P(x∗)] ≤ρT [P(ˇx0) −P(x∗)]. From Theorem 5.3, we have the following corollary. Corollary 5.4. Suppose that Assumptions 1, 2, 3 and 4 hold. Let ˇx0 ∈Rd, γ = γ∗, m ∝n/b, b ∈[n]. There exists S = O(1 + (b/n + 1/√n) p¯L/µ), such that 1/log(1/ρ) = O(1). Moreover, if we appropriately choose T = O(log(P(ˇx0) −P(x∗)/ε), then a total computational cost of DASVRDAsc(ˇx0, γ∗, {Li}n i=1, m, b, S, T) for E [P(ˇxT ) −P(x∗)] ≤ε is O d n + b + √n s ¯L µ log P(ˇx0) −P(x∗) ε . Remark. Corollary 5.4 implies that if the mini-batch size b is O(√n), DASVRDAsc(ˇx0, γ∗, {Li}n i=1, n/b, b, S, T) still achieves the total computational cost of O(d(n + p n¯L/µ)log(1/ε)), which is much better than O(d(n + p nb¯L/µ)log(1/ε)) of APCG, SPDC, and Katyusha. Remark. Corollary 5.4 also implies that DASVRDAsc only needs size O(√n) mini-batches for achieving the optimal iteration complexity O( p L/µlog(1/ε)), when L/µ ≥n. In contrast, APCG, SPDC and Katyusha need size O(n) mini-batches and AccProxSVRG does O( p L/µ) ones for achieving the optimal iteration complexity. Note that even when L/µ ≤n, our method only needs size O(n p µ/L) mini-batches 6. This size is smaller than O(n) of APCG, SPDC, and Katyusha, and the same as that of AccProxSVRG. 6 Numerical Experiments In this section, we provide numerical experiments to demonstrate the performance of DASVRDA. We numerically compare our method with several well-known stochastic gradient methods in minibatch settings: SVRG [22] (and SVRG++ [2]), AccProxSVRG [12], Universal Catalyst [8] , APCG [9], and Katyusha [1]. The details of the implemented algorithms and their parameter tunings are found in the supplementary material. In the experiments, we focus on the regularized logistic regression problem for binary classification, with regularizer λ1∥· ∥1 + (λ2/2)∥· ∥2 2. We used three publicly available data sets in the experiments. Their sizes n and dimensions d, and common min-batch sizes b for all implemented algorithms are listed in Table 2. Table 2: Summary of the data sets and mini-batch size used in our numerical experiments Data sets n d b a9a 32, 561 123 180 rcv1 20, 242 47, 236 140 sido0 12, 678 4, 932 100 For regularization parameters, we used three settings (λ1, λ2) = (10−4, 0), (10−4, 10−6), and (0, 10−6). For the former case, the objective is non-strongly convex, and for the latter two cases, 6Note that the required size is O(n p µ/L)(≤O(n)), which is not O(n p L/µ) ≥O(n). 7 (a) a9a, (λ1, λ2) = (10−4, 0) (b) a9a, (λ1, λ2) = (10−4, 10−6) (c) a9a, (λ1, λ2) = (0, 10−6) (d) rcv1, (λ1, λ2) = (10−4, 0) (e) rcv1, (λ1, λ2) = (10−4, 10−6) (f) rcv1, (λ1, λ2) = (0, 10−6) (g) sido0, (λ1, λ2) = (10−4, 0) (h) sido0, (λ1, λ2) = (10−4, 10−6) (i) sido0, (λ1, λ2) = (0, 10−6) Figure 1: Comparisons on a9a (top), rcv1 (middle) and sido0 (bottom) data sets, for regularization parameters (λ1, λ2) = (10−4, 0) (left), (λ1, λ2) = (10−4, 10−6) (middle) and (λ1, λ2) = (0, 10−6) (right). the objectives are strongly convex. Note that for the latter two cases, the strong convexity of the objectives is µ = 10−6 and is relatively small; thus, it makes acceleration methods beneficial. Figure 1 shows the comparisons of our method with the different methods described above on several settings. “Objective Gap” means P(x) −P(x∗) for the output solution x. “Elapsed Time [sec]” means the elapsed CPU time (sec). “Restart_DASVRDA” means DASVRDA with heuristic adaptive restarting (Section 4). We can observe the following from these results: • Our proposed DASVRDA and Restart DASVRDA significantly outperformed all the other methods overall. • DASVRDA with the heuristic adaptive restart scheme efficiently made use of the local strong convexities of non-strongly convex objectives and significantly outperformed vanilla DASVRDA. For the other settings, the algorithm was still comparable to vanilla DASVRDA. • UC+AccProxSVRG7 outperformed vanilla AccProxSVRG but was outperformed by our methods overall. 7Although there has been no theoretical guarantee for UC + AccProxSVRG, we thought that it was fair to include experimental results about that because UC + AccProxSVRG gives better performances than the vanilla AccProxSVRG. Through some theoretical analysis, we can prove that UC + AccProxSVRG also has the similar rate and mini-batch efficiency to our proposed method, although these results are not obtained in any literature. However, our proposed method is superior to this algorithm both theoretically and practically, because the algorithm has several drawbacks due to the use of UC as follows. First, the algorithm has an additional logarithmic factor in its convergence rate. This factor is generally not negligible and slows down its practical performances. Second, the algorithm has more tuning parameters than our method. Third, the stopping criterion of each sub-problem of UC is hard to be tuned. 8 • APCG sometimes performed unstably and was outperformed by vanilla SVRG. On sido0 data set, for Ridge Setting, APCG significantly outperformed all the other methods. • Katyusha always outperformed vanilla SVRG, but was significantly outperformed by our methods. 7 Conclusion In this paper, we developed a new accelerated stochastic variance reduced gradient method for regularized empirical risk minimization problems in mini-batch settings: DASVRDA. We have shown that DASVRDA achieves the total computational costs of O(d(nlog(1/ε) + (b + √n) p L/ε)) and O(d(n + (b + √n) p L/µ)log(1/ε)) in size b mini-batch settings for non-strongly and optimally strongly convex objectives, respectively. In addition, DASVRDA essentially achieves the optimal iteration complexities only with size O(√n) mini-batches for both settings. In the numerical experiments, our method significantly outperformed state-of-the-art methods, including Katyusha and AccProxSVRG. Acknowledgment This work was partially supported by MEXT kakenhi (25730013, 25120012, 26280009 and 15H05707), JST-PRESTO and JST-CREST. References [1] Z. Allen-Zhu. Katyusha: The First Direct Acceleration of Stochastic Gradient Methods. In 48th Annual ACM Symposium on the Theory of Computing, pages 19–23, 2017. [2] Z. Allen-Zhu and Y. Yuan. Improved SVRG for Non-Strongly-Convex or Sum-of-Non-Convex Objectives. In Proceedings of the 33rd International Conference on Machine Learning, pages 1080–1089, 2016. [3] A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM Journal on Imaging Sciences, 2(1):183–202, 2009. [4] A. Defazio, F. Bach, and S. Lacoste-Julien. Saga: A fast incremental gradient method with support for non-strongly convex composite objectives. In Advances in Neural Information Processing Systems 27, pages 1646–1654, 2014. [5] E. Hazan, A. Agarwal, and S. Kale. Logarithmic regret algorithms for online convex optimization. Machine Learning, 69(2-3):169–192, 2007. [6] R. Johnson and T. Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In Advances in Neural Information Processing Systems 26, pages 315–323, 2013. [7] H. Li and Z. Lin. Accelerated proximal gradient methods for nonconvex programming. In Advances in Neural Information Processing Systems 28, pages 379–387, 2015. [8] H. Lin, J. Mairal, and Z. Harchaoui. A universal catalyst for first-order optimization. In Advances in Neural Information Processing Systems 28, pages 3384–3392, 2015. [9] Q. Lin, Z. Lu, and L. Xiao. An accelerated proximal coordinate gradient method. In Advances in Neural Information Processing Systems 27, pages 3059–3067, 2014. [10] Y. Nesterov. Gradient methods for minimizing composite objective function. Mathematical Programming, 140(1):125–161, 2013. [11] Y. Nesterov. Introductory lectures on convex optimization: A basic course, volume 87. Springer Science & Business Media, 2013. [12] A. Nitanda. Stochastic proximal gradient descent with acceleration techniques. In Advances in Neural Information Processing Systems 27, pages 1574–1582, 2014. 9 [13] A. Nitanda. Accelerated stochastic gradient descent for minimizing finite sums. In Proceedings of the 19th International Conference on Artificial Intelligence and Statistics, pages 195–203, 2016. [14] B. O’Donoghue and E. Candes. Adaptive restart for accelerated gradient schemes. Foundations of computational mathematics, 15(3):715–732, 2015. [15] N. L. Roux, M. Schmidt, and F. R. Bach. A stochastic gradient method with an exponential convergence _rate for finite training sets. In Advances in Neural Information Processing Systems 25, pages 2663–2671, 2012. [16] M. Schmidt, N. L. Roux, and F. Bach. Minimizing finite sums with the stochastic average gradient. Mathematical Programming, 162(1):83–112, 2017. [17] S. Shalev-Shwartz and Y. Singer. Logarithmic regret algorithms for strongly convex repeated games. Technical report, The Hebrew University, 2007. [18] S. Shalev-Shwartz and T. Zhang. Stochastic dual coordinate ascent methods for regularized loss. The Journal of Machine Learning Research, 14(1):567–599, 2013. [19] Y. Singer and J. C. Duchi. Efficient learning using forward-backward splitting. In Advances in Neural Information Processing Systems 22, pages 495–503, 2009. [20] P. Tseng. On accelerated proximal gradient methods for convex-concave optimization. Technical report, University of Washington, Seattle, 2008. [21] L. Xiao. Dual averaging method for regularized stochastic learning and online optimization. In Advances in Neural Information Processing Systems 22, pages 2116–2124, 2009. [22] L. Xiao and T. Zhang. A proximal stochastic gradient method with progressive variance reduction. SIAM Journal on Optimization, 24(4):2057–2075, 2014. [23] Y. Zhang and L. Xiao. Stochastic primal-dual coordinate method for regularized empirical risk minimization. In Proceedings of the 32nd International Conference on Machine Learning, pages 353–361, 2015. 10 | 2017 | 308 |
6,795 | Learning with Feature Evolvable Streams Bo-Jian Hou Lijun Zhang Zhi-Hua Zhou National Key Laboratory for Novel Software Technology, Nanjing University, Nanjing, 210023, China {houbj,zhanglj,zhouzh}@lamda.nju.edu.cn Abstract Learning with streaming data has attracted much attention during the past few years. Though most studies consider data stream with fixed features, in real practice the features may be evolvable. For example, features of data gathered by limitedlifespan sensors will change when these sensors are substituted by new ones. In this paper, we propose a novel learning paradigm: Feature Evolvable Streaming Learning where old features would vanish and new features would occur. Rather than relying on only the current features, we attempt to recover the vanished features and exploit it to improve performance. Specifically, we learn two models from the recovered features and the current features, respectively. To benefit from the recovered features, we develop two ensemble methods. In the first method, we combine the predictions from two models and theoretically show that with the assistance of old features, the performance on new features can be improved. In the second approach, we dynamically select the best single prediction and establish a better performance guarantee when the best model switches. Experiments on both synthetic and real data validate the effectiveness of our proposal. 1 Introduction In many real tasks, data are accumulated over time, and thus, learning with streaming data has attracted much attention during the past few years. Many effective approaches have been developed, such as hoeffding tree [7], Bayes tree [27], evolving granular neural network (eGNN) [17], Core Vector Machine (CVM) [29], etc. Though these approaches are effective for certain scenarios, they have a common assumption, i.e., the data stream comes with a fixed stable feature space. In other words, the data samples are always described by the same set of features. Unfortunately, this assumption does not hold in many streaming tasks. For example, for ecosystem protection one can deploy many sensors in a reserve to collect data, where each sensor corresponds to an attribute/feature. Due to its limited-lifespan, after some periods many sensors will wear out, whereas some new sensors can be spread. Thus, features corresponding to the old sensors vanish while features corresponding to the new sensors appear, and the learning algorithm needs to work well under such evolving environment. Note that the ability of adapting to environmental change is one of the fundamental requirements for learnware [37], where an important aspect is the ability of handling evolvable features. A straightforward approach is to rely on the new features and learn a new model to use. However, this solution suffers from some deficiencies. First, when new features just emerge, there are few data samples described by these features, and thus, the training samples might be insufficient to train a strong model. Second, the old model of vanished features is ignored, which is a big waste of our data collection effort. To address these limitations, in this paper we propose a novel learning paradigm: Feature Evolvable Streaming Learning (FESL). We formulate the problem based on a key observation: in general features do not change in an arbitrary way; instead, there are some overlapping periods in which both old and new features are available. Back to the ecosystem protection example, since the lifespan of sensors is known to us, e.g., how long their battery will run out is a prior knowledge, we 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. usually spread a set of new sensors before the old ones wear out. Thus, the data stream arrives in a way as shown in Figure 1, where in period T1, the original set of features are valid and at the end of T1, period B1 appears, where the original set of features are still accessible, but some new features are included; then in T2, the original set of features vanish, only the new features are valid but at the end of T2, period B2 appears where newer features come. This process will repeat again and again. Note that the T1 and T2 periods are usually long, whereas the B1 and B2 periods are short because, as in the ecosystem protection example, the B1 and B2 periods are just used to switch the sensors and we do not want to waste a lot of lifetime of sensors for such overlapping periods. Feature Evolution Data Streaming Feature Set 𝑆1 𝑆2 𝑆3 … data with feature set 𝑆1 data with feature set 𝑆1 and 𝑆2 data with feature set 𝑆2 data with feature set 𝑆2 and 𝑆3 𝑇2 𝑇1 𝐵1 𝐵2 Figure 1: Illustration that how data stream comes. In this paper, we propose to solve the FESL problem by utilizing the overlapping period to discover the relationship between the old and new features, and exploiting the old model even when only the new features are available. Specifically, we try to learn a mapping from new features to old features through the samples in the overlapping period. In this way, we are able to reconstruct old features from new ones and thus the old model can still be applied. To benefit from additional features, we develop two ensemble methods, one is in a combination manner and the other in a dynamic selection manner. In the first method, we combine the predictions from two models and theoretically show that with the assistance of old features, the performance on new features can be improved. In the second approach, we dynamically select the best single prediction and establish a better performance guarantee when the best model switches at an arbitrary time. Experiments on synthetic and real datasets validate the effectiveness of our proposal. The rest of this paper is organized as follows. Section 2 introduces related work. Section 3 presents the formulation of FESL. Our proposed approaches with corresponding analyses are presented in section 4. Section 5 reports experimental results. Finally, Section 6 concludes. 2 Related Work Data stream mining contains several tasks, including classification, clustering, frequency counting, and time series analysis. Our work is most related to the classification task and we can also solve the regression problem. Existing techniques for data stream classification can be divided into two categories, one only considers a single classifier and the other considers ensemble classifiers. For the former, several methods origin from approaches such as decision tree [7], Bayesian classification [27], neural networks [17], support vector machines [29], and k-nearest neighbour [1]. For the latter, various ensemble methods have been proposed including Online Bagging & Boosting [22], Weighted Ensemble Classifiers [30, 20], Adapted One-vs-All Decision Trees (OVA) [12] and Meta-knowledge Ensemble [33]. For more details, please refer to [9, 10, 2, 6, 21]. These traditional streaming data algorithms often assume that the data samples are described by the same set of features, while in many real streaming tasks feature often changes. We want to emphasize that though concept-drift happens in streaming data where the underlying data distribution changes over time [2, 10, 4], the number of features in concept-drift never changes which is different from our problem. Most studies correlated to features changing are focusing on feature selection and extraction [26, 35] and to the best of our knowledge, none of them consider the evolving of feature set during the learning process. Data stream mining is a hot research direction in the area of data mining while online learning [38, 14] is a related topic from the area of machine learning. Yet online learning can also tackle the streaming data problem since it assumes that the data come in a streaming way. Online learning has been extensively studied under different settings, such as learning with experts [5] and online convex optimization [13, 28]. There are strong theoretical guarantees for online learning, and it usually uses regret or the number of mistakes to measure the performance of the learning procedure. However, most of existing online learning algorithms are limited to the case that the feature set is fixed. Other related topics involving multiple feature sets include multi-view learning [18, 19, 32], transfer learning [23, 24] and incremental attribute learning [11]. Although both our approaches and multiview learning exploit the relation between different sets of features, there exists a fundamental 2 difference: multi-view learning assumes that every sample is described by multiple feature sets simultaneously, whereas in FESL only few samples in the feature switching period have two sets of features, and no matter how many periods there are, the switching part involves only two sets of features. Transfer learning usually assumes that data are in batch mode, few of them consider the streaming cases where data arrives sequentially and cannot be stored completely. One exception is online transfer learning [34] in which data from both sets of features arrive sequentially. However, they assume that all the feature spaces must appear simultaneously during the whole learning process while such an assumption is not available in FESL. When it comes to incremental attribute learning, old sets of features do not vanish or do not vanish entirely while in FESL, old ones will vanish thoroughly when new sets of features come. The most related work is [15], which also handles evolving features in streaming data. Different to our setting where there are overlapping periods, [15] handles situations where there is no overlapping period but there are overlapping features. Thus, the technical challenges and solutions are different. 3 Preliminaries Feature Evolution Data Streaming Feature Space 𝑆1 Feature Space 𝑆2 𝐱1 𝑆1 … 𝐱𝑇1−𝐵 𝑆1 𝐱𝑇1−𝐵+1 𝑆1 𝐱𝑇1−𝐵+1 𝑆2 … … 𝐱𝑇1 𝑆1 𝐱𝑇1 𝑆2 𝐱𝑇1+1 𝑆2 … 𝐱𝑇1+𝑇2 𝑆2 𝑇1 𝐵 𝑇2 Figure 2: Specific illustration with one cycle. We focus on both classification and regression tasks. On each round of the learning process, the algorithm observes an instance and gives its prediction. After the prediction has been made, the true label is revealed and the algorithm suffers a loss which reflects the discrepancy between the prediction and the groundtruth. We define “feature space" in our paper by a set of features. That the feature space changes means both the underlying distribution of the feature set and the number of features change. Consider the process with three periods where in the first period large amount of data stream come from the old feature space; then in the second period named as overlapping period, few of data come from both the old and the new feature space; soon afterwards in the third period, data stream only come from the new feature space. We call this whole process a cycle. As can be seen from Figure 1, each cycle merely includes two feature spaces. Thus, we only need to focus on one cycle and it is easy to extend to the case with multiple cycles. Besides, we assume that the old features in one cycle will vanish simultaneously by considering the example that in ecosystem protection, all the sensors share the same expected lifespan and thus they will wear out at the same time. We will study the case where old features do not vanish simultaneously in the future work. Based on the above discussion, we only consider two feature spaces denoted by S1 and S2, respectively. Suppose that in the overlapping period, there are B rounds of instances both from S1 and S2. As can be seen from Figure 2, the process can be concluded as follows. • For t = 1, . . . , T1 −B, in each round, the learner observes a vector xS1 t ∈Rd1 sampled from S1 where d1 is the number of features of S1, T1 is the number of total rounds in S1. • For t = T1 −B + 1, . . . , T1, in each round, the learner observes two vectors xS1 t ∈Rd1 and xS2 t ∈Rd2 from S1 and S2, respectively where d2 is the number of features of S2. • For t = T1 + 1, . . . , T1 + T2, in each round, the learner observes a vector xS2 t ∈Rd2 sampled from S2 where T2 is the number of rounds in S2. Note that B is small, so we can omit the streaming data from S2 on rounds T1 −B + 1, . . . , T1 since they have minor effect on training the model in S2. We use ∥x∥to denote the ℓ2-norm of a vector x ∈Rdi, i = 1, 2. The inner product is denoted by ⟨·, ·⟩. Let Ω1 ⊆Rd1 and Ω2 ⊆Rd2 be two sets of linear models that we are interested in. We define the projection ΠΩi(b) = argmina∈Ωi ∥a −b∥, i = 1, 2. We restrict our prediction function in i-th feature space and t-th round to be linear which takes the form ⟨wi,t, xSi t ⟩where wi,t ∈Rdi, i = 1, 2. The loss function ℓ(w⊤x, y) is convex in its first argument and in implementing algorithms, we use 3 Algorithm 1 Initialize 1: Initialize w1,1 ∈Ω1 randomly, M1 = 0, and M2 = 0; 2: for t = 1, 2, . . . , T1 do 3: Receive xS1 t ∈Rd1 and predict ft = w⊤ 1,txS1 t ∈R; Receive the target yt ∈R, and suffer loss ℓ(ft, yt); 4: Update w1,t using (1) where τt = 1/ √ t; 5: if t > T1 −B then M1 = M1 + xS2 t xS2 t ⊤and M2 = M2 + xS2 t xS1 t ⊤; 6: M∗= M −1 1 M2. logistic loss for classification task, namely ℓ(w⊤x, y) = (1/ ln 2) ln(1 + exp(−y(w⊤x))) and square loss for regression task, namely ℓ(w⊤x, y) = (y −w⊤x)2. The most straightforward or baseline algorithm is to apply online gradient descent [38] on rounds 1, . . . , T1 with streaming data xS1 t , and invoke it again on rounds T1 + 1, . . . , T1 + T2 with streaming data xS2 t . The models are updated according to (1), where τt is a varied step size: wi,t+1 = ΠΩi wi,t −τt∇ℓ(w⊤ i,txSi t , yt) , i = 1, 2. (1) 4 Our Proposed Approach In this section, we first introduce the basic idea of the solution to FESL, then two different kinds of approaches with the corresponding analyses are proposed. The major limitation of the baseline algorithm mentioned above is that the model learned on rounds 1, . . . , T1 is ignored on rounds T1 + 1, . . . , T1 + T2. The reason is that from rounds t > T1, we cannot observe data from feature space S1, and thus the model w1,T1, which operates in S1, cannot be used directly. To address this challenge, we assume there is a certain relationship ψ : Rd2 →Rd1 between the two feature spaces, and we try to discover it in the overlapping period. There are several methods to learn a relationship between two sets of features including multivariate regression [16], streaming multi-label learning [25], etc. In our setting, since the overlapping period is very short, it is unrealistic to learn a complex relationship between the two spaces. Instead, we use a linear mapping to approximate ψ. Assume the coefficient matrix of the linear mapping is M, then during rounds T1 −B + 1, . . . , T1, the estimation of M can be based on least squares min M∈Rd2×d1 XT1 t=T1−B+1 ∥xS1 t −M ⊤xS2 t ∥2 2. The optimal solution M∗to the above problem is given by M∗= T1 X t=T1−B+1 xS2 t xS2 t ⊤ !−1 T1 X t=T1−B+1 xS2 t xS1 t ⊤ ! . Then if we only observe an instance xS2 t ∈Rd2 from S2, we can recover an instance in S1 by ψ(xS2) ∈Rd1, to which w1,T1 can be applied. Based on this idea, we will make two changes to the baseline algorithm: • During rounds T1−B+1, . . . , T1, we will learn a relationship ψ from (xS1 T1−B+1, xS2 T1−B+1), . . . , (xS1 T1, xS2 T1). • From rounds t > T1, we will keep on updating w1,t using the recovered data ψ(xS2 t ) and predict the target by utilizing the predictions of w1,t and w2,t. In round t > T1, the learner can calculate two base predictions based on models w1,t and w2,t: f1,t = w⊤ 1,t(ψ(xS2 t )) and f2,t = w⊤ 2,txS2 t . By utilizing the two base predictions in each round, we propose two methods, both of which are able to follow the better base prediction empirically and theoretically. The process to obtain the relationship mapping ψ and w1,T1 during rounds 1, . . . , T1 are concluded in Algorithm 1. 4 Algorithm 2 FESL-c(ombination) 1: Initialize ψ and w1,T1 during 1, . . . , T1 using Algorithm 1; 2: α1,T1 = α2,T1 = 1 2; 3: Initialize w2,T1+1 randomly and w1,T1+1 by w1,T1; 4: for t = T1 + 1, T1 + 2, . . . , T1 + T2 do 5: Receive xS2 t ∈RS2 and predict f1,t = w⊤ 1,t(ψ(xS2 t )) and f2,t = w⊤ 2,txS2 t ; 6: Predict bpt ∈R using (2), then receive the target yt ∈R, and suffer loss ℓ(bpt, yt); 7: Update weights using (3) where η = p 8(ln 2)/T2; 8: Update w1,t and w2,t using (4) and (1) respectively where τt = 1/√t −T1; 4.1 Weighted Combination We first propose an ensemble method by combining predictions with weights based on exponential of the cumulative loss [5]. The prediction at time t is the weighted average of all the base predictions: bpt = α1,tf1,t + α2,tf2,t (2) where αi,t is the weight of the i-th base prediction. With the previous loss of each base model, we can update the weights of the two base models as follows: αi,t+1 = αi,te−ηℓ(fi,t,yt) P2 j=1 αj,te−ηℓ(fj,t,yt) , i = 1, 2, (3) where η is a tuned parameter. The updating rule of the weights shows that if the loss of one of the models on previous round is large, then its weight will decrease in an exponential rate in next round, which is reasonable and can derive a good theoretical result shown in Theorem 1. Algorithm 2 summarizes our first approach for FESL named as FESL-c(ombination). We first learn a model w1,T1 using online gradient descent on rounds 1, . . . , T1, during which, we also learn a relationship ψ for t = T1 −B + 1, . . . , T1. For t = T1 + 1, . . . , T1 + T2, we learn a model w2,t on each round and keep updating w1,t on the recovered data ψ(xS2 t ) showed in (4) where τt is a varied step size: w1,t+1 = ΠΩi w1,t −τt∇ℓ(w⊤ 1,t(ψ(xS2 t )), yt) . (4) Then we combine the predictions of the two models by weights calculated in (3). Analysis In this paragraph, we borrow the regret from online learning to measure the performance of FESL-c. Specifically, we give a loss bound as follows which shows that the performance will be improved with assistance of the old feature space. For the sake of soundness, we put the proof of our theorems in the supplementary file. We define that LS1 and LS2 are two cumulative losses suffered by base models on rounds T1 + 1, . . . , T1 + T2, LS1 = T1+T2 X t=T1+1 ℓ(f1,t, yt), LS2 = T1+T2 X t=T1+1 ℓ(f2,t, yt), (5) and LS12 is the cumulative loss suffered by our methods: LS12 = PT1+T2 t=T1+1 ℓ(bpt, yt). Then we have: Theorem 1. Assume that the loss function ℓis convex in its first argument and that it takes value in [0,1]. For all T2 > 1 and for all yt ∈Y with t = T1 + 1, . . . , T1 + T2, LS12 with parameter ηt = p 8(ln 2)/T2 satisfies LS12 ≤min(LS1, LS2) + p (T2/2) ln 2 (6) This theorem implies that the cumulative loss LS12 of Algorithm 2 over rounds T1 + 1, . . . , T1 + T2 is comparable to the minimum of LS1 and LS2. Furthermore, we define C = p (T2/2) ln 2. If LS2 −LS1 > C, it is easy to verify that LS12 is smaller than LS2. In summary, on rounds T1 + 1, . . . , T1 + T2, when w1,t is better than w2,t to certain degree, the model with assistance from S1 is better than that without assistance. 5 Algorithm 3 FESL-s(election) 1: Initialize ψ and w1,T1 during 1, . . . , T1 using Algorithm 1; 2: α1,T1 = α2,T1 = 1 2; 3: Initialize w2,T1+1 randomly and w1,T1+1 by w1,T1; 4: for t = T1 + 1, T1 + 2, . . . , T1 + T2 do 5: Receive xS2 t ∈RS2 and predict f1,t = w⊤ 1,t(ψ(xS2 t )) and f2,t = w⊤ 2,txS2 t ; 6: Draw a model wi,t according to the distribution (7) and predict bpt = fi,t according to the model; 7: Receive the target yt ∈R, and suffer loss ℓ(bpt, yt); Update the weights using (8); 8: Update w1,t and w2,t using (4) and (1) respectively, where τt = 1/√t −T1. 4.2 Dynamic Selection The combination approach mentioned in the above subsection combines several base models to improve the overall performance. Generally, combination of several classifiers performs better than selecting only one single classifier [36]. However, it requires that the performance of base models should not be too bad, for example, in Adaboost the accuracy of the base classifiers should be no less than 0.5 [8]. Nevertheless, in our FESL problem, on rounds T1 + 1, . . . , T1 + T2, w2,t cannot satisfy the requirement in the beginning due to insufficient training data and w1,t may become worse when more and more data come causing a cumulation of recovered error. Thus, it may not be appropriate to combine the two models all the time, whereas dynamically selecting the best single may be a better choice. Hence we propose a method based on a new strategy, i.e., dynamic selection, similar to the Dynamic Classifier Selection [36] which only uses the best single model rather than combining both of them in each round. Note that, though we only select one of the models, we retain and utilize both of them to update their weights. So it is still an ensemble method. The basic idea of dynamic selection is to select the model of larger weight with higher probability. Algorithm 3 summarizes our second approach for FESL named as FESL-s(election). Specifically, the steps in Algorithm 3 on rounds 1, . . . , T1 is the same as that in Algorithm 2. For t = T1 + 1, . . . , T1 + T2, we still update weights of each model. However, when doing prediction, we do not combine all the models’ prediction, we adopt the result of the “best" model’s according to the distribution of their weights pi,t = αi,t−1 P2 j=1 αj,t−1 i = 1, 2. (7) To track the best model, we have a different way of updating weights which is given as follows [5]. vi,t = αi,t−1e−ηℓ(fi,t,yt), i = 1, 2, αi,t = δ Wt 2 + (1 −δ)vi,t, i = 1, 2, (8) where we define Wt = v1,t + v2,t, δ = 1/(T2 −1), η = p 8/T2 (2 ln 2 + (T2 −1)H(1/(T2 −1))) and H(x) = −x ln x −(1 −x) ln(1 −x) is the binary entropy function defined for x ∈(0, 1). Analysis From rounds t > T1, the first model w1,t would become worse due to the cumulative recovered error while the second model will become better by the large amount of coming data. Since w1,t is initialized by w1,T 1 which is learnt from the old feature space and w2,t is initialized randomly, it is reasonable to assume that w1,t is better than w2,t in the beginning, but inferior to w2,t after sufficient large number of rounds. Let s be the round after which w1,t is worse than w2,t. We define Ls = Ps t=T1+1 ℓ(f1,t, yt) + PT2 t=s+1 ℓ(f2,t, yt), we can verify that min T1+1≤s≤T1+T2 Ls ≤min i=1,2 LSi. (9) Then a more ambitious goal is to compare the proposed algorithm against w1,t from rounds T1 + 1 to s, and against the w2,t from rounds s to T1 + T2, which motivates us to study the following performance measure LS12 −Ls. Because the exact value of s is generally unknown, we need to bound the worst-case LS12 −minT1+1≤s≤T1+T2 Ls. An upper bound of LS12 is given as follows. Theorem 2. For all T2 > 1, if the model is run with parameter δ = 1/(T2 −1) and η = p 8/T2 (2 ln 2 + (T2 −1)H(1/T2 −1)), then LS12 ≤ min T1+1≤s≤T1+T2 Ls + s T2 2 2 ln 2 + H(δ) δ (10) where H(x) = −x ln x −(1 −x) ln(1 −x) is the binary entropy function. 6 Table 1: Detail description of datasets: let n be the number of examples, and d1 and d2 denote the dimensionality of the first and second feature space, respectively. The first 9 datasets in the left column are synthetic datasets, “r.EN-GR" means the dataset EN-GR comes from Reuter and “RFID" is the real dataset. Dataset n d1 d2 Dataset n d1 d2 Dataset n d1 d2 Australian 690 42 29 r.EN-FR 18,758 21,531 24,892 r.GR-IT 29,953 34,279 15,505 Credit-a 653 15 10 r.EN-GR 18,758 21,531 34,215 r.GR-SP 29,953 34,279 11,547 Credit-g 1,000 20 14 r.EN-IT 18,758 21,531 15,506 r.IT-EN 24,039 15,506 21,517 Diabetes 768 8 5 r.EN-SP 18,758 21,531 11,547 r.IT-FR 24,039 15,506 24,892 DNA 940 180 125 r.FR-EN 26,648 24,893 21,531 r.IT-GR 24,039 15,506 34,278 German 1,000 59 41 r.FR-GR 26,648 24,893 34,287 r.IT-SP 24,039 15,506 11,547 Kr-vs-kp 3,196 36 25 r.FR-IT 26,648 24,893 15,503 r.SP-EN 12,342 11,547 21,530 Splice 3,175 60 42 r.FR-SP 26,648 24,893 11,547 r.SP-FR 12,342 11,547 24,892 Svmguide3 1,284 22 15 r.GR-EN 29,953 34,279 21,531 r.SP-GR 12,342 11,547 34,262 RFID 940 78 72 r.GR-FR 29,953 34,279 24,892 r.SP-IT 12,342 11,547 15,500 According to Theorem 2 we know that LS12 is comparable to minT1+1≤s≤T1+T2 Ls. Due to (9), we can conclude that the upper bound of LS12 in Algorithm 3 is tighter than that of Algorithm 2. 5 Experiments In this section, we first introduce the datasets we use. We want to emphasize that we collected one real dataset by ourselves since our setting of feature evolving is relatively novel so that the required datasets are not widely available yet. Then we introduce the compared methods and settings. Finally experiment results are given. 5.1 Datasets We conduct our experiments on 30 datasets consisting of 9 synthetic datasets, 20 Reuter datasets and 1 real dataset. To generate synthetic data, we randomly choose some datasets from different domains including economy and biology, etc1 whose scales vary from 690 to 3,196. They only have one feature space at first. We artificially map the original datasets into another feature space by random Gaussian matrices, then we have data both from feature space S1 and S2. Since the original data are in batch mode, we manually make them come sequentially. In this way, synthetic data are completely generated. We also conduct our experiments on 20 datasets from Reuter [3]. They are multi-view datasets which have large scale varying from 12,342 to 29,963. Each dataset has two views which represent two different kinds of languages, respectively. We regard the two views as the two feature spaces. Now they do have two feature spaces but the original data are in batch mode, so we will artificially make them come in streaming way. We use the RFID technique to collect the real data which contain 450 instances from S1 and S2 respectively. RFID technique is widely used to do moving goods detection [31]. In our case, we want to utilize the RFID technique to predict the location’s coordinate of the moving goods attached by RFID tags. Concretely, we arranged several RFID aerials around the indoor area. In each round, each RFID aerial received the tag signals, then the goods with tag moved, at the same time, we recorded the goods’ coordinate. Before the aerials expired, we arranged new aerials beside the old ones to avoid the situation without aerials. So in this overlapping period, we have data from both old and new feature spaces. After the old aerials expired, we continue to use the new ones to receive signals. Then we only have data from feature space S2. So the RFID data we collect totally satisfy our assumptions. The details of all the datasets we use are presented in Table 1. 5.2 Compared Approaches and Settings We compare our FESL-c and FESL-s with three approaches. One is mentioned in Section 3, where once the feature space changed, the online gradient descent algorithm will be invoked from scratch, named as NOGD (Naive Online Gradient Descent). The other two approaches utilize the model learned from feature space S1 by online gradient descent to do predictions on the recovered data. The 1Datasets can be found in http://archive.ics.uci.edu/ml/. 7 70 139 208 277 Time 0.06 0.08 0.10 0.12 0.14 Loss (a) australian 66 131 196 261 326 Time 0.4 0.6 0.8 1.0 1.2 Loss (b) credit-a 101 201 301 401 Time 1 2 3 4 Loss (c) credit-g 77 153 229 305 381 Time 0.7 0.8 0.9 1.0 Loss (d) diabetes 376 751 1126 1501 Time 0.2 0.4 0.6 0.8 1.0 1.2 Loss (e) r.EN-SP 533 1065 1597 2129 2661 Time 0.2 0.4 0.6 0.8 1.0 Loss (f) r.FR-SP 600 1199 1798 2397 Time 0.2 0.4 0.6 0.8 1.0 Loss (g) r.GR-EN 481 961 1441 1921 2401 Time 0.2 0.4 0.6 0.8 Loss (h) r.IT-FR 91 181 271 361 Time 1.0 1.5 2.0 2.5 3.0 Loss (i) RFID legend Figure 3: The trend of loss with three baseline methods and the proposed methods on synthetic data. The smaller the cumulative loss, the better. All the average cumulative loss at any time of our methods is comparable to the best of baseline methods and 8 of 9 are smaller. difference between them is that one keeps updating with the recovered data while the other does not. The one which keeps updating is called Updating Recovered Online Gradient Descent (ROGD-u) and the other which keeps fixed is called Fixed Recovered Online Gradient Descent (ROGD-f). We evaluate the empirical performances of the proposed approaches on classification and regression tasks on rounds T1 + 1, . . . , T1 + T2. To verify that our analysis is reasonable, we present the trend of average cumulative loss. Concretely, at each time t′, the loss ¯ℓt′ of every method is the average of the cumulative loss over 1, . . . , t′, namely ¯ℓt′ = (1/t′) Pt′ t=1 ℓt. We also present the classification performance over all instances on rounds T1 + 1, . . . , T1 + T2 on synthetic and Reuter data. The performances of all approaches are obtained by average results over 10 independent runs on synthetic data. Due to the large scale of Reuter data, we only conduct 3 independent runs on Reuter data and report the average results. The parameters we need to set are the number of instances in overlapping period, i.e., B, the number of instances in S1 and S2, i.e., T1 and T2 and the step size, i.e., τt where t is time. For all baseline methods and our methods, the parameters are the same. In our experiments, we set B 5 or 10 for synthetic data, 50 for Reuter data and 40 for RFID data. We set almost T1 and T2 to be half of the number of instances, and τt to be 1/(c √ t) where c is searched in the range {1, 10, 50, 100, 150}. The detailed setting of c in τt for each dataset is presented in supplementary file. 5.3 Results Here we only present part of the loss trend results, and other results are presented in the supplementary file. Figure 3 gives the trend of average cumulative loss. (a-d) are the results on synthetic data, (e-h) are the results on Reuter data, (i) is the result of the real data. The smaller the average cumulative loss, the better. From the experimental results, we have the following observations. First, all the curves with circle marks representing NOGD decrease rapidly which conforms to the fact that NOGD on rounds T1 + 1, . . . , T1 + T2 becomes better and better with more and more data coming. Besides, the curves with star marks representing ROGD-u also decline but not very apparent since on rounds 1, . . . , T1, ROGD-u already learned well and tend to converge, so updating with more recovered data could not bring too much benefits. Moreover, the curves with plus marks representing ROGD-f does not drop down but even go up instead, which is also reasonable because it is fixed and if there are some recovering errors, it will perform worse. Lastly, our methods are based on NOGD and ROGD-u, so their average cumulative losses also decrease. As can be seen from Figure 3, the average cumulative losses of our methods are comparable to the best of baseline methods on all datasets and are smaller than them on 8 datasets. And FESL-s exhibits slightly smaller average cumulative loss than FESL-c. You may notice that NOGD is always worse than ROGD-u on synthetic data and real data while on Reuter data NOGD becomes better than ROGD-u after a few rounds. This is because on synthetic data and real data, we do not have enough rounds to let all methods converge while on Reuter data, large amounts of instances ensure the convergence of every method. So when all the methods converge, we can see that NOGD is better than other baseline methods since it always receives the real instances while ROGD-u and ROGD-f receive the recovered instances which may contain recovered error. As can be seen from (e-h), in the first few rounds, our methods are comparable to ROGD-u. When NOGD is better than ROGD-u, our methods are comparable to NOGD which shows that our methods 8 Table 2: Accuracy with its variance on synthetic datasets and Reuter datasets. The larger the better. The best ones among all the methods are bold. Dataset NOGD ROGD-u ROGD-f FESL-c FESL-s australian .767±.009 .849±.009 .809±.025 .849±.009 .849±.009 credit-a .811±.006 .826±.018 .785±.051 .827±.014 .831±.009 credit-g .659±.010 .733±.006 .716±.011 .733±.006 .733±.006 diabetes .650±.002 .652±.009 .651±.006 .652±.007 .652±.009 dna .610±.013 .691±.023 .608±.064 .691±.023 .692±.021 german .684±.006 .700±.002 .700±.002 .700±.001 .703±.004 kr-vs-kp .612±.005 .621±.036 .538±.024 .626±.028 .630±.016 splice .568±.005 .612±.022 .567±.057 .612±.022 .612±.022 svmguide3 .680±.010 .779±.010 .748±.012 .779±.010 .778±.010 r.EN-FR .902±.004 .849±.003 .769±.069 .903±.003 .902±.005 r.EN-GR .867±.005 .836±.007 .802±.036 .870±.002 .870±.003 r.EN-IT .858±.014 .847±.014 .831±.018 .861±.010 .863±.013 r.EN-SP .900±.002 .848±.002 .825±.001 .901±.001 .899±.002 r.FR-EN .858±.007 .776±.009 .754±.012 .858±.007 .858±.007 r.FR-GR .869±.004 .774±.019 .753±.021 .870±.004 .868±.003 r.FR-IT .874±.005 .780±.022 .744±.040 .874±.005 .873±.005 r.FR-SP .872±.001 .778±.022 .735±.013 .872±.001 .871±.002 r.GR-EN .907±.000 .850±.007 .801±.035 .907±.001 .906±.000 r.GR-FR .898±.001 .827±.009 .802±.023 .898±.001 .898±.000 r.GR-IT .847±.011 .851±.017 .816±.006 .850±.018 .851±.017 r.GR-SP .902±.001 .845±.003 .797±.012 .902±.001 .902±.001 r.IT-EN .854±.003 .760±.006 .730±.024 .856±.002 .854±.003 r.IT-FR .863±.002 .753±.012 .730±.020 .864±.002 .862±.003 r.IT-GR .849±.004 .736±.022 .702±.012 .849±.004 .846±.004 r.IT-SP .839±.006 .753±.014 .726±.005 .839±.007 .839±.006 r.SP-EN .926±.002 .860±.005 .814±.021 .926±.002 .924±.001 r.SP-FR .876±.005 .873±.017 .833±.042 .876±.014 .878±.012 r.SP-GR .871±.013 .827±.025 .810±.026 .873±.013 .873±.013 r.SP-IT .928±.002 .861±.005 .826±.005 .928±.003 .927±.002 are comparable to the best one all the time. Moreover, FESL-s performs worse than FESL-c in the beginning while afterwards, it becomes slightly better than FESL-c. Table 2 shows the accuracy results on synthetic datasets and Reuter datasets. We can see that for synthetic datasets, FESL-s outperforms other methods on 8 datasets, FESL-c gets the best on 5 datasets and ROGD-u also gets 5. NOGD performs worst since it starts from scratch. ROGD-u is better than NOGD and ROGD-f because ROGD-u exploits the old better trained model from old feature space and keep updating with recovered instances. Our two methods are based on NOGD and ROGD-u. We can see that our methods can follow the best baseline method or even outperform it. For Reuter datasets, we can see that FESL-c outperforms other methods on 17 datasets, FESL-s gets the best on 9 datasets and NOGD gets 8 while ROGD-u gets 1. In Reuter datasets, the period on new feature space is longer than that in synthetic datasets so that NOGD can update itself to a good model. Whereas ROGD-u updates itself with recovered data, so the model will become worse when recovered error accumulates. ROGD-f does not update itself, thus it performs worst. Our two methods can take the advantage of NOGD and ROGD-f and perform better than them. 6 Conclusion In this paper, we focus on a new setting: feature evolvable streaming learning. Our key observation is that in learning with streaming data, old features could vanish and new ones could occur. To make the problem tractable, we assume there is an overlapping period that contains samples from both feature spaces. Then, we learn a mapping from new features to old features, and in this way both the new and old models can be used for prediction. In our first approach FESL-c, we ensemble two predictions by learning weights adaptively. Theoretical results show that the assistance of the old feature space can improve the performance of learning with streaming data. Furthermore, we propose FESL-s to dynamically select the best model with better performance guarantee. 9 Acknowledgement This research was supported by NSFC (61333014, 61603177), JiangsuSF (BK20160658), Huawei Fund (YBN2017030027) and Collaborative Innovation Center of Novel Software Technology and Industrialization. References [1] C. C. Aggarwal, J. Han, J. Wang, and P. S. Yu. A framework for on-demand classification of evolving data streams. IEEE Transactions on Knowledge and Data Engineering, 18:577–589, 2006. [2] C. C. Aggarwal. Data streams: An overview and scientific applications. In Scientific Data Mining and Knowledge Discovery - Principles and Foundations, pages 377–397. Springer, 2010. [3] M.-R. Amini, N. Usunier, and C. Goutte. Learning from multiple partially observed views - an application to multilingual text categorization. In Advances in Neural Information Processing Systems 22, pages 28–36, 2009. [4] A. Bifet, G. Holmes, R. Kirkby, and B. Pfahringer. MOA: Massive online analysis. Journal of Machine Learning Research, 11:1601–1604, 2010. [5] N. Cesa-Bianchi and G. Lugosi. Prediction, Learning, and Games. Cambridge University Press, 2006. [6] J. de Andrade Silva, E. R. Faria, R. C. Barros, E. R. Hruschka, A. C. P. L. F. de Carvalho, and J. Gama. Data stream clustering: A survey. ACM Computing Surveys. [7] P. M. Domingos and G. Hulten. Mining high-speed data streams. In Proceedings of the 6th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 71–80, 2000. [8] Y. Freund and R. E. Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. Journal of Computer and System Sciences, 55:119–139, 1997. [9] M. M. Gaber, A. B. Zaslavsky, and S. Krishnaswamy. Mining data streams: A review. SIGMOD Record, 34:18–26, 2005. [10] J. Gama and P. P. Rodrigues. An overview on mining data streams. In Foundations of Computational Intelligence, pages 29–45. Springer, 2009. [11] S. U. Guan and S. Li. Incremental learning with respect to new incoming input attributes. Neural Processing Letters, 14:241–260, 2001. [12] S. Hashemi, Y. Yang, Z. Mirzamomen, and M. R. Kangavari. Adapted one-versus-all decision trees for data stream classification. IEEE Transactions on Knowledge and Data Engineering, 21:624–637, 2009. [13] E. Hazan, A. Agarwal, and S. Kale. Logarithmic regret algorithms for online convex optimization. Maching Learning, 69:169–192, 2007. [14] S. Hoi, J. Wang, and P. Zhao. LIBOL: A library for online learning algorithms. Journal of Machine Learning Research, 15:495–499, 2014. [15] C. Hou and Z.-H. Zhou. One-pass learning with incremental and decremental features. ArXiv e-prints, arXiv:1605.09082, 2016. [16] B. M. Golam Kibria. Bayesian statistics and marketing. Technometrics, 49:230, 2007. [17] D. Leite, P. Costa Jr., and F. Gomide. Evolving granular classification neural networks. In Proceedings of International Joint Conference on Neural Networks 2009, pages 1736–1743, 2009. [18] S.-Y. Li, Y. Jiang, and Z.-H. Zhou. Partial multi-view clustering. In Proceedings of the 28th AAAI Conference on Artificial Intelligence, pages 1968–1974, 2014. [19] I. Muslea, S. Minton, and C. Knoblock. Active + semi-supervised learning = robust multi-view learning. In Proceedings of the 19th International Conference on Machine Learning, pages 435–442, 2002. [20] H.-L. Nguyen, Y.-K. Woon, W. K. Ng, and L. Wan. Heterogeneous ensemble for feature drifts in data streams. In Proceedings of the 16th Pacific-Asia Conference on Knowledge Discovery and Data Mining, pages 1–12, 2012. [21] H.-L. Nguyen, Y.-K. Woon, and W. K. Ng. A survey on data stream clustering and classification. Knowledge and Information Systems, 45:535–569, 2015. 10 [22] N. C. Oza. Online bagging and boosting. In Proceedings of the IEEE International Conference on Systems, Man and Cybernetics 2005, pages 2340–2345, 2005. [23] S. J. Pan and Q. Yang. A survey on transfer learning. IEEE Transactions on Knowledge and Data Engineering, 22:1345–1359, 2010. [24] R. Raina, A. Battle, H. Lee, B. Packer, and A. Ng. Self-taught learning: Transfer learning from unlabeled data. In Proceedings of the 24th International Conference on Machine Learning, pages 759–766, 2007. [25] J. Read, A. Bifet, G. Holmes, and B. Pfahringer. Streaming multi-label classification. In Proceedings of the 2nd Workshop on Applications of Pattern Analysis, pages 19–25, 2011. [26] K. Samina, K. Tehmina, and N. Shamila. A survey of feature selection and feature extraction techniques in machine learning. In Proceedings of Science and Information Conference 2014, pages 372–378, 2014. [27] T. Seidl, I. Assent, P. Kranen, R. Krieger, and J. Herrmann. Indexing density models for incremental learning and anytime classification on data streams. In Proceedings of the 12th International Conference on Extending Database Technology, pages 311–322, 2009. [28] S. Shalev-Shwartz. Online learning and online convex optimization. Foundations and Trends in Machine Learning, 4:107–194, 2012. [29] I. W. Tsang, A. Kocsor, and J. T. Kwok. Simpler core vector machines with enclosing balls. In Proceedings of the 24th International Conference on Machine Learning, pages 911–918, 2007. [30] H. Wang, W. Fan, P. S. Yu, and J. Han. Mining concept-drifting data streams using ensemble classifiers. In Proceedings of the 9th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 226–235, 2003. [31] C. Wang, L. Xie, W. Wang, T. Xue, and S. Lu. Moving tag detection via physical layer analysis for large-scale RFID systems. In Proceedings of the 35th Annual IEEE International Conference on Computer Communications, pages 1–9, 2016. [32] C. Xu, D. Tao, and C. Xu. A survey on multi-view learning. ArXiv e-prints, arXiv:1304.5634, 2013. [33] P. Zhang, J. Li, P. Wang, B. J. Gao, X. Zhu, and L. Guo. Enabling fast prediction for ensemble models on data streams. In Proceedings of the 17th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 177–185, 2011. [34] P. Zhao, S. Hoi, J. Wang, and B. Li. Online transfer learning. Artificial Intelligence, 216:76–102, 2014. [35] G. Zhou, K. Sohn, and H. Lee. Online incremental feature learning with denoising autoencoders. In Proceedings of the 15th International Conference on Artificial Intelligence and Statistics, pages 1453–1461, 2012. [36] Z.-H. Zhou. Ensemble methods: Foundations and algorithms. CRC press, 2012. [37] Z.-H. Zhou. Learnware: On the future of machine learning. Frontiers of Computer Science, 10:589–590, 2016. [38] M. Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In Proceedings of the 20th International Conference on Machine Learning, pages 928–936, 2003. 11 | 2017 | 309 |
6,796 | Online Multiclass Boosting Young Hun Jung Jack Goetz Department of Statistics University of Michigan Ann Arbor, MI 48109 {yhjung, jrgoetz, tewaria}@umich.edu Ambuj Tewari Abstract Recent work has extended the theoretical analysis of boosting algorithms to multiclass problems and to online settings. However, the multiclass extension is in the batch setting and the online extensions only consider binary classification. We fill this gap in the literature by defining, and justifying, a weak learning condition for online multiclass boosting. This condition leads to an optimal boosting algorithm that requires the minimal number of weak learners to achieve a certain accuracy. Additionally, we propose an adaptive algorithm which is near optimal and enjoys an excellent performance on real data due to its adaptive property. 1 Introduction Boosting methods are a ensemble learning methods that aggregate several (not necessarily) weak learners to build a stronger learner. When used to aggregate reasonably strong learners, boosting has been shown to produce results competitive with other state-of-the-art methods (e.g., Korytkowski et al. [1], Zhang and Wang [2]). Until recently theoretical development in this area has been focused on batch binary settings where the learner can observe the entire training set at once, and the labels are restricted to be binary (cf. Schapire and Freund [3]). In the past few years, progress has been made to extend the theory and algorithms to more general settings. Dealing with multiclass classification turned out to be more subtle than initially expected. Mukherjee and Schapire [4] unify several different proposals made earlier in the literature and provide a general framework for multiclass boosting. They state their weak learning conditions in terms of cost matrices that have to satisfy certain restrictions: for example, labeling with the ground truth should have less cost than labeling with some other labels. A weak learning condition, just like the binary condition, states that the performance of a learner, now judged using a cost matrix, should be better than a random guessing baseline. One particular condition they call the edge-over-random condition, proves to be sufficient for boostability. The edge-over-random condition will also figure prominently in this paper. They also consider a necessary and sufficient condition for boostability but it turns out to be computationally intractable to be used in practice. A recent trend in modern machine learning is to train learners in an online setting where the instances come sequentially and the learner has to make predictions instantly. Oza [5] initially proposed an online boosting algorithm that has accuracy comparable with the batch version, but it took several years to design an algorithm with theoretical justification (Chen et al. [6]). Beygelzimer et al. [7] achieved a breakthrough by proposing an optimal algorithm in online binary settings and an adaptive algorithm that works quite well in practice. These theories in online binary boosting have led to several extensions. For example, Chen et al. [8] combine one vs all method with binary boosting algorithms to tackle online multiclass problems with bandit feedback, and Hu et al. [9] build a theory of boosting in regression setting. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. In this paper, we combine the insights and techniques of Mukherjee and Schapire [4] and Beygelzimer et al. [7] to provide a framework for online multiclass boosting. The cost matrix framework from the former work is adopted to propose an online weak learning condition that defines how well a learner can perform over a random guess (Definition 1). We show this condition is naturally derived from its batch setting counterpart. From this weak learning condition, a boosting algorithm (Algorithm 1) is proposed which is theoretically optimal in that it requires the minimal number of learners and sample complexity to attain a specified level of accuracy. We also develop an adaptive algorithm (Algorithm 2) which allows learners to have variable strengths. This algorithm is theoretically less efficient than the optimal one, but the experimental results show that it is quite comparable and sometimes even better due to its adaptive property. Both algorithms not only possess theoretical proofs of mistake bounds, but also demonstrate superior performance over preexisting methods. 2 Preliminaries We first describe the basic setup for online boosting. While in the batch setting, an additional weak learner is trained at every iteration, in the online setting, the algorithm starts with a fixed count of N weak learners and a booster which manages the weak learners. There are k possible labels [k] := {1, · · · , k} and k is known to the learners. At each iteration t = 1, · · · , T, an adversary picks a labeled example (xt, yt) ∈X × [k], where X is some domain, and reveals xt to the booster. Once the booster observes the unlabeled data xt, it gathers the weak learners’ predictions and makes a final prediction. Throughout this paper, index i takes values from 1 to N; t from 1 to T; and l from 1 to k. We utilize the cost matrix framework, first proposed by Mukherjee and Schapire [4], to develop multiclass boosting algorithms. This is a key ingredient in the multiclass extension as it enables different penalization for each pair of correct label and prediction, and we further develop this framework to suit the online setting. The booster sequentially computes cost matrices {Ci t ∈ Rk×k | i = 1, · · · , N}, sends (xt, Ci t) to the ith weak learner WLi, and gets its prediction li t ∈[k]. Here the cost matrix Ci t plays a role of loss function in that WLi tries to minimize the cumulative cost P t Ci t[yt, li t]. As the booster wants each learner to predict the correct label, it wants to set the diagonal entries of Ci t to be minimal among its row. At this stage, the true label yt is not revealed yet, but the previous weak learners’ predictions can affect the computation of the cost matrix for the next learner. Given a matrix C, the (i, j)th entry will be denoted by C[i, j], and ith row vector by C[i]. Once all the learners make predictions, the booster makes the final prediction ˆyt by majority votes. The booster can either take simple majority votes or weighted ones. In fact for the adaptive algorithm, we will allow weighted votes so that the booster can assign more weights on well-performing learners. The weight for WLi at iteration t will be denoted by αi t. After observing the booster’s final decision, the adversary reveals the true label yt, and the booster suffers 0-1 loss 1(ˆyt ̸= yt). The booster also shares the true label to the weak learners so that they can train on this data point. Two main issues have to be resolved to design a good boosting algorithm. First, we need to design the booster’s strategy for producing cost matrices. Second, we need to quantify weak learner’s ability to reduce the cumulative cost PT t=1 Ci t[yt, li t]. The first issue will be resolved by introducing potential functions, which will be thoroughly discussed in Section 3.1. For the second issue, we introduce our online weak learning condition, a generalization of the weak learning assumption in Beygelzimer et al. [7], stating that for any adaptively given sequence of cost matrices, weak learners can produce predictions whose cumulative cost is less than that incurred by random guessing. The online weak learning condition will be discussed in the following section. For the analysis of the adaptive algorithm, we use empirical edges instead of the online weak learning condition. 2.1 Online weak learning condition In this section, we propose an online weak learning condition that states the weak learners are better than a random guess. We first define a baseline condition that is better than a random guess. Let ∆[k] denote a family of distributions over [k] and ul γ ∈∆[k] be a uniform distribution that puts γ more weight on the label l. For example, u1 γ = ( 1−γ k + γ, 1−γ k , · · · , 1−γ k ). For a given sequence of examples {(xt, yt) | t = 1, · · · , T}, Uγ ∈RT ×k consists of rows uyt γ . Then we restrict the booster’s 2 choice of cost matrices to Ceor 1 := {C ∈Rk×k | ∀l, r ∈[k], C[l, l] = 0, C[l, r] ≥0, and ||C[l]||1 = 1}. Note that diagonal entries are minimal among the row, and Ceor 1 also has a normalization constraint. A broader choice of cost matrices is allowed if one can assign importance weights on observations, which is possible for various learners. Even if the learner does not take the importance weight as an input, we can achieve a similar effect by sending to the learner an instance with probability that is proportional to its weight. Interested readers can refer Beygelzimer et al. [7, Lemma 1]. From now on, we will assume that our weak learners can take weight wt as an input. We are ready to present our online weak learning condition. This condition is in fact naturally derived from the batch setting counterpart that is well studied by Mukherjee and Schapire [4]. The link is thoroughly discussed in Appendix A. For the scaling issue, we assume the weights wt lie in [0, 1]. Definition 1. (Online multiclass weak learning condition) For parameters γ, δ ∈(0, 1), and S > 0, a pair of online learner and an adversary is said to satisfy online weak learning condition with parameters δ, γ, and S if for any sample length T, any adaptive sequence of labeled examples, and for any adaptively chosen series of pairs of weight and cost matrix {(wt, Ct) ∈[0, 1]×Ceor 1 | t = 1, · · · , T}, the learner can generate predictions ˆyt such that with probability at least 1 −δ, T X t=1 wtCt[yt, ˆyt] ≤C • U′ γ + S = 1 −γ k ||w||1 + S, (1) where C ∈RT ×k consists of rows of wtCt[yt] and A • B′ denotes the Frobenius inner product Tr(AB′). w = (w1, · · · , wT ) and the last equality holds due to the normalized condition on Ceor 1 . γ is called an edge, and S an excess loss. Remark. Notice that this condition is imposed on a pair of learner and adversary instead of solely on a learner. This is because no learner can satisfy this condition if the adversary draws samples in a completely adaptive manner. The probabilistic statement is necessary because many online algorithms’ predictions are not deterministic. The excess loss requirement is needed since an online learner cannot produce meaningful predictions before observing a sufficient number of examples. 3 An optimal algorithm In this section, we describe the booster’s optimal strategy for designing cost matrices. We first introduce a general theory without specifying the loss, and later investigate the asymptotic behavior of cumulative loss suffered by our algorithm under the specific 0-1 loss. We adopt the potential function framework from Mukherjee and Schapire [4] and extend it to the online setting. Potential functions help both in designing cost matrices and in proving the mistake bound of the algorithm. 3.1 A general online multiclass boost-by-majority (OnlineMBBM) algorithm We will keep track of the weighted cumulative votes of the first i weak learners for the sample xt by si t := Pi j=1 αj telj t, where αi t is the weight of WLi, li t is its prediction and ej is the jth standard basis vector. For the optimal algorithm, we assume that αi t = 1, ∀i, t. In other words, the booster makes the final decision by simple majority votes. Given a cumulative vote s ∈Rk, suppose we have a loss function Lr(s) where r denotes the correct label. We call a loss function proper, if it is a decreasing function of s[r] and an increasing function of other coordinates (we alert the reader that “proper loss” has at least one other meaning in the literature). From now on, we will assume that our loss function is proper. A good example of proper loss is multiclass 0-1 loss: Lr(s) := 1(max l̸=r s[l] ≥s[r]). (2) The purpose of the potential function φr i (s) is to estimate the booster’s loss when there remain i learners until the final decision and the current cumulative vote is s. More precisely, we want potential functions to satisfy the following conditions: φr 0(s) = Lr(s), φr i+1(s) = El∼urγφr i (s + el). (3) 3 Algorithm 1 Online Multiclass Boost-by-Majority (OnlineMBBM) 1: for t = 1, · · · , T do 2: Receive example xt 3: Set s0 t = 0 ∈Rk 4: for i = 1, · · · , N do 5: Set the normalized cost matrix Di t according to (5) and pass it to WLi 6: Get weak predictions li t = WLi(xt) and update si t = si−1 t + eli t 7: end for 8: Predict ˆyt := argmaxl sN t [l] and receive true label yt 9: for i = 1, · · · , N do 10: Set wi[t] = Pk l=1[φyt N−i(si−1 t + el) −φyt N−i(si−1 t + eyt)] 11: Pass training example with weight (xt, yt, wi[t]) to WLi 12: end for 13: end for Readers should note that φr i (s) also inherits the proper property of the loss function, which can be shown by induction. The condition (3) can be loosened by replacing both equalities by inequalities “≥”, but in practice we usually use equalities. Now we describe the booster’s strategy for designing cost matrices. After observing xt, the booster sequentially sets a cost matrix Ci t for WLi, gets the weak learner’s prediction li t and uses this in the computation of the next cost matrix Ci+1 t . Ultimately, booster wants to set Ci t[r, l] = φr N−i(si−1 t + el). (4) However, this cost matrix does not satisfy the condition of Ceor 1 , and thus should be modified in order to utilize the weak learning condition. First to make the cost for the true label equal to 0, we subtract Ci t[r, r] from every element of Ci t[r]. Since the potential function is proper, our new cost matrix still has non-negative elements after the subtraction. We then normalize the row so that each row has ℓ1 norm equal to 1. In other words, we get new normalized cost matrix Di t[r, l] = φr N−i(si−1 t + el) −φr N−i(si−1 t + er) wi[t] , (5) where wi[t] := Pk l=1 φr N−i(si−1 t +el)−φr N−i(si−1 t +er) plays the role of weight. It is still possible that a row vector Ci t[r] is a zero vector so that normalization is impossible. In this case, we just leave it as a zero vector. Our weak learning condition (1) still works with cost matrices some of whose row vectors are zeros because however the learner predicts, it incurs no cost. After defining cost matrices, the rest of the algorithm is straightforward except we have to estimate ||wi||∞to normalize the weight. This is necessary because the weak learning condition assumes the weights lying in [0, 1]. We cannot compute the exact value of ||wi||∞until the last instance is revealed, which is fine as we need this value only in proving the mistake bound. The estimate wi∗for ||wi||∞requires to specify the loss, and we postpone the technical parts to Appendix B.2. Interested readers may directly refer Lemma 10 before proceeding. Once the learners generate predictions after observing cost matrices, the final decision is made by simple majority votes. After the true label is revealed, the booster updates the weight and sends the labeled instance with weight to the weak learners. The pseudocode for the entire algorithm is depicted in Algorithm 1. The algorithm is named after Beygelzimer et al. [7, OnlineBBM], which is in fact OnlineMBBM with binary labels. We present our first main result regarding the mistake bound of general OnlineMBBM. The proof appears in Appendix B.1 where the main idea is adopted from Beygelzimer et al. [7, Lemma 3]. Theorem 2. (Cumulative loss bound for OnlineMBBM) Suppose weak learners and an adversary satisfy the online weak learning condition (1) with parameters δ, γ, and S. For any T and N satisfying δ ≪1 N , and any adaptive sequence of labeled examples generated by the adversary, the final loss suffered by OnlineMBBM satisfies the following inequality with probability 1 −Nδ: T X t=1 Lyt(sN t ) ≤φ1 N(0)T + S N X i=1 wi∗. (6) 4 Here φ1 N(0) plays a role of asymptotic error rate and the second term determines the sample complexity. We will investigate the behavior of those terms under the 0-1 loss in the following section. 3.2 Mistake bound under 0-1 loss and its optimality From now on, we will specify the loss to be multiclass 0-1 loss defined in (2), which might be the most relevant measure in multiclass problems. To present a specific mistake bound, two terms in the RHS of (6) should be bounded. This requires an approximation of potentials, which is technical and postponed to Appendix B.2. Lemma 9 and 10 provide the bounds for those terms. We also mention another bound for the weight in the remark after Lemma 10 so that one can use whichever tighter. Combining the above lemmas with Theorem 2 gives the following corollary. The additional constraint on γ comes from Lemma 10. Corollary 3. (0-1 loss bound of OnlineMBBM) Suppose weak learners and an adversary satisfy the online weak learning condition (1) with parameters δ, γ, and S, where γ < 1 2. For any T and N satisfying δ ≪ 1 N and any adaptive sequence of labeled examples generated by the adversary, OnlineMBBM can generate predictions ˆyt that satisfy the following inequality with probability 1−Nδ: T X t=1 1(yt ̸= ˆyt) ≤(k −1)e−γ2N 2 T + ˜O(k5/2√ NS). (7) Therefore in order to achieve error rate ϵ, it suffices to use N = Θ( 1 γ2 ln k ϵ ) weak learners, which gives an excess loss bound of ˜Θ( k5/2 γ S). Remark. Note that the above excess loss bound gives a sample complexity bound of ˜Θ( k5/2 ϵγ S). If we use alternative weight bound to get kNS as an upper bound for the second term in (6), we end up having ˜O(kNS). This will give an excess loss bound of ˜Θ( k γ2 S). We now provide lower bounds on the number of learners and sample complexity for arbitrary online boosting algorithms to evaluate the optimality of OnlineMBBM under 0-1 loss. In particular, we construct weak learners that satisfy the online weak learning condition (1) and have almost matching asymptotic error rate and excess loss compared to those of OnlineMBBM as in (7). Indeed we can prove that the number of learners and sample complexity of OnlineMBBM is optimal up to logarithmic factors, ignoring the influence of the number of classes k. Our bounds are possibly suboptimal up to polynomial factors in k, and the problem to fill the gap remains open. The detailed proof and a discussion of the gap can be found in Appendix B.3. Our lower bound is a multiclass version of Beygelzimer et al. [7, Theorem 3]. Theorem 4. (Lower bounds for N and T) For any γ ∈(0, 1 4), δ, ϵ ∈(0, 1), and S ≥k ln( 1 δ ) γ , there exists an adversary with a family of learners satisfying the online weak learning condition (1) with parameters δ, γ, and S, such that to achieve asymptotic error rate ϵ, an online boosting algorithm requires at least Ω( 1 k2γ2 ln 1 ϵ ) learners and a sample complexity of Ω( k ϵγ S). 4 An adaptive algorithm The online weak learning condition imposes minimal assumptions on the asymptotic accuracy of learners, and obviously it leads to a solid theory of online boosting. However, it has two main practical limitations. The first is the difficulty of estimating the edge γ. Given a learner and an adversary, it is by no means a simple task to find the maximum edge that satisfies (1). The second issue is that different learners may have different edges. Some learners may in fact be quite strong with significant edges, while others are just slightly better than a random guess. In this case, OnlineMBBM has to pick the minimum edge as it assumes common γ for all weak learners. It is obviously inefficient in that the booster underestimates the strong learners’ accuracy. Our adaptive algorithm will discard the online weak learning condition to provide a more practical method. Empirical edges γ1, · · · , γN (see Section 4.2 for the definition) are measured for the weak learners and are used to bound the number of mistakes made by the boosting algorithm. 5 4.1 Choice of loss function Adaboost, proposed by Freund et al. [10], is arguably the most popular boosting algorithm in practice. It aims to minimize the exponential loss, and has many variants which use some other surrogate loss. The main reason of using a surrogate loss is ease of optimization; while 0-1 loss is not even continuous, most surrogate losses are convex. We adopt the use of a surrogate loss for the same reason, and throughout this section will discuss our choice of surrogate loss for the adaptive algorithm. Exponential loss is a very strong candidate in that it provides a closed form for computing potential functions, which are used to design cost matrices (cf. Mukherjee and Schapire [4, Theorem 13]). One property of online setting, however, makes it unfavorable. Like OnlineMBBM, each data point will have a different weight depending on weak learners’ performance, and if the algorithm uses exponential loss, this weight will be an exponential function of difference in weighted cumulative votes. With this exponentially varying weights among samples, the algorithm might end up depending on very small portion of observed samples. This is undesirable because it is easier for the adversary to manipulate the sample sequence to perturb the learner. To overcome exponentially varying weights, Beygelzimer et al. [7] use logistic loss in their adaptive algorithm. Logistic loss is more desirable in that its derivative is bounded and thus weights will be relatively smooth. For this reason, we will also use multiclass version of logistic loss: Lr(s) =: X l̸=r log(1 + exp(s[r] −s[r])). (8) We still need to compute potential functions from logistic loss in order to calculate cost matrices. Unfortunately, Mukherjee and Schapire [4] use a unique property of exponential loss to get a closed form for potential functions, which cannot be adopted to logistic loss. However, the optimal cost matrix induced from exponential loss has a very close connection with the gradient of the loss (cf. Mukherjee and Schapire [4, Lemma 22]). From this, we will design our cost matrices as following: Ci t[r, l] := ( 1 1+exp(si−1 t [r]−si−1 t [l]) , if l ̸= r −P j̸=r 1 1+exp(si−1 t [r]−si−1 t [j]) , if l = r. (9) Readers should note that the row vector Ci t[r] is simply the gradient of Lr(si−1 t ). Also note that this matrix does not belong to Ceor 1 , but it does guarantee that the correct prediction gets the minimal cost. The choice of logistic loss over exponential loss is somewhat subjective. The undesirable property of exponential loss does not necessarily mean that we cannot build an adaptive algorithm using this loss. In fact, we can slightly modify Algorithm 2 to develop algorithms using different surrogates (exponential loss and square hinge loss). However, their theoretical bounds are inferior to the one with logistic loss. Interested readers can refer Appendix D, but it assumes understanding of Algorithm 2. 4.2 Adaboost.OLM Our work is a generalization of Adaboost.OL by Beygelzimer et al. [7], from which the name Adaboost.OLM comes with M standing for multiclass. We introduce a new concept of an expert. From N weak learners, we can produce N experts where expert i makes its prediction by weighted majority votes among the first i learners. Unlike OnlineMBBM, we allow varying weights αi t over the learners. As we are working with logistic loss, we want to minimize P t Lyt(si t) for each i, where the loss is given in (8). We want to alert the readers to note that even though the algorithm tries to minimize the cumulative surrogate loss, its performance is still evaluated by 0-1 loss. The surrogate loss only plays a role of a bridge that makes the algorithm adaptive. We do not impose the online weak learning condition on weak learners, but instead just measure the performance of WLi by γi := P t Ci t[yt,li t] P t Ci t[yt,yt]. This empirical edge will be used to bound the number of mistakes made by Adaboost.OLM. By definition of cost matrix, we can check Ci t[yt, yt] ≤Ci t[yt, l] ≤−Ci t[yt, yt], ∀l ∈[k], from which we can prove −1 ≤γi ≤1, ∀i. If the online weak learning condition is met with edge γ, then one can show that γi ≥γ with high probability when the sample size is sufficiently large. 6 Algorithm 2 Adaboost.OLM 1: Initialize: ∀i, vi 1 = 1, αi 1 = 0 2: for t = 1, · · · , T do 3: Receive example xt 4: Set s0 t = 0 ∈Rk 5: for i = 1, · · · , N do 6: Compute Ci t according to (9) and pass it to WLi 7: Set li t = WLi(xt) and si t = si−1 t + αi teli t 8: Set ˆyi t = argmaxl si t[l], the prediction of expert i 9: end for 10: Randomly draw it with P(it = i) ∝vi t 11: Predict ˆyt = ˆyit t and receive the true label yt 12: for i = 1, · · · , N do 13: Set αi t+1 = Π(αi t −ηtf i t ′(αi t)) using (10) and ηt = 2 √ 2 (k−1) √ t 14: Set wi[t] = −Ci t[yt,yt] k−1 and pass (xt, yt, wi[t]) to WLi 15: Set vi t+1 = vi t · exp(−1(yt ̸= ˆyi t)) 16: end for 17: end for Unlike the optimal algorithm, we cannot show the last expert that utilizes all the learners has the best accuracy. However, we can show at least one expert has a good predicting power. Therefore we will use classical Hedge algorithm (Littlestone and Warmuth [11] and Freund and Schapire [12]) to randomly choose an expert at each iteration with adaptive probability weight depending on each expert’s prediction history. Finally we need to address how to set the weight αi t for each weak learner. As our algorithm tries to minimize the cumulative logistic loss, we want to set αi t to minimize P t Lyt(si−1 t + αi teli t). This is again a classical topic in online learning, and we will use online gradient descent, proposed by Zinkevich [13]. By letting, f i t(α) := Lyt(si−1 t + αeli t), we need an online algorithm ensuring P t f i t(αi t) ≤minα∈F P t f i t(α) + Ri(T) where F is a feasible set to be specified later, and Ri(T) is a regret that is sublinear in T. To apply Zinkevich [13, Theorem 1], we need f i t to be convex and F to be compact. The first assumption is met by our choice of logistic loss, and for the second assumption, we will set F = [−2, 2]. There is no harm to restrict the choice of αi t by F because we can always scale the weights without affecting the result of weighted majority votes. By taking derivatives, we get f i t ′(α) = ( 1 1+exp(si−1 t [yt]−si−1 t [li t]−α) , if li t ̸= yt −P j̸=yt 1 1+exp(si−1 t [j]+α−si−1 t [yt]) , if li t = yt. (10) This provides |f i t ′(α)| ≤k −1. Now let Π(·) represent a projection onto F: Π(·) := max{−2, min{2, ·}}. By setting αi t+1 = Π(αi t −ηtf i t ′(αi t)) where ηt = 2 √ 2 (k−1) √ t, we get Ri(T) ≤4 √ 2(k −1) √ T. Readers should note that any learning rate of the form ηt = c √ t would work, but our choice is optimized to ensure the minimal regret. The pseudocode for Adaboost.OLM is presented in Algorithm 2. In fact, if we put k = 2, Adaboost.OLM has the same structure with Adaboost.OL. As in OnlineMBBM, the booster also needs to pass the weight along with labeled instance. According to (9), it can be inferred that the weight is proportional to −Ci t[yt, yt]. 4.3 Mistake bound and comparison to the optimal algorithm Now we present our second main result that provides a mistake bound of Adaboost.OLM. The main structure of the proof is adopted from Beygelzimer et al. [7, Theorem 4] but in a generalized cost matrix framework. The proof appears in Appendix C. 7 Theorem 5. (Mistake bound of Adaboost.OLM) For any T and N, with probability 1 −δ, the number of mistakes made by Adaboost.OLM satisfies the following inequality: T X t=1 1(yt ̸= ˆyt) ≤8(k −1) PN i=1 γ2 i T + ˜O( kN 2 PN i=1 γ2 i ), where ˜O notation suppresses dependence on log 1 δ . Remark. Note that this theorem naturally implies Beygelzimer et al. [7, Theorem 4]. The difference in coefficients is due to different scaling of γi. In fact, their γi ranges from [−1 2, 1 2]. Now that we have established a mistake bound, it is worthwhile to compare the bound with the optimal boosting algorithm. Suppose the weak learners satisfy the weak learning condition (1) with edge γ. For simplicity, we will ignore the excess loss S. As we have γi = P t Ci t[yt,li t] P t Ci t[yt,yt] ≥γ with high probability, the mistake bound becomes 8(k−1) γ2N T + ˜O( kN γ2 ). In order to achieve error rate ϵ, Adaboost.OLM requires N ≥8(k−1) ϵγ2 learners and T = ˜Ω( k2 ϵ2γ4 ) sample size. Note that OnlineMBBM requires N = Ω( 1 γ2 ln k ϵ ) and T = min{˜Ω( k5/2 ϵγ ), ˜Ω( k ϵγ2 )}. Adaboost.OLM is obviously suboptimal, but due to its adaptive feature, its performance on real data is quite comparable to that by OnlineMBBM. 5 Experiments We compare the new algorithms to existing ones for online boosting on several UCI data sets, each with k classes1. Table 1 contains some highlights, with additional results and experimental details in the Appendix E. Here we show both the average accuracy on the final 20% of each data set, as well as the average run time for each algorithm. Best decision tree gives the performance of the best of 100 online decision trees fit using the VFDT algorithm in Domingos and Hulten [14], which were used as the weak learners in all other algorithms, and Online Boosting is an algorithm taken from Oza [5]. Both provide a baseline for comparison with the new Adaboost.OLM and OnlineMBBM algorithms. Best MBBM takes the best result from running the OnlineMBBM with five different values of the edge parameter γ. Despite being theoretically weaker, Adaboost.OLM often demonstrates similar accuracy and sometimes outperforms Best MBBM, which exemplifies the power of adaptivity in practice. This power comes from the ability to use diverse learners efficiently, instead of being limited by the strength of the weakest learner. OnlineMBBM suffers from high computational cost, as well as the difficulty of choosing the correct value of γ, which in general is unknown, but when the correct value of γ is used it peforms very well. Finally in all cases Adaboost.OLM and OnlineMBBM algorithms outperform both the best tree and the preexisting Online Boosting algorithm, while also enjoying theoretical accuracy bounds. Table 1: Comparison of algorithm accuracy on final 20% of data set and run time in seconds. Best accuracy on a data set reported in bold. Data sets k Best decision tree Online Boosting Adaboost.OLM Best MBBM Balance 3 0.768 8 0.772 19 0.754 20 0.821 42 Mice 8 0.608 105 0.399 263 0.561 416 0.695 2173 Cars 4 0.924 39 0.914 27 0.930 59 0.914 56 Mushroom 2 0.999 241 1.000 169 1.000 355 1.000 325 Nursery 4 0.953 526 0.941 302 0.966 735 0.969 1510 ISOLET 26 0.515 470 0.149 1497 0.521 2422 0.635 64707 Movement 5 0.915 1960 0.870 3437 0.962 5072 0.988 18676 1Codes are available at https://github.com/yhjung88/OnlineBoostingWithVFDT 8 Acknowledgments We acknowledge the support of NSF under grants CAREER IIS-1452099 and CIF-1422157. References [1] Marcin Korytkowski, Leszek Rutkowski, and Rafał Scherer. Fast image classification by boosting fuzzy classifiers. Information Sciences, 327:175–182, 2016. [2] Xiao-Lei Zhang and DeLiang Wang. Boosted deep neural networks and multi-resolution cochleagram features for voice activity detection. In INTERSPEECH, pages 1534–1538, 2014. [3] Robert E Schapire and Yoav Freund. Boosting: Foundations and algorithms. MIT press, 2012. [4] Indraneel Mukherjee and Robert E Schapire. A theory of multiclass boosting. Journal of Machine Learning Research, 14(Feb):437–497, 2013. [5] Nikunj C Oza. Online bagging and boosting. In 2005 IEEE international conference on systems, man and cybernetics, volume 3, pages 2340–2345. IEEE, 2005. [6] Shang-Tse Chen, Hsuan-Tien Lin, and Chi-Jen Lu. An online boosting algorithm with theoretical justifications. ICML, 2012. [7] Alina Beygelzimer, Satyen Kale, and Haipeng Luo. Optimal and adaptive algorithms for online boosting. ICML, 2015. [8] Shang-Tse Chen, Hsuan-Tien Lin, and Chi-Jen Lu. Boosting with online binary learners for the multiclass bandit problem. In Proceedings of The 31st ICML, pages 342–350, 2014. [9] Hanzhang Hu, Wen Sun, Arun Venkatraman, Martial Hebert, and Andrew Bagnell. Gradient boosting on stochastic data streams. In Artificial Intelligence and Statistics, pages 595–603, 2017. [10] Yoav Freund, Robert Schapire, and N Abe. A short introduction to boosting. Journal-Japanese Society For Artificial Intelligence, 14(771-780):1612, 1999. [11] Nick Littlestone and Manfred K Warmuth. The weighted majority algorithm. In Foundations of Computer Science, 1989., 30th Annual Symposium on, pages 256–261. IEEE, 1989. [12] Yoav Freund and Robert E Schapire. A desicion-theoretic generalization of on-line learning and an application to boosting. In European conference on computational learning theory, pages 23–37. Springer, 1995. [13] Martin Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In Proceedings of 20th ICML, 2003. [14] Pedro Domingos and Geoff Hulten. Mining high-speed data streams. In Proceedings of the sixth ACM SIGKDD international conference on Knowledge discovery and data mining, pages 71–80. ACM, 2000. [15] Amit Daniely, Sivan Sabato, Shai Ben-David, and Shai Shalev-Shwartz. Multiclass learnability and the erm principle. In COLT, pages 207–232, 2011. [16] Nick Littlestone. Learning quickly when irrelevant attributes abound: A new linear-threshold algorithm. Machine learning, 2(4):285–318, 1988. [17] Volodimir G Vovk. Aggregating strategies. In Proc. Third Workshop on Computational Learning Theory, pages 371–383. Morgan Kaufmann, 1990. [18] Nicolo Cesa-Bianchi and Gábor Lugosi. Prediction, learning, and games. Cambridge university press, 2006. [19] Elad Hazan et al. Introduction to online convex optimization. Foundations and Trends R⃝in Optimization, 2(3-4):157–325, 2016. [20] Robert E Schapire. Drifting games. Machine Learning, 43(3):265–291, 2001. [21] Eric V Slud. Distribution inequalities for the binomial law. The Annals of Probability, pages 404–412, 1977. [22] C.L. Blake and C.J. Merz. UCI machine learning repository, 1998. URL http://archive.ics.uci. edu/ml. 9 [23] Cios KJ Higuera C, Gardiner KJ. Self-organizing feature maps identify proteins critical to learning in a mouse model of down syndrome. PLoS ONE, 2015. [24] Wallace Ugulino, Débora Cardador, Katia Vega, Eduardo Velloso, Ruy Milidiú, and Hugo Fuks. Wearable computing: Accelerometers’ data classification of body postures and movements. In Advances in Artificial Intelligence-SBIA 2012, pages 52–61. Springer, 2012. 10 | 2017 | 31 |
6,797 | Safe Model-based Reinforcement Learning with Stability Guarantees Felix Berkenkamp Department of Computer Science ETH Zurich befelix@inf.ethz.ch Matteo Turchetta Department of Computer Science, ETH Zurich matteotu@inf.ethz.ch Angela P. Schoellig Institute for Aerospace Studies University of Toronto schoellig@utias.utoronto.ca Andreas Krause Department of Computer Science ETH Zurich krausea@ethz.ch Abstract Reinforcement learning is a powerful paradigm for learning optimal policies from experimental data. However, to find optimal policies, most reinforcement learning algorithms explore all possible actions, which may be harmful for real-world systems. As a consequence, learning algorithms are rarely applied on safety-critical systems in the real world. In this paper, we present a learning algorithm that explicitly considers safety, defined in terms of stability guarantees. Specifically, we extend control-theoretic results on Lyapunov stability verification and show how to use statistical models of the dynamics to obtain high-performance control policies with provable stability certificates. Moreover, under additional regularity assumptions in terms of a Gaussian process prior, we prove that one can effectively and safely collect data in order to learn about the dynamics and thus both improve control performance and expand the safe region of the state space. In our experiments, we show how the resulting algorithm can safely optimize a neural network policy on a simulated inverted pendulum, without the pendulum ever falling down. 1 Introduction While reinforcement learning (RL, [1]) algorithms have achieved impressive results in games, for example on the Atari platform [2], they are rarely applied to real-world physical systems (e.g., robots) outside of academia. The main reason is that RL algorithms provide optimal policies only in the long-term, so that intermediate policies may be unsafe, break the system, or harm their environment. This is especially true in safety-critical systems that can affect human lives. Despite this, safety in RL has remained largely an open problem [3]. Consider, for example, a self-driving car. While it is desirable for the algorithm that drives the car to improve over time (e.g., by adapting to driver preferences and changing environments), any policy applied to the system has to guarantee safe driving. Thus, it is not possible to learn about the system through random exploratory actions, which almost certainly lead to a crash. In order to avoid this problem, the learning algorithm needs to consider its ability to safely recover from exploratory actions. In particular, we want the car to be able to recover to a safe state, for example, driving at a reasonable speed in the middle of the lane. This ability to recover is known as asymptotic stability in control theory [4]. Specifically, we care about the region of attraction of the closed-loop system under a policy. This is a subset of the state space that is forward invariant so that any state trajectory that starts within this set stays within it for all times and converges to a goal state eventually. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. In this paper, we present a RL algorithm for continuous state-action spaces that provides these kind of high-probability safety guarantees for policies. In particular, we show how, starting from an initial, safe policy we can expand our estimate of the region of attraction by collecting data inside the safe region and adapt the policy to both increase the region of attraction and improve control performance. Related work Safety is an active research topic in RL and different definitions of safety exist [5, 6]. Discrete Markov decision processes (MDPs) are one class of tractable models that have been analyzed. In risk-sensitive RL, one specifies risk-aversion in the reward [7]. For example, [8] define risk as the probability of driving the agent to a set of known, undesirable states. Similarly, robust MDPs maximize rewards when transition probabilities are uncertain [9, 10]. Both [11] and [12] introduce algorithms to safely explore MDPs so that the agent never gets stuck without safe actions. All these methods require an accurate probabilistic model of the system. In continuous state-action spaces, model-free policy search algorithms have been successful. These update policies without a system model by repeatedly executing the same task [13]. In this setting, [14] introduces safety guarantees in terms of constraint satisfaction that hold in expectation. High-probability worst-case safety guarantees are available for methods based on Bayesian optimization [15] together with Gaussian process models (GP, [16]) of the cost function. The algorithms in [17] and [18] provide high-probability safety guarantees for any parameter that is evaluated on the real system. These methods are used in [19] to safely optimize a parametric control policy on a quadrotor. However, resulting policies are task-specific and require the system to be reset. In the model-based RL setting, research has focused on safety in terms of state constraints. In [20, 21], a priori known, safe global backup policies are used, while [22] learns to switch between several safe policies. However, it is not clear how one may find these policies in the first place. Other approaches use model predictive control with constraints, a model-based technique where the control actions are optimized online. For example, [23] models uncertain environmental constraints, while [24] uses approximate uncertainty propagation of GP dynamics along trajectories. In this setting, robust feasability and constraint satisfaction can be guaranteed for a learned model with bounded errors using robust model predictive control [25]. The method in [26] uses reachability analysis to construct safe regions in the state space. The theoretical guarantees depend on the solution to a partial differential equation, which is approximated. Theoretical guarantees for the stability exist for the more tractable stability analysis and verification under a fixed control policy. In control, stability of a known system can be verified using a Lyapunov function [27]. A similar approach is used by [28] for deterministic, but unknown dynamics that are modeled as a GP, which allows for provably safe learning of regions of attraction for fixed policies. Similar results are shown in [29] for stochastic systems that are modeled as a GP. They use Bayesian quadrature to compute provably accurate estimates of the region of attraction. These approaches do not update the policy. Our contributions We introduce a novel algorithm that can safely optimize policies in continuous state-action spaces while providing high-probability safety guarantees in terms of stability. Moreover, we show that it is possible to exploit the regularity properties of the system in order to safely learn about the dynamics and thus improve the policy and increase the estimated safe region of attraction without ever leaving it. Specifically, starting from a policy that is known to stabilize the system locally, we gather data at informative, safe points and improve the policy safely based on the improved model of the system and prove that any exploration algorithm that gathers data at these points reaches a natural notion of full exploration. We show how the theoretical results transfer to a practical algorithm with safety guarantees and apply it to a simulated inverted pendulum stabilization task. 2 Background and Assumptions We consider a deterministic, discrete-time dynamic system xt+1 = f(xt, ut) = h(xt, ut) + g(xt, ut), (1) with states x ∈X ⊂Rq and control actions u ∈U ⊂Rp and a discrete time index t ∈N. The true dynamics f : X × U →X consist of two parts: h(xt, ut) is a known, prior model that can be obtained from first principles, while g(xt, ut) represents a priori unknown model errors. While the model errors are unknown, we can obtain noisy measurements of f(x, u) by driving the system to the state x and taking action u. We want this system to behave in a certain way, e.g., the car driving 2 on the road. To this end, we need to specify a control policy π: X →U that, given the current state, determines the appropriate control action that drives the system to some goal state, which we set as the origin without loss of generality [4]. We encode the performance requirements of how to drive the system to the origin through a positive cost r(x, u) that is associated with states and actions and has r(0, 0) = 0. The policy aims to minimize the cumulative, discounted costs for each starting state. The goal is to safely learn about the dynamics from measurements and adapt the policy for performance, without encountering system failures. Specifically, we define the safety constraint on the state divergence that occurs when leaving the region of attraction. This means that adapting the policy is not allowed to decrease the region of attraction and exploratory actions to learn about the dynamics f(·) are not allowed to drive the system outside the region of attraction. The region of attraction is not known a priori, but is implicitly defined through the system dynamics and the choice of policy. Thus, the policy not only defines performance as in typical RL, but also determines safety and where we can obtain measurements. Model assumptions In general, this kind of safe learning is impossible without further assumptions. For example, in a discontinuous system even a slight change in the control policy can lead to drastically different behavior. Moreover, to expand the safe set we need to generalize learned knowledge about the dynamics to (potentially unsafe) states that we have not visited. To this end, we restrict ourselves to the general and practically relevant class of models that are Lipschitz continuous. This is a typical assumption in the control community [4]. Additionally, to ensure that the closed-loop system remains Lipschitz continuous when the control policy is applied, we restrict policies to the rich class of Lπ-Lipschitz continuous functions ΠL, which also contains certain types of neural networks [30]. Assumption 1 (continuity). The dynamics h(·) and g(·) in (1) are Lh- and Lg Lipschitz continuous with respect to the 1-norm. The considered control policies π lie in a set ΠL of functions that are Lπ-Lipschitz continuous with respect to the 1-norm. To enable safe learning, we require a reliable statistical model. While we commit to GPs for the exploration analysis, for safety any suitable, well-calibrated model is applicable. Assumption 2 (well-calibrated model). Let µn(·) and Σn(·) denote the posterior mean and covariance matrix functions of the statistical model of the dynamics (1) conditioned on n noisy measurements. With σn(·) = trace(Σ1/2 n (·)), there exists a βn > 0 such that with probability at least (1 −δ) it holds for all n ≥0, x ∈X, and u ∈U that ∥f(x, u) −µn(x, u)∥1 ≤βnσn(x, u). This assumption ensures that we can build confidence intervals on the dynamics that, when scaled by an appropriate constant βn, cover the true function with high probability. We introduce a specific statistical model that fulfills both assumptions under certain regularity assumptions in Sec. 3. Lyapunov function To satisfy the specified safety constraints for safe learning, we require a tool to determine whether individual states and actions are safe. In control theory, this safety is defined through the region of attraction, which can be computed for a fixed policy using Lyapunov functions [4]. Lyapunov functions are continuously differentiable functions v: X →R≥0 with v(0) = 0 and v(x) > 0 for all x ∈X \ {0}. The key idea behind using Lyapunov functions to show stability of the system (1) is similar to that of gradient descent on strictly quasiconvex functions: if one can show that, given a policy π, applying the dynamics f on the state maps it to strictly smaller values on the Lyapunov function (‘going downhill’), then the state eventually converges to the equilibrium point at the origin (minimum). In particular, the assumptions in Theorem 1 below imply that v is strictly quasiconvex within the region of attraction if the dynamics are Lipschitz continuous. As a result, the one step decrease property for all states within a level set guarantees eventual convergence to the origin. Theorem 1 ([4]). Let v be a Lyapunov function, f Lipschitz continuous dynamics, and π a policy. If v(f(x, π(x))) < v(x) for all x within the level set V(c) = {x ∈X \ {0} | v(x) ≤c}, c > 0, then V(c) is a region of attraction, so that x0 ∈V(c) implies xt ∈V(c) for all t > 0 and limt→∞xt = 0. It is convenient to characterize the region of attraction through a level set of the Lyapunov function, since it replaces the challenging test for convergence with a one-step decrease condition on the Lyapunov function. For the theoretical analysis in this paper, we assume that a Lyapunov function is given to determine the region of attraction. For ease of notation, we also assume ∂v(x)/∂x ̸= 0 for all x ∈X \ 0, which ensures that level sets V(c) are connected if c > 0. Since Lyapunov functions are continuously differentiable, they are Lv-Lipschitz continuous over the compact set X. 3 In general, it is not easy to find suitable Lyapunov functions. However, for physical models, like the prior model h in (1), the energy of the system (e.g., kinetic and potential for mechanical systems) is a good candidate Lyapunov function. Moreover, it has recently been shown that it is possible to compute suitable Lyapunov functions [31, 32]. In our experiments, we exploit the fact that value functions in RL are Lyapunov functions if the costs are strictly positive away from the origin. This follows directly from the definition of the value function, where v(x) = r(x, π(x))+v(f(x, π(x)) ≤v(f(x, π(x))). Thus, we can obtain Lyapunov candidates as a by-product of approximate dynamic programming. Initial safe policy Lastly, we need to ensure that there exists a safe starting point for the learning process. Thus, we assume that we have an initial policy π0 that renders the origin of the system in (1) asymptotically stable within some small set of states Sx 0 . For example, this policy may be designed using the prior model h in (1), since most models are locally accurate but deteriorate in quality as state magnitude increases. This policy is explicitly not safe to use throughout the state space X \ Sx 0 . 3 Theory In this section, we use these assumptions for safe reinforcement learning. We start by computing the region of attraction for a fixed policy under the statistical model. Next, we optimize the policy in order to expand the region of attraction. Lastly, we show that it is possible to safely learn about the dynamics and, under additional assumptions about the model and the system’s reachability properties, that this approach expands the estimated region of attraction safely. We consider an idealized algorithm that is amenable to analysis, which we convert to a practical variant in Sec. 4. See Fig. 1 for an illustrative run of the algorithm and examples of the sets defined below. Region of attraction We start by computing the region of attraction for a fixed policy. This is an extension of the method in [28] to discrete-time systems. We want to use the Lyapunov decrease condition in Theorem 1 to guarantee safety for the statistical model of the dynamics. However, the posterior uncertainty in the statistical model of the dynamics means that one step predictions about v(f(·)) are uncertain too. We account for this by constructing high-probability confidence intervals on v(f(x, u)): Qn(x, u) := [v(µn−1(x, u)) ± Lvβnσn−1(x, u)]. From Assumption 2 together with the Lipschitz property of v, we know that v(f(x, u)) is contained in Qn(x, u) with probability at least (1−δ). For our exploration analysis, we need to ensure that safe state-actions cannot become unsafe; that is, an initial set of safe set S0 remains safe (defined later). To this end, we intersect the confidence intervals: Cn(x, u) := Cn−1 ∩Qn(x, u), where the set C is initialized to C0(x, u) = (−∞, v(x) −L∆vτ) when (x, u) ∈S0 and C0(x, u) = R otherwise. Note that v(f(x, u)) is contained in Cn(x, u) with the same (1 −δ) probability as in Assumption 2. The upper and lower bounds on v(f(·)) are defined as un(x, u) := max Cn(x, u) and ln(x, u) := min Cn(x, u). Given these high-probability confidence intervals, the system is stable according to Theorem 1 if v(f(x, u)) ≤un(x) < v(x) for all x ∈V(c). However, it is intractable to verify this condition directly on the continuous domain without additional, restrictive assumptions about the model. Instead, we consider a discretization of the state space Xτ ⊂X into cells, so that ∥x −[x]τ∥1 ≤τ holds for all x ∈X. Here, [x]τ denotes the point in Xτ with the smallest l1 distance to x. Given this discretization, we bound the decrease variation on the Lyapunov function for states in Xτ and use the Lipschitz continuity to generalize to the continuous state space X. Theorem 2. Under Assumptions 1 and 2 with L∆v := LvLf(Lπ + 1) + Lv, let Xτ be a discretization of X such that ∥x −[x]τ∥1 ≤τ for all x ∈X. If, for all x ∈V(c) ∩Xτ with c > 0, u = π(x), and for some n ≥0 it holds that un(x, u) < v(x) −L∆vτ, then v(f(x, π(x))) < v(x) holds for all x ∈V(c) with probability at least (1 −δ) and V(c) is a region of attraction for (1) under policy π. The proof is given in Appendix A.1. Theorem 2 states that, given confidence intervals on the statistical model of the dynamics, it is sufficient to check the stricter decrease condition in Theorem 2 on the discretized domain Xτ to guarantee the requirements for the region of attraction in the continuous domain in Theorem 1. The bound in Theorem 2 becomes tight as the discretization constant τ and |v(f(·)) −un(·)| go to zero. Thus, the discretization constant trades off computation costs for accuracy, while un approaches v(f(·)) as we obtain more measurement data and the posterior model uncertainty about the dynamics, √βnσn decreases. The confidence intervals on v(f(x, π(x)) −v(x) and the corresponding estimated region of attraction (red line) can be seen in the bottom half of Fig. 1. Policy optimization So far, we have focused on estimating the region of attraction for a fixed policy. Safety is a property of states under a fixed policy. This means that the policy directly determines 4 action u policy π0 state x v(x) l0 u0 (a) Initial safe set (in red). π15 state x V(c15) (b) Exploration: 15 data points. π30 S30 D30 σ(x,u) state x ∆v(x,π(x)) −L∆vτ (c) Final policy after 30 evaluations. Figure 1: Example application of Algorithm 1. Due to input constraints, the system becomes unstable for large states. We start from an initial, local policy π0 that has a small, safe region of attraction (red lines) in Fig. 1(a). The algorithm selects safe, informative state-action pairs within Sn (top, white shaded), which can be evaluated without leaving the region of attraction V(cn) (red lines) of the current policy πn. As we gather more data (blue crosses), the uncertainty in the model decreases (top, background) and we use (3) to update the policy so that it lies within Dn (top, red shaded) and fulfills the Lyapunov decrease condition. The algorithm converges to the largest safe set in Fig. 1(c). It improves the policy without evaluating unsafe state-action pairs and thereby without system failure. which states are safe. Specifically, to form a region of attraction all states in the discretizaton Xτ within a level set of the Lyapunov function need to fulfill the decrease condition in Theorem 2 that depends on the policy choice. The set of all state-action pairs that fulfill this decrease condition is given by Dn = (x, u) ∈Xτ × U | un(x, u) −v(x) < −L∆vτ , (2) see Fig. 1(c) (top, red shaded). In order to estimate the region of attraction based on this set, we need to commit to a policy. Specifically, we want to pick the policy that leads to the largest possible region of attraction according to Theorem 2. This requires that for each discrete state in Xτ the corresponding state-action pair under the policy must be in the set Dn. Thus, we optimize the policy according to πn, cn = argmax π∈ΠL,c∈R>0 c, such that for all x ∈V(c) ∩Xτ : (x, π(x)) ∈Dn. (3) The region of attraction that corresponds to the optimized policy πn according to (3) is given by V(cn), see Fig. 1(b). It is the largest level set of the Lyapunov function for which all state-action pairs (x, πn(x)) that correspond to discrete states within V(cn) ∩Xτ are contained in Dn. This means that these state-action pairs fulfill the requirements of Theorem 2 and V(cn) is a region of attraction of the true system under policy πn. The following theorem is thus a direct consequence of Theorem 2 and (3). Theorem 3. Let Rπn be the true region of attraction of (1) under the policy πn. For any δ ∈(0, 1), we have with probability at least (1 −δ) that V(cn) ⊆Rπn for all n > 0. Thus, when we optimize the policy subject to the constraint in (3) the estimated region of attraction is always an inner approximation of the true region of attraction. However, solving the optimization problem in (3) is intractable in general. We approximate the policy update step in Sec. 4. Collecting measurements Given these stability guarantees, it is natural to ask how one might obtain data points in order to improve the model of g(·) and thus efficiently increase the region of attraction. This question is difficult to answer in general, since it depends on the property of the statistical model. In particular, for general statistical models it is often not clear whether the confidence intervals contract sufficiently quickly. In the following, we make additional assumptions about the model and reachability within V(cn) in order to provide exploration guarantees. These assumptions allow us to highlight fundamental requirements for safe data acquisition and that safe exploration is possible. 5 We assume that the unknown model errors g(·) have bounded norm in a reproducing kernel Hilbert space (RKHS, [33]) corresponding to a differentiable kernel k, ∥g(·)∥k ≤Bg. These are a class of well-behaved functions of the form g(z) = P∞ i=0 αik(zi, z) defined through representer points zi and weights αi that decay sufficiently fast with i. This assumption ensures that g satisfies the Lipschitz property in Assumption 1, see [28]. Moreover, with βn = Bg + 4σ p γn + 1 + ln(1/δ) we can use GP models for the dynamics that fulfill Assumption 2 if the state if fully observable and the measurement noise is σ-sub-Gaussian (e.g., bounded in [−σ, σ]), see [34]. Here γn is the information capacity. It corresponds to the amount of mutual information that can be obtained about g from nq measurements, a measure of the size of the function class encoded by the model. The information capacity has a sublinear dependence on n for common kernels and upper bounds can be computed efficiently [35]. More details about this model are given in Appendix A.2. In order to quantify the exploration properties of our algorithm, we consider a discrete action space Uτ ⊂U. We define exploration as the number of state-action pairs in Xτ × Uτ that we can safely learn about without leaving the true region of attraction. Note that despite this discretization, the policy takes values on the continuous domain. Moreover, instead of using the confidence intervals directly as in (3), we consider an algorithm that uses the Lipschitz constants to slowly expand the safe set. We use this in our analysis to quantify the ability to generalize beyond the current safe set. In practice, nearby states are sufficiently correlated under the model to enable generalization using (2). Suppose we are given a set S0 of state-action pairs about which we can learn safely. Specifically, this means that we have a policy such that, for any state-action pair (x, u) in S0, if we apply action u in state x and then apply actions according to the policy, the state converges to the origin. Such a set can be constructed using the initial policy π0 from Sec. 2 as S0 = {(x, π0(x)) | x ∈Sx 0 }. Starting from this set, we want to update the policy to expand the region of attraction according to Theorem 2. To this end, we use the confidence intervals on v(f(·)) for states inside S0 to determine state-action pairs that fulfill the decrease condition. We thus redefine Dn for the exploration analysis to Dn = [ (x,u)∈Sn−1 z′ ∈Xτ × Uτ | un(x, u) −v(x) + L∆v∥z′ −(x, u)∥1 < −L∆vτ . (4) This formulation is equivalent to (2), except that it uses the Lipschitz constant to generalize safety. Given Dn, we can again find a region of attraction V(cn) by committing to a policy according to (3). In order to expand this region of attraction effectively we need to decrease the posterior model uncertainty about the dynamics of the GP by collecting measurements. However, to ensure safety as outlined in Sec. 2, we are not only restricted to states within V(cn), but also need to ensure that the state after taking an action is safe; that is, the dynamics map the state back into the region of attraction V(cn). We again use the Lipschitz constant in order to determine this set, Sn = [ z∈Sn−1 z′ ∈V(cn) ∩Xτ × Uτ | un(z) + LvLf∥z −z′∥1 ≤cn}. (5) The set Sn contains state-action pairs that we can safely evaluate under the current policy πn without leaving the region of attraction, see Fig. 1 (top, white shaded). What remains is to define a strategy for collecting data points within Sn to effectively decrease model uncertainty. We specifically focus on the high-level requirements for any exploration scheme without committing to a specific method. In practice, any (model-based) exploration strategy that aims to decrease model uncertainty by driving the system to specific states may be used. Safety can be ensured by picking actions according to πn whenever the exploration strategy reaches the boundary of the safe region V(cn); that is, when un(x, u) > cn. This way, we can use πn as a backup policy for exploration. The high-level goal of the exploration strategy is to shrink the confidence intervals at state-action pairs Sn in order to expand the safe region. Specifically, the exploration strategy should aim to visit state-action pairs in Sn at which we are the most uncertain about the dynamics; that is, where the confidence interval is the largest: (xn, un) = argmax (x,u)∈Sn un(x, u) −ln(x, u). (6) As we keep collecting data points according to (6), we decrease the uncertainty about the dynamics for different actions throughout the region of attraction and adapt the policy, until eventually we 6 Algorithm 1 SAFELYAPUNOVLEARNING 1: Input: Initial safe policy π0, dynamics model GP(µ(z), k(z, z′)) 2: for all n = 1, . . . do 3: Compute policy πn via SGD on (7) 4: cn = argmaxc c, such that ∀x ∈V(cn) ∩Xτ : un(x, πn(x)) −v(x) < −L∆vτ 5: Sn = {(x, u) ∈V(cn) × Uτ | un(x, u) ≤cn} 6: Select (xn, un) within Sn using (6) and drive system there with backup policy πn 7: Update GP with measurements f(xn, un) + ϵn have gathered enough information in order to expand it. While (6) implicitly assumes that any state within V(cn) can be reached by the exploration policy, it achieves the high-level goal of any exploration algorithm that aims to reduce model uncertainty. In practice, any safe exploration scheme is limited by unreachable parts of the state space. We compare the active learning scheme in (6) to an oracle baseline that starts from the same initial safe set S0 and knows v(f(x, u)) up to ϵ accuracy within the safe set. The oracle also uses knowledge about the Lipschitz constants and the optimal policy in ΠL at each iteration. We denote the set that this baseline manages to determine as safe with Rϵ(S0) and provide a detailed definition in Appendix A.3. Theorem 4. Assume σ-sub-Gaussian measurement noise and that the model error g(·) in (1) has RKHS norm smaller than Bg. Under the assumptions of Theorem 2, with βn = Bg + 4σ p γn + 1 + ln(1/δ), and with measurements collected according to (6), let n∗be the smallest positive integer so that n∗ β2 n∗γn∗≥Cq(|R(S0)|+1) L2vϵ2 where C = 8/ log(1 + σ−2). Let Rπ be the true region of attraction of (1) under a policy π. For any ϵ > 0, and δ ∈(0, 1), the following holds jointly with probability at least (1 −δ) for all n > 0: (i) V(cn) ⊆Rπn (ii) f(x, u) ∈Rπn ∀(x, u) ∈Sn. (iii) Rϵ(S0) ⊆Sn ⊆R0(S0). Theorem 4 states that, when selecting data points according to (6), the estimated region of attraction V(cn) is (i) contained in the true region of attraction under the current policy and (ii) selected data points do not cause the system to leave the region of attraction. This means that any exploration method that considers the safety constraint (5) is able to safely learn about the system without leaving the region of attraction. The last part of Theorem 4, (iii), states that after a finite number of data points n∗we achieve at least the exploration performance of the oracle baseline, while we do not classify unsafe state-action pairs as safe. This means that the algorithm explores the largest region of attraction possible for a given Lyapunov function with residual uncertaint about v(f(·)) smaller than ϵ. Details of the comparison baseline are given in the appendix. In practice, this means that any exploration method that manages to reduce the maximal uncertainty about the dynamics within Sn is able to expand the region of attraction. An example run of repeatedly evaluating (6) for a one-dimensional state-space is shown in Fig. 1. It can be seen that, by only selecting data points within the current estimate of the region of attraction, the algorithm can efficiently optimize the policy and expand the safe region over time. 4 Practical Implementation and Experiments In the previous section, we have given strong theoretical results on safety and exploration for an idealized algorithm that can solve (3). In this section, we provide a practical variant of the theoretical algorithm in the previous section. In particular, while we retain safety guarantees, we sacrifice exploration guarantees to obtain a more practical algorithm. This is summarized in Algorithm 1. The policy optimization problem in (3) is intractable to solve and only considers safety, rather than a performance metric. We propose to use an approximate policy update that that maximizes approximate performance while providing stability guarantees. It proceeds by optimizing the policy first and then computes the region of attraction V(cn) for the new, fixed policy. This does not impact safety, since data is still only collected inside the region of attraction. Moreover, should the optimization fail and the region of attraction decrease, one can always revert to the previous policy, which is guaranteed to be safe. 7 −1.0 −0.5 0.0 0.5 1.0 angle [rad] −5 0 5 angular velocity [rad/s] unsafe region V(c0) V(c50) (a) Estimated safe set. 0.0 0.5 1.0 1.5 time [s] 0.00 0.05 0.10 0.15 0.20 0.25 0.30 angle [rad] π0 π50 safely optimized policy initial policy (b) State trajectory (lower is better). Figure 2: Optimization results for an inverted pendulum. Fig. 2(a) shows the initial safe set (yellow) under the policy π0, while the green region represents the estimated region of attraction under the optimized neural network policy. It is contained within the true region of attraction (white). Fig. 2(b) shows the improved performance of the safely learned policy over the policy for the prior model. In our experiments, we use approximate dynamic programming [36] to capture the performance of the policy. Given a policy πθ with parameters θ, we compute an estimate of the cost-to-go Jπθ(·) for the mean dynamics µn based on the cost r(x, u) ≥0. At each state, Jπθ(x) is the sum of γ-discounted rewards encountered when following the policy πθ. The goal is to adapt the parameters of the policy for minimum cost as measured by Jπθ, while ensuring that the safety constraint on the worst-case decrease on the Lyapunov function in Theorem 2 is not violated. A Lagrangian formulation to this constrained optimization problem is πn = argmin πθ∈ΠL Z x∈X r(x, πθ(x))+γJπθ(µn−1(x, πθ(x))+λ un(x, πθ(x))−v(x)+L∆vτ , (7) where the first term measures long-term cost to go and λ ≥0 is a Lagrange multiplier for the safety constraint from Theorem 2. In our experiments, we use the value function as a Lyapunov function candidate, v = J with r(·, ·) ≥0, and set λ = 1. In this case, (7) corresponds to an high-probability upper bound on the cost-to-go given the uncertainty in the dynamics. This is similar to worst-case performance formulations found in robust MDPs [9, 10], which consider worst-case value functions given parametric uncertainty in MDP transition model. Moreover, since L∆v depends on the Lipschitz constant of the policy, this simultaneously serves as a regularizer on the parameters θ. To verify safety, we use the GP confidence intervals ln and un directly, as in (2). We also use confidence to compute Sn for the active learning scheme, see Algorithm 1, Line 5. In practice, we do not need to compute the entire set Sn to solve (3), but can use a global optimization method or even a random sampling scheme within V(cn) to find suitable state-actions. Moreover, measurements for actions that are far away from the current policy are unlikely to expand V(cn), see Fig. 1(c). As we optimize (7) via gradient descent, the policy changes only locally. Thus, we can achieve better data-efficiency by restricting the exploratory actions u with (x, u) ∈Sn to be close to πn, u ∈ [πn(x) −¯u, πn(x) + ¯u] for some constant ¯u. Computing the region of attraction by verifying the stability condition on a discretized domain suffers from the curse of dimensionality. However, it is not necessary to update policies in real time. In particular, since any policy that is returned by the algorithm is provably safe within some level set, any of these policies can be used safely for an arbitrary number of time steps. To scale this method to higher-dimensional system, one would have to consider an adaptive discretization for the verification as in [27]. Experiments A Python implementation of Algorithm 1 and the experiments based on TensorFlow [37] and GPflow [38] is available at https://github.com/befelix/safe_learning. We verify our approach on an inverted pendulum benchmark problem. The true, continuous-time dynamics are given by ml2 ¨ψ = gml sin(ψ) −λ ˙ψ + u, where ψ is the angle, m the mass, g the gravitational constant, and u the torque applied to the pendulum. The control torque is limited, so that the pendulum necessarily falls down beyond a certain angle. We use a GP model for the discrete-time dynamics, where the mean dynamics are given by a linearized and discretized model of the true dynamics that considers a wrong, lower mass and neglects friction. As a result, the optimal policy for 8 the mean dynamics does not perform well and has a small region of attraction as it underactuates the system. We use a combination of linear and Matérn kernels in order to capture the model errors that result from parameter and integration errors. For the policy, we use a neural network with two hidden layers and 32 neurons with ReLU activations each. We compute a conservative estimate of the Lipschitz constant as in [30]. We use standard approximate dynamic programming with a quadratic, normalized cost r(x, u) = xTQx + uTRu, where Q and R are positive-definite, to compute the cost-to-go Jπθ. Specifically, we use a piecewiselinear triangulation of the state-space as to approximate Jπθ, see [39]. This allows us to quickly verify the assumptions that we made about the Lyapunov function in Sec. 2 using a graph search. In practice, one may use other function approximators. We optimize the policy via stochastic gradient descent on (7), where we sample a finite subset of X and replace the integral in (7) with a sum. The theoretical confidence intervals for the GP model are conservative. To enable more data-efficient learning, we fix βn = 2. This corresponds to a high-probability decrease condition per-state, rather than jointly over the state space. Moreover, we use local Lipschitz constants of the Lyapunov function rather than the global one. While this does not affect guarantees, it greatly speeds up exploration. For the initial policy, we use approximate dynamic programming to compute the optimal policy for the prior mean dynamics. This policy is unstable for large deviations from the initial state and has poor performance, as shown in Fig. 2(b). Under this initial, suboptimal policy, the system is stable within a small region of the state-space Fig. 2(a). Starting from this initial safe set, the algorithm proceeds to collect safe data points and improve the policy. As the uncertainty about the dynamics decreases, the policy improves and the estimated region of attraction increases. The region of attraction after 50 data points is shown in Fig. 2(a). The resulting set V(cn) is contained within the true safe region of the optimized policy πn. At the same time, the control performance improves drastically relative to the initial policy, as can be seen in Fig. 2(b). Overall, the approach enables safe learning about dynamic systems, as all data points collected during learning are safely collected under the current policy. 5 Conclusion We have shown how classical reinforcement learning can be combined with safety constraints in terms of stability. Specifically, we showed how to safely optimize policies and give stability certificates based on statistical models of the dynamics. Moreover, we provided theoretical safety and exploration guarantees for an algorithm that can drive the system to desired state-action pairs during learning. We believe that our results present an important first step towards safe reinforcement learning algorithms that are applicable to real-world problems. Acknowledgments This research was supported by SNSF grant 200020_159557, the Max Planck ETH Center for Learning Systems, NSERC grant RGPIN-2014-04634, and the Ontario Early Researcher Award. References [1] Richard S. Sutton and Andrew G. Barto. Reinforcement learning: an introduction. MIT press, 1998. [2] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin Riedmiller, Andreas K. Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. [3] Dario Amodei, Chris Olah, Jacob Steinhardt, Paul Christiano, John Schulman, and Dan Mané. Concrete problems in AI safety. arXiv:1606.06565 [cs], 2016. [4] Hassan K. Khalil and J. W. Grizzle. Nonlinear systems, volume 3. Prentice Hall, 1996. [5] Martin Pecka and Tomas Svoboda. Safe exploration techniques for reinforcement learning – an overview. In Modelling and Simulation for Autonomous Systems, pages 357–375. Springer, 2014. 9 [6] Javier García and Fernando Fernández. A comprehensive survey on safe reinforcement learning. Journal of Machine Learning Research (JMLR), 16:1437–1480, 2015. [7] Stefano P. Coraluppi and Steven I. Marcus. Risk-sensitive and minimax control of discrete-time, finite-state Markov decision processes. Automatica, 35(2):301–309, 1999. [8] Peter Geibel and Fritz Wysotzki. Risk-sensitive reinforcement learning applied to control under constraints. J. Artif. Intell. Res.(JAIR), 24:81–108, 2005. [9] Aviv Tamar, Shie Mannor, and Huan Xu. Scaling Up Robust MDPs by Reinforcement Learning. In Proc. of the International Conference on Machine Learning (ICML), 2014. [10] Wolfram Wiesemann, Daniel Kuhn, and Berç Rustem. Robust Markov Decision Processes. Mathematics of Operations Research, 38(1):153–183, 2012. [11] Teodor Mihai Moldovan and Pieter Abbeel. Safe exploration in Markov decision processes. In Proc. of the International Conference on Machine Learning (ICML), pages 1711–1718, 2012. [12] Matteo Turchetta, Felix Berkenkamp, and Andreas Krause. Safe exploration in finite markov decision processes with gaussian processes. pages 4305–4313, 2016. [13] Jan Peters and Stefan Schaal. Policy gradient methods for robotics. In Proc. of the IEEE/RSJ International Conference on Intelligent Robots and Systems, pages 2219–2225, 2006. [14] Joshua Achiam, David Held, Aviv Tamar, and Pieter Abbeel. Constrained policy optimization. In Proc. of the International Conference on Machine Learning (ICML), 2017. [15] Jonas Mockus. Bayesian approach to global optimization, volume 37 of Mathematics and Its Applications. Springer, Dordrecht, 1989. [16] Carl Edward Rasmussen and Christopher K.I Williams. Gaussian processes for machine learning. MIT Press, Cambridge MA, 2006. [17] Jens Schreiter, Duy Nguyen-Tuong, Mona Eberts, Bastian Bischoff, Heiner Markert, and Marc Toussaint. Safe exploration for active learning with Gaussian processes. In Machine Learning and Knowledge Discovery in Databases, number 9286, pages 133–149. Springer International Publishing, 2015. [18] Yanan Sui, Alkis Gotovos, Joel W. Burdick, and Andreas Krause. Safe exploration for optimization with Gaussian processes. In Proc. of the International Conference on Machine Learning (ICML), pages 997–1005, 2015. [19] Felix Berkenkamp, Angela P. Schoellig, and Andreas Krause. Safe controller optimization for quadrotors with Gaussian processes. In Proc. of the IEEE International Conference on Robotics and Automation (ICRA), pages 493–496, 2016. [20] J. Garcia and F. Fernandez. Safe exploration of state and action spaces in reinforcement learning. Journal of Artificial Intelligence Research, pages 515–564, 2012. [21] Alexander Hans, Daniel Schneegaß, Anton Maximilian Schäfer, and Steffen Udluft. Safe exploration for reinforcement learning. In Proc. of the European Symposium on Artificial Neural Networks (ESANN), pages 143–148, 2008. [22] Theodore J. Perkins and Andrew G. Barto. Lyapunov design for safe reinforcement learning. The Journal of Machine Learning Research, 3:803–832, 2003. [23] Dorsa Sadigh and Ashish Kapoor. Safe control under uncertainty with Probabilistic Signal Temporal Logic. In Proc. of Robotics: Science and Systems, 2016. [24] Chris J. Ostafew, Angela P. Schoellig, and Timothy D. Barfoot. Robust constrained learningbased NMPC enabling reliable mobile robot path tracking. The International Journal of Robotics Research (IJRR), 35(13):1547–1536, 2016. [25] Anil Aswani, Humberto Gonzalez, S. Shankar Sastry, and Claire Tomlin. Provably safe and robust learning-based model predictive control. Automatica, 49(5):1216–1226, 2013. 10 [26] Anayo K. Akametalu, Shahab Kaynama, Jaime F. Fisac, Melanie N. Zeilinger, Jeremy H. Gillula, and Claire J. Tomlin. Reachability-based safe learning with Gaussian processes. In Proc. of the IEEE Conference on Decision and Control (CDC), pages 1424–1431, 2014. [27] Ruxandra Bobiti and Mircea Lazar. A sampling approach to finding Lyapunov functions for nonlinear discrete-time systems. In Proc. of the European Control Conference (ECC), pages 561–566, 2016. [28] Felix Berkenkamp, Riccardo Moriconi, Angela P. Schoellig, and Andreas Krause. Safe learning of regions of attraction in nonlinear systems with Gaussian processes. In Proc. of the Conference on Decision and Control (CDC), pages 4661–4666, 2016. [29] Julia Vinogradska, Bastian Bischoff, Duy Nguyen-Tuong, Henner Schmidt, Anne Romer, and Jan Peters. Stability of controllers for Gaussian process forward models. In Proceedings of the International Conference on Machine Learning (ICML), pages 545–554, 2016. [30] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In Proc. of the International Conference on Learning Representations (ICLR), 2014. [31] Huijuan Li and Lars Grüne. Computation of local ISS Lyapunov functions for discrete-time systems via linear programming. Journal of Mathematical Analysis and Applications, 438(2):701– 719, 2016. [32] Peter Giesl and Sigurdur Hafstein. Review on computational methods for Lyapunov functions. Discrete and Continuous Dynamical Systems, Series B, 20(8):2291–2337, 2015. [33] Bernhard Schölkopf. Learning with kernels: support vector machines, regularization, optimization, and beyond. Adaptive computation and machine learning. MIT Press, Cambridge, Mass, 2002. [34] Sayak Ray Chowdhury and Aditya Gopalan. On kernelized multi-armed bandits. In Proc. of the International Conference on Machine Learning (ICML), pages 844–853, 2017. [35] Niranjan Srinivas, Andreas Krause, Sham M. Kakade, and Matthias Seeger. Gaussian Process Optimization in the Bandit Setting: No Regret and Experimental Design. IEEE Transactions on Information Theory, 58(5):3250–3265, 2012. [36] Warren B. Powell. Approximate dynamic programming: solving the curses of dimensionality. John Wiley & Sons, 2007. [37] Martín Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dan Mane, Rajat Monga, Sherry Moore, Derek Murray, Chris Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda Viegas, Oriol Vinyals, Pete Warden, Martin Wattenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. TensorFlow: Large-Scale Machine Learning on Heterogeneous Distributed Systems. arXiv:1603.04467 [cs], 2016. [38] Alexander G. de G. Matthews, Mark van der Wilk, Tom Nickson, Keisuke Fujii, Alexis Boukouvalas, Pablo León-Villagrá, Zoubin Ghahramani, and James Hensman. GPflow: a Gaussian process library using TensorFlow. Journal of Machine Learning Research, 18(40):1–6, 2017. [39] Scott Davies. Multidimensional triangulation and interpolation for reinforcement learning. In Proc. of the Conference on Neural Information Processing Systems (NIPS), pages 1005–1011, 1996. [40] Andreas Christmann and Ingo Steinwart. Support Vector Machines. Information Science and Statistics. Springer, New York, NY, 2008. 11 | 2017 | 310 |
6,798 | Time-dependent spatially varying graphical models, with application to brain fMRI data analysis Kristjan Greenewald Department of Statistics Harvard University Seyoung Park Department of Biostatistics Yale University Shuheng Zhou Department of Statistics University of Michigan Alexander Giessing Department of Statistics University of Michigan Abstract In this work, we present an additive model for space-time data that splits the data into a temporally correlated component and a spatially correlated component. We model the spatially correlated portion using a time-varying Gaussian graphical model. Under assumptions on the smoothness of changes in covariance matrices, we derive strong single sample convergence results, confirming our ability to estimate meaningful graphical structures as they evolve over time. We apply our methodology to the discovery of time-varying spatial structures in human brain fMRI signals. 1 Introduction Learning structured models of high-dimensional datasets from relatively few training samples is an important task in statistics and machine learning. Spatiotemporal data, in the form of n variables evolving over m time points, often fits this regime due to the high (mn) dimension and potential difficulty in obtaining independent samples. In this work, we develop a nonparametric framework for estimating time varying spatiotemporal graphical structure using an ℓ1 regularization method. The covariance of a spatiotemporal array X = [x1, . . . , xm] ∈Rn×m is an mn by mn matrix Σ = Cov vec([x1, . . . , xm]) , (1) where xi ∈Rn, i = 1, . . . , m denotes the n variables or features of interest at the ith time point. Even for moderately large m and n the number of degrees of freedom (mn(mn + 1)/2) in the covariance matrix can greatly exceed the number of training samples available for estimation. One way to handle this problem is to introduce structure and/or sparsity, thus reducing the number of parameters to be estimated. Spatiotemporal data is often highly structured, hence the design of estimators that model and exploit appropriate covariance structure can provide significant gains. We aim to develop a nonparametric framework for estimating time varying graphical structure for matrix-variate distributions. Associated with each xi ∈Rn is its undirected graph G(i). Under the assumption that the law L(xi) of xi changes smoothly, Zhou et al. (2010) introduced a nonparametric method to estimate the graph sequence G(1), G(2), . . . assuming that the xi ∼N(0, B(i/m)) are independent, where B(t) is a smooth function over t ∈[0, 1] and we have mapped the indices i onto points t = i/m on the interval [0, 1]. In this work, we are interested in the general time series model where the xi, i = 1, . . . , m are dependent and the B−1(t) graphs change over time. One way to introduce dependency into the xi is to study the following covariance structure. Let A = (aij) ∈Rm×m, B(t) = (bij(t)) ∈Rn×n, t ∈[0, 1] be symmetric positive definite covariance 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. matrices. Let diag(v), v = (v1, . . . , vm) be the diagonal matrix with elements vi along the diagonal. Consider the random matrix X with row vectors yj corresponding to measurements at the jth spatial location, and columns xi corresponding to the m measurements at times i/m, i = 1, . . . , m: ∀j = 1, . . . , n, yj ∼Nm(0, Aj) where Aj = A + diag(bjj(1), . . . , bjj(m)), and (2) ∀i = 1, . . . , m, xi ∼Nn(0, aiiI + B(i/m)) where B(t) changes smoothly over t ∈[0, 1]; (3) that is, the covariance of the column vectors xi corresponding to each time point changes smoothly with time (if aii is a smooth function of i). This provides ultimate flexibility in parameterizing spatial correlations, for example, across different geographical scales through variograms (Cressie, 2015), each of which is allowed to change over seasons. Observe that while we have used the normal distribution here for simplicity, all our results hold for general subgaussian distributions. The model (3) also allows modeling the dynamic gene regulatory and brain connectivity networks with topological (e.g., Erd˝os-R´enyi random graph, small-world graph, or modular graphs) constraints via degree specifications as well as spatial constraints in the set of {B(t), t = 1, 2, . . .}. When A = 0, we return to the case of Zhou et al. (2010) where there is no temporal correlation, i.e. y1, . . . , yn assumed to be independent. We propose methodologies to study the model as constructed in (2) and (3). Building upon and extending techniques of Zhou et al. (2010) and Rudelson & Zhou (2017); Zhou (2014), we aim to design estimators to estimate graph sequence G(1), G(2), . . ., where the temporal graph H and spatial graphs G(i) are determined by the zeros of A−1 and B(t)−1. Intuitively, the temporal correlation and spatial correlation are modeled as two additive processes. The covariance of X is now Cov[vec(X)] = Σ = A ⊗In + Xm i=1(eieT i ) ⊗B(i/m) (4) where ei ∈Rm, ∀i are the m-dimensional standard basis vectors. In the context of this model, we aim to develop a nonparametric method for estimating time varying graphical structure for matrix-variate normal distributions using an ℓ1 regularization method. We will show that, as long as the covariances change smoothly over time, we can estimate the spatial and temporal covariance matrices well in terms of predictive risk even when n, m are both large. We will investigate the following theoretical properties: (a) consistency and rate of convergence in the operator and Frobenius norm of the covariance matrices and their inverse, (b) large deviation results for covariance matrices for simultaneously correlated and non-identically distributed observations, and (c) conditions that guarantee smoothness of the covariances. Besides the model (4), another well-studied option for modeling spatio-temporal covariances Σ is to introduce structure via the Kronecker product of smaller symmetric positive definite matrices, i.e. Σ = A ⊗B. The Kronecker product model, however, is restrictive when applied to general spatiotemporal covariances as it assumes the covariance is separable (disallowing such simple scenarios as the presence of additive noise), and does not allow for time varying spatial structure. When used to estimate covariances not following Kronecker product structure, many estimators will respond to the model mismatch by giving ill-conditioned estimates (Greenewald & Hero, 2015). Human neuroscience data is a notable application where time-varying structure emerges. In neuroscience, one must take into account temporal correlations as well as spatial correlations, which reflect the connectivity formed by the neural pathways. It is conceivable that the brain connectivity graph will change over a sufficiently long period of measurements. For example, as a child learns to associate symbols in the environment, certain pathways within the brain are reinforced. When they begin to associate images with words, the correlation between a particular sound like Mommy and the sight of a face becomes stronger and forms a well worn pathway. On the other hand, long term non-use of connections between sensory and motor neurons can result in a loss of the pathway. 1.1 Datasets and Related Work Estimating graphical models (connectomes) in fMRI data using sparse inverse covariance techniques has enjoyed wide application (Huang et al., 2010; Varoquaux et al., 2010; Narayan et al., 2015; Kim et al., 2015). However, recent research has only now begun exploring observed phenomena such as temporal correlations and additive temporally correlated noise (Chen et al., 2015; Arbabshirani et al., 2014; Kim et al., 2015; Qiu et al., 2016), and time-varying dynamics and graphical models (connectomes) (Calhoun et al., 2014; Liu & Duyn, 2013; Chang & Glover, 2010; Chen et al., 2015). 2 We consider the ADHD-200 fMRI dataset (Biswal et al., 2010), and study resting state fMRIs for a variety of healthy patients in the dataset at different stages of development. Using our methods, we are able to directly estimate age-varying graphical models across brain regions, chronicling the development of brain structure throughout childhood. Several models have emerged to generalize the Kronecker product model to allow it to model more realistic covariances while still maintaining many of the gains associated with Kronecker structure. Kronecker PCA, discussed in Tsiligkaridis & Hero (2013), approximates the covariance matrix using a sum of Kronecker products. An algorithm (Permuted Rank-penalized Least Squares (PRLS)) for fitting the KronPCA model to a measured sample covariance matrix was introduced in (Tsiligkaridis & Hero, 2013) and was shown to have strong high dimensional MSE performance guarantees. From a modeling perspective, the strengths of Kronecker PCA lie in its ability to handle “near separable” covariances and a variety of time-varying effects. While the Kronecker PCA model is very general, so far incorporation of sparsity in the inverse covariance has not been forthcoming. This motivates our introduction of the sparse model (4), which we demonstrate experimentally in Section 10 of the supplement to enjoy better statistical convergence. Carvalho et al. (2007) proposed a Bayesian additive time-varying graphical model, where the spatially-correlated noise term is a parameter of the driving noise covariance in a temporal dynamical model. Unlike our method, they did not estimate the temporal correlation, instead requiring the dynamical model to be pre-set. Our proposed method has wholly independent spatial and temporal models, directly estimating an inverse covariance graphical model for the temporal relationships of the data. This allows for a much richer temporal model and increases its applicability. In the context of fMRI, the work of Qiu et al. (2016) used a similar kernel-weighted estimator for the spatial covariance, however they modeled the temporal covariance with a simple AR-1 model which they did not estimate, and their estimator did not attempt to remove. Similarly, Monti et al. (2014) used a smoothed kernel estimator for B−1(t) with a penalty to further promote smoothness, but did not model the temporal correlations. Our additive model allows the direct estimation of the temporal behavior, revealing a richer structure than a simple AR-1, and allowing for effective denoising of the data, and hence better estimation of the spatial graph structures. 2 The model and method Let the elements of A ≻0 and B(t) be denoted as [A]ij := aij and [B(t)]ij := bij(t), t ∈[0, 1]. Similar to the setting in (Zhou et al., 2010), we assume that bij(t) is a smooth function of time t for all i, j, and assume that B−1(t) is sparse. Furthermore, we suppose that m ≫n, corresponding to there being more time points than spatial variables. For a random variable Y , the subgaussian norm of Y , ∥Y ∥ψ2, is defined via ∥Y ∥ψ2 = supp≥1 p−1/2(E|Y |p)1/p. Note that if E[Y ] = 0, we also have E[exp(tY )] ≤exp(Ct2∥Y ∥2 ψ2) ∀t ∈R. Define an n × m random matrix Z with independent, zero mean entries Zij satisfying E[Z2 ij] = 1 and having subgaussian norm ∥Zij∥ψ2 ≤ K. Matrices Z1, Z2 denote independent copies of Z. We now write an additive generative model for subgaussian data X ∈Rn×m having covariance given in (4). Let X = Z1A1/2 + ZB (5) where ZB = [B(1/m)1/2Z2e1, . . . , B(i/m)1/2Z2ei, . . . , B(1)1/2Z2em], and ei ∈Rm, ∀i are the m-dimensional standard basis vectors. Then the covariance Σ = Cov[vec(X)] = Cov[vec(Z1A1/2)] + Cov[vec(ZB)] = Cov[vec(Z1A1/2)] + Xm i=1(eieT i ) ⊗Cov[B(i/m)1/2Z2ei] = A ⊗In + Xm i=1(eieT i ) ⊗B(i/m). Thus (5) is a generative model for data following the covariance model (4). 2.1 Estimators As in Rudelson & Zhou (2017), we can exploit the large-m convergence of Z1AZT 1 to tr(A)I to project out the A part and create an estimator for the B covariances. As B(t) is time-varying, we use a weighted average across time to create local estimators of spatial covariance matrix B(t). 3 It is often assumed that knowledge of the trace of one of the factors is available a priori. For example, the spatial signal variance may be known and time invariant, corresponding to tr(B(t)) being known. Alternatively, the temporal component variance may be constant and known, corresponding to tr(A) being known. In our analysis below, we suppose that tr(A) is known or otherwise estimated (similar results hold when tr(B(t)) is known). For simplicity in stating the trace estimators, in what follows we suppose that tr(B(t)) = tr(B) is constant, and without loss of generality that the data has been normalized such that diagonal elements Aii are constant over i. As B(t) is smoothly varying over time, the estimate at time t0 should depend strongly on the time samples close to t0, and less on the samples further from t0. For any time of interest t0, we thus construct a weighted estimator using a weight vector wi(t0) such that Pm t=1 wt(t0) = 1. Our weighted, unstructured sample-based estimator for B(t0) is then given by bSm(t0) := Xm i=1 wi(t0) xixT i −tr(A) m In , where wi(t0) = 1 mhK i/m −t0 h , (6) and we have considered the class of weight vectors wi(t0) arising from a symmetric nonnegative kernel function K with compact support [0, 1] and bandwidth determined by parameter h. A list of minor regularity assumptions on K are listed in the supplement. For kernels such as the Gaussian kernel, this wt(t0) will result in samples close to t0 being highly weighted, with the “weight decay” away from t0 scaling with the bandwidth h. A wide bandwidth will be appropriate for slowlyvarying B(t), and a narrow bandwidth for quickly-varying B(t). To enforce sparsity in the estimator for B−1(t0), we substitute bSm(t0) into the widely-used GLasso objective function, resulting in a penalized estimator for B(t0) with regularization parameter λm bBλ(t0) := arg min Bλ≻0 tr B−1 λ bSm(t0) + log |Bλ| + λm|B−1 λ |1. (7) For a matrix B, we let |B|1 := P ij |Bij|. Increasing the parameter λm gives an increasingly sparse bB−1 λ (t0). Having formed an estimator for B, we can now form a similar estimator for A. Under the constant-trace assumption, we construct an estimator for tr(B) ˆtr(B) = Xm i=1 wi∥Xi∥2 2 −n mtr(A), with wi = 1 m. (8) For a time-varying trace tr(B(t)), use the time-averaged kernel ˆtr(B(t0)) = m X i=1 wi(t0)∥Xi∥2 2 −n mtr(A), with wi(t0) = 1 mhK i/m −t0 h . (9) In the future we will derive rates for the time varying case by choosing an optimal h. These estimators allow us to construct a sample covariance matrix for A: ˜A = 1 nXT X −1 ndiag{ˆtr(B(1/m)), . . . , ˆtr(B(1))}. (10) We (similarly to B(t)) apply the GLasso approach to ˜A. Note that with m > n, ˜A has negative eigenvalues since λmin 1 nXT X = 0. We obtain a positive semidefinite matrix ˜A+ as: ˜A+ = arg min A⪰0 ∥˜A −A∥max. (11) We use alternating direction method of multipliers (ADMM) to solve (11) as in Boyd et al. (2011), and prove that this retains a tight elementwise error bound. Note that while we chose this method of obtaining a positive semidefinite ˜A+ for its simplicity, there may exist other possible projections, the exact method is not critical to our overall Kronecker sum approach. In fact, if the GLasso is not used, it is not necessary to do the projection (11), as the elementwise bounds also hold for ˜A. We provide a regularized estimator for the correlation matrices ρ(A) = diag(A)−1/2Adiag(A)−1/2 using the positive semidefinite ˜A+ as the initial input to the GLasso problem ˆρλ(A) = argminAρ≻0 tr(A−1 ρ ρ( ˜A+)) + log |Aρ| + λn|A−1 ρ |1,off, (12) where λn > 0 is a regularization parameter and | · |1,offis the L1 norm on the offdiagonal. Form the estimate for A as tr(A) m ˆρλ(A). Observe that our method has three tuning parameters, two if tr(A) is known or can be estimated. If tr(A) is not known, we present several methods to choose it in Section 7.1 in the supplement. Once tr(A) is chosen, the estimators (7) and (12) for A and B(t) respectively do not depend on each other, allowing λm and λn to be tuned independently. 4 3 Statistical convergence We first bound the estimation error for the time-varying B(t). Since ˆB(t) is based on a kernelsmoothed sample covariance, ˆB(t) is a biased estimator, with the bias depending on the kernel width and the smoothness of B(t). In Section 12.1 of the supplement, we derive the bias and variance of ˆSm(t0), using arguments from kernel smoothing and subgaussian concentration respectively. In the following results, we assume that the eigenvalues of the matrices A and B(t) are bounded: Assumption 1: There exist positive constants cA, cB such that 1 cA ≤λmin(A) ≤λmax(A) ≤cA and 1 cB ≤λmin(B(t)) ≤λmax(B(t)) ≤cB for all t. Assumption 2: B(t) has entries with bounded second derivatives on [0, 1]. Putting the bounds on the bias and variance together and optimizing the rate of h, we obtain the following, which we prove in the supplementary material. Theorem 1. Suppose that the above Assumption holds, the entries Bij(t) of B(t) have bounded second derivatives for all i, j, and t ∈[0, 1], sb+n = o((m/ log m)2/3), and that h ≍(m−1 log m)1/3. Then with probability at least 1 − c′′ m8/3 , bSm(t0) is positive definite and for some C maxij|bSm(t0, i, j) −B(t0, i, j)| ≤C m−1 log m 1/3 . This result confirms that the mh temporal samples selected by the kernel act as replicates for estimating B(t). We can now substitute this elementwise bound on bSm(t0) into the GLasso proof, obtaining the following theorem which demonstrates that ˆB(t) successfully exploits sparsity in B−1(t). Theorem 2. Suppose the conditions of Theorem 1 and that B−1(t) has at most sb nonzero offdiagonal elements for all t. If λm ∼ q log m m2/3 , then the GLasso estimator (7) satisfies ∥ˆB(t0) −B(t0)∥F = Op r (sb + n) log m m2/3 ! , ∥ˆB−1(t0) −B−1(t0)∥F = O r (sb + n) log m m2/3 ! Observe that this single-sample bound converges whenever the A part dimensionality m grows. The proof follows from the concentration bound in Theorem 1 using the argument in Zhou et al. (2010), Zhou et al. (2011), and Rothman et al. (2008). Note that λm goes to zero as m increases, in accordance with the standard bias/variance tradeoff. We now turn to the estimator for the A part. As it does not involve kernel smoothing, we simply need to bound the variance. We have the following bound on the error of ˜A: Theorem 3. Suppose the above Assumption holds. Then maxij| ˜Aij −Aij| ≤C(cA + cB) p n−1 log m with probability 1 − c m4 for some constants C, c > 0. Recall that we have assumed that m > n, so the probability converges to 1 with increasing m or n. While ˜A is not positive definite, the triangle inequality implies a bound on the positive definite projection ˜A+ (11): ∥˜A+ −A∥max ≤∥˜A+ −˜A∥max + ∥˜A −A∥max ≤2∥˜A −A∥max = Op p n−1log m . (13) Thus, similarly to the earlier result for B(t), the estimator (12) formed by substituting the positive semidefinite ρ( ˜A+) into the GLasso objective enjoys the following error bound (Zhou et al., 2011). Theorem 4. Suppose the conditions of Theorem 3 and that A−1 has at most sa = o(n/ log m) nonzero off-diagonal elements. If λn ∼ q log m n , then the GLasso estimator (12) satisfies ∥ˆA −A∥F = Op r sa log m n ! , ∥ˆA−1 −A−1∥F = Op r sa log m n ! . Observe that this single-sample bound converges whenever the B(t) dimensionality n grows since the sparsity sa = o(n/ log m). For relaxation of this stringent sparsity assumption, one can use other assumptions, see for example Theorem 3.3 in Zhou (2014). 5 4 Simulation study We generated a time varying sequence of spatial covariances B(ti) = Θ(ti)−1 according to the method of Zhou et al. (2010), which follows a type of Erdos-Renyi random graph model. Initially we set Θ(0) = 0.25In×n, where n = 100. Then, we randomly select k edges and update Θ(t) as follows: for each new edge (i, j), a weight a > 0 is chosen uniformly at random from [0.1, 0.3]; we subtract a from Θij and Θji, and increase Θii, Θjj by a. This keeps B(t) positive definite. When we later delete an existing edge from the graph, we reverse the above procedure. We consider t ∈[0, 1], changing the graph structure at the points ti = i/5 as follows. At each ti, five existing edges are deleted, and five new edges are added. For each of the five new edges, a target weight is chosen. Linear interpolation of the edge weights between the ti is used to smoothly add the new edges and gradually delete the ones to be deleted. Thus, almost always, there are 105 edges in the graph and 10 edges have weights that are varying smoothly (Figure 1). t = 0/5 t = 1/5 t = 2/5 t = 3/5 t = 4/5 t = 5/5 Figure 1: Example sequence of Erdos-Renyi B−1(t) = Θ(t) graphs. At each time point, the 100 edges connecting n = 100 nodes are shown. Changes are indicated by red and green edges: red edges indicate edges that will be deleted in the next increment and green indicates new edges. In the first set of experiments we consider B(t) generated from the ER time-varying graph procedure and A an AR-1 covariance with parameter ρ. The magnitudes of the two factors are balanced. We set n = 100 and vary m from 200 to 2400. For each n, m pair, we vary the B(t) regularization parameter λ, estimating every B(t), t = 1/m, . . . , 1 for each. We evaluate performance using the mean relative Frobenius B(t) estimation error (∥ˆB(t) −B(t)∥F /∥B(t)∥F ), the mean relative L2 estimation error (∥ˆB(t) −B(t)∥2/∥B(t)∥2), and the Matthews correlation coefficient (MCC). The MCC quantifies edge support estimation performance, and is defined as follows. Let the number of true positive edge detections be TP, true negatives TN, false positives FP, and false negatives FN. The Matthews correlation coefficient is defined as MCC = TP·TN−FP·FN √ (TP+FP)(TP+FN)(TN+FP)(TN+FN). Increasing values of MCC imply better edge estimation performance, with MCC = 0 implying complete failure and MCC = 1 implying perfect edge set estimation. Results are shown in Figure 2, for ρ = .5 and 50 edges in B, ρ = .5 and 100 edges in B, and ρ = .95 and 100 edges in B. As predicted by the theory, increasing m improves performance and increasing ρ decreases performance. Increasing the number of edges in B changes the optimal λ, as expected. Figure 3 shows performance results for the penalized estimator ˆA using MCC, Frobenius error, and L2 error, where A follows an AR(1) model with ρ = 0.5 and B follows a random ER model. Note the MCC, Frobenius, spectral norm errors are improved with larger n. In the supplement (Section 11), we repeat these experiments, using an alternate random graph topologies, with similar results. 5 fMRI Application The ADHD-200 resting-state fMRI dataset (Biswal et al., 2010) was collected from 973 subjects, 197 of which were diagnosed with ADHD types 1, 2, or 3. The fMRI images have varying numbers 6 0 0.2 0.4 0.6 0.8 λ 0 0.2 0.4 0.6 0.8 1 MCC MCC 0 0.2 0.4 0.6 0.8 λ 0 0.2 0.4 0.6 0.8 1 1.2 Frobenius Error Frobenius Error m = 200 m = 400 m = 800 m = 2400 0 0.2 0.4 0.6 0.8 λ 0 0.2 0.4 0.6 0.8 1 1.2 L2 Error L2 Error 0 0.2 0.4 0.6 0.8 λ 0 0.2 0.4 0.6 0.8 1 MCC MCC 0 0.2 0.4 0.6 0.8 λ 0 0.2 0.4 0.6 0.8 1 1.2 Frobenius Error Frobenius Error m = 200 m = 400 m = 800 m = 2400 0 0.2 0.4 0.6 0.8 λ 0 0.2 0.4 0.6 0.8 1 1.2 L2 Error L2 Error 0 0.2 0.4 0.6 0.8 λ 0 0.2 0.4 0.6 0.8 1 MCC MCC 0 0.2 0.4 0.6 0.8 λ 0 0.2 0.4 0.6 0.8 1 1.2 Frobenius Error Frobenius Error m = 200 m = 400 m = 800 m = 2400 0 0.2 0.4 0.6 0.8 λ 0 0.2 0.4 0.6 0.8 1 1.2 L2 Error L2 Error Figure 2: MCC, Frobenius, and L2 norm error curves for B a random ER graph and n = 100. Top: A is AR covariance with ρ = .5 and 50 edges in B, Middle: A is AR(1) covariance with ρ = .5 and B having 100 edges, Bottom: AR covariance with ρ = .95 and 100 edges in B. 0 0.2 0.4 0.6 0 0.2 0.4 0.6 0.8 1 MCC MCC 0 0.2 0.4 0.6 0 0.2 0.4 0.6 0.8 1 1.2 Frobenius Error m=200, Frobenius Error n=200 n=400 n=800 0 0.2 0.4 0.6 0 0.2 0.4 0.6 0.8 1 1.2 L2 Error L2 Error 0 0.2 0.4 0.6 0 0.2 0.4 0.6 0.8 1 MCC MCC 0 0.2 0.4 0.6 0 0.2 0.4 0.6 0.8 1 1.2 Frobenius Error m=800, Frobenius Error n=200 n=400 n=800 0 0.2 0.4 0.6 0 0.2 0.4 0.6 0.8 1 1.2 L2 Error L2 Error Figure 3: MCC, Frobenius, and L2 norm error curves for A a AR(1) with ρ = 0.5 when B is a random ER graph. From top to bottom: m = 200 and m = 800. of voxels which we divide into 90 regions of interest for graphical model analysis (Wehbe et al., 2014), and between 76 and 276 images exist for each subject. Provided covariates for the subjects include age, gender, handedness, and IQ. Previous works such as (Qiu et al., 2016) used this dataset to establish that the brain network density increases with age, corresponding to brain development as subjects mature. We revisit this problem using our additive approach. Our additive model allows the direct estimation of the temporal behavior, revealing a richer structure than a simple AR-1, and allowing for effectively a denoising of the data, and better estimation of the spatial graph structure. We estimate the temporal A covariances for each subject using the voxels contained in the regions of interest, with example results shown in Figure 5 in the supplement. We choose τB as the lower limit of the eigenvalues of 1 nXT X, as in the high sample regime it is an upper bound on τB. 7 We then estimate the brain connectivity network at a range of ages from 8 to 18, using both our proposed method and the method of Monti et al. (2014), as it is an optimally-penalized version of the estimator in Qiu et al. (2016). We use a Gaussian kernel with bandwidth h, and estimate the graphs using a variety of values of λ and h. Subjects with fewer than 120 time samples were eliminated, and those with more were truncated to 120 to reduce bias towards longer scans. The number of edges in the estimated graphs are shown in Figure 4. Note the consistent increase in network density with age, becoming more smooth with increasing h. 8 10 12 14 16 18 Age 0 200 400 600 800 1000 1200 Number of edges λ = 0.875 λ = 0.9 λ = 0.925 8 10 12 14 16 18 Age 0 200 400 600 800 1000 1200 Number of edges λ = 0.875 λ = 0.9 λ = 0.925 8 10 12 14 16 18 Age 0 200 400 600 800 1000 1200 Number of edges λ = 0.875 λ = 0.9 λ = 0.925 (a) Non-additive method of Monti et al. (2014) (optimally penalized version of Qiu et al. (2016)). 8 10 12 14 16 18 Age 0 200 400 600 800 1000 1200 Number of edges λ = 0.5 λ = 0.6 λ = 0.7 8 10 12 14 16 18 Age 0 200 400 600 800 1000 1200 Number of edges λ = 0.5 λ = 0.6 λ = 0.7 8 10 12 14 16 18 Age 0 200 400 600 800 1000 1200 Number of edges λ = 0.5 λ = 0.6 λ = 0.7 (b) Our proposed additive method, allowing for denoising of the time-correlated data. Figure 4: Number of edges in the estimated B−1(t) graphical models across 90 brain regions as a function of age. Shown are results using three different values of the regularization parameter λ, and from left to right the kernel bandwidth parameter used is h = 1.5, 2, and 3. Note the consistently increasing edge density in our estimate, corresponding to predictions of increased brain connectivity as the brain develops, leveling off in the late teenage years. Compare this to the method of Monti et al. (2014), which successfully detects the trend in the years 11-14, but fails for other ages. 6 Conclusion In this work, we presented estimators for time-varying graphical models in the presence of timecorrelated signals and noise. We revealed a bias-variance tradeoff scaling with the underlying rate of change, and proved strong single sample convergence results in high dimensions. We applied our methodology to an fMRI dataset, discovering meaningful temporal changes in functional connectivity, consistent with scientifically expected childhood growth and development. Acknowledgement This work was supported in part by NSF under Grant DMS-1316731, Elizabeth Caroline Crosby Research Award from the Advance Program at the University of Michigan, and by AFOSR grant FA9550-13-1-0043. References Arbabshirani, M., Damaraju, E., Phlypo, R., Plis, S., Allen, E., Ma, S., Mathalon, D., Preda, A., Vaidya, J., and Adali, T. Impact of autocorrelation on functional connectivity. Neuroimage, 102: 294–308, 2014. 8 Biswal, B., Mennes, M., Zuo, X., Gohel, S., Kelly, C., Smith, S., Beckmann, C., Adelstein, J., Buckner, R., and Colcombe, S. Toward discovery science of human brain function. Proceedings of the National Academy of Sciences, 107(10):4734–4739, 2010. Boyd, S., Parikh, N., Chu, E., Peleato, B., and Eckstein, J. Distributed optimization and statistical learning via ADMM. Foundations and Trends R⃝in Machine Learning, 3(1):1–122, 2011. Calhoun, V., Miller, R., Pearlson, G., and Adalı, T. The chronnectome: time-varying connectivity networks as the next frontier in fMRI data discovery. Neuron, 84(2):262–274, 2014. Carvalho, C., West, M., et al. Dynamic matrix-variate graphical models. Bayesian analysis, 2(1): 69–97, 2007. Chang, C. and Glover, G. Time–frequency dynamics of resting-state brain connectivity measured with fmri. Neuroimage, 50(1):81–98, 2010. Chen, S., Liu, K., Yang, Y., Xu, Y., Lee, S., Lindquist, M., Caffo, B., and Vogelstein, J. An m-estimator for reduced-rank high-dimensional linear dynamical system identification. arXiv:1509.03927, 2015. Cressie, N. Statistics for spatial data. John Wiley & Sons, 2015. Greenewald, K. and Hero, A. Robust kronecker product PCA for spatio-temporal covariance estimation. Signal Processing, IEEE Transactions on, 63(23):6368–6378, Dec 2015. Huang, S., Li, J., Sun, L., Ye, J., Fleisher, A., Wu, T., Chen, K., and Reiman, E. Learning brain connectivity of alzheimer’s disease by sparse inv. cov. est. NeuroImage, 50(3):935–949, 2010. Kim, J., Pan, W., Initiative, Alzheimer’s Disease Neuroimaging, et al. Highly adaptive tests for group differences in brain functional connectivity. NeuroImage: Clinical, 9:625–639, 2015. Liu, X. and Duyn, J. Time-varying functional network information extracted from brief instances of spontaneous brain activity. Proc. of the Natl. Academy of Sciences, 110(11):4392–4397, 2013. Monti, R., Hellyer, P., Sharp, D., Leech, R., Anagnostopoulos, C., and Montana, G. Estimating time-varying brain conn. networks from fMRI time series. NeuroImage, 103:427–443, 2014. Narayan, M., Allen, G., and Tomson, S. Two sample inference for populations of graphical models with applications to functional connectivity. arXiv preprint arXiv:1502.03853, 2015. Qiu, H., Han, F., Liu, H., and Caffo, B. Joint estimation of multiple graphical models from high dimensional time series. Journal of the Royal Statistical Society: Series B, 78(2):487–504, 2016. Rothman, A., Bickel, P., Levina, E., Zhu, J., et al. Sparse permutation invariant covariance estimation. Electronic Journal of Statistics, 2:494–515, 2008. Rudelson, M. and Zhou, S. Errors-in-variables models with dependent measurements. The Electronic Journal of Statistics, 11(1):1699–1797, 2017. Tsiligkaridis, T. and Hero, A. Covariance estimation in high dimensions via kronecker product expansions. IEEE Trans. on Sig. Proc., 61(21):5347–5360, 2013. Varoquaux, G., Gramfort, A., Poline, J-B., and Thirion, B. Brain covariance selection: better individual functional connectivity models using population prior. Advances in Neural Information Processing Systems, 23:2334–2342, 2010. Wehbe, L., Murphy, B., Talukdar, P., Fyshe, A., Ramdas, A., and Mitchell, T. Simultaneously uncovering the patterns of brain regions involved in different story reading subprocesses. PLOS ONE, 9(11):e112575, 2014. Zhou, S. Gemini: Graph estimation with matrix variate normal instances. The Annals of Statistics, 42(2):532–562, 2014. Zhou, S., Lafferty, J., and Wasserman, L. Time varying undirected graphs. Machine Learning, 80 (2-3):295–319, 2010. Zhou, S., R¨utimann, P., Xu, M., and B¨uhlmann, P. High-dimensional covariance estimation based on gaussian graphical models. The Journal of Machine Learning Research, 12:2975–3026, 2011. 9 | 2017 | 311 |
6,799 | Clone MCMC: Parallel High-Dimensional Gaussian Gibbs Sampling Andrei-Cristian B˘arbos IMS Laboratory Univ. Bordeaux - CNRS - BINP andbarbos@u-bordeaux.fr François Caron Department of Statistics University of Oxford caron@stats.ox.ac.uk Jean-François Giovannelli IMS Laboratory Univ. Bordeaux - CNRS - BINP giova@ims-bordeaux.fr Arnaud Doucet Department of Statistics University of Oxford doucet@stats.ox.ac.uk Abstract We propose a generalized Gibbs sampler algorithm for obtaining samples approximately distributed from a high-dimensional Gaussian distribution. Similarly to Hogwild methods, our approach does not target the original Gaussian distribution of interest, but an approximation to it. Contrary to Hogwild methods, a single parameter allows us to trade bias for variance. We show empirically that our method is very flexible and performs well compared to Hogwild-type algorithms. 1 Introduction Sampling high-dimensional distributions is notoriously difficult in the presence of strong dependence between the different components. The Gibbs sampler proposes a simple and generic approach, but may be slow to converge, due to its sequential nature. A number of recent papers have advocated the use of so-called "Hogwild Gibbs samplers", which perform conditional updates in parallel, without synchronizing the outputs. Although the corresponding algorithms do not target the correct distribution, this class of methods has shown to give interesting empirical results, in particular for Latent Dirichlet Allocation models [1, 2] and Gaussian distributions [3]. In this paper, we focus on the simulation of high-dimensional Gaussian distributions. In numerous applications, such as computer vision, satellite imagery, medical imaging, tomography or weather forecasting, simulation of high-dimensional Gaussians is needed for prediction, or as part of a Markov chain Monte Carlo (MCMC) algorithm. For example, [4] simulate high dimensional Gaussian random fields for prediction of hydrological and meteorological quantities. For posterior inference via MCMC in a hierarchical Bayesian model, elementary blocks of a Gibbs sampler often require to simulate high-dimensional Gaussian variables. In image processing, the typical number of variables (pixels/voxels) is of the order of 106/109. Due to this large size, Cholesky factorization is not applicable; see for example [5] or [6]. In [7, 8] the sampling problem is recast as an optimisation one: a sample is obtained by minimising a perturbed quadratic criterion. The cost of the algorithm depends on the choice of the optimisation technique. Exact resolution is prohibitively expensive so an iterative solver with a truncated number of iterations is typically used [5] and the distribution of the samples one obtains is unknown. In this paper, we propose an alternative class of iterative algorithms for approximately sampling high-dimensional Gaussian distributions. The class of algorithms we propose borrows ideas from optimization and linear solvers. Similarly to Hogwild algorithms, our sampler does not target the 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. distribution of interest but an approximation to this distribution. A single scalar parameter allows us to tune both the error and the convergence rate of the Markov chain, allowing to trade variance for bias. We show empirically that the method is very flexible and performs well compared to Hogwild algorithms. Its performance are illustrated on a large-scale image inpainting-deconvolution application. The rest of the article is organized as follows. In Section 2, we review the matrix splitting techniques that have been used to propose novel algorithms to sample high-dimensional normals. In Section 3, we present our novel methodology. Section 4 provides the intuition for such a scheme, which we refer to as clone MCMC, and discusses some generalization of the idea to non-Gaussian target distributions. We compare empirically Hogwild and our methodology on a variety of simulated examples in Section 5. The application to image inpainting-deconvolution is developed in Section 6. 2 Background on matrix splitting and Hogwild Gaussian sampling We consider a d-dimensional Gaussian random variable X with mean µ and positive definite covariance matrix Σ. The probability density function of X, evaluated at x = (x1 . . . , xd)T, is π(x) ∝exp −1 2 (x −µ)T Σ−1 (x −µ) ∝exp −1 2xTJ x + hTx where J = Σ−1 is the precision matrix and h = Jµ the potential vector. Typically, the pair (h, J) is available, and the objective is to estimate (µ, Σ) or to simulate from π. For moderate-size or sparse precision matrices, the standard method for exact simulation from π is based on the Cholesky decomposition of Σ, which has computational complexity O(d3) in the most general case [9]. If d is very large, the cost of Cholesky decomposition becomes prohibitive and iterative methods are favoured due to their smaller cost per iteration and low memory requirements. A principled iterative approach to draw samples approximately distributed from π is the single-site Gibbs sampler, which simulates a Markov chain (X(i))i=1,2,... with stationary distribution π by updating each variable in turn from its conditional distribution. A complete update of the d variables can be written in matrix form as X(i+1) = −(D + L)−1LTX(i) + (D + L)−1Z(i+1), Z(i+1) ∼N(h, D) (1) where D is the diagonal part of J and L is is the strictly lower triangular part of J. Equation (1) highlights the connection between the Gibbs sampler and linear iterative solvers as E[X(i+1)|X(i) = x] = −(D + L)−1LTx + (D + L)−1h is the expression of the Gauss-Seidel linear iterative solver update to solve the system Jµ = h for a given pair (h, J). The single-site Gaussian Gibbs sampler can therefore be interpreted as a stochastic version of the Gauss-Seidel linear solver. This connection has been noted by [10] and [11], and later exploited by [3] to analyse the Hogwild Gibbs sampler and by [6] to derive a family of Gaussian Gibbs samplers. The Gauss-Seidel iterative solver is just a particular example of a larger class of matrix splitting solvers [12]. In general, consider the linear system Jµ = h and the matrix splitting J = M −N, where M is invertible. Gauss-Seidel corresponds to setting M = D + L and N = −LT. More generally, [6] established that the Markov chain with transition X(i+1) = M −1NX(i) + M −1Z(i+1), Z(i+1) ∼N(h, M T + N) (2) admits π as stationary distribution if and only if the associated iterative solver with update x(i+1) = M −1Nx(i) + M −1h is convergent; that is if and only if ρ(M −1N) < 1, where ρ denotes the spectral radius. Using this result, [6] built on the large literature on linear iterative solvers in order to derive generalized Gibbs samplers with the correct Gaussian target distribution, extending the approaches proposed by [10, 11, 13]. The practicality of the iterative samplers with transition (2) and matrix splitting (M, N) depends on • How easy it is to solve the system Mx = r for any r, 2 • How easy it is to sample from N(0, M T + N). As noted by [6], there is a necessary trade-off here. The Jacobi splitting M = D would lead to a simple solution to the linear system, but sampling from a Gaussian distribution with covariance matrix M T + N would be as complicated as solving the original sampling problem. The Gauss-Seidel splitting M = D + L provides an interesting trade-off as Mx = r can be solved by substitution and M T + N = D is diagonal. The method of successive over-relaxation (SOR) uses a splitting M = ω−1D + L with an additional tuning parameter ω > 0. In both the SOR and Gauss-Seidel cases, the system Mx = r can be solved by substitution in O(d2), but the resolution of the linear system cannot be parallelized. All the methods discussed so far asymptotically sample from the correct target distribution. The Hogwild Gaussian Gibbs sampler does not, but its properties can also be analyzed using techniques from the linear iterative solver literature as demonstrated by [3]. For simplicity of exposure, we focus here on the Hogwild sampler with blocks of size 1. In this case, the Hogwild algorithm simulates a Markov chain with transition X(i+1) = M −1 HogNHogX(i) + M −1 HogZ(i+1), Z(i+1) ∼N(h, MHog) where MHog = D and NHog = −(L + LT). This update is highly amenable to parallelization as MHog is diagonal thus one can easily solve the system MHogx = r and sample from N(0, MHog). [3] showed that if ρ(M −1 HogNHog) < 1, the Markov chain admits N(µ, eΣ) as stationary distribution where eΣ = (I + M −1 HogNHog)−1Σ. The above approach can be generalized to blocks of larger sizes. However, beyond the block size, the Hogwild sampler does not have any tunable parameter allowing us to modify its incorrect stationary distribution. Depending on the computational budget, we may want to trade bias for variance. In the next Section, we describe our approach, which offers such flexibility. 3 High-dimensional Gaussian sampling Let J = M −N be a matrix splitting, with M positive semi-definite. Consider the Markov chain (X(i))i=1,2,... with initial state X(0) and transition X(i+1) = M −1NX(i) + M −1Z(i+1), Z(i+1) ∼N(h, 2M). (3) The following theorem shows that, if the corresponding iterative solver converges, the Markov chain converges to a Gaussian distribution with the correct mean and an approximate covariance matrix. Theorem 1. If ρ(M −1N) < 1, the Markov chain (X(i))i=1,2,... defined by (3) has stationary distribution N(µ, eΣ) where eΣ = 2 I + M −1N −1 Σ = (I −1 2M −1Σ−1)−1Σ. Proof. The equivalence between the convergence of the iterative linear solvers and their stochastic counterparts was established in [6, Theorem 1]. The mean eµ of the stationary distribution verifies the recurrence eµ = M −1N eµ + M −1Σ−1µ hence (I −M −1N)eµ = M −1Σ−1µ ⇔ eµ = µ as Σ−1 = M −N. For the covariance matrix, consider the 2d-dimensional random variable Y1 Y2 = N µ µ , M/2 −N/2 −N/2 M/2 −1! (4) 3 Then using standard manipulations of multivariate Gaussians and the inversion lemma on block matrices we obtain Y1|Y2 ∼N(M −1NY2 + M −1h, 2M −1) Y2|Y1 ∼N(M −1NY1 + M −1h, 2M −1) and Y1 ∼N(µ, eΣ), Y2 ∼N(µ, eΣ) The above proof is not constructive, and we give in Section 4 the intuition behind the choice of the transition and the name clone MCMC. We will focus here on the following matrix splitting M = D + 2ηI, N = 2ηI −L −LT (5) where η ≥0. Under this matrix splitting, M is a diagonal matrix and an iteration only involves a matrix-vector multiplication of computational cost O(d2). This operation can be easily parallelized. Each update has thus the same computational complexity as the Hogwild algorithm. We have eΣ = (I −1 2(D + 2ηI)−1Σ−1)−1Σ. Since M −1 →0 and M −1N →I for η →∞, we have lim η→∞ eΣ = Σ, lim η→∞ρ(M −1N) = 1. The parameter η is an easily interpretable tuning parameter for the method: as η increases, the stationary distribution of the Markov chain becomes closer to the target distribution, but the samples become more correlated. For example, consider the target precision matrix J = Σ−1 with Jii = 1, Jij = −1/(d + 1) for i ̸= j and d = 1000. The proposed sampler is run for different values of η in order to estimate the covariance matrix Σ. Let ˆΣ = 1/ns Pns i=1(X(i) −ˆµ)T(X(i) −ˆµ) be the estimated covariance matrix where ˆµ = 1/ns Pns i=1 X(i) is the estimated mean. The Figure 1(a) reports the bias term ||Σ −eΣ||, the variance term ||bΣ −eΣ|| and the overall error ||Σ −bΣ|| as a function of η, using ns = 10000 samples and 100 replications, with || · || the ℓ2 (Frobenius) norm. As η increases, the bias term decreases while the variance term increases, yielding an optimal value at η ≃10. Figure 1(b-c) show the estimation error for the mean and covariance matrix as a function of η, for different sample sizes. Figure 2 shows the estimation error as a function of the sample size for different values of η. The following theorem gives a sufficient condition for the Markov chain to converge for any value η. Theorem 2. Let M = D + 2ηI, N = 2ηI −L −LT. A sufficient condition for ρ(M −1N) < 1 for all η ≥0 is that Σ−1 is strictly diagonally dominant. Proof. M is non singular, hence det(M −1N −λI) = 0 ⇔det(N −λM) = 0. Σ−1 = M −N is diagonally dominant, hence λM −N = (λ −1)M + M −N is also diagonally dominant for any λ ≥1. From Gershgorin’s theorem, a diagonally dominant matrix is nonsingular, so det(N −λM) ̸= 0 for all λ ≥1. We conclude that ρ(M −1N) < 1. 4 (a) ns = 20000 (b) ||Σ −bΣ|| (c) ||µ −bµ|| Figure 1: Influence of the tuning parameter η on the estimation error (a) ||Σ −bΣ|| (b) ||µ −bµ|| Figure 2: Influence of the sample size on the estimation error 4 Clone MCMC We now provide some intuition on the construction given in Section 3, and justify the name given to the method. The joint pdf of (Y1, Y2) on R2d defined in (4) with matrix splitting (5) can be expressed as eπη(y1, y2) ∝exp{−η 2(y1 −y2)T(y1 −y2)} × exp{−1 4(y1 −µ)TD(y1 −µ) −1 4(y1 −µ)T(L + LT)(y2 −µ)} × exp{−1 4(y2 −µ)TD(y2 −µ) −1 4(y2 −µ)T(L + LT)(y1 −µ)} We can interpret the joint pdf above as having cloned the original random variable X into two dependent random variables Y1 and Y2. The parameter η tunes the correlation between the two variables, and eπη(y1|y2) = Qd k=1 eπη(y1k|y2), which allows for straightforward parallelization of the method. As η →∞, the clones become more and more correlated, with corr(Y1, Y2) →1 and eπη(y1) →π(y1). The idea can be generalized further to pairwise Markov random fields. Consider the target distribution π(x) ∝exp − X 1≤i≤j≤d ψij(xi, xj) for some potential functions ψij, 1 ≤i ≤j ≤d. The clone pdf is eπ(y1, y2) ∝exp{−η 2(y1 −y2)T(y1 −y2) −1 2 X 1≤i≤j≤d (ψij(y1i, y2i) + ψij(y2i, y1i))} where eπ(y1|y2) = d Y k=1 eπ(y1k|y2). Assuming eπ is a proper pdf, we have eπ(y1) →π(y1) as η →∞. 5 (a) 10s (b) 80s (c) 120s Figure 3: Estimation error for the covariance matrix Σ1 for fixed computation time, d = 1000. (a) 10s (b) 80s (c) 120s Figure 4: Estimation error for the covariance matrix Σ2 for fixed computation time, d = 1000. 5 Comparison with Hogwild and Gibbs sampling In this section, we provide an empirical comparison of the proposed approach with the Gibbs sampler and Hogwild algorithm, using the splitting (5). Note that in order to provide a fair comparison between the algorithms, we only consider the single-site Gibbs sampling and block-1 Hogwild algorithms, whose updates are respectively given in Equations (1) and (2). Versions of all three algorithms could also be developed with blocks of larger sizes. We consider the following two precision matrices. Σ−1 1 = 1 −α −α 1 + α2 −α ... ... ... −α 1 + α2 −α −α 1 , Σ−1 2 = ... ... ... ... ... 0.15 0.3 1 0.3 0.15 ... ... ... ... ... where for the first precision matrix we have α = 0.95. Experiments are run on GPU with 2688 CUDA cores. In order to compare the algorithms, we run each algorithm for a fixed execution time (10s, 80s and 120s). Computation time per iteration for Hogwild and Clone MCMC are similar, and they return a similar number of samples. The computation time per iteration of the Gibbs sampling is much higher, due to the lack of parallelization, and it returns less samples. For Hogwild and Clone MCMC, we report both the approximation error ||Σ −eΣ|| and the estimation error ||Σ −bΣ||. For Gibbs, only the estimation error is reported. Figures 3 and 4 show that, for a range of values of η, our method outperforms both Hogwild and Gibbs, whatever the execution time. As the computational budget increases, the optimal value for η increases. 6 Application to image inpainting-deconvolution In order to demonstrate the usefulness of the approach, we consider an application to image inpaintingdeconvolution. Let Y = THX + B, B ∼N(0, Σb) (6) 6 (a) True image (b) Observed Image (c) Posterior mean (optimization) (d) Posterior mean (clone MCMC) Figure 5: Deconvolution-Interpolation results be the observation model where Y ∈Rn is the observed image, X ∈Rd is the true image, B ∈Rn is the noise component, H ∈Rd×d is the convolution matrix and T ∈Rn×d is the truncation matrix. The observation noise is assumed to be independent of X with Σ−1 b = γbI and γb = 10−2. Assume X ∼N(0, Σx) with Σ−1 x = γ01d1T d + γ1CCT wherein 1d is a column vector of size d having all elements equal to 1/d, C is the block-Toeplitz convolution matrix corresponding to the 2D Laplacian filter and γ0 = γ1 = 10−2. The objective is to sample from the posterior distribution X|Y = y ∼N(µx|y, Σx|y) where Σ−1 x|y = HTT TΣ−1 b TH + Σ−1 x µx|y = Σx|yHTT TΣ−1 b y. The true unobserved image is of size 1000 × 1000, hence the posterior distribution corresponds to a random variable of size d = 106. We have considered that 20% of the pixels are not observed. The true image is given in Figure 5(a); the observed image is given in Figure 5(b). In this high-dimensional setting with d = 106, direct sampling via Cholesky decomposition or standard single-site Gibbs algorithm are not applicable. We have implemented the block-1 Hogwild algorithm. However, in this scenario the algorithm diverges, which is certainly due to the fact that the spectral radius of M −1 HogNHog is greater than 1. We run our clone MCMC algorithm for ns = 19000 samples, out of which the first 4000 were discarded as burn-in samples, using as initialization the observed image, with missing entries padded with zero. The tuning parameter η is set to 1. Figure 5(c) contains the reconstructed image that was obtained by numerically maximizing the posterior distribution using gradient ascent. We shall take this image as reference when evaluating the reconstructed image computed as the posterior mean from the drawn samples. The reconstructed image is given in Figure 5(d). If we compare the restored image with the one obtained by the optimization approach we can immediately see that the two images are visually very similar. This observation is further reinforced by the top plot from Figure 6 where we have depicted the same line of pixels from both images. The line of pixels that is displayed is indicated by the blue line segments in Figure 5(d). The traces in grey represent the 99% credible intervals. We can see that for most of the pixels, if not for all for that matter, the estimated value lies well within the 99% credible intervals. The bottom plot from Figure 6 displays the estimated image together with the true image for the same line of pixels, showing an accurate estimation of the true image. Figure 7 shows traces of the Markov chains for 4 selected pixels. Their exact position is indicated in Figure 5(b). The red marker corresponds to an observed pixel from a region having a mid-grey tone. The green marker corresponds to an observed pixel from a white tone region. The dark blue marker corresponds to an observed pixel from dark tone region. 7 Figure 6: Line of pixels from the restored image Figure 7: Markov chains for selected pixels, clone MCMC The cyan marker corresponds to an observed pixel from a region having a tone between mid-grey and white. The choice of η can be a sensible issue for the practical implementation of the algorithm. We observed empirically convergence of our algorithm for any value η greater than 0.075. This is a clear advantage over Hogwild, as our approach is applicable in settings where Hogwild is not as it diverges, and offers an interesting way of controlling the bias/variance trade-off. We plan to investigate methods to automatically choose the tuning parameter η in future work. References [1] D. Newman, P. Smyth, M. Welling, and A. Asuncion. Distributed inference for latent Dirichlet allocation. In Advances in neural information processing systems, pages 1081–1088, 2008. [2] R. Bekkerman, M. Bilenko, and J. Langford. Scaling up machine learning: Parallel and distributed approaches. Cambridge University Press, 2011. [3] M. Johnson, J. Saunderson, and A. Willsky. Analyzing Hogwild parallel Gaussian Gibbs sampling. In C. J. C. Burges, L. Bottou, M. Welling, Z. Ghahramani, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems 26, pages 2715–2723. Curran Associates, Inc., 2013. [4] Y. Gel, A. E. Raftery, T. Gneiting, C. Tebaldi, D. Nychka, W. Briggs, M. S. Roulston, and V. J. Berrocal. Calibrated probabilistic mesoscale weather field forecasting: The geostatistical output perturbation method. Journal of the American Statistical Association, 99(467):575–590, 2004. [5] C. Gilavert, S. Moussaoui, and J. Idier. Efficient Gaussian sampling for solving large-scale inverse problems using MCMC. Signal Processing, IEEE Transactions on, 63(1):70–80, January 2015. 8 [6] C. Fox and A. Parker. Accelerated Gibbs sampling of normal distributions using matrix splittings and polynomials. Bernoulli, 23(4B):3711–3743, 2017. [7] G. Papandreou and A. L. Yuille. Gaussian sampling by local perturbations. In J. D. Lafferty, C. K. I. Williams, J. Shawe-Taylor, R. S. Zemel, and A. Culotta, editors, Advances in Neural Information Processing Systems 23, pages 1858–1866. Curran Associates, Inc., 2010. [8] F. Orieux, O. Féron, and J. F. Giovannelli. Sampling high-dimensional Gaussian distributions for general linear inverse problems. IEEE Signal Processing Letters, 19(5):251–254, 2012. [9] H. Rue. Fast sampling of Gaussian Markov random fields. Journal of the Royal Statistical Society: Series B, 63(2):325–338, 2001. [10] S.L. Adler. Over-relaxation method for the Monte Carlo evaluation of the partition function for multiquadratic actions. Physical Review D, 23(12):2901, 1981. [11] P. Barone and A. Frigessi. Improving stochastic relaxation for Gaussian random fields. Probability in the Engineering and Informational sciences, 4(03):369–389, 1990. [12] G. Golub and C. Van Loan. Matrix Computations. The John Hopkins University Press, Baltimore, Maryland 21218-4363, Fourth edition, 2013. [13] G.O. Roberts and S.K. Sahu. Updating schemes, correlation structure, blocking and parameterization for the Gibbs sampler. Journal of the Royal Statistical Society: Series B, 59(2):291–317, 1997. 9 | 2017 | 312 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.