Source-linked AI summary

An effective algorithm for hyperparameter optimization of neural networks

Gonzalo Diaz, Achille Fokoue, Giacomo Nannicini, Horst Samulowitz

arXiv:1705.08520v1cs.AIcs.LGcs.NE

TL;DR

The paper addresses the costly, heuristic selection of neural-network structure and training hyperparameters. It formulates the task as derivative-free optimization with bounded and integer-constrained variables, using RBFOpt and asynchronous parallel evaluations. Empirically, the method finds configurations with higher accuracy than domain-expert choices and results comparable to or better than popular alternatives, although its scope and assumptions are limited.

  • Problem

    Selecting neural-network structure and training hyperparameters is time-consuming because evaluating a single configuration may require hours and manual tuning commonly relies on heuristics.

  • Method

    The paper casts hyperparameter selection as a derivative-free, box-constrained optimization problem and uses RBFOpt’s surrogate-based search with asynchronous parallel evaluations.

  • Results

    The method yields higher prediction accuracy than domain-expert configurations and is at least comparable, sometimes better, than popular existing methods on benchmark instances.

  • Takeaways & Limitations

    The open-source methodology provides an automated approach that can identify strong neural-network hyperparameters without relying solely on manual heuristic tuning.

  • Takeaways & Limitations

    The study fixes the number of training epochs, treats validation accuracy as deterministic, and reports a limited-scope numerical evaluation.

Abstract

from arXiv · show

A major challenge in designing neural network (NN) systems is to determine the best structure and parameters for the network given the data for the machine learning problem at hand. Examples of parameters are the number of layers and nodes, the learning rates, and the dropout rates. Typically, these parameters are chosen based on heuristic rules and manually fine-tuned, which may be very time-consuming, because evaluating the performance of a single parametrization of the NN may require several hours. This paper addresses the problem of choosing appropriate parameters for the NN by formulating it as a box-constrained mathematical optimization problem, and applying a derivative-free optimization tool that automatically and effectively searches the parameter space. The optimization tool employs a radial basis function model of the objective function (the prediction accuracy of the NN) to accelerate the discovery of configurations yielding high accuracy. Candidate configurations explored by the algorithm are trained to a small number of epochs, and only the most promising candidates receive full training. The performance of the proposed methodology is assessed on benchmark sets and in the context of predicting drug-drug interactions, showing promising results. The optimization tool used in this paper is open-source.

Introduction

The paper targets the time-consuming, heuristic task of selecting neural-network hyperparameters and introduces an automated optimization methodology. It combines derivative-free optimization with parallel evaluation through an extension of the open-source RBFOpt library.

  • Neural-network hyperparameters include architecture choices such as hidden-layer number and size, plus learning and dropout rates.
  • Evaluating one hyperparameter configuration can take several hours, making manual heuristic tuning long and tedious.
  • The paper applies rigorous derivative-free optimization to hyperparameter selection, which the authors identify as novel for this task.
  • The methodology transforms neural-network hyperparameter optimization into a box-constrained problem and extends RBFOpt for parallel, asynchronous evaluations.
  • The authors report numerical evidence that the approach can provide significant benefits and outperform random search.
  • The paper fixes the number of training epochs, treats validation accuracy as deterministic, and evaluates the method on a limited numerical scope.

The hyperparameter optimization problem

The paper formulates hyperparameter selection as optimizing validation performance over valid assignments that may mix continuous, integer, and other parameter domains. Because objective evaluations require training and testing a model, the resulting function is computationally expensive and may lack a closed-form expression.

  • Hyperparameters govern a neural network’s structure and training, including hidden-layer number and size, learning rate, and dropout rate.
  • The feasible set X contains all valid assignments of hyperparameter values, which may belong to different domains such as positive reals and positive integers.
  • For a configuration x, the objective f(x, D) estimates neural-network performance on dataset D using validation data or k-fold cross-validation.
  • The objective function is computable but may have no known closed form, and evaluating one point can require extensive model training and validation.

Derivative-free optimization: overview

Derivative-free optimization is appropriate when the objective lacks an analytical form and evaluations are expensive. The reviewed approach uses a surrogate model to balance exploration and exploitation while restricting the search to bounded variables, including integer-constrained ones.

  • Derivative-free optimization uses only function values, avoiding derivative information that is unavailable or impractical to compute for expensive objectives.
  • Because each evaluation may require several hours of CPU time, the method seeks good solutions with few objective evaluations.
  • The optimization problem uses lower and upper bounds for variables and permits selected variables to take integer values.
  • RBFOpt builds a radial-basis-function surrogate and selects evaluations by balancing exploration of unknown regions with exploitation of promising regions.
  • After selecting a candidate through the surrogate and distance information, the algorithm evaluates the original objective, adds the point to the sample set, and iterates until stopping.

Derivative-free optimization applied to hyperparameter optimization

Applying derivative-free optimization to neural-network hyperparameters requires handling architectural validity constraints beyond simple box bounds. The paper also addresses the high and variable cost of neural-network evaluation through asynchronous parallelization.

  • Valid neural-network architectures impose constraints beyond box bounds, including restrictions that prevent empty hidden layers between two layers.

Hyperparameter optimization of NNs as a box-constrained problem

