Abstract
Hyperparameter tuning is an important task of machine learning, which can be formulated as a bilevel program (BLP). However, most existing algorithms are not applicable for BLP with non-smooth lower-level problems. To address this, we propose a single-level reformulation of the BLP based on lower-level duality without involving any implicit value function. To solve the reformulation, we propose a majorization minimization algorithm that marjorizes the constraint in each iteration. Furthermore, we show that the subproblems of the proposed algorithm for several widely used hyperparameter turning models can be reformulated into conic programs that can be efficiently solved by the off-the-shelf solvers. We theoretically prove the convergence of the proposed algorithm and demonstrate its superiority through numerical experiments.
Introduction
Hyperparameter optimization (HPO) is fundamental to the success of machine learning models. It involves selecting optimal configurations, such as regularization coefficients, to maximize a model's generalization performance. Mathematically, HPO is naturally framed as a bilevel program (BLP). In this framework, the "upper-level" objective minimizes validation error, while the "lower-level" constraint ensures the model parameters are optimal for the training data.
A significant challenge arises when the lower-level training objective is non-smooth, as is common with $L_1$ regularization (Lasso), Elastic Net, or Support Vector Machines (SVMs). Traditional gradient-based methods often rely on the implicit function theorem, which requires smoothness. When this condition is violated, hyper-gradients may not exist, and alternative "value function" approaches can become computationally prohibitive. This paper introduces a novel approach using lower-level duality to transform these difficult BLPs into manageable single-level problems.
Methodology
The core contribution of this work is the LDMMA (Lower-level Duality based Majorization Minimization Algorithm). The methodology follows a structured three-step process to handle non-smoothness and non-convexity.
1. Duality-Based Reformulation
Instead of treating the lower-level optimization as an implicit constraint, the authors leverage Fenchel’s Duality. By replacing the optimality condition of the training problem with an inequality involving its conjugate function, the bilevel structure is collapsed into a single-level optimization task. This avoids the need for an explicit value function, which is often difficult to compute in non-smooth settings.
2. $\epsilon$-Relaxation
The resulting single-level problem can be numerically unstable because its feasible region may lack an interior. To address this, the authors introduce an $\epsilon$-relaxation, adding a small positive constant to the duality constraint. This creates a "relaxed" feasible region, making the problem significantly easier for numerical solvers to navigate.
3. The LDMMA Algorithm
To solve the non-convex single-level problem, the authors employ a Majorization-Minimization (MM) framework. The primary difficulty lies in bilinear terms where hyperparameters interact with auxiliary variables. LDMMA approximates these terms with convex majorizing functions at each iteration.
For several standard models, including Elastic Net and SVMs, the resulting subproblems can be reformulated as convex conic programs. This allows the use of efficient, industrial-grade solvers like MOSEK to find solutions quickly.
Experimental Evaluation
The LDMMA algorithm was benchmarked against several state-of-the-art methods, including Grid Search, Random Search, Tree-structured Parzen Estimator (TPE), and Value Function based algorithms (VF-iDCA). Experiments spanned both synthetic datasets and real-world benchmarks from the libSVM repository, such as diabetes, breast-cancer, sonar, w1a, and high-dimensional sets like gisette and sensit.
Results and Discussion
LDMMA demonstrated significant advantages in both computational efficiency and predictive accuracy.
- Efficiency: In Elastic Net and SVM tasks, LDMMA was frequently 2x to 10x faster than its closest competitor, VF-iDCA. Compared to traditional search methods like Grid or Random search, the speedup was often several orders of magnitude.
- Accuracy: The algorithm consistently identified hyperparameters that yielded lower validation and test errors. For instance, on the w1a dataset, LDMMA achieved a test error of 0.01, a stark improvement over the 0.41 error rate seen with Grid Search.
- Scalability: The method proved robust even for high-dimensional data. On the sensit dataset, which features over 78,000 variables, LDMMA maintained high performance with minimal per-iteration time.
Conclusion
This paper presents a robust framework for hyperparameter optimization in the presence of non-smooth lower-level problems. By utilizing duality-based reformulation and majorization-minimization, LDMMA bypasses the theoretical and computational hurdles of traditional hyper-gradient and value-function methods. While currently dependent on interior-point solvers, future research into first-order methods for the LDMMA subproblems could further extend its scalability to massive-scale deep learning applications.
Summary updated