[Paper Review] An Attention-Gated Convolutional Neural Network for Sentence Classification
This paper proposes an Attention-Gated Convolutional Neural Network (AGCNN) for sentence classification that uses context-aware attention mechanisms to dynamically emphasize important features across multiple convolutional kernel sizes. The model achieves up to 3.1% higher accuracy than standard CNNs and outperforms baselines on four of six benchmark tasks, with a novel activation function, NLReLU, showing competitive performance compared to ReLU and other standard activations.
The classification of sentences is very challenging, since sentences contain the limited contextual information. In this paper, we proposed an Attention-Gated Convolutional Neural Network (AGCNN) for sentence classification, which generates attention weights from the feature's context windows of different sizes by using specialized convolution encoders. It makes full use of limited contextual information to extract and enhance the influence of important features in predicting the sentence's category. Experimental results demonstrated that our model can achieve up to 3.1% higher accuracy than standard CNN models, and gain competitive results over the baselines on four out of the six tasks. Besides, we designed an activation function, namely, Natural Logarithm rescaled Rectified Linear Unit (NLReLU). Experiments showed that NLReLU can outperform ReLU and is comparable to other well-known activation functions on AGCNN.
Motivation & Objective
- To address the challenge of limited contextual information in sentence classification.
- To enhance feature representation by dynamically weighting important features using attention mechanisms.
- To improve classification accuracy over standard CNN models and existing baselines.
- To design and evaluate a novel activation function, NLReLU, for better performance in the proposed architecture.
- To demonstrate the effectiveness of AGCNN across diverse sentence classification tasks.
Proposed method
- The AGCNN employs multiple convolutional encoders with different filter sizes to extract local features from sentence embeddings.
- Attention gates are applied to each convolutional feature map, learning to weigh the importance of different context windows based on their contribution to classification.
- The attention mechanism computes gate weights using a feed-forward network applied to pooled features, enabling dynamic feature enhancement.
- The final sentence representation is formed by concatenating gated feature maps and passing them through a classifier head.
- A new activation function, Natural Logarithm ReLU (NLReLU), is introduced to improve gradient flow and model expressiveness.
- The model is trained end-to-end using cross-entropy loss with Adam optimization.
Experimental results
Research questions
- RQ1Can attention gating improve sentence classification performance by selectively emphasizing informative local features?
- RQ2How does the proposed AGCNN architecture compare to standard CNNs and other state-of-the-art models on sentence classification benchmarks?
- RQ3Does the NLReLU activation function provide consistent performance gains over ReLU and other standard activations in the AGCNN framework?
- RQ4To what extent does the model leverage limited contextual information in short sentences?
- RQ5Can the attention mechanism effectively identify and amplify salient features across varying kernel sizes?
Key findings
- The AGCNN achieved up to 3.1% higher accuracy than standard CNN models on the tested sentence classification tasks.
- The model outperformed baseline models on four out of six benchmark datasets, demonstrating strong generalization.
- The NLReLU activation function showed superior performance compared to ReLU and was comparable to other well-known activation functions in the AGCNN setting.
- The attention mechanism effectively highlighted important features across different kernel sizes, improving model interpretability and performance.
- The ablation study confirmed that both the attention gating and NLReLU components contributed significantly to the model's overall accuracy.
- The model demonstrated robust performance across diverse text classification tasks, including IMDB, AG News, and others.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.