arxiv: v2 [cs.ne] 24 Sep 2016

Similar documents
Unsupervised Learning of Word Semantic Embedding using the Deep Structured Semantic Model

Python Machine Learning

System Implementation for SemEval-2017 Task 4 Subtask A Based on Interpolated Deep Neural Networks

Learning Structural Correspondences Across Different Linguistic Domains with Synchronous Neural Language Models

arxiv: v1 [cs.lg] 15 Jun 2015

Lecture 1: Machine Learning Basics

Deep Neural Network Language Models

HIERARCHICAL DEEP LEARNING ARCHITECTURE FOR 10K OBJECTS CLASSIFICATION

Second Exam: Natural Language Parsing with Neural Networks

CSL465/603 - Machine Learning

Module 12. Machine Learning. Version 2 CSE IIT, Kharagpur

A New Perspective on Combining GMM and DNN Frameworks for Speaker Adaptation

(Sub)Gradient Descent

arxiv: v2 [cs.ir] 22 Aug 2016

arxiv: v2 [cs.cl] 26 Mar 2015

arxiv: v1 [cs.cl] 20 Jul 2015

Attributed Social Network Embedding

Semi-supervised methods of text processing, and an application to medical concept extraction. Yacine Jernite Text-as-Data series September 17.

A Simple VQA Model with a Few Tricks and Image Features from Bottom-up Attention

QuickStroke: An Incremental On-line Chinese Handwriting Recognition System

A Deep Bag-of-Features Model for Music Auto-Tagging

Artificial Neural Networks written examination

Knowledge Transfer in Deep Convolutional Neural Nets

Assignment 1: Predicting Amazon Review Ratings

BUILDING CONTEXT-DEPENDENT DNN ACOUSTIC MODELS USING KULLBACK-LEIBLER DIVERGENCE-BASED STATE TYING

Deep search. Enhancing a search bar using machine learning. Ilgün Ilgün & Cedric Reichenbach

Calibration of Confidence Measures in Speech Recognition

arxiv: v4 [cs.cl] 28 Mar 2016

arxiv: v1 [cs.lg] 7 Apr 2015

Softprop: Softmax Neural Network Backpropagation Learning

Dual-Memory Deep Learning Architectures for Lifelong Learning of Everyday Human Behaviors

Semantic Segmentation with Histological Image Data: Cancer Cell vs. Stroma

Model Ensemble for Click Prediction in Bing Search Ads

OPTIMIZATINON OF TRAINING SETS FOR HEBBIAN-LEARNING- BASED CLASSIFIERS

LIM-LIG at SemEval-2017 Task1: Enhancing the Semantic Similarity for Arabic Sentences with Vectors Weighting

Probabilistic Latent Semantic Analysis

A deep architecture for non-projective dependency parsing

A Neural Network GUI Tested on Text-To-Phoneme Mapping

Introduction to Ensemble Learning Featuring Successes in the Netflix Prize Competition

Georgetown University at TREC 2017 Dynamic Domain Track

A Case Study: News Classification Based on Term Frequency

Generative models and adversarial training

Axiom 2013 Team Description Paper

CS Machine Learning

Modeling function word errors in DNN-HMM based LVCSR systems

Training a Neural Network to Answer 8th Grade Science Questions Steven Hewitt, An Ju, Katherine Stasaski

Human Emotion Recognition From Speech

A Review: Speech Recognition with Deep Learning Methods

ADVANCED MACHINE LEARNING WITH PYTHON BY JOHN HEARTY DOWNLOAD EBOOK : ADVANCED MACHINE LEARNING WITH PYTHON BY JOHN HEARTY PDF

Test Effort Estimation Using Neural Network

POS tagging of Chinese Buddhist texts using Recurrent Neural Networks

Autoregressive product of multi-frame predictions can improve the accuracy of hybrid models

Dropout improves Recurrent Neural Networks for Handwriting Recognition

