JMLR: Workshop and Conference Proceedings 1:1–8, 2017

ICML 2017 AutoML Workshop

Towards Automated Bayesian Optimization Gustavo Malkomes Roman Garnett

[email protected] [email protected]

Department of Computer Science and Engineering Washington University in St. Louis, St. Louis, MO 63130

Abstract Bayesian optimization is a powerful tool for global optimization of expensive functions. One of its key components is the underlying probabilistic model used for the objective function f . In practice, however, it is often unclear how one should appropriately choose a model, especially when gathering data is expensive. In this work, we introduce a novel automated Bayesian optimization approach that dynamically selects promising models for explaining the observed data without human intervention. Crucially, we account for the uncertainty in the model choice; our method is capable of using multiple models to represent its current belief about f and subsequently using this information for decision making. We argue, and demonstrate empirically, that our approach automatically finds suitable models for the objective function, which ultimately results in more-efficient optimization.

1. Introduction Global optimization of expensive gradient-free functions has long been a critical component of many complex problems in science and engineering. As an illustrative example, imagine that we want to tune the hyperparameters (e.g., learning rate) of a deep neural network in a self-driving car. That is, we want to maximize the generalization performance of the machine learning algorithm, but the functional form of the objective function f is unknown and even a single function evaluation is costly — it might take hours (or even days!) to train a neural network. These features render the optimization particularly difficult. Bayesian optimization has nonetheless shown remarkable success on optimizing expensive gradient-free functions (Jones et al., 1998; Bergstra et al., 2011; Snoek et al., 2012). Bayesian optimization works by maintaining a probabilistic belief about the objective function and designing a so-called acquisition function that intelligently selects where to evaluate f next. Although acquisition functions have been the subject of a great deal of research, how to appropriately model f has received comparatively less attention (Shahriari et al., 2016), despite being a decisive factor for the algorithm’s performance. Inspired by some recent developments on automated model selection (Malkomes et al., 2016; Gardner et al., 2017), we show how to automatically and dynamically select appropriate models for Bayesian optimization. Our framework could be extended to any probabilistic model, but here we focus on Gaussian processes models, which are a standard modeling tool for Bayesian optimization. Crucially, our method does not prematurely commit to a single model; instead, it uses several models to form a belief about the objective function and plan where the next evaluation should be. Our adaptive (multi-)model selection approach

c 2017 G. Malkomes & R. Garnett.

Malkomes Garnett

accounts for model uncertainty, which more realistically copes with the limited information available in practical Bayesian optimization application. Finally, we empirically demonstrate that our approach outperforms standard baselines across several test functions.

2. Bayesian optimization with multiple models Suppose we want to optimize an expensive, often black-box, function f : X → R on some bounded set X ⊆ X . We may query f at any point x and observe a possibly noisy value y = f (x) + ε. Our ultimate goal is to find the global optimum: xopt = arg min f (x)

(1)

x∈X

through a sequence of evaluations of the objective function f . This problem becomes particularly challenging when we have a limited number of function evaluations, representing a real-world budget B associated to the cost of evaluating f . Throughout of this text, we denote by D the set of gathered observations D = (X, y), where X is the design matrix of input variables xi ∈ X , and y is the respective vector of function values yi = f (xi ) + ε. 2.1. Modeling the objective function Assume we are given a prior distribution over the objective function p(f ) and, after observing new information, we have means of updating our belief about f using Bayes’ rule: p(f | D) =

p(D | f )p(f ) . p(D)

(2)

The posterior distribution above is then used for decision making, i.e., selecting the x we should query next. When dealing with a single model, the posterior distribution (2) suffices. Here, however, we want to make our model of f more flexible, accounting for potential misspecification. Suppose we are given a collection of probabilistic models P = {Mi } that offer plausible explanations for the data. Each M ∈ P is a set of probability distributions indexed by a parameter θ from the corresponding model’s parameter space ΘM . With multiple models, we need a means of aggregating their beliefs. We take a fully Bayesian approach and we use the model evidence (or marginal likelihood ), the probability of generating the observed data given a model M, Z p(y | X, M) = p(y | X, θ, M)p(θ | M) dθ, (3) ΘM

as the key quantity for measuring the fit of each model to the data. The evidence integrates over the parameters θ to account for every explanation of the data given by the model. Given (3), one can easily compute the model posterior, p(y | X, M)p(M) , i p(y | X, Mi )p(Mi )

p(M | D) = P

2

Automated Bayesian Optimization

