Introduction
Convolutional Neural Networks (CNNs) have demonstrated significant success in Natural Language Processing (NLP), particularly in sentence classification tasks. However, these models often function as "black boxes." Unlike computer vision, where filters can be visualized as edge or texture detectors, NLP kernels typically lack semantic coherence. A single filter may respond to linguistically unrelated phrases, complicating model interpretability. Furthermore, standard CNNs are often trained from scratch for each new task, failing to leverage reusable linguistic features.
This paper addresses these gaps by proposing a method to learn semantically coherent kernels. By anchoring kernel parameters to a semantic space, the authors improve interpretability and enable significant training speedups through kernel reusability across datasets.
Methodology: Weighted k-gram Averaging (WkA)
The core contribution is the Weighted k-gram Averaging (WkA) model. Instead of treating kernel weights as free variables, WkA constrains them to represent specific semantic clusters.
1. Polarized Clustering
The process begins by extracting k-grams (sequences of 3, 4, or 5 words) from the corpus. These are grouped using a distance function that integrates Word2Vec (contextual meaning) and SentiWordNet (sentiment polarity). This "polarization" ensures that clusters are not only semantically similar but also sentimentally consistent—preventing opposites like "good" and "bad" from merging.
2. Kernel Parametrization and Joint Learning
Each cluster is mapped to a specific kernel. The kernel's parameters are defined as a weighted combination of the Word2Vec representations of the k-grams within its assigned cluster. The model then jointly learns these k-gram weights alongside the final classifier weights.
Experimental Results
The WkA model was evaluated on several benchmarks, including MR, SST-1, SST-2, SUBJ, and IMDB.
Interpretability and Semantic Coherence
The proposed method significantly enhances the semantic coherence of filters compared to standard CNNs. Qualitatively, the model allows for "attention maps" where specific phrases that trigger kernels are highlighted, providing a clear rationale for classification decisions.
Efficiency and Reusability
A major advantage of semantically coherent kernels is their reusability. Kernels pre-trained on a large dataset (e.g., IMDB) can be "plugged into" models for smaller datasets (e.g., SST-1). This approach yielded a 60x speedup in training time—reducing SST-1 training from 2 hours to just 2 minutes—while maintaining competitive accuracy (e.g., ~80% on the MR dataset).
Conclusion
By forcing CNN kernels to represent semantically and sentimentally coherent clusters, the WkA model transforms the traditional "black box" into a more interpretable "glass box." This approach not only provides linguistic insights into model behavior but also offers a path toward highly efficient, reusable NLP components. Future work may involve automating hyperparameter tuning for clustering and extending this methodology to more complex architectures like Transformers.
Summary updated