Query-Driven Constraint Acquisition

Christian Bessiere, Remi Coletta, Barry O'Sullivan, Mathias PaulinIJCAI 2007

Abstract

Constraint Programming (CP) is a powerful paradigm for solving complex combinatorial problems, yet it faces a significant "modeling bottleneck": the requirement for human experts to formally define the constraints. Constraint acquisition aims to automate this process by learning rules from examples. This paper introduces an active learning framework that intelligently selects queries to present to a user, drastically reducing the number of examples required to accurately identify the underlying constraint network. By employing strategies such as "Optimal-in-expectation" queries, the system achieves logarithmic convergence, enabling the acquisition of complex rules—such as those for Sudoku—with minimal human intervention.

The Modeling Bottleneck in Constraint Programming

Defining the formal constraints for problems like scheduling or configuration is a non-trivial task that typically requires expertise in CP. Constraint acquisition systems, such as the earlier CONACQ framework, were designed to bridge this gap by learning from positive and negative examples provided by a human. However, these passive systems often struggled with efficiency, requiring a massive volume of examples if the provided data was redundant or uninformative.

This research addresses the Interactive Acquisition Problem: how can a system actively choose the most informative queries to ask a user? By shifting from passive observation to active querying, the system can target specific "edge cases" that eliminate large portions of the search space (the "version space") of possible constraint networks.

Active Query Strategies

The authors propose three primary strategies for query generation, built upon a SAT-based version space framework:

  1. Irredundant Queries: The system avoids asking about instances where the outcome is already logically implied by current knowledge.
  2. Optimistic Queries: This strategy targets queries that would eliminate the maximum number of potential constraints if the user classifies the instance as a solution.
  3. Optimal-in-expectation Queries: Inspired by the principle of binary search, this strategy seeks queries that are expected to reduce the version space by approximately half, regardless of the user's response.
The evolution of the knowledge base K as the system processes new examples and updates its internal representation of the constraint network.

Because finding the mathematically optimal query is NP-hard, the authors developed an algorithm using a SAT solver to find "good enough" queries that fall within a targeted range of informativeness, ensuring the system remains responsive during human interaction.

Experimental Results and Key Insights

The proposed algorithms were evaluated on several benchmarks, including random binary problems, structured pattern problems, and Sudoku ($4 \times 4$). The results demonstrate a clear advantage for active learning strategies, particularly as problem complexity increases.

A performance comparison across various benchmarks, showing that active strategies like 'Optimal-in-expectation' significantly outperform random and irredundant sampling in terms of query count (#q).

Key Findings:

  • Rapid Convergence: On a $4 \times 4$ Sudoku grid, the "Optimal-in-expectation" strategy reached the correct set of rules in just 57 queries. In contrast, both "Random" and "Irredundant" strategies failed to converge even after 1,000 queries.
  • The Power of Redundancy: The system leverages background knowledge and the interdependencies between constraints (e.g., transitivity) to accelerate learning. As problems become more constrained, these active strategies actually become more efficient because each query provides more leverage against the remaining version space.
  • Real-Time Interaction: Despite the underlying complexity of query generation, the average computation time remained in the millisecond range for most benchmarks, making the approach viable for real-time human-in-the-loop applications.

Limitations and Future Outlook

While the query-driven approach represents a significant step forward, several challenges remain. The system's learning is limited by its "bias" (the library of potential constraints it can consider). If a user's intended rule is not in this library, the system cannot learn it. Furthermore, the current model assumes an "oracle" user who never makes mistakes; future iterations will need to account for human noise and misclassifications. Finally, scaling these SAT-based query generators to massive industrial-scale problems remains an area for ongoing research.

Summary updated

BibTeX
@inproceedings{bessiere2007query,
  author = {Christian Bessiere and Remi Coletta and Barry O'Sullivan and Mathias Paulin},
  title = {{Query-Driven Constraint Acquisition}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2007},
}
Figure