where p(M) represents the prior probability distribution over the models. The model posterior gives us a principled way of combining the beliefs of all models. Our model of f can be now summarized with the following model-marginalized posterior distribution X p(f | D) = p(Mi | D) p(f | D, Mi ) (4) i

=

X

Z p(Mi | D)

p(f | D, θ, Mi ) p(θ | D, Mi ) dθ,

(5)

ΘM

i

which takes into consideration all plausible models Mi ∈ P and (approximately1 ) accounts for the uncertainty in each model’s hyperparameters θ ∈ ΘM . Next, we describe how to use (4) to intelligently optimize the objective function. 2.2. Selecting where to evaluate next Given our belief about f , we want to use this information to select which point x we want to evaluate next. This is typically done by maximizing a so-called acquisition function α : X → R. Instead of solving (1) directly, we optimize the proxy (and simpler) problem x∗ = arg max α(x; D).

(6)

x∈X

Here we use expected improvement (ei) (Moˇckus, 1975) as our acquisition function. Suppose that f 0 is the minimal value observed so far.2 ei selects the point x that, in expectation, improves upon f 0 the most:   αei (x ; D, M) = Ef max(f 0 − f, 0) Z = max(f 0 − f, 0) p(f | x, D, M) df. f

Note that if p(f | x, D, M) is a Gaussian distribution (or can be approximated as one), the expected improvement can be computed in closed form. Usually, acquisition functions are evaluated for a given model choice M. As before, we want to incorporate multiple models in this framework. For ei, we can easily take into account all models as follows: Z αei (x ; D) = max(f 0 − f, 0) p(f | x, D) df. f Z X = p(Mi | D) max(f 0 − f, 0) p(f | x, D, Mi ) df i

=

X

f

  p(Mi | D) αei (x ; D, Mi ) = EM αei (x ; D, M) .

(7)

i

We could also derive similar results for other acquisition functions such as probability of improvement (Kushner, 1964) and gp upper confidence bound (Srinivas et al., 2010). 1. In practice, the integral over the hyperparameters θ is often intractable. Here, we use the approach described in Gardner et al. (2015) (Section 3.1). We refer the reader to the original work for details. 2. Computing the expected improvement with noisy observations is known to be a difficult problem. Here we make a simplifying assumption that the noise level is small, thus we can say that f 0 ≈ mini yi .

3

Malkomes Garnett

3. Automated Bayesian optimization In this section, we introduce our automated method for Bayesian optimization. We begin with a brief introduction to Gaussian processes and then we review a previously proposed method for automated model selection of fixed-size datasets. Finally, we describe how we can combine all these ideas into our automated Bayesian optimization framework. 3.1. Gaussian processes models In this section we describe the class of models that we consider in this work. In principle, however, any probabilistic model could be used. We take a standard nonparametric approach and place a Gaussian process (gp) prior distribution on f , p(f ) = GP(f ; µ, K), where µ : X → R is a mean function and K : X 2 → R is a positive-semidefinite covariance function or kernel. Both µ and K have hyperparameters, which we conveniently concatenate into a single vector θ. To connect to our framework, a gp model M comprises µ, K and its associated hyperparameters θ. Thanks to the elegant marginalization properties of the Gaussian distribution, computing the posterior distribution p(f | θ, D) can be done in closed form, if we assume a standard Gaussian likelihood observation model, ε ∼ N (0, σ 2 ). For a complete exposition on gps, please see Rasmussen and Williams (2006). Gaussian processes are extremely powerful modeling tools. Their success, however, heavily depends on an appropriate choice of the mean function µ and covariance function K. In some cases, a domain expert might have an informative opinion about which gp model could be more fruitful. Here, however, we want to avoid human intervention and propose an automatic approach. Our first step is to consider a space of gp models that is general enough to explain virtually any dataset. We adopt the generative kernel grammar of Duvenaud et al. (2013) due to its ability of creating arbitrarily complex models. Then, we must have an efficient automated method for selecting promising models from this given space. Fortunately, this was accomplished by the work of Malkomes et al. (2016), which we summarize next. 3.2. Automated model selection for fixed-size datasets Suppose we are given a space of probabilistic models M such as the above-cited generative kernel grammar. As mentioned before, the key quantity for model comparison in a Bayesian framework is the model evidence (3). Malkomes et al. (2016) have shown that we can search for promising models M ∈ M by viewing the evidence as a function g : M → R to be optimized. Their method consists of a Bayesian optimization approach to model selection (boms), in which we try to find the optimal model Mopt = arg max g(M; D),

