Efficient multiple constraint acquisition


Constraint acquisition systems such as QuAcq and MultiAcq can assist non-expert users to model their problems as constraint networks by classifying (partial) examples as positive or negative. For each negative example, the former focuses on one constraint of the target network, while the latter can learn a maximum number of constraints. Two bottlenecks of the acquisition process where both these algorithms encounter problems are the large number of queries required to reach convergence, and the high cpu times needed to generate queries, especially near convergence. In this paper we propose algorithmic and heuristic methods to deal with both these issues. We first describe an algorithm, called MQuAcq, that blends the main idea of MultiAcq into QuAcq resulting in a method that learns as many constraints as MultiAcq does after a negative example, but with a lower complexity. A detailed theoretical analysis of the proposed algorithm is also presented. Then we turn our attention to query generation which is a significant but rather overlooked part of the acquisition process. We describe how query generation in a typical constraint acquisition system operates, and we propose heuristics for improving its efficiency. Experiments from various domains demonstrate that our resulting algorithm that integrates all the new techniques does not only generate considerably fewer queries than QuAcq and MultiAcq, but it is also by far faster than both of them, in average query generation time as well as in total run time, and also largely alleviates the premature convergence problem.

This is a preview of subscription content, log in to check access.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15


  1. 1.

    Personal communication with the authors of the algorithms.

  2. 2.

    The ternary constraints derived when i = k or j = l in |xixj|≠|xkxl| were excluded from the target network


  1. 1.

    Tsouros, D.C., Stergiou, K., & Sarigiannidis, P.G. (2018). Efficient methods for constraint acquisition. In 24th International Conference on Principles and Practice of Constraint Programming.

  2. 2.

    Freuder, E.C. (1999). Modeling: the final frontier. In The First International Conference on The Practical Application of Constraint Technologies and Logic Programming (PACLP), London (pp. 15–21).

  3. 3.

    O’Sullivan, B. (2010). Automated modelling and solving in constraint programming.. In AAAI (pp. 1493–1497).

  4. 4.

    Freuder, E.C., & O’Sullivan, B. (2014). Grand challenges for constraint programming. Constraints, 19(2), 150–162.

    Google Scholar 

  5. 5.

    Lombardi, M., & Milano, M. (2018). Boosting combinatorial problem modeling with machine learning. arXiv:1807.05517.

  6. 6.

    De Raedt, L., Passerini, A., & Teso, S. (2018). Learning constraints from examples. In Proceedings in Thirty-Second AAAI Conference on Artificial Intelligence.

  7. 7.

    Freuder, E.C. (2018). Progress towards the holy grail. Constraints, 23(2), 158–171.

    MathSciNet  MATH  Google Scholar 

  8. 8.

    Bessiere, C., Koriche, F., Lazaar, N., & O’Sullivan, B. (2017). Constraint acquisition. Artificial Intelligence, 244, 315–342.

    MathSciNet  MATH  Google Scholar 

  9. 9.

    Angluin, D. (1988). Queries and concept learning. Machine learning, 2(4), 319–342.

    MathSciNet  Google Scholar 

  10. 10.

    Bessiere, C., Coletta, R., Hebrard, E., Katsirelos, G., Lazaar, N., Narodytska, N., Quimper, C.-G., Walsh, T., & et al. (2013). Constraint acquisition via partial queries.. In IJCAI: International Joint Conference on Artificial Intelligence, (Vol. 13 pp. 475–481).

  11. 11.

    Arcangioli, R., Bessiere, C., & Lazaar, N. (2016). Multiple constraint aquisition. In IJCAI: International Joint Conference on Artificial Intelligence (pp. 698–704).

  12. 12.

    Paulin, M., Bessiere, C., & Sallantin, J. (2008). Automatic design of robot behaviors through constraint network acquisition IEEE. In 20th IEEE International Conference on Tools with Artificial Intelligence, ICTAI’08, (Vol. 1 pp. 275–282).

  13. 13.

    Bessiere, C., Coletta, R., Freuder, E.C., & O’Sullivan, B. (2004). Leveraging the learning power of examples in automated constraint acquisition. In International Conference on Principles and Practice of Constraint Programming Springer (pp. 123–137).

  14. 14.

    Bessiere, C., Coletta, R., Koriche, F., & O’Sullivan, B. (2005). A sat-based version space algorithm for acquiring constraint satisfaction problems. In European Conference on Machine Learning Springer (pp. 23–34).

  15. 15.

    Lallouet, A., Lopez, M., Martin, L., & Vrain, C. (2010). On learning constraint problems. In 22nd IEEE International Conference on Tools with Artificial Intelligence (ICTAI) IEEE, (Vol. 1 pp. 45–52).

  16. 16.

    Beldiceanu, N., & Simonis, H. (2012). A model seeker: Extracting global constraint models from positive examples. In International Conference on Principles and Practice of Constraint Programming Springer (pp. 141–157).

  17. 17.

    Freuder, E.C., & Wallace, R.J. (1998). Suggestion strategies for constraint-based matchmaker agents. In International Conference on Principles and Practice of Constraint Programming Springer (pp. 192–204).

  18. 18.

    O’Connell, S., O’Sullivan, B., & Freuder, E.C. (2004). A study of query generation strategies for interactive constraint acquisition. In Applications and Science in Soft Computing (pp. 225–232): Springer.

  19. 19.

    Bessiere, C., Coletta, R., O’Sullivan, B., Paulin, M., & et al. (2007). Query-driven constraint acquisition.. In IJCAI: International Joint Conference on Artificial Intelligence, (Vol. 7 pp. 50–55).

  20. 20.

    Shchekotykhin, K., & Friedrich, G. (2009). Argumentation based constraint acquisition. In Ninth IEEE International Conference on Data Mining, ICDM’09 IEEE (pp. 476–482).

  21. 21.

    Addi, H.A., Bessiere, C., Ezzahir, R., & Lazaar, N. (2018). Time-bounded query generator for constraint acquisition. In International Conference on the Integration of Constraint Programming, Artificial Intelligence, and Operations Research Springer (pp. 1–17).

  22. 22.

    Addi, H.A., & Ezzahir, R. (2019). $$p_a$$-quacq: Algorithm for constraint acquisition system. In Smart Data and Computational Intelligence (pp. 249–256): Springer International Publishing.

  23. 23.

    Daoudi, A., Mechqrane, Y., Bessiere, C., Lazaar, N., & Bouyakhf, E.H. (2016). Constraint acquisition using recommendation queries. In IJCAI: International Joint Conference on Artificial Intelligence (pp. 720–726).

  24. 24.

    Bessiere, C., Coletta, R., Daoudi, A., Lazaar, N., Mechqrane, Y., & Bouyakhf, E.-H. (2014). Boosting constraint acquisition via generalization queries.. In ECAI (pp. 99–104).

  25. 25.

    Bshouty, N.H. (1995). Exact learning boolean functions via the monotone theory. Information and Computation, 123(1), 146–153.

    MathSciNet  MATH  Google Scholar 

  26. 26.

    Bshouty, N.H. (2018). Exact learning from an honest teacher that answers membership queries. Theoretical Computer Science, 733, 4–43.

    MathSciNet  MATH  Google Scholar 

  27. 27.

    Bshouty, N.H., Goldman, S.A., Hancock, T.R., & Matar, S. (1996). Asking questions to minimize errors. Journal of computer and system sciences, 52(2), 268–286.

    MathSciNet  MATH  Google Scholar 

  28. 28.

    Angluin, D., Frazier, M., & Pitt, L. (1992). Learning conjunctions of horn clauses. Machine Learning, 9(2-3), 147–164.

    MATH  Google Scholar 

  29. 29.

    Blum, A., & Rudich, S. (1995). Fast learning of k-term dnf formulas with queries. Journal of Computer and System Sciences, 51(3), 367–373.

    MathSciNet  MATH  Google Scholar 

  30. 30.

    Bessiere, C., Daoudi, A., Hebrard, E., Katsirelos, G., Lazaar, N., Mechqrane, Y., Narodytska, N., Quimper, C.-G., & Walsh, T. (2016). New approaches to constraint acquisition. In Data mining and constraint programming (pp. 51–76): Springer.

  31. 31.

    Khanna, S., Sudan, M., Trevisan, L., & Williamson, D.P. (2001). The approximability of constraint satisfaction problems. SIAM Journal on Computing, 30(6), 1863–1920.

    MathSciNet  MATH  Google Scholar 

  32. 32.

    Boussemart, F., Hemery, F., Lecoutre, C., & Sais, L. (2004). Boosting systematic search by weighting constraints. In Proceedings of the 16th European Conference on Artificial Intelligence IOS Press (pp. 146–150).

  33. 33.

    Mason, J. (1997). Purdey’s general store Dell Magazine April.

  34. 34.

    Cabon, B., De Givry, S., Lobjois, L., Schiex, T., & Warners, J.P. (1999). Radio link frequency assignment. Constraints, 4(1), 79–89.

    MATH  Google Scholar 

  35. 35.

    Angluin, D., & Slonim, D.K. (1994). Randomly fallible teachers: Learning monotone dnf with an incomplete membership oracle. Machine Learning, 14(1), 7–26.

    MATH  Google Scholar 

  36. 36.

    Angluin, D., Kriķis, M., Sloan, R.H., & Turán, G. (1997). Malicious omissions and errors in answers to membership queries. Machine Learning, 28(2-3), 211–255.

    MATH  Google Scholar 

  37. 37.

    Bisht, L., Bshouty, N.H., & Khoury, L. (2008). Learning with errors in answers to membership queries. Journal of Computer and System Sciences, 74(1), 2–15.

    MathSciNet  MATH  Google Scholar 

  38. 38.

    Sakakibara, Y. (1991). On learning from queries and counterexamples in the presence of noise. Information Processing Letters, 37(5), 279–284.

    MathSciNet  MATH  Google Scholar 

Download references

Author information



Corresponding author

Correspondence to Dimosthenis C. Tsouros.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This paper is an extended version of paper [1] that appeared in the proceedings of CP-2018.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Tsouros, D.C., Stergiou, K. Efficient multiple constraint acquisition. Constraints (2020). https://doi.org/10.1007/s10601-020-09311-4

Download citation


  • Constraint acquisition
  • Learning
  • Modeling