Sentence classification is one of the basic tasks of natural language processing. Convolution neural network (CNN) has the ability to extract n-grams features through convolutional filters and capture local correlations between consecutive words in parallel, so CNN is a popular neural network architecture to dealing with the task. But restricted by the width of convolutional filters, it is difficult for CNN to capture long term contextual dependencies. Attention is a mechanism that considers global information and pays more attention to keywords in sentences, thus attention mechanism is cooperated with CNN network to improve performance in sentence classification task. In our work, we don't focus on keyword in a sentence, but on which CNN's output feature map is more important. We propose a Squeeze-and-Excitation Convolutional neural Network (SECNN) for sentence classification. SECNN takes the feature maps from multiple CNN as different channels of sentence representation, and then, we can utilize channel attention mechanism, that is SE attention mechanism, to enable the model to learn the attention weights of different channel features. The results show that our model achieves advanced performance in the sentence classification task.
翻译:句子分类是自然语言处理中的基本任务之一。卷积神经网络(CNN)通过卷积滤波器提取n-gram特征,并并行捕获连续词之间的局部相关性,因此CNN是处理该任务的常用神经网络架构。但受限于卷积滤波器的宽度,CNN难以捕获长距离上下文依赖关系。注意力机制是一种考虑全局信息并关注句子中关键词的机制,因此常将注意力机制与CNN网络结合以提升句子分类任务的性能。在我们的工作中,我们关注的不是句子中的关键词,而是CNN输出的哪些特征图更为重要。我们提出了一种用于句子分类的压缩激励卷积神经网络(SECNN)。SECNN将多个CNN输出的特征图作为句子表示的不同通道,然后利用通道注意力机制(即SE注意力机制),使模型能够学习不同通道特征的注意力权重。结果表明,我们的模型在句子分类任务中取得了先进性能。