arxiv: v5 [cs.lg] 21 Feb 2014

Similar documents
SVD-based Universal DNN Modeling for Multiple Scenarios

Lecture 7: Neural network acoustic models in speech recognition

LOW-RANK MATRIX FACTORIZATION FOR DEEP NEURAL NETWORK TRAINING WITH HIGH-DIMENSIONAL OUTPUT TARGETS

Compressing Deep Neural Networks using a Rank-Constrained Topology

Deep Neural Network Approach for the Dialog State Tracking Challenge

Why DNN Works for Speech and How to Make it More Efficient?

Kernels vs. DNNs for Speech Recognition

JOINT INTENT DETECTION AND SLOT FILLING USING CONVOLUTIONAL NEURAL NETWORKS. Puyang Xu, Ruhi Sarikaya. Microsoft Corporation

Deep Learning with Tensorflow AlexNet

Deep Learning. Deep Learning provided breakthrough results in speech recognition and image classification. Why?

DEEP LEARNING REVIEW. Yann LeCun, Yoshua Bengio & Geoffrey Hinton Nature Presented by Divya Chitimalla

ABSTRACT 1. INTRODUCTION

arxiv: v1 [cs.ne] 28 Nov 2017

Variable-Component Deep Neural Network for Robust Speech Recognition

Deep Learning Basic Lecture - Complex Systems & Artificial Intelligence 2017/18 (VO) Asan Agibetov, PhD.

Study of Residual Networks for Image Recognition

GMM-FREE DNN TRAINING. Andrew Senior, Georg Heigold, Michiel Bacchiani, Hank Liao

Channel Locality Block: A Variant of Squeeze-and-Excitation

arxiv: v2 [stat.ml] 27 May 2016

Deep Learning Based Large Scale Handwritten Devanagari Character Recognition

COMP9444 Neural Networks and Deep Learning 7. Image Processing. COMP9444 c Alan Blair, 2017

COMP 551 Applied Machine Learning Lecture 16: Deep Learning

Machine Learning. Deep Learning. Eric Xing (and Pengtao Xie) , Fall Lecture 8, October 6, Eric CMU,

Advanced Introduction to Machine Learning, CMU-10715

A Deep Learning primer

3D model classification using convolutional neural network

Long Short-Term Memory Recurrent Neural Network Architectures for Large Scale Acoustic Modeling

Deep Learning for Computer Vision II

Machine Learning. MGS Lecture 3: Deep Learning

Making Deep Belief Networks Effective for Large Vocabulary Continuous Speech Recognition

Real-time convolutional networks for sonar image classification in low-power embedded systems

Restricted Boltzmann Machines. Shallow vs. deep networks. Stacked RBMs. Boltzmann Machine learning: Unsupervised version

Neural Networks for Machine Learning. Lecture 15a From Principal Components Analysis to Autoencoders

Deep Learning. Volker Tresp Summer 2015

Deep Learning. Volker Tresp Summer 2014

Deep Learning in Visual Recognition. Thanks Da Zhang for the slides

Deep Tracking: Biologically Inspired Tracking with Deep Convolutional Networks

Residual Networks And Attention Models. cs273b Recitation 11/11/2016. Anna Shcherbina

Convolutional Neural Network for Facial Expression Recognition

Multi-Glance Attention Models For Image Classification

ImageNet Classification with Deep Convolutional Neural Networks

Cambridge Interview Technical Talk

Query-by-example spoken term detection based on phonetic posteriorgram Query-by-example spoken term detection based on phonetic posteriorgram

Convolutional Neural Networks for Facial Expression Recognition

BranchyNet: Fast Inference via Early Exiting from Deep Neural Networks

Dynamic Routing Between Capsules

Machine Learning 13. week

Convolutional Neural Networks. Computer Vision Jia-Bin Huang, Virginia Tech

DEEP LEARNING APPROACH MODEL FOR VEHICLE CLASSIFICATION USING ARTIFICIAL NEURAL NETWORK

Semantic Word Embedding Neural Network Language Models for Automatic Speech Recognition

