Abstract
Hyperparameter optimization (HPO) is a crucial step in achieving strong predictive performance. However, the impact of individual hyperparameters on model generalization is highly context-dependent, prohibiting a one-size-fits-all solution and requiring opaque automated machine learning (AutoML) systems to find optimal configurations. The black-box nature of most AutoML systems undermines user trust and discourages adoption. To address this, we propose a game-theoretic explainability framework for HPO that is based on Shapley values and interactions. Our approach provides an additive decomposition of a performance measure across hyperparameters, enabling local and global explanations of hyperparameter importance and interactions. The framework, named HyperSHAP, offers insights into ablations, the tunability of learning algorithms, and optimizer behavior across different hyperparameter spaces. We evaluate HyperSHAP on various HPO benchmarks by analyzing the interaction structure of the HPO problem. Our results show that while higher-order interactions exist, most performance improvements can be explained by focusing on lower-order representations.
Introduction
Hyperparameter optimization (HPO) is often the "secret sauce" of modern machine learning, making the difference between mediocre and state-of-the-art performance. Despite its importance, HPO remains largely a "black box." Existing importance measures, such as fANOVA, typically focus on sensitivity—how much performance varies as a parameter changes. However, high sensitivity doesn't necessarily translate to a high potential for improvement. Practitioners are often more interested in tunability: identifying which subset of parameters, if tuned within a limited budget, will yield the greatest performance gains. Furthermore, hyperparameters often exhibit complex synergies that traditional methods fail to quantify.
The HyperSHAP Framework
HyperSHAP addresses these challenges by treating HPO as a cooperative game where hyperparameters are "players" and model performance is the "payout." By calculating Shapley values and interactions, it provides an additive decomposition of performance across hyperparameters.
The framework defines five distinct "explanation games":
- Ablation Game: Explains why an optimized configuration outperforms a default.
- Sensitivity Game: Measures performance fluctuation across the search space.
- Tunability Game: Quantifies the maximum possible gain from tuning specific parameter subsets.
- Optimizer Bias Game: Identifies where specific optimizers fail to reach the search space's potential.
- Multi-Dataset Game: Aggregates insights across tasks to determine global importance.
To maintain computational efficiency, HyperSHAP utilizes surrogate models—often already generated during HPO—to approximate the performance landscape. It then applies Shapley Interaction Indices (FSII) to decompose results into individual effects and pairwise interactions.
Experimental Evaluation
HyperSHAP was evaluated on four diverse benchmarks: lcbench (neural architecture/HPO for Auto-PyTorch), rbv2_ranger (Random Forest tuning), PD1 (deep learning tasks like Transformers and ResNet), and JAHS-Bench-201 (joint NAS and HPO).
Key Results and Insights
- Tunability vs. Sensitivity: The framework demonstrates that tunability offers more actionable advice than sensitivity. Focusing on parameters that drive the model toward a global maximum is more effective than focusing on those that simply cause high variance.
- The "Rule of Three": A significant finding is that most performance improvements are explained by lower-order interactions. As shown in the analysis of interaction structures, looking at interactions up to the 3rd order captures the majority of the explanatory power.
- Superior Feature Selection: Subsets suggested by HyperSHAP's Tunability game consistently outperformed those chosen by fANOVA in terms of "anytime performance," reaching higher accuracy faster.
- Efficiency and Rigor: Despite the complexity of Shapley calculations, HyperSHAP is efficient when paired with surrogates, with most games finishing in minutes to a few hours. The authors also provide formal proofs bounding approximation errors based on surrogate model accuracy.
Conclusion and Future Work
HyperSHAP provides a mathematically grounded and actionable way to peek inside the HPO black box. While the Tunability game can become a computational bottleneck as the number of hyperparameters grows, the use of surrogates mitigates this. Future work includes extending the framework to explain entire machine learning pipelines and integrating these explanations into human-in-the-loop systems to "warm-start" HPO on new datasets.
Summary updated