Machine Learning from Garden Path Sentences: The Application of Computational Linguistics

Twitter Sentiment Classification on Sanders Data using Hybrid Approach

Semi-Supervised GMM and DNN Acoustic Model Training with Multi-system Combination and Confidence Re-calibration

AUTOMATIC DETECTION OF PROLONGED FRICATIVE PHONEMES WITH THE HIDDEN MARKOV MODELS APPROACH 1. INTRODUCTION

Learning From the Past with Experiment Databases

Course Outline. Course Grading. Where to go for help. Academic Integrity. EE-589 Introduction to Neural Networks NN 1 EE

Machine Learning and Data Mining. Ensembles of Learners. Prof. Alexander Ihler

Notes on The Sciences of the Artificial Adapted from a shorter document written for course (Deciding What to Design) 1

A Latent Semantic Model with Convolutional-Pooling Structure for Information Retrieval

University of Groningen. Systemen, planning, netwerken Bosman, Aart

Semantic and Context-aware Linguistic Model for Bias Detection

Robust Speech Recognition using DNN-HMM Acoustic Model Combining Noise-aware training with Spectral Subtraction

Framewise Phoneme Classification with Bidirectional LSTM and Other Neural Network Architectures

The 9 th International Scientific Conference elearning and software for Education Bucharest, April 25-26, / X

A study of speaker adaptation for DNN-based speech synthesis

Autoencoder and selectional preference Aki-Juhani Kyröläinen, Juhani Luotolahti, Filip Ginter

On the Combined Behavior of Autonomous Resource Management Agents

arxiv: v1 [cs.cl] 2 Apr 2017

PREDICTING SPEECH RECOGNITION CONFIDENCE USING DEEP LEARNING WITH WORD IDENTITY AND SCORE FEATURES

Predicting Student Attrition in MOOCs using Sentiment Analysis and Neural Networks

Rule Learning With Negation: Issues Regarding Effectiveness

INPE São José dos Campos

Modeling function word errors in DNN-HMM based LVCSR systems

The Good Judgment Project: A large scale test of different methods of combining expert predictions

Taxonomy-Regularized Semantic Deep Convolutional Neural Networks

Exploration. CS : Deep Reinforcement Learning Sergey Levine

Learning Methods for Fuzzy Systems

Speech Recognition at ICSI: Broadcast News and beyond

Word Segmentation of Off-line Handwritten Documents

arxiv:submit/ [cs.cv] 2 Aug 2017

arxiv: v2 [cs.ro] 3 Mar 2017

Evolutive Neural Net Fuzzy Filtering: Basic Description

ISFA2008U_120 A SCHEDULING REINFORCEMENT LEARNING ALGORITHM

Deep Facial Action Unit Recognition from Partially Labeled Data

Topic Modelling with Word Embeddings

Distributed Learning of Multilingual DNN Feature Extractors using GPUs

Analysis of Hybrid Soft and Hard Computing Techniques for Forex Monitoring Systems

TRANSFER LEARNING OF WEAKLY LABELLED AUDIO. Aleksandr Diment, Tuomas Virtanen

Residual Stacking of RNNs for Neural Machine Translation

arxiv: v2 [cs.cv] 30 Mar 2017

Improvements to the Pruning Behavior of DNN Acoustic Models

Probability and Statistics Curriculum Pacing Guide

arxiv: v1 [cs.cv] 10 May 2017

TRANSFER LEARNING IN MIR: SHARING LEARNED LATENT REPRESENTATIONS FOR MUSIC AUDIO CLASSIFICATION AND SIMILARITY

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Indian Institute of Technology, Kanpur

arxiv: v1 [cs.cl] 27 Apr 2016

Transcription:

