Text classification is a fundamental problem in natural language processing. As a popular deep learning model, convolutional neural network(CNN) has demonstrated great success in this task. However, most existing CNN models apply convolution filters of fixed window size, thereby unable to learn variable n-gram features flexibly. In this paper, we present a densely connected CNN with multi-scale feature attention for text classification. The dense connections build short-cut paths between upstream and downstream convolutional blocks, which enable the model to compose features of larger scale from those of smaller scale, and thus produce variable n-gram features. Furthermore, a multi-scale feature attention is developed to adaptively select multi-scale features for classification. Extensive experiments demonstrate that our model obtains competitive performance against state-of-the-art baselines on six benchmark datasets. Attention visualization further reveals the model's ability to select proper n-gram features for text classification. Our code is available at: https://github.com/wangshy31/DenselyConnected-CNN-with-Multiscale-FeatureAttention.git.
REF uses a densely connected CNN to capture variable n-gram features and adopts multi-scale feature attention to adaptively select multi-scale features.
Densely Connected CNN with Multi-scale Feature Attention for Text Classification
IJCAI
Computer Science