HARRIS: Hybrid Ranking and Regression Forests for Algorithm Selection
Abstract
It is well known that different algorithms perform differently well on an instance of an algorithmic problem, motivating algorithm selection (AS): Given an instance of an algorithmic problem, which is the most suitable algorithm to solve it?
As such, the AS problem has received considerable attention resulting in various approaches – many of which either solve a regression or ranking problem under the hood.
Although both of these formulations yield very natural ways to tackle
AS, they have considerable weaknesses.
On the one hand, correctly predicting the performance of an algorithm on an instance is a sufficient, but not a necessary condition to produce a correct ranking over algorithms and in particular ranking the best algorithm first.
On the other hand, classical ranking approaches often do not account for concrete performance values available in the training data, but only leverage rankings composed from such data.
We propose HARRISHybrid rAnking and RegRessIon foreSts - a new algorithm selector leveraging special forests, combining the strengths of both approaches while alleviating their weaknesses.
HARRIS’ decisions are based on a forest model, whose trees are created based on splits optimized on a hybrid ranking and regression loss function.
As our preliminary experimental study on ASLib shows, HARRIS improves over standard algorithm selection approaches on some scenarios showing that combining ranking and regression in trees is indeed promising for AS.
Introduction
To this day, there are competitions on solving hard instances of the SAT (boolean satisfiability problem) problem [10, 7].
In these competitions, one deals with a set of problems with the goal of solving them faster than the competitors.
Here, the participants rarely use one algorithm to solve all problem instances.
Instead, they utilize so-called algorithm selectors, often featuring machine learning models at their core, to predict the performance of different algorithms on the instance to select the one presumably performing best.
In practice, most algorithm selectors either leverage a regression [23, 2, 8] or a ranking [3, 6, 20] model to predict the best algorithm.
Unfortunately, both ranking and regression models feature considerable drawbacks when used at the core of a selector.
While creating a ranking across algorithms according to their predicted performance does indeed yield the correct ranking as long as the predictions are correct, such a ranking can also be created without correctly estimating the performance.
More precisely, correct performance predictions are a sufficient, but not a necessary criterion to create a correct ranking across the algorithms.
Correspondingly, one may wonder whether solving a regression problem might not be much harder than what is required.
From this perspective, ranking models are a more intuitive solution.
However, they often do not take the concrete performance values, which are usually present as training data, into account, but are trained based on rankings created from these.
Correspondingly, these ranking models are trained based on qualitative comparisons losing the actual quantitative information contained in the precise performance evaluations.
As such, they lack the means to quantify how close two algorithms are in a predicted ranking and thus are more susceptible to problems arising from algorithms with actually very similar performance.
In this paper, we propose a new algorithm selector leveraging a machine learning model trained based on a composite loss with both a ranking and regression component, dubbed HARRIS.
In particular, the core of HARRIS is formed by a random forest, whose trees are formed according to splits optimized on the aforementioned composite loss.
By doing so, HARRIS combines the strengths of both ranking and regression models while alleviating their weaknesses.
The Algorithm Selection Problem
In Algorithm Selection (AS) [15], we aim to find the best algorithm A i from a set of candidate algorithms {
A 1 , ..., A k }
=
A for a problem instance I ∈ I from a problem instance space I .
Formally, we seek to find a mapping, called algorithm selector s : I → A , which maximizes a costly-to-evaluate performance measure m : A × I → R .
Correspondingly, the optimal selector, called an oracle, is defined as
[Equation]
As the performance measure m is costly to evaluate, an exhaustive enumeration over the set of algorithms to choose the best performing one is no practical solution.
This holds especially for constraint satisfaction problems, where one is finally interested in the solution to the instance, which is obtained as a result of the first algorithm run anyway.
As a solution to this, most AS approaches leverage machine learning to learn a surrogate performance measure (cid:98) m : A × I → R mimicking the original performance measure m , while, in contrast to the original performance measure, being cheap to evaluate.
Using such a surrogate (cid:98) m , selectors can be constructed as s ( I ) =
arg max A ∈A (cid:98) m
( A, I ) .
To learn such surrogates, we assume that we can represent instances in terms of features, which are at least somewhat correlated with the performance of one or multiple of the algorithms.
Formally, these features are computed by a feature function g : I →
X and we will write x I ∈ X , when we want to address the features of instance i ∈ I .
When considering the algorithmic problem of SAT, such features could be, for example, the number of clauses or the number of variables.
Moreover, we assume that we are given some prior evaluations of the performance measure m for at least some of the algorithms on some training instances I train ⊂
I , which we can use for learning.
More formally, we assume training data with labels y
I
=
[ m ( I, A 1 ) , . . .
, m ( I, A k )]
∈ R k where A i ∈ A , i.e.,
D train = { ( x I , y I ) | I ∈ I train } . [Equation]
From Pure Ranking or Regression to Hybrid Ranking and Regression
In practice, the surrogate performance measure (cid:98) m is often implemented as a regression or ranking model based on a loss function ℓ : R k × R k
→ R , where we assume rankings to be represented as a k -dimensional real-valued vector for simplicity.
While the first kind of models is trained using a regression loss function such as the mean squared error, which is aimed at minimizing the differences between the predicted algorithm performances (cid:98) m ( · , · ) and the true performances m ( · , · ) on the training data D making it a quantitative approach.
Contrary to that, ranking models are trained based on ranking losses such as the (inverse of the) Spearman correlation [17], which tries to maximize the correlation between the ranking across the algorithms imposed by the predicted latent utility values (cid:98) m ( · , · ) and the ranking imposed by the true performances m ( · , · ) making it a qualitative approach.
Recall that both of these approaches have a significant disadvantage:
On the one hand, regression approaches try to predict the performance of an algorithm on an instance as accurately as possible, solving a, perhaps, harder problem than necessary as we are actually just interested in correctly ranking the algorithms.
On the other hand, ranking approaches often ignore the concrete performance evaluations available in the training data and instead focus only on the ground truth ranking imposed by such values and correspondingly, ignore valuable data.
This problem has been discussed before in [9] in the context of AS (and earlier in a more general setting in [16]), who advocate leveraging hybrid ranking and regression loss functions
[Equation]
composed of a convex combination of a regression loss function ℓ regression : R k × R k
→ R and a ranking loss function ℓ ranking : R k × R k
→ R .
Here, λ ∈ [0 , 1] is a hyperparameter controlling how strong the two loss functions influence the hybrid loss.
The underlying idea is to leverage the strengths of the two approach classes, i.e., focusing on the ranking problem while also incorporating the precise performance information available in the training data and as such, eliminate their main weaknesses in the context of AS.
The authors of [9] found that training simple linear models and neural networks to predict latent utility values for algorithms based on such a hybrid loss function can indeed be beneficial and in particular, that values of 0 < λ < 1 can yield the best performance.
Hybrid Ranking and Regression Forests
Building upon the successful work [9], in this work, we generalize the idea of training models based on such a hybrid loss function to tree-based models, known to be very effective in AS [21].
We build forests of hybrid trees, detailed in the following, analogously to standard random forests [4].
Recall that decision trees [5] are trained by splitting the training data D train recursively into two subsets, i.e., nodes D + train , D − train based on a feature until a stopping criterion is reached and hence, that particular node is not split further.
Such a leaf node is assigned a label computed from the associated dataset.
In our case, we associate two labels with each node:
First, a regression label (cid:98) y regression D ∈ R k obtained by averaging the labels in the associated dataset D and second, a ranking label (cid:98) y ranking D ∈ R k obtained by computing a consensus ranking through Borda’s method [13].
We choose splits, consisting of a feature f ∗ ∈ F , where F is the set of features, and a split point p ∗ , to minimize the weighted sum of the resulting dataset’s losses wrt.
the corresponding node labels, i.e.
[Equation]
These losses quantify the homogeneity of labels in the dataset and are calculated as a convex combination of ranking and regression losses L ( D ) =
λ L ranking ( D ) + (1 − λ )
L regression ( D ) where L ( D ) = 1 |D| (cid:80) ( x I , y I ) ∈D ℓ ( y I , (cid:98) y D ) and (cid:98) y D either corresponds to the ranking or regression label depending on whether ℓ is a ranking or regression loss function.
We solve the optimization problem in Equation 4 by a simple enumeration of all possible features and splitting points imposed by the training data and choosing the best one.
We utilize the mean squared error over all algorithms and instances as a regression loss L regression as in [9].
As a ranking loss, we leverage the Spearman correlation turned into a loss function by subtracting it from 1 , as we found this to work best in preliminary experiments.
For the same reason we leverage the depth of a tree as a stopping criterion.
At prediction time, we propagate the instance down the tree until a leaf node l with D l is reached.
Based on label (cid:98) y regression D l we finally return the algorithm performing best according to this label.
Since the choice of split is dependent on the utilized loss functions, their behavior is the dominant factor in the model’s quality.
However, we found that not all ranking loss functions are well suited for Hybrid Forests and a mismatch in the scale of ranking and regression losses can result in one loss dominating the other thereby mitigating the impact of λ .
To solve this we scaled the losses to the unit interval by scaling the performance data and dividing the ranking loss by the maximum possible loss.
Moreover, the performance of HARRIS heavily depends on the right choice of λ .
Evaluation
We assess the quality of HARRIS with an experimental evaluation on a small subset of the ASLib benchmark [2].
All experiments were run on Intel Xeon E5-2695 v3 @ 2.30GHz CPU and 64 GB
RAM.
To set our results into context, we evaluate against ISAC [11], random forest regressor (RFR) that predicts each algorithms performance with a random forests, and SATzilla’11 [22] as done in several recent works [21, 18, 19].
In the interest of reproducibility, all code is available at 1 .
The quality of each approach is evaluated using 10-fold cross validation with Kendall’s Tau-b [12] and PAR10 [2].
Kendall’s Tau quantifies the correlation between two rankings, where 1 indicates a perfect and − 1 an inverse correlation.
The PAR10 score corresponds to the runtime of the selected algorithm, if it is below a threshold C and 10 · C otherwise.
This threshold C is provided by the benchmark and corresponds to an upper bound on the runtime.
[Table]
Table 1 displays the PAR10 scores averaged across all folds of each approach on the corresponding scenario including the standard deviation.
Bold letters indicate the best performance.
Note that the performances shown for HARRIS are optimistic as they correspond to the best performance achieved by varying λ in steps of 0 .
1 and the tree depth in { 2 , 4 , 6 , 8 . 10 } .
Thus, they can only serve to get an idea of what HARRIS is capable of, if λ can be tuned correctly.
According to the average rank,
HARRIS is the second best approach.
[Figure]
Figure 1 visualizes the change in quality of HARRIS with fixed depth for varying λ in the PAR metric.
The results indicate that while λ strongly impacts the overall model quality, there are scenarios for which HARRIS is the superior/inferior model.
More figures can be found in the appendix (Section 7).
Conclusion
In this work, we proposed a hybrid ranking and regression tree-based approach to AS called, HARRIS.
Conceptually, HARRIS alleviates the weaknesses of pure ranking and regression AS solutions.
In a prototypical experimental study, we showed that with appropriately set hyperparameters, HARRIS can outperform existing algorithm selectors on some scenarios.
In future work, we plan to investigate whether tuning these hyperparameters automatically via means of hyperparameter optimization [1] yields good values on a scenario as suggested in [14].
Moreover, we plan to investigate other options for combining regression and ranking loss functions, for example, by working with probabilistic loss functions as this alleviates possible problems related to different scales. Acknowledgements
This work was supported by the German Research Foundation (DFG) within the Collaborative
Research Center “On-The-Fly Computing” (SFB 901/3 project no. 160364472).
Appendix Benchmark Scenarios
As mentioned in the paper, we evaluated the competitors performances with the ASlib [2] benchmark.
However, we were not able to evaluate on all scenarios but just a subset of them.
Key properties of them are shown in Table 2.
[Table]
An instance is unsolved if no candidate algorithm solves the instance before the cutoff is reached.
An evaluation of some algorithm on an instance is missing if the algorithm does not finish it’s calculation before the cutoff is reached.
Further Evaluation Results
In the paper we were only able to give a brief overview over the results of our evalaution.
Further resutls are shown in the following figures.
Figure 2 shows the results of our PAR10 evaluation for all considered scenarios.
[Figure]
Figure 3 shows the results of our Kendall’s Tau-b evaluation for all considered scenarios.
[Figure]
Figure 4 shows the results of our evaluation of different tree depths in terms of the PAR10 number of the resulting algorithm selector
[Figure]