Pair-wise Distance Metric Learning of Neural Network Model for Spoken Language Identification

Object Detection Lecture Introduction to deep learning (CNN) Idar Dyrdal

A Comparison of Sequence-Trained Deep Neural Networks and Recurrent Neural Networks Optical Modeling For Handwriting Recognition

Introduction to Deep Learning

Lecture 2 Notes. Outline. Neural Networks. The Big Idea. Architecture. Instructors: Parth Shah, Riju Pahwa

CAP 6412 Advanced Computer Vision

Learning visual odometry with a convolutional network

Weighted Convolutional Neural Network. Ensemble.

CPSC 340: Machine Learning and Data Mining. Deep Learning Fall 2016

Deep Learning Workshop. Nov. 20, 2015 Andrew Fishberg, Rowan Zellers

Groupout: A Way to Regularize Deep Convolutional Neural Network

Proceedings of the International MultiConference of Engineers and Computer Scientists 2018 Vol I IMECS 2018, March 14-16, 2018, Hong Kong

Computer Vision Lecture 16

27: Hybrid Graphical Models and Neural Networks

Lecture 13. Deep Belief Networks. Michael Picheny, Bhuvana Ramabhadran, Stanley F. Chen

3D Densely Convolutional Networks for Volumetric Segmentation. Toan Duc Bui, Jitae Shin, and Taesup Moon

SEMANTIC COMPUTING. Lecture 8: Introduction to Deep Learning. TU Dresden, 7 December Dagmar Gromann International Center For Computational Logic

Machine Learning. The Breadth of ML Neural Networks & Deep Learning. Marc Toussaint. Duy Nguyen-Tuong. University of Stuttgart

arxiv: v1 [cs.cv] 4 Feb 2018

CMU Lecture 18: Deep learning and Vision: Convolutional neural networks. Teacher: Gianni A. Di Caro

Deep Neural Networks for Recognizing Online Handwritten Mathematical Symbols

Neural Network and Deep Learning. Donglin Zeng, Department of Biostatistics, University of North Carolina

FPGA BASED IMPLEMENTATION OF DEEP NEURAL NETWORKS USING ON-CHIP MEMORY ONLY. Jinhwan Park and Wonyong Sung

Seminars in Artifiial Intelligenie and Robotiis

Application of Convolutional Neural Network for Image Classification on Pascal VOC Challenge 2012 dataset

arxiv: v1 [cs.lg] 16 Jan 2013

Deep Learning. Volker Tresp Summer 2017

Inception Network Overview. David White CS793

Learning Spatio-Temporal Features with 3D Residual Networks for Action Recognition

Neural Networks for unsupervised learning From Principal Components Analysis to Autoencoders to semantic hashing

CS 6501: Deep Learning for Computer Graphics. Training Neural Networks II. Connelly Barnes

Tiny ImageNet Visual Recognition Challenge

On the Efficiency of Recurrent Neural Network Optimization Algorithms

Deep Learning for Computer Vision

DEEP CLUSTERING WITH GATED CONVOLUTIONAL NETWORKS

DropConnect Regularization Method with Sparsity Constraint for Neural Networks

End-to-End Training of Acoustic Models for Large Vocabulary Continuous Speech Recognition with TensorFlow

Stochastic Function Norm Regularization of DNNs

Know your data - many types of networks

Deep Learning With Noise

Layer-wise Performance Bottleneck Analysis of Deep Neural Networks

Inception and Residual Networks. Hantao Zhang. Deep Learning with Python.

ROB 537: Learning-Based Control

Deep Learning with R. Francesca Lazzeri Data Scientist II - Microsoft, AI Research

Neural Network Optimization and Tuning / Spring 2018 / Recitation 3

Research on Pruning Convolutional Neural Network, Autoencoder and Capsule Network

Ryerson University CP8208. Soft Computing and Machine Intelligence. Naive Road-Detection using CNNS. Authors: Sarah Asiri - Domenic Curro

Learning Convolutional Neural Networks using Hybrid Orthogonal Projection and Estimation

Deep Model Compression

Elastic Neural Networks for Classification