(8)

M∈M

where g(M; D) is the (log) model evidence: g(M; D) = log p(y | X, M). Two key aspects of their method deserves special attention: their unusual gp prior, p(g) = GP(g; µg , Kg ), where the mean and covariance functions are appropriately defined over the model space M; and their heuristic for traversing M by maintaining an active set of models C, which tries to balance exploration against exploitation throughout the search. Due to limited space,

4

Automated Bayesian Optimization

we refer the reader to the original work. Nevertheless, it is important to note that their approach was shown to be more efficient than previous methods. 3.3. Automated Bayesian optimization with Gaussian processes Here we want to describe our automated Bayesian optimization (abo) algorithm. First, we initialize our set of promising models P with all models of depth one in the grammar of kernels (Duvenaud et al., 2013) that has the squared exponential kernel (se) and the rational quadratic kernel (rq) as “base” kernels. If the input domain X has dimensionality d > 2, we randomly sample 4d models and exclude the others. Then, at each iteration: we find the next location x∗ using (7) and all models M ∈ P; evaluate y ∗ = f (x∗ ) + ε; update all models with new data, recomputing the corresponding model evidence; exclude all models that are unlikely to explain the current data p(M | D) < 0.001; and, before completing the iteration, we use boms (Section 3.2) to include more promising candidate models in P. A couple of adaptations of boms are indeed appropriate. In this active learning setup, we do not want to restart boms every iteration; that would make the search for good candidate models inefficient. Thus we just update the active set of models at every function call to boms. Secondly, we normalize the evidence across the iterations, which effectively makes us change the original evidence function g to: g(M;   D) = log p(y | X, M)/|D|. Further, all previously gathered data Dg = Mi , g(Mi ; D) for boms are reused. Rigorously, that would require recomputing all previous evidences since the data D is changing every iteration. We adopt a less-accurate but more-efficient approach that assumes that our evidence computations are corrupted by heterogeneous noise. The noise variance for a measurement when |D| = n is set to σg2 /n for a small constant σg (e.g., 0.5). By modeling earlier evidence computations as noisier, we avoid recomputing the model evidence of previous models every round, but we still make the search for good models better informed.

4. Experiments To validate our approach we use test functions commonly used as benchmarks for optimization (Surjanovic and Bingham, 2013). The goal is to find the global minimum of each test function given a limited number of function evaluations. We provide more information about the chosen functions in Table 1. Each experiment was executed five times with different random initialization of five data points. The maximum number of function evaluations was limited to 10 times the dimensionality of the function domain being optimized. We compare our approach with several Bayesian optimization alternatives. First, we considered baselines that use only one model as a surrogate for the test function in question. We use the isotropic squared exponential kernel (se), the isotropic rational quadratic kernel (rq) and the automatic relevance determination squared exponential (ard se) kernel as the three initial baselines. For these methods, we use the expected improvement as the acquisition function. Then, we considered two more baselines that represent the uncertainty about the unknown function through a combination of multiple models. One baseline uses the same collection of predefined models throughout of its execution; we refer to this approach as the bag of models (bom). The other is an adaptation of the method proposed in Gardner 5

Malkomes Garnett

Table 1: Mean “gap” measure over five different random initialization of the initial points for varies test function and methods. The analytic form of these functions can be found in http://www.sfu.ca/~ssurjano/optimization.html. test function Branin Six-Hump Camel Drop-Wave Mccormick Ackley Alpine2

domain

rq

se

ard se

bom

mcmc

abo

[−5, 10] × [0, 15] [−3, 3] × [−2, 2] [−5.12, 5.12]2 [−1.5, 4] × [−3, 4] [−5, 5]5 [0, 10]2

0.870 0.771 0.244 1.00 1.00 0.820

0.856 0.701 0.372 1.00 0.794 0.862

0.929 0.554 0.413 1.00 0.724 0.881

0.985 0.851 0.430 1.00 0.372 0.864

0.901 0.787 0.362 1.00 1.00 0.888

0.993 0.873 0.492 1.00 1.00 0.851

0.784

0.764

0.750

0.750

0.823

0.868

Mean