Making Sense of Hidden Layer Information in Deep Networks by Learning Hierarchical Targets arxiv:1505.00384v2 [cs.ne] 24 Sep 2016 Abhinav Tushar Department of Electrical Engineering Indian Institute of Technology, Roorkee abhinav.tushar.vs@gmail.com Abstract This paper proposes an architecture for deep neural networks with hidden layer branches that learn targets of lower hierarchy than final layer targets. The branches provide a channel for enforcing useful information in hidden layer which helps in attaining better accuracy, both for the final layer and hidden layers. The shared layers modify their weights using the gradients of all cost functions higher than the branching layer. This model provides a flexible inference system with many levels of targets which is modular and can be used efficiently in situations requiring different levels of results according to complexity. This paper applies the idea to a text classification task on 20 Newsgroups data set with two level of hierarchical targets and a comparison is made with training without the use of hidden layer branches. Author s Note September, 2016 This document essentially was (May 2015) a hasty write up of a project for a course on artificial neural networks during my undergraduate studies. I am adding this note here to point out mistakes which are detrimental to writings. I have kept the original content intact, adding only this box. Firstly, the document doesn t really use the terms (information, deep networks) from the title well in the analysis. Talking about the idea itself, there is a similar concept of auxiliary classifier in literature which uses [same] targets at lower levels to improve performance (See arxiv:1409.4842v1 [cs.cv] for example). -1 to literature review. Furthermore, the comparison is not rigorous enough to back up the claims and needs more meaningful test. 1

1 Introduction Deep neural networks aim at learning multiple level of features by using larger number of hidden layers as compared to shallow networks. Using many layers, higher order features can be automatically learned without the need of any domain specific feature engineering. This makes them more generalized inference systems. They are effective at learning features from raw data which would have required much efforts to pre process in case of shallow networks, for example, a recent work (Zhang and LeCun 2015) demonstrated deep temporal convolutional networks to learn abstract text concepts from character level inputs. However, having multiple layers, deep networks are not easy to train. Few of the problems are, getting stuck in local optima, problem of vanishing gradients etc. If the hyperparameters of networks are not engineered properly, deep networks also tend to overfit. The choice of activation functions (Glorot and Bengio 2010) as well as proper initialization of weights (Sutskever et al. 2013) plays important role in the performance of deep networks. Several methods have been proposed to improve the performance of deep networks. Layer by layer training of Deep Belief Networks (Hinton et al. 2006) uses unsupervised pre-training of the component Restricted Boltzmann Machines (RBMs) and further supervised fine tuning of the whole network. Similar models have been presented (Bengio and Lamblin 2007; Ranzato et al. 2007) that pre-train the network layer by layer and then fine tune using supervised techniques. Unsupervised pre-training is shown to effectively works as a regularizer (Erhan et al. 2009; Erhan, Courville, and Vincent 2010) and increase the performance as compared to network with randomly initialized weights. This paper explores the idea of training a deep network to learn hierarchical targets in which lower level targets are learned from taps in lower hidden layers, while the highest level of target (which has highest details) is kept at the final layer of the network. The hypothesis is that this architecture should learn meaningful representation in hidden layers too, because of the branchings. This can be helpful since the same model can be used as an efficient inference system for any level of target, depending on the requirement. Also, the meaningful information content of hidden layer activations can be helpful in improving the overall performance of the network. The following section presents the proposed deep network with hidden layer branchings. Section 3 provides the experimental results on 20 Newsgroups data set 1 along with the details of the network used in the experiment. Section 4 contains the concluding remarks and scope of future work is given in Section 5. 2 Proposed Network Architecture In the proposed network, apart from the final target layer, one (or more) target layer are branched from the hidden layers. A simple structure with one 1 The dataset can be downloaded here qwone.com/~jason/20newsgroups/ 2

