Abstract
Hyper-heuristics are high-level methods, used to solve various optimization problems. Some of them are capable of learning and adapting their behavior throughout the solving process. Selection hyper-heuristics evaluate low-level heuristics and determine which of them to be applied at a given point in the search process. However, it has been shown that the additive learning process becomes inefficient in hard problems where the probability of fitness improvement is less than
Introduction
In practice, several real world optimization problems are difficult to solve and most of them are “NP-hard”. Due to their exponential nature, exact algorithms fail to solve them efficiently. In this case, another category of methods is used: inexact algorithms which include heuristics, metaheuristics and hyper-heuristics. Hyper-heuristics are problem independent high level methods that create a collaboration between different search methods in order to fill the weaknesses of each other. The term hyper-heuristic was first introduced by Cowling et al. [1].
Given a set of low-level heuristics, a selection hyper-heuristic tries to predict which heuristic is the most suitable to apply at a given point during the search process. Reinforcement learning is a general machine learning technique based on a system of reward and punishment. A reinforcement learning algorithm learns by interacting with its environment and aims to maximize its reward and to minimize its penalty by performing correctly.
A reinforcement learning hyper-heuristic needs to gather information about the performances of low-level heuristics to learn their behavior then to predict which one will be the most efficient in the next iteration. The most common hyper-heuristics use simple reinforcement learning mechanisms such as random gradient, greedy, and most importantly, the additive reinforcement learning mechanism such as the well-known choice function.
An additive learning hyper-heuristic, attributes a weight to each low-level heuristic, then increases the weight of the selected heuristic if its application led to an improvement in the candidate solution with respect to a given fitness function, or decreases the weight otherwise. Recently, authors in [2] have presented the first theoretical study evaluating the performance of the reinforcement learning mechanisms and compared them to a uniform random selection hyper-heuristic. This study has shown the limits of the additive reinforcement learning mechanism, then proposed to use Thompson sampling mechanism as an alternative.
In this paper, we discuss how the Thompson sampling mechanism do not take into account the synergy between the low-level heuristics, which is an important feature of any hyper-heuristics. On the other hand, we are interested in solving very large industrial instances from the latest Max-SAT competition. We propose then, an algorithm that integrates the multilevel paradigm with an adaptive learning selection hyper-heuristic which we called the multilevel Synergy Thompson Sampling Hyper-Heuristic. The multilevel paradigm is an interesting technique that has been used to deal with large instances of different problems. It involves recursive coarsening to create a hierarchy of approximations to the original problem. In the case of Max-SAT, the coarsening phase consists in merging variables together into clusters to create smaller samples from the original instance for each level. At the coarsest level, an initial solution is computed, and then iteratively refined at each level, coarsest to finest, using a search algorithm [3].
In the rest of the paper, we summarize in Section 2, the maximum satisfiability problem (Max-SAT), the hyper-heuristics, the proposition of Alanazi [2] regarding the limits of additive learning hyper-heuristics, the simple Thompson Sampling Hyper-Heuristic and the multilevel paradigm. In Section 3 we explain the components of our approach. Section 4 exposes and discusses the experimental results. Finally, we conclude the work in Section 5 and give some research perspectives.
State of the art
The maximum satisfiability problem (Max-SAT) has a central importance in various areas of computer science, including theoretical computer science, artificial intelligence, optimization, hardware design and verification.
Max-SAT
An instance of the satisfiability problem (SAT) is a propositional formula in a conjunctive normal form (CNF). Given a set of
The SAT problem is to decide whether an assignment of truth values to the
Because of their exponential complexity, the exact methods can be applied only on small instances. Among the well-known methods for SAT, the method SATO [5], the solver Satz [6], the method Chaff [7] that are all SAT solvers based on the Davis Putnam method [8]. There are also exact methods such as the Branch and Bound algorithms [9, 10], the MaxSolver [11], and the method MiniMaxSat [12] that are used to solve the optimization variant Max-SAT
On the other hand, approximation methods (or non-exact methods) make a local exploration in the search space. They can tackle large Max-SAT instances and could find good solutions in a reasonable time. Among them, we can find the local search and metaheuristic methods such as: the CCLS: an efficient local search algorithm [13], the GSAT procedure [14], the simulated annealing [15], the WALKSAT method [16], the scatter search algorithm [17], the genetic algorithm [17, 18, 19], the GASAT algorithm [20], the novelty method [21], the adaptnovelty method [22], the guided local search method [23], the tabu search algorithm [24, 25], the G2wSAT method [26], the memetic algorithm [27, 28], and the variable neighborhood search (VNS) based Genetic algorithm [29].
A hyper-heuristic can be viewed as a non-exact method that makes several metaheuristics and/or specific heuristic algorithms interact with each other. To our knowledge, hyper-heuristics have not been tested on the large industrial Max-SAT instances.
Hyper-heuristics
A hyper-heuristic is a problem independent search method and a learning mechanism for selecting or generating heuristics to solve computational search problems [30]. During the search process, the hyper-heuristic selects the (meta) heuristic that should be applied to improve the fitness function and avoid local optima. These (meta) heuristics are called low-level heuristics. In other words, hyper-heuristics perform the search over the space of the low-level heuristics, and not directly on the problem search space [30, 31, 32].
Hyper-heuristics have been used in many optimization problems, such as, the frequency assignment problem in cellular networks [33, 34], the winner determination problem [35], the problem of examination timetabling problem [36, 37, 32, 38, 39, 40, 41], the planning problem [1], the flow shop problem [42] and so on.
Classification of hyper-heuristics
Hyper-heuristics can be classified using several criteria describing the nature of the hyper-heuristic, the nature of the low-level heuristics and the use or not of a learning mechanism.
Selective or generative hyper-heuristics.
Generative hyper-heuristics combine several components to generate themselves the low-level heuristics. The most known generative techniques are based on genetic programming [43, 44, 45, 46]. Selective hyper-heuristics aim to choose the right (meta) heuristics to be executed in the search process. The set of low-level heuristics should include methods with different strategies that allow a better exploration of the problem search space. Selective hyper-heuristics attempt to combine these methods to compensate the weaknesses of some heuristics by the strength of some other one’s [47, 48].
Constructive or perturbative low-level heuristics.
A constructive low-level heuristic starts with an empty solution and tries to complete it at each step. On the other hand, a perturbative low-level heuristic starts with a complete initial solution and tries to find better ones by improving it during the search process.
Hyper-heuristics with or without a learning mechanism.
Hyper-heuristics that do not use learning mechanism can be random or exhaustive [30]. In this case the selection mechanism does not benefit from the feedback that can be collected during the search phase. To improve the performances of hyper-heuristics, two types of learning mechanisms can be used: on-line or off-line learning. In the on-line case, the hyper-heuristic uses feedback information to learn while solving the problem. In the off-line learning case, it trains first to get information from the considered problem (under resolution) that could be used to solve unseen instances of the problem.
For example, we can cite the work given in [42] which is based on a multi-agent system where a hyper-heuristic agent manages the low-level heuristic agents by using a reinforcement learning mechanism. The system was applied on the flow shop problem. In [49], authors propose a method based on Q-learning to automatically design the high-level heuristic of a hyper-heuristic model. In [50], a deterministic learning selection strategy based on the Multi-Armed Bandit problem is used. It has been implemented using the HyFlex framework.
In our work, we are interested in selective-pertur- bative hyper-heuristics with an on-line learning mechanism.
The architecture of a selective-perturbative hyper-heuristic
A selective hyper-heuristic is composed of two modules: a selection module and a move acceptance module. The selection module chooses which low-level heuristic will be called in the next iteration. Such selection could be done randomly or by using a learning mechanism. The acceptance module decides whether the current solution will be accepted or not. This decision can be deterministic (all moves will be accepted [1], only improvement moves are accepted [35, 51]) or non-deterministic (Monte Carlo move acceptance [36] simulated annealing [52], …). For more details about the selection strategies and move acceptance module, the reader could refer to [30].
The hyper-heuristic process works as follows: given an instance of a problem, the selection module picks an adequate low-level heuristic according to a given strategy at each iteration. Then, the acceptance module decides whether to accept or reject the solution returned by the low-level heuristic. The process continues until the termination criterion is met. The hyper-heuristic process is depicted in Fig. 1. One of the well-known selection strategies is the Choice-Function method.
The architecture of a hyper-heuristic [36].
The Choice function is a score based selection strategy that uses on-line learning to decide which low-level heuristic to be called for the next execution. It measures the effectiveness of the low-level heuristics based on their performances. It assigns a weight to each low-level heuristic according to three parameters, which are: the CPU time consumed by a heuristic during the search process, the quality of the solution and the elapsed time since the heuristic has been called. The modified score based choice-function is described in [53] as follows:
where
and
Additive reinforcement learning hyper-heuristics behavior and Thompson sampling
The reinforcement learning mechanisms iteratively choose the appropriate heuristic by trial and error interactions with the search space. Each low-level heuristic is associated with a weight, initially the same. The adaptation module, determine how the weights should be updated. The additive weights adaptation scheme is the most frequently used one. If the selected low-level heuristic improves the solution, its weight is increased by a certain value; otherwise, the weight is decreased. An example is the choice-function mechanism described above. Among recent works using choice function mechanism we can cite: [54] where a choice function hyper-heuristic has been applied on the allocation of maintenance tasks problem in Danish railways. In [55, 56] an artificial bee colony algorithm is combined with a modified choice function for the traveling salesman problem. In [57] a hyper-heuristic with a parameter free choice function strategy has been applied on pairwise test generation. In [58] a modified choice function heuristic selection strategy has been proposed for the multidimensional knapsack problem. In [59], a Choice Function-based Constructive Hyper-Heuristic is used for generating personalized healthy menu recommendations.
In [2], the limitations of learning in additive reinforcement learning hyper-heuristics are shown. They have proven theoretically that if the success probabilities of the low-level heuristics are less than
Since the additive learning mechanism is not efficient in these cases, [60] propose using a probabilistic selection approach called Thompson sampling.
The Thompson sampling hyper-heuristic
In 1933, Thompson introduced a reinforcement learning mechanism for the multi-armed bandit problem referred to as Thompson sampling [61].
The thompson sampling hyper-heuristic.[1] a Max-SAT instance, a set
The multilevel process.
Despite the fact that it was absent from the artificial intelligence literature, recently it has attracted considerable interest. Several studies have empirically demonstrated the efficiency of Thompson sampling [62, 63, 64, 65]. It has also been successfully applied to several real-world problems [66, 67, 68].
As shown in Algorithm 2.5, Thompson sampling is a reinforcement learning mechanism that uses probabilities to predict the most suitable heuristic to be called. It also uses a sliding time window to adapt its behavior according to recent observations about the performance of the low-level heuristics. This enables to discard past and potentially irrelevant observations. In this case, the low-level heuristics are divided into two sets: MU (mutation heuristics) and LS (simple local search heuristics). The hyper-heuristic chooses a heuristic from the MU set then chooses a heuristic from LS set at each iteration. To each low-level heuristic i, we attribute a beta distribution with two parameters
The Thompson Sampling Hyper-Heuristic focuses on choosing, at each iteration, the low-level heuristic that will potentially improve the candidate solution, without taking into account the synergy between the low-level heuristics. We mentioned earlier that hyper-heuristics attempt to compensate the weaknesses of some low-level heuristics by the strength of the others. But, the Thompson Sampling Hyper-Heuristic fails to do that. We propose, in this paper, a new approach that adds the synergy aspect to the Thompson Sampling. It also combines the hyper-heuristic with the multilevel paradigm in order to deal with large Max-SAT instances.
The coarsening phase.
Illustration of the coarsening phase.
The multilevel paradigm is inspired from the multi-grid methods used in physics since the 1970’s to solve differential equations. This method has been applied essentially on the graph partitioning problem (GPP) [69, 70]. This method has proven to be very efficient and has replaced the spectral methods used in GPP in 1990’s. In early 2000, Chris Walshaw used the multilevel paradigm on other combinatorial optimization problems such as the traveling salesman problem (TSP) [71], the graph coloring problem (GCP) [72], the vehicles routing problem (VRP) [73], or the clustering problem [74]. It has also been used to solve the SAT problem [75] then the Max-SAT problem [76, 77, 51]. The multilevel paradigm goes through three phases, as shown in Fig. 2.
The coarsening phase
In this step, a hierarchical sequence of progressively smaller problems
A solution (even if it is not the optimal one) found in any of the coarsened spaces could simply be extended through all the problem levels to form a solution of the original problem. This requirement ensures that the coarsening is truly filtering the solution space. The number of levels in the coarsening phase does not need to be determined beforehand, however the coarsening should cease when any further iteration would render the initialization degenerate. Any solution in a coarsened space should have the same cost with respect to the objective function as its extension to the original space. This principal ensures that the coarsening algorithm samples the solution space without altering it. In this case we say that the coarsening is exact.
The initial phase is very simple. It produces an initial solution of
The extension and refinement phase
This phase is an iterated combination of two steps:
The extension step: The extension algorithm is the unversed process of the coarsening algorithm. It extends the solution found at the previous level to give an initial solution to the problem at the current level.
The refinement step: builds a better solution from the initial one at each level. It can be a simple local search or a more sophisticated heuristic or metaheuristic. In this paper, we have used a hyper-heuristic.
In the following, we introduce our method called the Multilevel Synergy Thompson Sampling Hyper-Heuristic (ML-SyTS-HH). We first describe the multilevel (ML) framework. Then we detail the Synergy Thompson Sampling Hyper-Heuristic (SyTS-HH) components.
The multilevel framework
The multilevel framework has four basic components described as follows:
The coarsening process
In the coarsening phase, the algorithm reduces the problem size recursively until reaching a desired threshold. In the case of a SAT problem instance, the algorithm merges pairs of variables chosen randomly to create what we call clusters, which reduces the size of the problem by half at each iteration, as illustrated in Fig. 3. In this case, the complexity of the coarsening algorithm is
The initialization process
The search process starts by computing an initial solution at the coarsest level. The truth/false values will be assigned randomly to the clusters. As a cluster represents one variable, to compute the cost of a solution, all the variables that compose the cluster will be assigned the same value.
Illustration of the initialization phase.
When going from one level to another, the extension strategy should guarantee that the number of satisfied clauses by the solution will remain the same before and after the extension. The extension algorithm being the reverse procedure of the coarsening, it splits up each cluster into the clusters that compose it and assigns them the same value as the original cluster.
An example of the extend/refine phase.
At each generated level, after the extension process, the refinement algorithm is applied to search the best solution for the problem sample corresponding to the current level. In this paper, we have used the Synergy Thompson Sampling that we describe later (for the refinement). In the coarse levels, the hyper-heuristic works on smaller and easier versions of the initial problems until reaching level 0. We had to make a few adjustments to the hyper-heuristic to make it deal with the clusters directly instead of the variables. Algorithm 7 shows how SyTS-HH is integrated in the multilevel framework. The main benefit of the multilevel paradigm is that, when going through the lower levels, it guides the search to a very promising area. When the original level (level 0) is reached, the initial solution is one of very good quality. In this case, in order to keep this advantage, the intensification/diversification mechanisms are managed by the low-level heuristics.
The extension and refinement phase.
The ML-SyTS-HH.[1] a problem
The proposed hyper-heuristic uses the method of solution acceptance based on the all moves acceptance strategy. In the following we explain how a solution is represented, how the fitness is calculated, then discuss the low-level heuristics that we use and finally describe the Synergy Thompson Sampling process.
The solution representation
A solution is represented as a vector
The objective function
The quality of a solution (fitness) is measured by using an objective function. In the Max-SAT problem, it consists in maximizing the number of satisfied clauses of the considered instance. The goal of a search method is to find an assignment to the variables that maximizes the number of satisfied clauses. Given a solution
The low-level heuristics for Max-SAT
Six perturbative low-level heuristics are used in this paper. We have chosen some of the best state of the art Max-SAT search methods. After each execution, the selected low-level heuristic returns the solution found to the hyper-heuristic. We give in the following a concise description of each of the considered low-level heuristics.
The heuristic
The heuristic
The heuristic
The heuristic
The heuristic
The heuristic
The SyTS-HH has a probabilistic learning approach to handle the set of perturbative heuristics described above, to solve the considered Max-SAT problem. It uses the historical performances of the low-level heuristics to update its learning mechanism based on the Beta probability law. The Beta probability law is usually used to model the uncertainty about the probability of success of an experiment. It is a continuous probability distribution defined on the interval
As shown in Algorithm 3.2.4, first, a heuristic
The SyTS-HH.[1] a Max-SAT instance, a set
ML-TS-HH vs TS-HH
ML-TS-HH vs TS-HH
All experiments were run on an Intel Core (TM) i7 2 GHz with 8 GB of RAM under Linux operating system. The source code is written in the C language.
We have implemented five variants of the hyper-heuristics for the Max-SAT problem corresponding to five different selection strategies:
Random (R-HH): corresponding to the simple random strategy.
Choice-function (CF-HH): corresponding to the choice function described above.
Stochastic choice-function (SCF-HH): is a combination between the random strategy and the choice function strategy [35, 80].
Tompson Sampling (TS-HH): corresponding to the original method described above.
Synergy Thompson Sampling (SyTS-HH): corresponding to our method.
Due to the non-deterministic nature of the proposed methods, 10 runs have been considered for each instance and for each method. Also, an empirical study has been conducted to fix the parameters values. The coarsening phase of the multilevel paradigm will stop when reaching a level with 500 clusters.
For the TS-HH and the SyTS-HH there is only one parameter which is the size of the sliding window w. It has been fixed to 30. For the CF-HH, there are two parameters: For the SCF-HH, in addition to the
There are other parameters which concerns the low-level heuristics:
Walksat: The walk probability
SLS: The walk probabilities of the low-level heuristic
VNS: The number of neighborhoods
Novelty: The walk probability
In the following, we give the numerical results found by the implemented methods.
TS-HH VS ML-TS-HH
The effectiveness of the multilevel paradigm has been proven several times as previously discussed in Section 2.6. To further investigate the impact of the multilevel paradigm, we have selected The TS-HH and we have chosen the largest ten instances from the Max-SAT competition industrial benchmarks. The results in Table 1 indicate that the ML-TS-HH is more robust than the simple TS-HH. The results reported in Table 1 represent the number of not satisfied clauses. From Fig. 8, we can see that the larger the instance, the bigger the difference. This can be explained by the fact that the multilevel approach successively approximates the problem with smaller, and hence easier to solve, versions. The coarsening algorithm filters the solution space by placing restrictions on solutions which the refinement algorithm can visit. Flipping the value of one cluster in a coarsened space is equivalent to changing the values of several variables in the original solution space. This allows exploring efficiently the search space with a good balance between diversification, by visiting different regions, and intensification, by exploiting the solutions from previous levels in order to reach better solutions. When reaching the level 0 (the original instance), the search starts with an initial solution of a good quality, which usually helps the search method to get closer to the global optimum.
The results of the four methods on some Max-SAT 2016 benchmarks (a)
The results of the four methods on some Max-SAT 2016 benchmarks (a)
The results of the four methods on some other Max-SAT 2016 benchmarks (b)
ML-TS-HH vs TS-HH.
Statistical summary on Max-SAT 2016 ’benchmarks (a-b)
ANOVA test for the five hyper-heuristics
Since we are interested in very large industrial Max-SAT benchmarks, we applied the multilevel paradigm on all of them to boost the search. The obtained results on the industrial benchmarks are given in Tables 2 and 3, where the best results obtained for each instance are in bold font. Once again, the results are expressed by the number of the remaining unsatisfied clauses. To better expose the results, Table 4 gives some statistical measures calculated from the percentages of satisfaction of clauses (number of satisfied clauses/total number of clauses in the instance). For each method, we give the minimum (Min), the maximum (Max), the average (Mean), the midway (Median), the first quartile (1st Qu) and the third quartile (3rd Qu). Also, the box-plot diagram is given in Fig. 9 to better visualize the distribution of values of the rate of satisfied clauses given by the different considered methods.
Box-plot of the four methods on Max-SAT 2016 benchmarks.
As shown in the box-plot depicted in Fig. 9, we can clearly see that the ML-CF-HH is almost similar (slightly better) than the ML-R-HH. This indicates that the additive learning mechanism of the choice function stagnates especially when approaching the global optima, and thus the probability of improving a candidate solution becomes low. However we can see a serious improvement concerning the ML-SCF-HH. This can be explained by the fact that the randomness helps changing the values of the additive weights of the choice function, in a way that improves its performance. This conclusion is further confirmed when seeing the results of the ML-TS-HH.
The ML-TS-HH performed better than the ML-CF-HH. This shows that the probabilistic selection strategy outperforms the additive learning mechanism. However, the ML-SCF-HH is better than the ML-TS-HH.
We can say in this case, that the stochastic mechanism really improves the additive learning selection strategy, that takes into account the synergy between the low-level heuristics. On the other hand the Thompson sampling selection method is based on the individual performances of the low-level heuristics.
Finally, the experimental results indicate that the ML-SyTS-HH is the most robust among all five experimented hyper-heuristics. In our opinion, this is mainly due to the fact of having an adaptive probabilistic selection strategy and on the other hand to the fact of taking into account the synergy between the low-level heuristics. This confirms the fact that cooperation can allow the weaknesses of one low-level heuristic to be compensated by the strengths of another.
To show statistically the significance of our results, we used the ANOVA (Analysis of variance) statistical tool. Table 5 presents the results of the ten ANOVA tests where the column df represents the degree of freedom, the column SS represents the Sum of squares, the column MS represents the mean square, the F-value represents the F-statistic, and the
Conclusion
In this paper, we proposed a new hyper-heuristic that combines the multilevel paradigm and a modified Thompson Sampling selection strategy that takes into account the synergy between the different low-level heuristics. This method is called the Multilevel Synergy Thompson Sampling Hyper-Heuristic (ML-SyTS-HH) and it has been applied to solve the Max-SAT problem. The set of perturbative low-level heuristics used in this work, contains some of the best state-of-the-art Max-Sat heuristics such as: GSAT, Walksat, HSAT, SLS, VNS and Novelty methods.
The work presented in [2] has shown the limitations of the additive learning mechanism such as choice function, especially when the probability of success is less than
On the other hand we integrated in the proposed method the multilevel paradigm that has shown its efficiency when dealing with large instances of a problem. It coarsens the initial instance into smaller ones that are generally easier to solve. This is done by putting variables into clusters, then using the solution of the current level as an initial solution to the next level. At any level, the current solution can be extended to the original problem instance.
For the experimental study, we implemented the proposed method and four other hyper-heuristics that are the Random Hyper-Heuristic, the Choice Function Hyper-Heuristic, the Stochastic Choice Function Hyper-Heuristic and the original Thompson Sampling Hyper-Heuristic. All of these methods have been combined with the Multilevel framework, and have been evaluated on very large instances representing the industrial benchmarks of the latest Max-sat competitions. The obtained results show that the new proposed method outperforms all other experimented hyper-heuristics.
In the future, we will try other coarsening methods that will merge the variables in a more intelligent way by taking into account the instance structure. We will also focus on finding other probabilistic learning mechanisms that will take into account other feedback information and that will capture better the low-level heuristics behaviors.
