# Design and Investigation of Capsule Networks for Sentence Classification
## 4 Experiments, Results and Discussion
### Error Inspection  
In this section, we present the number of sentences predicted correctly or incorrectly by different models and sample sentences with their predictions. Table 5 shows the number of sentences that our CapsNet and the CNN models have classified correctly or incorrectly for the MR dataset. The results indicate that our CapsNet could classify some ambiguous sentences correctly which the CNN model failed to do. Out of 4265 test inputs, 3016 were classified correctly by both CapsNet and CNN models, and 308 sentences were classified incorrectly by both networks. Details are summarized in Table 5.  
In Table 6, we present sample sentences classified correctly by CapsNet but incorrectly by the CNN model. Also presented is the prediction result for the LSTM model for ease of comparison. The prediction confidence, or the maximum output value, is given with the predicted label for each model, where the _true_ label is the same as the CapsNet's prediction. For example, this sample sentence, \"a painfully funny ode to bad behavior\", has more negative words and the CNN model was fooled to classify it as negative. However, the CapsNet was somehow able to classify it as positive sentiment probably by learning the phrase \"painfully funny\" is in fact a positive one. Another example, the sentence \"a big, loud, bang the drum bore\" might be ambiguous for learning as most of the words in the sentence happen to have a positive sentiment. As a whole, this sentence is labeled _negative_. While the CapsNet was able to label it negative, CNN failed to do so. The predictions by the LSTM model agree with those of the CapsNet except for one, which indicates that the CapsNet can serve as a good substitute of sequential models like LSTM for text classification tasks. In Table 7, we present sample sentences for which the CapsNet was not able to classify correctly but CNN did. \begin{table}
\begin{tabular}{l l l l} \hline \hline \multicolumn{4}{c}{**Prediction Confidence**} \\ \hline
**CapsNet** & **LSTM** & **CNN** & \\ \hline
0.91555923 & 0.996865 & 0.9800223 & depicts the sorriest and most sordid of human behavior \\ (Negative) & (Negative) & (Positive) & on the screen, then laughs at how clever it’s being \\ \hline
0.84724176 & 0.5029957 & 0.99953365 & rarely, a movie is more than a movie go \\ (Positive) & (Positive) & (Negative) & \\ \hline
0.9158743 & 0.9931028 & 0.943629 & a sharp satire of desperation and cinematic deception \\ (Positive) & (Positive) & (Negative) & \\ \hline
0.9007900 & 0.9957867 & 0.8162323 & a painfully funny ode to bad behavior \\ (Positive) & (Negative) & (Negative) & \\ \hline
0.8918062 & 0.99717844 & 0.9997436 & pretty much sucks, but has a funny moment or two \\ (Negative) & (Negative) & (Positive) & \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Sample sentences correctly predicted by CapsNet and Incorrectly predicted by CNN. \begin{table}
\begin{tabular}{l l l} \hline \hline  & **Correct (CapsNet)** & **Incorrect (CapsNet)** \\ \hline Correct (CNN) & 3016 & 385 \\ Incorrect (CNN) & 556 & 308 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Prediction results of our CapsNet and CNN models on the MR dataset. From these example sentences, we note that once in a while the CapsNet model may not be able to produce better performance than the CNN model for a short sentence like _'a stuporously solemn film'_. For sentences which lack polarity information or use ironic expressions like _'there might be some sort of credible gender provoking philosophy submerged here, but who the hell cares? '_, the CapsNet model will have difficulties in getting correct predictions as other models also will. Sometimes, reviewers may give a high score with a somewhat cynical sentence review like _'though everything might be literate and smart, it never took off and always seemed static'_ which will lead to incorrect labeling and hence incorrect prediction. Note that the LSTM model has shown the same wrong prediction as the CapsNet model on the above sentences.