Transcription of Dropout improves Recurrent Neural Networks for …
1 Dropout improves Recurrent Neural Networks for handwriting recognition Vu Pham , Th eodore Bluche , Christopher Kermorvant , and J er ome Louradour . A2iA, 39 rue de la Bienfaisance, 75008 - Paris - France SUTD, 20 Dover Drive, Singapore LIMSI CNRS, Spoken Language Processing Group, Orsay, France Abstract Recurrent Neural Networks (RNNs) with Long Lately, an advance in designing RNNs was proposed, [ ] 10 Mar 2014. Short-Term memory cells currently hold the best known results namely Long Short-Term Memory (LSTM) cells. LSTM are in unconstrained handwriting recognition . We show that their carefully designed Recurrent neurons which gave superior per- performance can be greatly improved using Dropout - a recently formance in a wide range of sequence modeling problems. In proposed regularization method for deep architectures. While fact, RNNs enhanced by LSTM cells [8] won several important previous works showed that Dropout gave superior performance in the context of convolutional Networks , it had never been applied contests [9], [10], [11] and currently hold the best known to RNNs.
2 In our approach, Dropout is carefully used in the results in handwriting recognition . network so that it does not affect the Recurrent connections, hence Meanwhile, in the emerging deep learning movement, the power of RNNs in modeling sequences is preserved. Extensive Dropout was used to effectively prevent deep Neural Networks experiments on a broad range of handwritten databases confirm the effectiveness of Dropout on deep architectures even when the with lots of parameters from overfitting. It is shown to be network mainly consists of Recurrent and shared connections. effective with deep convolutional Networks [12], [13], [14], feed-forward Networks [15], [16], [17] but, to the best of Keywords Recurrent Neural Networks , Dropout , handwriting our knowledge, has never been applied to RNNs. Moreover, recognition Dropout was typically applied only at fully-connected layers [12], [18], even in convolutional Networks [13]. In this work, I. I NTRODUCTION we show that Dropout can also be used in RNNs at some certain Unconstrained offline handwriting recognition is the prob- layers which are not necessarily fully-connected.
3 The choice of lem of recognizing long sequences of text when only an applying Dropout is carefully made so that it does not affect the image of the text is available. The only constraint in such a Recurrent connections, therefore without reducing the ability of setting is that the text is written in a given language. Usually RNNs to model long sequences. a pre-processing module is used to extract image snippets, Due to the impressive performance of Dropout , some ex- each contains one single word or line, which are then fed tensions of this technique were proposed, including DropCon- into the recognizer. A handwriting recognizer, therefore, is nect [18], Maxout Networks [19], and an approximate approach in charge of recognizing one single line of text at a time. for fast training with Dropout [20]. In [18], a theoretical Generally, such a recognizer should be able to detect the generalization bound of Dropout was also derived. In this work, correlation between characters in the sequence, so it has more we only consider the original idea of Dropout [12].
4 Information about the local context and presumably provides better performance. Readers are referred to [1] for an extensive Section II presents the RNN architecture designed for review of handwriting recognition systems. handwriting recognition . Dropout is then adapted for this architecture as described in Section III. Experimental results Early works typically use a Hidden Markov Model (HMM). are given and analyzed in Section IV, while the last section is [2] or an HMM- Neural network hybrid system [3], [4] for dedicated for conclusions. the recognizer. However, the hidden states of HMMs follow a first-order Markov chain, hence they cannot handle long- term dependencies in sequences. Moreover, at each time step, II. R ECURRENT Neural Networks FOR H ANDWRITING. HMMs can only select one hidden state, hence an HMM recognition . with n hidden states can typically carry only log (n) bits of The recognition system considered in this work is depicted information about its dynamics [5].
5 In Fig. 1. The input image is divided into blocks of size Recurrent Neural Networks (RNNs) do not have such lim- 2 2 and fed into four LSTM layers which scan the input itations and were shown to be very effective in sequence in different directions indicated by corresponding arrows. The modeling. With their Recurrent connections, RNNs can, in output of each LSTM layer is separately fed into convolutional principle, store representations of past input events in form layers of 6 features with filter size 2 4. This convolutional of activations, allowing them to model long sequences with layer is applied without overlaping nor biases. It can be complex structures. RNNs are inherently deep in time and can seen as a subsampling step, with trainable weights rather have many layers, both make training parameters a difficult than a deterministic subsampling function. The activations of optimization problem. The burden of exploding and vanishing 4 convolutional layers are then summed element-wise and gradient was the reason for the lack of practical applications squashed by the hyperbolic tangent (tanh) function.
6 This of RNNs until recently [6], [7]. process is repeated twice with different filter sizes and numbers Dropout Dropout Dropout CTC. N-way softmax .. 2. 20 N. 2 6 N. 50 N. 20. 10. 6. 2. Input image MDLSTM Convolutional Sum & Tanh MDLSTM Convolutional Sum & Tanh MDLSTM Fully-connected Sum Collapse Block: 2 x 2 Features: 2 Input: 2x4 Features: 10 Input: 2x4 Features: 50 Features: N. Stride: 2x4 Stride: 2x4. Features: 6 Features: 20. Fig. 1. The Recurrent Neural network considered in this paper, with the places where Dropout can be applied. of features, and the top-most layer is fully-connected instead of convolutional. The final activations are summed vertically and fed into the softmax layer. The output of softmax is processed Dropout by Connectionist Temporal Classification (CTC) [21]. This architecture was proposed in [22], but we have adapted the filter sizes for input images at 300 dpi. There are two key components enabling this architecture to give superior performance: Multidirectional LSTM layers [23].
7 LSTM cells are Fig. 2. Dropout is only applied to feed-forward connections in RNNs. The Recurrent connections are kept untouched. This depicts one Recurrent layer carefully designed Recurrent neurons with multiplica- (hi ) with its inputs (xi ), and an output layer (yi ) which can comprise full or tive gates to store information over long periods and shared connections. The network is unrolled in 3 time steps to clearly show forget when needed. Four LSTM layers are applied in the Recurrent connections. parallel, each one with a particular scaning direction. In this way the network has the possibility to exploit all available context. We believe that random Dropout should not affect the Recurrent connections in order to conserve the ability of RNNs CTC is an elegant approach for computing the Nega- to model sequences. This idea is illustrated in Fig. 2, where tive Log-likelihood for sequences, so the whole ar- Dropout is applied only to feed-forward connections and not chitecture is trainable without having to explicitly to Recurrent connections.
8 With this construction, Dropout can align each input image with the corresponding target be seen as a way to combine high-level features learned sequence. by Recurrent layers. Practically, we implemeted Dropout as a separated layer whose output is identical to its input, except In fact, this architecture was featured in our winning entry at dropped locations (mj = 0). With this implementation, of the Arabic handwriting recognition competition OpenHaRT Dropout can be used at any stage in a deep architecture, 2013 [11], where such a RNN was used as the optical model in providing more flexibility in designing the network . the recognition system. In this paper, we further improve the performance of this optical model using Dropout as described Another appealing method similar to Dropout is DropCon- in the next section. nect [18], which drops the connections, instead of the hidden units values. However DropConnect was designed for fully- connected layers, where it makes sense to drop the entries III.
9 D ROPOUT FOR Recurrent Neural Networks of the weight matrix. In convolutional layers, however, the weights are shared, so there are only a few actual weights. Originally proposed in [12], Dropout involves randomly If DropConnect is applied at a convolutional layer with k removing some hidden units in a Neural network during weights, it can sample at most 2k different models during train- training but keeping all of them during testing. More formally, ing. In contrast, our approach drops the input of convolutional consider a layer with d units and let h be a d-dimensional layers. Since the number of inputs is typically much greater vector of their activations. When Dropout with probability p than the number of weights in convolutional layers, Dropout is applied at this layer, some activations in h are dropped: in our approach samples from a bigger pool of models, and htrain = m h, where is the element-wise product, and m presumably gives superior performance.
10 Is a binary mask vector of size d with each element drawn independently from mj Bernoulli (p). During testing, all In [24], Dropout is used to regularize a bi-directional RNN, units are retained but their activations are weighted by p: but the network has only one hidden layer, there are no htest = ph. Dropout involves a hyper-parameter p, for which LSTM cells involved, and there is no detail on how to apply a common value is p = Dropout to the RNN. In [14], Dropout is used in a convolutional Neural network but with a smaller Dropout rate because the Since there are 50 features at this layer, Dropout can sample typical value p = might slow down the convergence and from a great number of Networks . Moreover, since the inputs lead to higher error rate. In this paper, our architecture has of this layer have smaller sizes than those of lower layers due both covolutional layers and Recurrent layers. The network is to subsampling, Dropout at this layer will not take too much significantly deep, and we still find the typical Dropout rate time during training.