In Natural Language Processing or text related community, effective representation of textual sequences is the fundamental topic for the up-stream tasks. Traditionally, bag-of-word models (TFIDF or language model) with vocabulary-aware vector space tends to be the main-stream approach, especially in the task with long text (e.g. ad hoc retrieval with long document, text classification for long sentence). However, it tends to get pool performance in the tasks with short-text sentence (text classification for relatively short sentence, Question answering, machine comprehension and dialogue system), which there are little word-level overlaps in bag-of-word vector space. Distributed representation(Le and Mikolov, 2014) in a fixed low-dimensional space trained from large-scale corpus have been proposed to enhance the features of text, then break through the performance bottleneck of bag-of-words models in short-text tasks. With combination of Conventional Neural Network (CNN) (Kalchbrenner et al., 2014)
, Recurrent Neural Network (RNN), Recursive Neural Network(Socher et al., 2013) and Attention, hundreds of models had been proposed to model text for further classification, matching (Fan et al., 2017) or other tasks.
However, these models are tested in different settings with various datasets, preprocessing and even evaluation. Since subtle differences may lead to large divergence in final performance. It is essential to get a robust comparison and tested in rigid significance test. Moreover, models with both effective and efficient performance is impossible due to the No-Free-Lunch principle. Thus each model should be considered in a trade off between its effectiveness and efficiency.
Out contribution is
A new open-source benchmark of text classification 111 Code in https://github.com/wabyking/TextClassificationBenchmark with more than 20 models and 10 datasets.
Systemic reconsideration of text classification in a trade off.
Models are shown as follow:
Fastext(Joulin et al., 2016). Sum with all the input embedding.
LSTM. Basic LSTM (Hochreiter and Schmidhuber, 1997) over the input embedding sequence.
BiLSTM. LSTM with forward and backward direction.
StackLSTM. LSTM with multi layers.
Basic CNN. Convolution over the input embedding (Kalchbrenner et al., 2014).
Multi-layer CNN. CNN with multi layers for high-level modelling.
CNN with Inception. CNN with Inception mechanism (Szegedy et al., 2015).
Capsules. CNN with Capsules Networks (Sabour et al., 2017) .
RCNN (Lai et al., 2015). LSTM with pooling mechanism.
CRNN (Zhou et al., 2015). CNN After LSTM .
There are many datasets as showed in Tab. 1
|20Newsgroups 222 in qwone.com/jason/20Newsgroups/|
We adopt the Precision as the final evaluation metrics, which is widely used in the classification task.
As claimed in the introduction, A benchmark for text classification have been proposed to systemically compare these state-of-art models. Performance, Significance test, Effectiveness-efficiency Discussion, Case study, comparison between RNN and CNN, Embedding sensitive needs to be done.
- Fan et al. (2017) Yixing Fan, Liang Pang, JianPeng Hou, Jiafeng Guo, Yanyan Lan, and Xueqi Cheng. 2017. Matchzoo: A toolkit for deep text matching. arXiv preprint arXiv:1707.07270 .
- Hochreiter and Schmidhuber (1997) Sepp Hochreiter and Jürgen Schmidhuber. 1997. Long short-term memory. Neural computation 9(8):1735–1780.
- Joulin et al. (2016) Armand Joulin, Edouard Grave, Piotr Bojanowski, and Tomas Mikolov. 2016. Bag of tricks for efficient text classification. arXiv preprint arXiv:1607.01759 .
- Kalchbrenner et al. (2014) Nal Kalchbrenner, Edward Grefenstette, and Phil Blunsom. 2014. A convolutional neural network for modelling sentences. arXiv preprint arXiv:1404.2188 .
Lai et al. (2015)
Siwei Lai, Liheng Xu, Kang Liu, and Jun Zhao. 2015.
Recurrent convolutional neural networks for text classification.In AAAI. volume 333, pages 2267–2273.
Le and Mikolov (2014)
Quoc Le and Tomas Mikolov. 2014.
Distributed representations of sentences and documents.
International Conference on Machine Learning. pages 1188–1196.
- Niu et al. (2017) Xiaolei Niu, Yuexian Hou, and Panpan Wang. 2017. Bi-directional lstm with quantum attention mechanism for sentence modeling. In International Conference on Neural Information Processing. Springer, pages 178–188.
- Sabour et al. (2017) Sara Sabour, Nicholas Frosst, and Geoffrey E Hinton. 2017. Dynamic routing between capsules. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems 30, Curran Associates, Inc., pages 3859–3869. http://papers.nips.cc/paper/6975-dynamic-routing-between-capsules.pdf.
- Severyn and Moschitti (2015) Aliaksei Severyn and Alessandro Moschitti. 2015. Learning to rank short text pairs with convolutional deep neural networks. In Proceedings of the 38th International ACM SIGIR Conference on Research and Development in Information Retrieval. ACM, pages 373–382.
- Socher et al. (2013) Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing. pages 1631–1642.
- Szegedy et al. (2015) Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, Andrew Rabinovich, et al. 2015. Going deeper with convolutions. Cvpr.
- Zhang et al. (2018) Peng Zhang, Jiabin Niu, Zhan Su, Benyou Wang, Liqun Ma, and Dawei Song. 2018. End-to-end quantum-like language models with application to question answering .
- Zhou et al. (2015) Chunting Zhou, Chonglin Sun, Zhiyuan Liu, and Francis Lau. 2015. A c-lstm neural network for text classification. arXiv preprint arXiv:1511.08630 .