Transcription:

Do Deep Nets Really Need to be Deep? arxiv:1312.6184v5 [cs.lg] 21 Feb 2014 Lei Jimmy Ba University of Toronto jimmy@psi.utoronto.ca Abstract Rich Caruana Microsoft Research rcaruana@microsoft.com Currently, deep neural networks are the state of the art on problems such as speech recognition and computer vision. In this extended abstract, we show that shallow feed-forward networks can learn the complex functions previously learned by deep nets and achieve accuracies previously only achievable with deep models. Moreover, in some cases the shallow neural nets can learn these deep functions using a total number of parameters similar to the original deep model. We evaluate our method on the TIMIT phoneme recognition task and are able to train shallow fully-connected nets that perform similarly to complex, well-engineered, deep convolutional architectures. Our success in training shallow neural nets to mimic deeper models suggests that there probably exist better algorithms for training shallow feed-forward nets than those currently available. 1 Introduction You are given a training set with 1M labeled points. When you train a shallow neural net with one fully-connected feedforward hidden layer on this data you obtain 86% accuracy on test data. When you train a deeper neural net as in [1] consisting of a convolutional layer, pooling layer, and three fully-connected feedforward layers on the same data you obtain 91% accuracy on the test set. What is the source of this magic? Is the 5% increase in accuracy of the deep net over the shallow net because: a) the deep net has more parameters than the shallow net; b) the deep net is deeper than the shallow net[4]; c) nets without convolution can t learn what nets with convolution can learn; d) the current learning algorithms and regularization procedures work better with deep architectures than with shallow architectures[7]; e) all or some of the above; f) none of the above? There have been several attempts to answer the question above. In [7] it is argued that depth with pre-training provides a regularization prior. More recently, a study on convolutional nets suggests that deeper models are preferred under a parameter budget [6]. In [4] the authors show that it is challenging to train big shallow neural networks to learn complex functions. And in [12], the authors show that deeper models are more competitive than shallow models in speech acoustic modeling. In this extended abstract we provide empirical evidence that shallow nets are capable of learning the same function as deep nets, and are able to do this with a total number of parameters comparable to deep nets. We do this by first training a state-of-the-art deep model, and then training a shallow model to mimic the deep model. The mimic model is trained using the model compression scheme described in the next section. Remarkably, with model compression we are able to train shallow nets to be as accurate as some deep models, even though we are not able to train shallow nets to be as accurate as the deep nets when the shallow nets are trained directly on the original labeled training data. If a shallow net with the same number of parameters as a deep net can learn to mimic a deep net with high fidelity, then it is clear that the function learned by deep net does not really have to be deep. This suggests that current training algorithms work better with deep architectures, and that 1

