Automatic hyperparameter optimization for clustering algorithms with reinforcement learning

S.b. Muravyov, Valeria Efimova, V.v. Shalamov, A.a. Filchenkov, I.b. SmetannikovScientific 2019

Abstract

Subject of Research. The paper deals with research of clustering algorithms for hyperparameters optimization used in machine learning. Model selection problem is comprehensively studied, and the need of the tradeoff between exploration and exploitation is identified. Thus, the problem is reduced to multi-armed bandit problem. Method. The paper presented the approach for simultaneous algorithm selection and hyperparameters optimization. We used solution of the Multiarmed Bandit problem and considered Softmax- and UCB1-based algorithm variants in combination with different reward functions. Main Results. Experiments on various datasets from UCI repository were carried out. The results of experiments confirmed that proposed algorithms in general achieve significantly better results than exhaustive search method. It also helped to determine the most promising version of the algorithm we propose. Practical Relevance. The suggested algorithm can be successfully used for model selection and configuration for clustering algorithms, and can be applied in a wide range of clustering tasks in various areas, including biology, psychology, and image analysis.

Introduction: The Challenge of Unsupervised Model Selection

Clustering is often described as a "black art" because, unlike supervised learning, there are no ground-truth labels to guide model evaluation. Data scientists must navigate a vast space of algorithms—such as k-Means, DBSCAN, or Affinity Propagation—each with its own set of sensitive hyperparameters. Finding the optimal combination is a time-consuming process that typically involves manual experimentation or computationally expensive exhaustive searches.

The core challenge lies in the "exploration-exploitation" dilemma: given a fixed time budget, should a system explore a wide variety of algorithms or focus on fine-tuning the most promising one? Researchers at ITMO University have addressed this by framing simultaneous model selection and hyperparameter optimization (HPO) as a Reinforcement Learning problem.

Methods: A Multi-Armed Bandit Approach

The authors propose a framework based on the Multi-Armed Bandit (MAB) problem. In this setup, each "arm" represents a different clustering algorithm. To optimize the hyperparameters of a selected algorithm, the system employs Sequential Model-based Algorithm Configuration (SMAC), which uses random forests to predict performance.

The proposed Reinforcement Learning framework for simultaneous algorithm selection and hyperparameter optimization.

To manage the selection of algorithms, two primary RL strategies were evaluated:

  • Softmax: Selects algorithms probabilistically based on their historical performance.
  • UCB1 (Upper Confidence Bound): A deterministic approach that balances high average performance with exploration of less-tested algorithms.

A key innovation is the introduction of a time-normalized reward function (RL-smx-tf). By incorporating the time taken into the reward, the system avoids being biased toward slow-running algorithms that might offer only marginal improvements.

Key Results and Performance

The approach was tested on several UCI Machine Learning Repository datasets, including Iris, Glass, and Yeast. The results consistently demonstrated that the RL-based methods outperform both Random Search and Exhaustive Search (which allocates time equally across all models).

Performance comparison on the Iris dataset (Calinski-Harabaz metric), showing faster convergence of the proposed PL method compared to exhaustive and random search.

As illustrated in the performance graphs, the proposed method (PL) converges to high-quality solutions significantly faster than the baselines. Specifically, the Softmax-based variant with time-normalized rewards proved to be the most robust, achieving the best results across the majority of quality measures tested.

Conclusion and Future Directions

By treating HPO as a reinforcement learning task, the researchers have created a more efficient way to automate clustering model selection. This approach reduces the need for manual tuning and makes better use of limited computational resources.

Future work may involve addressing the "cold start" problem through Meta-Learning—using knowledge from previous datasets to initialize the bandit. Additionally, exploring multi-objective optimization could help the system balance multiple, sometimes conflicting, clustering quality metrics simultaneously.

Summary updated

BibTeX
@inproceedings{muravyov2019automatic,
  author = {S.B. Muravyov and Valeria Efimova and V.V. Shalamov and A.A. Filchenkov and I.B. Smetannikov},
  title = {{Automatic hyperparameter optimization for clustering algorithms with reinforcement learning}},
  booktitle = {Scientific},
  year = {2019},
  doi = {10.17586/2226-1494-2019-19-3-508-515},
}
Figure