The paper maps neural-network hyperparameter optimization into a box-constrained formulation by explicitly bounding the number of nonempty hidden layers. This formulation is intended to explore configurations more uniformly and achieves similar or better accuracy with less computation than a naive alternative.

  • Hyperparameter optimization of NNs as a box-constrained problem: The formulation uses an upper bound on the number of hidden layers to map NN hyperparameter optimization into a box-constrained problem.The upper bound can be set large, but practitioners can typically provide a reasonable small bound.
  • Hyperparameter optimization of NNs as a box-constrained problem: An additional variable explicitly controls the number of nonempty hidden layers, avoiding the dense networks encouraged by naive bounds.The naive formulation rarely tests configurations with empty layers because optimization spreads points across the design space.
  • Hyperparameter optimization of NNs as a box-constrained problem: The proposed formulation is likely to yield higher accuracy for similar or shorter computing times than the naive formulation, unless dense networks are more effective.The computational evaluation supports this claim.

Parallelization of RBFOpt

Because evaluating a neural network can take several hours and training times are nondeterministic, the paper extends RBFOpt for parallel, asynchronous objective-function evaluations.

  • Parallelization of RBFOpt: Training and assessing one neural network can take several hours, making objective-function evaluation the dominant cost of hyperparameter optimization.The objective function is the performance of the tested neural network.
  • Parallelization of RBFOpt: The extension uses a task queue that assigns objective evaluations and new search-point computations to available processors asynchronously.Objective-evaluation tasks receive priority because they take longer.

Computational experiments

The empirical study covers a standard MNIST benchmark and a drug-related application evaluated on public WordNet and FreeBase datasets as well as non-public datasets.

  • Computational experiments: The study first evaluates the methodology on the publicly available MNIST benchmark dataset.MNIST is used as the standard benchmark dataset.
  • Computational experiments: A specific application is evaluated on publicly available WordNet and FreeBase datasets and on non-public datasets.This application uses proprietary code.

Experiments on the MNIST dataset

On MNIST, RBFOpt is compared with random search and SMAC under matched hyperparameter spaces and repeated random seeds. The reported results show that RBFOpt and SMAC outperform random search early, while the proposed formulation achieves comparable accuracy with substantially lower optimization time than the naive formulation.

  • Experiments on the MNIST dataset: The MNIST case study compares RBFOpt, random search, and SMAC on convolutional neural networks using the same hyperparameter space.Each algorithm is run with 10 different random seeds, using the same seeds across methods.
  • Experiments on the MNIST dataset: After 50 iterations, both RBFOpt and SMAC perform better than random search.The results are summarized using test-set accuracy, validation-accuracy snapshots, repeated runs, and statistical testing.
  • Experiments on the MNIST dataset: The naive and proposed formulations each achieve higher validation accuracy in 5 out of 10 runs after 100 iterations.The comparison uses RBFOpt under the same experimental framework.
  • Experiments on the MNIST dataset: The naive formulation requires an average CPU time 3.6 times larger than the proposed formulation.The larger time requirement is attributed to the naive formulation mostly exploring dense neural networks.

Description of the application to drug-drug interaction

The paper applies neural-network hyperparameter optimization to drug-drug interaction prediction within the Tiresias system, while also evaluating the framework on benchmark knowledge-graph tasks.

  • Tiresias receives drug-related data and knowledge and produces drug-drug interaction predictions, addressing a problem associated with preventable adverse drug reactions.
  • The application uses a multi-layer perceptron to predict DDIs directly from the fingerprints of two drugs.
  • The optimized hyperparameters include network depth, hidden-unit counts, activation functions, pre-training, and several learning parameters.
  • The authors also test Tiresias on publicly available multi-relational datasets to enable comparison with reported state-of-the-art results.

Numerical results using Tiresias

Experiments show that Tiresias with RBFOpt can find competitive or superior configurations across benchmark and DDI tasks, while asynchronous parallelism substantially reduces reported runtime.

  • Within fewer than 30 search iterations, WN performance shows a clear jump, followed by another improvement at about 70 iterations.The search alternates between exploration and exploitation, producing oscillations in the progress curves.
  • RBFOpt + Tiresias is significantly better than the previously reported best results on WN for both mean rank and hits@10.
  • On FB15k raw results, RBFOpt + Tiresias achieves mean rank 168 versus 243 and hits@10 47.9% versus 34.9% for TransE.
  • Parallel search reaches 76.6% accuracy and 290 mean rank, comparable to sequential search, while reducing runtime from approximately 92 hours to 19 hours.The parallel run evaluated approximately 160 configurations, compared with approximately 130 for the serial run.
  • For DDI prediction, the optimized configuration reaches 53.59% test accuracy versus 47.35% for a domain-expert configuration.The optimized configuration uses two hidden layers, whereas the domain-expert configuration uses one.

Conclusion

The paper presents an open-source derivative-free methodology for neural-network hyperparameter optimization and reports empirically competitive or improved prediction accuracy across benchmark and application tasks.

  • The methodology casts hyperparameter optimization as a derivative-free optimization problem and provides a corresponding software implementation.
  • Empirically, the method finds hyperparameters with higher prediction accuracy than those determined by a domain expert.
  • On benchmark instances, the results are at least comparable to and sometimes better than random search and sequential model-based algorithm configuration.
  • The authors identify choosing the number of training epochs as future work because the current methodology does not optimize that quantity.
Loading 1705.08520v1…