with improved training procedures we might be able to train shallow models to be as accurate as deep models currently are. 2 Model compression The main idea behind model compression [3] is to train a compact model to approximate the function learned by a larger, more complex model. For example, it has been demonstrated that a single neural net of moderate size often can be trained to mimic a much larger complex ensemble containing thousands of models. The small neural net may contain 1000 times fewer parameters and execute a 1000 times faster than the ensemble, but often is just as accurate as the complex ensemble it is trained to mimic. Model compression works by passing unlabeled data through the large, accurate model to collect the scores predicted by that model. These scores capture the function learned by the complex model at the sampled points. This synthetically labeled data is then used to train the compression mimic model. Note that the mimic model is not trained on the original labels. Instead, it is trained to learn the function learned by the large, presumably very accurate model. If the compressed model learns to mimic the large model perfectly it will make exactly the same mistakes as the complex model. Surprisingly, usually it is not (yet) possible to train a small neural net on the original training data to be as accurate as the complex model, nor as accurate as the mimic neural net model. Model compression demonstrates that a small neural net could, in principle, learn the more accurate function, but with the current learning algorithms we are unable to train a model with that accuracy on the original training data; instead, we must train the complex ensemble first and then train the neural net to mimic it. Clearly, when it is possible to mimic the function learned by a complex model with a small net, the function learned by the complex model wasn t truly too complex to be learned by a small net. This suggests that the complexity of a learned model, and the size of the representation best used to learn that model with a specific learning algorithm, are two different things. In this extended abstract we apply this model compression method to train shallow neural nets to mimic deep neural nets, thereby demonstrating that deep neural nets may not need to be deep. 3 TIMIT dataset The TIMIT speech corpus has 462 speakers in the training set. There is a separate development set for cross-validation including 50 speakers, and a final test set with 24 speakers. The raw waveform audio data were pre-processed using 25ms Hamming window shifting by 10ms to extract Fouriertransform-based filter-banks with 40 coefficients (plus energy) distributed on a mel-scale, together with their first and second temporal derivatives. We included +/- 7 nearby frames to formulate the final 1845 dimension input vector. The data input features were normalised by subtracting the mean and dividing by the standard deviation on each dimension. All 61 phoneme labels are represented in tri-state, i.e., 3 states for each of the 61 phonemes, yielding target label vectors with 183 dimensions for training. At decoding time these are mapped to 39 classes as in [8] for scoring. 4 Deep learning on TIMIT Deep learning was first successfully applied to speech recognition in [9]. We follow the same framework and train two deep models on TIMIT, DNN and CNN. DNN is a deep neural net consisting of three fully-connected feedforward hidden layers consisting of 2000 rectified linear units (ReLU) [10] per layer. CNN is a deep neural net consisting of a convolutional layer and max-pooling layer followed by three hidden layers containing 2000 ReLU units [2]. We also formed an ensemble of several CNN models, ECNN. The accuracy of the DNN and CNN on the final test set are shown in Table 1. The error rate of the convolutional deep net (CNN) is about 2.1% better than the deep net (DNN). The table also shows the accuracy of a shallow neural net with 8000 hidden units (SNN) trained on the original training data. Despite having a similar number of parameters as the DNN, the shallow model is 2% less accurate than the DNN, and 4.1% less accurate than the CNN. 2

5 Training an SNN to mimic a deeper model We train the both compression mimic SNN models (SNN-MIMIC) in Table 1 using data labeled by an ensemble of deep nets. The deep models are trained in the usual way using softmax output and cross-entropy cost function. The shallow SNN-MIMIC, however, instead of being trained with cross-entropy on the 183 p values where p k = e z k / j ezj output by the softmax layer from the deep model, is trained directly on the 183 log probability values z before the softmax activation. Training on the log probability value makes learning easier for the shallow neural network by placing more emphasis on confident predictions so the shallow net will try to get data points with high confidence predictions correct first during learning. We formulate the SNN-MIMIC learning objective function as a regression problem given training data{(x (1),z (1) ),...,(x (T),z (T) ) }: L(W,β) = 1 g(x (t) ;W,β) z (t) 2 2T 2, (1) t where, W is the weight matrix between input features x and hidden layer, β is the weights from hidden to output units, g(x (t) ;W,β) = βf(wx (t) ) is the model prediction on the t th training data point and f( ) is the non-linear activation of the hidden units. The parameters W and β in shallow neural networks are updated using error back-propagation algorithm and stochastic gradient descent with momentum. 6 Speeding up learning by including a linear layer To match the number of parameters in a deep net, a shallow net has to have more non-linear hidden units in a single layer to produce a large weight matrix W. When training a large shallow neural network with many hidden units, we find it is very slow to learn the large number of parameters in the weight matrix between input and hidden layer of the size O(HD), where D is input feature dimension and H is the number of hidden units. Because there are many highly correlated parameters in this large weight matrix learning with gradient descent converges slowly. We also notice that during learning, shallow nets spend most of the computation in the costly matrix multiplication of the input data vectors and large weight matrix. The shallow nets eventually learn accurate mimic functions, but training to convergence is very slow (multiple weeks) even with a GPU. We found that introducing a bottleneck linear layer with k hidden units between the input and the non-linear hidden layer sped up learning dramatically: we can factorize the weight matrix W R H D into the product of two low rank matrices, U R H k andv R k D, where k << D,H. The new cost function can be written as: L(U,V,β) = 1 βf(uvx (t) ) z (t) 2 2 (2) 2T t The weights U and V can be learnt by back-propagating through the linear layer. This reparameterization of weight matrix W not only increases the convergence rate of the mimic shallow neural networks but also reduces the memory space from O(HD) to O(k(H + D)). Factorizing weight matrices has been previously explored in [11] and [13]. While these prior works focus on using matrix factorization as a post-processing technique to reduce computational cost at runtime, our method is applied during training to improve the convergence speed of the model. In addition, in the prior works, the linear layer is between the output and the last hidden layer, whereas in our method, the linear layer is between the input and the first hidden layer. The reduced memory usage enables us to train large shallow models that were previously infeasible due to excessive memory usage. Because the linear layer can always be absorbed into the weight matrixw, even after adding the linear layer, the model still has the same representational power as the normal shallow net before adding the linear layer. 7 Experimental results We trained shallow neural nets (SNN) and deep neural nets (DNN and CNN) using the cross-entropy cost function on the original 0/1 labels. In table 1 we show a comparison of these models with the 3

