scieee AI-readable full text Open interactive document viewer

Learning for Spatial Branching: An Algorithm Selection Approach

Ghaddar, Bissan; Gómez-Casares, Ignacio; González-Rodríguez, Brais; Rodríguez-Ballesteros, Sofía; Pateiro López, Beatriz; González Díaz, Julio

Abstract

The use of machine learning techniques to improve the performance of branch-and-bound optimization algorithms is a very active area in the context of mixed integer linear problems, but little has been done for nonlinear optimization. To bridge this gap, we develop a learning framework for spatial branching and show its efficacy in the context of the Reformulation-Linearization Technique for polynomial optimization problems. The proposed learning is performed offline, based on instance-specific features and with no computational overhead when solving new instances. Novel graph-based features are introduced, which turn out to play an important role for the learning. Experiments on different benchmark instances from the literature show that the learning-based branching rule significantly outperforms the standard rules.

Full text

Learning for Spatial Branching: An Algorithm Selection Approach Bissan Ghaddar∗1, Ignacio Gómez-Casares2, Julio González-Díaz2, Brais González-Rodríguez2, Beatriz Pateiro-López2, and Sofía Rodríguez-Ballesteros2 1Ivey Business School, Western University, London, Ontario, Canada 2CITMAga (Galician Center for Mathematical Research and Technology). Department of Statistics, Mathematical Analysis and Optimization and MODESTYA Research Group, University of Santiago de Compostela. Abstract The use of machine learning techniques to improve the performance of branch-and- bound optimization algorithms is a very active area in the context of mixed integer linear problems, but little has been done for non-linear optimization. To bridge this gap, we develop a learning framework for spatial branching and show its efficacy in the context of the Reformulation-Linearization Technique for polynomial optimization problems. The proposed learning is performed offline, based on instance-specific features and with no computational overhead when solving new instances. Novel graphbased features are introduced, which turn out to play an important role for the learning. Experiments on different benchmark instances from the literature show that the learning-based branching rule significantly outperforms the standard rules. Keywords: Spatial branching, non-linear optimization, polynomial optimization, machine learning, statistical learning. 1 Introduction In recent years, there has been a substantial rise on the use of learning techniques to improve the performance of branch-and-bound schemes. Most of the focus so far has been set on mixed integer linear programming (MILP) problems and, in particular, on learning to choose the branching variable (see Lodi and Zarpellon (2017) and Bengio et al. (2021) and references therein). Since branch-and-bound schemes are also at the core of most global optimization algorithms for solving non-linear and non-convex optimization problems, it is natural to ∗Corresponding author. Email: [email protected] 1 wonder to what extent the insights gained for (discrete) MILP problems can be successfully transferred to the (continuous) non-linear setting. To this end, in this paper we study variable selection for spatial branching in non-linear programming (NLP) problems. We develop our analysis for polynomial optimization (PO) problems, a subclass of NLP problems known to be NP-hard in the general case. PO has a wide range of practical applications in the context of control, energy and water networks, process engineering, facility location, economics and equilibrium, and finance (Ahmadi and Majumdar 2016,Ghaddar et al. 2015,2017). PO generalizes several special cases that have been thoroughly studied in optimization, including mixed binary linear optimization, convex/non-convex quadratic optimization, and complementarity problems. A key factor of the efficiency of state-of-the-art global solvers in non-linear optimization is the design of the branch-an-bound algorithm and, in particular, of its branching rules. Inspired by the recent literature on “learning to branch”, we explore ways to harness learningbased approaches to improve the performance of the branch-and-bound search for PO and, more specifically, we focus on variable selection in spatial branching. Among the various approaches that have been proposed for solving problems in PO, here we build upon the branch-and-bound scheme embedded in the Reformulation-Linearization Technique (RLT) introduced by Sherali and Tuncbilek (1992). Importantly, although we have framed our contribution in the context of the RLT technique for PO, the methodology and the gained insights are extensible to any branch-and-bound technique designed to find global optima for any class of NLP problems. 2 Contribution to the Literature Machine learning (ML) and the neighboring field of statistical learning have both been effectively leveraged in several areas to develop algorithms that learn from observing the performance of different tasks. While mathematical optimization intrinsically lies at the core of learning methods, recent years have seen a rise of research in the opposite direction: learning and predicting the best optimization approaches in different settings. In particular, as mentioned in Zarpellon (2020), a very active area of research “concerns the use of ML techniques in the algorithmic design of optimization solvers, independently of the application domain in which such algorithms are used”. A substantial part of the associated literature, to which this paper belongs, focuses on improving the performance of branch-and-bound schemes. Because of the wide ranging applications and the ease of use of state-of-the-art solvers, mixed integer linear programming represents an excellent testing ground for the aforementioned research. Further, since these problems are solved using branch-and-bound techniques, the richness of the data generated in the process naturally lends itself to learning. As already mentioned, variable selection in branch-and-bound schemes is probably the topic that has attracted the most attention so far and its outstanding importance for the performance of such schemes has long been recognized. As discussed in Zarpellon (2020), the integration of learning in the algorithmic design of the branching decisions “can involve different paradigms and approaches, and occur on various levels”. Strong branching has proven to be the variable selection rule that leads 2 to smallest trees (Linderoth and Savelsbergh 1999), but the associated computational costs make it’s overall performance not competitive with more sophisticated rules such as reliability branching (Achterberg et al. 2005). This motivates the research in Khalil et al. (2016) and Alvarez et al. (2017), where the authors devise learning approaches to approximate strong branching without the associated computational overhead, and test their approaches on the MIPLIB instances. Another natural learning approach related to branching is taken in Di Liberto et al. (2016) where the authors, inspired by the portfolio approaches to algorithm selection (Gomes and Selman 2001,Leyton-Brown et al. 2003), learn a clustering-based classifier to switch between branching rules and again test their approach on MIPLIB instances. Other work focuses on predicting the algorithm runtime for SAT problems (Eggensperger et al. 2018) as well as TSP and general MIP problems (Hutter et al. 2014). Because of the richness of the different learning paradigms, novel approaches in this area are constantly appearing such as the use of neural networks in Gasse et al. (2019). They approximate strong branching by encoding the branching policies into a graph convolutional neural network which “allows exploiting the natural bipartite graph representation of MILP problems, thereby reducing the amount of manual feature engineering”. Then, they test their approach on four benchmarks of specific combinatorial optimization problems. Although some work has been done on using learning for NLP, this area is still not as mature as the one for MILP (see Bengio et al. (2021)). For instance, for non-convex quadratic programming problems with box constraints, Baltean-Lugojan et al. (2019) try to learn effective linear outer-approximations of semidefinite constraints. To generate the corresponding cuts, a neural network is used to “select the most promising submatrices without the computational burden of solving semidefinite programming problems”. For convex quadratic problems, Bonami et al. (2022) use ML to decide between applying branch and bound on the quadratic problem and applying it on an equivalent MILP reformulation. Despite the extensive work done on learning to branch in MILP problems, it is an issue not yet well understood and a very active area of research. The understanding of variable selection is even more limited in spatial branching for NLPs, where there has not been much research in the topic (an exception is Belotti et al. (2009)), much less in the learning context. Our research aims to bridge this gap by proposing a learning framework for spatial branching. We start by noticing that even relatively similar branching rules exhibit a lot of variability in their relative performance to one another across instances of different test sets. This is not something specific to this setting since, as argued in Di Liberto et al. (2016) and references therein, work in portfolio algorithms has shown that there is often no single approach that performs best on all instances. Thus, it is important to know to what extent one can learn which rule will perform best on a given instance and this is the main objective of this paper. We follow an algorithm selection approach in the spirit of the one used in Di Liberto et al. (2016) for MILP problems, but our learning takes place in a regression framework instead of a clustering one. In the present work, learning is done offline and the branching rule for a new instance is selected based on its underlying features. Given the promising results we obtain, the proposed approach can be seen as a first step towards more sophisticated (possibly online) learning schemes for variable selection in NLP problems. Given that the learning takes place offline, our approach entails no computational overhead once the solving process starts, so there is no node-efficiency vs. time-efficiency trade-off. We develop our analysis for PO problems by building upon the global solver RAPOSa (González-Rodríguez 3 et al. 2022). We perform our numerical experiments using a comprehensive set of instances that builds upon well established benchmarks including randomly generated instances from Dalkiran and Sherali (2016), MINLPLib instances (Bussieck et al. 2003), and QPLIB instances (Furini et al. 2018), which illustrate that our approach can be successfully applied to general PO problems without focusing on a particular class of problems or structure. The contribution of this paper is threefold: (1) developing a framework for learning to select the most efficient branching rule in non-linear optimization problems, (2) defining graph-based features and branching rules that significantly contribute to the outcome of the learning process, and (3) introducing a new performance measure which, by combining information related to both running time and optimality gap, allows for a smooth comparison in sets of instances of varying structure and difficulty. The reminder of this paper is organized as follows. In Section 3, we present the core elements on which our learning framework stands: i) the RLT-based spatial branch-and- bound scheme for polynomial optimization and ii) the set of branching rules for algorithm selection. In Section 4, we describe the learning methodology, motivate and define the novel KPI, and describe the features used for learning. In Section 5, we show the performance of the learning approach. Finally, conclusions and future research directions are drawn in Section 6. 3 Motivation and Problem Description As we have discussed, the main goal of this paper is to provide a first study of the impact that learning may have in the context of spatial branching. In this section we describe the polynomial optimization setting in which we develop our analysis, some graphs and graph-related features for polynomial optimization problems, and the branching rules that constitute our portfolio for algorithm selection. 3.1 Polynomial Optimization and RLT Technique The Reformulation-Linearization Technique was originally developed in Sherali and Tuncbilek (1992). It was designed to find global optima in polynomial optimization problems of the following form: minimize ϕ0(x) subject to ϕr(x)≥βr, r = 1,2, . . . , R1 ϕr(x) = βr, r =R1+ 1, . . . , R x∈Ω⊂R|N|, (PO) where Ndenotes the set of variables, each ϕr(x)is a polynomial of degree δr∈Nand Ω = {x∈R|N|: 0 ≤lj≤xj≤uj<∞,∀j∈N} ⊂ R|N|is a hyperrectangle containing the feasible region. Then, δ= maxr∈{0,...,R}δris the degree of the problem and (N, δ)represents all possible monomials of degree δ. RLT is based on the construction of a linear relaxation of the polynomial problem, which is then embedded in a branch-and-bound scheme. This is accomplished by replacing each 4 monomial of the problem with a corresponding RLT variable. For example, associated with a monomial of the form x1x2x4one would define the RLT variable X124. More generally, RLT variables are defined as XJ=Y j∈J xj,(1) where Jis a multiset containing the information about the multiplicity of each variable in the underlying monomial. Then, at each node of the branch-and-bound tree, the corresponding linear relaxation is solved. In order to get tighter relaxations and ensure convergence, additional constraints, called bound-factor constraints, are also added (and linearized). These constraints are given, for each pair of multisets J1and J2such that J1∪J2⊂(N, δ)and |J1∪J2|=δ, by Fδ(J1, J2) = Y j∈J1 (xj−lj)Y j∈J2 (uj−xj)≥0.(2) Dalkiran and Sherali (2013) identify a collection of monomials, which they call J-sets, such that convergence to a global optimum is still guaranteed if the bound-factor constraints associated with these monomials are considered. We adopt this approach since it can dramatically reduce the size of the resulting relaxation while preserving most of its tightness. Branching is performed as follows. At each node, once the corresponding relaxation has been solved, a score is assigned to each variable depending on the violations of the RLT identities (1) in which it is involved. Then, the variable with the highest score is chosen for branching, splitting the interval between its lower and upper bound at its optimal value at the current node. The precise computation of the aforementioned scores is therefore a crucial step in any implementation of the RLT, which we discuss in Section 3.3. 3.2 Graphs Associated to Polynomial Optimization Problems The relevance of graph representations of general optimization problems has long been recognized and, as discussed in Bienstock and Muñoz (2018) and Faenza et al. (2022), polynomial optimization problems are not an exception. Our interest on these graphs is twofold: first, as a means to define new branching rules and, second, to define features that can be taken as input by the learning process. For a given polynomial optimization problem, one can associate different graphs that capture some characteristics of its structure. In this paper, to any PO problem, we associate two different graphs, both based on the concept of intersection graphs as defined in Fulkerson and Gross (1965). The first one is the variables intersection graph, VIG, analogous to the one used in Bienstock and Muñoz (2018). It is built by assigning a vertex to each variable and connecting two vertices if the corresponding variables appear together in some monomial of PO. The second one is the constraints-monomials intersection graph, CMIG, where we have one vertex for each monomial, one vertex for each constraint, and one for the objective function. We then connect one vertex associated to a monomial with one associated to a constraint (or the objective function) if the monomial appears in the constraint (or objective function). Once the graphs are defined, we are interested in parameters that summarize some properties of their underlying structure. Below we describe several standard parameters that we 5 use in different parts of our analysis (for further details refer, for instance, to Latora et al. (2017)). •Density or edge density. Given a graph G, the edge density of Gis defined as the number of edges in Gdivided by the number of edges in the complete graph with the same number of nodes. It measures how close a graph is to being a complete graph. A higher density means the nodes in the graph are more connected. •Treewidth. Given a graph G, the treewidth is the smallest width of any treedecomposition of G(Robertson and Seymour 1984). It gives a measure of how close a graph is to a tree. Trees have a treewidth of one and complete graphs with knodes have a treewidth k−1. To estimate the treewidth we use the min-fill heuristic. •Modularity. Given a partition of a graph G, the modularity of the partition is a measure that tries to assess how “good” it is, in the sense that a high modularity means that the graph has dense connections between the nodes within each set in the partition but sparse connections between nodes in different sets. The modularity of Gis the maximum modularity over all the possible partitions of the graph. Since the exact computation of this parameter is a hard computational problem, we use the greedy algorithm in Clauset (2004) to compute an approximate value. •Transitivity. The transitivity of a graph Gis the ratio between the number of triangles (subgraphs that are complete graphs of order 3) and the number of triads in G. It gives relevance to links between nodes which are both adjacent to another common node. •Eigenvector centrality or eigencentrality. For each node in a graph, its centrality score is the corresponding value in the first eigenvector of the graph adjacency matrix. The centrality of a node is then proportional to the sum of the centralities of it’s neighbors. We now move to the definition of different branching rules, two of which heavily rely on the eigencentralities of the nodes associated with the variables of the problem. The results in Section 5.2.3 show that both the graph-related features and the graph-related branching rules play an important role in the learning. 3.3 Branching Rules State-of-the art solvers for non-linear optimization build upon two main themes to define their variable selection rules: i) adaptations of MILP methods such as strong branching and, most notably, reliability branching (Achterberg et al. 2005), as described in Belotti et al. (2009) and ii) contributions of the variables to the violations of non-linear terms using variants of the so-called violation transfer (Tawarmalani and Sahinidis 2004,Belotti et al. 2009). In the specific context of RLT, past literature has mainly focused on violations of the RLT-defining identities, which we also take as our starting point. In the seminal paper by Sherali and Tuncbilek (1992), starting from an optimal solution (¯ X, ¯x)at a node in the 6 branch-and-bound tree, the violation of each variable in PO is computed according to the following expression: θj= max J⊂(N,δ): |J|<δ{| ¯ XJ∪{j}−¯xj¯ XJ|}, (3) where J∪{j}considers only the monomials present in PO. Then, the variable that maximizes this value is chosen for branching. More recent contributions such as Sherali et al. (2012a,b) and González-Rodríguez et al. (2022) rely on variations of (3) where the maxima are replaced with sums. In particular, González-Rodríguez et al. (2022) define various branching rules based on the formula: θj=X J⊂(N,δ): |J|<δ w(j, J)|¯ XJ∪{j}−¯xj¯ XJ|,(4) where w(j, J)are the weights associated with the violations and, again, J∪ {j}considers only the monomials present in PO. Table 1: Definition of the branching rules. Branching rule Definition Maximum (max) Eq. (3). Sum (sum) Eq. (4), with w(j, J)=1for all jand J. Dual (dual) Eq. (4), with w(j, J)defined as the sum of the absolute values of the shadow prices of the problem constraints containing J∪ {j}. Range (range) Eq. (4), with w(j, J) = min {¯uj−¯xj,¯xj−¯ lj} uj−lj, where ujand ljare the upper and lower bound of xjat the root node, i.e. PO, and ¯ujand ¯ ljare the bounds at the current node. Eigencentrality VIG (eig-VI) Eq. (4), with w(j, J)defined as the eigencentrality of xj’s node in VIG. Eigencentrality CMIG (eig-CMI) Eq. (4), with w(j, J)defined as the eigencentrality of xj’s node in CMIG (0if xjnever appears alone in a monomial). In order to define our portfolio of branching rules, we complement the original formulation in (3) with various rules defined by using different weights in (4), which can be seen in Table 1. The first four rules have been studied in the literature (see, for instance, González-Rodríguez et al. (2022)), whereas the two graph-based rules are novel.1 Figure 1shows the results of a preliminary computational experiment to assess the performance of the different branching rules on PO problems. More precisely, we used three different sets of instances (refer to Section 5.1 for details): DS (Dalkiran and Sherali 2016), MINLPlib (Bussieck et al. 2003), and QPLIB (Furini et al. 2018). For our comparison of the branching rules we use a KPI whose values are normalized to [0,1] (details are given in Section 4.1). The closer the normalized KPI is to 1 for a given branching rule, the better the performance of that rule. Figure 1a shows, for the problems in each of the three sets of 1The reason behind choosing only one rule based on maxima is that previous analysis have shown that “maxima”-based rules are normally outperformed by the “sum”-based counterparts (González-Rodríguez et al. 2022). 7 DS (n=170) MINLPLib (n=129) QPLIB (n=55) max sum dual range eig−VI eig−CMI max sum dual range eig−VI eig−CMI max sum dual range eig−VI eig−CMI 0.00 0.25 0.50 0.75 1.00 (a) Boxplots of the normalized KPI for each of the branching rules. 1 0.94 0.89 0.9 0.85 0.67 1 0.94 0.91 0.88 0.86 0.74 1 0.95 0.93 0.9 0.83 0.52 1 0.9 0.89 0.83 0.76 0.75 1 0.93 0.91 0.87 0.87 0.7 1 0.96 0.94 0.86 0.78 0.82 1 0.57 0.63 0.67 0.71 0.58 1 0.36 0.78 0.77 0.47 0.31 1 0.55 0.69 0.61 0.54 0.26 1 0.54 0.48 0.65 0.41 0.21 1 0.91 0.83 0.53 0.68 0.68 1 0.59 0.57 0.59 0.46 0.49 1 0.63 0.64 0.9 0.98 0.93 1 0.98 0.98 0.93 0.7 1 0.57 0.87 0.49 0.8 0.96 1 0.84 1 0.79 0.41 0.69 1 0.83 0.98 0.69 0.62 0.32 1 0.59 0.76 0.84 0.93 0.92 DS (n=170) MINLPLib (n=129) QPLIB (n=55) max sum dual range eig−VI eig−CMI max sum dual range eig−VI eig−CMI max sum dual range eig−VI eig−CMI 0% 25% 50% 75% 100% Ranking 1 2 3 4 5 6 (b) For each instance branching rules were ranked from 1 (best) to 6 (worst), according to the KPI. Stacked bar graphs represent percentage of problems in each rank position per branching rule. Numbers inside bars indicate the average value of the normalized KPI for the problems in each rank position. Figure 1: Comparative analysis of the performance of the different branching rules. 8 instances, the boxplots of this normalized KPI using each of the described branching rules. As expected, no branching rule outperforms the rest in the different data sets. While the sum rule performs reasonably well in the DS instances, it does not for the ones in MINLPLib. In QPLIB, the eig-CMI rule clearly outperforms all other rules, but it would be a poor choice for many of the MINLP instances. These observations already hint at the promising potential of the integration of learning techniques in the branching rule selection process. In Figure 1b we rank, for each problem, the branching rules from 1 (best) to 6 (worst), according to the normalized KPI. The stacked bar graphs represent the percentage of problems in each rank position per branching rule and the numbers inside the bars indicate the average value of the normalized KPI for the problems in each rank position. Note that it is important not only to choose the best possible branching rule, but also to ensure that, in case of not doing so, the selected rule still performs reasonably well. For instance, for those MINLPLib instances where the max rule is not the best one, its performance is on average significantly worse than other methods, ranging from 0.21 to 0.65. In those cases it would be preferable to choose, for instance, the range rule, even when it is not the best possible choice, since its performance then ranges from 0.53 to 0.91. In addition to the above branching rules, in Section 5.3 we also study the impact in our learning framework to three new branching rules based on adaptations of reliability branching and violation transfer to our setting, as explained in Appendix 7. 4 Proposed Methodology 4.1 A Novel Key Performance Indicator Carrying out a fair comparison of the performance of different algorithms on instances of varying difficulty often involves some challenges. Ideally, one would like to have a KPI that allows to compare the performance on all instances together, but the most widely used KPIs, running time and optimality gap, fail to do so. To illustrate this, let’s define the following subsets of the set of instances: •A=“Instances solved by all algorithms within the time limit”, •B=“Instances solved by some but not all algorithms within the time limit”, and •C=“Instances not solved by any algorithm within the time limit”. The running time is a good KPI in Aand uninformative in C, whereas the optimality gap is a good KPI in Cand uninformative in A. Further, neither the time nor the gap allows differentiating between algorithms for all instances in B, since the running time does not distinguish between algorithms that have reached the time limit (but with different gaps) and the optimality gap does not distinguish between algorithms that have solved the given instance (but with different running time). Because of this, it is customary to split the performance analysis separating the problems in A∪Band Cor Aand C∪B. For instance, in Alvarez et al. (2017) they “separated the problems that were solved by all methods from the problems that were not solved by at least one of the compared methods”. An important limitation of such approaches is that the sets A,B, and Cdepend on the algorithms to be 9 Optimal is an instance-specific oracle, i.e., it chooses, for each instance, the original rule that performs best. We can see that the three learning approaches Q-GAM, SGB-QR, and Q-RF have similar performance with respect to , although Q-RF performs slightly better. Table 3: ML-based rules’ performance with respect to (average over test sets). Baseline WS WS + BT Best (across all instances) 1.875 1.534 0.819 ML-based branching rule: Q-GAM 1.439 1.181 0.782 SGB-QR 1.439 1.174 0.763 Q-RF 1.415 1.153 0.745 Optimal (instance-specific oracle) 1.187 0.956 0.653 Improvement after learning (with Q-RF) 24.5% 24.8% 9.0% Optimal improvement (upper bound for learning) 36.7% 37.6% 20.2% We also compare the learning approaches in a more principled statistical manner. Recall that, for each learning approach, the ML-based branching rule of a given instance is the one that corresponds to the highest predicted τ-conditional quantile of the normalized KPI. Thus, we can evaluate the predictive performance of the three methods by measuring the accuracy on the predicted quantiles. We do so by using the prediction error measurement for quantile regression methods introduced in Wang and Li (2013). More specifically, for each learning approach, we have computed the mean absolute prediction error for each branching rule over the ten test subsamples. The overall average errors of Q-GAM, SGB-QR, and Q-RF are 1.53, 1.16, and 0.95, respectively. Since Q-RF is also the best from this point of view, hereafter we use it as the reference learning method. 5.2.2 Assessing the impact of the learning. Going back to Table 3, we can see that, for the Baseline configuration, Q-RF improves the pace by 24.5% when compared to Best. Importantly, this is not far from the improvement obtained by Optimal,36.7%, which is an upper bound for our algorithm selection approach. For WS + BT, the improvement with Q-RF is 9% and the optimal one is 20.2%. This is due to the fact that bound tightening techniques already improve the bounds significantly, reducing the search space and, therefore, reducing as well the room for improvement using different branching rules. Interestingly, WS enhancement improves the KPI from 1.875 to 1.534, which is 18.2%, falling short of the 24.5% improvement obtained using Q-RF in the baseline model. This implies that, given the choice between implementing a warm start enhancement or a machine-learning branching approach, the latter might be preferable (and with no computational overhead). Table 4shows that, when evaluating the performance using out-of-bag predictions for the Q-RF methodology, we get similar results (the reported values correspond to the geometric means of across all the instances of the dataset and Best was always dual). In Appendix 8we also evaluate the performance of Q-RF using running times, optimality gaps, and number of solved instances. In particular, the results there show that most of the improvement in the KPI comes from the reduction of the optimality gap in unsolved instances. 16 Table 4: ML-based rule’s performance with respect to (Out-of-bag). Baseline WS WS + BT Best (across all instances) – dual 1.736 1.399 0.733 Out-of-bag Q-RF 1.191 1.050 0.678 Optimal (instance-specific oracle) 0.983 0.810 0.601 Improvement after learning (with Q-RF) 31.4% 24.9% 7.5% Optimal improvement (upper bound for learning) 43.4% 42.1% 18.0% 0.00 0.25 0.50 0.75 1.00 0% 25% 50% 75% 100% All (n=354) All (n=354) 1 0.9 0.91 0.73 0.8 0.7 1 0.78 0.74 0.82 0.82 0.69 1 0.73 0.89 0.86 0.66 0.43 1 0.72 0.8 0.74 0.76 0.51 1 0.69 0.72 0.72 0.54 0.67 1 0.91 0.9 0.67 0.78 0.6 1 0.76 0.79 0.78 0.69 0.59 ML Q−RF max sum dual range eig−VI eig−CMI ML Q−RF max sum dual range eig−VI eig−CMI Ranking 1 2 3 4 5 6 Figure 2: Performance in Baseline configuration. Left, boxplots of all the branching rules. Right, branching rules ranked from 1 (best) to 6 (worst), according to . 17 In order to get additional insights from the above results, we now explore in depth the performance of the ML-based branching rule Q-RF in the Baseline setup, building upon the out-of-bag predictions.5 In Figure 2, the complete set of instances for the three libraries is used (total of 354 instances). The boxplots show that is significantly closer to 1 for Q-RF than for any of the original rules. For the bar chart, it also validates that Q-RF is outperforming the other branching rules as it is ranked number 1 (best) in terms of the pace more often (38.98% compared to range which is 36.72%). The numbers inside the bars indicate the average value of for the problems in each rank position. Note that Q-RF always chooses one of the six original rules and, hence, for its ranking in a given instance we just take the ranking of the branching rule it chooses for that instance. Even when Q-RF is ranked 6th (worst), its average normalized pace value is 0.7 which is also better than the corresponding value for all the other six branching rules (ranging from 0.43 to 0.69). In particular, the plots in Figure 2show that, although the learned criterion chooses the best rule in less than 50% of the instances, it consistently chooses rules whose performance is very close to that of the best rule. This last observation also allows to understand why the improvement after learning with Q-RF, reported in Tables 3and 4, is close to the optimal improvement. In Figure 3we separate the results in Figure 2for the three sets of instances, DS, MINLPLib, and QPLIB. The number of instances within each library is indicated in parenthesis. There are some differences across datasets. For instance, the box plots show little variation in across the branching rules for DS set compared to the other two sets. The max rule is the worst one, while the other rules are close in terms of normalized pace. For MINLPLib, range performs slightly better than Q-RF as the number of times that range ranked first is 45.73% compared to 43.41% for Q-RF. For QPLIB, both Q-RF and eig-CMI strongly dominate in terms of performance, ranking first in 52.72% and 56.36% of the instances, respectively. Note that for this set, the range rule, which performed very well for MINLPLib, is the worst branching rule for QPLIB. In particular, it is ranked 6th in around 20% of the instances with an average of 0.32 in them, while the other rules, when ranked 6th, have an average ranging from 0.69 to 0.96. Therefore, the ML-based rule seems to behave well in all three sets of instances, which suggests that it is not overfitting to a particular one. Next, we further explore to what extent the ML-based rule manages to learn the patterns behind Optimal. Figure 4presents a comparison of the frequencies with which the original rules are chosen by the ML-based rule and Optimal. The behavior of the ML-based branching rule strongly resembles that of optimal in all three datasets. For DS the dominant rule is range, with dual and eig-CMI also playing an important role. For MINLPLib, range dominates again and, surprisingly, max rule is chosen quite often and so is again dual. For QPLIB, eig-CMI is chosen for almost 50% of the instances for both the ML-based rule and Optimal. Interestingly, in this last set of instances, the range is rarely selected. Overall, these findings are consistent with the results presented in Figure 3. Recall that our offline learning is performed jointly on all sets of instances, so the results in Figure 4, showing that the ML-based rule matches the patterns of Optimal in the instances in DS, MINLPLib, and QPLib, are a sign of the quality of the learning process and of its potential to learn from 5We have also run the corresponding analysis for WS and WS+BT configurations, obtaining qualitatively similar results. 18 DS (n=170) MINLPLib (n=129) QPLIB (n=55) ML Q−RF max sum dual range eig−VI eig−CMI ML Q−RF max sum dual range eig−VI eig−CMI ML Q−RF max sum dual range eig−VI eig−CMI 0.00 0.25 0.50 0.75 1.00 (a) Boxplots of the normalized pace using the described branching rules. 1 0.94 0.89 0.9 0.85 0.67 1 0.94 0.91 0.88 0.86 0.74 1 0.95 0.93 0.9 0.83 0.52 1 0.9 0.89 0.83 0.76 0.75 1 0.96 0.92 0.83 0.87 0.65 1 0.93 0.91 0.87 0.87 0.7 1 0.96 0.94 0.86 0.78 0.82 1 0.57 0.63 0.67 0.71 0.58 1 0.36 0.78 0.77 0.47 0.31 1 0.55 0.69 0.61 0.54 0.26 1 0.54 0.48 0.65 0.41 0.21 1 0.8 0.82 0.61 0.67 0.63 1 0.91 0.83 0.53 0.68 0.68 1 0.59 0.57 0.59 0.46 0.49 1 0.63 0.64 0.9 0.98 0.93 1 0.98 0.98 0.93 0.7 1 0.57 0.87 0.49 0.8 0.96 1 0.84 1 0.79 0.41 0.69 1 0.97 0.98 0.95 0.78 0.93 1 0.83 0.98 0.69 0.62 0.32 1 0.59 0.76 0.84 0.93 0.92 DS (n=170) MINLPLib (n=129) QPLIB (n=55) ML Q−RF max sum dual range eig−VI eig−CMI ML Q−RF max sum dual range eig−VI eig−CMI ML Q−RF max sum dual range eig−VI eig−CMI 0% 25% 50% 75% 100% Ranking 1 2 3 4 5 6 (b) Branching rules ranked from 1 (best) to 6 (worst), according to the normalized pace. Figure 3: Performance in Baseline configuration. Comparison across the sets of instances. 19 DS (n=170) MINLPLib (n=129) QPLIB (n=55) ML Q−RF Optimal ML Q−RF Optimal ML Q−RF Optimal 0% 25% 50% 75% 100% Branching rule max sum dual range eig−VI eig−CMI Figure 4: Stacked bar graphs represent percentage of times that each branching rule is selected by Q-RF and Optimal. highly hetereogeneous instances. 5.2.3 Interpretability. One advantage of the learning techniques used in our analysis is the interpretability. In particular, (quantile) random forests allow to assign scores to the different features and, hence, understand the ones that are the most important for the associated predictions. Since our Q-RF builds upon six independent regressions, one for each of the original branching rules, we have six different scores for each explanatory feature. Figure 5presents, for each of the six regressions, the feature importance scores of the top 15 features overall. A first observation is that the novel graph-related features are important, as three of them appear in the top 8: CMIG.mod, VIG.mod, and CMIG.Dens. Further, CMIG.mod, the modularity on CMIG, is in second position. Different features have different importance score for learning different branching rules. In particular, graph-related features are important for the corresponding graph-based rules: CMIG.mod and CMIG.Dens are particularly important for eig-CMI and VIG.mod score is very high for eig-VI. Additionally, the most important features for learning range and dual branching rules are those related to the ranges of variables. The highest scores accross the individual regressions are obtained by MON.CONS and Var.App for eig-CMI, VIG.mod for eig-VI, and CMIG.mod for max. Whereas VIG.mod’s score for eig-VI might be expected, the mechanisms behind the others would require further investigation, and in particular, CMIG.mod’s score for max, which might not be expected since max is not a graph-based branching rule. Although a deep analysis along these lines is definitely worth pursuing, it is beyond the scope of this paper. 20 VAR.Rang (median) VAR.CONS (ratio) RLTVAR.CONS (ratio) CMIG.Dens COEFF (var) COEFF (avg) VAR.App (var) VIG.Dens MON.CONS (ratio) VIG.mod MON.Pct (avg) VAR.Rang (avg) VAR.Rang (var) CMIG.mod VAR.App (avg) 0 5 10 Variable importance Features Branching rule max sum dual range eig−VI eig−CMI Figure 5: Stacked bar graphs represent, for each branching rule, variable importance score of the features obtained using Q-RF. 5.2.4 Performance profiles. To conclude, we compare the performance of the different branching rules by showing the corresponding performance profiles (Dolan and Moré 2002). In Figure 6we present the performance profiles for the three sets of instances together and individually. In the x-axis we represent ratios of the pace, while in the y-axis we represent the percentage of instances in which the corresponding configuration has a ratio lower than the value on the x-axis. For each instance, the ratios are computed dividing the pace of each configuration by the pace of the best configuration in that instance. Consistently with all the results we have already reported so far, the ML-based rule Q- RF performs noticeably better than all the original branching rules. From the DS library plot, Q-RF performs slightly better than 4 of the 6 branching rules (while max and eig-VI are significantly worse). For MINLPLib library, Q-RF is clearly the best and range is in second position. For QPLIB, Q-RF is slightly better than eig-CMI and dominates the other 5 branching rules. Therefore, despite having that the original rules performing best vary significantly for the different sets of instances, Q-RF manages to slightly outperform the best rules in each individual set and solidly outperforms all the original rules overall. 5.3 Enhancing the Portfolio of Branching Rules By definition, the larger the portfolio of branching rules is, the better the performance of Optimal will be, i.e., the larger the potential for improvement with the learning method we have developed. Similarly, for a given number of rules in the portfolio, one might also expect that the more diverse they are, the larger the potential for improvement should be. In order to assess these two assertions, we incorporate into our analysis three new rules: an adaptation of reliability branching (Achterberg et al. 2005), rb, and two variants of violation transfer (Tawarmalani and Sahinidis 2004), vt1and vt2(refer to Appendix 7for details). 21 MINLPLib (n=129) QPLIB (n=55) All (n=354) DS (n=170) 1.0 1.5 2.0 2.5 1.0 1.5 2.0 2.5 0 20 40 60 80 100 0 20 40 60 80 100 ratio Problems (%) Branching rule ML Q−RF max sum dual range eig−VI eig−CMI Figure 6: Performance profiles using the pace KPI for different sets of instances. We define two new portfolios of branching rules: •Portfolio-6. Contains six branching rules, as in the previous analysis, obtained by combining the latter three rules with the three best performing ones in the original portfolio: dual,range, and eig-VI. By preserving the size of the portfolio, we can ensure that the differences in performance of the resulting ML-based rule stem from the additional richness of the rules in the portfolio. •Portfolio-9. A portfolio of nine branching rules, in which the three new rules are added to the original portfolio. This allows to study the joint impact of size and richness of the portfolio. Table 5: ML-based rule’s performance with respect to (Out-of-bag) in Portfolio-6. Baseline WS WS + BT Best (across all instances) – dual 1.736 1.399 0.733 Out-of-bag Q-RF 1.131 0.908 0.630 Optimal (instance-specific oracle) 0.900 0.741 0.532 Improvement after learning (with Q-RF) 34.9% 35.1% 14.1% Optimal improvement (upper bound for learning) 48.2% 47.0% 27.4% Table 5shows that, in Portfolio-6, the improvement achieved by Optimal increases between 4.8% and 9.4% with respect to the old portfolio. Similarly, the improvement of the 22 Table 6: ML-based rule’s performance with respect to (Out-of-bag) in Portfolio-9. Baseline WS WS + BT Best (across all instances) – dual 1.736 1.399 0.733 Out-of-bag Q-RF 1.089 0.964 0.632 Optimal (instance-specific oracle) 0.891 0.733 0.526 Improvement after learning (with Q-RF) 37.3% 31.1% 13.8% Optimal improvement (upper bound for learning) 48.7% 47.6% 28.2% ML-based rule, Q-RF, increases between 3.5% and 10.2%. This shows that, as expected, our ML-framework benefits from the quality and richness of the underlying portfolio. Then, the results in Table 6show that adding back max,sum, and eig-VI to the portfolio barely improves the performance of Optimal, since we just get an additional 0.5%-0.8% with respect to Portfolio 6. Although the Q-RF rules obtained for both Portfolio 6 and Portfolio 9 clearly dominate the one obtained in Section 5.2, the comparison between them is not so clear. The rule obtained for Portfolio 9 is 2.4% better in Baseline, but 4% and 0.3% worse in WS and WS+BT, respectively. Thus, although the results for Portfolio-6 show that the quality of the rules in the portfolio should definitely have a positive impact in the performance of the ML-based rule, the results for Portfolio-9 suggest that adding poor rules to the portfolio might even have a detrimental effect on its performance. The plots in Figure 7provide some additional insights. Clearly, among the new branching rules, the main impact comes from rb, which is competitive with dual and range: it is the best rule in around 25% of the instances in both portfolios and it is chosen by ML-based Q-RF slightly under 40%. On the other hand, vt1and vt2combined are the best in around 12% of the instances and are chosen by ML-based Q-RF in just around 5%. 6 Conclusions and Future Research We have presented a framework for learning rules for spatial branching in the context of the RLT technique for polynomial optimization problems. Yet, the learning approach is general and can be applied to any algorithm for global optimization problems. Further, the approach can be readily adapted to any setting where the goal is to choose between different “configurations” of a given algorithm by “learning” which is the best one and making an informed guess upon observing a new instance. We have shown in different numerical experiments that the resulting gains in performance can be significant (up to 30%). These experiments have been performed jointly on a set of diverse instances taken from standard NLP libraries and from past literature. Interestingly, we have also shown that the interpretability of our framework allows to assess the importance of the different explanatory features for the resulting ML-based rules. A direction for future research, on which current literature on “learning to branch” has not yet delved deeply into, is to rely on interpretability to develop studies that may shed light on the feature-design in these settings. As we briefly discussed in Section 4.2, neglecting node by node information and limiting the scope of the algorithm selection to be instance specific, instead of node specific, may result 23 (a) Boxplots of in Portfolio-6. (b) Boxplots of in Portfolio-9. (c) Rules’ percentages in Portfolio-6. (d) Rules’ percentages in Portfolio-9. Figure 7: Performance of the ML-based rules in Portfolio-6 and Portfolio-9. 24 in learning a less effective branching rule. Yet, given that this paper is the first contribution to “learning to branch” in the non-linear setting, we believe that the instance-specific learning setting provides a natural starting point. First, since it involves no computational overhead for the computation of node-specific features, the differences in performance of the learned rule with respect to the original ones directly reflect the net effect of the learning process. Second, the use of instance-specific rules allows for a clean definition of the “optimal” rule for each instance (this would not be entirely straightforward with dynamic rules, where the selection of the best “myopic” rule in each node might not lead to the best performance on the given instance). This is relevant since, once we pin down what can be achieved with perfect learning, one can easily assess the quality of the learning behind the rules resulting from our approach. Third, instance-specific learning provides a benchmark on which to assess the performance of more advanced dynamic techniques and, in particular, to evaluate to what extent the online computational overhead of node-specific features is compensated by the reduction of the tree size. This work is part of the R+D+I project grants MTM2017-87197- C3, PID2021-124030NB-C32 and PID2020-116587GB-I00 funded by MCIN/AEI/10.13039/501100011033/ and by “ERDF A way of making Europe”/EU. This research was also funded by Grupos de Referencia Competitiva ED431C-2021/24 from the Consellería de Cultura, Educación e Universidades, Xunta de Galicia. Brais González-Rodríguez and Ignacio Gómez-Casares acknowledge support from the Spanish Ministry of Education through FPU grants 17/02643 and 20/01555, respectively. Bissan Ghaddar’s research is supported by Natural Sciences and Engineering Research Council of Canada Discovery Grant 2017-04185 and by the David G. Burgoyne Faculty Fellowship. References Achterberg, T., Koch, T., and Martin, A. (2005). Branching rules revisited. Operations Research Letters, 33(1):42–54. Ahmadi, A. A. and Majumdar, A. (2016). Some applications of polynomial optimization in operations research and real-time decision making. Optimization Letters, 10(4):709–729. Alvarez, A. M., Louveaux, Q., and Wehenkel, L. (2017). A machine learning-based approximation of strong branching. INFORMS Journal on Computing, 29(1):185–195. Baltean-Lugojan, R., Bonami, P., Misener, R., and Tramontani, A. (2019). Scoring positive semidefinite cutting planes for quadratic optimization via trained neural networks. Technical report, Optimization-online 6943. Belotti, P., Lee, J., Liberti, L., Margot, F., and Wächter, A. (2008). Branching and bounds tightening techniques for non-convex MINLP. Technical report, Optimization-online 2059. IBM Research Report RC24620. Belotti, P., Lee, J., Liberti, L., Margot, F., and Wächter, A. (2009). Branching and bounds tightening techniques for non-convex MINLP. Optimization Methods and Software, 24(4- 5):597–634. Bengio, Y., Lodi, A., and Prouvost, A. (2021). Machine learning for combinatorial optimization: a methodological tour d’horizon. European Journal of Operational Research, 290(2):405–421. Bienstock, D. and Muñoz, G. (2018). LP formulations for polynomial optimization problems. SIAM Journal on Optimization, 28(2):1121–1150. 25