Abstract
Subject of Research. The paper deals with Bayesian method for hyperparameter optimization of algorithms, used in machine learning for classification problems. A comprehensive survey is carried out about using a priori and a posteriori knowledge in classification task for hyperparameter optimization quality improvement. Method. The existing Bayesian optimization algorithm for hyperparameter setting in classification problems was expanded. We proposed a target function modification calculated on the basis of hyperparameters optimized for the similar problems and a metric for determination of similarity classification problems based on generated meta-features. Main Results. Experiments carried out on the real-world datasets from OpenML database have confirmed that the proposed algorithm achieves usually significantly better performance results than the existing Bayesian optimization algorithm within a fixed time limit. Practical Relevance. The proposed algorithm can be used for hyperparameter optimization in any classification problem, for example, in medicine, image processing or chemistry.
Introduction
Finding the optimal hyperparameters for machine learning models is a computationally intensive "black-box" optimization problem. While Bayesian Optimization (BO) is a state-of-the-art approach that builds a probabilistic surrogate model to guide the search, it typically treats each new dataset as an independent task. This "blank slate" approach ignores valuable "a posteriori" knowledge gained from solving similar problems in the past. This research proposes a modified BO algorithm that leverages dataset similarity to accelerate convergence and improve final model performance.
Methodology
The proposed method extends standard Bayesian Optimization—utilizing a Gaussian Process (GP) surrogate and an Expected Improvement acquisition function—by incorporating knowledge from previously solved tasks.
Meta-Feature Extraction and Similarity
To quantify the similarity between datasets, the algorithm extracts statistical meta-features without the need for model training. These include statistics (min, max, mean) of feature-to-class and feature-to-feature correlations, as well as structural characteristics derived from a basic decision tree fit to the data. Similarity is determined by calculating the Euclidean distance between these meta-features after normalization via Mahalanobis distance to account for feature covariance.
Knowledge Injection
The core innovation lies in modifying the Gaussian Process. A "reliability" metric is calculated based on the similarity to past datasets. This metric is used to adjust the covariance matrix of the GP, artificially reducing uncertainty in hyperparameter regions that proved successful for similar historical tasks. This forces the acquisition function to prioritize these promising regions early in the search process.
Experimental Evaluation
The algorithm was tested on 45 diverse real-world datasets from the OpenML database. The optimization target was a Multilayer Perceptron (MLP) with eight hyperparameters. The performance of the modified BO was compared against a standard BO baseline over 100 iterations, with results averaged across 10 independent runs per dataset to ensure statistical robustness.
Results and Discussion
The experimental results demonstrate a clear advantage for the knowledge-aware modification. Out of 45 datasets, the modified algorithm achieved strictly better final configurations in 27 cases and reached the same optimal score significantly faster in 9 cases. Overall, the method provided improvements in 80% of the tested scenarios.
As shown in the figure above, the modified algorithm (pink line) consistently finds lower error values more quickly than the classical approach (blue line). This confirms that statistical meta-features serve as effective proxies for mapping dataset similarity, allowing for a more informed and efficient hyperparameter search.
Conclusion
By integrating a priori and a posteriori knowledge into the Bayesian Optimization loop, we have developed a more efficient framework for hyperparameter tuning. While currently demonstrated on Multilayer Perceptrons, future work will focus on extending this methodology to other algorithms like Random Forests and exploring surrogate models that better handle categorical hyperparameters. The proposed approach offers significant practical benefits for time-constrained machine learning tasks in various domains.
Summary updated