Abstract
This paper presents a systematic comparison between Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs, specifically GRUs and LSTMs) across a wide range of Natural Language Processing (NLP) tasks. The authors find that while RNNs generally excel at tasks requiring global, long-range semantic understanding, CNNs dominate when tasks rely on local key-phrase recognition. Additionally, they highlight that both architectures are highly sensitive to batch size and hidden size hyperparameters, which can significantly impact model performance.
Introduction
In the deep learning era of NLP, researchers constantly face a fundamental architectural choice: should they use a hierarchical model like a CNN or a sequential model like an RNN? Historically, CNNs are viewed as feature extractors good at finding position-invariant patterns (like n-grams), while RNNs are designed to model sequential context dependencies.
However, the literature is full of contradictions. For example, RNNs sometimes win at document-level sentiment classification, while gated CNNs have occasionally achieved state-of-the-art results in language modeling—a task traditionally dominated by RNNs. This paper addresses the lack of consensus by providing a systematic, apples-to-apples comparison of CNNs, GRUs, and LSTMs across multiple representative NLP tasks to offer basic, empirical guidance on deep neural network (DNN) selection.
Methods
To ensure a fair comparison of the intrinsic encoding capabilities of these architectures, the authors stripped away modern complexities. They trained all models entirely from scratch without using pre-trained word embeddings or advanced tricks like batch normalization.
The study evaluated three standard architectures:
- CNN: A standard convolutional layer with a max-pooling layer over sliding $w$-grams.
- GRU: A Gated Recurrent Unit, reading left-to-right and using the final hidden state as the sequence representation.
- LSTM: A Long Short-Term Memory network, similarly using the final hidden state.
For Part-of-Speech tagging, they also included bi-directional RNNs. Crucially, they performed an independent hyperparameter search (tuning learning rate, hidden size, batch size, etc.) for each model on each task to ensure they were comparing optimal baselines rather than poorly tuned networks.
Datasets
The authors categorized their evaluation into four distinct NLP problem types, using standard benchmarks for each:
- Text Classification (TextC): Stanford Sentiment Treebank (SST) for sentiment analysis, and SemEval 2010 Task 8 for relation classification.
- Semantic Matching (SemMatch): Stanford Natural Language Inference (SNLI) for textual entailment, WikiQA for answer selection, and WebQSP for question-relation matching.
- Sequence Order (SeqOrder): A Path Query Answering (PQA) dataset for knowledge base paths.
- Context Dependency (ContextDep): Wall Street Journal (WSJ) corpus for Part-of-Speech (POS) tagging.
Key Insights and Analysis
The winning architecture depends heavily on how a task is solved. If a task requires understanding the entire sequence or long-range dependencies (e.g., complex sentiment clauses with negations), RNNs perform better. If a task relies on spotting local, position-invariant key phrases (e.g., finding the exact answer span in WikiQA), CNNs often win.
RNNs encode the entire sequence into a final hidden state. For tasks where only a few words matter, this sequential encoding can actually be a "burden," washing out critical key phrases. CNNs, via max-pooling, easily extract the strongest signals regardless of sequence length. Furthermore, for POS tagging, standard CNNs outperformed standard one-directional RNNs. Because a CNN's sliding window looks at words on both sides of a target token, it naturally captures bi-directional context, whereas a standard left-to-right RNN only knows the past.
Key Results
- Sentiment Classification (SST): GRU (86.32% accuracy) outperformed LSTM (84.51%) and CNN (82.38%). Error analysis showed GRUs handled longer sentences (>10 words) much better than CNNs, as long sentences often contain complex semantic dependencies.
- Answer Selection (WikiQA): CNNs achieved the highest MAP (63.69), beating GRU (62.58) and LSTM (62.00), proving superior at key-phrase matching.
- Textual Entailment (SNLI): GRU (78.78%) beat CNN (77.13%), as entailment requires holistic sentence comprehension rather than just keyword overlap.
- POS Tagging (WSJ): CNNs (94.18%) outperformed standard one-directional GRUs (93.15%) and LSTMs (93.18%). However, Bi-directional LSTMs (94.35%) ultimately took the top spot.
Conclusion
The study intentionally avoids pre-trained embeddings and advanced mechanisms to isolate base architectures. While this is great for a controlled experiment, it doesn't reflect state-of-the-art production setups where pre-training drastically alters model behavior.
Because CNNs and RNNs capture complementary information (local key-phrases vs. global sequence semantics), future architectures should focus on combining them. Furthermore, the extreme sensitivity to hidden and batch sizes indicates that rigorous, automated hyperparameter optimization is absolutely critical for fair model evaluation in future NLP research.
Summary updated