architecture # parameters Phone Error Rate SNN-8k 1845-8k-183 12Million 23.6% SNN-50k 1845-50k-183 100Million 23.1% SNN-400k 1845-400k-183 180Million with one linear layer of 250 linear units 23.0% DNN 3 2k hidden units 12Million 21.6% CNN conv. and pooling layer 13Million followed by 3 2k hidden units 19.5% SNN-MIMIC-8k 1845-8k-183 12Million one linear layer of 250 linear units 21.6% and one layer of 8k hidden units no convolutions or pooling layers SNN-MIMIC-400k 1845-400k-183 180Million one linear layer of 250 linear units 19.5% and one layer of 400k hidden units no convolution or pooling layers Table 1: Comparison of shallow and deep models: phone error rate on TIMIT core test set mimic shallow neural nets (SNN-MIMIC) trained using model compression technique. We used the same architecture for the convolutional neural net (CNN) as in [5]. An ensemble of CNN models are used to label the training data for the mimic SNNs. The log probability of the predicted values from the deep models are used as regression targets to train the mimic SNN. Unlabeled data is usually used for model compression, but we have no unlabeled data from the same distribution as the TIMIT data, so we are forced to use the same 1.1M points in the train set also as unlabeled data for compression by throwing away their labels. Using the same data used to train the complex models as the synthetic data set for training the mimic model usually does not work as well as an independent unlabeled set because the mimic samples fall on the same points where the complex model is most likely to have overfit. Moreover, model compression usually works best when the unlabeled data set is much larger than the original train set. Combined, these effects probably hurt the accuracy of the mimic model a little, and with more unlabeled data drawn from the correct distribution we believe the mimic models would have higher fidelity. 1 We also trained a large SNN with 400k non-linear hidden units after a linear layer with 250 linear units preliminary experiments suggest that for TIMIT there is little benefit from using more than 250 linear units. We observe that the performance gain from having more non-linear hidden units (400k) outweighs the small performance decrease due to shrinking the bottleneck linear layer to 250 units. 7.1 Discussion As expected, in Table 1, a DNN with three hidden layers performs significantly better on TIMIT than an SNN with one hidden layer, even when the number of hidden units in the SNN is increased so that the total number of parameters in the two models is the same. Also, as expected, a CNN that adds a convolutional and pooling layer to the DNN architecture further improves accuracy substantially. Surprisingly, however, shallow nets are able to perform as well as their deep counter-parts when trained with model compression to mimic these more accurate models. A neural net with one hidden layer (SNN-MIMIC-8k) can be trained to perform comparably to a DNN that has a similar number 1 The fact that SNN s can be trained to have accuracy comparable to DNNs and CNNs using only the data used to train the original DNN and CNN models further highlights that it should be possible to train accurate SNNs on the original train data if we had better learning algorithms for training shallow models. 4

