Table of Contents
Fetching ...

HyperSHAP: Shapley Values and Interactions for Explaining Hyperparameter Optimization

Marcel Wever, Maximilian Muschalik, Fabian Fumagalli, Marius Lindauer

TL;DR

HyperSHAP presents a game-theoretic, post-hoc explainability framework for hyperparameter optimization that uses Shapley values and interactions to dissect performance across hyperparameters. It defines five explanation games (Ablation, Sensitivity, Tunability, Optimizer Bias, and Multi-Dataset extensions) and derives both local and global explanations via $\phi^{\text{SV}}$ and $\Phi_k$, enabling principled analysis of parameter contributions and their interactions. Compared to prior methods like fANOVA, HyperSHAP emphasizes actionable tunability insights and detector bias in optimizers, supported by experiments on multiple HPO benchmarks and surrogate models. The findings indicate higher-order interactions exist but are mostly captured by up to third-order terms, and HyperSHAP provides scalable, interpretable guidance for selecting hyperparameters to tune and diagnosing optimizer behavior.

Abstract

Hyperparameter optimization (HPO) is a crucial step in achieving strong predictive performance. Yet, the impact of individual hyperparameters on model generalization is highly context-dependent, prohibiting a one-size-fits-all solution and requiring opaque HPO methods to find optimal configurations. However, the black-box nature of most HPO methods undermines user trust and discourages adoption. To address this, we propose a game-theoretic explainability framework for HPO based on Shapley values and interactions. Our approach provides an additive decomposition of a performance measure across hyperparameters, enabling local and global explanations of hyperparameters' contributions and their interactions. The framework, named HyperSHAP, offers insights into ablation studies, the tunability of learning algorithms, and optimizer behavior across different hyperparameter spaces. We demonstrate HyperSHAP's capabilities on various HPO benchmarks to analyze the interaction structure of the corresponding HPO problems, demonstrating its broad applicability and actionable insights for improving HPO.

HyperSHAP: Shapley Values and Interactions for Explaining Hyperparameter Optimization

TL;DR

HyperSHAP presents a game-theoretic, post-hoc explainability framework for hyperparameter optimization that uses Shapley values and interactions to dissect performance across hyperparameters. It defines five explanation games (Ablation, Sensitivity, Tunability, Optimizer Bias, and Multi-Dataset extensions) and derives both local and global explanations via and , enabling principled analysis of parameter contributions and their interactions. Compared to prior methods like fANOVA, HyperSHAP emphasizes actionable tunability insights and detector bias in optimizers, supported by experiments on multiple HPO benchmarks and surrogate models. The findings indicate higher-order interactions exist but are mostly captured by up to third-order terms, and HyperSHAP provides scalable, interpretable guidance for selecting hyperparameters to tune and diagnosing optimizer behavior.

Abstract

Hyperparameter optimization (HPO) is a crucial step in achieving strong predictive performance. Yet, the impact of individual hyperparameters on model generalization is highly context-dependent, prohibiting a one-size-fits-all solution and requiring opaque HPO methods to find optimal configurations. However, the black-box nature of most HPO methods undermines user trust and discourages adoption. To address this, we propose a game-theoretic explainability framework for HPO based on Shapley values and interactions. Our approach provides an additive decomposition of a performance measure across hyperparameters, enabling local and global explanations of hyperparameters' contributions and their interactions. The framework, named HyperSHAP, offers insights into ablation studies, the tunability of learning algorithms, and optimizer behavior across different hyperparameter spaces. We demonstrate HyperSHAP's capabilities on various HPO benchmarks to analyze the interaction structure of the corresponding HPO problems, demonstrating its broad applicability and actionable insights for improving HPO.

Paper Structure

This paper contains 53 sections, 2 theorems, 29 equations, 17 figures, 4 tables.

Key Result

Proposition 1

The Tunability game yields non-negative SV and non-negative pure individual (main) effects obtained from functional ANOVA via the MI.

Figures (17)

  • Figure 1: Game-theoretic explanations as defined with HyperSHAP analyze hyperparameter values, hyperparameter spaces, and optimizers. HyperSHAP can be used for data-specific explanations or across datasets.
  • Figure 2: Left: Interaction graphs showing Möbius interactions (MI), second-order Shapley interactions (SI), and Shapley values (SV) where MIs terms are aggregated for interoperability. Right: Faithfulness of lower-order explanations approximating higher-order effects Muschalik.2024. An explanation order of 3 already approximates the full game ($R^2 \approx 1$) well.
  • Figure 3: Upset plots for Ablation (left) and Tunability (right) of lm1b_transformerwang-jmlr24.
  • Figure 4: Interaction graphs showing results for the Optimizer Bias game via Moebius interactions (MI) and Shapley interactions (SI) on dataset ID 3945 of lcbench.
  • Figure 5: Explaining the surrogate model in SMAC's Bayesian optimization with MIs at 1%, 5%, 25%, and 100% of the budget. Over time, SMAC notices first the importance of N-L and later B-S.
  • ...and 12 more figures

Theorems & Definitions (10)

  • Definition 1: Ablation Game
  • Definition 2: Sensitivity Game
  • Definition 3: Tunability Game
  • Proposition 1
  • Definition 4: Optimizer Bias Game
  • Theorem 1
  • Definition 5: Multi-Dataset Games
  • proof
  • proof
  • proof