et al. (2017) (mcmc), which, similar to abo, is allowed to dynamically select more models every iteration. Here, instead of using the additive class of models proposed in the original work, we adapted their Metropolis–Hastings algorithm to the more-general compositional grammar proposed by Duvenaud et al. (2013), which is also used by our method. This choice lets us compare which adaptive strategy performs better in practice. Both adaptive algorithms (abo and mcmc) are allowed to perform five model evidence computations before each function evaluation; abo queries five new models and mcmc performs five new proposals. At the first iteration, both methods start with the same selection of models 3.3. Model choice and acquisition functions apart, we kept all configurations the same. All methods used l-bfgs, with two restarts to avoid bad local optima, in order to optimize the model hyperparameters when approximating the hyperparameter posterior p(θ | D, M) as a Gaussian using Laplace’s method, as in Section 3.1 of Gardner et al. (2015); each l-bfgs restart begins from a sample of p(θ | M); the Laplace approximation also give us an estimate of the model evidence; and the method of Osborne et al. (2012) (Section 4) was further used to account for uncertainty in the hyperparameters. We maximized all acquisition functions by densely sampling 10000d2 points from a d-dimensional low-discrepancy sequence (Sobol). We report the results with the “gap” measure (Huang et al., 2006), defined as gap ←

f (xfirst ) − f (xbest ) , f (xfirst ) − f (xopt )

where f (xfirst ) is the minimum function value among the first initial random points, f (xbest ) is the best value found by the method, and f (xopt ) is the global minimum. Table 1 shows the results across different functions and methods. First, we notice that abo usually outperforms the baselines or is tied in first place (5 out of 6 times). mcmc also has a high overall performance and bom is also very competitive. The exception is for the Ackley function, in which the initial bag of models was limited to 30 random models out of the 120 possible models of depth 1. These results give initial evidence that using multiple models could lead to more robustness to model misspecification in Bayesian optimization.

6

Automated Bayesian Optimization

5. Conclusion We introduced a novel automated Bayesian optimization approach that uses multiple models to represent its belief about the objective function f and subsequently decide where to query f next. Our method automatically and efficiently searches for better models as more data is gathered. Initial empirical results show that the proposed algorithm usually outperforms all baselines.

Acknowledgments gm, and rg were supported by the National Science Foundation (nsf) under award number iia–1355406. gm was also supported by the Brazilian Federal Agency for Support and Evaluation of Graduate Education (capes).

References James S. Bergstra, R´emi Bardenet, Yoshua Bengio, and Bal´azs K´egl. Algorithms for hyper-parameter optimization. In Conference on Neural Information Processing Systems (NIPS). 2011. David Duvenaud, James R. Lloyd, Roger Grosse, Joshua B. Tenenbaum, and Zoubin Ghahramani. Structure discovery in nonparametric regression through compositional kernel search. In International Conference on Machine Learning (ICML), 2013. Jacob R. Gardner, Gustavo Malkomes, Roman Garnett, Kilian Q. Weinberger, Dennis Barbour, and John P. Cunningham. Bayesian active model selection with an application to automated audiometry. In Conference on Neural Information Processing Systems (NIPS), 2015. Jacob R. Gardner, Chuan Guo, Kilian Q. Weinberger, Roman Garnett, and Roger Grosse. Discovering and exploiting additive structure for Bayesian optimization. In International Conference on Artificial Intelligence and Statistics (AISTATS), 2017. Deng Huang, Theodore T. Allen, William I. Notz, and Ning Zeng. Global optimization of stochastic black-box systems via sequential kriging meta-models. Journal of Global optimization, 34:441–466, 2006. Donald R. Jones, Matthias Schonlau, and William J. Welch. Efficient global optimization of expensive black-box functions. Journal of Global optimization, 13:455–492, 1998. Harold J. Kushner. A new method of locating the maximum point of an arbitrary multipeak curve in the presence of noise. Journal of Basic Engineering, 86:97–106, 1964. Gustavo Malkomes, Charles Schaff, and Roman Garnett. Bayesian optimization for automated model selection. In Conference on Neural Information Processing Systems (NIPS), 2016. J. Moˇckus. On Bayesian methods for seeking the extremum, pages 400–404. Springer, 1975. Michael A. Osborne, David Duvenaud, Roman Garnett, Carl E. Rasmussen, Stephen J. Roberts, and Zoubin Ghahramani. Active learning of model evidence using Bayesian quadrature. In Conference on Neural Information Processing Systems (NIPS), 2012. Carl E. Rasmussen and Christopher K. I. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006.

7

Malkomes Garnett

