Advancing AND/OR Search for Optimization Using Diverse Principles

Similar documents
Best-First AND/OR Search for Most Probable Explanations

Best-First AND/OR Search for Graphical Models

AND/OR Cutset Conditioning

AND/OR Graph Search for Genetic Linkage Analysis

Towards Parallel Search for Optimization in Graphical Models

Evaluating the Impact of AND/OR Search on 0-1 Integer Linear Programming

The Relationship Between AND/OR Search and Variable Elimination

Pushing Forward Marginal MAP with Best-First Search

Evaluating the impact of AND/OR search on 0-1 integer linear programming

Compiling Constraint Networks into AND/OR Multi-Valued Decision Diagrams (AOMDDs)

Efficient AND/OR Search Algorithms for Exact MAP Inference Task over Graphical Models

Semi-Independent Partitioning: A Method for Bounding the Solution to COP s

A General Scheme for Automatic Generation of Search Heuristics from Specification Dependencies. Kalev Kask and Rina Dechter

Search Algorithms for Solving Queries on Graphical Models & the Importance of Pseudo-trees in their Complexity.

Mini-Buckets: A General Scheme for Generating Approximations in Automated Reasoning

On the Space-Time Trade-off in Solving Constraint Satisfaction Problems*

AND/OR Multi-Valued Decision Diagrams (AOMDDs) for Graphical Models

Constraint Satisfaction Problems

AND/OR Search Spaces for Graphical Models

Anytime AND/OR Depth-first Search for Combinatorial Optimization

AND/OR Multi-Valued Decision Diagrams for Constraint Networks

Constraint Satisfaction Problems

From Exact to Anytime Solutions for Marginal MAP

Constraint Satisfaction Problems

Integrating Probabilistic Reasoning with Constraint Satisfaction

From Exact to Anytime Solutions for Marginal MAP

A CSP Search Algorithm with Reduced Branching Factor

Stochastic Anytime Search for Bounding Marginal MAP

On the Practical Significance of Hypertree vs Tree Width

On the Space-Time Trade-off in Solving Constraint Satisfaction Problems*

Constraint Satisfaction Problems

Example: Map coloring

Module 4. Constraint satisfaction problems. Version 2 CSE IIT, Kharagpur

Modern Exact and Approximate Combinatorial Optimization Algorithms: Max Product and Max Sum product

3 No-Wait Job Shops with Variable Processing Times

Applying Search Based Probabilistic Inference Algorithms to Probabilistic Conformant Planning: Preliminary Results

Set 5: Constraint Satisfaction Problems Chapter 6 R&N

Kalev Kask. Abstract. This paper evaluates the power of a new scheme that generates

Foundations of Artificial Intelligence

Search Algorithms for Discrete Optimization Problems

Unrestricted Nogood Recording in CSP search

A Structure-Based Variable Ordering Heuristic for SAT. By Jinbo Huang and Adnan Darwiche Presented by Jack Pinette

Boolean Representations and Combinatorial Equivalence

Kalev Kask and Rina Dechter

Processing Probabilistic and Deterministic Graphical Models. Rina Dechter DRAFT

Look-ahead with Mini-Bucket Heuristics for MPE

CS 771 Artificial Intelligence. Constraint Satisfaction Problem

Anytime Anyspace AND/OR Best-first Search for Bounding Marginal MAP

Weighted heuristic anytime search: new schemes for optimization over graphical models

Mathematical Programming Formulations, Constraint Programming

Conflict based Backjumping for Constraints Optimization Problems

Advances in Parallel Branch and Bound

Constraint Optimization Techniques for MultiObjective Branch and Bound Search

Treewidth and graph minors

Lars Schmidt-Thieme, Information Systems and Machine Learning Lab (ISMLL), University of Hildesheim, Germany, Course on Artificial Intelligence,

Constraint Optimisation Problems. Constraint Optimisation. Cost Networks. Branch and Bound. Dynamic Programming

Constraint Satisfaction Problems. slides from: Padhraic Smyth, Bryan Low, S. Russell and P. Norvig, Jean-Claude Latombe

Example: Bioinformatics. Soft Constraint Processing. From Optimal CSP to Soft CSP. Overview. From Optimal CSP to Soft CSP.

Constraint Satisfaction Problems

CS 188: Artificial Intelligence Spring Today

Modeling and Reasoning with Bayesian Networks. Adnan Darwiche University of California Los Angeles, CA

Set 5: Constraint Satisfaction Problems

Anytime Best+Depth-First Search for Bounding Marginal MAP

GSAT and Local Consistency

Constraint Satisfaction Problems. Chapter 6

3 SOLVING PROBLEMS BY SEARCHING

UNIVERSITY OF CALIFORNIA, IRVINE. Advancing Heuristics for Search over Graphical Models DISSERTATION

Some Applications of Graph Bandwidth to Constraint Satisfaction Problems

Evaluating Weighted DFS Branch and Bound over Graphical Models

Outline. Best-first search

Lecture 6: Constraint Satisfaction Problems (CSPs)

Topological parameters for time-space tradeoff

Today. CS 188: Artificial Intelligence Fall Example: Boolean Satisfiability. Reminder: CSPs. Example: 3-SAT. CSPs: Queries.

Artificial Intelligence

Nogood-FC for Solving Partitionable Constraint Satisfaction Problems

6.034 Notes: Section 3.1

Mixed deterministic and probabilistic networks

Kalev Kask and Rina Dechter. Department of Information and Computer Science. University of California, Irvine, CA

New Advances in Inference by Recursive Conditioning

What is Search For? CSE 473: Artificial Intelligence. Example: N-Queens. Example: N-Queens. Example: Map-Coloring 4/7/17

CSE 473: Artificial Intelligence

Conflict Graphs for Combinatorial Optimization Problems

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 23 January, 2018

Space of Search Strategies. CSE 573: Artificial Intelligence. Constraint Satisfaction. Recap: Search Problem. Example: Map-Coloring 11/30/2012

Constraint Satisfaction

A Re-examination of Limited Discrepancy Search

DJAO: A Communication-Constrained DCOP algorithm that combines features of ADOPT and Action-GDL

Lecture 5: Exact inference. Queries. Complexity of inference. Queries (continued) Bayesian networks can answer questions about the underlying

