Abstract
This paper presents the Attention-based Multichannel Convolutional Neural Network (AMCNN), a hybrid deep learning architecture designed to integrate the sequential modeling capabilities of Recurrent Neural Networks (RNNs) with the local feature extraction strengths of Convolutional Neural Networks (CNNs). By introducing a novel dual-attention mechanism—incorporating both scalar and vectorial attention—the model generates multiple "channels" of text representations. This approach preserves word order and structural information while emphasizing salient features, leading to improved performance on standard sentiment and subjectivity classification benchmarks.
Introduction
In Natural Language Processing (NLP), researchers often face a trade-off between RNNs and CNNs. RNNs, such as LSTMs, excel at capturing long-term dependencies but can be biased toward the end of sequences and struggle with local n-gram extraction. Conversely, CNNs are adept at identifying local patterns through filters but are often limited by fixed filter widths and may miss broader global semantics. Furthermore, standard attention mechanisms typically collapse sequences into single weighted-sum vectors, discarding spatial information that CNNs could exploit. The AMCNN architecture bridges this gap by retaining the sequence's structural "shape" while highlighting its most critical components through multiple channels.
Methodology
The AMCNN architecture consists of four primary stages designed to create a robust, multichannel representation of text:
- Bi-directional LSTM Layer: Input text is processed in both forward and backward directions, ensuring each word representation incorporates global context from the entire sentence.
- Dual Attention Mechanism: The core innovation involves applying two types of attention to the Bi-LSTM outputs:
- Scalar Attention: Assigns weights to words based on their overall importance in the sentence.
- Vectorial Attention: Determines the relevance of specific dimensions within word embeddings, focusing on feature-level importance.
- Multichannel Generation: Instead of a single vector, the model produces multiple matrices (channels), each representing a different "view" of the sentence. This is analogous to RGB channels in image processing.
- CNN Layer: A standard CNN operates across these channels, extracting n-gram features from the attention-weighted matrices.
Experimental Setup
The model was evaluated on five benchmark datasets: MR (movie reviews), Subj (subjectivity), MPQA (opinion polarity), SST-1 (fine-grained sentiment), and SST-2 (binary sentiment). These datasets cover a range of classification tasks to test the model's versatility.
Results and Discussion
The AMCNN model consistently outperformed traditional CNNs, LSTMs, and other hybrid models. A key finding was the optimal number of channels; the authors determined that AMCNN-3 (using 3 channels) generally provided the best balance between performance and complexity, as shown in the results table below.
On the MR dataset, AMCNN-3 achieved an accuracy of 82.57%, surpassing the standard multichannel CNN (81.1%). Visualization of the attention weights confirmed that different channels focus on distinct informative words, capturing diverse semantic perspectives of the same sentence. However, adding too many channels (e.g., 5 or 7) led to diminishing returns or overfitting.
Conclusion
AMCNN successfully combines the strengths of RNNs and CNNs through a dual-attention multichannel strategy. By treating attention as a form of "data perturbation" and preserving the matrix structure of text, the model achieves superior robustness and accuracy in text classification tasks. Future work may explore generative models for channel creation and architectures capable of handling variable-length inputs more efficiently.
Summary updated