Abstract
The optimization of expensive-to-evaluate, black-box, mixed-variable functions—those possessing both continuous and discrete inputs—is a pervasive challenge in science and engineering. While Bayesian optimization (BO) has matured for purely continuous or discrete domains, few methods address mixed-variable domains effectively, and none handle the complex discrete constraints common in real-world applications. We introduce MiVaBo, a novel BO algorithm that combines a linear surrogate model based on expressive feature representations with Thompson sampling. By framing acquisition function optimization as a Binary Integer Quadratic Program (IQP), MiVaBo becomes the first BO method capable of handling complex constraints over discrete variables. Furthermore, we provide the first convergence analysis for a mixed-variable BO algorithm. Our results demonstrate that MiVaBo is significantly more sample-efficient than state-of-the-art algorithms on hyperparameter tuning tasks, particularly for deep generative models.
Introduction
In many engineering domains, optimization involves a mix of continuous variables (e.g., learning rates) and discrete choices (e.g., neural network architecture parameters). Standard BO methods often struggle with these mixed spaces, frequently relying on ad-hoc fixes like continuous relaxation or discretization. These approaches are particularly fragile when faced with "known" constraints—such as architectural requirements in a convolutional neural network where kernel size and stride must yield valid integer dimensions. Existing tools like SMAC or TPE often waste evaluations on invalid configurations. MiVaBo addresses this by treating constraints as first-class citizens within the optimization process.
The MiVaBo Framework
MiVaBo is built upon three technical pillars designed to make mixed-variable optimization tractable and theoretically sound:
- Linear Surrogate Model with Expressive Features: Instead of a standard Gaussian Process (GP) with a complex mixed-kernel, MiVaBo utilizes a linear model $f(x) = w^T \phi(x)$. The feature map $\phi(x)$ is explicitly decomposed into:
- Discrete features: A second-order polynomial (Quadratic Pseudo-Boolean Function) to capture interactions between discrete variables.
- Continuous features: Random Fourier Features (RFF) to approximate a GP with a squared exponential kernel.
- Mixed features: Pairwise products of discrete and continuous features to capture cross-domain interactions.
- Thompson Sampling (TS): MiVaBo employs Thompson Sampling to select the next evaluation point. By sampling a weight vector from the posterior distribution and minimizing the resulting function, the algorithm naturally balances exploration and exploitation.
- Constrained Acquisition Optimization: The quadratic structure of the features allows the discrete portion of the acquisition optimization to be framed as a Binary Integer Quadratic Program (IQP). This enables the use of powerful solvers like Gurobi or CPLEX to handle linear and quadratic constraints directly, ensuring that every sampled configuration is valid by construction.
Empirical Evaluation
We evaluated MiVaBo against state-of-the-art baselines, including SMAC, TPE, and GPyOpt, across several challenging tasks.
Hyperparameter Tuning for Deep Generative Models
A primary benchmark involved tuning a Variational Autoencoder (VAE) architecture on the MNIST and FashionMNIST datasets. This task is high-dimensional, involving 25 discrete and 3 continuous parameters, governed by complex architectural constraints.
As shown in the quantitative results, MiVaBo reached significantly better Negative Log-Likelihood (NLL) scores much faster than competing methods. On MNIST, MiVaBo achieved an NLL of 84.25, approaching human-expert performance (~82-83) and substantially outperforming SMAC (~99) and TPE (~97).
Beyond quantitative metrics, the qualitative quality of the models found by MiVaBo was markedly superior. The reconstructions produced by the MiVaBo-optimized VAE are clear and recognizable, whereas those from other methods often exhibit significant blurriness or artifacts.
XGBoost Tuning
We further validated MiVaBo on XGBoost hyperparameter tuning using OpenML datasets (monks-problem-1 and steel-plates-fault). In these lower-dimensional settings, MiVaBo consistently matched or exceeded the performance of specialized baselines, demonstrating its robustness across different problem scales.
Conclusion
MiVaBo represents a significant step forward in mixed-variable optimization. By decoupling the continuous and discrete components through explicit feature expansion and leveraging IQP solvers, it provides a principled way to handle complex constraints that were previously ignored or handled via inefficient penalty methods. Coupled with the first regret bounds for this setting, MiVaBo offers a powerful, theoretically grounded tool for modern machine learning and engineering challenges.
Summary updated