Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cost function optimization & local consistency Thomas Schiex INRA – Toulouse France.

Similar presentations


Presentation on theme: "Cost function optimization & local consistency Thomas Schiex INRA – Toulouse France."— Presentation transcript:

1 Cost function optimization & local consistency Thomas Schiex INRA – Toulouse France

2 Mars 2006Math CSP Workshop Oxford2 Overview  Introduction and definitions What is it ? How do we solve it ?  Local consistency Fundamental operations on soft CN How are fair valuation structures ? Equivalence preserving operations Local consistencies Max flow as a local consistency ?  Conclusion

3 Mars 2006Math CSP Workshop Oxford3 Why soft constraints?  CSP framework: for decision problems  Many problems are overconstrained or optimization problems  Economics (combinatorial auctions) Given a set G of goods and a set B of bids…  Bid (B i,V i ), B i requested goods, V i value … find the best subset of compatible bids Best = maximize revenue (sum)

4 Mars 2006Math CSP Workshop Oxford4 Why soft constraints?  Satellite scheduling Spot 5 is an earth observation satellite It has 3 on-board cameras Given a set of requested pictures (of different importance)…  Resources, data-bus bandwidth, setup-times, orbiting …select a subset of compatible pictures with max. importance (sum)

5 Mars 2006Math CSP Workshop Oxford5 Why soft constraints?  Probabilistic inference (bayesian nets) Given a probability distribution defined by a DAG of conditional probability tables And some evidence …find the most probable explanation for the evidence (product) Haplotyping

6 Mars 2006Math CSP Workshop Oxford6 Why soft constraints?  Ressource allocation (frequency assignment) Given a telecommunication network …find the best frequency for each communication link avoiding interferences Best can be:  Minimize the maximum frequency (max)  Minimize the global interference (sum) w/o mentionning MaxCut/Clique, Vertex cover…

7 Mars 2006Math CSP Workshop Oxford7 Soft constraint network (CN) (X,D,C)(X,D,C) X={x 1,..., x n } variables D={D 1,..., D n } finite domains C={f,...} e cost functions  f S, f ij, f i f ∅ scope S,{x i,x j },{x i }, ∅  f S (t):  E (ordered by ≼,  ≼ T )  Obj. Function: F(X)=  f S (X[S])  Solution: F(t)  T  Soft CN: find minimum cost solution identity annihilator commutative associative monotonic

8 Mars 2006Math CSP Workshop Oxford8 Specific frameworks Lexicographic CN, probabilistic CN… Instance E  ≼T≼T Classic CN {t,f}{t,f} and t ≼ f Possibilistic [0,1] max 0≼10≼1 Fuzzy CN [0,1] usual min 1≼01≼0 Weighted CN (bounded or not) [0,k]+ 0≼k0≼k Bayes net [0,1] × 1≼01≼0

9 Basic operations - combination/join - projection

10 Mars 2006Math CSP Workshop Oxford10 Cost function implication f P implied by g Q ( f P ≼g Q, g Q tighter than f P ) iff for all t∊ℓ(P∪Q), f P (t[P])≼g Q (t[Q]) xixi xjxj g(x i,x j ) bb2 bg3 br2 gb4 gg5 gr4 rbT=6 rg rr xixi f(x i ) b1 g2 r3 xixi g[x i ] b2 g4 rT=6 impliesor T=1 : classic CSP case

11 Mars 2006Math CSP Workshop Oxford11 Combination (join with , + here ) xixi xjxj f(x i,x j ) bb6 bg0 gb0 gg6 xjxj xkxk g(x j,x k ) bb6 bg0 gb0 gg6 xixi xjxj xkxk h(x i,x j,x k ) bbb12 bbg6 bgb0 bgg6 gbb6 gbg0 ggb6 ggg  = 0  6

12 Mars 2006Math CSP Workshop Oxford12 Projection (elimination) xixi xjxj f(x i,x j ) bb4 bg6 br0 gb2 gg6 gr3 rb1 rg0 rr6 f[x i ] xixi g(x i ) b g r 0 0 2 g[  ] hh 0 Min

13 Systematic search Branch and bound(s)

14 Mars 2006Math CSP Workshop Oxford14 Systematic search (LB) Lower Bound (UB) Upper Bound If  UB then prune variables under estimation of the best solution in the sub-tree = best solution so far Each node is a soft constraint subproblem LB ff = f  = T

15 Mars 2006Math CSP Workshop Oxford15 Local consistency  Very useful in classical CSP Node consistency (1-consistency) Arc consistency…(2-consistency in binary CSP) Related to tractable classes (AC: tree, 2SAT)  Produces an equivalent more explicit problem: Preserves solutions (costs), may detect unfeasibility (gives a better f ∅ )

16 Mars 2006Math CSP Workshop Oxford16 Classical arc consistency (binary CSP)  for any x i and c ij c=(c ij ⋈ c j )[x i ] brings no new information on x i w v v w 0 0 0 0 ij T T xixi xjxj c ij vv0 vw0 wvT wwT xixi c(x i ) v0 wT c ij ⋈ c j T (c ij ⋈ c j )[-x j ]

17 Mars 2006Math CSP Workshop Oxford17 Arc consistency and soft constraints w v v w 0 0 0 0 ij 2 1 xixi xjxj f ij vv0 vw0 wv2 ww1 XiXi f(x i ) v0 w1 f ij  f j 1 Always equivalent iff  idempotent [Rosenfeld 76, Bistarelli et al. 95]  for any x i and f ij f=(f ij  f j )[x i ] brings no new information on x i (f ij  f j )[x i ]

