Mathematical Foundations of Hyperparameter Optimization

Learn the mathematical foundations of hyperparameter optimization. Understand objective functions, optimization theory, and convergence criteria.

Introduction

Hyperparameter optimization is fundamentally a mathematical optimization problem. Understanding the mathematical foundations helps practitioners make informed decisions about algorithms, convergence criteria, and optimization strategies.

The Optimization Problem

Formal Definition

Hyperparameter optimization seeks to find:

λ* = argminλ∈Λ L(λ)

Where:

Objective Function

The objective function L(λ) typically represents:

Search Space Mathematics

Continuous Spaces

For continuous hyperparameters:

Λ = {λ : λ_i ∈ [a_i, b_i] for i = 1, ..., d}

Where d is the number of hyperparameters and [a_i, b_i] are bounds.

Discrete Spaces

For discrete hyperparameters:

Λ = {λ : λ_i ∈ S_i for i = 1, ..., d}

Where S_i are discrete sets of valid values.

Mixed Spaces

Most real problems involve mixed spaces combining continuous and discrete hyperparameters.

Optimization Properties

Convexity

Most hyperparameter optimization problems are:

Lipschitz Continuity

Some hyperparameter functions satisfy Lipschitz continuity:

|L(λ₁) - L(λ₂)| ≤ K ||λ₁ - λ₂||

This property enables certain optimization guarantees.

Convergence Theory

Convergence to Global Optimum

For exhaustive methods (Grid Search):

Probabilistic Convergence

For Random Search:

Bayesian Convergence

For Bayesian Optimization:

Sample Complexity

Sample Complexity Bounds

Theoretical bounds on evaluations needed:

Curse of Dimensionality

Sample complexity grows exponentially with dimension:

Key Insight

Hyperparameter optimization is fundamentally a non-convex, black-box optimization problem. Most methods rely on heuristics rather than guarantees, making empirical evaluation crucial.

Regret Analysis

Cumulative Regret

Measures total suboptimality:

R_T = Σt=1T [L(λ_t) - L(λ*)]

Simple Regret

Measures final solution quality:

r_T = mint=1,...,T L(λ_t) - L(λ*)

Noise and Uncertainty

Stochastic Evaluations

Hyperparameter evaluations are often noisy:

Modeling Uncertainty

Bayesian Optimization models uncertainty:

Computational Complexity

Time Complexity

Where T_eval is time per evaluation.

Space Complexity

Frequently Asked Questions

What is the mathematical formulation of hyperparameter optimization?

Hyperparameter optimization seeks λ* = argmin L(λ) where λ is a hyperparameter configuration, Λ is the search space, and L(λ) is the objective function (typically validation loss).

Are hyperparameter optimization problems convex?

No, most hyperparameter optimization problems are non-convex, meaning they have multiple local optima. This makes global optimization challenging.

What is sample complexity in hyperparameter optimization?

Sample complexity is the number of evaluations needed to find a good solution. It grows exponentially with dimensionality for Grid Search but more slowly for Random Search and Bayesian Optimization.

What is cumulative regret?

Cumulative regret measures total suboptimality over all evaluations: R_T = Σ[L(λ_t) - L(λ*)]. It's used to analyze optimization algorithm performance.

How does noise affect hyperparameter optimization?

Noise from random initialization, data sampling, and stochastic optimization makes evaluations stochastic. Bayesian Optimization models this uncertainty explicitly.