NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Partial Queries for Constraint Acquisition

Christian Bessiere, Clément Carbonnel, Anton Dries, Emmanuel Hebrard, George Katsirelos, Nadjib Lazaar, Nina Narodytska, Claude-Guy Quimper, Kostas Stergiou, Dimosthenis C. Tsouros, Toby WalsharXiv 2020

TL;DR

This paper introduces QUACQ2, a novel active learning algorithm that efficiently learns constraint networks by asking users to classify partial assignments. This approach significantly reduces the number of queries needed compared to traditional methods, making constraint acquisition more practical, especially for complex problems.

What Problem Does This Paper Address?

Constraint programming (CP) is a powerful technique for solving complex combinatorial problems, but defining the constraints can be a major bottleneck, especially for non-experts. Traditional constraint acquisition methods often require a vast number of "membership queries" (asking if a full assignment is a solution), which can be exponentially large in the number of variables. This paper tackles the challenge of learning constraint networks more efficiently by proposing an active learning approach that uses "partial queries." Instead of asking about full assignments, the system asks users to classify assignments to subsets of variables as positive or negative. This allows the learning algorithm to focus its queries more effectively, drastically reducing the overall number of interactions needed.

Methods

The core of the paper is the QUACQ2 algorithm. It's an active learner that iteratively refines a set of learned constraints. When QUACQ2 receives a negative example (an assignment that shouldn't be a solution but is classified as such by the current learned model), it uses two key sub-procedures:

  • FindScope: This recursive function efficiently identifies the scope (the set of variables involved) of a violated constraint. It does this by strategically asking partial queries and narrowing down the possibilities.
  • FindC: Once the scope is identified, FindC learns the specific constraint within that scope. It does this by generating examples that are accepted by the current learned model but violate potential constraints from the basis, and then asking the user to classify these examples.

The algorithm is designed to converge on a constraint network equivalent to the target network in a polynomial number of queries, with theoretical lower bounds showing its optimality for certain constraint languages.

Datasets

The paper evaluates QUACQ2 on several benchmark problems, including:

  • Purdey: A problem involving matching families to items and payment methods.
  • Zebra: A classic logic puzzle.
  • Golomb: A Golomb ruler problem.
  • Random: Artificially generated random constraint networks.
  • RLFAP: Radio Link Frequency Assignment Problem.
  • Sudoku: Standard Sudoku puzzles.
  • Jigsaw: A variant of Sudoku with irregular shapes.

These benchmarks vary in structure, size, and the types of constraints involved, allowing for a comprehensive evaluation of QUACQ2's performance.

Key Insights and Ideas

  • Partial Queries are Powerful: The core insight is that asking about subsets of variables (partial queries) is significantly more efficient than asking about full assignments. This allows the algorithm to pinpoint violated constraints much faster.
  • Focusing on Negative Examples: QUACQ2 leverages negative examples to aggressively narrow down the search space for violated constraints. This is a key driver of its efficiency.
  • Theoretical Optimality: The paper provides theoretical guarantees, showing that QUACQ2 is optimal or near-optimal for learning certain classes of constraint networks, especially when compared to the theoretical minimum number of queries required.
  • Background Knowledge is a Game-Changer: Providing QUACQ2 with pre-existing constraints (background knowledge) dramatically reduces the number of queries needed for learning, highlighting its utility in real-world scenarios where some problem structure might already be known.
  • Interactive Learning is Feasible: By introducing a time cutoff for query generation, QUACQ2 becomes practical for interactive learning, where a human user is involved.

Key Results

  • QUACQ2 learns constraint networks in a polynomial number of partial queries, a significant improvement over the exponential number of membership queries required by prior methods.
  • The algorithm is shown to be optimal or near-optimal for learning certain constraint languages.
  • Experimental results demonstrate that QUACQ2 can learn various types of constraint networks, regardless of their underlying structure.
  • Providing background knowledge can reduce the number of queries by factors of 1.5 to 4.0, depending on the amount of prior information.
  • The introduction of a time cutoff for query generation makes the learning process interactive and avoids excessive waiting times.

Limitations and Future Work

  • Query Generation Time: While QUACQ2 is efficient in terms of the number of queries, the time to generate some queries, especially towards the end of the learning process, can be substantial in its basic setting. The paper addresses this with a time-limited query generation strategy.
  • Human Interaction: The effectiveness of the learning process is still dependent on the user's ability to correctly classify partial assignments.
  • Future Work: The authors suggest that QUACQ2 can be adapted to handle more informative user responses (beyond simple "yes/no") and that its efficiency can be further improved by incorporating more sophisticated query generation strategies. The paper also hints at potential extensions for learning more complex constraint languages.

Summary updated

BibTeX
@misc{bessiere2020partial,
  author = {Christian Bessiere and Clément Carbonnel and Anton Dries and Emmanuel Hebrard and George Katsirelos and Nadjib Lazaar and Nina Narodytska and Claude-Guy Quimper and Kostas Stergiou and Dimosthenis C. Tsouros and Toby Walsh},
  title = {{Partial Queries for Constraint Acquisition}},
  year = {2020},
  eprint = {2003.06649},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2003.06649},
}
Figure