Explaining Hyperparameter Optimization via Partial Dependence Plots

1 Introduction . Most machine learning ( ML ) algorithms are highly configurable . Their hyperparameters must be chosen carefully , as their choice often impacts the model performance . Even for experts , it can be challenging to find well-performing hyperparameter configurations . Automated machine learning ( AutoML ) systems and methods for automated HPO have been shown to yield considerable efficiency compared to manual tuning by human experts [ Snoek et al. , 2012 ] . However , these approaches mainly return a well-performing configuration and leave users without insights into decisions of the optimization process . Questions about the importance of hyperparameters or their effects on the resulting performance often remain unanswered . Not all data scientists trust the outcome of an AutoML system due to the lack of transparency [ Drozdal et al. , 2020 ] . Consequently , they might not deploy an AutoML model , despite all performance gains . Providing insights into the search process may help increase trust and facilitate interactive and exploratory processes : A data scientist could monitor the AutoML process and make changes to it ( e.g. , restricting or expanding the search space ) already during optimization to anticipate unintended results . Transparency , trust , and understanding of the inner workings of an AutoML system can be increased by interpreting the internal surrogate model of an AutoML approach . For example , BO trains a surrogate model to approximate the relationship between hyperparameter configurations and model performance . It is used to guide the optimization process towards the most promising regions of the hyperparameter space . Hence , surrogate models implicitly contain information about the influence of ⇤These authors contributed equally to this work . 35th Conference on Neural Information Processing Systems ( NeurIPS 2021 ) . hyperparameters . If the interpretation of the surrogate matches with a data scientist ’ s expectation , confidence in the correct functioning of the system may be increased . If these do not match , it provides an opportunity to look either for bugs in the code or for new theoretical insights . We propose to analyze surrogate models with methods from IML to provide insights into the results of HPO . In the context of BO , typical choices for surrogate models are flexible , probabilistic blackbox models , such as Gaussian processes ( GP ) or random forests . Interpreting the effect of single hyperparameters on the performance of the model to be tuned is analogous to interpreting the feature effect of the black-box surrogate model . We focus on the PDP [ Friedman , 2001 ] , which is a widely-used method2 to visualize the average marginal effect of single features on a black-box model ’ s prediction . When applied to surrogate models , they provide information on how a specific hyperparameter influences the estimated model performance . However , applying PDPs out of the box to surrogate models might lead to misleading conclusions . Efficient optimizers such as BO tend to focus on exploiting promising regions of the hyperparameter space while leaving other regions less explored . Therefore , a sampling bias in input space is introduced , which in turn can lead to a poor fit and biased interpretations in underexplored regions of the space . Contributions : We study the problem of sampling bias in experimental data produced by AutoML systems and the resulting bias of the surrogate model and assess its implications on PDPs . We then derive an uncertainty measure for PDPs of probabilistic surrogate models . In addition , we propose a method that splits the hyperparameter space into interpretable sub-regions of varying uncertainty to obtain sub-regions with more reliable and confident PDP estimates . In the context of BO , we provide evidence for the usefulness of our proposed methods on a synthetic function and in an experimental study in which we optimize the architecture and hyperparameters of a deep neural network . Our Supplementary Material provides ( A ) more background related to uncertainty estimates , ( B ) notes on how our methods are applied to hierarchical hyperparameter spaces , ( C ) details on the experimental setup and more detailed results , ( D ) a link to the source code . Reproducibility and Open Science : The implementation of the proposed methods as well as reproducible scripts for the experimental analysis are provided in a public git-repository3 . 2 Background and Related Work . Recent research has begun to question whether the evaluation of an AutoML system should be purely based on the generated models ’ predictive performance without considering interpretability [ Hutter et al. , 2014a , Pfisterer et al. , 2019 , Freitas , 2019 , Xanthopoulos et al. , 2020 ] . Interpreting AutoML systems can be categorized as ( 1 ) interpreting the resulting ML model on the underlying dataset , or ( 2 ) interpreting the HPO process itself . In this paper , we focus on the latter . Let c : ⇤ ! R be a black-box cost function , mapping a hyperparameter configuration = ( 1 , ... , d ) to the model error4 obtained by a learning algorithm with configuration . The hyperparameter space may be mixed , containing categorical and continuous hyperparameters . The goal of HPO is to find ⇤ 2 argmin 2⇤ c ( ) . Throughout the paper , we assume that a surrogate model ĉ : ⇤ ! R is given as an approximation to c. If the surrogate is assumed to be a GP , ĉ ( ) is a random variable following a Gaussian posterior distribution . In particular , for any finite indexed family of hyperparameter configurations ( 1 ) , ... , ( k ) 2 ⇤k , the vector of estimated performance values is Gaussian with a posterior mean m̂ = m̂ ( i ) i=1 , ... , k and covariance K̂ = ⇣ k̂ ( i ) , ( j ) ⌘ i , j=1 , ... , k . Hyperparameter Importance . Understanding which hyperparameters influence model performance can provide valuable insights into the tuning strategy [ Probst et al. , 2019 ] . To quantify relevance of hyperparameters , models that inherently quantify feature relevance – e.g. , GPs with ARD kernel [ Neil , 1996 ] – can be used as surrogate models . Hutter et al . [ 2014a ] quantified the importance of hyperparameters based on a random forest fitted on data generated by BO , for which the importance of both the main and the interaction effects of hyperparameters was calculated by a functional ANOVA approach . Similarly , Sharma et al . [ 2019 ] quantified the hyperparameter importance of 2There exist various implementations [ Greenwell , 2017 , Pedregosa et al. , 2011 ] ) , extensions [ Greenwell et al. , 2018 , Goldstein et al. , 2015 ] and applications [ Friedman and Meulman , 2003 , Cutler et al. , 2007 ] . 3https : //github.com/slds-lmu/paper_2021_xautoml 4Typically , the model error is estimated via cross-validation or hold-out testing . residual neural networks . These works highlight how useful it is to quantify the importance of hyperparameters . However , importance scores do not show how a specific hyperparameter affects the model performance according to the surrogate model . Therefore , we propose to visualize the assumed marginal effect of a hyperparameter . A model-agnostic interpretation method that can be used for this purpose is the PDP . PDPs for Hyperparameters . Let S ⇢ { 1 , 2 , ... , d } denote an index set of features , and let C = { 1 , 2 , ... , d } \ S be its complement . The partial dependence ( PD ) function [ Friedman , 2001 ] of c : ⇤ ! R for hyperparameter ( s ) S is defined as5 cS ( S ) : = E C [ c ( ) ] = Z ⇤C c ( S , C ) dP ( C ) . ( 1 ) When analyzing the PDP of hyperparameters , we are usually interested in how their values S impact model performance uniformly across the hyperparameter space . In line with prior work [ Hutter et al. , 2014a ] , we therefore assume P to be the uniform distribution over ⇤C . Computing cS ( S ) exactly is usually not possible because c is unknown and expensive to evaluate in the context of HPO . Thus , the posterior mean m̂ of the probabilistic surrogate model ĉ ( ) is commonly used as a proxy for c. Furthermore , the integral may not be analytically tractable for arbitrary surrogate models ĉ . Hence , the integral is approximated by Monte Carlo integration , i.e. , ĉS ( S ) = 1 n Xn i=1 m̂ ⇣ S , ( i ) C ⌘ ( 2 ) for a sample ⇣ ( i ) C ⌘ i=1 , ... , n ⇠ P ( C ) . m̂ ⇣ S , ( i ) C ⌘ represents the marginal effect of S for one specific instance i . Individual conditional expectation ( ICE ) curves [ Goldstein et al. , 2015 ] visualize the marginal effect of the i-th observation by plotting the value of m̂ ⇣ S , ( i ) C ⌘ against S for a set of grid points6 ( g ) S 2 ⇤S , g 2 { 1 , ... , G } . Analogously , the PDP visualizes ĉS ( S ) against the grid points . Following from Eq . 2 , the PDP visualizes the average over all ICE curves . In HPO , the marginal predicted performance is a related concept . Instead of approximating the integral via Monte Carlo , the integral over ĉ is computed exactly . Hutter et al . [ 2014a ] propose an efficient approach to compute this integral for random forest surrogate models . Uncertainty Quantification in PDPs . Quantifying the uncertainty of PDPs provides additional information about the reliability of the mean estimator . Hutter et al . [ 2014a ] quantified the model uncertainty specifically for random forests as surrogates in BO by calculating the standard deviation of the marginal predictions of the individual trees . However , this procedure is not applicable to general probabilistic surrogate models , such as the commonly used GP . There are approaches that quantify the uncertainty for ML models that do not provide uncertainty estimates out-of-the-box . Cafri and Bailey [ 2016 ] suggested a bootstrap approach for tree ensembles to quantify the uncertainties of effects based on PDPs . Another approach to quantify the uncertainty of PDPs is to leverage the ICE curves . For example , Greenwell [ 2017 ] implemented a method that marginalizes over the mean ± standard deviation of the ICE curves for each grid point . However , this approach quantifies the underlying uncertainty of the data at hand rather than the model uncertainty , as explained in Appendix A.1 . A model-agnostic estimate based on uncertainty estimates for probabilistic models is missing so far . Subgroup PDPs . Recently , a new research direction concentrates on finding more reliable PDP estimates within subgroups of observations . Molnar et al . [ 2020 ] focused on problems in PDP estimation with correlated features . To that end , they apply transformation trees to find homogeneous subgroups and then visualize a PDP for each subgroup . Grömping [ 2020 ] looked at the same problem and also uses subgroup PDPs , where ICE curves are grouped regarding a correlated feature . Britton [ 2019 ] applied a clustering approach to group ICE curves to find interactions between features . However , none of these approaches aim at finding subgroups where reliable PDP estimates have low uncertainty . Additionally , to the best of our knowledge , nothing similar exists for analyzing experimental data created by HPO . 5To keep notation simple , we denote c ( ) as a function of two arguments ( S , C ) to differentiate components in the index set S from those in the complement . The integral shall be understood as a multiple integral of c where j , j 2 C , are integrated out . 6Grid points are typically chosen as an equidistant grid or sampled from P ( S ) . The granularity G is chosen by the user . For categorical features , the granularity typically corresponds to the number of categories .

Summary: The paper presents several ideas to help understand and interpret the effects of different hyperparameters on the model chosen by automated machine learning.   The contributions include proposing an uncertainty measure for PDPs of probabilistic surrogate models including Bayesian optimization and others. To further increase interpretability, the paper suggests a procedure of dividing the hyperparameter space into subspaces/sub-regions, so that the hyperparameter effect of sub-regions can be analyzed individually.   The experiment results of the d-dimensional Styblinski-Tang function show the PDPs for surrogate models trained on less biased data produces lower values of the NLL and MC. , as well as lower values for the MC. Splitting into sub-regions helps to reduce MC generally. For high sampling bias, MC seems decrease when splitting 1 or 3 times, however, NLL can become worse in some cases.   In the other experiment, the paper studies HPO for 35 different OpenML classification tasks. The study found that the MC of the PDPs reduces significantly after 6 splits when comparing the PDP in sub-regions with the global PDP.