Sequential Short-Text Classification with Recurrent and Convolutional Neural Networks

Recent approaches based on artificial neural networks (ANNs) have shown promising results for short-text classification. However, many short texts occur in sequences (e.g., sentences in a document or utterances in a dialog), and most existing ANN-based systems do not leverage the preceding short texts when classifying a subsequent one. In this work, we present a model based on recurrent neural networks and convolutional neural networks that incorporates the preceding short texts. Our model achieves state-of-the-art results on three different datasets for dialog act prediction.


Introduction
Short-text classification is an important task in many areas of natural language processing, including sentiment analysis, question answering, or dialog management.Many different approaches have been developed for short-text classification, such as using Support Vector Machines (SVMs) with rule-based features (Silva et al., 2011), combining SVMs with naive Bayes (Wang and Manning, 2012), and building dependency trees with Conditional Random Fields (Nakagawa et al., 2010).Several recent studies using ANNs have shown promising results, including convolutional neural networks (CNNs) (Kim, 2014;Blunsom et al., 2014;Kalchbrenner et al., 2014) and recursive neural networks (Socher et al., 2012).
Most ANN systems classify short texts in isolation, i.e., without considering preceding short texts.* These authors contributed equally to this work.
However, short texts usually appear in sequence (e.g., sentences in a document or utterances in a dialog), therefore using information from preceding short texts may improve the classification accuracy.Previous works on sequential short-text classification are mostly based on non-ANN approaches, such as Hidden Markov Models (HMMs) (Reithinger and Klesen, 1997), (Stolcke et al., 2000), maximum entropy (Ang et al., 2005), and naive Bayes (Lendvai and Geertzen, 2007).
Inspired by the performance of ANN-based systems for non-sequential short-text classification, we introduce a model based on recurrent neural networks (RNNs) and CNNs for sequential short-text classification, and evaluate it on the dialog act classification task.A dialog act characterizes an utterance in a dialog based on a combination of pragmatic, semantic, and syntactic criteria.Its accurate detection is useful for a range of applications, from speech recognition to automatic summarization (Stolcke et al., 2000).Our model achieves state-of-the-art results on three different datasets.

Model
Our model comprises two parts.The first part generates a vector representation for each short text using either the RNN or CNN architecture, as discussed in Section 2.1 and Figure 1.The second part classifies the current short text based on the vector representations of the current as well as a few preceding short texts, as presented in Section 2.2 and Figure 2.
We denote scalars with italic lowercases (e.g., k, b f ), vectors with bold lowercases (e.g., s, x i ), and matrices with italic uppercases (e.g., W f ).We Figure 2: Four instances of the two-layer feedforward ANN used for predicting the probability distribution over the classes zi for the i th short-text Xi.S2V stands for short text to vector, which is the RNN/CNN architecture that generates si from Xi. From left to right, the history sizes (d1, d2) are (0, 0), (2, 0), (0, 2) and (1, 1).(0, 0) corresponds to the non-sequential classification case.use the colon notation v i:j to denote the sequence of vectors (v i , v i+1 , . . ., v j ).

Short-text representation
A given short text of length is represented as the sequence of m-dimensional word vectors x 1: , which is used by the RNN or CNN model to produce the n-dimensional short-text representation s.

RNN-based short-text representation
We use a variant of RNN called Long Short Term Memory (LSTM) (Hochreiter and Schmidhuber, 1997).For the t th word in the short-text, an LSTM takes as input x t , h t−1 , c t−1 and produces h t , c t based on the following formulas: where W j ∈ R n×m , U j ∈ R n×n are weight matrices and b j ∈ R n are bias vectors, for j ∈ {i, f, c, o}.
In the pooling layer, the sequence of vectors h 1: output from the RNN layer are combined into a single vector s ∈ R n that represents the short-text, using one of the following mechanisms: last, mean, and max pooling.Last pooling takes the last vector, i.e., s = h , mean pooling averages all vectors, i.e., s = 1 t=1 h t , and max pooling takes the elementwise maximum of h 1: .

CNN-based short-text representation
Using a filter W f ∈ R h×m of height h, a convolution operation on h consecutive word vectors starting from t th word outputs the scalar feature where X t:t+h−1 ∈ R h×m is the matrix whose i th row is x i ∈ R m , and b f ∈ R is a bias.The symbol • refers to the dot product and ReLU(•) is the elementwise rectified linear unit function.
We perform convolution operations with n different filters, and denote the resulting features as c t ∈ R n , each of whose dimensions comes from a distinct filter.Repeating the convolution operations for each window of h consecutive words in the shorttext, we obtain c 1: −h+1 .The short-text representation s ∈ R n is computed in the max pooling layer, as the element-wise maximum of c 1: −h+1 .

