Computer-aided modelling of constraint problems C. Bessiere, LIRMM-CNRS, Montpellier, France In collaboration with: E. Freuder, B. O’Sullivan, U. College Cork, Ireland R. Coletta, F. Koriche, G. Raymond, J. Quinqueton, LIRMM Supported by: CNRS (France), Science Foundation Ireland, Microsoft Research (UK)
Remi [thanks for the graphs] Joel Barry [thanks for the slides] Gene In collaboration with... Fred Gilles
Over the last 30 years, considerable progress has been made in Constraint Programming CP has applications in many areas such as resource allocation, scheduling, design, etc. However, the use of CP remains limited to specialists (there are not enough!) This has retarded the uptake of CP in many real-world contexts Motivation
Constraint Programming Problem Variables Domains Constraints Solution modelling solving ?? search, propagation, heuristics, etc.
Modelling/Solving Find the ’good’ variables/domains Find the ’good’ constraints Find the ’good’ solver Requires a great expertise in CP to know what is the ’good’ !
Stand alone modelling ( we don’t care about efficiency issues) Given a problem P: Decide vars/values: X, D Decide constraints: C …so that any s sol(X,D,C) is a solution to the initial problem experience shows that knowing the definition of ’constraint network’ is not sufficient!
Our overall goal By utilizing techniques from other fields (machine learning, databases, etc.), novices can be assisted in using CP without the help of an expert By utilizing techniques from other fields (machine learning, databases, etc.), novices can be assisted in using CP without the help of an expert
Computer-aided modelling historical data machine learning constraint acquisition X 1,D 1 X 2,D 2 X 3,D 3 pre-models X,D,C User YES! DB + CP solnogood revise refute classification abstraction
Constraint acquisition? Users can provide and recognize examples of satisfactory or undesirable states Users cannot articulate the precise constraints themselves This is a scenario which arises in many application domains
Basics of the approach As starting point, we assume that the user provides: L the language in which to encode the problem X the set of variables of her problem D the set of domains of the variables In addition it is also assumed that the user can provide/recognize the classification of an example, thus: E + a subset of the solutions to the target CSP E - a set of non-solutions to it
VS N1 N2 N3 Nj Nk T Ni nil Version spaces We use Mitchell’s version space learning as a starting point S G Version spaces exhibit some nice properties (wrt interaction): they are defined by two frontiers (upper and lower bounds) poly space for expo #networks they can be computed incrementally w.r.t. the training data the result does not depend of the order of the data (commutativity) more specific more general
An example Examples constraint language Target CSP: X: D: C:
Processing e 1 +
Processing e 1 +..e 2 -
Processing e 1 +..e 2 -..e 3 -
Redundancy bites! To prune the version space between x 1 and x 3 we need a negative example where x 1 < x 3, but satisfying all other constraints No such example exists! X1>=X3 is redundant
Redundancy rules Redundancy rules can be built independently of the problem we acquire and can, thus, be included in a constraint library Redundancy rules can be built independently of the problem we acquire and can, thus, be included in a constraint library
Using redundancy rules Remember this situation? Consider this redundancy rule If the left-hand side of the rule is true, we trigger it to ensure that it is satisfied If the left-hand side of the rule is true, we trigger it to ensure that it is satisfied The version space between x 1 and x 3 can now be reduced to {>, >= }.
However, there is a problem! Redundancy rules are well-suited to discovering constraints that are redundant because of conjunctions of other constraints However, a constraint can be redundant because of a conjunction of disjunctions of constraints We refer to this as higher-order redundancy Since our redundancy rules are in the form of Horn clauses, they cannot tackle such redundancies
Higher-order redundancy Target: Examples
Higher-order redundancy Target: Examples or
Higher-order redundancy None of the version spaces have converged None of the version spaces have converged Target: Examples or
Encoding examples as clauses We can encode each negative example e as a clause cl e : The literal l ij U ij is true if c ij must be at least as specific as the given bound U ij
On the example Target: Examples (l 12 v l 13 ) (l 13 v l 23 ) or
Redundancy rules as clauses R =
Redundancy = backbone detection R = After e 3 - : Conflict is in the backbone ?
Empirical evaluation Redundancy rules affect the basic algorithm quite dramatically (while being polynomial) Exploiting the backbone is the dominant approach, but there is a runtime penalty ( coNP-complete problem to solve) here is a tradeoff between speed-of-response and pruning power
What do you take home? A step-by-step decomposition of the process of automatically acquiring a constraint network from historical data and basic interaction with a novice A technique for acquiring constraints from examples of solutions and non-solutions The redundancy problem and a way to tackle it
Future work There is lots to do here! How to interact (efficiently and smoothly) with the user? What about non-binary constraints? PAC learnability analysis? Noise and errors are an issue