GRU based Convolutional Neural Network with Initialized Filters for Text Classification

Qing Li, Linhong Weng, Qing Li 0011, Ding XuehaiAust. J. Intell. Inf. Process. Syst 2019

Abstract

The authors propose IF-CGNN, a hybrid architecture that combines the local feature extraction of Convolutional Neural Networks (CNNs) with the long-range dependency tracking of Gated Recurrent Units (GRUs). The standout innovation is a data-driven initialization strategy that uses clustered n-grams to "warm-start" CNN filters, significantly reducing tuning time and boosting classification accuracy across multiple benchmarks.

Introduction

Text classification is a foundational NLP task, but standard deep learning approaches have distinct trade-offs. CNNs are excellent at picking up local patterns (like key phrases) but are "regional"—they often miss the broader context of a sentence. Conversely, Recurrent Neural Networks (RNNs/GRUs) excel at sequential context but can struggle with vanishing gradients or high computational costs when processing long raw sequences.

Furthermore, most CNNs start with randomly initialized filters. This "blank slate" approach requires extensive hyperparameter tuning and long training times to find meaningful features. The authors aim to bridge the gap between local and global context while making the training process more efficient through smarter initialization.

The IF-CGNN Framework

The proposed IF-CGNN (Initialized Filters - Convolutional Gated Neural Network) consists of four main stages:

  1. Initialized Convolutional Layer: Instead of random weights, the authors extract n-grams from the training data and rank them using a custom weighting formula based on frequency within and across classes. They take the top 20% of these n-grams, cluster them using K-means, and use the resulting cluster centroids to initialize the CNN filters. This ensures the filters start by looking for semantically meaningful patterns.
  2. k-max Pooling: After convolution, this layer selects the $k$ most active features while preserving their relative order, ensuring the subsequent layers know where (relatively) the important words appeared.
  3. Multi-layer GRU: The pooled features are fed into a multi-layer GRU. This component acts as the "contextual engine," summarizing information from the preceding and succeeding features to understand sentence-level semantics.
  4. Softmax Classifier: The final representations are passed through a dropout layer and a softmax layer for category prediction.
Architecture of the IF-CGNN model.

Experimental Setup

The model was evaluated on four diverse datasets:

  • MR: Movie review sentence polarity (positive/negative).
  • CR: Customer reviews of various products.
  • Subj: Subjectivity dataset (classifying text as subjective or objective).
  • TCM: A specialized medical dataset containing clinical records of Traditional Chinese Medicine, involving five categories like Internal Medicine and Surgery.

Results and Analysis

The IF-CGNN model consistently outperformed baselines like standard CNNs, LSTMs, and NBSVM.

  • Accuracy Boost: On the CR dataset, the model achieved 92.1% accuracy, a significant 6.1% relative improvement over the standard IF-CNN.
  • Generalization: The model performed exceptionally well on the specialized TCM medical dataset (72.5%), outperforming standard LSTMs and CNNs.
  • Stability: Initialized filters allowed the model to maintain high accuracy even when filter sizes were varied, whereas traditional CNNs often see performance swings.
Performance comparison on the TCM dataset.

Key Insights

  • Semantic "Warm-Starting": By initializing filters with n-gram centroids, the model essentially starts training with a "vocabulary" of important phrases already in mind.
  • The Hybrid Advantage: The CNN acts as a high-speed feature extractor, while the GRU acts as a sophisticated reasoning engine. Passing CNN-extracted features into a GRU is more efficient than running a GRU on raw word embeddings for long texts.
  • Optimal Depth: Experiments showed that 3 GRU layers provided peak performance; beyond that, accuracy began to decrease as the model likely became too complex for the data.

Conclusion

The authors demonstrate that combining CNNs and GRUs with a smart initialization strategy yields a robust and efficient text classifier. While the current model relies on standard convolutions, future work could explore tree-structured convolutions to capture hierarchical language relationships. Additionally, optimizing the pre-processing clustering step could further streamline the training pipeline.

Summary updated

BibTeX
@article{li2019gru,
  author = {Qing Li and Linhong Weng and Qing Li and Ding Xuehai},
  title = {{GRU based Convolutional Neural Network with Initialized Filters for Text Classification}},
  journal = {Aust. J. Intell. Inf. Process. Syst},
  year = {2019},
}
Figure