branching is shown in Figure 1. The target layers are arranged in a hierarchical fashion with the most detailed targets being farthest form the input, while trivial targets closer to the input layer. The network will learn both the final layer outputs as well as hidden layer outputs. The following sub section explains the learning algorithm using the example network in Figure 1. Figure 1: Branched Network Structure 2.1 Learning Algorithm The network learns using Stochastic Gradient Descent. There are two costs to minimize, the first being that of final target and second of hidden target. For the network shown in the Figure 1, the network has a branch from the layer whose output is x B. Weights and biases from W B+1, b B+1 to W N+2, b N+2 are updated using the final target layer cost function only, while W H and b H are updated using only the hidden layer cost function. W i W i η C W i (1) b i b i η C b i (2) Here, C is the hidden or final target cost function, depending on which weights are to be minimized. For the weights that are shared for both targets, i.e. weights and biases from W 1, b 1 to W B, b B, the training uses both cost 3

function and an averaged update is done for these parameters. If final target cost is C F and hidden target cost is C H, then the updates are: ( W i W i η α C F ( b i b i η α C F b i + (1 α) C ) H W i W i + (1 α) C H b i ) (3) (4) A value of α = 0.5 gives equal weights to both gradients. This value will be used in the experiment in this paper. 2.2 Features of the network Performance Representation of meaningful data in hidden layers governed by the hidden layer branchings helps by providing features for higher layers and thus improves the overall performance of the network. Hierarchical targets Different target branches, arranged in hierarchy of details, help in problems demanding scalability in level of details of targets. Modularity The hidden layer targets lead to storage of meaningful content in hidden layers and thus, the network can be separated (recombined) from (with) the branch joints without loss of the learned knowledge. 3 Experimental Results Hidden layer taps can be exploited only if the problem has multiple and hierarchical targets. It can also work when it is possible to degrade the resolution (or any other parameter related to details) of output to create hidden layer outputs. This section explores the performance of the proposed model on 20 Newsgroups dataset. 3.1 Data set The data set has newsgroup posts from 20 newsgroups, thus resulting in a 20 class classification problem. According to the newsgroup topics, the 20 classes were partitioned in 5 primitive classes (details are in Table 1). The final layer of the network is made to learn the 20 class targets, while the hidden layer branching is made to learn the cruder, 5 class targets. The dataset has 18846 instances. Out of these, 14314 were selected for training, while the other 4532 instances were kept for testing. 4

Primitive class Final class Newsgroup topic 1 2 3 4 5 1 comp.graphics 2 comp.os.ms-windows.misc 3 comp.sys.ibm.pc.hardware 4 comp.sys.mac.hardware 5 comp.windows.x 6 rec.autos 7 rec.motorcycles 8 rec.sport.baseball 9 rec.sport.hockey 10 sci.crypt 11 sci.electronics 12 sci.med 13 sci.space 14 talk.politics.guns 15 talk.politics.mideast 16 talk.politics.misc 17 talk.religion.misc 18 alt.atheism 19 misc.forsale 20 soc.religion.christian Table 1: Classes in data set. Primitive classes are used for training hidden layer branches, while Final classes are used for training final layer 3.2 Word2Vec preprocessing For representing text, a simple and popular model can be made using Bag of Words (BoW). In this, a vocabulary of words is built from the corpus, and each paragraph (or instance) is represented by a histogram of frequency of occurrence of words from the vocabulary. Although being intuitive and simple, this representation has a major disadvantage while working with neural networks. The vocabulary length is usually very large, of the order of tens of thousands, while each chunk of text in consideration has only few of the possible words, which results in a very sparse representation. Such sparse input representation can lead to poor learning and high inefficiency in neural networks. A new tool, Word2Vec 2 is used to represent words as dense vectors. Word2Vec is a tool for computing continuous distributed representation of 2 Python adaptation here https://radimrehurek.com/gensim/models/word2vec.html (Řehůřek 2013) 5

