A Genetic Programming Approach to Designing Convolutional Neural Network Architectures

Masanori Suganuma, Shinichi Shirakawa, Tomoharu Nagao

Abstract

We propose a method for designing convolutional neural network (CNN) architectures based on Cartesian genetic programming (CGP). In the proposed method, the architectures of CNNs are represented by directed acyclic graphs, in which each node represents highly-functional modules such as convolutional blocks and tensor operations, and each edge represents the connectivity of layers. The architecture is optimized to maximize the classification accuracy for a validation dataset by an evolutionary algorithm. We show that the proposed method can find competitive CNN architectures compared with state-of-the-art methods on the image classification task using CIFAR-10 and CIFAR-100 datasets.

Introduction

The design of high-performing Convolutional Neural Networks (CNNs) has traditionally been a manual process, often described as a "black art" that relies heavily on expert intuition and extensive trial-and-error. While this approach has yielded landmark architectures such as ResNet and GoogLeNet, the search for novel, more efficient structures is increasingly bottlenecked by human effort.

Automated Neural Architecture Search (NAS) has emerged as a promising solution to this challenge. However, early NAS methods, particularly those based on Reinforcement Learning (RL), were prohibitively expensive, sometimes requiring hundreds of GPUs to discover a single optimal architecture. This paper introduces CGP-CNN, an evolutionary approach based on Cartesian Genetic Programming (CGP) that aims to discover competitive architectures with significantly lower computational overhead—requiring as few as two GPUs.

Methodology

The core of the proposed method is the use of Cartesian Genetic Programming to represent and evolve CNN architectures.

Representation and Mapping

The CNN architecture is mapped onto a 2D grid of $M$ rows and $N$ columns. Each cell in this grid represents a "node" or functional module. Nodes are connected in a directed acyclic graph (DAG) structure, where each node can receive inputs from any node in previous columns. This representation naturally facilitates the discovery of complex topologies, including skip connections and variable-length paths.

Mapping from CGP genotype to phenotype and the resulting CNN architecture.

Functional Modules

Rather than evolving at the level of individual neurons or layers, CGP-CNN utilizes high-level building blocks to bias the search toward effective deep learning structures:

  • ConvBlock: A sequence of Convolution, Batch Normalization, and ReLU activation.
  • ResBlock: A block incorporating an internal shortcut connection (identity mapping).
  • Pooling: Both Max and Average pooling operations.
  • Tensor Operations: Summation and Concatenation modules used to merge multiple paths.

Evolutionary Strategy

The search process employs a $(1 + \lambda)$ evolutionary strategy, specifically with $\lambda = 2$. In each generation, a single "parent" architecture produces two "offspring" through mutation. To enhance efficiency, the authors implement forced mutation, ensuring that at least one "active" node (one that contributes to the final output) is modified. Crucially, the method also allows for neutral mutations—changes to "non-active" nodes. This maintains genetic diversity through neutral drift, allowing the algorithm to explore the search space even when immediate performance gains are not realized.

Fitness is evaluated by training each candidate architecture using Stochastic Gradient Descent (SGD) for a limited number of epochs and measuring its accuracy on a validation set.

Experiments and Results

The CGP-CNN method was evaluated on the CIFAR-10 and CIFAR-100 image classification benchmarks. For the evolutionary phase, 45,000 images were used for training and 5,000 for validation. The final discovered models were then re-trained on the full training set to determine their peak performance.

Performance Comparison

The evolved architectures demonstrated high competitiveness with both manually designed and state-of-the-art automated models:

  • CIFAR-10: The best evolved model (utilizing the ResSet of modules) achieved an error rate of 5.01%. This outperformed the standard ResNet (6.61%) and approached the performance of Wide ResNet (4.00%).
  • CIFAR-100: The method achieved a 26.5% error rate, competitive with many modern architectures.

Computational Efficiency

The most significant finding is the resource efficiency of CGP-CNN. While previous RL-based NAS methods required upwards of 800 GPUs to achieve similar error rates, the proposed method reached its results using only 2 GPUs. This drastic reduction in hardware requirements makes automated architecture search accessible to a much broader range of researchers.

Discussion

Several key factors contribute to the success of CGP-CNN. First, the power of neutrality allows the evolutionary process to bridge gaps between high-performing structures without becoming trapped in local optima. Second, modular evolution at the level of functional blocks makes the search space manageable and focuses on components known to be effective in deep learning. Finally, the graph-based structure of CGP naturally handles complex topologies, discovering when to branch or skip layers.

Despite its efficiency, the method still requires significant search time (300-500 generations). Future work could explore progressive training techniques to further accelerate the search. Additionally, while this study focused on image classification, the CGP approach is potentially applicable to a wide variety of tasks, including image restoration and hyperparameter co-evolution.

Conclusion

CGP-CNN demonstrates that Cartesian Genetic Programming is a powerful and efficient tool for automated neural architecture search. By evolving modular, graph-based representations, the method discovers CNN architectures that rival state-of-the-art designs while using a fraction of the computational resources required by previous automated methods.

Summary updated

BibTeX
@inproceedings{suganuma2018genetic,
  author = {Masanori Suganuma and Shinichi Shirakawa and Tomoharu Nagao},
  title = {{A Genetic Programming Approach to Designing Convolutional Neural Network Architectures}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2018},
  url = {https://openreview.net/forum?id=BJ4sjmGdbr},
}
Figure