Today s s lecture. Lecture 3: Search - 2. Problem Solving by Search. Agent vs. Conventional AI View. Victor R. Lesser. CMPSCI 683 Fall 2004

Set 5: Constraint Satisfaction Problems

Abstraction Sampling in Graphical Models

Class2: Constraint Networks Rina Dechter

V,T C3: S,L,B T C4: A,L,T A,L C5: A,L,B A,B C6: C2: X,A A

BAYESIAN NETWORKS STRUCTURE LEARNING

Constraint Satisfaction Problems

Artificial Intelligence

Artificial Intelligence

Unifying and extending hybrid tractable classes of CSPs

CS 188: Artificial Intelligence Fall 2011

Constraint Satisfaction Problems

Transcription:

Advancing AN/OR Search for Optimization Using iverse Principles Radu Marinescu and Rina echter School of Information and omputer Science University of alifornia, Irvine, A 9697-45 {radum,dechter}@ics.uci.edu Abstract. In recent years, several ranch-and-ound and best-first search algorithms were developed to explore the AN/OR search graph for solving general constraint optimization problems. Previous work showed the tremendous gain obtained by exploiting problem s decomposition (using AN nodes), equivalence (by caching) and irrelevance (via the power of lower bound heuristics). In this paper, we show the additional improvements that can be gained by bringing together all the above, as well as diverse refinements and optimizing principles such as exploiting determinism via constraint propagation, using good initial upper bounds generated via stochastic local search and improving the quality of the guiding pseudo tree. We illustrate our results using a number of benchmark networks, including the very challenging ones that arise in genetic linkage analysis. Introduction onstraint satisfaction problems (SPs) provide a formalism for formulating many interesting real world problems as an assignment of values to variables, subject to a set of constraints. A constraint optimization problem (OP) is defined as a regular SP augmented with a set of cost functions (called soft constraints) indicating preferences. The aim of constraint optimization is to find a solution to the problem whose cost, expressed as the sum of the cost functions, is minimized or maximized. The classical approach to solving OPs is the ranch-and-ound method which maintains the best solution found so far and discards any partial solution which cannot improve on the best. The AN/OR ranch-and-ound search (AO) introduced in [] is a ranchand-ound algorithm that explores an AN/OR search tree for graphical models [], in a depth-first manner. The AN/OR ranch-and-ound search with caching (AO-) [] allows saving previously computed results and retrieving them when the same subproblem is encountered again. The algorithm explores the context minimal AN/OR graph. A best-first AN/OR search algorithm (AOF-) that traverses the AN/OR graph was also explored [4]. arlier empirical evaluations demonstrated () the impact of AN decomposition, () the impact of caching, () the impact of some dynamic variable ordering heuristics, (4) the impact of the lower bound strength, as well as (5) the impact of best-first versus depth-first search regimes [,, 4]. In this paper, we want to take these classes of algorithms as much further as we can by including additional known principles of problem solving and examine their interactive impact on performance. We investigate three key factors that impact the

performance of any search algorithm: () the availability of hard constraints (i.e., determinism) in the problem () the availability of a good initial upper bound provided to the algorithm, and () the availability of good quality guiding pseudo trees. We therefore extend AO- (and whenever relevant, AOF-) to exploit explicitly the computational power of hard constraints by incorporating standard constraint propagation techniques such as unit resolution. We provide AO- with a non-trivial initial uppers bound computed by local search. Finally, we investigate randomized orderings generated via two heuristics for constructing small induced width/depth pseudo trees. We evaluate the impact and interaction of these extensions on the optimization problem of finding the most probable explanation in belief networks using a variety of random and real-world benchmarks. We show that exploiting the determinism as well as good quality initial upper bounds and pseudo trees improves the performance dramatically in many cases. ackground. onstraint Optimization Problems A finite onstraint Optimization Problem (OP) is a triple P = X,,F, where X = {X,...,X n } is a set of variables, = {,..., n } is a set of finite domains and F = {f,...,f r } is a set of cost functions. ost functions can be either soft or hard (constraints). Without loss of generality we assume that hard constraints are represented as (bi-valued) cost functions. Allowed and forbidden tuples have cost and, respectively. The scope of function f i, denoted scope(f i ) X, is the set of arguments of f i. The goal is to find a complete value assignment to the variables that minimizes the global cost function f(x) = r i= f r i, namely to find x = arg min X i= f i. Given a OP instance, its primal graph G associates each variable with a node and connects any two nodes whose variables appear in the scope of the same function. The induced graph of G relative to an ordering d of its variables, denoted G (d), is obtained by processing the nodes in reverse order of d. For each node all its earlier neighbors are connected, including neighbors connected by previously added edges. Given a graph and an ordering of its nodes, the width of a node is the number of edges connecting it to nodes lower in the ordering. The induced width (also equal to the treewidth) of a graph along d, denoted w (d), is the maximum width of nodes in the induced graph. elief networks [5] provide a formalism for reasoning under conditions of uncertainty. A belief network represents a joint probability distribution over the variables of interest. A function of the model encodes the conditional probability distribution of a variable given its parents in the graph (also viewed as a cost function were each tuple has associated a real cost between and ). The most common constraint optimization task over belief networks if finding the Most Probable xplanation (MP), namely finding a complete assignment with maximum probability that is consistent with the evidence in the network. It appears in applications such as speech recognition or medical diagnosis. The task can also be formulated using the semi-ring framework introduced in [6].

f (A) A 5 6 5 6 f (A) A 4 4 f () (a) Functions A f (A) f (A) f () (b) Primal graph A [ ] [A] [A] [] [A] (c) Pseudo tree A 4 6 5 4 6 5 4 (d) AN/OR search tree A 6 5 4 6 5 4 (e) AN/OR search graph Fig.. AN/OR search spaces for constraint optimization.. AN/OR Search Spaces for onstraint Optimization The AN/OR search space [] is a unifying framework for advanced algorithmic schemes for graphical models, including belief networks, constraint networks and cost networks. Its main virtue consists in exploiting conditional independencies between variables during search, which can provide exponential speedups over traditional structure-blind search methods. The search space is defined using a backbone pseudo tree [7]. efinition (pseudo tree). Given an undirected graph G = (X, ), a directed rooted tree T = (X, ) defined on all its nodes is called pseudo-tree if any edge of G that is not included in is a back-arc in T, namely it connects a node to an ancestor in T. AN/OR Search Trees. Given a OP instance P = X,,F its primal graph G and a pseudo tree T of G, the associated AN/OR search tree, S T, has alternating levels of OR and AN nodes. The OR nodes are labeled X i and correspond to the variables. The AN nodes are labeled X i,x i (or just x i ) and correspond to value assignments of the variables. The structure of the AN/OR search tree is based on the underlying pseudo tree T. The root of the AN/OR search tree is an OR node labeled with the root of T. The children of an OR node X i are AN nodes labeled with assignments

X i,x i that are consistent with the assignments along the path from the root. The children of an AN node X i,x i are OR nodes labeled with the children of variable X i in T. The AN/OR search tree can be traversed by a depth first search (FS) algorithm, thus using linear space to compute the value of the root node. It was shown in that [7, ] that given a OP instance P and a pseudo tree T of depth m, the size of the AN/OR search tree based on T is O(n k m ), where k bounds the domains of variables. AN/OR Search Graphs. The AN/OR search tree may contain nodes that root identical conditioned subproblems. Such nodes can be merged yielding an AN/OR graph. Its size becomes smaller at the expense of using additional memory by the search algorithm. Some mergeable nodes can be identified based on their contexts. Given a pseudo tree T of an AN/OR search space, the context of an OR node X, denoted by context(x) = [X...X p ], is the set of ancestors of X in T ordered descendingly, that are connected in the primal graph to X or to descendants of X. The context of X separates the subproblem below X from the rest of the network. The context minimal AN/OR graph [] is obtained from the AN/OR search tree by merging all the context mergeable nodes. It can be shown [] that given a OP P, its primal graph G and a pseudo tree T, the size of the context minimal AN/OR search graph is O(n k w T (G) ), where wt (G) is the induced width of G over the FS traversal of T, and k bounds the domain size. Weighted AN/OR Search Graphs. The OR-to-AN arcs from nodes X i to x i in an AN/OR search tree or graph are annotated by weights derived from the cost functions in F. The weight w(x i,x i ) of the arc from the OR node X i to the AN node x i is the sum of all the cost functions whose scope includes X i and is fully assigned along the path from the root to x i, evaluated at the values along the path. Given a weighted AN/OR search graph, each of its nodes can be associated with a value. The value v(n) of a node n is the minimal cost solution to the subproblem rooted at n, subject to the current variable instantiation along the path from the root to n. It can be computed recursively using the values of n s successors (see also [] for details). xample. Figure shows an example of AN/OR search spaces for a OP with binary variables. The cost functions are given in Figure (a). The value indicates a hard constraint. The primal graph is given in Figure (b), and the pseudo tree in Figure (c). The square brackets indicate the context of the variables. The AN/OR search tree is given in Figure (d). The numbers on the OR-to-AN arcs are the weights corresponding to the function values. Note that the tree is pruned whenever a weight shows inconsistency (e.g., for A =, =, = there is no need to visit variable, due to the value f (,,) = ). The context minimal AN/OR graph is given in Figure (e). Note that only the cache table of will get cache hits during the depth first search traversal ( is the only level of OR nodes that has more than one incoming arc). It can be determined from the pseudo tree inspection that all variables except for generate dead-caches [] and their cache tables need not be stored. AN/OR Search Algorithms for onstraint Optimization In recent years several depth-first ranch-and-ound and best-first search algorithms were developed to search the context minimal AN/OR graph for solving OPs [, 4].

We next briefly overview these two classes of algorithms. AN/OR ranch-and-ound (AO-) traverses the context minimal AN/OR graph in a depth-first manner via full caching. It interleaves forward expansion of the current partial solution tree with a backward cost revision step that updates node values, until search terminates. The efficiency of the algorithm also depends on the strength of its heuristic evaluation function (i.e., lower bound). Specifically, each node n in the search graph has an associated heuristic function h(n) underestimating v(n) that can be computed efficiently when the node n is first expanded. The algorithm then computes the heuristic evaluation function f(t ) of the current partial solution T and uses it to prune irrelevant portions of the search space, as part of a ranch-and-ound scheme. In the forward step the algorithm expands alternating levels of OR and AN nodes. efore expanding an OR node, its cache table is checked. If the same context was encountered before, it is retrieved from the cache, and its successors set is set to empty which will trigger the cost revision step. If an OR node is not found in the cache, it is expanded in the usual way. efore expanding an AN node n, the algorithm computes the heuristic evaluation function f(t m) for every partial solution subtree T m rooted at each OR ancestor m of n along the search path. The search is terminated below n, if, for some m, f(t m) is greater or equal to the best cost solution found at m. The backward cost revision step is triggered when a closed node has an empty set of successors. This means that all its children have been evaluated, and its final value can now be computed. If the current node is the root, then the search terminates with its value. OR nodes update their values by minimization, while AN nodes combine their children values by summation. est-first AN/OR Search (AOF-) explores the context minimal AN/OR graph and interleaves forward expansion of the best partial solution tree with a cost revision step that updates the node values. First, a top-down, graph growing operation finds the best partial solution tree by tracing down through the marked arcs of the explicit AN/OR search graph T. These previously computed marks indicate the current best partial solution tree from each node in T. One of the nonterminal leaf nodes n of this best partial solution tree is then expanded and a heuristic estimate h(n i ), underestimating v(n i ), is assigned to its successors. The second operation in AOF- is a bottom-up, cost revision, arc marking, SOLVlabeling procedure. Starting with the node just expanded n, the procedure revises its value v(n) (using the newly computed values of its successors) and marks the outgoing arcs on the estimated best path to terminal nodes. OR nodes revise their values by minimization, while AN node by summation. This revised value is then propagated upwards in the graph. The revised cost v(n) is an updated lower bound on the cost of an optimal solution to the subproblem rooted at n. uring the bottom-up step, AOF- labels an AN node as SOLV if all of its OR child nodes are solved, and labels an OR node as SOLV if its marked AN child is also solved. The optimal cost solution to the initial problem is obtained when the root node is labeled SOLV. Mini-ucket Heuristics. The effectiveness of both depth-first and best-first AN/OR search algorithms greatly depends on the quality of the lower bound heuristic evaluation functions. The primary heuristic that we used in our experiments is the Mini-ucket

heuristic, which was presented in [, 4]. It was shown that the intermediate functions generated by the Mini-ucket algorithm M(i) [] can be used to compute a heuristic function that underestimates the minimal cost solution to the current subproblem in the AN/OR graph. 4 Improving AN/OR ranch-and-ound Search In this section we overview several principled improvements to the AN/OR ranchand-ound algorithm that we will incorporate. 4. xploiting eterminism When the functions of the OP instance express both hard constraints and general cost functions, it may be beneficial to exploit the computational power of the constraints explicitly via constraint propagation [9, ]. In belief networks, for example, the hard constraints are represented by the zero probability tuples of the PTs. We note that the use of constraint propagation via directional resolution [] or generalized arc consistency has been explored in [], in the context of variable elimination algorithms. The approach we take for handling the determinism in OP is based on the known technique of unit resolution for oolean Satisfiability (SAT) over a logical knowledge base (K) in the form of propositional clauses (NF) representing the hard constraints. One common way of encoding hard constraints as a NF formula is the direct encoding []. Given a OP instance, we associate a propositional variable x ij with each value j that can be assigned to the OP variable X i. We then have clauses that ensures each OP variable is given a value: for each i, x i... x im. We optionally have clauses that ensure each variable takes no more than one values: for each i, j, k with j k, x ij x ik. Finally, we have clauses that rule out any no-goods. For example, if X = and X = is not allowed then we have the clause x x. The changes needed in the AN/OR ranch-and-ound procedure are then as follows. Upon expanding an AN node X i,x j the corresponding SAT instantiation is asserted in K, namely x ij is set to true. If the unit resolution leads to a contradiction, then the current AN node is marked as dead-end and the search continues by expanding the next node on the search stack. Whenever the algorithm backtracks to the previous level, it also retracts any SAT instantiations recorded by unit resolution. Notice that the algorithm is capable of pruning the domains of future variables in the current subproblem due to conflicts detected during unit propagation. 4. xploiting Good Initial Upper ounds via Local Search The AN/OR ranch-and-ound algorithm assumed a trivial initial upper bound (i.e., ), which effectively guarantees that the optimal solution will be computed, however it provides limited pruning in the initial phase. We therefore can incorporate a more informed upper bound, obtained by solving the problem via a local search scheme. This approach is often used by state-of-the-art constraint optimization solvers.

One of the most popular local search algorithms for OP is the Guided Local Search (GLS) method [4]. GLS is a penalty-based meta-heuristic, which works by augmenting the objective function of a local search algorithm (e.g. hill climbing) with penalties, to help guide them out of local minima. GLS has been shown to be successful in solving a number of practical real life problems, such as the traveling salesman problem, radio link frequency assignment problem and vehicle routing. It was also applied to solving the MP in belief networks [5] as well as weighted MAX-SAT problems [6]. 4. xploiting the Pseudo Tree Quality The performance of the AN/OR search algorithms can be heavily influenced by the quality of the guiding pseudo tree. Finding the minimal depth or induced width pseudo tree is a hard problem [7, 7]. We describe next two heuristics for generating pseudo trees which we used in our experiments. Min-Fill Heuristic. The Min-Fill ordering [] is generated by placing the variable with the smallest fill set (i.e., number of induced edges that need be added to fully connect the neighbors of a node) at the end of the ordering, connecting all of its neighbors and then removing the variable from the graph. The process continues until all variables have been eliminated. Once an elimination order is given, the pseudo tree can be extracted as a depth-first traversal of the min-fill induced graph, starting with the variable that initiated the ordering, always preferring as successor of a node the earliest adjacent node in the induced graph. An ordering uniquely determines a pseudo tree. This approach was first used by [7]. Hypergraph ecomposition Heuristic. An alternative heuristic for generating a low height balanced pseudo tree is based on the recursive decomposition of the dual hypergraph associated with the OP instance. The dual hypergraph of a OP X,,F is a pair (V,) where each function in F is a vertex v i V and each variable in X is a hyperedge e j connecting all the functions (vertices) in which it appears. Generating heuristically good hypergraph separators can be done using a package called hmetis (available at: http://www-users.cs.umn.edu/karypis/metis/hmetis), which we used following [9]. The vertices of the hypergraph are partitioned into two balanced (roughly equal-sized) parts, denoted by H left and H right respectively, while minimizing the number of hyperedges across. A small number of crossing edges translates into a small number of variables shared between the two sets of functions. H left and H right are then each recursively partitioned in the same fashion, until they contain a single vertex. The result of this process is a tree of hypergraph separators which can be shown to also be a pseudo tree of the original model where each separator corresponds to a subset of variables chained together. Randomization. oth the min-fill and hypergraph partitioning heuristics can randomize their tie breaking rules, yielding varying qualities of the generated pseudo tree. 5 xperiments In order to empirically evaluate the performance of the proposed improvements to AO- algorithms, we have conducted a number of experiments on the optimization

problem of finding the most probable explanation in belief networks. We implemented our algorithms in ++ and ran all experiments on a.4ghz Pentium 4 with G of RAM running Windows XP. 5. Overview and Methodology Algorithms. We evaluated the following AN/OR ranch-and-ound hybrid algorithms with full caching and static mini-bucket heuristics: AO-+SAT+SM(i), which exploits the determinism in the network by applying unit resolution over the NF encoding of the zero probability tuples of the probability tables. We used a unit resolution scheme based on the one available in the zhaff SAT solver []. AO-+GLS+SM(i), which exploits a good initial upper bound obtained by a guided local search algorithm. We used the GLS implementation for belief networks available from [5]. AO-+SAT+GLS+SM(i), which combines the previous two approaches. We compare these algorithms against the baseline AN/OR ranch-and-ound with full caching and mini-bucket heuristics, AO-+SM(i). We also ran the bestfirst search version of the algorithm, denoted by AOF-+SM(i), but the algorithm did not exploit any of the above principles. The guiding pseudo trees were constructed using both the min-fill and the hypergraph partitioning heuristics, described earlier. We also compared with the SamIam version.. software package (available at http://reasoning.cs.ucla.edu). SamIam is a public implementation of Recursive onditioning [9] which can also be viewed as an AN/OR search algorithm, namely it explores a context minimal AN/OR graph []. Since any MP problem instance can be converted into an equivalent - Integer Linear Program [], we also ran the ILOG PLX. solver, with default settings (i.e., best-bound control strategy, strong branching based variable ordering heuristic, and the cutting planes engine turned on). enchmarks. We tested the performance of the AN/OR search algorithms on random grid networks, belief networks derived from the ISAS 9 digital circuits, genetic linkage analysis networks, and relational belief networks that model the popular game of Mastermind. All of these networks contain a significant amount of determinism. Measures of performance. We report PU time in seconds and the number of nodes visited. We also specify the the number of variables (n), number of evidence variables (e), maximum domain size (k), the depth of the pseudo tree (h) and the induced width of the graph (w ) for each problem instance. When evidence is asserted in the network, the w and h are computed after the evidence variables are removed from the graph. We also report the time required by GLS to compute the initial upper bound. Note that in each domain we ran GLS for a fixed number of flips. Moreover, AO- +GLS+SM(i) and AO-+SAT+GLS+SM(i) do not include the GLS running time, because GLS can be tuned independently for each problem class to minimize its running time. The best performance points are highlighted. In each table, - denotes that the respective algorithm exceeded the time limit. Similarly, out stands for exceeding the G memory limit. A * by the GLS running time indicates that it found the optimal solution to the respective problem instance.

minfill pseudo tree without randomization AO-+SM(i) AO-+SM(i) AO-+SM(i) AO-+SM(i) AO-+SM(i) SamIam AO-+SAT+SM(i) AO-+SAT+SM(i) AO-+SAT+SM(i) AO-+SAT+SM(i) AO-+SAT+SM(i) grid PLX AO-+GLS+SM(i) AO-+GLS+SM(i) AO-+GLS+SM(i) AO-+GLS+SM(i) AO-+GLS+SM(i) (w*, h) GLS AO-+SAT+GLS+SM(i) AO-+SAT+GLS+SM(i) AO-+SAT+GLS+SM(i) AO-+SAT+GLS+SM(i) AO-+SAT+GLS+SM(i) (n, e) AOF-+SM(i) AOF-+SM(i) AOF-+SM(i) AOF-+SM(i) AOF-+SM(i) i= i=4 i=6 i= i= time nodes time nodes time nodes time nodes time nodes - - 7.9 9,47,5 596.7 4,9,76 7.4 47,675 74.99 4,9 9-4- out 67.96 4,,44.5,564, 7.,7, 55.5 4,94 69.5 6,75 (, ).4 - - 66. 45,55.6 9,9.7 7,5.6 7,6 (576, ).5 47.64,,5 9.9,546.4 49,54 5.45 6,9.7 9,75 out.94 75,67.59,77 6.6 5,44. 7,9 46.97 7,74 5. 96,44 4.6 5,6.9 46,49.,4 9-6- out.67, 5. 6,6.5,6.95 4,75.,5 (6, ) 7.7 6.94 5, 7. 559,5 4.7 4,5 7.6 6,.,94 (676, 4).56 5.9 4,775.5 9,7.5,9.6, 4.4,65 9.6 65,7 4.9 79,69 4.7 7,9.5,777.44,45 65.5,, 65.74,7, 55. 956,7 4.4,96 59. 74,75 9-- out 7.5 77, 66.66 45,95 5.94 4,67.69 6,9 4.6,4 (4, 5) 6. 6.,49,756 74.95 446,49 6.6 76,96. 95,6 5.9 4,54 (9, 6).7 9.94 56,97.9 47,7.67 76, 5.5 5,6 4.5 7,5 5.97 54,5 46.7 57,7 47.7 54,496.6 45, 57.97, - - - - - - - - 69.6,64 9-4- out - - - - - - - -.4 7,69 (45, 5) 7. - - - - 96.4 5,569,76 77.5 5,56, 94. 6,46 (54, ). - - - - 55.55,944,55 65.4,64,7 4.6, out out 4.6 596,97 7. 667, 7.9 67,6 969.,6,97 75.,794,5.67 64,6 65.45 4,7.6 4,99 9-- out 4.9 577,76 4.69 59,9 6.6 9,5.,47 5.74 4,59 (47, 6).4 54.6,49,7.7,79,6.6 647,9 64.4 44,5 9.77,74 (444, )..44 57,9 4.6 597,75 96.7 9,79 9.,7 5.5 4,5.69 74,76. 46,7 54. 95,5 5.44 7,4 7. 59,56 Table. PU time and nodes visited for solving deterministic grid networks. Time limit hour. Number of flips for GLS is 5,. Pseudo tree generated by a single run of the min-fill heuristic, without randomization. SamIam ran out of memory on all test instances. 5. mpirical Results eterministic Grid Networks. In grid networks, the nodes are arranged in an N N square and each PT is generated uniformly randomly. We experimented with problem instances initially developed by [] for the task of weighted model counting. For these problems, N ranged between 4 and, and, for each instance, 9% of the probability tables were deterministic, namely they contained only and probability entries. Table shows the results for experiments with 5 deterministic grid networks. The columns are indexed by the mini-bucket i-bound which we varied between and. We generated a single MP query with e variables picked randomly and instantiated as evidence. When comparing the AN/OR ranch-and-ound algorithms, we observe that AO-+SAT+SM(i) improves considerably over AO-+SM(i), especially for relatively small i-bounds (e.g., i {, 4}) which correspond to relatively weak heuristic estimates. For example, on the 9-- grid instance, AO- +SAT+SM(4) is about 9 times faster than AO-+SM(4) and explores 6 times fewer nodes. Similarly, AO-+GLS+SM(i) which exploits a non-trivial initial upper bound is better than AO-+SM(i) for relatively small i-bounds. Overall, AO- +SAT+GLS+SM(i), which exploits both the determinism and informed initial upper bounds, is the best performing among the ranch-and-ound algorithms and in some cases it is able to outperform AOF-+SM(i), across all reported i-bounds (e.g., 9- -). As the i-bound increases and the heuristics become strong enough to cut the search space significantly, the difference between AO-+SM(i) and its competitors decreases. The mini-bucket heuristic already does a level of constraint propagation. Notice that PLX achieves the best performance on test instances.

Fig.. etailed execution of AO-+SM(6), AO-+SAT+SM(6) and AO- +SAT+GLS+SM(6) on the 9-4- grid network over runs using randomized min-fill and hypergraph based pseudo trees. Pseudo tree depth is plotted on a different scale to the right. Figure shows the execution of AO-+SM(6), AO-+SAT+SM(6) and AO-+SAT+GLS+SM(6) on the 9-4- network with randomized min-fill and hypergraph pseudo trees, over independent runs. For each run we also report the induced width and depth of the corresponding pseudo trees. We see that the best performance in this case is obtained for min-fill trees. This is probably because the minibucket heuristics were more accurate when computed along the min-fill ordering which has smaller induced width than the hypergraph partitioning based ordering. ISAS 9 ircuits (available at http://www.fm.vslib.cz/kes/asic/iscas) are a common benchmark used in formal verification and diagnosis. For our purpose, we converted each of these circuits into a belief network by removing flip-flops and buffers in a standard way, creating a deterministic conditional probability table for each gate and putting uniform distributions on the input signals. Table displays the results obtained on 5 ISAS 9 circuits. We see that constraint propagation via unit resolution plays a dramatic role on this domain rendering the search space almost backtrack-free, across all reported i-bounds. For instance, on the s95 circuit, AO-+SAT+SM(6) is orders of magnitude faster than AO- +SM(6) and orders of magnitude faster than PLX, respectively, while AOF- +SM(6) exceeded the memory limit. When looking at the AN/OR ranch-and- ound algorithms that exploit a local search based initial upper bound, namely AO- +GLS+SM(i) and AO-+SAT+GLS+SM(i), we see that they did not expand

minfill pseudo tree without randomization AO-+SM(i) AO-+SM(i) AO-+SM(i) AO-+SM(i) AO-+SM(i) SamIam AO-+SAT+SM(i) AO-+SAT+SM(i) AO-+SAT+SM(i) AO-+SAT+SM(i) AO-+SAT+SM(i) iscas9 PLX AO-+GLS+SM(i) AO-+GLS+SM(i) AO-+GLS+SM(i) AO-+GLS+SM(i) AO-+GLS+SM(i) GLS AO-+SAT+GLS+SM(i) AO-+SAT+GLS+SM(i) AO-+SAT+GLS+SM(i) AO-+SAT+GLS+SM(i) AO-+SAT+GLS+SM(i) (w*, h) AOF-+SM(i) AOF-+SM(i) AOF-+SM(i) AOF-+SM(i) AOF-+SM(i) (n, d) i=6 i= i= i= i=4 time nodes time nodes time nodes time nodes time nodes - - - -.5,6,4.6 4.4 4 c4 out 74.9 4,6,4 9.,4,475. 9,5.6 4.5 4 (7, 45).54.5.6.9..9 (4, ).*.6..9.. out out 6.7 4,46. 4. 4 99.6 7,75, 7.99 55,65 4. 47,94 7.,9.9,9 s95 out.9 9.6 667. 65. 6.74 6 (66, ).4...7..69 (44, ).5*...7..7 out 4. 5,59.45 4, 6.5, 4.6,56.5 4,6 4.5 66,69.69 6,47 4. 94,95 9.47 6, s96 out.9 565.9 565. 565. 565.9 565 (54, 97) 9.9.4.6..4.9 (56, ).*..4..4.7 6.6 77,9 5.9 7,9 7.,4 6.97,64 7.64 4,4.,94. 5,9.5 5,6.9 6,4.47,56 s4 out. 7. 667.5 667.44 667.6 667 (47, 67).4.4.6..44.99 (667, ).*..6..47.99.75 74,65.67 5,499 4. 4,445.4 5,7.,4 7. 4,79 9.69,76 4. 7,7 7. 4,977.6,4 s494 out. 665. 665.7 665.45 665. 665 (4, 69) 4..6.7..4.9 (66, ).*.6.7..4. 9.67 4,49 7. 65,59 7.6 9,67.4,79. 6,44 Table. PU time and nodes visited for solving belief networks derived from the ISAS 9 circuits. Time limit minutes. Number of flips for GLS is,. Pseudo tree generated by a single run of the min-fill heuristic, without randomization. SamIam ran out of memory. any nodes. This is because the upper bound obtained by GLS, which was the optimal solution in this case, was equal to the the mini-bucket lower bound computed at the root node. The best performance on this domain were achieved by AO-+SAT+SM(i) and AO-+SAT+GLS+SM(i), respectively, for the smallest reported i-bound (i = 6). Notice the poor performance of SamIam which ran out of memory on all tests. Genetic Linkage Analysis. The maximum likelihood haplotype problem in genetic linkage analysis is the task of finding a joint haplotype configuration for all members of the pedigree which maximizes the probability of data. It is equivalent to finding the most probable explanation of a belief network which represents the pedigree data []. Table displays the results obtained for 6 hard linkage analysis networks (available at http://bioinfo.cs.technion.ac.il/superlink) using randomized min-fill and hypergraph partitioning based pseudo trees. We selected the hypergraph based tree having the smallest depth over independent runs (ties were broken on the smallest induced width). Similarly, the min-fill based tree was the one having the smallest induced width out of tries (ties were broken on the smallest depth). For comparison, we also include results obtained with Superlink version.6 []. Superlink is currently one of the most efficient solvers for genetic linkage analysis, is dedicated to this domain, uses a combination of variable elimination and conditioning, and takes advantage of the determinism present in the network. To the best of our knowledge, these networks were never solved before for the maximum likelihood haplotype task (i.e., the MP task). We see that the AN/OR ranch-and-ound algorithms are the only ones that could solve all the problem instances, especially when guided by hypergraph partitioning based pseudo trees. This can be explained by the much smaller depth of these pseudo trees compared with the min-fill ones, which overcame the relatively poor quality of

hypergraph pseudo tree min-fill pseudo tree M(i) M(i) M(i) M(i) pedigree SamIam (w*, h) AO-+SM(i) AO-+SM(i) (w*, h) AO-+SM(i) AO-+SM(i) (n, d) Superlink AO-+SAT+SM(i) AO-+SAT+SM(i) AO-+SAT+SM(i) AO-+SAT+SM(i) PLX AO-+GLS+SM(i) AO-+GLS+SM(i) AO-+GLS+SM(i) AO-+GLS+SM(i) GLS AOF-+SM(i) AOF-+SM(i) AOF-+SM(i) AOF-+SM(i) i= i= i= i= time nodes time nodes time nodes time nodes out 5.6 64.49 7. out ped7-54.4 5,4,4 5.66 7,76,9 - - (6, 4) out (6, 6) 7.54 5,4,4 6.7 7,76,9 (, ) - -. 49.9 4,65, 955.6 7,7,56 - - out out out out 67.9.6 76. out ped9-9. 7,,6 9. 4,5,7 44.74 5,5,4 (96, 7) out (5, 5) 75.9 7,,6 657.9 4,5,7 (7, ) 55.5 5,5,4.5* 66.4 7,,94 6.6 4,5,66 6.9,444,96 out out out out 59. 5. out out ped9-4575. 466,74,65.4 9,665,7 (69, 5) out (5, 5) 4796.66 466,74,65 774.5 9,665,7 (4, ). 4455.4 459,74,495 7.95 7,6,7 out out out 4. 9.5 out out ped4-67647.4,9,5,9 79.,99,97 (9, 4) out (4, 6) 74.6,9,5,9 47.,99,97 (, 7).99 646.6,,7,576 5.,9,66 out out out 5.4.4 out out ped4-9.6,7,7.,,544 (6, 5) out (6, 6) 455.5,7,7 9.9,,544 (, ).* 69.,79,654 74.95,7, out out out.9 4. 57. 44.6 ped44-597. 6,5,57 4.96,55,595.6,4,64 5. 66,77 (644, 4) out (, 5) 94.9 6,79,547 5.46,55,595 (6, 7) 7.4,4,64 5.47 66,77 9.4 5. 6,9,49 96.57,,5 95.9 75,97 66. 447,54 out out out out Table. PU time and nodes visited for solving genetic linkage analysis networks. Pseudo trees created using randomized min-fill and hypergraph partitioning heuristics. Time limit 4 hours. SamIam, PLX and AOF-+SM(i) ran out of memory, whereas Superlink exceeded the time limit. The maximum number of flips for GLS was set to,,. the mini-bucket heuristics obtained on these highly connected networks. xploiting the GLS initial upper bound improved slightly the performance of AO-+SM(i) (e.g., AO-+GLS+SM() improves over AO-+SM() on ped4 with a margin of 7% only). This was probably because AO-+SM(i) found the optimal or very close to optimal solutions quite early in the search. Similarly, we observe that applying unit resolution was not cost effective in this case, namely AO-+SM(i) and AO-+SAT+SM(i) expanded the same number of nodes. Notice also that Superlink exceeded the 4 hour time limit, whereas SamIam, PLX and AOF-+SM(i) ran out of memory on all test instances. Figure shows the execution of AO-+SM(), AO-+SAT+SM() and AO-+GLS+SM() on the ped44 network with randomized min-fill and hypergraph pseudo trees, over independent runs. For each run we also report the induced width and depth of the corresponding pseudo trees. We see that the hypergraph pseudo trees, which have small depths, offer the best performance in this case. This can be explained by the large induced width (i.e., context) which in this case renders most of the cache entries dead. Therefore, the AN/OR graph explored effectively is very close to a tree and the dominant factor that impacts performance is the depth of the pseudo tree. Mastermind Game Instances. ach of these networks is a ground instance of a relational belief network that models differing sizes of the popular game of Mastermind, and was produced by the PRIMULA System (http://www.cs.auc.dk/jaeger/primula).

Fig.. etailed execution of AO-+SM(), AO-+SAT+SM() and AO- +GLS+SM() on the ped44 linkage network over runs using randomized min-fill and hypergraph based pseudo trees. Pseudo tree depth is plotted on a different scale to the right. Table 4 reports the results obtained on 6 Mastermind networks. We generated a single MP query with e random evidence variables. We see that AO-+SAT+SM(i) is far better than AO-+SM(i), especially for relatively small i-bounds. For example, on the mm---5 network, AO-+SAT+SM(4) is 7 times faster than AO-+SM(4), times faster than AOF-+SM(4), and 5 times faster than PLX, respectively. When looking at the effect of the GLS based upper bound, which was equal to the optimal solution in this case, we see no noticeable difference between AO-+GLS+SM(i) and AO-+SM(i). This is because AO-+SM(i) was able to find close to optimal solutions quite fast. Notice that SamIam exceeded the memory bound on all instances, whereas PLX obtained the best performance on only one instance, namely mm---. Summary of mpirical Results. Summarizing our empirical observations we see that exploiting the hard constraints present in the problem improves in many cases significantly the performance of the AN/OR ranch-and-ound algorithms with minibucket heuristics (e.g., ISAS 9 circuits). The impact of the local search based initial upper bound is more prominent at relatively small i-bounds, when the corresponding heuristics are relatively weak and the algorithm does not find close to optimal solution early enough in the search (e.g., grid networks). The two heuristics for generating pseudo trees do not dominate each other. When the induced width is small enough, which is typically the case for min-fill pseudo trees, the strength of the mini-bucket

minfill pseudo tree without randomization AO-+SM(i) AO-+SM(i) AO-+SM(i) AO-+SM(i) AO-+SM(i) mastermind SamIam AO-+SAT+SM(i) AO-+SAT+SM(i) AO-+SAT+SM(i) AO-+SAT+SM(i) AO-+SAT+SM(i) PLX AO-+GLS+SM(i) AO-+GLS+SM(i) AO-+GLS+SM(i) AO-+GLS+SM(i) AO-+GLS+SM(i) (w*, h) GLS AO-+SAT+GLS+SM(i) AO-+SAT+GLS+SM(i) AO-+SAT+GLS+SM(i) AO-+SAT+GLS+SM(i) AO-+SAT+GLS+SM(i) (n, e) AOF-+SM(i) AOF-+SM(i) AOF-+SM(i) AOF-+SM(i) AOF-+SM(i) i= i=4 i=6 i= i= time nodes time nodes time nodes time nodes time nodes. 9,55.9,47.,4 4.9,47 7.,49 mm--- out.5 9,7.9,464.,4 4.9,46 7.7,49 (, 56).4.94 9,55.,47.9,4 4.4,47 7.75,49 (, ) 4.*.59 9,7.94,464.4,4 4.4,46 7.,49.,.,9.95,94 4.,9 7.,9 74.,,55 6.45 99, 5.9 4,757 44.9 5,97 7.5 46,76 mm---4 out 5.97,79 6.5 44, 6. 4,6 6. 4,467 6.6 5,97 (, 4) 94.4 67.9,,55 55. 6,5 5. 4,69 44.75 5,96 7. 45,67 (, ).95* 5.7,79 4. 4,7 6.64 4,6 6.4 4,467 6. 5,66 5.7 65,59.59,54 6.4,56 7.,44 5.99,5 94.9 97, 9.66 467,949 5. 6,4 9.9 94,795 67.5,67 mm---5 out 74. 4,75 4. 5,94 47.7 99,764 4. 46,596. 9,94 (, ) 47. 94. 97,9.55 455,75 576.4 6,4 9.5 9,9 66.46,654 (69, 6) 44.* 7.6 4,75 4.4,96 5.69 99,764 4.5 44,96.5 9,94. 5,46 5.,64 54.7,67 54.45 6,46 5.5 5,56.44,77.5,. 4,.6,95 9.4,4 mm-4-- out.4,. 7,99.7 4,6.5,97 9.6,6 (, 6) 47.4.45,9.56,. 4,.66,95 9.7,4 (4, ) 4.76*.44,.6 7,99.9 4,6.67,97 9.5,6.5 4,.4,7.5,5.59,4.,4 - - 99.5 7,7, 5.6 996,77 9.5 4,4,644 67.,,66 mm-4--4 out 6.5,75,. 5,7,4 5.4 774,76 5.9,9, 699.65,66,65 (6, 7) 654. - -.4 7,7,4 5. 996,55 49.6 4,4,57 6.,,75 (65, ).4*.77,75, 5.4 5,7,4 7.44 774,76 9.,9, 697.,66,4 65. 5,6 55.5 47,77 76.7 49,7 4.5 64, 4.7 5, 69.,5,46 45.65,74,4 494.44 9,49 44. 446,455 5.9 6,756 mm--- out 46.6 9,9. 95,77 4.9,7 9.94 4,4 97.9,644 (4, 99).9 77.96,5,46 467.79,74,4 5. 9,49 45. 446,455 55.5 6,7 (64, 6) 9.* 4.4 9,9.9 95,77 47.6,7 4. 4,4 99.5,644 464.4 444,7 69. 9,76 5., 5.76 9,5 9.97 95,4 Table 4. PU time and nodes visited for solving Mastermind game instances. Time limit hour. Number of flips for GLS is,. Pseudo tree generated by a single run of the min-fill heuristic, without randomization. SamIam ran out of memory on all test instances. heuristics compiled along these orderings usually determines the performance (e.g., grid networks). However, when the graph is highly connected, the relatively large induced width causes the AN/OR algorithms to traverse a search space that is very close to a tree (due to dead caches) and therefore the hypergraph based pseudo trees which have far smaller depths improve performance substantially (e.g., genetic linkage). 6 onclusion The paper rests on three key contributions. First, we propose a principled approach for handling hard constraints in OPs within the AN/OR search framework, which builds upon progress made in the SAT community. Second, we allow for exploiting non-trivial initial upper bounds which are obtained by a local search scheme. Third, we investigate two heuristics for generating good quality pseudo trees: the min-fill heuristic which minimizes the induced width, and the hypergraph partitioning heuristic that minimizes the depth of the pseudo tree. We demonstrated empirically the impact of these factors on hard benchmarks, including some very challenging networks from the field of genetic linkage analysis. References. R. Marinescu and R. echter. And/or branch-and-bound for graphical models. In International Joint onference on Artificial Intelligence (IJAI-5), pages 4 9, 5.

. R. echter and R. Mateescu. AN/OR search spaces for graphical models. Artificial Intelligence, 7(-):7 6, 7.. R. Marinescu and R. echter. Memory intensive branch-and-bound search for graphical models. In National onference on Artificial Intelligence (AAAI), 6. 4. R. Marinescu and R. echter. est-first and/or search for graphical models. In National onference on Artificial Intelligence (AAAI), 7. 5. J. Pearl. Probabilistic Reasoning in Intelligent Systems. Morgan Kaufmann, 9. 6. S. istarelli, U. Montanari, and F. Rossi. Semiring based constraint solving and optimization. Journal of AM, 44():9 5, 997. 7... Freuder and M. J. Quinn. Taking advantage of stable sets of variables in constraint satisfaction problems. In International Joint onference on Artificial Intelligence (IJAI), pages 76 7, 95.. R. echter. Mini-buckets: A general scheme of generating approximations in automated reasoning. In International Joint onference on Artificial Intelligence (IJAI), pages 97, 997. 9.. Larkin and R. echter. ayesian inference in the presence of determinism. In International Workshop on Artificial Intelligence and Statistics (AISTATS),... Allen and A. arwiche. New advances in inference using recursive conditioning. In Uncertainty in Artificial Intelligence (UAI-), pages,.. I. Rish and R. echter. Resolution vs. search: two strategies for sat. Journal of Automated Reasoning, 4(-):5 75,.. R. echter and. Larkin. Hybrid processing of beliefs and constraints. In Uncertainty in Artificial Intelligence (UAI), pages 9,.. T. Walsh. Sat v csp. In Principles and Practice of onstraint Programming (P), pages 44 456,. 4.. Voudouris. Guided local search for combinatorial optimization problems. Technical report, Ph Thesis. University of ssex, 997. 5. F. Hutter, H. Hoos, and T. Stutzle. fficient stochastic local search for mpe solving. In International Joint onference on Artificial Intelligence (IJAI), pages 69 74, 5. 6. P. Mills and. Tsang. Guided local search for solving sat and weighted max-sat problems. Journal of Automated Reasoning (JAR),. 7. R. ayardo and. P. Miranker. On the space-time trade-off in solving constraint satisfaction problems. In International Joint onference on Artificial Intelligence (IJAI), pages 55 56, 995.. U. Kjæaerulff. Triangulation of graph-based algorithms giving small total space. Technical Report, University of Aalborg, enmark, 99. 9. A. arwiche. Recursive conditioning. Artificial Intelligence, 5(-):5 4,.. M. Moskewicz,. Madigan, Y. Zhao, L. Zhang, and S. Malik. haff: ngineering an efficient sat solver. esign and Automation onference,... Santos. On the generation of alternative explanations with implications for belief revision. In Uncertainty in Artificial Intelligence (UAI), pages 9 47, 99.. T. Sang, P. eame, and H. Kautz. Solving ayesian networks by weighted model counting. In National onference of Artificial Intelligence (AAAI), pages 475 4, 5.. M. Fishelson and. Geiger. xact genetic linkage computations for general pedigrees. ioinformatics, ():9 9,.