Guided Bottom-Up Interactive Constraint Acquisition

Dimosthenis C. Tsouros, Senne Berden, Tias Guns

TL;DR

Interactive Constraint Acquisition (CA) allows non-experts to build constraint models by answering simple queries, but existing systems suffer from high query counts, long user wait times, and a reliance on inaccessible custom solvers. This paper introduces GrowAcq (an incremental bottom-up framework), PQ-Gen (a projection technique enabling the use of off-the-shelf solvers without premature convergence), and a probabilistic query guidance objective. Together, these methods reduce user queries by up to 60% and allow CA systems to scale to candidate sets over one million constraints—up to 50 times larger than prior benchmarks.

What Problem Does This Paper Address?

Constraint Programming (CP) excels at solving hard combinatorial puzzles and scheduling tasks, but formulating problems into constraints over decision variables requires significant domain expertise. Active Constraint Acquisition (CA) aims to automate this: starting with a large pool of candidate constraints (the bias $B$), the system asks an end-user partial or complete membership queries (e.g., "Is this partial assignment a valid sub-solution?") to isolate the hidden target constraints ($C_T$).

However, interactive CA faces three major bottlenecks:

  1. Query Fatigue: Reaching convergence often requires thousands of queries.
  2. Poor Scalability: As the candidate bias grows, computing the next query can cause huge user waiting times.
  3. Solver Lock-In and Premature Convergence: Standard solvers struggle to prove when remaining constraints are indirectly implied, often triggering time-outs that falsely claim learning has finished ("premature convergence"). Consequently, previous state-of-the-art methods relied on custom, unreleased search-tree modifications.

Methods

The authors tackle these bottlenecks with three key contributions:

[Candidate Bias B]
       │
       ▼
┌────────────────────────────────────────────────────────┐
│ GrowAcq (Meta-Framework)                               │
│  • Incrementally adds variables: Y ← Y ∪ {x}           │
│  • Solves CT[Y] using only slice: Bi = B[Y] \ B[Y\{x}] │
│  • Calls inner learner (e.g., MQuAcq-2)                │
└───────────────────────┬────────────────────────────────┘
                        │ generates queries via
                        ▼
┌────────────────────────────────────────────────────────┐
│ PQ-Gen (Projection-based Query Generation)             │
│  1. Project problem to active variables in B           │
│  2. Filter large bias with lightweight two-pass check  │
│  3. Conventional solver (CPMpy) optimizes query        │
└───────────────────────┬────────────────────────────────┘
                        │ guided by
                        ▼
┌────────────────────────────────────────────────────────┐
│ Guided Objective Function                              │
│  • Penalizes violating likely target constraints       │
│  • Rewards violating likely non-target constraints     │
│  • Estimated via empirical relation acceptance rates   │
└────────────────────────────────────────────────────────┘
  • PQ-Gen (Projection-based Query Generation): Instead of using custom CP solvers, PQ-Gen projects the search space down to the subset of variables that appear in candidate constraints ($Y = \bigcup_{c \in B} var(c)$). To avoid heavy propagation bottlenecks over large biases, it uses a two-phase check: first solving known constraints $C_L[Y]$ alone, only enforcing constraint disjunctions when necessary. The authors formally prove that if PQ-Gen returns no query, convergence is guaranteed.
  • GrowAcq (Bottom-Up Acquisition): A meta-algorithm that wraps around any active CA algorithm (like MQuAcq-2). Rather than tackling all variables $X$ at once, GrowAcq introduces variables one at a time, exploring only the slice of the bias that connects the new variable to previously considered variables ($B_i = B[Y_i] \setminus B[Y_{i-1}]$).
  • Guided Query Generation: Standard systems attempt to maximize the number of violated candidate constraints in every query. While this eliminates candidates quickly when the user answers "Yes," it causes slow scope-finding binary searches when the user answers "No." The authors formulate an objective function that penalizes violating constraints predicted to be in $C_T$ while maximizing violations of constraints predicted to be false, using a simple counting-based estimator $P(c \in C_T)$.

Datasets

The authors evaluated their methods on standard CA benchmarks:

  • Jigsaw Sudoku: 81 variables, domain size 9, 811 target $\neq$ constraints, and a bias of 19,440 binary constraints.
  • Murder Puzzle: 20 variables, domain size 5, 52 target constraints, and 760 candidate constraints.
  • Random CSP: 100 variables, domain size 5, 495 target $\neq$ constraints, and 19,800 candidate constraints.
  • Golomb Rulers: 8 marks, quaternary distance constraints, 238 candidate constraints.
  • Job-Shop Scheduling:
  • Standard: 10 jobs, 3 machines (60 variables), 14,160 candidate constraints.
  • Massive Bias Instances: JS-15-11 (15 jobs, 11 machines, ~542,850 candidates) and JS-19-12 (19 jobs, 12 machines, ~1,037,400 candidates).

Key Insights and Ideas

  • Smaller subproblems accelerate binary search: Scope-finding algorithms isolate violated constraints in $\mathcal{O}(\log |Y|)$ queries. By growing the variable set incrementally from $Y = \emptyset$, GrowAcq forces early queries to be small, making them easier for humans to answer and vastly reducing scope-isolation queries.
  • Decoupling from custom solvers: Prior work assumed custom C++ search-tree hooks were mandatory to return valid partial assignments without timeouts. PQ-Gen proves that variable projection combined with anytime optimization allows standard solvers (here, CPMpy) to achieve 100% convergence without premature termination.
  • Exploiting the asymmetric cost of feedback: Generating a "No" answer is only helpful if the violated target constraint is easy to pinpoint; generating a "Yes" answer is best when it disproves dozens of false candidates at once. Structuring the query optimization objective around this asymmetry drastically cuts query counts.

Key Results

  • Solver Reliability & Convergence: In hyperparameter sensitivity tests on Jigsaw Sudoku, the state-of-the-art baseline TQ-Gen converged only 32% of the time, whereas PQ-Gen achieved 100% convergence across all 16 parameter configurations.
  • Query Reductions: Combining GrowAcq with guided query generation reduced total queries by 60% on Golomb rulers (from 233 to 100), 39% on Jigsaw Sudoku (from 6,458 to 3,963), and 32% on the Murder problem compared to MQuAcq-2.
  • User Waiting Time: Maximum user wait time between queries dropped by up to 88% on standard Job-Shop.
  • Scaling to Massive Biases: On the million-constraint scheduling instance (JS-19-12), GrowAcq ran 25.6x faster overall than MQuAcq-2 (~3,054s vs. ~78,124s) and slashed the maximum wait time between queries from 5.6 hours (20,371s) down to just 6.19 seconds.

Limitations and Future Work

  • Sparse Constraint Networks: GrowAcq shines on dense constraint problems, but on sparse networks (like Job-Shop), introducing variables one by one often yields iterations where no new constraints exist. In such cases, GrowAcq required ~23–25% more queries than looking at the global problem directly.
  • Naive Probabilities: The oracle guidance currently relies on a simple count of how often a relation type has been accepted versus rejected. The authors note that graph neural networks or machine learning predictors could yield sharper probabilities.
  • Noisy Feedback: The model assumes the human oracle is infallible. Extending active learning to handle noisy, imperfect user answers remains open for future research.

Summary updated

BibTeX
@inproceedings{tsouros2023guided,
  author = {Dimosthenis C. Tsouros and Senne Berden and Tias Guns},
  title = {{Guided Bottom-Up Interactive Constraint Acquisition}},
  booktitle = {CP},
  year = {2023},
  url = {https://openreview.net/forum?id=DUPLAZaikh},
}

Loading related content...

Figure