Evolving deep neural networks by multi-objective particle swarm optimization for image classification

Bin Wang, Yanan Sun, Bing Xue, Mengjie Zhang

Abstract

Designing high-performance Convolutional Neural Networks (CNNs) typically requires extensive manual tuning by experts to balance accuracy against computational costs. This paper introduces MOCNN, a framework that leverages multi-objective Particle Swarm Optimization (PSO) to automate the design of DenseNet architectures. By simultaneously optimizing for classification accuracy and computational efficiency (FLOPs), MOCNN generates a Pareto front of models tailored for various hardware environments. Experimental results on the CIFAR-10 dataset show that MOCNN achieves a top accuracy of 95.51%, outperforming standard benchmarks while significantly reducing search time through a distributed GPU infrastructure.

Introduction

Modern Convolutional Neural Networks (CNNs) like ResNet and DenseNet have set benchmarks in image classification, yet their deployment is often hindered by two primary challenges: the "black art" of manual hyperparameter tuning and the inherent trade-off between accuracy and latency. Existing Neural Architecture Search (NAS) methods frequently prioritize accuracy alone and demand prohibitive computational resources. MOCNN addresses these issues by treating architecture design as a multi-objective optimization problem, seeking to find efficient, high-performing models automatically.

Methodology

The MOCNN framework focuses on evolving the architecture of DenseNets through three core components:

  1. Particle Encoding Strategy: DenseNet architectures are represented as fixed-length vectors. While the number of "Dense Blocks" remains fixed, the PSO algorithm evolves the number of layers and the growth rate within each block.
  2. Multi-Objective Optimization (OMOPSO): Instead of a single optimal solution, the algorithm identifies a "Pareto front" of non-dominated solutions, balancing the conflicting objectives of maximizing accuracy and minimizing Floating Point Operations (FLOPs).
  3. Distributed Infrastructure: To handle the computational load of training numerous candidate networks, a custom server-client Python library was developed. This allows concurrent execution across multiple GPUs and machines, providing near-linear speedup.
The MOCNN framework workflow, illustrating the path from dataset partitioning to multi-objective optimization and final evaluation.

The search space is constrained to variations of the DenseNet structure, as shown below, allowing the optimizer to focus on internal block configurations.

The DenseNet architecture used as the base for evolution, featuring three primary Dense Blocks connected by transition layers.

Key Insights and Results

The study utilized the CIFAR-10 dataset to validate the approach. Key findings include:

  • Performance: The best-evolved model reached 95.51% accuracy, surpassing the DenseNet-121 baseline (94.77%).
  • Efficiency: The distributed system reduced experiment time from an estimated 3 weeks to just 3 days using 8-10 GPUs.
  • Optimization Strategies: To ensure feasibility, the authors employed early stopping, result caching, and the Adam optimizer to adapt learning rates for diverse architectures.

The resulting Pareto front provides a spectrum of models, enabling users to select architectures based on specific hardware constraints, such as low-power IoT devices or high-performance cloud servers.

Conclusion and Future Work

MOCNN demonstrates the efficacy of multi-objective PSO in automating CNN design. While currently limited to DenseNet structures and using FLOPs as a proxy for latency, future work aims to incorporate more diverse building blocks (e.g., ResNet, SE-blocks) and develop machine learning models to predict actual inference latency more accurately. Expanding the search space to deeper models remains a priority as hardware capabilities grow.

Summary updated

BibTeX
@inproceedings{wang2019evolving,
  author = {Bin Wang and Yanan Sun and Bing Xue and Mengjie Zhang},
  title = {{Evolving deep neural networks by multi-objective particle swarm optimization for image classification}},
  booktitle = {GECCO},
  year = {2019},
  doi = {10.1145/3321707.3321735},
}
Figure