Evolving Character-level Convolutional Neural Networks for Text Classification

Trevor Londt, Xiaoying Gao, Bing Xue, Peter AndreaearXiv 2020

Abstract

Character-level Convolutional Neural Networks (char-CNNs) offer a robust approach to text classification by operating directly on raw character sequences, bypassing the need for complex pre-processing or pre-trained embeddings. However, designing optimal char-CNN architectures remains a challenging, manual task. This paper introduces SurDG-EC, an evolutionary deep learning (EDL) framework that utilizes Genetic Programming (GP) and surrogate models to automatically discover high-performing char-CNN architectures. The evolved models demonstrate superior performance on standard benchmarks like AG’s News, achieving higher accuracy with approximately 50% fewer parameters than state-of-the-art manual designs.

Introduction

In Natural Language Processing (NLP), character-level models are valued for their resilience to misspellings and their language-agnostic nature. Despite these advantages, the architectural design space for char-CNNs is vast and counter-intuitive; unlike image-based CNNs, increasing depth does not consistently yield better results in text classification. Manual tuning is often a "black box" process requiring significant expertise and computational resources.

To address this, the researchers developed SurDG-EC, an algorithm that treats architecture design as an evolutionary search. By combining Genetic Programming with efficient evaluation strategies, the system identifies optimal configurations of depth and width that human experts might overlook.

Methodology: SurDG-EC

The SurDG-EC algorithm employs an indirect cellular encoding scheme where GP trees represent "programs" for network construction.

Genetic Programming and Encoding

The evolutionary process uses two primary operations to modify the network topology:

  • SEQ (Sequential): Adds depth by appending layers.
  • PAR (Parallel): Adds width by creating branching paths, allowing the network to capture diverse feature sets simultaneously.

The Network Cell

A key innovation is the use of a standardized "Network Cell" as the fundamental building block. Each cell consists of a sequence of Temporal Convolution, Batch Normalization, and ReLU activation, repeated twice.

The standardized network cell used as the building block for evolved architectures.

Accelerated Evolution via Surrogate Models

Evaluating hundreds of deep learning architectures is computationally prohibitive. SurDG-EC overcomes this bottleneck using "surrogate models." During the evolutionary phase, candidate networks are trained using 16-bit half-precision on only 25% of the training data for a limited duration (10 epochs). This provides a rapid "fitness" score, allowing the algorithm to explore the search space efficiently before the final, most promising architecture is fully trained.

Experimental Results

The algorithm was evolved on the AG’s News dataset and subsequently benchmarked across seven other major text classification datasets, including DBPedia and Sogou News.

Performance and Efficiency

The evolved model achieved a test accuracy of 90.72% on AG’s News, surpassing standard word-level LSTMs (86.06%) and traditional large-scale char-CNNs. Notably, the discovered architecture is highly efficient, utilizing only ~9 million parameters—nearly half the size of the high-performing VDCNN-29 model (~17 million parameters).

Accuracy distribution of surrogate models and final performance of the best-evolved model compared to baselines.

Key Insights

  • Architectural Topology: The evolution favored models that were wide in the early layers to capture a "rich tapestry" of features, confirming that width is a critical factor in char-CNN performance.
  • The Depth Ceiling: Results confirmed a performance plateau or degradation after approximately 10 cells (20 convolutional layers), suggesting a limit to the benefits of depth in this domain.
  • Crossover Effectiveness: Successful architectures frequently resulted from the crossover of high-performing "parents," indicating that the GP approach effectively identifies and recombines modular building blocks of network design.

Conclusion and Future Directions

SurDG-EC demonstrates that evolutionary algorithms can discover more efficient and accurate char-CNN architectures than manual design. While the current model shows strong generalization, future work could explore the inclusion of "skip links" (residual connections) to potentially enable deeper architectures and dynamic learning rate schedules to further optimize the evolutionary search. Additionally, addressing the limitations of fixed-length text truncation could improve performance on long-form document classification.

Summary updated

BibTeX
@misc{londt2020evolving,
  author = {Trevor Londt and Xiaoying Gao and Bing Xue and Peter Andreae},
  title = {{Evolving Character-level Convolutional Neural Networks for Text Classification}},
  year = {2020},
  eprint = {2012.02223},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2012.02223},
}
Figure