Generating Efficient DNN-Ensembles with Evolutionary Computation

Marc Ortiz, Florian Scheidegger, Marc Casas, A. Cristiano I. Malossi, Eduard AyguadéarXiv 2020

TL;DR

This paper introduces EARN, an evolutionary algorithm that automatically generates efficient Deep Neural Network (DNN) ensembles by optimizing for accuracy, inference time, and model size simultaneously. EARN combines multiple ensemble strategies (bagging, boosting, and chaining) and significantly outperforms state-of-the-art methods in creating smaller, faster, and more accurate models.

What Problem Does This Paper Address?

Deep learning models have achieved remarkable success, but they often come with significant computational costs: they can be slow to infer, require substantial memory, and are energy-intensive. While ensemble learning, which combines multiple models, can improve performance, exhaustively searching for the optimal ensemble configuration is computationally infeasible due to the vast search space. Existing methods often focus on a single ensemble strategy or a limited set of objectives, failing to capture the full potential of combining diverse ensemble techniques and optimizing for multiple critical metrics like accuracy, latency, and model size concurrently, especially across different hardware platforms.

Methods

The core of this work is the EARN (Evolutionary Approach for Reducing the Number of ensembles to evaluate) algorithm. EARN is a multi-objective evolutionary algorithm inspired by Genetic Programming (GP) and the NSGA-II framework.

Here's a breakdown of its key components:

  • Ensemble Representation: Ensembles are represented as Directed Acyclic Graphs (DAGs). These DAGs can include:
  • Classifier Nodes: Individual DNN models.
  • Trigger Nodes: Control the flow of inference, often using a threshold to decide whether to pass the input to the next classifier (for early exit).
  • Merger Nodes: Combine predictions from multiple classifiers (e.g., through voting or averaging).
  • Ensemble Strategies: EARN can combine:
  • Bagging: Creating multiple models from bootstrapped samples of the data.
  • Boosting: Sequentially training models to correct errors of previous ones.
  • Chaining: Arranging models in a sequence with early-exit conditions.
  • Evolutionary Operations:
    • Mutation: Modifies existing ensembles by changing merger protocols, adjusting trigger thresholds, or replacing/adding classifier nodes.
  • Crossover: Combines parts of two parent ensembles to create new offspring.
  • Multi-Objective Optimization: EARN uses a fitness function based on non-dominated rank and crowding distance to simultaneously optimize for:
  • Accuracy: Predictive performance.
  • Inference Time (Latency): How quickly the model makes a prediction.
  • Model Size (Number of Parameters): Memory footprint.
  • Hardware Awareness: EARN considers the target hardware platform (CPU or GPU) when optimizing for inference time, as latency can vary significantly.

Datasets

The paper evaluates EARN on 10 image classification datasets: cifar10, cifar100, svhn, stl, mnist, fashion-mnist, gtsrb, food101, flowers102, and caltech256. For evaluation, they split the original test sets into validation and test sets. They also compare their method against a Neural Architecture Search (NAS) approach using models trained on CIFAR-10.

Key Insights and Ideas

  • Synergy of Ensemble Strategies: Combining bagging, boosting, and chaining within a single evolutionary framework unlocks performance gains that are not achievable by using any single strategy alone. This allows for more complex and efficient ensemble topologies.
  • The Power of Multi-Objective Optimization: Explicitly optimizing for accuracy, latency, and size simultaneously is crucial. EARN's ability to find Pareto-optimal solutions means users can select ensembles that best fit their specific trade-offs, rather than being forced to compromise on one metric for another.
  • Hardware-Specific Optimization: Latency is not a universal metric; it depends heavily on the hardware. EARN's ability to account for this allows for the generation of truly optimized ensembles for a given deployment environment.
  • Evolutionary Search Efficiency: The evolutionary approach significantly reduces the number of ensemble evaluations needed compared to brute-force or random search, making the generation of optimal ensembles practical.

Key Results

EARN demonstrates substantial improvements across various metrics:

  • Speedup: Up to 4.07x speedup on GPU compared to the best individual DNN in the pool.
  • Size Reduction: Up to 7.70x reduction in model size compared to the best individual DNN.
  • Accuracy Improvement: Up to 7.30% increase in accuracy over the best individual DNN.
  • State-of-the-Art Comparison: EARN-generated models are up to 4.70x smaller than those produced by a state-of-the-art NAS method (NSAS) while maintaining or improving accuracy.
  • Overall Efficiency: The average improvements across datasets highlight EARN's consistent ability to generate efficient ensembles.

Limitations and Future Work

  • Computational Cost of Evolution: While EARN is efficient in terms of evaluations, the evolutionary process itself still requires significant computation, especially for large populations and many iterations.
  • Parameter Tuning: The performance of EARN can be sensitive to its own hyperparameters (population size, mutation rates, etc.), which might require tuning for specific problems.
  • Future Work: The authors suggest exploring more complex ensemble topologies, incorporating additional objectives (e.g., energy consumption), and extending the approach to other domains beyond image classification. They also highlight the potential of combining EARN with NAS methods for even more powerful model optimization pipelines.

Summary updated

Abstract

In this work, we leverage ensemble learning as a tool for the creation of faster, smaller, and more accurate deep learning models. We demonstrate that we can jointly optimize for accuracy, inference time, and the number of parameters by combining DNN classifiers. To achieve this, we combine multiple ensemble strategies: bagging, boosting, and an ordered chain of classifiers. To reduce the number of DNN ensemble evaluations during the search, we propose EARN, an evolutionary approach that optimizes the ensemble according to three objectives regarding the constraints specified by the user. We run EARN on 10 image classification datasets with an initial pool of 32 state-of-the-art DCNN on both CPU and GPU platforms, and we generate models with speedups up to $7.60\times$, reductions of parameters by $10\times$, or increases in accuracy up to $6.01\%$ regarding the best DNN in the pool. In addition, our method generates models that are $5.6\times$ faster than the state-of-the-art methods for automatic model generation.
BibTeX
@misc{ortiz2020generating,
  author = {Marc Ortiz and Florian Scheidegger and Marc Casas and A. Cristiano I. Malossi and Eduard Ayguadé},
  title = {{Generating Efficient DNN-Ensembles with Evolutionary Computation}},
  year = {2020},
  eprint = {2009.08698},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2009.08698},
}
Figure