1.36k likes | 1.49k Views
Approximation Techniques for Automated Reasoning. Irina Rish IBM T.J.Watson Research Center rish@us.ibm.com. Rina Dechter University of California, Irvine dechter@ics.uci.edu . Outline. Introduction Reasoning tasks Reasoning approaches: elimination and conditioning
E N D
Approximation Techniques for Automated Reasoning Irina Rish IBM T.J.Watson Research Center rish@us.ibm.com Rina Dechter University of California, Irvine dechter@ics.uci.edu
Outline • Introduction • Reasoning tasks • Reasoning approaches: elimination and conditioning • CSPs: exact inference and approximations • Belief networks: exact inference and approximations • MDPs: decision-theoretic planning • Conclusions SP2
Automated reasoning tasks • Propositional satisfiability • Constraint satisfaction • Planning and scheduling • Probabilistic inference • Decision-theoretic planning • Etc. Reasoning is NP-hard Approximations SP2
Graphical Frameworks • Our focus - graphical frameworks: constraint and belief networks • Nodes variables • Edges dependencies (constraints, probabilities, utilities) • Reasoning graph transformations SP2
Propositional Satisfiability Example: party problem • If Alex goes, then Becky goes: • If Chris goes, then Alex goes: • Query: Is it possible that Chris goes to the party but Becky does not? SP2
Constraint Satisfaction Example: map coloring Variables - countries (A,B,C,etc.) Values - colors (e.g., red, green, yellow) Constraints: SP2
Constrained Optimization Example: power plant scheduling SP2
Probabilistic Inference Example: medical diagnosis smoking visit to Asia V S lung cancer T B C bronchitis tuberculosis abnormality in lungs A X D dyspnoea (shortness of breath) X-ray Query: P(T = yes | S = no, D = yes) = ? SP2
Decision-Theoretic Planning Example: robot navigation • State = {X, Y, Battery_Level} • Actions = {Go_North, Go_South, Go_West, Go_East} • Probability of success = P • Task: reach the goal location ASAP SP2
Reasoning Methods • Our focus - conditioningandelimination • Conditioning (“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) SP2
0 Conditioning: Backtracking Search SP2
Bucket EliminationAdaptive Consistency (Dechter & Pear, 1987) = ¹ D = C A ¹ C B = A contradiction = Bucket E: E ¹ D, E ¹ C Bucket D: D ¹ A Bucket C: C ¹ B Bucket B: B ¹ A Bucket A: SP2
Bucket-elimination and conditioning: a uniform framework • Unifying approach to different reasoning tasks • Understanding: commonality and differences • “Technology transfer” • Ease of implementation • Extensions to hybrids: conditioning+elimination • Approximations SP2
Approximations • Exact approaches can be intractable • Approximate conditioning • Local search, gradient descent (optimization, CSPs, SAT) • Stochastic simulations (belief nets) • Approximate elimination • Local consistency enforcing (CSPs), local probability propagation (belief nets) • Bounded resolution (SAT) • Mini-bucket approach (belief nets) • Hybrids (conditioning+elimination) • Other approximations (e.g., variational) SP2
“Road map” • CSPs: complete algorithms • Variable Elimination • Conditioning (Search) • CSPs: approximations • Belief nets: complete algorithms • Belief nets: approximations • MDPs SP2
Constraint Satisfaction • Planning and scheduling • Configuration and design problems • Circuit diagnosis • Scene labeling • Temporal reasoning • Natural language processing Applications: SP2
E A B red green red yellow green red green yellow yellow green yellow red A D B F G C Constraint Satisfaction Example: map coloring Variables - countries (A,B,C,etc.) Values - colors (e.g., red, green, yellow) Constraints: SP2
eliminating E C RDBC D 3 value assignment B The Idea of Elimination SP2
Variable Elimination Eliminate variables one by one: “constraint propagation” Solution generation after elimination is backtrack-free SP2
Elimination Operation:join followed by projection Join operation over A finds all solutions satisfying constraints that involve A SP2
E D || RDCB C || RACB || RAB B RA A A || RDB D C B E Bucket EliminationAdaptive Consistency(Dechter and Pearl, 1987) RCBE || RDBE , || RE SP2
Induced Width Width along ordering d: max # of previous neighbors (“parents”) Induced width The width in the ordered induced graph, obtained by connecting “parents” of each recursively, from i=n to 1. SP2
Induced width (continued) • Finding minimum- ordering is NP-complete (Arnborg, 1985) • Greedy ordering heuristics: min-width, min-degree, max-cardinality (Bertele and Briochi, 1972; Freuder 1982) • Tractable classes: trees have • of an ordering is computed in O(n) time, i.e. complexity of elimination is easy to predict SP2
Adaptive Consistencyas “bucket-elimination” Initialize: partition constraints into For i=n down to 1 // process buckets in the reverse order for all relations do // join all relations and “project-out” If is not empty, add it to where k is the largest variable index in Else problem is unsatisfiable Return the set of all relations (old and new) in the buckets SP2
Solving Trees (Mackworth and Freuder, 1985) Adaptive consistency is linear for trees and equivalent to enforcing directionalarc-consistency (recording only unary constraints) SP2
Properties of bucket-elimination(adaptive consistency) • Adaptive consistency generates a constraint network that is backtrack-free (can be solved without deadends). • The time and space complexity of adaptive consistency along ordering d is . • Therefore, problems having bounded induced width are tractable (solved in polynomial time). • Examples of tractable problem classes: trees ( ), series-parallel networks ( ), and in general k-trees ( ). SP2
“Road map” • CSPs: complete algorithms • Variable Elimination • Conditioning (Search) • CSPs: approximations • Belief nets: complete algorithms • Belief nets: approximations • MDPs SP2
Backtracking Search+Heuristics “Vanilla” backtracking + variable/value ordering Heuristics + constraint propagation + learning +… • Look-ahead schemes • Forward checking (Haralick and Elliot, 1980) • MAC (full arc-consistency at each node) (Gashnig 1977) • Look back schemes • Backjumping (Gashnig 1977, Dechter 1990, Prosser 1993) • Backmarking (Gashnig 1977) • BJ+DVO (Frost and Dechter, 1994) • Constraint learning (Dechter 1990, Frost and Dechter 1994, Bayardo and Miranker 1996) SP2
Search complexity distributions Complexity histograms (deadends, time) => continuous distributions (Frost, Rish, and Vila 1997; Selman and Gomez 1997, Hoos 1998) Frequency (probability) nodes explored in the search space SP2
Constraint Programming • Constraint solving embedded in programming languages • Allows flexible modeling + with algorithms • Logic programs + forward checking • Eclipse, Ilog, OPL • Using only look-ahead schemes. SP2
Complete CSP algorithms: summary • Bucket elimination: • adaptive consistency (CSP), directional resolution (SAT) • elimination operation: join-project (CSP), resolution (SAT) • Time and space exponential in the induced width (given a variable ordering) • Conditioning: • Backtracking search+heuristics • Time complexity: worst-case O(exp(n)), but average-case is often much better. Space complexity: linear. SP2
“Road map” • CSPs: complete algorithms • CSPs: approximations • Approximating elimination • Approximating conditioning • Belief nets: complete algorithms • Belief nets: approximations • MDPs SP2
Approximating Elimination:Local Constraint Propagation • Problem: bucket-elimination algorithms are intractable when induced width is large • Approximation: bound the size of recorded dependencies, i.e. perform local constraint propagation (local inference) • Advantages: efficiency; may discover inconsistencies by deducing new constraints • Disadvantages: does not guarantee a solution exist SP2
Constraint Propagation • Arc-consistency, unit resolution, i-consistency X Y 1, 2, 3 1, 2, 3 1 X, Y, Z, T 3 X Y Y = Z T Z X T = 1, 2, 3 1, 2, 3 T Z SP2
1 3 2 3 Constraint Propagation • Arc-consistency, unit resolution, i-consistency X Y 1 X, Y, Z, T 3 X Y Y = Z T Z X T = T Z • Incorporated into backtracking search • Constraint programming languages powerful approach for modeling and solving combinatorial optimization problems. SP2
Arc-consistency Only domain constraints are recorded: Example: SP2
Local consistency: i-consistency • i-consistency: Any consistent assignment to any i-1 variables is consistent with at least one value of any i-th variable • strong i-consistency: k-consistency for every • directional i-consistency Given an ordering, each variable is i-consistent with any i-1 preceding variables • strong directional i-consistency Given an ordering, each variable is strongly i-consistent with any i-1 preceding variables SP2
E E E E D C D D D C C C B B B B A Directional i-consistency Adaptive d-path d-arc SP2
Enforcing Directional i-consistency • Directional i-consistencybounds the size of recorded constraints by i. • i=1 - arc-consistency • i=2 - path-consistency • For , directional i-consistency is equivalent to adaptive consistency SP2
Example: SAT • Elimination operation – resolution • Directional Resolution – adaptive consistency (Davis and Putnam, 1960; Dechter and Rish, 1994) • Bounded resolution – bounds the resolvent size • BDR(i) – directional i-consistency (Dechter and Rish, 1994) • k-closure – full k-consistency (van Gelder and Tsuji, 1996) • In general: bounded induced-width resolution • DCDR(b) – generalizes cycle-cutset idea: limits induced width by conditioning on cutset variables (Rish and Dechter 1996, Rish and Dechter 2000) SP2
DR complexity SP2
History • 1960 – resolution-based Davis-Putnam algorithm • 1962 – resolution step replaced by conditioning (Davis, Logemann and Loveland, 1962) to avoid memory explosion, resulting into a backtracking search algorithm known as Davis-Putnam (DP), or DPLL procedure. • The dependency on induced width was not known in 1960. • 1994 – Directional Resolution (DR), a rediscovery of the original Davis-Putnam, identification of tractable classes (Dechter and Rish, 1994). SP2
DR versus DPLL: complementary properties (k,m)-tree 3-CNFs (bounded induced width) Uniform random 3-CNFs (large induced width) SP2