Bobak Shahriari, Kevin Swersky, Ziyu Wang, Ryan P. Adams, and Nando de Freitas. Taking the human out of the loop: A review of Bayesian optimization. Proceedings of the IEEE, 104:148–175, 2016. Jasper Snoek, Hugo Larochelle, and Ryan P. Adams. Practical Bayesian optimization of machine learning algorithms. In Conference on Neural Information Processing Systems (NIPS), 2012. Niranjan Srinivas, Andreas Krause, Sham Kakade, and Matthias Seeger. Gaussian process optimization in the bandit setting: No regret and experimental design. In International Conference on Machine Learning (ICML), 2010. Sonja Surjanovic and Derek Bingham. Optimization test problems. ~ssurjano/optimization.html, 2013. Accessed: 2017-03-15.

8

https://www.sfu.ca/

Towards Automated Bayesian Optimization

of many complex problems in science and engineering. ... machine learning algorithm, but the functional form of the objective function f is unknown and even a ...

266KB Sizes 5 Downloads 324 Views

Recommend Documents

Bayesian Optimization for Likelihood-Free Inference
Sep 14, 2016 - There are several flavors of likelihood-free inference. In. Bayesian ..... IEEE. Conference on Systems, Man and Cybernetics, 2: 1241–1246, 1992.

Human Factors of Automated Driving: Towards Predicting the Effects ...
Interface. Human driving behaviour. Longitudinal and lateral dynamics. Vehicle. Road and traffic flow conditions. Driver capabilities. Environmental conditions ... Congestion. Automated driving. What are the effects on traffic flow efficiency? Accide

Towards Automated Auditing for Network Configuration ...
Existing auditing tools ... (i) Bottom-up Data Mining: We used data mining techniques to uncover potentially ... diting tools must evolve over time with operator-driven feedback so that only ... The operators indicated that although best practice.

Towards Automated Auditing for Network Configuration ...
General Terms: Management, Measurement. Keywords: Configuration changes, Network auditing automation. 1. INTRODUCTION. One of the most challenging ...

Towards fully automated axiom extraction for finite ...
This note will report on the first developments towards the implementation of a fully automated system for the extraction of adequate proof-theoretical.

Towards Automated Testing and Fixing of Re ...
in [21], Le Goues et al. presented a scalable genetic cloud computing oriented technique ... [1] http://www.configurator-database.com, 2011. [2] S. She, R. Lotufo, ...

Towards fully automated axiom extraction for finite ...
Key words: Many-valued logics, tableaux, automated theorem proving. 1 Introduction. This note will report on the first developments towards the implementation.

Im2Calories: towards an automated mobile ... - Research at Google
“DeepLab” system from [6].10 This model uses a CNN to provide the unary potentials .... tectors (the multi-label classifiers) to the Android mobile phone system.

VAMO: Towards a Fully Automated Malware ... - Semantic Scholar
[10] A. K. Jain, M. N. Murty, and P. J. Flynn. Data clustering: a review. ACM Comput. Surv., 31(3):264–323, 1999. [11] J. Jang, D. Brumley, and S. Venkataraman.

VAMO: Towards a Fully Automated Malware ... - Semantic Scholar
Dept. of Computer Science. University of Georgia. Athens .... 11, 15, 18]) on M to partition it in a number of malware clusters, (b) use VAMO to build a reference.

Towards Automated Detection and Regulation of ...
approach to the writing process developed by Rijlaarsdam and Bergh [3, 4]. Re- searchers have also proposed some automated systems to help students ...

Automated Locality Optimization Based on the ... - Semantic Scholar
applications string operations take 2 of the top 10 spots. ... 1, where the memcpy source is read again .... A web search showed 10 times more matches for optimize memcpy than for ..... other monitoring processes, such as debuggers or sandboxes. ...

eBook Machine Learning: A Bayesian and Optimization ...
[Download] eBook Machine Learning: A Bayesian ... Hands-On Machine Learning with Scikit-Learn and TensorFlow ... Neural Network Design (2nd Edition).

Bayesian Optimization for a Better Dessert - Research at Google
in ML models, with Bayesian Optimization [12], randomized search [2], and algorithms such as ... gave us a response, yielding 31±6 forms per tasting. ... Vizier's database. Mostly, recipes were edited early on; later, the chefs became more confident

Black Box Optimization via a Bayesian ... - Research at Google
It is fast and easy to implement, and has performance comparable to CMA–ES on a suite of benchmarks while spending less CPU in the optimization algorithm, and can exhibit better overall performance than Bayesian Optimization when the objective func