Sequential short-text classification
Let s i be the n-dimensional short-text representation given by the RNN or CNN architecture for the i th short text in the sequence.The sequence s i−d 1 −d 2 : i is fed into a two-layer feedforward ANN that predicts the class for the i th short text.The hyperparameters d 1 , d 2 are the history sizes used in the first and second layers, respectively.
The first layer takes as input s i−d 1 −d 2 : i and outputs the sequence y i−d 2 : i defined as where W 0 , W −1 , W −2 ∈ R k×n are the weight matrices, b 1 ∈ R k is the bias vector, y j ∈ R k is the class representation, and k is the number of classes for the classification task.
Similarly, the second layer takes as input the sequence of class representations y i−d 2 :i and outputs z i ∈ R k : where U 0 , U −1 , U −2 ∈ R k×k and b 2 ∈ R k are the weight matrices and bias vector.
The final output z i represents the probability distribution over the set of k classes for the i th shorttext: the j th element of z i corresponds to the probability that the i th short-text belongs to the j th class.
3 Datasets and Experimental Setup

Datasets
We evaluate our model on the dialog act classification task using the following datasets: • DSTC 4: Dialog State Tracking Challenge 4 (Kim et al., 2015;Kim et al., 2016)

Training
The model is trained to minimize the negative loglikelihood of predicting the correct dialog acts of the utterances in the train set, using stochastic gradient descent with the Adadelta update rule (Zeiler, 2012).
At each gradient descent step, weight matrices, bias vectors, and word vectors are updated.For regularization, dropout is applied after the pooling layer, and early stopping is used on the validation set with a patience of 10 epochs.

Results and Discussion
To find effective hyperparameters, we varied one hyperparameter at a time while keeping the other ones fixed.We initialized the word vectors with the 300dimensional word vectors pretrained with word2vec on Google News (Mikolov et al., 2013a;Mikolov et al., 2013b) for DSTC 4, and the 200-dimensional 1 All train/validation/test splits can be found at https:// github.com/Franck-Dernoncourt/naacl2016Table 3: Accuracy (%) on different architectures and history sizes d1, d2.For each setting, we report average (minimum, maximum) computed on 5 runs.Sequential classification (d1 + d2 > 0) outperforms non-sequential classification (d1 = d2 = 0).Overall, the CNN model outperformed the LSTM model for all datasets, albeit by a small margin except for SwDA.We also tried a variant of the LSTM model, gated recurrent units (Cho et al., 2014), but the results were generally lower than LSTM.
The effects of the history sizes d 1 and d 2 for the short-text and the class representations, respectively, are presented in Table 3 for both the LSTM and CNN models.In both models, increasing d 1 while keeping d 2 = 0 improved the performances by 1.3-4.2percentage points.Conversely, increasing d 2 while keeping d 1 = 0 yielded better results, but the performance increase was less pronounced: incorporating sequential information at the short-text representation level was more effective than at the class representation level.
Using sequential information at both the shorttext representation level and the class representation level does not help in most cases and may even lower the performances.We hypothesize that shorttext representations contain richer and more general information than class representations due to their larger dimension.Class representations may not convey any additional information over shorttext representations, and are more likely to propagate errors from previous misclassifications.(Dernoncourt et al., 2016).Graphical model: (Ji and Bilmes, 2006).Naive Bayes: (Lendvai and Geertzen, 2007).HMM: (Stolcke et al., 2000).Memory-based Learning: (Rotaru, 2002).All five models use features derived from transcribed words, as well as previous predicted dialog acts except for Naive Bayes.The interlabeler agreement could be obtained only for SwDA.For the CNN and LSTM models, the presented results are the test set accuracy of the run with the highest accuracy on the validation set.

Conclusion
In this article we have presented an ANN-based approach to sequential short-text classification.We demonstrate that adding sequential information improves the quality of the predictions, and the performance depends on what sequential information is used in the model.Our model achieves state-of-theart results on three different datasets for dialog act prediction.

Figure 1 :
Figure 1: RNN (left) and CNN (right) architectures for generating the vector representation s of a short text x 1: .For CNN, Conv refers to convolution operations, and the filter height h = 3 is used in this figure.

Table 1 :
MRDA, we use the train/validation/test splits provided with the datasets.For DSTC 4 and SwDA, only the train/test splits are provided. 1Table 1 presents statistics on the datasets.Dataset overview.|C| is the number of classes, |V | the vocabulary size.For the train, validation and test sets, we indicate the number of dialogs (i.e., sequences) followed by the number of utterances (i.e., short texts) in parenthesis.

Table 2 :
Table 2 presents our hyperparameter choices.Experiments ranges and choices of hyperparameters.

Table 4 :
Table4compares our results with the state-of-theart.Overall, our model shows competitive results, while requiring no human-engineered features.Rigorous comparisons are challenging to draw, as many important details such as text preprocessing and train/valid/test split may vary, and many studies fail to perform several runs despite the randomness in some parts of the training process, such as weight initialization.Accuracy (%) of our models and other methods from the literature.The majority class model predicts the most frequent class.SVM: