1 Hybrid of search and inference: time- space tradeoffs chapter 10 ICS-275 Spring 2007.

Slides:



Advertisements
Similar presentations
Verification/constraints workshop, 2006 From AND/OR Search to AND/OR BDDs Rina Dechter Information and Computer Science, UC-Irvine, and Radcliffe Institue.
Advertisements

Tree Clustering for Constraint Networks 1 Chris Reeson Advanced Constraint Processing Fall 2009 By Rina Dechter & Judea Pearl Artificial Intelligence,
Constraint Satisfaction Problems
Variational Methods for Graphical Models Micheal I. Jordan Zoubin Ghahramani Tommi S. Jaakkola Lawrence K. Saul Presented by: Afsaneh Shirazi.
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
Lauritzen-Spiegelhalter Algorithm
Join-graph based cost-shifting Alexander Ihler, Natalia Flerova, Rina Dechter and Lars Otten University of California Irvine Introduction Mini-Bucket Elimination.
Statistical Methods in AI/ML Bucket elimination Vibhav Gogate.
Anagh Lal Tuesday, April 08, Chapter 9 – Tree Decomposition Methods- Part II Anagh Lal CSCE Advanced Constraint Processing.
Constraint Optimization Presentation by Nathan Stender Chapter 13 of Constraint Processing by Rina Dechter 3/25/20131Constraint Optimization.
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
MPE, MAP AND APPROXIMATIONS Lecture 10: Statistical Methods in AI/ML Vibhav Gogate The University of Texas at Dallas Readings: AD Chapter 10.
Recursive Conditioning Adnan Darwiche Computer Science Department UCLA.
Foundations of Constraint Processing, Spring 2008 April 16, 2008 Tree-Structured CSPs1 Foundations of Constraint Processing CSCE421/821, Spring 2008:
Algorithm Strategies Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
1 Directional consistency Chapter 4 ICS-179 Spring 2010 ICS Graphical models.
Anagh Lal Monday, April 14, Chapter 9 – Tree Decomposition Methods Anagh Lal CSCE Advanced Constraint Processing.
Recent Development on Elimination Ordering Group 1.
1 Directional consistency Chapter 4 ICS-275 Spring 2007.
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 1 Ryan Kinworthy CSCE Advanced Constraint Processing.
Resolution versus Search: Two Strategies for SAT Brad Dunbar Shamik Roy Chowdhury.
M. HardojoFriday, February 14, 2003 Directional Consistency Dechter, Chapter 4 1.Section 4.4: Width vs. Local Consistency Width-1 problems: DAC Width-2.
Ch 13 – Backtracking + Branch-and-Bound
General search strategies: Look-ahead Chapter 5 Chapter 5.
1 Hybrid of search and inference: time- space tradeoffs chapter 10 ICS-275A Fall 2003.
Stochastic greedy local search Chapter 7 ICS-275 Spring 2007.
Backtracking.
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 2 Ryan Kinworthy CSCE Advanced Constraint Processing.
Distributed Constraint Optimization * some slides courtesy of P. Modi
1 Book: Constraint Processing Author: Rina Dechter Chapter 10: Hybrids of Search and Inference Time-Space Tradeoffs Zheying Jane Yang Instructor: Dr. Berthe.
Fixed Parameter Complexity Algorithms and Networks.
Because the localized R(*,m)C does not consider combinations of relations across clusters, propagation between clusters is hindered. Synthesizing a global.
Constraint Satisfaction Read Chapter 5. Model Finite set of variables: X1,…Xn Variable Xi has values in domain Di. Constraints C1…Cm. A constraint specifies.
1 Variable Elimination Graphical Models – Carlos Guestrin Carnegie Mellon University October 11 th, 2006 Readings: K&F: 8.1, 8.2, 8.3,
Probabilistic Networks Chapter 14 of Dechter’s CP textbook Speaker: Daniel Geschwender April 1, 2013 April 1&3, 2013DanielG--Probabilistic Networks1.
Two Approximate Algorithms for Belief Updating Mini-Clustering - MC Robert Mateescu, Rina Dechter, Kalev Kask. "Tree Approximation for Belief Updating",
Variable and Value Ordering for MPE Search Sajjad Siddiqi and Jinbo Huang.
1 Directional consistency Chapter 4 ICS-275 Spring 2009 ICS Constraint Networks.
Wednesday, January 29, 2003CSCE Spring 2003 B.Y. Choueiry Directional Consistency Chapter 4.
Stochastic greedy local search Chapter 7 ICS-275 Spring 2009.
State space representations and search strategies - 2 Spring 2007, Juris Vīksna.
Join-graph based cost-shifting Alexander Ihler, Natalia Flerova, Rina Dechter and Lars Otten University of California Irvine Introduction Mini-Bucket Elimination.
Foundations of Constraint Processing, Spring 2009 Structure-Based Methods: An Introduction 1 Foundations of Constraint Processing CSCE421/821, Spring 2009.
1 Variable Elimination Graphical Models – Carlos Guestrin Carnegie Mellon University October 15 th, 2008 Readings: K&F: 8.1, 8.2, 8.3,
Exact Inference 275b.
Inference in Bayesian Networks
Structure-Based Methods Foundations of Constraint Processing
Circuit Lower Bounds A combinatorial approach to P vs NP
Constraint Optimization And counting, and enumeration 275 class
Exact Inference Continued
1.3 Modeling with exponentially many constr.
Structure-Based Methods Foundations of Constraint Processing
From AND/OR Search to AND/OR BDDs
Structure-Based Methods Foundations of Constraint Processing
Boi Faltings and Martin Charles Golumbic
Exact Inference ..
Structure-Based Methods Foundations of Constraint Processing
Backtracking search: look-back
Boi Faltings and Martin Charles Golumbic
1.3 Modeling with exponentially many constr.
Chapter 5: General search strategies: Look-ahead
Advanced consistency methods Chapter 8
Exact Inference Continued
Exploiting Tree-Decomposition in Search: The AND/OR Paradigm
Major Design Strategies
Directional consistency Chapter 4
Structure-Based Methods Foundations of Constraint Processing
An Introduction Structure-Based Methods
Structure-Based Methods Foundations of Constraint Processing
Major Design Strategies
Presentation transcript:

1 Hybrid of search and inference: time- space tradeoffs chapter 10 ICS-275 Spring 2007

ICS Reasoning Methods Our focus - search and elimination Search (“guessing” assignments, reasoning by assumptions) Branch-and-bound (optimization) Backtracking search (CSPs) Cycle-cutset (CSPs, belief nets) Variable elimination (inference, “propagation” of constraints, probabilities, cost functions) Dynamic programming (optimization) Adaptive consistency (CSPs) Joint-tree propagation (CSPs, belief nets)

Spring 2007 ICS Chapter 10: Hybrids of Search and Inference Interleaving conditioning and elimination Cutset decomposition AND/OR cutset decomposition Super-bucket and super-clusters Approximating conditioning in a hybrid

Spring 2007 ICS Satisfiability: Inference vs search Search = O(exp(n)) Search = exp(dfs-height)

Spring 2007 ICS DR versus DPLL: Complementary Properties Uniform random 3-CNFs (large induced width) (k,m)-tree 3-CNFs (bounded induced width )

Spring 2007 ICS Exact CSP techniques: complexity

Spring 2007 ICS Outline; Road Map Methods Tasks

Spring 2007 ICS The effect of Conditioning X1X1 X3X3 X5X5 X4X4 X2X2

Spring 2007 ICS The effect of Conditioning X1X1 X3X3 X5X5 X4X4 X2X2 Select a variable

Spring 2007 ICS The effect of Conditioning X1X1 X3X3 X5X5 X4X4 X2X2 X3X3 X5X5 X4X4 X2X2 X3X3 X5X5 X4X4 X2X2 X3X3 X5X5 X4X4 X2X2 …... X 1  a X 1  b X 1  c

Spring 2007 ICS The effect of Conditioning X1X1 X3X3 X5X5 X4X4 X2X2 X3X3 X5X5 X4X4 X2X2 X3X3 X5X5 X4X4 X2X2 X3X3 X5X5 X4X4 X2X2 …... X 1  a X 1  b X 1  c Condition on X 2, and BE or BE(w=2) now.

Spring 2007 ICS The effect of Conditioning X1X1 X3X3 X5X5 X4X4 X2X2 X3X3 X5X5 X4X4 X2X2 X3X3 X5X5 X4X4 X2X2 X3X3 X5X5 X4X4 X2X2 …... X 1  a X 1  b X 1  c General principle: Condition until tractable

Spring 2007 ICS Interleaving Cond and Elim (VE+C)

Spring 2007 ICS Interleaving Cond and Elim

Spring 2007 ICS Interleaving Cond and Elim

Spring 2007 ICS Interleaving Cond and Elim

Spring 2007 ICS Interleaving Cond and Elim

Spring 2007 ICS Interleaving Cond and Elim

Spring 2007 ICS Interleaving Cond and Elim...

Spring 2007 ICS Interleaving Cond and Elim...

Spring 2007 ICS Interleaving Cond and Elim...

Spring 2007 ICS Interleaving Cond and Elim...

Spring 2007 ICS Interleaving Cond and Elim...

Spring 2007 ICS Interleaving Cond and Elim...

Spring 2007 ICS Interleaving Cond and Elim...

Spring 2007 ICS Interleaving Cond and Elim...

Spring 2007 ICS Interleaving Cond and Elim...

Spring 2007 ICS

Spring 2007 ICS DCDR(b): empirical results

Spring 2007 ICS Road Map Interleaving conditioning and elimination Cutset decomposition W-cutset, cycle-cutset AND/OR w-cutset Super-bucket and super-clusters

Spring 2007 ICS Cycle cutset C P J A L B E D F M O H K G N C P J L B E D F M O H K G N A C P J L E D F M O H K G N B P J L E D F M O H K G N C Cycle cutset = {A,B,C} C P J A L B E D F M O H K G N C P J L B E D F M O H K G N C P J L E D F M O H K G N C P J A L B E D F M O H K G N

Spring 2007 ICS Conditioning and cycle-cutset A=yellow A=green Inference may require too much memory Condition (guessing) on some of the variables C B K G L D F H M J E C B K G L D F H M J E A C B K G L D F H M J E Graph Coloring problem

Spring 2007 ICS Conditioning A=yellow A=green B=redB=blueB=redB=blueB=greenB=yellow C K G L D F H M J E C K G L D F H M J E C K G L D F H M J E C K G L D F H M J E C K G L D F H M J E C K G L D F H M J E Inference may require too much memory Condition on some of the variables A C B K G L D F H M J E Graph Coloring problem

Spring 2007 ICS The cycle-cutset scheme: condition until a tree

Spring 2007 ICS Theorem: The w-cutset scheme yields space complexity exp(w) and time complexity exp(w+c_w), where c_w is the size of the w-cutset. As w decreases, c_w increases. The cycle-cutset decomposition is linear space and Has time complexity of Time-space tradeoff

Spring 2007 ICS Elim-cond(w) or w-cutset scheme Idea: runs backtracking search on the w-cutset variables and bucket-elimination on the remaining variables. Input: A constraint network R = (X,D,C), Y a w-cutset, d an ordering that starts with Y whose adjusted induced-width, along d, is bounded by w, Z = X-Y. Output: A consistent assignment, if there is one. 1. while {y}  next partial solution of Y found by backtracking, do a) z  solution found by adaptive-consistency(R_y). B) if z is not false, return solution (y,z). 2. endwhile. return: the problem has no solutions.

Spring 2007 ICS Finding a w-cutset Verifying a w-cutset can be done in polynomial time A simple greedy: use a good induced-width ordering and starting at the top add to the w- cutset any variable with more than w parents. Alternative: generate a tree-decomposition and select a w-cutset that reduce each cluster below w (Bidyuk and Dechter UAI2005).

Spring 2007 ICS Treewidth equals cycle cutset E K F H C B A L G J D M N K C A L G J D M N treewidth = cycle cutset = 4

Spring 2007 ICS Treewidth smaller than cycle cutset E K F H C B A L G J D F C B G D E treewidth = 2 cycle cutset = 5

Spring 2007 ICS Time-Space complexity of of w-cutset Space: O(exp(w)) W -cutset: a set that when removed the induced- width is w. c(w): size of w-cutset. Time: O(exp(w+c(w))) on OR space

Spring 2007 ICS Time vs space Random Graphs (50 nodes, 200 edges, average degree 8, w*  23) Branch and bound Bucket elimination w W+c(w)

Spring 2007 ICS BDR-DP(i): bounded resolution + backtracking Complete algorithm: run BDR(i) as preprocessing before the Davis-Putnam backtracking algorithm. Empirical results: random vs. structured (low-w*) problems:

Spring 2007 ICS DCDR(b): empirical results (Rish and Dechter 2000)

Spring 2007 ICS Empirical evaluation of w-cutset Cycle-cutset for CSPs (dechter 1990) Alternating w-cutset for cnfs (Rish and Dechter 2000) Alternating w-cutset for Constraint optimization (Larrosa and Dechter, 2002)

Spring 2007 ICS The idea of super-buckets Larger super-buckets (cliques) =>more time but less space Complexity: 1.Time: exponential in clique (super-bucket) size 2.Space: exponential in separator size

Spring 2007 ICS Example

Spring 2007 ICS Super-Bucket Elimination, SBE(k) Eliminate sets of variables such that: individual eliminations are too costly in space (namely, each variable in the set has degree larger than k) the join degree is lower than k

Spring 2007 ICS Sep-based time-space tradeoff Let T be a tree-decomposition of hypergraph H. Let s_0,s_1,...,s_n be the sizes of the separators in T, listed in strictly descending order. With each separator size s_i we associate a secondary tree decomposition T_i, generated by combining adjacent nodes whose separator sizes are strictly greater than s_i. We denote by r_i the largest set of variables in any cluster of T_i. Note that as s_i decreases, r_i increase. Theorem: The complexity of CTE when applied to each T_i is O( n exp(r_i)) time, and O( n exp(s_i)) space.

Spring 2007 ICS Complexity Theorem: If R = (X,D,C) is a constraint network whose constraint graph has non-separable components of at most size r, then the super-bucket elimination algorithm, whose buckets are the non- separable components, is time exponential O(n exp(r)) and is linear in space.

Spring 2007 ICS Hybrids of hybrids hybrid(b_1,b_2): First, a tree-decomposition having separators bounded by b_1 is created, followed by application of the CTE algorithm, but each clique is processed by elim-cond(b_2). If c^*_{b_2} is the size of the maximum b_2-cutset in each clique of the b_1-tree- decomposition, the algorithm is space exponential in b_1 but time exponential in c^*_{b_2}. Special cases: hybrid(b_1,1): Applies cycle-cutset in each clique. b_1 = b_2. For b=1, hybrid(1,1) is the non-separable components utilizing the cycle-cutset in each component. The space complexity of this algorithm is linear but its time complexity can be much better than the cycle-cutsets cheme or the non-separable component approach alone.

Spring 2007 ICS Case study: circuit diagnosis Problem: Given a circuit and its unexpected output, identify faulty components. The problem can be modeled as a constraint optimization problem and solved by bucket elimination.

Spring 2007 ICS Case study: combinatorial circuits: benchmark used for fault diagnosis and testing community Problem: Given a circuit and its unexpected output, identify faulty components. The problem can be modeled as a constraint optimization problem and solved by bucket elimination.

Spring 2007 ICS Case study: C432 A circuit’s primal graph For every gate we connect inputs and outputs Join-tree of c432 Seperator size is 23

Spring 2007 ICS Join-tree of C3540 (1719 vars) max sep size 89

Spring 2007 ICS Secondary trees for C432

Spring 2007 ICS Time-space tradeoffsTime/Space tradeoff Time is measured by the maximum of the separator size and the cutset size and space by the maximum separator size.

Spring 2007 ICS Constraint Optimization: Combinatorial Auction: Bucket-elimination vs Search b1 b2 b3 b4 b5 b6 Bucket-elimination = Dynamic programming Bucket-elimination: In a bucket sum costs and maximize over constrained assignments: b2b2 b1b1 b3b3 b4b4 b5b5 b6b6 Search: Branch and Bound or Best-first search.

Spring 2007 ICS Recursive-search: a linear space search guided by a tree-decomposition Given a tree network, we identify a node x_1 which, when removed, generates two subtrees of size n/2 (approximately). T_n is the time to solve a binary tree starting at x_1. T_n obeys recurrence T_n = k 2 T_n/2, T_1 = k We get: T_n = n k^{logn +1} Given a tree-decomposition having induced-width w* this generalize to recursive conditioning of tree-decompositions: T_n = n k^({w*+1} log n) because the number of values k is replaced by th enumber of tuples k^w*

Spring 2007 ICS Road Map Interleaving conditioning and elimination Cutset decomposition AND/OR cutset decomposition Super-bucket and super-clusters Time-space curves

Spring 2007 ICS OR Conditioning A=yellow A=green B=redB=blueB=redB=blueB=greenB=yellow C K G L D F H M J E C K G L D F H M J E C K G L D F H M J E C K G L D F H M J E C K G L D F H M J E C K G L D F H M J E Inference may require too much memory Condition on some of the variables A C B K G L D F H M J E Graph Coloring problem

Spring 2007 ICS AND/OR w-cutset A C BK G L DF H M J E A C B K G L D F H M J E A C BK G L DF H M J E C B K G L D F H M J E 3-cutset A C BK G L DF H M J E C K G L D F H M J E 2-cutset A C BK G L DF H M J E L D F H M J E 1-cutset

Spring 2007 ICS Selecting an AND/OR w-cutset A C B K G L D F H M J E A C B K G L D F H M J E A C B K G L D F H M J E pseudo tree1-cutset treegrahpical model

Spring 2007 ICS Searching AND/OR Graphs AO(j): searches depth-first, cache i-context j = the max size of a cache table (i.e. number of variables in a context) j=0j=w* Space:O(n) Time:O(exp(w* log n)) Space:O(exp w*) Time:O(exp w*) Space:O(exp(j) ) Time:O(exp(m_j+j) m_j - AO depth of j-cutset j

Spring 2007 ICS Conceptual difference Traditional (w) cutset: Minimize the number of nodes Improve by organizing in AND/OR tree AND/OR (w) cutset: Minimize depth of AND/OR cutset tree

Spring 2007 ICS AND/OR (w) cutset properties THEOREM: Given a graphical model, |Cutset | ≥ depth(Cutset) ≥ depth(AO-Cutset) The inequalities are often strict. Cutset = minimal cardinality (w) cutset depth(Cutset)= minimal depth over pseudo trees for Cutset AO-Cutset= minimal depth AND/OR (w) cutset

Spring 2007 ICS How to find the AND/OR (w) cutset Finding the minimal depth AND/OR (w) cutset is NP hard Heuristics for AND/OR w-cutset Min-Fill – (for large w) Min-Depth – (for small w)

Spring 2007 ICS Quality of start pseudo trees CPCS 422 network

Spring 2007 ICS Improved caching scheme context(X k ) = [X 1 X 2 …X k ] i-bound < k X1X1 A X K-i XkXk X K-i+1 context(X k ) = [X k-i+1 …X k ] in conditioned subproblem Cache for X k is purged for every new instantiation of X k-i X1X1 A X K-i XkXk X K-i+1

Spring 2007 ICS Experimental results Measures Time Networks Random, Genetic Linkage Algorithms AO(i) – AO with caching full contexts (No Caching on Cutset) + (AO Search) (Caching on Cutset) + (AO Search) (Caching on Cutset) + (BE)

Spring 2007 ICS Random networks (Time) N=40, K=3, P=2, 20 instances, w*=7 i-boundAlgorithmsdepthTime(sec) MinFillMinDepthMinFillMinDepth 1AO(i) (No Caching on Cutset) + (AO Search) (Caching on Cutset) + (AO Search) (Caching on Cutset) + (BE) AO(i) (No Caching on Cutset) + (AO Search) (Caching on Cutset) + (AO Search) (Caching on Cutset) + (BE) AO(i) (No Caching on Cutset) + (AO Search) (Caching on Cutset) + (AO Search) 0.55 (Caching on Cutset) + (BE)

Spring 2007 ICS Random networks (Time) N=60, K=3, P=2, 20 instances, w*=11 i-boundAlgorithmsdepthTime(sec) MinFillMinDepthMinFillMinDepth 6(No Caching on Cutset) + (AO Search) (Caching on Cutset) + (AO Search) (Caching on Cutset) + (BE) (No Caching on Cutset) + (AO Search) (Caching on Cutset) + (AO Search) (Caching on Cutset) + (BE) (No Caching on Cutset) + (AO Search) (Caching on Cutset) + (AO Search) (Caching on Cutset) + (BE)

Spring 2007 ICS Genetic Linkage Networks EA4 - N=1173, K=5, w*=15 i-boundAlgorithmsdepthTime(sec) MinFillMinDepthMinFillMinDepth 6AO(i) (No Caching on Cutset) + (AO Search) (Caching on Cutset) + (AO Search) (Caching on Cutset) + (BE) AO(i) (No Caching on Cutset) + (AO Search) (Caching on Cutset) + (AO Search) (Caching on Cutset) + (BE) AO(i) (No Caching on Cutset) + (AO Search) (Caching on Cutset) + (AO Search) (Caching on Cutset) + (BE)

Spring 2007 ICS Time-Space complexity of of w-cutset Space: O(exp(w)) W -cutset: a set that when removed the induced- width is w. c(w): size of w-cutset. m(w): depth of AO w-cutset Time: O(exp(w+c(w))) on OR space Time: O(exp(w+m(w))) on AND/OR space