18 Mars 2006Math CSP Workshop Oxford18  Combination+Extraction: equivalence preserving transformation [S,CS]  Requires the existence of a pseudo difference (a b)  b = a: fair valued CN. Extraction of implied constraints 2 w v v w 0 0 0 ij 1 01 1 xixi xjxj f ij vv0 vw0 wv2 ww1 xixi f(x i ) v0 w1 f ij  f j f ij  f j [x i ] xixi xjxj f ij vv0 vw0 wv1 ww0

19 Mars 2006Math CSP Workshop Oxford19 Fair valuation structures  Totally characterized [CS,C] Slices that interact together idempotently Each slice (discrete case) is isomorphic to  S  = (N U {  }, +) infinite top  S k = ([0,k], + k )finite top This means only 3 types of structures to consider. Tractability only known for finite costs+infinite T (idempotent case should be … easy)

20 Mars 2006Math CSP Workshop Oxford20 (K,Y) equivalence preserving inference  For a set K of constraints and a scope Y Replace K by (  K) Add (  K)[Y] to the CN (implied by K) Extract (  K)[Y] from (  K)  Yields an equivalent network  All implicit information on Y in K is explicit  Repeat for a class of (K,Y) until fixpoint

21 Mars 2006Math CSP Workshop Oxford21 Node Consistency (NC * ): (f i,  ) EPI For any variable X i   a, f  + f i (a)<T   a, f i (a)= 0 Complexity: O(nd) w v v v w w C =C = T = 3 2 2 1 1 1 1 1 0 0 1 x y z 0 0 0 1 4

22 Mars 2006Math CSP Workshop Oxford22 0 1 Full AC (FAC * ): ({f ij,f j },x i ) EPI NC * For all f ij   a  b f ij (a,b) + f j (b) = 0 (full support) w v v w C  =0 T=4 0 1 0 1 0 x z 1 1 That’s our starting point! No termination !!!

23 Mars 2006Math CSP Workshop Oxford23 0 Arc Consistency (AC * ): ({f ij },x i ) EPI NC * For all f ij   a  b f ij (a,b)= 0 b is a support complexity: O(n 2 d 3 ) w v v w w C =C = T=4 2 1 1 1 0 0 0 0 1 x y z 1 1 2 0

24 Mars 2006Math CSP Workshop Oxford24 Confluence is lost Finding an AC closure that maximizes the lb is an NP- hard problem [CS]

25 Mars 2006Math CSP Workshop Oxford25 Directional AC (DAC * ): ({f ij,f j },x i ) i<j EPI NC * For all f ij (i<j)  a  b f ij (a,b) + f j (b) = 0 b is a full-support complexity: O(ed 2 ) and it solves trees.

26 Mars 2006Math CSP Workshop Oxford26 Simultaneous AC operations ap.  Use rationals for costs. Infinite T.  Value a, variable i, cost function f ij. w iaj = cost sent from f i (a) to f ij - from f ij to f i (a). w i = amount sent from f i to f ∅. Max ∑ w i  For all (a,i) f i (a) - ∑ j w iaj – w i ≥ 0  For all f ij,a,b f ij (a,b)+ w iaj + w jbi ≥ 0 Solved in pol. time by LP for bounded arities

27 Mars 2006Math CSP Workshop Oxford27 Extra properties  More powerful than any seq. of AC preserving transformation (infinite T)  No better equivalent problem with the same scopes (finite costs, infinite T) Quite expensive in practice. Pb nvar/ncostEDACcpu"LPbcpu" ub CELAR06 100/133200.023.56213389* CELAR07 200/2865100000.04314533529343592

28 Mars 2006Math CSP Workshop Oxford28 Max-Flow as local consistency ? If d=2 (Max-2SAT), the LP is a max-flow problem  What if d > 2 ?  What if finite T ? Current only tractable language of MaxCSP 2 Monotone (maxSAT) Submodular (maxCSP): solved by a max-flow algorithm Any connection ?

29 Mars 2006Math CSP Workshop Oxford29 References  Tutorial slides on cost function optimization (soft constraints) are available here: http://www.math.unipd.it/~frossi/cp-school/Ecole2005.ppt. http://www.math.unipd.it/~frossi/cp-school/Ecole2005.ppt  An introduction with references is available here.here  Rosenfeld, A., Hummel, R., and Zucker, S. (1976). ``Scene labeling by relaxation operations''. IEEE Transactions on Systems, Man and Cybernetics, 6:420--433.  Valued Constraint Satisfaction Problems: hard and easy problemsT. Schiex, H. Fargier et G. Verfaillie Proc. of the International joint Conference in AI, Montreal, Canada, August 1995. Valued Constraint Satisfaction Problems: hard and easy problems  Semiring-based CSPs and Valued CSPs: Basic Properties and Comparison. S. Bistarelli, H. Fargier, U. Montanari, F. Rossi, T. Schiex, et G. Verfaillie (LNCS 1106, Selected papers from the Workshop on Over-Constrained Systems at CP'95, reprints and background papers), pages 111-150. Springer, 1996. Semiring-based CSPs and Valued CSPs: Basic Properties and Comparison.  Arc consistency for Soft Constraints T. Schiex Proc. of CP'2000. Singapour, September 2000. Arc consistency for Soft Constraints  Arc consistency for soft constraints, Martin Cooper, Thomas Schiex Artificial Intelligence, Volume 154 (1-2), Avril 2004, 199-227. Arc consistency for soft constraints  High-order consistency in valued constraint satisfaction, M. Cooper. Constraints. 10:283-305, 2005


Download ppt "Cost function optimization & local consistency Thomas Schiex INRA – Toulouse France."

Similar presentations


Ads by Google