words. It uses Continuous Bag of Words and Skip-gram methods to learn vector representations of words using a corpus (Mikolov et al. 2013b; Mikolov et al. 2013a). The representations provided by Word2Vec group similar words closer in latent space. These vectors have properties like (Mikolov, Yih, and Zweig 2013): v( king ) v( man ) + v( woman ) v( queen ) Here, v( word ) represents the vector of word. For the problem in hand, a Word2Vec model with 1000 dimensional vector output was trained using the entire dataset (removing English language stop words). For making a vector for representing each newsgroup post, all the words vectors in the post were averaged. 3.3 Network Architecture The network used had 4 hidden layers. The number of neurons in the layers were: 1000(input) 300 200 200 130 20(target) 5(hiddentarget) From hidden layer 1 (with 300 neurons), a branch was created to learn hidden target. The weights and biases are: W N, b N for connections from layer N 1 to layer N. W H, b H for connections from hidden layer tap to hidden target. Rectified Linear Units (ReLUs) were chosen as the activation functions of neurons since they have less likelihood of vanishing gradient (Nair and Hinton 2010). ReLU activation function is given by: f(x) = max(x, 0) (5) The output layers (both final and hidden branch) used softmax logistic regression while the cost function was log multinomial loss. For hidden output cost function, L2 regularization was also added for weights of hidden layer 1. The training was performed using simple stochastic gradient descent using the algorithm explained in Section 2.1 with mini batch size of 256 and momentum value of 0.9. Since, the aim is comparison, no attempts were made to achieve higher than the state-of-the-art accuracies. The network was implemented using the Python library for Deep Neural Networks, kayak 3. 3 Harvard Intelligent Probabilistic Systems (HIPS), https://github.com/hips/kayak 6

3.4 Performance Three training experiments were performed, as elaborated below: 1. With simultaneous updates for the shared layers (100 epochs) + fine tuning (20 epochs) 2. Without simultaneous updates for shared layer by ignoring gradients coming from hidden layer target (100 epochs) + fine tuning (20 epochs) 3. Training only using the hidden layer target (100 epochs) + fine tuning (20 epochs) The fine tuning step only updates the hidden tap to hidden target weights and biases, W H, b H. This was performed to see the state of the losses of the network with respect to the hidden layer targets. All the three training experiments were performed with the same set of hyper-parameters and were repeated 20 times to account for the random variations. Values of mean training losses throughout the course of training were plotted using all 20 repetitions. The plot of training losses for final layer target in experiment 1 and 2 is shown in Figure 2. From the plot, simultaneous training is seemingly performing better than direct training involving only target cost function minimization. Figure 2: Mean final target losses during training. standard deviation. Errorbars represent one Plot of training losses for hidden layer target in all three experiments is given in Figure 3. Here, training with only minimization of final cost is not able to generate enough effective representation of data to help in minimization of 7

hidden cost function, while simultaneous training and training involving only hidden cost minimization are giving almost similar performance. The situation is clearer in Figure 4, which is plot of losses for hidden target during the fine tuning process for all the three experiments. As this graph shows, training only with final target cost in consideration is not able minimize loss well as compared to other two methods. Also, curve of simultaneous training starts with lesser loss than curve of training with hidden cost only. This depicts better updates of weights in simultaneous training as compared to training with only hidden cost. Figure 3: Mean hidden target losses during training. Errorbars represent one standard deviation. Figure 5 and 6 show box plots of the accuracies over the 20 repeated experiments for hidden and final targets. Table 2 shows the mean classification accuracy on final and hidden target for both training and testing set. As clear from the table and box plots, the simultaneous training is providing better performance than other training methods. 4 Conclusion This paper presented a branching architecture for neural networks that, when applied to appropriate problem with multiple level of outputs, inherently cause the hidden layers to store meaningful representations and helps in improving performance. The training curves showed that during simultaneous training, the shared layers were learning a representation that minimized both cost functions as well as had better weights for hidden targets. 8

Figure 4: Mean hidden target losses during fine tuning. Errorbars represent one standard deviation. Figure 5: Boxplots for final target accuracies Figure 6: Boxplots for hidden target accuracies The branches helps in enforcing information in hidden layers and thus the auxiliary branches can be added or removed easily from the network, this provides flexibility in terms of modularity and scalability of network. 9

