Combinatorial optimization EDA using hidden Markov models

Marc-André Gardner, Christian Gagné, Marc Parizeau

Abstract

Estimation of Distribution Algorithms (EDAs) represent a powerful class of evolutionary optimizers that replace traditional crossover and mutation operators with an explicit probabilistic model of the search space. However, many existing EDAs struggle to capture complex, long-range dependencies between variables in combinatorial problems. This paper introduces HMM-EDA, a novel framework that employs Hidden Markov Models (HMMs) as the core distribution estimator. By treating solutions as sequences and utilizing hidden states to represent underlying patterns, HMM-EDA effectively learns the structure of high-performing individuals. We evaluate the proposed method on feature selection and Traveling Salesman Problem (TSP) benchmarks. Results indicate that HMM-EDA outperforms standard Genetic Algorithms (GAs) and simpler EDAs in terms of both solution quality and stability, particularly in problems characterized by intricate variable interactions.

Introduction

In evolutionary computing, Estimation of Distribution Algorithms (EDAs) offer a principled alternative to the "blind" operators of Genetic Algorithms (GAs). By building and sampling a probabilistic model of the best solutions found so far, EDAs can navigate complex search spaces more intelligently. However, the choice of the probabilistic model is critical. Simple models often fail to capture the dependencies inherent in sequence-based problems. This research explores the application of Hidden Markov Models (HMMs)—traditionally used in speech recognition and bioinformatics—as the generative engine for an EDA.

Methods

The HMM-EDA algorithm follows the standard EDA cycle: selection of elite individuals, model training, and sampling to generate new candidates. The primary innovation lies in the use of the Baum-Welch algorithm (a type of Expectation-Maximization) to train an HMM on the selected population.

Figure 1: Diagram of a Hidden Markov Model illustrating hidden states (x) and observable outputs (y).

Unlike simple Markov chains, the hidden states in an HMM act as a form of "memory," allowing the model to capture dependencies that span multiple positions in a sequence. To handle constrained problems like the TSP, where each element must appear exactly once, the authors implement a dynamic binary mask over the HMM’s emission matrix. This ensures that once a value is generated, its probability is set to zero for the remainder of the sequence, maintaining valid permutations without altering the underlying learning mathematics. Additionally, a 2% mutation rate is applied during sampling to prevent premature convergence.

Results and Discussion

The researchers evaluated HMM-EDA against standard GAs and the Population-Based Incremental Learning (PBIL) algorithm on two benchmarks: feature selection (Spambase dataset) and a 24-city TSP.

In the feature selection task, HMM-EDA reached a classification rate of approximately 90%, converging faster to the optimal solution than the standard GA. This performance suggests that HMMs are highly effective at identifying "feature interactions"—cases where specific combinations of features are significantly more informative than individual features in isolation.

For the 24-city TSP, HMM-EDA demonstrated superior robustness. While the GA often showed faster initial convergence, it frequently became trapped in local optima. In contrast, HMM-EDA consistently found shorter paths and exhibited significantly lower variance across multiple runs.

Figure 3: Average best fitness (path cost) over 100 runs for the TSP. HMM-EDA (red) eventually surpasses the GA (blue), finding superior global solutions.

The authors noted that the variance in the GA's final results was nearly three times higher than that of HMM-EDA, highlighting the latter's stability. Furthermore, the complexity of the model (number of hidden states) was found to scale with the interdependency of the problem variables, with the TSP requiring more states than feature selection.

Conclusion

HMM-EDA serves as a successful proof-of-concept for using HMMs in the EDA toolbox. Its ability to model complex dependencies through hidden states makes it particularly well-suited for combinatorial problems where the order and relationship of elements are paramount. While the computational overhead of training HMMs is higher than simpler models, the gains in stability and solution quality justify the approach for complex optimization tasks. Future work will investigate automated tuning of hidden states and scaling the method to larger problem instances.

Summary updated

BibTeX
@inproceedings{gardner2013combinatorial,
  author = {Marc-André Gardner and Christian Gagné and Marc Parizeau},
  title = {{Combinatorial optimization EDA using hidden Markov models}},
  booktitle = {GECCO (Companion)},
  year = {2013},
  doi = {10.1145/2464576.2482748},
}
Figure