Constraint-Based Inference Using Local Consistency in Junction Graphs
Total Page:16
File Type:pdf, Size:1020Kb
Constraint-Based Inference Using Local Consistency in Junction Graphs Le Chang and Alan K. Mackworth 1 Abstract. In this paper we take a step beyond the generalized arc consis- The concept of local consistency plays a central role in constraint tency approach and propose a new family of generalized local con- satisfaction and has been extended to handle general constraint-based sistency concepts for the junction graph representation of CBI prob- inference (CBI) problems. We propose a family of novel generalized lems. These concepts are based on a general condition that depends local consistency concepts for the junction graph representation of only on the existence and properties of the multiplicative absorbing CBI problems. These concepts are based on a general condition that element and does not depend on other semiring properties of CBI depends only on the existence and property of the multiplicative ab- problems. We present several local consistency enforcing algorithms sorbing element and does not depend on the other semiring proper- with various levels of enforcement and corresponding theoretic and ties of CBI problems. We present several local consistency enforcing empirical complexity analyses. We show in this paper that some of algorithms and their approximation variants. Theoretical complex- these algorithms can be seen as generalized versions of well-known ity analyses and empirical experimental results for the application local consistency enforcing techniques in CSPs and can be exported of these algorithms to both MaxCSP and probability inference are to other domains. Other abstract local consistency concepts are novel given. We also discuss the relationship between these local consis- to the constraint programming community and provide efficient pre- tency concepts and message passing schemes such as junction tree processing results with a user-specified approximation threshold. We algorithms and loopy message propagation. also discuss the relationship between these local consistency con- cepts and message passing schemes such as junction tree algorithms and loopy message propagation. Local consistencies can be achieved 1 Introduction along with message propagation and can improve the efficiency of The concept of local consistency plays a central role in constraint message passing schemes. satisfaction. Given a constraint satisfaction problem (CSP), local In this paper, we use bold letters to denote sets of elements and consistency can be characterized as deriving new, possibly tighter, regular letters to denote individual elements. Given a set of elements constraints based on local information. The derived constraints sim- X and an element Z ∈ X, X−Z denotes the set of elements X − plify the representation of the original CSP without the loss of solu- {Z}. tions. This can be seen as a preprocessing procedure. For example, a value may be removed from a variable domain by the preprocess- ing because it violates these derived constraints. Both systematic ap- 2 The Constraint-Based Inference Framework proaches, such as inference or propagation algorithms, and stochas- Constraint-Based Inference (CBI) is an umbrella term for a class of tic approaches, such as local searches, benefit from these simplifi- various superficially different problems including probabilistic in- cations or domain size reduction. Among the family of local con- ference, decision-making under uncertainty, constraint satisfaction sistency enforcing algorithms or filtering algorithms, arc consistency problems, propositional satisfiability problems, decoding problems, [16] is one of the most important techniques for binary classic CSPs. and possibility inference. We abstract these problems into a sin- It is straightforward to extend it as generalized arc consistency [17] gle formal framework [5] using the algebraic semiring structure to handle non-binary classic CSPs. Many stronger local consisten- S = hA, ⊕, ⊗i where constraint combination (constraint aggrega- cies [18, 25, 14] have been studied within the constraint program- tion) is represented by the abstract multiplicative operator ⊗ and ming community. Based on the Semiring CSP [4] and Valued CSP constraint marginalization (domain reduction) is represented by the [22] frameworks, arc consistency has also been extended, as soft arc abstract additive operator ⊕. This framework, based on the synthesis consistency [7, 3], to handle over-constrained and preference-based of the existing abstract representation and algorithmic frameworks problems that can be modelled as soft CSPs. Recently, we presented from various fields [4, 22, 11, 10, 1, 21], provides a broader cover- a weaker condition [6] based on a semiring based framework for age of both the problem space and the inference algorithm space. constraint-based inference (CBI) problems [5]. More specifically, we A CBI problem P in this framework is a tuple (X, D, S, F), reduce a CBI problem to its underlying classic CSP according to the where X is a set of variables, D is a corresponding set of fi- weaker condition and then apply the generalized arc consistency ap- nite domains for the variables, S = hA, ⊕, ⊗i is a commutative proach to general CBI problems beyond classic and soft CSPs. The semiring, and F is a set of constraints. Each constraint is a func- weaker condition proposed in [6] has also been relaxed to fit gener- tion that maps a subset of variables to values in A. More specif- alized approximate preprocessing schemes. ically, we use Scope(f) to denote the subset of variables that is 1 Department of Computer Science, University of British Columbia, Canada, in the scope of the constraint f and DX to represent the domain email: {lechang,mack}@cs.ubc.ca of variable X. Two constraint operations then are defined: (1) A constraint g = f1 ⊗ f2 is the combination of two constraints Input: A CBI problem P = (X, D, S, F) and its initialized junc- f1 and f2 if Scope(g) = Scope(f1) ∪ Scope(f2) and g(w) = tion graph representation J = (C, S) ′ f1(w↓Scope(f1)) ⊗ f2(w↓Scope(f2)) for every value assignment w Output: A Single Cluster Consistent CBI problem P = Ä ′ ′ of variables in Scope(g); and (2) A constraint g = X f is the (X, D , S, F ) constraint that marginalizes out X ∈ Scope(f) from a constraint f 1: for each Ci ∈C do Ä if Scope(g) = Scope(f) − {X} and g(w) = f(xi, w) 2: for each X Domain φ do xi∈DX ∈ ( Ci ) for every value assignment w of variables in Scope(g). Given a CBI 3: if REVISE(X, φCi ) then problem and the two constraint operations specified above, the infer- 4: for each Cj ∈C do Ä Æ ence task is defined as computing gCBI (Z) = Y f∈F f, where 5: if X ∈ Scope(φCj ) then Z is a subset of variables of interest and Y = X − Z. If ⊕ of the 6: Remove all tuples in φCj with the value that is re- semiring S is idempotent, the allocation task is defined as computing moved from X Ä Æ y = arg Y f∈F f, where arg is a prefix of operator ⊕. In other 7: end if words, arg ⊕ is an operator that returns the arguments of the ⊕ op- 8: end for erator. For example, the classic CSP can be seen as a CBI problem 9: end if using the commutative semiring SCSP = h{FALSE, TRUE}, ∨, ∧i 10: end for to embed it into the framework. The inference task of classic CSP is 11: end for Î Ï ′ to compute the truth value of gCBI () = X f∈F f and the allo- 12: Return P := P cation task is find a complete assignment of variables that satisfies g . CBI Figure 1. Single cluster consistency enforcing algorithm (SCC-Enforcing). Our local consistency concepts are based on this CBI framework and apply to CBI problems with commutative semirings that are eliminative. A commutative semiring S = hA, ⊕, ⊗i is elimina- tive [6] if there exists a multiplicative absorbing element α⊗ ∈ A the multiplicative absorbing element α⊗ that is equal to the addi- (α⊗ ⊗ a = α⊗, ∀a ∈ A) and α⊗ is equal to the additive identity tive identity element 0 for an eliminative commutative semiring, and element 0 (0 ⊕ a = a, ∀a ∈ A). Furthermore, our approximate lo- using ≤S to replace 6= in the following definitions. cal consistency concepts apply to CBI problems with commutative semirings that are eliminative and monotonic. A commutative semir- 3.1 Single, Directional and Neighborhood Cluster ing S = hA, ⊕, ⊗i is monotonic [6] if there exists a total order ≤S on A, the additive identity element 0 is the minimum element w.r.t. Consistencies ≤S, a≤Sb implies a⊕c≤Sb⊕c and a⊗c≤Sb⊗c, ∀a, b, c ∈ A. For The fundamental concept of local consistency for an initialized junc- example, Weighted CSPs can be embedded into the CBI framework tion graph of a CBI problem with an eliminative commutative semir- N using the semiring SWCSP = h , min, +i. Because the multiplica- ing is single cluster consistency. Here we consider only the local tive absorbing element α⊗ of the semiring SWCSP is equal to the constraints attached to a single cluster and do not consider the effects additive identity element 0 that is equal to +∞, SWCSP is elimina- of other clusters. Formally: tive. Also we can show that SWCSP is monotonic. More details on eliminative and monotonic semirings can be found in [6]. Definition 1 (Single Cluster Consistency (SCC)) A cluster Ci of , P A junction graph J = (C S) of a CBI problem = an initialized junction graph is locally consistent if ∀X ∈ (X, D, S, F) is defined as follows: C = {C1, · · · ,Cn} is a set of Scope(φCi ), ∀x ∈ DX , ∃w, a value assignment of variables clusters, each cluster Ci is an aggregation of variables that is a sub- Scope(φC ) , s.t. φC (x, w) 6= α⊗. An initialized junction graph set of X and has attached initially a local constraint φ with null i −X i Ci of a CBI problem is Single Cluster Consistent if all the clusters are scope and 1 as the default constraint value or cost (1 is the iden- consistent.