Hidden Target Accuracy Train (%) Test (%) Hidden Training 85.320316 (1.523254) 82.822154 (0.417403) Final Training 70.205044 (4.088195) 77.763680 (1.602464) Simultaneous Training 84.051977 (1.182006) 83.052736 (0.356259) Final Target Accuracy Train (%) Test (%) Hidden Training 4.998253 (1.453776) 5.015446 (1.446461) Final Training 74.332472 (2.295639) 69.088703 (1.325522) Simultaneous Training 76.824787 (1.792208) 69.205649 (1.183573) Table 2: Mean accuracies for the experiments. The values in parentheses are standard deviations. 5 Future Work This key concept in the proposed architecture is to exploit the hidden layers by meaningful representations. Using a hierarchy of target, the proposed architecture can form meaningful hidden representations. An extended experiment can be done with many branches. Convolutional networks working on computer vision problems are ideal candidates for these tests, as it is easy to visualize the weights to find connections with the desired representations. Also, vision problems can be broken in many level of details and thus a hierarchy of outputs can be generated from single output layer. Whereas this paper focused on a problem involving branches from the hidden layers, an exploration can be done in which few hidden neurons directly represent the hidden targets without any branching. Further, work can be done for construction of multiple level of outputs from single output. This can be useful for computer vision problems, where different level of outputs can be practically useful. References Bengio, Yoshua and Pascal Lamblin (2007). Greedy layer-wise training of deep networks. In: Advances in neural... 1, pp. 153 160. issn: 01628828. Erhan, Dumitru, Aaron Courville, and Pascal Vincent (2010). Why Does Unsupervised Pre-training Help Deep Learning? In: Journal of Machine Learning Research 11, pp. 625 660. issn: 15324435. Erhan, Dumitru et al. (2009). The difficulty of training deep architectures and the effect of unsupervised pre-training. In: International Conference on Artificial Intelligence and Statistics, pp. 153 160. issn: 15324435. 10

Glorot, Xavier and Yoshua Bengio (2010). Understanding the difficulty of training deep feedforward neural networks. In: Proceedings of the 13th International Conference on Artificial Intelligence and Statistics (AISTATS). Vol. 9, pp. 249 256. Hinton, Geoffrey E. et al. (2006). A fast learning algorithm for deep belief nets. In: Neural computation 18.7, pp. 1527 54. issn: 0899-7667. Mikolov, Tomas, Wen-tau Yih, and Geoffrey Zweig (2013). Linguistic regularities in continuous space word representations. In: Proceedings of NAACL- HLT June, pp. 746 751. Mikolov, Tomas et al. (2013a). Distributed Representations of Words and Phrases and their Compositionality. In: NIPS, pp. 1 9. eprint: 1310.4546. Mikolov, Tomas et al. (2013b). Efficient Estimation of Word Representations in Vector Space. In: Proceedings of the International Conference on Learning Representations (ICLR 2013), pp. 1 12. Nair, Vinod and Geoffrey E Hinton (2010). Rectified Linear Units Improve Restricted Boltzmann Machines. In: Proceedings of the 27th International Conference on Machine Learning 3, pp. 807 814. Ranzato, Marc Aurelio et al. (2007). Efficient Learning of Sparse Representations with an Energy-Based Model. In: Advances In Neural Information Processing Systems 19, pp. 1137 1134. issn: 10495258. Sutskever, Ilya et al. (2013). On the importance of initialization and momentum in deep learning. In: JMLR W&CP 28, pp. 1139 1147. Řehůřek, Radim (2013). Optimizing word2vec in gensim. url: http://radimrehurek. com/2013/09/word2vec-in-python-part-two-optimizing/. Zhang, Xiang and Yann LeCun (Feb. 2015). Text Understanding from Scratch. In: eprint: 1502.01710. 11