Speeding up the Hyperparameter Optimization of Deep Convolutional Neural Networks

Tobias Hinz, Nicolás Navarro-Guerrero, Sven Magg, Stefan WermterInt. J. Comput. Intell. Appl 2018 · DOI

TL;DR

This paper proposes a novel method to accelerate hyperparameter optimization (HPO) for deep convolutional neural networks (CNNs) by leveraging progressively increasing image resolutions. By first optimizing hyperparameters on lower-resolution images and then using these findings to guide optimization on higher-resolution images, the authors demonstrate significant speedups without sacrificing final model performance.

What Problem Does This Paper Address?

Optimizing hyperparameters for deep learning models, particularly CNNs, is a notoriously time-consuming and computationally expensive task. The search space for hyperparameters is often high-dimensional, and evaluating a single hyperparameter configuration can involve training a complex model for a considerable duration. This bottleneck hinders rapid experimentation and model development. While various HPO algorithms exist (e.g., random search, Bayesian optimization), they still struggle with the sheer cost of evaluating numerous configurations. The paper addresses this by proposing a way to find good hyperparameter settings more efficiently, acknowledging that the evaluation cost is a major limiting factor.

Methods

The core of the proposed method is Increasing Image Size (IIS). The authors hypothesize that hyperparameter importance and optimal values are relatively consistent across different image resolutions for a given dataset. Based on this, they propose a pipeline:

  1. Initial Optimization on Low Resolution: Train a CNN with a hyperparameter optimization algorithm on downscaled versions of the original images. This significantly reduces the computational cost per evaluation.
  2. Initialize Search Space: Use the hyperparameter settings found in the low-resolution phase to define a more constrained and promising search space for the next stage.
  3. Progressive Increase in Resolution: Gradually increase the image resolution and continue the hyperparameter optimization process, using the results from the previous, lower-resolution stage to initialize the search. This process can be repeated multiple times.

They compare this IIS approach against the standard procedure (optimizing only on the original, high-resolution images) using several popular HPO algorithms: Random Search, Tree-structured Parzen Estimators (TPE), Sequential Model-Based Algorithm Configuration (SMAC), and a Genetic Algorithm (GA).

Datasets

The paper uses the following datasets:

  • Extended Cohn-Kanade (CK+) dataset: A dataset of facial expressions, used for the first experiment to analyze hyperparameter importance across resolutions. Images were resized to 200x200, 128x128, 64x64, and 32x32 pixels.
  • STL-10 dataset: A dataset of labeled images acquired from ImageNet, also used for the first experiment. Images were resized to 96x96, 32x32, and 48x48 pixels.
  • 102 Flowers dataset: Used for the second experiment to evaluate the IIS approach for speeding up optimization. Images were rescaled to 64x64 and 32x32 pixels for the IIS pipeline, with the final optimization on 128x128 pixels.

Key Insights and Ideas

  • Hyperparameter Importance is Resolution-Invariant: A key finding is that the relative importance of different hyperparameters (e.g., learning rate, regularization, number of layers) remains remarkably consistent across different image resolutions for the same dataset. This justifies using lower-resolution images to guide the search.
  • Optimal Hyperparameter Values are Similar: The optimal values for many hyperparameters also show strong correlation across resolutions, further validating the IIS approach.
  • IIS Reduces Optimization Time Significantly: By starting with smaller images, the HPO process can converge to good solutions much faster. This is particularly pronounced for algorithms like TPE and SMAC.
  • No Performance Degradation: Crucially, the IIS approach does not negatively impact the final model's performance. In some cases, it even leads to slightly better results, especially for Random Search and GA.
  • General Applicability: The IIS concept is presented as a general methodology that can be applied to various HPO algorithms and potentially other tasks beyond image classification, as long as dimensionality can be reduced meaningfully.

Key Results

  • Time Reduction: The IIS approach achieved time reductions of 9% to 42% compared to the standard method, with TPE and SMAC showing the most significant gains. For example, TPE saw a 42% reduction in time.
  • Final Performance: The final validation errors achieved with IIS were comparable to, and sometimes better than, those obtained by optimizing solely on high-resolution images. On the 102 Flowers test set, all settings performed similarly well (around 46% accuracy).
  • Hyperparameter Importance Analysis: Functional ANOVA revealed that subsets of hyperparameters like learning rate, batch size, and regularization were consistently important across resolutions, while layer-specific parameters showed some dependency on input size.

Limitations and Future Work

  • Layer-Specific Hyperparameters: The paper notes that the optimal number of convolutional layers might be input-size dependent due to the nature of pooling layers. However, good starting points for filter numbers can still be inferred from smaller inputs.
  • Generalization to Other Tasks/Domains: While the authors suggest the IIS concept is generally applicable, they acknowledge that future work should test its efficacy on tasks beyond image classification and with other dimensionality reduction techniques (e.g., PCA).
  • Extensibility: The authors mention that the IIS approach can be easily extended with other methods for speeding up HPO, such as parallelization or extrapolating learning curves.

Summary updated

BibTeX
@article{hinz2018speeding,
  author = {Tobias Hinz and Nicolás Navarro-Guerrero and Sven Magg and Stefan Wermter},
  title = {{Speeding up the Hyperparameter Optimization of Deep Convolutional Neural Networks}},
  journal = {Int. J. Comput. Intell. Appl.},
  year = {2018},
  doi = {10.1142/s1469026818500086},
}
Figure