of parameters. Furthermore, if we increase the number of hidden units in the shallow net from 8k to 400k (the largest we could train), we see that a neural net with one hidden layer (SNN-MIMIC- 400k) can be trained to perform comparably to a CNN even though the SNN-MIMIC-400k net has no convolutional or pooling layers. This is particularly surprising because it suggests that a large single hidden layer without a topology custom designed for the problem is able to reach the performance of a deep convolutional neural net that was carefully engineered with prior structure and weight sharing without any increase in the number of training examples if it has sufficient capacity. We also observe that regularization is less important when training the mimic nets than when training on the original data. Both SNN-MIMIC-8k and SNN-MIMIC-400k were trained without dropout or weight decay, but dropout is critical for training the deep models on the original training labels. 8 Conclusions We find that by using model compression, shallow neural nets can be trained to achieve performance that was previously achievable only by deep models. We evaluate our method on the TIMIT phoneme recognition task. Single-layer fully-connected feedforward nets trained to mimic deep models can perform similarly to well-engineered complex deep convolutional architectures. The results suggest that it may be possible to devise better learning algorithms for training more accurate shallow feed-forward nets than those currently in use. It is possible that the strength of deep learning arises as much from a good impedance match between deep architectures and current training procedures as from a requirement that net architectures be deep. References [1] Ossama Abdel-Hamid, Abdel-rahman Mohamed, Hui Jiang, and Gerald Penn. Applying convolutional neural networks concepts to hybrid nn-hmm model for speech recognition. In Acoustics, Speech and Signal Processing (ICASSP), 2012 IEEE International Conference on, pages 4277 4280. IEEE, 2012. [2] Ossama Abdel-Hamid, Li Deng, and Dong Yu. Exploring convolutional neural network structures and optimization techniques for speech recognition. Interspeech 2013, 2013. [3] Cristian Bucilu, Rich Caruana, and Alexandru Niculescu-Mizil. Model compression. In Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 535 541. ACM, 2006. [4] Yann N Dauphin and Yoshua Bengio. Big neural networks waste capacity. arxiv preprint arxiv:1301.3583, 2013. [5] Li Deng, Jinyu Li, Jui-Ting Huang, Kaisheng Yao, Dong Yu, Frank Seide, Michael Seltzer, Geoff Zweig, Xiaodong He, Jason Williams, et al. Recent advances in deep learning for speech research at microsoft. ICASSP 2013, 2013. [6] David Eigen, Jason Rolfe, Rob Fergus, and Yann LeCun. Understanding deep architectures using a recursive convolutional network. arxiv preprint arxiv:1312.1847, 2013. [7] Dumitru Erhan, Yoshua Bengio, Aaron Courville, Pierre-Antoine Manzagol, Pascal Vincent, and Samy Bengio. Why does unsupervised pre-training help deep learning? The Journal of Machine Learning Research, 11:625 660, 2010. [8] K-F Lee and H-W Hon. Speaker-independent phone recognition using hidden markov models. Acoustics, Speech and Signal Processing, IEEE Transactions on, 37(11):1641 1648, 1989. [9] Abdel-rahman Mohamed, George E Dahl, and Geoffrey Hinton. Acoustic modeling using deep belief networks. Audio, Speech, and Language Processing, IEEE Transactions on, 20(1): 14 22, 2012. [10] V. Nair and G.E. Hinton. Rectified linear units improve restricted boltzmann machines. In Proc. 27th International Conference on Machine Learning, pages 807 814. Omnipress Madison, WI, 2010. [11] Tara N Sainath, Brian Kingsbury, Vikas Sindhwani, Ebru Arisoy, and Bhuvana Ramabhadran. Low-rank matrix factorization for deep neural network training with high-dimensional output targets. In Acoustics, Speech and Signal Processing (ICASSP), 2013 IEEE International Conference on, pages 6655 6659. IEEE, 2013. 5

[12] Frank Seide, Gang Li, and Dong Yu. Conversational speech transcription using contextdependent deep neural networks. In Interspeech, pages 437 440, 2011. [13] Jian Xue, Jinyu Li, and Yifan Gong. Restructuring of deep neural network acoustic models with singular value decomposition. Proc. Interspeech, Lyon, France, 2013. 6